Commit Graph

13 Commits (f2351935aca338aabb043e8545d37b88dd62379b)

Author SHA1 Message Date
Giel van Schijndel f5602b4778 * Replace a large amount of strncpy() calls with the safer strlcpy()
* Fix an error in src/game.c where we would use the wrong size as parameter to strlcpy()


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


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2617 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-24 21:11:29 +00:00
Roman C 5d39df302d Added more phrases recognized by 1.10 and Aivolution AIs as help requests.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2432 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-24 13:21:31 +00:00
Dennis Schridde e232e9a6b5 Yacc warning fixes by Pseudonym404 (http://forums.wz2100.net/index.php?topic=148.msg7837#msg7837):
- adding *.tab.c to BUILD_SOURCES and CLEANFILES before *.tab.h in applicable Makefile.am files causes *.tab.c to be the file that triggers the %.tab.h %.tab.c: %.y rule, resulting in the command run being "bison -y  -d -o[...].tab.c [...].y", not "bison -y  -d -o[...].tab.h [...].y", which (aside from being correct syntax Wink ) stops "warning: conflicting outputs to file `[...].tab.h'"
- chat_parser.y had %token _T_A declared twice, second instance removed
- audp_parser.y had trailing | signs (presumably from when NULL wasn't commented out)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2426 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-21 13:03:09 +00:00
Roman C 600e947bab - added two additional chat commands which can be recognized by AI
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1589 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-06 12:03:18 +00:00
Stefan Huehner c0a44c70e2 Make some more char* -> const char*
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1452 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-13 15:04:08 +00:00
Per Inge Mathisen 79b3875fc4 This commit fixes all warnings (on my system). -Werror added for
debug builds. Hopefully this will not cause too much pain, but
rather increase code quality for the future.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1144 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-19 14:10:44 +00:00
Per Inge Mathisen 929c4bf2ab Set eol-style for files missing this.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1143 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-19 14:02:24 +00:00
Roman C cd70a98588 - fixed compilation of script functions consisting of a single return statement
- minor cleanups

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1112 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-14 22:12:48 +00:00
Dennis Schridde 49ceba7503 Add GPL notices to all sourcecode files.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1014 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-15 20:09:25 +00:00
Roman C ddbc2564b5 Lexical parser update:
-Fixed endless recursion in one of the lexical parser rules.
-Disabled log warnings when no meaningful information could be extracted form a player chat message.
-Small update to the lexical chat parser rules.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@966 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-07 19:44:04 +00:00
Roman C 3bfab0ce95 -Implemented C-like #include preprocessor directive for the scripting engine, can be used up to depth of MAX_SCR_INCLUDE_DEPTH. Unlike C counterpart main purpose is to reuse executable and non-executable code.
Example:
#include "multiplay/skirmish/my_include.slo"

-Implemented C-like #define preprocessor directive. Nested macros allowed with up to depth of MAX_SCR_MACRO_DEPTH.
-Added a script function for a fast feature iteration (returns burning as well as non-burning oil resources)
-Replaced some custom Pumpkin routines with default FLEX routines
-Some cleanups

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@950 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-02 20:12:14 +00:00
Roman C 14cd4b60cc Scripting engine update:
-void pointer is now compatible with any other pointer type
-strings can now be directly compared using '==' and '!=' operators
-added a linguistic chat message parser with some generic messages predefined - to be used for Human<->AI and AI<->AI communication
Note: chat_lexer.l should be compiled using an additional -i switch for case-insensitive lexer

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@898 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-16 14:59:50 +00:00