In stock code, that's the variable that causes all this: max_buf_lines. Notice they have 2 different values for it. I'm not entirely sure why Sadiq had that variable array setup in his code. I don't think it really needs to be there.
So instead of:
char temp_buf[MAX_STRING_LENGTH + max_buf_lines];
Perhaps just:
char temp_buf[MAX_STRING_LENGTH];
Cause in the grand scheme of things, all he's really done is let another 48 chars go into temp_buf which doesn't seem very useful.
Has anyone come up with a work around on this particular snippet? Looks like a handy feature to have, but since my code otherwise gets passed cleanly by the -pedantic flag, I'd rather not remove it from the makefile just for the sake of having a format option in the line editor. Would be neat to have otherwise though. :-/
"The world of men is dreaming, it has gone mad in its sleep, and a snake is strangling it, but it can't wake up." -D.H. Lawrence
The error doesn't come up when compiling C++ but it is a legitimate issue in C since C does not technically allow variable sized arrays. What amazes me is that it takes using the -pedantic switch just to catch this.
SmaugMuds.org: http://www.smaugmuds.org - The Smaug MUDs Community Center
"The past was erased, the erasure was forgotten, the lie became truth." -- George Orwell, 1984
Anyone else notice that the -pedantic flag doesn't like this snippet? It complains about variable sized arrays if memory serves. Has anyone come up with a work around for this or do they just ignore the error or not use -pedantic?
"The world of men is dreaming, it has gone mad in its sleep, and a snake is strangling it, but it can't wake up." -D.H. Lawrence
A line full of S isn't a good test, there are no word breaks to format at. It worked for me, see this:
>
/l
------------------
1> You stand inside the northern gate of Darkhaven.
2> To the south lies the
3> intersection of Vertic Avenue and Justice Road.
------------------
>
/f
Reformating...
Reformating done.
>
/l
------------------
1> You stand inside the northern gate of Darkhaven. To the south lies the
2> intersection of Vertic Avenue and Justice Road.
------------------
>
Before the formatting I had 3 lines, the middle one was too short. After formatting it looked better.
Nice, It compiled clean and I tested it out. It doesnt even format
Begin entering your text now (/? = help /s = save /c = clear /l = list)
-----------------------------------------------------------------------
>
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
(Long line trimmed)
> >
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
(Long line trimmed)
> >
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
(Long line trimmed)
> >
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
(Long line trimmed)
> >
/f
Reformating...
Reformating done.
>
/s
Done.
<32700hp 102m 110mv> <#7>
l
Floating in a void
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
SSS
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
SSS
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
SSS
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
SSS
Exits: none.
Would anyone happen to know why? I hate having all these format problems -.- I just want to get it off my to do list lol.
cc1: warnings being treated as errors
build.c: In function `edit_buffer':
build.c:5265: warning: declaration of `x' shadows a previous local
build.c:5150: warning: shadowed declaration is here
I added everything here are the bugs, I tried making some sense of it and failed. If you are gonna explain it to me, explain it in idiot terms as ive only been coding for bout 12 days =)
Do let me know if there are any problems with it not behaving properly, it's been awhile since this one was last looked at since it's one of Sadiq's older ones.
SmaugMuds.org: http://www.smaugmuds.org - The Smaug MUDs Community Center
"The past was erased, the erasure was forgotten, the lie became truth." -- George Orwell, 1984
I scraped it, it made me too pissed. I just need a good /f command for SmaugFUSS I cant really edit all the stuff because im not sure of the differences of 1.4 smaug and FUSS :(. i wish I just knew how to hard code it myself =P
We established already that the strange distcc messages are something about Wolfpaw's clustered server auto-back-up at compile system in place...
-=Conner=-
--
Come test your mettle in the Land of Legends at telnet://tcdbbs.zapto.org:4000
or, for a little family oriented medieval fun, come join us at The Castle's Dungeon BBS at telnet://tcdbbs.zapto.org
or, if you just want information about either, check our web page at http://tcdbbs.zapto.org
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.