Commit graph

30 commits

Author SHA1 Message Date
Enno Rehling
55704cfce8 Parser fallback to latin1 when detecting invalid utf-8 2020-08-16 16:00:29 +02:00
Enno Rehling
a3300d5b59 fix parser crash from turn 1179 2020-08-16 16:00:28 +02:00
Enno Rehling
8bf8b68571 make parse_token trim ignored characters like zero-width spaces. 2020-03-14 11:59:35 +01:00
Enno Rehling
55299346f8 use wint_t, not long. 2019-08-01 18:49:39 +02:00
Enno Rehling
75dfed8082 Leerzeichen aus Beschreibungen trimmen. 2019-04-24 13:09:59 +02:00
Enno Rehling
5943047745 MSVC debugger gets confused when two structs have the same name 2019-01-18 22:26:55 +01:00
Enno Rehling
304bebf291 reduce big arrays on the stack, report allies with new pump_paragraph function (WIP) 2018-11-26 22:01:18 +01:00
Enno Rehling
bc5f2ea6d1 move keyword.[hc] to util 2018-09-29 18:13:32 +02:00
Enno Rehling
e4859e68c9 do not use MIN and MAX. 2018-01-01 08:23:52 +01:00
Enno Rehling
05b7837070 fix parser to keep a reference to the order it is parsing.
make push/popstate not crash. pass unit tests.
2017-11-10 07:56:56 +01:00
Enno Rehling
1866b95e14 BUG 2381: parse_token overrun. 2017-10-29 18:03:44 +01:00
Enno Rehling
644a6019a6 do not call isdigit with a negative value.
http://bugs.eressea.de/view.php?id=1987#c6941
2017-02-03 21:19:39 +01:00
Enno Rehling
ddd074f393 continue fixing compilation (gcc/clang) 2017-01-10 18:06:44 +01:00
Enno Rehling
49e5b5b67e gcc missing include 2016-11-14 23:19:28 +01:00
Enno Rehling
c512d180f8 prevent atoip setting errno on mac.
only call atoi when string starts with a digit
2016-11-14 22:15:52 +01:00
Enno Rehling
4414d7ef57 fix parse_token buffer overrun.
missing tests for parse_token.
this fixes http://bugs.eressea.de/view.php?id=2206
2016-06-07 21:47:09 +02:00
Enno Rehling
abca25d1d5 fix indentation in every file
fix copyright date
remove vi ts=2 code
remove a couple of superfluous extern declarations
2015-01-30 20:37:14 +01:00
Enno Rehling
43351e03cd parsing needs to return a static buffer if it has no argument 2014-12-29 07:44:00 +01:00
Enno Rehling
67881dfff4 parsing tokens when buffer is too small - skip the entire token. now with tests. 2014-12-24 15:55:55 +01:00
Enno Rehling
b27491eccd move atoip out of config (small helper) and test it.
remove some unnecessary variables from laws.c
2014-12-23 09:23:37 +01:00
Enno Rehling
5ebf05f625 additional tests for the parser.
move more parsing code out of config.c
2014-12-22 16:45:56 +01:00
Enno Rehling
c8b9044f78 rename to gettoken, use more widely, add a basic test. 2014-12-22 16:28:17 +01:00
Enno Rehling
5cdc85f6bf start to get rid of getstrtoken(), which uses an internal static buffer and causes horrible bugs when called multiple times. 2014-12-22 14:21:24 +01:00
Enno Rehling
da1d3c49c3 ongoing config.c cleanup: getid() 2014-12-18 07:09:22 +01:00
Enno Rehling
808f343e34 make getstrtoken() return null at EOL, kill init_tokens.
init_order all the things!
added a bunch of new assertions to cover for oversights.
added some new tests for order parsing.
2014-08-23 09:17:58 +02:00
Enno Rehling
dafe71f4b8 micro optimizations.
removing a lot of mallocs through strdup  by replacing getcommand calls with get_command, which takes a buffer. only one left.
removing mkname calls with a static buffer for keyword-tokens.
commit the schema file I had lying around.
2014-08-14 09:57:05 +02:00
Enno Rehling
b40ddaeaa1 add test for keyword aliases, add keyword to strings for reverse lookup 2014-06-16 20:41:08 -07:00
Enno Rehling
7358c48580 removing some naming conflicts that hapen when trying to re-enable amalgamation builds. 2014-04-11 19:41:17 -07:00
Enno Rehling
1a7d892a96 use cmake for autoconf, slim down platform.h 2014-03-15 19:29:11 +01:00
Enno Rehling
03c247c788 I am killing the core/ directory.
Lots of files are moving to a new location in src/
Some intersting CMake changes.
2014-02-18 05:45:00 +01:00
Renamed from core/src/util/parser.c (Browse further)