Commit Graph

23 Commits (8db7c031ffda3a0d46f4d5df66e0cd0141c96862)

Author SHA1 Message Date
Giel van Schijndel 8db7c031ff Fix some compile errors that occur when DEBUG_TREAP is #defined
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5550 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-14 22:09:15 +00:00
Giel van Schijndel 379a905c6c * Move the type definitions of TREAP_NODE and TREAP from treap.h to treap.c (use a forward declaration in the header instead)
* Don't strdup strings retrieved from __FILE__ directives; just store const char* the pointer instead (prevents a memory leak as well)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5549 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-14 20:41:22 +00:00
Giel van Schijndel 077d4efefe * Remove unused functions treapReset, treapDisplayRec and treapDisplay
* Remove unused macro TREAP_DISPLAY
 * Directly use function treapGetSmallest, treapDel, treapFind and treapDestroy instead of macros TREAP_GETSMALLEST, TREAP_DEL, TREAP_FIND and TREAP_DESTROY respectively

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5547 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-14 20:22:19 +00:00
Giel van Schijndel 6e9db52984 Get rid of the unused, default comparison function for the values in treap nodes
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5545 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-14 17:49:10 +00:00
Giel van Schijndel 730188c081 * Get rid of treapint.h which declares prototypes for functions that are only used in treap.c.
* Declare these functions with static linkage instead.
 * Update autotools buildsystem, Code::Blocks project and MSVC project, raw win32 Makefiles don't need an update

NOTE: This may require updating of buildsystems not mentioned above

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5544 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-14 15:19:08 +00:00
Per Inge Mathisen be566a7d6d Add -Wcast-align and -Wmissing-declarations to autoconf debug builds, and fix warnings.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4403 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-28 23:28:44 +00:00
Dennis Schridde 10f2ccfd56 TRUE->true, FALSE->false (except in scripts)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4311 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-24 16:51:17 +00:00
Giel van Schijndel c51bd8ae10 * Get rid of a large quantity of unused parameters
* Turn some signed integers ("int" or "SDWORD") into unsigned integers where it made more sence (and signed integers caused warnings about comparing signed with unsigned integers)
 * At some places cast to an unsigned integer (where the type of the expression is a signed integer but the result of it logically _always_ is an absolute value)
 * Remove unused struct-type EVENT_INIT
 * Convert use of malloc->memcpy->free to one single realloc call (and now make sure to actually check realloc's return value, which wasn't done with the malloc call)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3037 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-10 23:15:46 +00:00
Giel van Schijndel e06c186bd6 * Replace a _lot_ of strcpy(), strcat() and sprintf() calls with the safer strncpy(), strncat() and snprintf() respectively
* Refactor NETlogEntry() to use the array of strings (packetname[]) instead of a large switch-statement with a lot of copy & pasted code


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2617 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-24 21:11:29 +00:00
Giel van Schijndel d65f88beb5 * Replace a lot of heap usage with malloc/free usage
* Use decent assertion expressions for some asserts (e.g. !"string", so that debuggers actually display something more interesting than 'FALSE')

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1815 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-04 20:46:30 +00:00
Per Inge Mathisen a9f120adec Add missing includes to quelch warnings.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1467 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-15 18:48:13 +00:00
Dennis Schridde d3408cec7b - Remove mem.h and references
- Fix possible illegal writes for research messages


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1460 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-15 12:01:36 +00:00
Dennis Schridde ce16856887 FREE->free, MALLOC->malloc (sed+review)
This patch will create crashes where the code expects FREE to set the pointer to NULL! (Those problems should be fixed anyway.)
The only occassion where I saw this is when quiting a game, so it is not too much of an issue.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1459 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-15 10:43:05 +00:00
Dennis Schridde 49ceba7503 Add GPL notices to all sourcecode files.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1014 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-15 20:09:25 +00:00
Dennis Schridde bf9d1d0fd1 Fix last commits and remove another bunch of warnings.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@886 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-02 14:38:09 +00:00
Dennis Schridde 495824aea2 Patch by Christian Ohm:
018 - Warning fixes in lib-framework


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@885 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-02 13:06:56 +00:00
Dennis Schridde fafa69842f x86_64 fixes by Pseudonym404. (Incl. some minor other changes, eg in src/game.c)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@854 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-25 01:26:05 +00:00
Dennis Schridde 75af155bbf Patches by Stefan Huehner: "code cleanup: void 5, static 4" and a slightly modified "doxy 1"
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@717 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-16 17:41:40 +00:00
Dennis Schridde a88bbc0c37 Patch by Stefan Huehner: "string 1"
Replace all STRING with char or const char.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@716 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-16 16:02:17 +00:00
Dennis Schridde 0e288f45e7 - Replace all ASSERT(( )) with ASSERT( )
- Simplify definition of ASSERT(). Now is the same for GCC and MSVC.
  This may not work on versions older than MSVC 2005. If you experience this, please report it!

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@613 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-23 12:58:48 +00:00
Dennis Schridde 62ae49b0ce Replaced all occurences of DBMB, DBPRINTF and DBERROR with their former define.
( DBPRINTF(("Message")); becomes debug( LOG_NEVER, "Message" ); )



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@608 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-22 14:28:49 +00:00
Per Inge Mathisen 2386a3e924 Reduce amount of memory debug log spam. Turn some into debug() calls. Make ASSERT()
really assert() when in debug mode.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@528 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-05 13:16:12 +00:00
No Author 5ba7ddac6b Create final repository structure.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@362 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-28 17:47:08 +00:00