Enno Rehling
4181e23d15
FAST_CONNECT is always on.
...
fix more cppcheck messages.
2018-02-25 18:30:20 +01:00
Enno Rehling
05242aaf2d
Passing NULL after the last typed argument to a variadic function leads to undefined behaviour.
2018-02-25 17:18:30 +01:00
Enno Rehling
e4aa8f505e
cppcheck warnings for battle
2018-02-25 14:18:36 +01:00
Enno Rehling
cb537b1a93
missing translations are the worst.
2018-02-17 21:08:58 +01:00
Enno Rehling
f67a4943e4
fix some cppcheck warnings
2018-02-11 15:43:24 +01:00
Enno Rehling
c3fce574fb
fix reading old data files.
2018-02-10 11:26:39 +01:00
Enno Rehling
1035a98fd3
make attrib use a variant, not a custom union.
...
change attrib_type methods to take a variant, not the entire attrib.
2018-02-09 21:20:43 +01:00
Enno Rehling
df255b886a
verify xml loading, fix remaining files for e2.
2018-02-06 18:46:28 +01:00
Enno Rehling
92f82c3608
plan to eliminate xinclude use, move to single config file with includes.
2018-02-05 17:46:11 +01:00
Enno Rehling
b432fbe9d8
Make the behavior for missing messages configurable.
...
message_handle_missing function to set it (test_eressea should enetually use MESSAGE_MISSING_ERROR).
2018-01-14 11:25:44 +01:00
Enno Rehling
75f41a7169
fix crashes on 64-bit systems (not all 0s are created equal).
2018-01-14 09:38:26 +01:00
Enno Rehling
98678d9fb2
disable the missing_message replacement used in so many tests. fix some tests so they don't need it.
2018-01-12 21:15:21 +01:00
Enno Rehling
5587e209a2
BUG 2409: avoid using integer values >= 2^31 in the CR.
2018-01-08 19:45:49 +01:00
Enno Rehling
e4859e68c9
do not use MIN and MAX.
2018-01-01 08:23:52 +01:00
Enno Rehling
9d8cfc422c
fix cmake detection of libbsd
2017-12-31 21:33:31 +01:00
Enno Rehling
62130ca44b
add a strncat function to sbstring, use it for create_order.
...
eliminate bsdstring.h use.
2017-12-31 20:07:40 +01:00
Enno Rehling
cc8d34a1e7
fix sbs_strcat, use it for orders.
2017-12-31 18:51:56 +01:00
Enno Rehling
ddd30e6210
sbstring implmentation and first use.
2017-12-31 18:07:29 +01:00
Enno Rehling
a6c2a878e0
remov bsdstring tests and include
2017-12-30 20:11:02 +01:00
Enno Rehling
83149de26a
remove bsdstring.h where possible.
2017-12-30 20:09:48 +01:00
Enno Rehling
54572fe40e
add missing include
2017-12-30 19:50:37 +01:00
Enno Rehling
a8140f1dc9
rename strlcpy->str_strlcpy, etc.
2017-12-30 19:49:21 +01:00
Enno Rehling
23ff404d2e
move strlcat and strlcpy to strings.h
2017-12-30 13:04:00 +01:00
Enno Rehling
57b161132d
fix conversion warnings (MSVC)
2017-12-30 11:51:57 +01:00
Enno Rehling
07b25fbed1
missing include, thanks mac
2017-12-30 11:09:09 +01:00
Enno Rehling
ea0acc49d9
iwyu
2017-12-30 07:22:09 +01:00
Enno Rehling
095148ab50
move va_copy macro closer to where it is used.
2017-12-29 17:00:16 +01:00
Enno Rehling
79b5464aab
posix systems have PATH_MAX in limits.h
2017-12-29 11:58:39 +01:00
Enno Rehling
50173d5be3
PATH_MAX and MAX_PATH are crazy.
2017-12-29 11:44:14 +01:00
Enno Rehling
f98eab56c4
platform.h is only for WIN32 now.
...
replace MIN and MAX macros, they are BAD.
2017-12-29 06:13:28 +01:00
Enno Rehling
5d45b0f99b
move some platform defines to a macros header
2017-12-28 18:41:33 +01:00
Enno Rehling
5b1d27542a
reduce dependence on platform.h.
...
gradually stop using MAX and MIN (mistakes were made).
2017-12-28 18:29:40 +01:00
Enno Rehling
4018850499
wtf is up with the travis build now?
2017-12-27 23:47:59 +01:00
Enno Rehling
cff4e12fbd
celan up tests, rename test_cleanup -> test_teardown.
2017-12-27 19:58:39 +01:00
Enno Rehling
a74daa2474
fix mac build
2017-12-11 19:31:42 +01:00
Enno Rehling
93613b99af
slprintf is not in BSD (it's theft from samba).
2017-12-11 19:23:56 +01:00
Enno Rehling
af7cc02388
try to fix the build
2017-12-11 18:42:35 +01:00
Enno Rehling
d48b9611e1
have cmake determine bsdstring requirement
2017-12-11 18:36:57 +01:00
Enno Rehling
9f391039b5
more bsdstring removal, str_replace, unit tests.
2017-12-11 18:20:21 +01:00
Enno Rehling
ffbc9596d7
we do not need a USE_LIBXML define, xml is a hard requirement.
2017-12-09 21:04:27 +01:00
Enno Rehling
643883d539
remove some more unused defines.
2017-12-09 11:17:39 +01:00
Enno Rehling
17ee0e50b6
cppcheck warnings and scope reductions.
2017-12-08 21:08:11 +01:00
Enno Rehling
9163d166ec
cppcheck style fixes.
...
delete dead functions.
reactivate patzer_deathcloud.
2017-12-08 19:59:49 +01:00
Enno Rehling
67318950d5
Merge branch 'develop' into order_id
2017-11-20 18:23:33 +01:00
Enno Rehling
e0bd5c2c7b
abort on OOM
2017-11-20 14:44:02 +01:00
Enno Rehling
290a07e763
Merge branch 'develop'
2017-11-15 20:39:20 +01:00
Enno Rehling
54b016a735
Merge remote-tracking branch 'upstream/develop' into develop
2017-11-15 20:37:46 +01:00
Steffen Mecke
0aa5a64c63
allow empty faction email
2017-11-15 12:12:42 +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
34808a25c5
Merge branch 'develop'
2017-11-09 18:04:41 +01:00
Enno Rehling
12646f726a
Add a failing test for bug 2379.
2017-11-05 15:11:02 +01:00
Enno Rehling
1866b95e14
BUG 2381: parse_token overrun.
2017-10-29 18:03:44 +01:00
Enno Rehling
6d79f85628
orderdb backend choices and first tests.
2017-10-14 08:43:01 +02:00
Enno Rehling
0537d39b17
add a fix for 2367 to fix_familiars
2017-10-07 03:22:35 +02:00
Enno Rehling
2ce94f2d47
BUG 2367: refactor create_newfamiliar.
...
add first failing test for bug report.
2017-10-06 21:23:58 +02:00
Enno Rehling
9f97ee2dd7
Merge branch 'resolve-hashing'
2017-09-23 21:14:57 +02:00
Enno Rehling
95695c1b54
remove log_orders because I'm never using it and it costs time.
...
reduce memory reserved for balloc.
2017-09-23 21:12:50 +02:00
Enno Rehling
0c16727d41
hashing implemented with linear probing and tombstones.
...
WIP: this crashes 572 in faction_getmages?
2017-09-22 09:15:37 +02:00
Enno Rehling
902e2126c9
WIP: change the resolve.h API
2017-09-21 17:29:01 +02:00
Enno Rehling
cda17d5379
The minimum data version has actually been 332 for a long time.
2017-09-21 16:30:29 +02:00
Enno Rehling
89e162c12a
change resolve.h api to use int, not variant.
2017-09-19 11:42:02 +02:00
Enno Rehling
d8c063ae50
CID 172474 + 173899 Copy into fixed size buffer
2017-09-18 20:33:36 +02:00
Enno Rehling
423fe65377
move region display to land_region struct, oceans do not have descriptions.
2017-09-16 07:58:57 +02:00
Enno Rehling
860afe855f
improve the skill read/write code.
2017-09-15 22:03:54 +02:00
Enno Rehling
30b0b2ad81
fix a lot of memory leaks that were exposed by unit tests.
2017-09-02 17:36:09 +02:00
Enno Rehling
a8bfa5e095
try fixing familars without a mage.
2017-08-31 21:19:25 +02:00
Enno Rehling
219a3159e8
sort the at_keys array, binary search.
2017-08-20 12:58:05 +02:00
Enno Rehling
faf0f48a70
BUG 2354: fix email validation.
...
https://bugs.eressea.de/view.php?id=2354
2017-08-06 21:03:51 +02:00
Enno Rehling
18daa9db2f
entirely remove RC_SPELL
2017-05-24 08:52:19 +02:00
Enno Rehling
c7f8b16c07
remove unused r->land->items list.
2017-05-09 18:49:10 +02:00
Enno Rehling
db07cbed6b
use correct type for PI (double).
...
promote defines to platform-header.
2017-05-06 09:44:06 +02:00
Enno Rehling
7ad5c4b3f2
define PI, because M_PI is not to be depended on
2017-05-04 08:22:20 +02:00
Enno Rehling
26795ae717
guassian distribution has no endless loops.
2017-05-03 21:02:30 +02:00
Enno Rehling
83d40962d2
disable randomness that causes some tests to become intermittent.
...
fix normalvariante and chance so they work better with constant
rng always returning zero
2017-05-02 08:45:18 +02:00
Enno Rehling
0b226ba75e
fix farsi names containing nzwj symbol.
2017-04-10 17:32:32 +02:00
Enno Rehling
c49786d713
fix some memory leaks
2017-03-30 23:13:55 +02:00
Enno Rehling
496c57cb3d
Merge branch 'develop' into profile-hashstring
2017-03-11 16:14:31 +01:00
Enno Rehling
7022ae05bd
Merge branch 'master' into develop
...
Conflicts:
src/kernel/item.c
src/modules/arena.c
2017-03-06 22:20:22 +01:00
Enno Rehling
e3a969ce9b
add a test to see that frac_make can handle large integers.
2017-03-06 21:43:31 +01:00
Enno Rehling
4d07782e7d
Merge branch 'master' into develop
...
Conflicts:
scripts/tests/e2/init.lua
scripts/tests/e3/init.lua
src/economy.c
src/economy.test.c
2017-03-06 06:27:31 +01:00
Enno Rehling
33b98b59ec
when make_frac cannot find a gcd, cheat.
2017-03-05 22:28:08 +01:00
Enno Rehling
462d0118e3
better testing for some items.
2017-02-27 20:16:50 +01:00
Enno Rehling
9d09574d5e
enable process_orders to be done in steps.
...
by checking before turn_end(), we can sense temporary attributes and curses on a unit before they age away.
2017-02-27 19:35:14 +01:00
Enno Rehling
e557140ad1
more fractions functionality.
2017-02-24 20:47:31 +01:00
Enno Rehling
e0229be500
also implement subtraction.
2017-02-24 17:56:39 +01:00
Enno Rehling
234eb62226
short and sweet math with fractions.
...
goinf to use this for magres.
2017-02-24 17:51:35 +01:00
Enno Rehling
158e0646e1
implement fractions
2017-02-24 15:48:49 +01:00
Enno Rehling
4e5f1d05ce
Be very strict about C standards.
...
Compile with -std=c89 in gcc.
remove all // comments (they are nice, but unnecessary).
variables only declared at start of block.
various pedantery.
backwards compatible va_copy for pre-C99 gcc.
2017-02-18 21:15:14 +01:00
Enno Rehling
3ea12be564
BENUTZE Muschel repariert.
...
at_keys hat jetzt auch zu jedem key ein value, und Funktionen zum Update altee Daten.
2017-02-13 18:48:38 +01:00
Enno Rehling
17ff2ead41
make_locales from config_get
2017-02-12 05:52:46 +01:00
Enno Rehling
b504899b07
fix locale initialization
2017-02-09 23:28:50 +01:00
Enno Rehling
60497da87b
print error message when missing parameter translation.
2017-02-07 20:52:31 +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
534e5874e9
Merge branch 'gmtool' into develop
...
Conflicts:
src/util/unicode.test.c
2017-01-31 22:19:00 +01:00
Enno Rehling
c0692986b2
make runtests.bat not crash.
...
disable auto-load of config.lua (sob).
free messages and config in config.reset().
2017-01-26 18:06:48 +01:00
Enno Rehling
af1ce9b84e
issue #633 : parse FACTION/PARTEI in any language.
...
added a test since the first fix did not work.
2017-01-26 18:06:48 +01:00
Enno Rehling
b51349df6b
change error message categories.
...
also removing some unused messages and code that supports them.
https://bugs.eressea.de/view.php?id=2270
2017-01-26 18:05:26 +01:00
Enno Rehling
7b25ed282d
more stbool.h includes, MSVC has no unlink
2017-01-26 18:05:26 +01:00
Enno Rehling
5ddd511aa8
continue fixing compilation (gcc/clang)
2017-01-26 18:03:48 +01:00
Enno Rehling
d94cde67a4
kill autoconf.h, replace platform.h for C99 compatibility work
2017-01-26 18:03:48 +01:00
Enno Rehling
03def6ae5e
replace snprintf and the like.
...
you cannot trust _snprintf in MSVC (no zero-termination).
2017-01-26 17:57:21 +01:00
Enno Rehling
2422e63af2
never use strncpy, anywhere.
2017-01-26 17:57:21 +01:00
Enno Rehling
d71d5e413a
eliminate unnecessary strncpy use.
2017-01-26 17:57:21 +01:00
Enno Rehling
47c8b20f68
add a happy test for mt_new.
...
refactor to not use strncpy.
2017-01-26 17:57:21 +01:00
Enno Rehling
a4badc0a75
remove quicklist shim, use selist everywhere
2017-01-26 17:41:21 +01:00
Enno Rehling
d9213c8f25
WIP: still converting to clibs/selist
2017-01-26 10:12:12 +01:00
Enno Rehling
43b8ff1ea8
fix strdup compilications when compiling with gcc and autoconf.
2016-11-26 16:21:41 +01:00
Enno Rehling
e52cf75c59
remove autoconf.h from platform.h, fix lots of includes
2016-11-25 20:15:11 +01:00
Enno Rehling
ecd74c53f5
More PVS-Studio warnings eliminated.
2016-11-23 19:19:04 +01:00
Enno Rehling
ec4060cb9a
fix curse-vigour calculation math.
...
also fix a ton of small other niggles from pvs-studio.
2016-11-20 19:08:39 +01:00
Enno Rehling
9ac74ceecc
fix constant conversion error
2016-11-20 15:14:03 +01:00
Enno Rehling
ae951ee780
Merge branch 'develop' of https://github.com/ennorehling/eressea.git
2016-11-20 14:50:49 +01:00
Enno Rehling
55a0388eb2
fix truncated names that split a utf8 sequence.
2016-11-20 14:50:38 +01:00
Enno Rehling
7d874f1606
fix clang builds
2016-11-18 13:24:50 +01:00
Enno Rehling
a08563e846
Merge branch 'develop' of https://github.com/ennorehling/eressea.git
2016-11-17 22:10:53 +01:00
Enno Rehling
dc2452e2c1
config.h globals cleanup.
2016-11-17 22:10:41 +01:00
Enno Rehling
6c9e1fb345
more config.h removal.
...
freset/fset/fval must die!
2016-11-17 17:06:31 +01:00
Enno Rehling
d5218b99b8
do not include config.h from util (also, wasn't needed)
...
also remove it from monsters.
2016-11-17 10:55:23 +01:00
Enno Rehling
49e5b5b67e
gcc missing include
2016-11-14 23:19:28 +01:00
Enno Rehling
b48b80a1e9
verify errno in test_atoip
2016-11-14 22:21:32 +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
d28d3f4690
move read/write_items to item.c.
...
fix bad memset in attrib.test.c.
2016-11-14 01:00:48 +01:00
Enno Rehling
3cc719ba93
fix gcc build
2016-11-13 19:51:41 +01:00
Enno Rehling
0eaa750ef4
move read/write_attribs to attrib.h, too
2016-11-13 19:47:36 +01:00
Enno Rehling
11b122048b
reduce dependency on save.h
...
moving a_write* functions to attrib.h, which was most of the reason everyone and their mom include save.h
2016-11-13 19:40:38 +01:00
Enno Rehling
f63baddd51
use memmove, not memcpy.
...
fix unicode_trim for windows.
remove unused unicode_mkname.
2016-11-13 15:49:26 +01:00
Enno Rehling
e0add2275f
also remove trailing spaces.
2016-11-11 01:34:59 +01:00
Enno Rehling
97e91fd8eb
fix bad names.
...
trim leading whitespace and non-printable characters from existing
unit, region and faction names/descriptions.
2016-11-11 00:30:49 +01:00
Enno Rehling
7b412399b7
delete leading spaces from names.
2016-11-09 22:03:46 +01:00
Enno Rehling
f03e8f3b62
return an error code if the string had any characters removed.
2016-11-09 14:58:51 +01:00
Enno Rehling
7d79822aa4
fix missing nul-terminator.
2016-11-09 11:54:34 +01:00
Enno Rehling
f68fcf40a6
custom function to make "valid" names.
...
remove any non-printable characters from a string.
TODO: test with utf-8 values.
TODO: remove leading/trainling whitespace.
2016-11-08 22:54:47 +01:00
Enno Rehling
75422e1ba6
fix gcc conversion warnings
2016-10-09 10:07:05 +02:00
Enno Rehling
fadf591a32
gcc appeasement (overflow in constant conversion).
2016-10-02 13:19:39 +02:00
Enno Rehling
693f1be6d1
fix endless loop in cp1252 search (wrong sort)
...
fix indentation
additional testing
2016-10-02 13:12:47 +02:00
Enno Rehling
8728fccaec
fix an endless loop in unicode_utf8_to_cp437 for characters not in the table.
2016-10-02 12:46:07 +02:00
Enno Rehling
9baba00087
use mtype->key instead of repeated hashstring calls.
2016-09-11 21:29:42 +02:00
Enno Rehling
c352ab9f8e
move game-version information fom version.h to gamedata.h
2016-09-10 17:21:17 +02:00
Enno Rehling
d84ed1f89d
move static variable cleanup to kernel_done.
...
clean up some more.
2016-09-07 21:22:05 +02:00
Enno Rehling
dda845e2f4
free configuration data (valgrind calls it still-reachable leaks).
2016-09-07 20:46:41 +02:00
Enno Rehling
a5ce809f41
fix memory leak in umlaut.c with reference counting (sad).
2016-09-06 19:57:07 +01:00
Enno Rehling
b62fa64d8c
closer leak debugging
2016-09-05 20:05:36 +02:00
Enno Rehling
c525553c49
unused variable
2016-09-05 17:48:54 +01:00
Enno Rehling
fa6a3e377d
relocate the addtoken leak "test" to umlaut.test.c
2016-09-05 18:46:02 +02:00
Enno Rehling
19d490ce71
test_create_locale leaks memory.
...
adding a simple test that shows this (under valgrind).
2016-09-04 22:07:52 +02:00
Enno Rehling
a5b3fad67a
skeleton of a language test, try to find init_direction memory leak.
2016-09-04 20:27:36 +01:00
Enno Rehling
e7b93adb75
rearranging deckchairs on the HMS Random Numbers.
2016-09-04 17:04:41 +01:00
Enno Rehling
2ccd2c0c16
Merge branch 'develop' of github.com:ennorehling/eressea into develop
2016-09-04 10:47:40 +02:00
Enno Rehling
00c4c337ff
remove crypto submodule, stea mtrand from it
2016-09-04 10:47:21 +02:00
Enno Rehling
b5298f60bf
Merge pull request #552 from ennorehling/issue-551-description
...
issue #551 and some other tests
2016-09-02 15:43:08 +01:00