Commit graph

26 commits

Author SHA1 Message Date
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
e0bd5c2c7b abort on OOM 2017-11-20 14:44:02 +01:00
Enno Rehling
eca1e5f973 make keys_size not return 4096 all the time. 2017-09-17 21:09:23 +02:00
Enno Rehling
ef68b8123d smart(er) dynamic allocation of key memory. 2017-08-20 17:45:03 +02:00
Enno Rehling
219a3159e8 sort the at_keys array, binary search. 2017-08-20 12:58:05 +02:00
Enno Rehling
a8e9da1c19 do not upgrade keys for later data versions 2017-08-16 21:48:04 +02:00
Enno Rehling
6d050bb6c2 fix a_key attribute still being written.
simplify (and slow down) key upgrades.
2017-08-16 21:33:02 +02:00
Enno Rehling
9d8e9cc00b at_keys is overflowing, add an assert to detect it 2017-08-16 20:48:03 +02: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
aa230cc191 fix coverity warnings 2017-02-14 12:15:36 +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
e9ca536e8e Merge branch 'master' into develop 2017-02-12 20:08:29 +01:00
Enno Rehling
f132dfe4d4 bug 2282: Datenfile 2012 kaputt.
make the reader for at_keys accept that sometimes, there are 0 keys.
2017-02-12 19:57:02 +01:00
Enno Rehling
10e78b1455 remove code for dict and lua .objects properties.
rewrite muschelplateau code to use keys.
2017-02-11 22:15:21 +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
80716d0787 fix key-upgrade function (coverity CID 102076)
fix MSVC warning (strncpy)
2016-05-02 19:22:57 +02:00
Enno Rehling
1920dde717 memory leak: at_keys had no dtor 2016-03-10 21:54:53 +01:00
Enno Rehling
7f6ced99b9 attrib.read gets a gamedata object (remove dependency on global.data_version) 2016-02-24 11:44:18 +01:00
Enno Rehling
5317c029d5 fix key upgrade.
should have had a test to begin with.
github issue #481
2016-02-13 21:38:42 +01:00
Enno Rehling
997d81e34a memcpy is in string.h 2016-02-09 13:56:57 +01:00
Enno Rehling
b6e2fc28df remove unused functions 2016-02-09 13:56:15 +01:00
Enno Rehling
5e631fd145 replace at_key with at_keys, some bugs found by tests. 2016-02-09 07:03:11 +01:00
Enno Rehling
0189111876 update key attribute api
prepare to replace at_key. do not return the internals. add basic test.
2016-02-09 06:43:19 +01:00
Enno Rehling
c54cbfd472 fix copyright notice 2015-01-30 22:10:29 +01: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
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/attributes/key.c (Browse further)