Giel van Schijndel
640ee1f653
* Get rid of never initialised variables g_bParsingSubFile and g_fpOld (the compiler probably set them to false & NULL respectively everytime, if not then this code should have crashed consistently)
...
* Remove now useless yywrap() function
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5093 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 20:09:10 +00:00
Giel van Schijndel
1799f473c0
Rename some audp_(.*) stuff to yy$1
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5092 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 20:06:19 +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
72075d2621
Fix LDADD in tests/Makefile.am so that crosscompiling (or rather crosslinking) with mingw32 is possible
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5090 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 19:52:35 +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
787d3ad581
Call fflush(stdout) after fprintf(stdout, ... in parsetest.c
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5088 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 19:09:19 +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
Per Inge Mathisen
1819c503c6
Make difficulty work when you start the campaign with the --game parameter.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5076 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 17:50:10 +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
489bdb4dd2
Make sure network mode is turned off before entering campaign mode.
...
Fixes difficulty settings.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5067 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 13:10:26 +00:00
Giel van Schijndel
1c4bafaa2b
Let the chat_lexer do some more of the work by returning only a single _T_YES token for "yes", "yea", "yeah" and "yep"
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5063 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 12:48:31 +00:00
Giel van Schijndel
f0e80e53c4
Update MSVC project file for addition of parsetest code to --selftest in r5060 (I accidentily committed that together with the fix to lib/event/event.c)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5062 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 12:41:54 +00:00
Per Inge Mathisen
07c9062105
Cosmetic update of static globals
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5061 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 12:39:16 +00:00
Giel van Schijndel
9640d3b0a6
* Make sure to set psPrev to NULL at the start of the deletion loop
...
* Also don't dereference it when it's NULL
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5060 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 12:33:38 +00:00
Giel van Schijndel
58176b97bc
* Fix GPL headers for some files which where wrongly marked as being Copyright Eidos Interactive in r1014
...
* Update file-level comment for chat_lexer.l for the change in r899 (i.e. the flex option `-i` doesn't need to be specified anymore)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5059 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 12:16:46 +00:00
Per Inge Mathisen
6b0d121d83
Remove debug log call that shouldn't be there
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5058 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 22:32:21 +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
Per Inge Mathisen
92ceea0131
Forward port various minimal-impact stuff from tagfile load patch to reduce patch size.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5053 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 20:51:41 +00:00
Dennis Schridde
c67a3ef1be
More comments on previous patch, which was by Buginator.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5051 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 19:53:27 +00:00
Dennis Schridde
25c53e1c48
commandline argument --join <host> to join into a lobby directly from the commandline ((needs ChangeLog addition!))
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5050 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 19:09:29 +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
22d10c80aa
Allow VTOL to uncover fog of war and land-move to unseen areas in distance fog mode.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5048 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 15:20:34 +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
Per Inge Mathisen
ce1ebb31cb
Remove some dead code, and cosmetic cleanup.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5046 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 13:45:37 +00:00
Per Inge Mathisen
1fc9453cf5
Cosmetic cleanup to order.c
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5045 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 12:42:42 +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
Per Inge Mathisen
85848067f4
Add more informative assert to solve bug #11659 : crash on first level of
...
campaign reported by Paul Wise.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5042 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 11:04:38 +00:00
Dennis Schridde
98993e96a1
Add a gitignore file
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5040 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 10:54:58 +00:00
Per Inge Mathisen
7d0aae2e0e
Add more logging, used to find previous bugfix.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5039 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 10:50:15 +00:00
Per Inge Mathisen
21fa30ec47
Fix bug #11641 : Bad textures after third load of saved game, by making sure
...
we unload all level data when loading savegames.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5037 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 10:46:38 +00:00
Roman C
03073c8038
Memory leak fix for event.c. Patch by Buginator.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5035 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 10:34:48 +00:00
Roman C
f7c684f964
Make it possible for AI to recognize some new words and phrases needed for new commands.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5034 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 10:24:09 +00:00
Roman C
14152fd19c
Add an assert to a scripting function.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5033 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 10:19:04 +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
Per Inge Mathisen
8e1ad51337
Improve logging
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5031 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 09:21:47 +00:00
Giel van Schijndel
6f507abe43
Flex 2.5.4 (used on Windows) doesn't provide yyget_extra(), yyset_extra(), yyget_text() and yyget_lineno(), so work around this with a conditionally compiled section
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5030 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-10 22:12:51 +00:00