Commit Graph

979 Commits (1b0ae0932005a955fc00225ac8f5cf49980bd01f)

Author SHA1 Message Date
Dennis Schridde df6bd00d7e Provide fmaxf() / fminf() for non C99 compilers
Fixes #234.
This is not the patch attached there, since that one was broken.

From the manpage:
DESCRIPTION
       These functions return the larger value of x and y.
RETURN VALUE
       These functions return the maximum of x and y.
       If one argument is a NaN, the other argument is returned.
       If both arguments are NaN, a NaN is returned.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6601 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-09 03:53:08 +00:00
Dennis Schridde 80e64617b2 Use faster float code for hypotf, instead of falling back to doubles
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6600 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-09 03:53:05 +00:00
Dennis Schridde ed2a2011f6 Improve preprocessor checks for type definitions
* Check for C99 instead of !MSVC where we deal with C99 stuff
 * C++98 defines bool as well
 * Move BOOL after the bool checks, so we could define it to bool more easily

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6572 4a71c877-e1ca-e34f-864e-861f7616d084
2009-01-31 15:51:47 +00:00
Dennis Schridde e88fb88376 Detect C++98 and do not mix feature detection code with platform hacks (!!)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6571 4a71c877-e1ca-e34f-864e-861f7616d084
2009-01-31 15:51:43 +00:00
Dennis Schridde 98842001af Use bool instead of BOOL where the latter is not required
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6569 4a71c877-e1ca-e34f-864e-861f7616d084
2009-01-31 15:51:35 +00:00
Dennis Schridde f9ef8289a4 Bump SQLite3 to 3.6.10
An change was introduced on sqlite3_vfs which causes an incompatible
 pointer error when mixed with older sqlite versions. Thus bump the
 required version to 3.6.10 as well.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6564 4a71c877-e1ca-e34f-864e-861f7616d084
2009-01-30 18:28:21 +00:00
Giel van Schijndel cb22e77099 * Check whether the system itself already provides strlcpy and/or strlcat
- If it does, check whether it's behaviour is consistent with our implementation
   - If behaviour is consistent: use the system's implementation
   - If not, rename our implementation (to prevent symbol clashes) and use our own


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6556 4a71c877-e1ca-e34f-864e-861f7616d084
2009-01-24 18:15:19 +00:00
Per Inge Mathisen 0881493713 New cheat "noassert" and new command line option "--noassert" turns off the abort functionality in ASSERT() calls.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6527 4a71c877-e1ca-e34f-864e-861f7616d084
2009-01-02 11:16:40 +00:00
Giel van Schijndel 550efd000a Remove unused functions setMouseDown and setMouseDown
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6429 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-03 21:16:15 +00:00
Giel van Schijndel fc808a8c89 Only #define va_copy if it isn't #defined yet
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6367 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-23 17:24:48 +00:00
Giel van Schijndel ccc6206247 Add Doxygen documentation for v?asprintf
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6289 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-14 14:30:12 +00:00
Giel van Schijndel 7b37001471 Make v?asprintf return -1 on all errors (similar to GNU's implementation)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6287 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-14 14:28:21 +00:00
Giel van Schijndel 11e378ccce Allow WZ_ASSERT_STATIC_STRING to work when compiled as C++ as well
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6262 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-09 23:49:39 +00:00
Giel van Schijndel c99a123b50 * Remove unused list macros: LIST_INIT and LIST_ADD
* Rename LIST_ADDEND to LIST_APPEND (because that's what it does: append to a list)
 * Clean up the assertion in LIST_REMOVE
 * Prevent a potential bug in LIST_APPEND by not initialising the psNext pointer to NULL
  - doesn't ever occur right now, for one simple reason: the only place where this macro is used is on a structure that's initialised with memset(0)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6260 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-09 22:58:04 +00:00
Giel van Schijndel 17a0228d18 Remove unused function endian_fract
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6259 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-09 22:58:01 +00:00
Giel van Schijndel 2391ddd622 * Make the endian_*word class of functions/macros inline functions (and the type checking of their parameter) on ''all'' platforms!
* Fix several parameters that got passed wrong and didn't get caught due to the different definitions

Caught by EvilGuru

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6256 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-09 19:21:20 +00:00
Giel van Schijndel 03353e833e Allow the initialisation function of the debug callback to fail and report its failure through its return value:
* If initialisation of the debug callback failed, do ''not'' add it to the list of debug callbacks to use

This fixes ticket:136

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6249 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-08 19:30:18 +00:00
Giel van Schijndel 64910221e7 Fix several warnings that occur on NDEBUG builds:
* Missing returns from function
 * Functions that are defined in both DEBUG and NDEBUG builds but only used in DEBUG builds

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6179 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-16 14:22:29 +00:00
Giel van Schijndel e5183abb69 Lets at least keep the comment in front of the declaration it applies to... (regardless of C89/C99, see r6162)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6164 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-15 13:18:51 +00:00
Buginator 2ce52672c7 Declarations *before* statements. (To make a C89 compiler happy.)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6162 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-15 03:22:18 +00:00
Giel van Schijndel 1df1706440 * Fix several "comparison between signed and unsigned" warnings
* Const correctness
 * Use "(unsigned )?int" instead of "[SU](D?WORD|BYTE)" where the size guarantee is not required


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6158 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-14 20:42:20 +00:00
Giel van Schijndel ec4867f297 dirtyHypot() cleanup:
* Implement hypot() and hypotf() on non-C99 systems
 * Wherever the parameters to dirtyHypot() are signed: use hypotf() instead
 * Move some variables in to a more local scope
 * Merge the conditions of some nested if-statements
 * Get rid of some stupidly named variables (tempx and tempy are ''not'' good variable names, the names should indicate ''what'' the variables contain, not for how long)
 * Remove some unnecessary casting between float and [SU]DWORD


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6157 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-14 20:25:41 +00:00
Giel van Schijndel 29d7c7abfd Fix the raw win32 makefile system which got broken in r6144 and r6145:
* The lexers depend on the parser's headers so make sure to compile the parsers first
 * Move a misplaced line-wrapping backslash in src/makefile.win32


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6153 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-14 18:28:21 +00:00
Giel van Schijndel 810fac209b * Wrap all file lists in the automake and win32 makefiles across lines such that there's only one file on each line
* Alphabetically sort the file lists

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6144 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-13 13:04:37 +00:00
Buginator 6a70a7750d Changes the 'optional file not found' from LOG_WARNING to LOG_WZ, because of too much spam.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6131 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-11 19:15:08 +00:00
Giel van Schijndel d871a85964 Add video playback support:
* Add support for decoding and displaying of OggTheora/Vorbis videos
 * Change all references to *.rpl files to *.ogg files (and lower case them)
 * Add a new menu (and config) option for selecting the size at which to display videos (1x (native), 2x, full screen)

This closes ticket:64 and ticket:46

Code changes are ticket:64 (patch by Gerard Krol, Giel van Schijndel and Buginator)

FMVs can be found at http://download.gna.org/warzone/videos/sequences_ogg.zip (for now at least)
Videos encoded by Angus Lees


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6119 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-08 18:24:19 +00:00
Giel van Schijndel 77d7490ed3 Move all header content of math-help.h inside its header guards
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6111 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-04 12:34:42 +00:00
Giel van Schijndel a74c27019d Make sure to #define the [SU]BYTE_(MIN|MAX) and [SU]D?WORD_(MIN|MAX) constants in terms of the U?INT(8|16|32)_(MIN|MAX) constants
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6110 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-04 12:09:58 +00:00
Giel van Schijndel 953a3a998b Allow #including lib/framework/types.h without lib/framework/frame.h
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6109 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-04 12:09:53 +00:00
Per Inge Mathisen 4a9c00e469 Revert tagfile changes in r6084, r6080 and r6079. Apparently not ready for the unwashed masses yet.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6102 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-02 21:50:05 +00:00
Per Inge Mathisen b66897f058 Port to trunk the fix for virtual group recursion from tagfile branch. Add unit test to ensure
it never comes back.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6084 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-26 19:14:56 +00:00
Per Inge Mathisen 87bf67480e Also port over the required fixes for tagfile.c, or previous commit will not work.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6080 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-26 17:48:33 +00:00
Per Inge Mathisen 6fc021819c Do a dummy load of basic object data from tagfile to stress test tagfile system. Ported from work in tagfile branch.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6079 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-26 17:45:18 +00:00
Per Inge Mathisen 68ca9bef81 Fix tagfile type definition
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6078 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-26 17:39:10 +00:00
Giel van Schijndel 2cea275cb5 * Fully define struct timeval (not just forward declare)
* Forward declare struct timezone


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6063 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-20 23:42:48 +00:00
http://www.openasthra.com/c-tidbits/gettimeofday-function-for-windows/ 05f7761bab Add a gettimeofday() implementation for Windows
Epoch and hint to use GetSystemTimeAsFileTime taken from: http://www.openasthra.com/c-tidbits/gettimeofday-function-for-windows/

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6062 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-20 23:24:17 +00:00
Giel van Schijndel 10ac89541a Update our SQLite copy from 3.5.9 to 3.6.2
* 3.6.0 introduced an interface change to the VFS layer
 * Updated physfs_vfs.c for the interface change in 3.6.0, breaking compatibility with SQLite < 3.6.0
 * Change the configure script to require sqlite3 >= 3.6

This closes ticket:66

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6034 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-16 20:02:16 +00:00
Giel van Schijndel 043cc9d278 Fix a spelling error in the MSVC project files causing problems with the #include path
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6027 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-14 19:47:56 +00:00
Giel van Schijndel ff507b13f0 * Don't use "if USE_SYSTEM_SQLITE" sections in all Makefiles
* Use the pkg-config variables SQLITE_CFLAGS and SQLITE_LIBS to compile and link with instead


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6021 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-14 14:41:44 +00:00
Giel van Schijndel 140f553d06 * Change the autotools build system such that if the system provides an SQLite version that meets our requirements we use that instead of the one in our own repository
* Require sqlite3 versions >= 3.5.4 and < 3.6 (due to r5984 these versions are possible)
 * Move physfs_vfs.[ch] from lib/sqlite3/ to lib/framework/
 * Update the autotools, raw win32 Makefile, Code::Blocks and MSVC build systems
  - NOTE: Xcode still requires an update

This closes ticket:59


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6018 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-14 13:40:28 +00:00
Per Inge Mathisen 704117f85c Fix various doxygen errors and warnings
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5992 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-11 18:25:34 +00:00
Per Inge Mathisen be263e0b8c Fix missing define of WZ_DECL_THREAD on windows
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5991 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-11 18:16:06 +00:00
Buginator 21fdab0117 Modify debug output to specify the 'real' directory that physfs is using for the file in question.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5958 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-07 20:00:54 +00:00
Giel van Schijndel 01c6ba831c Allow compiling of utf.c outside of framework's debug facilities (i.e. allow it to be used in betawidget)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5942 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-06 16:20:06 +00:00
Giel van Schijndel bdae8ce9ef Only #include types.h in utf.h as we don't depend on the entire framework
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5940 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-06 16:02:26 +00:00
Giel van Schijndel 906f766b8a * When using a va_list multiple times make sure to va_copy it first
* Make sure to call va_end on all instances of va_list when we're done with it

Similar to r5930 (which fixed ticket:50)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5931 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-05 20:10:47 +00:00
Giel van Schijndel 37c6b31651 * When using a va_list multiple times make sure to va_copy it first
* Because va_copy is C99 provide a fallback for it on non-C99 systems (which assumes that va_list is just a pointer to the stack)

This fixes ticket:50, thanks to Buginator for finding the cause (though this solution is different from his suggestion)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5930 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-05 19:38:22 +00:00
Freddie Witherden bef604763f Add an nbytes parameter to UTF8toUTF16 and UTF16toUTF8 which allow for fetching the number of bytes allocated.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5917 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-02 14:37:01 +00:00
Freddie Witherden a8709983e0 Commit the final patch of patch #45; this cleans up utf.[ch].
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5916 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-02 11:21:12 +00:00
Giel van Schijndel 99fe22e0a4 Don't accept out-of-range Unicode codepoints in function unicode_utf8_char_length either
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5915 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-01 19:16:00 +00:00
Giel van Schijndel aabf08d6fa Change the UTF-8 encoder and decoder to only accept valid Unicode codepoints, not just every representable 32 bit unsigned integer
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5914 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-01 19:10:03 +00:00
Giel van Schijndel 0e88a86b8e Add two new functions: utf(8|16)_char_at_offset, which return a pointer to the index-th character in the given stream
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5911 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-31 20:39:17 +00:00
Giel van Schijndel f0f68e7386 Rename utf8.[ch] to utf.[ch] because it deals with different UTFs (Unicode Transformation Format) but not just specifically with UTF-8
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5910 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-31 20:06:40 +00:00
Giel van Schijndel d3eaf3bbd1 Add several new functions for converting between UTF-8 and UTF-16 to utf8.[ch]
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5902 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 15:15:16 +00:00
Giel van Schijndel a0cdfd44ab Rename utf8_(encode|decode) to utf8_(encode|decode)_utf32 because they convert between UTF-8 and UTF-32
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5901 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 15:15:09 +00:00
Giel van Schijndel dfa9c2bc01 Rename function unicode_strlen to utf32_strlen because it really determines the length of a UTF-32 encoded string
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5900 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 13:49:11 +00:00
Giel van Schijndel 2cb4c71883 * Split out the code that encodes a single Unicode character as UTF-8 into a separate function: encode_utf8_char
* This will allow encoding of Unicode strings to UTF-8 regardless of its current encoding

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5899 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 13:47:15 +00:00
Giel van Schijndel ac08ca70b0 * Seperate out the part that determines a single Unicode character's (codepoint actually) length when encoded as UTF-8 into a separate function: unicode_utf8_char_length
* This will allow determining of the length of a string when encoded as UTF-8 regardless of its current encoding

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5898 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 13:47:06 +00:00
Giel van Schijndel 5222037799 Move the duplicated UTF-8 decoding code out of functions utf8_character_count and utf8_decode and into new function decode_utf8_char, which only decodes a single UTF-8 character sequence
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5897 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 13:24:27 +00:00
Giel van Schijndel b10871a0ab Add utf8.c to the win32 makefile system (which I forgot in r5895)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5896 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 12:38:26 +00:00
Giel van Schijndel d45e64bf55 Reintroduce utf8.{c,h} for encoding and decoding UTF-8 strings
This is meant to be used with betawidget

This is a revert of r2477 (which removed the UTF-8 module)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5895 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 12:34:46 +00:00
Ari Johnson d5b341334d More changes from #ifdef __APPLE__ to #if defined(WZ_OS_MAC)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5880 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-27 15:24:21 +00:00
Freddie Witherden 55be99a19d Add sync-to-vblank support to Warzone; this closes ticket #38.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5871 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-25 18:01:49 +00:00
Giel van Schijndel 173ee31214 * Split ASSERT out into ASSERT_HELPER:
* ASSERT_HELPER can be used by debug functions that wish to alter the location information attached and printed with ASSERTs
 * Add some missing semi-colons (the previous ASSERT macro had a terminating semi-colon)
 * Change an ASSERT that checks calloc's return value into an if() block (we can also run out of memory on non-debug builds...)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5865 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-24 15:42:59 +00:00
Giel van Schijndel 5e593ad615 Add platform detection code for GNU/kFreeBSD (OS with FreeBSD kernel and GNU utilities and libraries) to allow compiling on this system
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5794 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-11 15:29:44 +00:00
Per Inge Mathisen 6f89f25b80 Attempt fix for bug #12118: Could not find string for ID. Has high risk for creating
more asserts - please report them to me.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5781 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-07 15:40:21 +00:00
Giel van Schijndel 3eabf084ad Get rid of the ID number cruft in the string resource system:
* At the only place where these ID numbers where used (scrValDefSave and scrValDefLoad), use the key-string instead (e.g. "ZNULLBODY" instead of 17)
 * Rename function strresGetStringByID to strresGetString
 * Increment event save file version to 4 (version of savegame.es files)
 * Reject loading of savegames that need to load non-NULL ST_TEXTSTRING variables from version < 4

NOTE: This may break current savegames of games that use scripts with variables of type TEXTSTRING in them (AFAIK currently only ''some'' campaign and tutorial savegames have these).

This closes ticket:19

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5685 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-27 23:58:49 +00:00
Giel van Schijndel 5f496b5b33 Allow (warning-less) compilation with Flex 2.5.33
Patch #1089 by Bertrand Coconnier <bcoconni>

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5679 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-27 13:34:58 +00:00
Giel van Schijndel f2bc3c056f Change the debug message about a string that couldn't be found from an error message into a warning message because it seems to occur quite often
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5667 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-25 22:14:47 +00:00
Giel van Schijndel b40e7a6a90 Further hardcode the treap management code to the string resource system:
* Don't maintain a secondary linked list of strings in strres.c
 * Add the string that's tracked and it's ID number to the TREAP_NODE structure
 * Let the treap code manage its own memory
 * Have the treap code perform reverse lookups using either the resource string (i.e. not the "key" string) or associated ID number

NOTE: Searching a treap for anything else than the key is O(n), but that's no worse than a linked list, which is O(n) as well. Walking a treap has O(log n) as memory requirement, whereas walking a linked list has O(1) as memory requirement (stack size). So the only disadvantage is that searching the treap has a (highly remote!) possibility of stack overflows.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5666 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-25 20:27:54 +00:00
Giel van Schijndel e8e664f85a * Get rid of function strresGetIDString who's only purpose is to determine whether the given ID string has a string resource associated with it, and if so return a string that's equal (according to strcmp) to the passed in ID string
* Replace the only use of strresGetIDString with a call to function strresGetStringByID, which will also return NULL on failure to find the given ID string

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5663 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-24 21:12:43 +00:00
Giel van Schijndel 8a41fb89d3 Make function strresStoreString const correct
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5662 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-24 21:12:39 +00:00
Giel van Schijndel a0e779ceb8 * Add a new function strresGetStringByID which combines the functionality of strresGetIDNum and strresGetString
* Get rid of function strresGetIDNum with its inconvenient API and use strresGetStringByID instead

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5661 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-24 20:10:16 +00:00
Giel van Schijndel 12e5120e69 Replace the linked list of arrays of string pointers (premature) optimisation with just a linked list of strings
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5660 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-24 18:57:09 +00:00
Giel van Schijndel 47d02a31da * Change strresGetString to return its string as const (to prevent potential double-free problems)
* Instead use strdup() where a non-const reference to these strings is used
  * NOTE: This may introduce memory leaks, but I'd rather have memory leaks than double-frees, of which I'm frankly surprised that they don't occur ''much'' more often
 * Change FindDroidTemplate to take its parameter as const
 * Don't multi-purpose the parameters of FindDroidTemplate as local variables
 * Store string variables in getName as const
 * scrvGetString:
  * Directly return the string it retrieved and use NULL to indicate failure
  * Return the string as `const'

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5658 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-24 18:18:07 +00:00
Giel van Schijndel da3c28efa2 * Move the allocation and initialisation of STR_ID structures to a function of its own: strresAllocIDStr
* Allocate STR_ID structures in such a way that a single free() call on it will suffice as cleanup

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5657 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-24 16:13:14 +00:00
Giel van Schijndel 8101f3bf5b * Change strresGetIDString to return its ID string const
* Change allocateName to do as the name suggests and actually ''allocate'' a string!

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5656 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-24 16:13:08 +00:00
Giel van Schijndel e3a7f0cab8 Return the retrieved string from strresGetIDString and allocateName and use NULL to indicate failure.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5655 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-24 16:13:03 +00:00
Giel van Schijndel e8efe132f8 * Get rid of global variable *psCurrRes, which is used by the strres_parser to operate on
* Instead pass the current STR_RES* pointer to work on to the parser function

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5654 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-24 14:16:27 +00:00
Giel van Schijndel 16e5fd8764 Get rid of the ID_ALLOC bitflag (marks strings allocated by the string resource system), as ''all'' strings are allocated by the string resource system anyway.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5652 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-24 13:59:16 +00:00
Giel van Schijndel 8eb2ed2827 Add some ASSERTs which I think should always hold true for the purpose of ''understanding'' the string resource code. As it's difficult to understand, due to it multi-purposing one variable to hold two semantically different values (at the same time!).
In any case I ''think'' these ASSERTs always hold true, (and for the testing I've done so far they do). But I'd like some more certainty and confirmation, hence why I'm committing this (before I make changes that rely on that assertion holding true), so other people get a chance to test this and prove my assertion wrong.

Thus, ''if'', these ASSERTs are triggered, please open a bugreport or otherwise notify me of it (e-mail, IRC, text message, postal mail, phone call, etc.)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5649 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-23 23:42:18 +00:00
Giel van Schijndel cf374ee5e1 * Move the definitions of the datatypes used by the string resource system from strres.h to strres.c
* Add a forward declaration for STR_RES to strres.h (so that we can still declare pointers to this type)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5645 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-22 22:36:23 +00:00
Giel van Schijndel d430c4b44d * Initialize global psStringRes to NULL
* Return the STR_RES* pointer from strresCreate and use NULL to indicate failure
 * Use size_t to store memory sizes in instead of UDWORD

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5644 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-22 22:33:10 +00:00
Giel van Schijndel 4f3c6d39a4 * Return the resulting STR_BLOCK* from strresAllocBlock and return NULL on failure
* Use calloc instead of a malloc followed by memset(0)
 * Check the return value from malloc&calloc for ''all'' invocations of it

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5643 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-22 22:14:48 +00:00
Giel van Schijndel 38f5b64c91 Add a new command line option: --flush-debug-stderr which causes the debug output to be flushed when used
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5636 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-21 19:49:36 +00:00
Giel van Schijndel ef6fa22424 Fix a wrong call to calloc (parameter list was malloc style)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5631 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-21 01:00:37 +00:00
Giel van Schijndel f6a6179569 * Use calloc instead of malloc followed by memset(0)
* Use an unsigned int instead of UDWORD as we don't depend on the size guarantee
 * Move the definition of aUsage into #ifdef DEBUG_CHECK_FOR_UNUSED_STRINGS, because that's the only place where it's used

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5630 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-21 00:57:32 +00:00
Giel van Schijndel 7d42778f80 Don't #define DEBUG_GROUP0 in places where it cannot possibly be used
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5629 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-21 00:52:33 +00:00
Giel van Schijndel a3ecb8a325 Get rid of the custom TREAP* structure and instead use a pointer to a pointer to a TREAP_NODE** structure
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5628 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-21 00:43:33 +00:00
Giel van Schijndel 7c8789f108 * Don't associate line number and file information with calls to treapAdd, as it is only called once
* Replace use of the forwarding macro TREAP_ADD with a direct call to treapAdd
 * Remove treap debugging code (actually that's what the above changes effectively accomplished)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5627 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-21 00:30:55 +00:00
Giel van Schijndel b94c297371 * Don't associate line number and file information with calls to treapCreate, as it is only called once
* Replace use of the forwarding macro TREAP_CREATE with a direct call to treapCreate
 * Return the TREAP* pointer directly from treapCreate and use NULL as an indicator for failure

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5626 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-21 00:23:36 +00:00
Giel van Schijndel d22a2dcf82 Add table entries to the language tables in i18n.c for the newly added translations of r5596:5597
* Basque (eu)
 * Latvian (lv)
 * Norwegian Nynorsk (nn)
 * Slovenian (sl)
 * Swedish Sweden (se_SE)
 * Turkish (tr)
 * Uzbek Cyrillic (uz)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5599 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-19 22:23:06 +00:00
Giel van Schijndel 3814e5f511 * Update the locale lists for Windows and Unix: add all languages in po/ to them
* Change the Windows locale list to allow specifying sublanguages as well


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5598 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-19 22:01:20 +00:00
Giel van Schijndel 1b8a62deca Make the treap code specific for string resources
Because the treap management code is only used by the code for string resources, make it specific for these string resources and don't use casting back & forth from void* all over the place. This simplifies the interaction of string resource code with treap code.

This will allow an easier cleanup and eventually a removal of string resource code. As the string resource code can eventually be replaced with gettext code instead.

This closes #18

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5586 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-19 19:15:02 +00:00
Giel van Schijndel ed3f1508b8 * Remove the dumpLog function and associated code from debug.c
* Add a new function dbgDumpLog to dumpinfo.cpp for dumping the last debug messages
 * Add a debug output callback to dumpinfo.cpp which is used to fetch the debug messages and store them in a ring buffer


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5581 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-19 01:08:07 +00:00
Giel van Schijndel 859196ed2c Move duplicated code, for printing to ''all'' debug output callbacks, to a function of its own.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5580 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-18 23:13:49 +00:00
Giel van Schijndel 9d77329842 * Add a new statically-sized string macro vssprintf, which allows printing to statically sized strings just like ssprintf, with as difference that this macro function operates similar to vsprintf rather than sprintf
* Replace uses of strncmp, snprintf and vsnprintf with sstrcmp, ssprintf and vssprintf respectively


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5579 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-18 22:47:28 +00:00
Giel van Schijndel 0d670c0409 Don't bother checking whether bitflag ID_ALLOC is set before removing it, the end result is the same anyway: ID_ALLOC being absent from the bitmask/number
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5558 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-15 11:46:12 +00:00
Giel van Schijndel d7a0c2fa9b Don't bother checking whether bitflag ID_ALLOC is set before removing it, the end result is the same anyway: ID_ALLOC being absent from the bitmask/number
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5553 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-14 23:17:23 +00:00
Giel van Schijndel 0c4b256797 * Out with the (unnecessary! as the size guarantee isn't required) WORDs from treap.[ch]
* Restructure treapStringCmp to be __readable__

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5551 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-14 22:09:31 +00:00
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 9e70aaf07c Get rid of macro TREAP_NODE_DEBUG and move its contents to the only location where it's used: struct TREAP_NODE
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5548 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-14 20:25:48 +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 9f3371dc33 Remove macro TREAP_NODE_BASE and move its contents directly into TREAP_NODE as that's the only place where this macro is used.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5546 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-14 17:53:03 +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
Giel van Schijndel 514d96d72a * Don't #inlcude treap.h in frame.h as only a single file within Warzone depends on the treap code
* Use a forward declaration in strres.h to declare a pointer to a TREAP instead of importing the full treap.h declarations in strres.h and thus large portions of the codebase
 * Rename TREAP's forward declaration name from _treap to TREAP

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5543 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-14 15:09:00 +00:00
Dennis Schridde 022315eef0 Hardcode top_srcdir to make building from non-topdir possible, dont depend on the touch command, fix LDFLAGS to not depend on the removed TARGET variable
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5476 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-10 20:10:16 +00:00
Dennis Schridde 302a557478 Rename "raw" Makefiles to "win32" Makefiles
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5402 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-06 14:29:04 +00:00
Dennis Schridde 6b8aeb1aaa Add clipf() to clip float values
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5348 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-29 12:07:26 +00:00
Dennis Schridde 45f23a4926 Merge commit 'HEAD@{3}'
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5347 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-28 22:32:44 +00:00
Dennis Schridde 050ec39c11 Use the (also new in this commit) relative variants of the directories almost everywhere.
Exception is when generating the .wz files, where we need the path to the build directory and building a reverse relative path to $(srcdir) will be messy.
Also silence submake.mk a great deal.
Bug #11883 should be fixed now for the most part.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5325 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-24 23:41:52 +00:00
Dennis Schridde fd2bfb0e0f Prepare for another fix for parts of bug #11883: Issues with the improved raw Makefiles
- Rename Makefile.raw to lowercase


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5321 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-24 22:48:45 +00:00
Dennis Schridde 73b35ab8d6 Rename top_srcdir/top_builddir to abs_top_srcdir/abs_top_builddir, to make this more obvious.
Their use is currently flawed, since it will not work in directories with spaces in them... (


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5319 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-24 20:19:54 +00:00
Dennis Schridde 452b737b64 Output gameTime for debug messages. Should make it easier to recognize relevant messages and their relation over time.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5317 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-24 18:07:45 +00:00
Dennis Schridde 9bd8b24921 Boost raw Makefiles
- Use PACKAGE, PACKAGE_VERSION, remove VERSION
- Allow out-of-source-dir builds (mkdir build && cd build && make -f ../Makefile.raw)
- Move config.mk from $(top_srcdir)/makerules/config.mk to $(top_builddir)/config.mk
   When keeping current behaviour (srcdir=builddir), this means: Move it from makerules into the main directory


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5308 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-23 13:54:47 +00:00
Giel van Schijndel 3b4df24942 Use WZ_DECL_UNUSED for the data parameter of debug_callback_win32debug to squelch the warning about it being unused
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5211 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-04 17:50:40 +00:00
Dennis Schridde 8836ce7a4b warning: converting of negative value `-0x000000001' to `UDWORD'
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5206 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-31 23:17:27 +00:00
Giel van Schijndel 19b80a1a6b Make sure to parse `database` __before__ `file` (i.e. group it with other tokens starting with a `d`) to make sure that it gets recognised at all
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5198 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-28 20:55:49 +00:00
Giel van Schijndel c0296aa371 * Apparently the %destructor feature of Bison is implemented differently for 2.1 than it is for 2.3 (or it is broken in 2.1); so don't use it when compiling with Bison 2.1 (leak memory instead)
* Assume __all__ windows builds use Bison 2.1 (this isn't correct, but it's the best I can currently do, as Bison provides no version macros aside from a string macro)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5196 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-27 21:37:54 +00:00
Giel van Schijndel 1d739ce56b * Pass the table name as well from the .wrf resource file
* "table" will now attempt to load the given resource type from the given table (in the currently opened database)
 * Maintain the current database's name (for error message, etc.)
 * Pass the table name to the database loading functions and use it (in combination with sqlite3_mprintf) to produce the SQL statements


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5189 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-25 19:38:59 +00:00
Giel van Schijndel 452c167e9a * Add a new resource loading function type: RES_TABLELOAD
* Add two new keywords to the .wrf files: "database" and "table"
  * "database" will cause the given filename to be opened as a database file (using SQLite3)
  * "table" will attempt to load the given resource type from the currently opened database
 * Don't open the database in the file loading functions (src/data.c) anymore; turn them in table loading functions instead (which get the current database passed as a paramter)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5188 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-25 19:38:53 +00:00
Giel van Schijndel 855ec725d4 Use sstrcpy|sstrcat instead of strlcpy|strlcat for manipulation of statically sized strings
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5176 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-25 13:46:49 +00:00
Per Inge Mathisen 4d845c8067 Fix debug log calls going off when they shouldn't
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5147 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-22 19:33:05 +00:00
Dennis Schridde f94ee4683d *cough*
rad2deg should not look like deg2rad...


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5146 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-22 18:27:48 +00:00
Giel van Schijndel 0118573321 Work around Flex 2.5.33 implicitly defining yyget_extra() (rather than forward declaring it)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5130 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-17 10:49:33 +00:00
Dennis Schridde b77dfdadad Simplification and slight speedup for trigSin/trigCos. Make trigIntSqrt wrap sqrtf, since the old lookup implementation was probably slower than that.
Author: Björn Bredthauer <Bjoern.Bredthauer@gmx.de>
Date: Thu, 15 May 2008 01:28:55 +0200
Signed-off-by: Dennis Schridde <devurandom@gna.org>


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5122 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-15 00:19:47 +00:00
Dennis Schridde 2334f84c84 Remove unneccessary modulo
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5120 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-14 22:59:00 +00:00
Dennis Schridde be2b8a35ab clip() function for integers (Like CLIP macro) and some slightly altered comments/variable names.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5104 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-13 23:19:10 +00:00
Giel van Schijndel 7be6f76ba3 Remove our own custom definition of YYLMAX (give Flex the liberty of determining this itself)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5091 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 19:55:55 +00:00
Giel van Schijndel f8e4607093 Fix an error causing us to use the wrong names for yyget_extra(), yyset_extra(), yyget_lineno() and yyget_text()
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5089 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 19:40:53 +00:00
Giel van Schijndel 10f021f279 Fix a syntax error introduced in r5086
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5087 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 18:58:41 +00:00
Giel van Schijndel 59a1c05037 Cleanup:
* Remove our own strcpy implementation: stringCpy
 * Don't use "d = malloc(strlen(s) + 1); strcpy(d, s);" to copy a string into fresh heap memory, use "d = strdup(s);" instead
 * Fix indentation


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5086 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 18:56:42 +00:00
Giel van Schijndel 942350278b * Put textual tokens as found by strres_lexer.l in heap memory rather than some crazy stack-like static string buffer
* Make sure that this heap memory __will__ be released regardless of syntax errors during scanning
 * Reduce code duplication in strres_parser.y by reducing a single parsing rule with duplicated code up into two rules


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5085 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 18:47:25 +00:00
Giel van Schijndel dfaf3cea17 * Use yytext instead of strres_text
* Get rid of lexer function strresGetErrorData and use strres_get_lineno() and strres_get_text() instead
 * Don't call abort() in function strres_error as the parser will return an error anyway (causing strresLoad to return false)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5084 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 18:35:36 +00:00
Giel van Schijndel fdc48bfc94 * Use the lexer_input framework instead of a custom YY_INPUT implementation for strres_lexer.l
* Don't bother to check whether we're in a comment when reaching the end of a string resource file


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5083 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 18:22:05 +00:00
Giel van Schijndel fae3c7da53 Don't duplicate code that appears in both branches of an if-statement
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5082 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 18:16:30 +00:00
Giel van Schijndel 2f98b6e39a Minor cleanup and add Doxygen comments
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5081 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 18:09:25 +00:00
Giel van Schijndel 251317bd9a Cleanup (behaviour should be unchanged)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5080 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 18:03:26 +00:00
Giel van Schijndel d73949e336 * Put textual tokens as found by resource_lexer.l in heap memory rather than some crazy stack-like static string buffer
* Make sure that this heap memory __will__ be released regardless of syntax errors during scanning


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5079 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 18:00:09 +00:00
Giel van Schijndel 636bce3996 From resource_parser.y: "No longer static ... lets use this area globally":
* Lets __not__ use very bad practices just because we can!!! Make it static again
 * Give strres_lexer.l such an array of its own (static as well)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5077 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 17:50:49 +00:00
Giel van Schijndel 7caf01c08f Use yytext instead of res_text
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5075 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 17:41:00 +00:00
Giel van Schijndel 1aed007c3e Attempt to match an empty string __before__ a non-empty one (otherwise we won't ever match it at all)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5074 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 17:38:45 +00:00
Giel van Schijndel 6bb4f86529 * Get rid of lexer function resGetErrorData and use res_get_lineno() and res_get_text() instead
* Don't call abort() in function res_error as the parser will return an error anyway (causing resLoad to return false)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5073 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 17:34:56 +00:00
Giel van Schijndel f7419596e2 * Use the lexer_input framework instead of a custom YY_INPUT implementation for resource_lexer.l
* Don't add the function name to the debug message in openLoadFile as debug() does that itself already


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5072 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 17:23:33 +00:00
Giel van Schijndel 78f93d3055 Reduce code duplication that occurs in both branches of an if-statement
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5071 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 17:13:11 +00:00
Giel van Schijndel 6bd36ba163 Don't bother to check whether we're in a comment when reaching the end of a WRF file
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5070 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 17:04:32 +00:00
Per Inge Mathisen 36e2ff2517 Update changelog in trunk as well
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5056 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 22:11:28 +00:00
Roman C fcfae543ba Revert r5043 because of compilation problems on non-MSVC systems.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5049 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 15:25:43 +00:00
Per Inge Mathisen 91727f270b objTrace() no longer requires a debug part parameter, and always outputs the ID
of the traced droid.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5047 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 14:58:20 +00:00
Roman C da83c65c9c Output script call stack on ASSERT.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5043 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 11:51:23 +00:00
Roman C b40f5dd5a3 Get rid of some more compiler warnings on MSVC.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5032 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 10:17:49 +00:00
Giel van Schijndel 701f65469c * Provide an abstraction of YY_INPUT so that we have a single definition which we can use in multiple lexers which can read from both in-memory buffers as well as PhysicsFS files
* Utilise this new version of YY_INPUT in script_parser and script_lexer


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5008 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-10 00:35:24 +00:00
Giel van Schijndel b58d508ce6 Doxygenize the parameterlist of frameInitialise
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4943 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-05 23:17:35 +00:00
Giel van Schijndel 01958db9a0 We don't #define HAVE_STRLCPY or HAVE_STRLCAT in the configure script anymore
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4939 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-05 15:12:32 +00:00
Roman C 2c7d52d0c8 Fix MSVC compilation.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4914 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-04 12:55:05 +00:00
Per Inge Mathisen 221a2cb4ee Remove MSVC support for WZ_DECL_CONST since it didn't work.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4913 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-04 12:34:20 +00:00
Per Inge Mathisen 6e9732a86a WZ_DECL_CONST now implies WZ_DECL_WARN_UNUSED_RESULT and also works on MSVC.
WZ_DECL_RESTRICT now works on MSVC as well.
WZ_DECL_THREAD added, declares variables thread local, support for it made mandatory.
WZ_ASSERT_STATIC_STRING (gcc only) to assert that a string is static added.
The sstr functions now support pointer-length strings again.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4908 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-04 11:43:28 +00:00
Giel van Schijndel 31fda8026b Don't call function pointers when they're NULL (fixes a segfault bug that occurs when a resource type without release function couldn't be loaded)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4896 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-03 10:24:36 +00:00
Giel van Schijndel 03bc81c0fb #include "frame.h" in strlfuncs.h; to hopefully fix bug #11609
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4889 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-02 20:59:35 +00:00
Giel van Schijndel 5154d575da Assert that the pointers to strlcpy & strlcat are not NULL
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4878 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-02 12:38:44 +00:00
Giel van Schijndel b9857f9bf9 Detect whether the OS already supplies strlcpy and strlcat and don't define our own if it does:
* Add m4 macros AC_STRLCPY_CHECK and AC_STRLCAT_CHECK for use in the autoconf script
 * Don't define our implementation when HAVE_STRLCPY or HAVE_STRLCAT is defined

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4876 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-02 12:04:20 +00:00
Per Inge Mathisen 5034cedfd4 Rename astrlcpy and astrlcat to sstrcpy and sstrcat. Add ssprintf and sstrcmp also.
Renaming due to name conflict with a gnu extension. Added debug versions of all the
above, that assert if a char* pointer is passed in. This means they cannot be used
with strings shorter than the shortest expected length of void*.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4865 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-30 17:26:38 +00:00
Roman C c3ace2ec9f Redefine __STDC__ to 1, this fixes MSVC compilation.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4855 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-29 15:05:08 +00:00
Giel van Schijndel b047f2c1ef Work around MSVC not #defining __STDC__ (all ISO C89 compliant compiles _should_ #define that macro)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4854 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-29 14:32:14 +00:00
Giel van Schijndel 61c8bbc4b9 * Don't "Guarantee nul-termination" after snprintf as snprintf does that itself already (per the C99 spec)
* Use strlcpy for copying strings instead of snprintf "%s"
 * Don't cast the return value from vsnprintf to (void)
 * When we use va_start make sure to use va_end as well...
 * Fix indentation


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4785 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-26 14:21:41 +00:00
Per Inge Mathisen 914cf90fb4 Add macros astrlcpy and astrlcat that work like strlcpy and strlcat
but with automatic length detection for fixed size arrays.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4777 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-26 12:08:30 +00:00
Giel van Schijndel 73fcb5eb6a Enable NLS for our parsers when it's enabled for us (using --enable-nls)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4700 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-20 16:38:27 +00:00
Per Inge Mathisen f0226edf93 Add new debug level for messages and new log calls.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4685 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-19 21:41:18 +00:00
Per Inge Mathisen 28669696a4 Clean up debug log. We now print the function name first automatically - no need to
put that into the debug call. Rename some categories to make them line up correctly in log.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4684 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-19 14:52:35 +00:00
Per Inge Mathisen 69a4b6a380 Fix bug #11520: crash when saving the game in campaign mission alpha 4, reported
by Jan Dittberner. If a tagfile group had only default values, it would consume
the group end tag and the rest of the file would be read corrupt.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4681 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-18 20:43:07 +00:00
Giel van Schijndel 1585b7d55a Add a workaround for the X11 headers #defining Status (i.e. #undef it), to prevent problems
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4672 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-17 20:55:46 +00:00
Giel van Schijndel c6a0ad011e restrict is not a keyword to C++, so don't use it when compiling as C++
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4615 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-14 21:39:14 +00:00
Giel van Schijndel ff663196a3 * Forward declare debug_callback_win32debug when compiling for Windows
* Don't define windowsExceptionHandler when compiling with MinGW (as we don't use it on MinGW)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4587 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-13 22:54:58 +00:00
Per Inge Mathisen f64e3a8033 Fix bug in tagfile where we would not skip boolean values properly.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4542 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-07 20:01:56 +00:00
Roman C ab1629285b Fix MSVC compilation. Patch by Buginator.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4533 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-06 16:07:36 +00:00
Per Inge Mathisen 0edf5f08e5 Fix erronous handling of skipped group separators in the tagfile code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4527 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-06 13:14:12 +00:00
Per Inge Mathisen 8dca456c24 Fix bug in tagfile code. We would not properly skip groups that we did not intend to read.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4526 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-06 12:13:41 +00:00
Ari Johnson 685948940e Fixed cursors16.c to work again
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4525 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-06 03:20:27 +00:00
Giel van Schijndel 678edfead2 Provide an alternative `dumpLog` implementation:
* one that works with the POSIX write() syscall on an integer file descriptor
 * and one that works with WinAPI's WriteFile() function on a HANDLE

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4513 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-05 23:37:46 +00:00
Per Inge Mathisen 3dafc4e62a Fix some warnings generated by -Wextra
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4492 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-05 16:22:05 +00:00
Per Inge Mathisen 274ae7c9a4 Enforce strict function prototypes for autoconf builds, and fix function prototype problems.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4487 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-05 15:34:55 +00:00
Giel van Schijndel 665e57dc12 Move the exceptionhandler to a directory of its own
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4484 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-05 15:11:43 +00:00
Per Inge Mathisen b41b7358b7 Add safer, proven versions of strlcpy and strlcat from OpenBSD.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4483 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-05 11:45:29 +00:00
Roman C 0ee1e1b965 Fixed warnings on MSVC.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4469 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-02 17:39:42 +00:00
Roman C 4f0e59e488 Remove ENABLE_NLS, since it breaks compilation on MSVC.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4467 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-01 20:00:47 +00:00
Dennis Schridde b2d8cd5187 ENABLE_NLS for MSVC
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4464 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-01 17:14:17 +00:00
Freddie Witherden 59f951b0bc Update the arrayMin[F] functions so that they now return the min value and set the index. Also add arrayMax[F] versions.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4461 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-01 11:26:53 +00:00
Freddie Witherden 4e0c1dbafd arrayMinIndex: now in float form\!
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4460 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-31 23:16:01 +00:00
Freddie Witherden 0587cf8674 A the helper arrayMinIndex, which will return the lowest item in an array of ints.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4459 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-31 22:58:34 +00:00
Per Inge Mathisen 3ee8a3ed7f Add beginnings of a game self-test. Start with --selftest command line option.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4433 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-30 14:36:11 +00:00
Giel van Schijndel 9002fb5953 * Rename frameSetCursorFromRes to frameSetCursor
* Make frameSetCursor take a CURSOR (an enum) parameter instead of SWORD


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4432 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-30 14:11:33 +00:00
Giel van Schijndel 39b6c60501 * Change and clean up the cursors API
* Get rid of resource.h which duplicated code and as such was a maintenance hell/burden


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4422 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-30 13:23:11 +00:00
Giel van Schijndel c7b40d8566 Revert r4416
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4417 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-29 18:46:37 +00:00
Giel van Schijndel ad68743327 Temporarily disable -Wmissing-declarations for lib/framework
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4416 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-29 18:33:05 +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
Giel van Schijndel db7f049617 Const correctness
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4401 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-28 22:21:37 +00:00
Dennis Schridde e28cf1ce77 Using the kludge for GNU Flex < 2.5.30 was slightly incorrect. Correct way is present in 2.5.9 already.
Additionaly use the kludge found on http://flex.sourceforge.net/manual/faq_002dmemory_002dleak.html


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4384 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-28 11:05:19 +00:00
Dennis Schridde 89d1ea6a3d Old versions of GNU Flex (i.e. 2.5.4) dont provide yylex_destroy
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4376 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-27 17:09:16 +00:00
Dennis Schridde 65b9f9b204 r4351: Port memleak fixes from 2.1
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4353 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-26 12:49:51 +00:00
Dennis Schridde c7a9f0f166 Give the bool2string function back...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4337 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-25 23:54:28 +00:00
Dennis Schridde dddbb92429 Move bool2string() conversion function from tagfile.c to frame.h
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4331 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-25 14:41:04 +00:00
Dennis Schridde 927c82aed0 C89 requires NULL
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4315 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-24 17:19:47 +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
Dennis Schridde 9b94b011bb Better definition of a NULL pointer
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4310 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-24 16:44:59 +00:00
Giel van Schijndel ad67fb8533 Revert the disabling of the exceptionhandler in r4304
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4305 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-24 15:41:34 +00:00
Giel van Schijndel dcc1536f58 Backport r4221 from the 2.1 branch to trunk:
* Fix warning regarding array bounds


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4304 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-24 15:40:13 +00:00
Roman C a1008c093d Reduce amount of junk in the MSVC compilation output by about 70%.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4279 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 22:15:28 +00:00
Dennis Schridde 1e26e33fc4 Make it look *exactly* how it looked before my commit... Maybe that finally fixes MSVC
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4274 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 20:16:13 +00:00
Dennis Schridde 5beaf745bf Fix missing identifier LC_MESSAGES for MSVC
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4269 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 19:29:41 +00:00
Dennis Schridde f8b62a6e77 Simplify i18n handling by moving all system dependend stuff into lowlevel functions.
Support changing the language via the menu on Windows.
Don't save the language name to the config file. Use the ISO639 style identifier instead.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4268 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 19:22:09 +00:00
Giel van Schijndel 535e12a5ef When failing to load a resource (WRF), generate a debug message about what file failed
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4252 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 15:55:36 +00:00
Per Inge Mathisen f698bf5fa7 Set LANG environment variable when changing languages. Attempt to fix
the i18n menu option for Windows users.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4246 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 14:18:23 +00:00
Dennis Schridde 2ba55d14a8 Record the time of compilation, too.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4233 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 00:05:41 +00:00
Dennis Schridde 6e89ffe22b Forgot to include physfs
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4231 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-22 19:11:29 +00:00
Per Inge Mathisen 6185741b66 patch #1018: Experimental language selection menu option.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4230 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-22 18:30:08 +00:00
Roman C 3b1c952de1 Speed up script execution when "--debug script" is not enabled.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4228 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-22 17:42:07 +00:00
Giel van Schijndel 57389641e7 Remove the last content of deliverance.h (#define MAX_STR_LENGTH 256) to wzglobal.h and remove it
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4219 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-21 23:02:22 +00:00
Dennis Schridde 9ca4445189 We always only have either config.h or config-macosx.h, but not both.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4207 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-21 16:38:57 +00:00
Dennis Schridde 0c5ecc0efb Fix bug #11277: Strings containing non-ascii characters missing
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4118 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-17 07:23:48 +00:00
Christian Ohm 3dbd10b277 Add newlines to two files to shut up gcc.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4109 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-16 14:23:44 +00:00
Dennis Schridde 81f54bdbfd We should add those files we #include...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4108 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-16 12:56:45 +00:00
Dennis Schridde 2537bfc61c Cleanup #includes a bit
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4107 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-16 12:39:08 +00:00
Dennis Schridde a3d8cdbdb2 New include order in frame.h. This should fix msvc problems hopefully.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4096 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-16 03:10:05 +00:00
Dennis Schridde 9e38b3c9f0 Port r4093 and r4094 from 2.1: Cleanup frame.c headers
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4095 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-16 02:46:03 +00:00
Giel van Schijndel cc0c897d47 Add i18n.[ch] to the raw makefile system and the Code::Blocks projectfile
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4084 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-16 00:20:35 +00:00
Dennis Schridde fe1a470ca1 Actually add the i18n.[ch] files...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4073 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-15 17:53:10 +00:00
Dennis Schridde a5643b359c Move i18n stuff into i18n.[ch] and cleanup headers
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4068 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-15 17:36:50 +00:00
Dennis Schridde 9f5168e9dd Some generic cleanup-style things
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4066 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-15 17:05:15 +00:00
Dennis Schridde 74bb1a185b Revert r4061 (accidential commit)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4062 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-15 15:04:27 +00:00
Dennis Schridde 7e93a664b8 Move packaging -> pkg
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4061 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-15 14:57:35 +00:00
Dennis Schridde e32e928c38 Remove missing ftol() and add some docs
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4055 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-15 11:40:35 +00:00
Dennis Schridde cb2f0a30df Patch MSVC Solution file to depend on SQLite and change eol-style to native for them, since otherwise patches will not apply.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4044 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-14 18:16:04 +00:00
Dennis Schridde 303895e5fb Mark all BASE_OBJECT "derived" types as WZ_DECL_MAY_ALIAS (they may alias with any type).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4011 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-11 15:53:45 +00:00
Giel van Schijndel 33216b2e9d Move all stuff that actually belongs in CPPFLAGS (but is called CFLAGS) to AM_CPPFLAGS
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3988 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-10 10:50:58 +00:00
Dennis Schridde d8409c9819 - Don't define CFLAGS anymore, export WZ_CFLAGS instead, which can be overridden by make commandlines
- Set -DYY_NO_INPUT only in those places where needed
- Add some previously forgotten CFLAGS where needed
- Remove extranous -lintl from WIN32_LIBS
- Remove apparently unnecessary directory from Mac include (png_util doesn't need it either)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3986 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-10 02:01:46 +00:00
Dennis Schridde 9f44219b1c Move addition of CFLAGS from configure.ac to the places they are actually needed.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3983 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-09 20:08:42 +00:00
Per Inge Mathisen 916435094f Add message to MSVC users about disabled warnings. Patch #995 from Buginator.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3967 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-09 10:06:05 +00:00
Dennis Schridde 3858daf4a1 Reset MSVC version from 9 to 8, since otherwise MSVC8 will refuse to load the project files. (bug #11219)
Does MS provide some kind of templating system? Like autotools generate Makefiles from Makefile.am.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3950 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-08 11:28:40 +00:00
Dennis Schridde d3455b699a Properly set include/library directories for MSVC
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3949 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-08 01:45:45 +00:00
Dennis Schridde 056147b16d Oh my beauty...
Please don't clutter the detection code with platform specific fixes... That's what the /* ---- Platform specific setup ---- */ section is for...


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3948 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-07 21:51:53 +00:00
Per Inge Mathisen dfad738d65 Fix most MSVC warnings.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3947 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-07 19:26:19 +00:00
Dennis Schridde 0c79f4b551 Simplify roundf() guards
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3946 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-07 18:45:56 +00:00
Per Inge Mathisen d8787a14e9 Allow for non-GNU C99 compilers
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3945 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-07 18:37:59 +00:00
Per Inge Mathisen 51ca960ed5 Add -Wmissing-field-initializers, fix missing field initializers, and make source
compile even if GCC is not C99 compatible.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3944 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-07 18:27:43 +00:00
Dennis Schridde da462b4511 More float specialisation and generic cleanup
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3937 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-07 12:42:42 +00:00
Dennis Schridde 8fc819377a Move generic math functions from trig.h to math-help.h
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3935 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-07 12:17:11 +00:00
This file is free software, distributed under the terms of the GNU 90f0c23fc9 Port r3878 and r3879 from trunk/
Update gettext.h to 0.17. This changes its license from LGPL2+ to GPL2+ !

Update gettext files to versions found in 0.17

Deleted:
m4/ulonglong.m4 - Superceeded by longlong.m4
m4/signed.m4 - Had no users
m4/isc-posix.m4 - Superceeded by autoconf-2.53
m4/inttypes.m4 - Had no users
m4/longdouble.m4 - Also unneeded

m4/intmax.m4, m4/lib-prefix.m4, m4/lib-link.m4, m4/printf-posix.m4, m4/xsize.m4, m4/lib-ld.m4, m4/lcmessage.m4, m4/wint_t.m4, m4/inttypes-pri.m4, m4/progtest.m4, m4/uintmax_t.m4, m4/stdint_h.m4, m4/intdiv0.m4, m4/iconv.m4, m4/po.m4, m4/longlong.m4, m4/size_max.m4, m4/glibc21.m4, m4/inttypes_h.m4, m4/codeset.m4, m4/wchar_t.m4, m4/nls.m4
change in license from:
 This file is free software, distributed under the terms of the GNU
 General Public License.  As a special exception to the GNU General
 Public License, this file may be distributed as part of a program
 that contains a configuration script generated by Autoconf, under
 the same distribution terms as the rest of that program.
to:
 This file is free software; the Free Software Foundation
 gives unlimited permission to copy and/or distribute it,
 with or without modifications, as long as this notice is preserved.

This removes any GPL licensed files from m4/

po/Makefile.in.in recieved my MSGMERGE_OPTIONS again after update.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3882 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-01 13:04:16 +00:00
Dennis Schridde 1c979f5fd9 Make lex/yacc rules terminals, since lexer/parser files cannot be autogenerated.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3847 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-20 12:06:26 +00:00
Giel van Schijndel 23230caf2a * Revert r3804 (replaces usage of strnlen with strnlen with the unsafe strlen)"
* Finish r3795 where I nicely #included the correct files but forgot to replace strnlen with strnlen1 - 1


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3805 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-16 17:57:43 +00:00
Ari Johnson 66f662e16a Removed usage of GNU extension strnlen()
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3804 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-16 17:48:13 +00:00
Per Inge Mathisen ce473ed9fe Add some more doxygen comments.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3796 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-16 13:05:34 +00:00
Giel van Schijndel 33759c07c4 Don't use `strnlen` in debug.c as it's a GNU extension (and as such isn't always available), instead use `strnlen1 - 1`
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3795 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-16 11:53:25 +00:00
Giel van Schijndel 22844d16a6 Undo the (accidental) exceptionhandler disabling of r3784
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3785 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-15 19:44:40 +00:00
Giel van Schijndel 2322fe0920 Undo my "fix" in r3782, as it wasn't a fix but a breakage
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3784 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-15 19:43:53 +00:00
Per Inge Mathisen b92c8c5a33 Dumpt the last two log message calls into the exception handler report.
This way we get to see the message given by asserts in the dump file.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3781 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-14 22:07:53 +00:00
Per Inge Mathisen 79d13e4d14 Fix typo in exceptionhandler giving noise (at best) in exception output.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3778 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-14 20:50:39 +00:00
Per Inge Mathisen 917187ca7d Clean out some excess global defines.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3753 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-11 16:23:20 +00:00
Dennis Schridde b7e36a5b77 Require devpkg to be in ./devpkg/ for msvc.
This saves the trouble of having to edit the paths for lib/include dirs and enables us to have the FlexBison.rules there, too.
Thus FlexBison.rules is removed and to be found in the msvc devpkg from now on.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3657 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-02 18:17:58 +00:00
Giel van Schijndel 6e74be4df9 Use C linkage for frameresource.h and debug.h
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3629 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-01 21:26:37 +00:00
Giel van Schijndel 07359499ab Don't define our own custom implementation when compiling with g++ either
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3628 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-01 21:01:23 +00:00
Giel van Schijndel f558eb0d61 Revert unintentional part of r3612
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3613 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-30 23:39:31 +00:00
Giel van Schijndel 4f93b03142 Make function-pointer array pLoadFunction a local (but still static) array instead of global
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3612 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-30 23:38:05 +00:00
Giel van Schijndel ef3d1f5c92 Fix compiling on MSVC; patch #955 by Buginator, slightly modified by me
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3607 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-30 21:44:12 +00:00
Dennis Schridde 06a3b11a62 Revert r3588. I already did that in r3586.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3591 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-28 00:51:21 +00:00
Giel van Schijndel 7cf72b6fea #include <math.h> and "lib/framework/math-help.h" where required
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3588 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-28 00:29:19 +00:00
Dennis Schridde 9f9c417240 Include lots of forgotten math.h and roundf() is included in C99.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3586 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-28 00:22:02 +00:00
Giel van Schijndel b3a3cecaed Rename fractions.h to math-help.h and remove most junk from it
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3584 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-28 00:01:37 +00:00
Giel van Schijndel 301c7f64f5 Assume G++ has a proper vsnprintf and snprintf implementation
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3566 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-27 16:34:39 +00:00
Dennis Schridde 2d29dc2191 Replace runtime code_part_names size checking by counting with a STATIC_ASSERT on its size.
Additionaly:
- Introduce ARRAY_SIZE macro
- Use code_part instead of int where applicable


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3539 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-22 16:03:58 +00:00
Dennis Schridde cbccd3336c Revert r3537, as it may not be safe on all compilers...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3538 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-22 15:47:20 +00:00
Dennis Schridde d2370600d8 Replace code_part_names() with code_part2string(), which gets us rid of having to check that the array size matches the enum on runtime.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3537 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-22 15:41:21 +00:00
Dennis Schridde 2ff72516fd idx -> index
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3534 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-21 23:08:17 +00:00
Dennis Schridde 86be7e0389 PRINT_B macro -> bool2string function
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3533 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-21 23:03:04 +00:00
Dennis Schridde 664507be0d Minor beautification of error messages.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3532 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-21 22:44:24 +00:00
Dennis Schridde 463aaf53d1 Make TF_ERROR into a readable function.
- tagGetErrorString is not provided anymore, all output goes directly to LOG_ERROR.
- The trace contains some more information.
- ASSERT()s in the unit test were removed. The output is already done by TF_ERROR where needed.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3531 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-21 22:33:41 +00:00
Dennis Schridde f3296ee96b struct define -> struct _define and define_t
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3530 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-21 22:19:15 +00:00
Dennis Schridde 17b7ffa3f9 Remove dbghelp.h. And update version (wine-0.9.53) is now included in the mingw32 devpkg.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3527 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-21 00:23:14 +00:00
Per Inge Mathisen df19674baf Save gateways and zones in tagfile format.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3513 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-20 16:52:51 +00:00
Per Inge Mathisen 579e2e428e String code cleanup
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3498 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-16 19:07:15 +00:00
Dennis Schridde b422209c9a Rename range() to wrap() and warn about unused results.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3484 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-15 18:15:13 +00:00
Dennis Schridde ff34e1fb68 Introduce new functions range() and rangef() to clip a value into a certain range.
Use that to cleanup some code.
Because of the lack of a local "math.h", it went into trig.h.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3483 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-15 18:02:54 +00:00
Dennis Schridde 31a863a90b Setup eol-style CRLF for vcproj files
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3473 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-14 20:49:48 +00:00
Dennis Schridde 1c44cf8568 path #938 by Bugginator: MSVC projectfile updates. You need the static libraries from http://download.gna.org/warzone/development/devpkg/2.1/msvc80/ now.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3472 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-14 19:57:50 +00:00
Dennis Schridde d7bbab46af Set eol-style and mime-type for vcproj files
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3471 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-14 19:55:59 +00:00
Giel van Schijndel d938ed3946 * Check wether we're compiling as C99
* if not #error about requiring a C99-compliant snprintf & vsnprintf implementation

NOTE: This doesn't affect MSVC as I've already provided a C99-compliant implementation for it


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3449 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-13 13:53:00 +00:00
Giel van Schijndel 6c886470ad * Rename the MSVC snprintf and vsnprintf replacements to wz_snprintf and wz_vsnprintf respectively to prevent conflicting definitions
* #define snprintf and vsnprintf to wz_snprintf and wz_vsnprintf respectively
Thanks to Buginator for pointing out the issue in patch #937; the solution is different than his though


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3447 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-13 11:14:15 +00:00
Per Inge Mathisen 5b1ec5cfc1 Add new debug mechanic: objTrace(). It works like debug(), but also takes an object parameter.
Debugging info given with it will only be displayed for the enabled game object. Default key
to enable debugging info for a game object is CTRL+L. Converted LOG_MOVEMENT to use it.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3432 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-11 22:45:04 +00:00
Per Inge Mathisen 5657b38ef0 Hopefully fix bug that would lock fps setting to defaults.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3403 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-07 20:48:29 +00:00
Giel van Schijndel a2fe74852b * Fix some errors in the Doxygen documentation
* Parameter descriptions for non-existing parameters removed
  * Wrong parameter names renamed/fixed
  * Syntax errors in passing the a parameter to a Doxygen command at the wrong location
  * Prevent HTML interpretation of some comments

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3373 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-05 23:42:54 +00:00
Per Inge Mathisen ae19f5bd54 Move PHYSFS_APPEND and PHYSFS_PREPEND macros to lib/framework/
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3354 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-05 14:50:16 +00:00
Per Inge Mathisen eddebc7f81 Move some initialization code from src/ into lib/framework
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3353 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-05 13:50:34 +00:00
Ari Johnson 55ecef381b Fixed error message
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3350 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-05 00:22:23 +00:00
Ari Johnson e424aed624 Added /* */ around a comment to permit Warzone to compile again
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3349 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-05 00:06:40 +00:00
Giel van Schijndel d249ac2188 * By default perform truncation detection in strlcat and strlcpy (i.e. return the length that would be the resulting length if no truncation occurred)
* Add a Doxygen comment for strlcpy & strlcat

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3348 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-04 23:16:29 +00:00
Giel van Schijndel 65961cbb45 * Use a variable to store the tagfile unittest definition files' names in (rather than copy-pasting those in the tagOpenRead & tagOpenWrite calls)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3347 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-04 20:01:54 +00:00
Giel van Schijndel 34d26a6719 * Don't do "if (ptr != NULL) { ... } if (ptr == NULL) { ... }" instead use an if-else construction: "if (ptr != NULL) { ... } else { ... }"
* Use slcatprintf instead of snprintf into a local buffer (on the stack) followed by concatenating to our target string

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3345 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-04 19:11:16 +00:00
Giel van Schijndel 87a55581f0 * Move the tag definition files over to data/tagdefinitions and move the savegame definitions into data/tagdefinitions/savegame
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3343 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-04 16:10:51 +00:00
Giel van Schijndel e722d7ec39 Add some more comments
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3340 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-04 15:12:01 +00:00
Giel van Schijndel f3499cc232 Replace asserts on invalid tags with CHECK_TAG_INVALID
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3339 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-04 14:59:19 +00:00
Giel van Schijndel 1d83be8064 * s/tagWriteSeparator/tagWriteNext/g for consistency's sake (to match the tagReadNext function, which is the reading equivalent)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3334 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-04 13:37:42 +00:00
Giel van Schijndel 48f32faccf * Add function resGetNamefromData which complements resGetNamefromData and allows you to retrieve the resource ID (usually filename) for a resource (IMD, IMG, TEXPAGE, WAV, etc.)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3324 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-03 00:35:57 +00:00
Giel van Schijndel b60b1b121c * Use const-correct functions for the tagWrite.* stuff
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3322 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-03 00:30:17 +00:00
Giel van Schijndel 785eb69c8b * Add a forward declaration for tagReads32v into tagfile.h
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3321 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-03 00:29:10 +00:00
Per Inge Mathisen dc7a84da62 Log droid death and packet source. Beware: This will make net games incompatible
between before and after this commit.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3311 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-02 17:08:29 +00:00
Per Inge Mathisen 37260b7c2e tagfile: Allow the specification of an undefined length string in a definition file by
making the defined length zero.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3281 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-31 17:38:04 +00:00
Dennis Schridde 9d82dae196 Reduce doubleclick interval from 500 to 250.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3261 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-30 23:42:44 +00:00
Per Inge Mathisen b4ef4d4349 Add new function attribute WZ_DECL_WARN_UNUSED_RETURN and use it on IdToDroid,
whose return must be checked, and fix one bug already detected by it.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3260 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-30 21:44:14 +00:00
Dennis Schridde 5143e3e165 Add MKID macro for dummy symbols.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3232 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-29 23:21:20 +00:00
Per Inge Mathisen 877ac6456c Add lots of doxygenized comments.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3230 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-29 22:34:41 +00:00
Per Inge Mathisen 5cca5e2893 Make droid experience a floating point in tagfile format, and add better
error reporting for user errors when they forget to update definition file.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3229 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-29 19:53:14 +00:00
Per Inge Mathisen 52aa90d200 Fix a few spelling errors, and add a new debug category 'multisync'.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3227 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-29 17:55:20 +00:00
Ari Johnson 47816967a7 Updated Xcode project and some endian fixes; also changed endian_*() calls
to expand to ((void) (x)) on little-endian systems, so that the compiler
will catch little-endian developers who forget to update the endian_*()
calls when they change the names of structure fields.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3205 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-27 23:55:34 +00:00
Per Inge Mathisen 0c10287938 Add some doxygen documentation for tagfile code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3196 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-27 15:37:15 +00:00
Per Inge Mathisen f7e7e44329 Add new tagfile method tagRead8vDup which reads an unsigned byte array of unknown
length, allocates a memory buffer for it, and returns it. Not recommended for
general usage.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3193 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-27 14:57:22 +00:00
Dennis Schridde 248a8cb510 Minor indent
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3170 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 22:05:15 +00:00
Giel van Schijndel fbf03af195 * Remove macros:
* ROUND: replace by a static inline function (math_round) instead
  * FRACTCONST: this macro just cast both of its arguments to float and then divide the first by the second
  * MAKEFRACT_D: this macro would cast to FRACT_D (which was typedef'd as float but should have been typedef'd as double); so cast to double instead (where required)
  * FRACTmul_D: would cast both of its arguments to FRACT_D and multiply them
  * FRACTdiv_D: would cast both of its arguments to FRACT_D and divide the first by the second
  * MAKEINT & MAKEINT_D (where #defined the same); this macro would just cast to SDWORD (aka "int" or "signed int")

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3152 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 13:57:19 +00:00
Dennis Schridde 09a8e33f61 Rename PACKAGE_MAINTAINER to PACKAGE_DISTRIBUTOR to clarify.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3144 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-23 21:14:02 +00:00
Giel van Schijndel 798d10c6d8 * Guarantee that PATH_MAX is large enough to use as the size for Windows API calls (since with MinGW it is 159 bytes while it should be 160)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3136 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-23 16:44:36 +00:00
Giel van Schijndel 9fe5736f41 * Remove macro FRACTdiv and all places where it was used (all it did was casting both of its parameters to (float) and dividing the first by the second)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3133 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-22 23:37:30 +00:00
Giel van Schijndel ae90bd9c0c * Remove macro FRACTmul and all places where it was used (all it did was casting both of its parameters to (float) and multiply them)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3132 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-22 23:29:25 +00:00
Giel van Schijndel aeecc95088 * Remove macro MAKEFRACT and all places where it was used (all it did was casting to (float))
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3131 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-22 23:13:05 +00:00
Giel van Schijndel 5c4384623e * Use WZ_DECL_FORMAT for some functions which take printf-like strings
* This enables GCC to check the formatting strings and the types and number of the variable list of arguments passed


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3087 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-17 19:37:40 +00:00
Giel van Schijndel 456208fcc3 * Update MSVC project files (part of patch #884 by Buginator)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3051 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-14 12:12:36 +00:00
Giel van Schijndel 99c55dbf74 * Try to encapsulate knowledge about AUDIO_SAMPLE's internal representation in openal_track.c (i.e. don't use it in client code!)
* Look at sound_StopSample specifically
 * Use a function to manipulate the linked list of audio samples (i.e. get rid of duplicated code)
 * Allow printing of OpenAL vendor, version, renderer and extensions data on multiple debug "channels" to reduce code duplication
 * Add openal_error.[ch] for error detection (and producing debug messages for them!)
 * Add TOSTRING and AT_MACRO macros to macros.h
 * Get rid of some super-nested if-branches where one of them would return (so we don't actually need an else-branch because the function is left anyway)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3047 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-13 23:16:03 +00:00
Giel van Schijndel 5f1977c7f6 * Remove #undef WZ_NOMP3 and #define VERSION from config-macosx.h as they're both not needed anymore...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3041 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-12 21:19:29 +00:00
Dennis Schridde 20050d2a3e Add some more output do debug dumps: The maintainer who created the package.
PACKAGE_MAINTAINER and PACKAGE_VERSION should probably also make their way into the logfile...


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3040 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-12 18:34:30 +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
Per Inge Mathisen 6118371c0e Add methods to read/write byte arrays to tagfile format.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3036 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-10 21:48:27 +00:00
Freddie Witherden 2506b69e1f Add a CLIP macro for culling a value between a min and max value.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3029 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-10 18:36:07 +00:00
Dennis Schridde c64b565f14 Patch #872 by Buginator. Untested by me since in Bugs we trust. ;)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3020 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-09 19:10:34 +00:00
Giel van Schijndel 9a0eecb753 * Revert accidental commit of exceptionhandler in r2952
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2953 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-02 00:03:52 +00:00
Giel van Schijndel 55526401be * Copy over the cross compile scripts from the 2.0 branch to trunk (with necessary modifications)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2952 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-02 00:02:45 +00:00
Giel van Schijndel ae79833367 * In vasprintf when we have to produce a zero-length string:
* Assign the resulting pointer to the char** strp pointer
  * Return zero (instead of the pointer)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2948 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-01 23:44:29 +00:00
Freddie Witherden b73b28f191 Revert dodgy removal of trig functions. More testing required
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2904 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-29 23:10:54 +00:00
Freddie Witherden dbcb55414d Remove the pre-computed trig tables system
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2903 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-29 22:50:25 +00:00
Per Inge Mathisen 0d7d6dee26 Extend tagfile saves to cover droid movement information. Improve tagfile error reporting somewhat.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2868 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-24 22:23:40 +00:00
Per Inge Mathisen bacb7975b1 Add new tagfile method to read and write 32bit signed arrays. Fix error that
would interpret floating point arrays as 16bit.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2867 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-24 21:05:19 +00:00
Dennis Schridde 9cc0a628c1 Do parts of the proposed changes in "[Warzone-dev] build issues in FreeBSD system" by Yaroslav Kolomiyets from 24.10.2006:
- SDL header includes don't use SDL/ anymore (raw Makefiles and MSVC Project adapted).


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2863 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-24 11:49:51 +00:00
Per Inge Mathisen 8ad6ff9dc1 Remove double click for keyboard and mouse wheel. Patch by buginator in patch #851.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2854 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-22 18:51:54 +00:00
Giel van Schijndel 6083c030bf * revert (unnecessary r2843)
* make sure to #define _GNU_SOURCE when compiling on Unix systems with Code::Blocks


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2845 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-20 21:36:36 +00:00
Giel van Schijndel 027b9218a9 * Fix a potential compile error when using asprintf on non-Windows systems
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2843 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-20 21:18:33 +00:00
Per Inge Mathisen 647ae8810c Improve comments and documentation of tagfile code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2835 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-19 19:16:21 +00:00
Giel van Schijndel 1f2d5cbddf * Add a new debugging level LOG_SAVEGAME or "savegame"
* Add a large quantity of debug() calls to game.c
 * Correct some spelling errors in comments

Part of patch #853 by Buginator


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2826 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-15 18:32:07 +00:00
Giel van Schijndel 73307a762e * Lets use valid syntax shall we... (introduced in r2817)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2818 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-13 19:23:04 +00:00
Giel van Schijndel 714d117c71 * Add a concatenating variant of snprintf and vsnprintf, slcatprintf and vslcatprintf respectively
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2817 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-13 19:14:27 +00:00
Per Inge Mathisen 66cee9b2d5 Add more sanity checking and error description to tagfile format at the
cost of even less sanity for whichever poor soul who reads this code.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2816 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-13 18:47:48 +00:00
Giel van Schijndel b285cdea7d * Use vsnprintf instead of snprintf!
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2809 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-12 19:03:30 +00:00
Giel van Schijndel 1bd1483944 * Use snprintf (in vasprintf) to determine the size of the string we're about to construct
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2807 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-11 22:09:20 +00:00