5.0 fixes / changes
I figured I'd make one thread for things I fix / change, this was just the first significant change. If I understood what calc() was supposed to do in parser.cpp (that is, calculate a simple math expression in a string) then it had a few problems. I rewrote it, see below:
Code:
int calc( string calc ) |
This has been applied and will be available on the next CVS push. I only verified that it compiled, I haven't tested the code at all.
Thanks! |
I was looking back through this and I missed a change that I had made.
At the end of the op section, where I call buffer.clear(), that needs to be moved outside of the if(!op) block, and the op = ch above it is redundant. So what was: Code:
}; Code:
}; |
Applied that change, too
|
EDIT: This doesn't really work. I was assuming the client kept it's connection to the world server, that doesn't look like the case. I hadn't tested it enough.
|
in parser.cpp the itoa() function should declare the tmp[] buffer as 12 chars instead of 10. it needs one char for the terminating null and it's possible the value is negative which will prepend a '-' to the string and requiring another character.
|
nice changes here alkrun
:juggle: |
thanks.
Another thing that's sort of unrelated to a code fix is that the anonymous CVS source is "messed up"(tm). A lot of the files are doublespaced when checked out on windows (not sure about unix). In some files the EOL sequence when checked out is CRCRLF. I've written something to strip all of the files of CRCRLF and replace it with a CRLF, but I figured I'd pass it along. My guess is that something is wrong with the way the code is being dumped into CVS. |
Alkrun, regarding CVS in the Windows platform... The double spacing isn't a problem in the CVS itself. I believe it's from going from UNIX to Windows. I'm assuming you are using WinCVS to retrieve files from CVS. So here is how to fix the double spacing...
In WinCVS go into preferences, Globals tab. At the bottom will be a checkbox for "Check out text files with the Unix LF". Make sure that is checked and all is well :D |
Ah, I'm actually using cvs from the commandline. I've seen this before but it's normally when files are checked out on a unix platform, then checked in using a cygwin version of CVS or some other method of copying files checked out from CVS on one platform to the other.
But I'll take a look and see if there's an option, I don't see one, so I might have to just use wincvs. Thanks. |
All times are GMT -4. The time now is 06:51 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.