Jim Thoenen
2ddb5ad50d
Update per IRC peer review feedback
...
Restore the swap function's original name, remove convenience function,
use %u in log message, whitespace tweak.
2014-02-02 02:32:50 -06:00
Jim Thoenen
1bf9ebabcc
Big-endian: Byteswap only the field contents when writing progs.dat
...
The previous code swapped not just the fields' contents themselves, but
also field positions within several of the structs, resulting in a
non-working progs.dat when compiled on big endian (ppc in my case).
Swapping on a field-by-field basis now.
Also:
* Addresses weird swap size requests (30+ bytes in one case)
* Take a guess at the right way to log a weird swap request before dying
* Fix swap array length scaling
* Rename the main swap function to reflect its native->little-endian
purpose. Figued that was okay because progs.dat is required to be
always little-endian...
* Add a non-array version of the swap function for convenience
2014-02-02 00:57:02 -06:00
Dale Weiler
a934e0fe4b
Happy new year!
2014-01-01 06:24:16 -05:00
Dale Weiler
87d9371a5c
Refactor some util/platform usage and extend file system file interface to accept its own flags and EOF
2013-10-11 06:12:56 -04:00
Dale Weiler
033cf7c7d3
More cleanups
2013-10-11 03:59:25 -04:00
Dale Weiler
12a864abf5
Some more platform / compiler specific code refactoring.
2013-10-11 03:02:38 -04:00
Dale Weiler
151606e255
Initial platform / compiler specific code refactoring.
2013-10-11 02:39:30 -04:00
Dale Weiler
c64005966f
Remove some trailing whitespace
2013-08-17 23:43:41 +00:00
Dale Weiler
a622d5163b
Rework some build stuff for better output and to enable strict prototypes
2013-08-16 03:28:02 +00:00
Dale Weiler
586a70ea1d
Handle some more errors
2013-08-14 07:41:09 +00:00
Dale Weiler
bee14a6df7
Some bug fixes
2013-08-14 07:19:49 +00:00
Dale Weiler
5bdf0aff81
Catch that one too
2013-06-21 23:51:49 +00:00
Dale Weiler
1929b129ee
Improper use of a possible negative value.
2013-06-21 23:49:08 +00:00
Dale Weiler
8afd373e4f
Fixed whitespace
2013-06-14 21:36:16 +00:00
Dale Weiler
11179a2a71
Major header reworking, this respects the namespaces properly. Makes object dependency more obvious, allows for better make caches, and prevents misuse of library features, i.e use con_* instead of printf.
2013-06-04 02:47:07 +00:00
Dale Weiler
9af3c502da
Major utility rewrite for compiler memory utilization statistics. Cleanups everywhere, no more NOTRACK stuff, all allocates are tracked. Major identifier cleanups as well.
2013-06-02 08:21:06 +00:00
Dale Weiler
f892b32335
Major export cleanup. Anything that was exported but wasn't used outside where it was implemented has been turned into static, and their exports have been removed. This actually makes the compiler compile slightly faster.
2013-05-29 03:29:04 +00:00
Dale Weiler
df8b486c98
Prevent negitive numbers from being used as the left operand of shift operator.
2013-05-29 02:37:45 +00:00
Dale Weiler
f281de7a3c
Cleanups and fixes
2013-05-29 02:16:50 +00:00
Wolfgang Bumiller
3a4aba0b31
Grrrr
2013-04-24 17:47:42 +02:00
Dale Weiler
489ad486bc
Get it compiling in visual studio again.
2013-04-24 01:43:53 +00:00
Dale Weiler
160e7cf7ee
Remove trailing whitespace
2013-04-21 10:24:55 +00:00
Dale Weiler
eb2a74f7e7
Flatten more external functions
2013-04-14 01:25:11 +00:00
Dale Weiler
48d6375817
flatten the use of strcpy, 90% of the cases we already knew the length of the string either at compile-time, or already within the scope we where, thus letting us use strncpy, which can be further optimized (unrolled if static)
2013-04-14 01:00:25 +00:00
Dale Weiler
0b154d69e7
BOOM
2013-02-10 13:59:24 +00:00
Dale Weiler
b0c6dc5ab2
Fix mem leak.
2013-02-10 02:08:17 +00:00
Dale Weiler
fb8fb9f0f7
These includes are not required
2013-02-08 16:43:31 +00:00
Dale Weiler
02230ca992
endian swap on FOURCC for "PACK" on BE systems.
2013-02-08 16:40:47 +00:00
Dale Weiler
533b2144c5
Fix some memleaks.
2013-02-08 16:39:14 +00:00
Dale Weiler
eabb92f7b4
A command line interface for the PAK utility, made it a seperate build target too.
2013-02-08 16:32:15 +00:00
Dale Weiler
945aba6e10
Make it compile as C++ code AGAIN
2013-02-08 12:20:48 +00:00
Dale Weiler
8d59d7029d
Cleanup cargocult directory and file specific things, to fs.c (renamed file.c which also contains directory handling stuff). Also cleaned up some stuff, and added proper end comments to conditional inclusion stuff.
2013-02-08 12:06:59 +00:00
Dale Weiler
ece64dc779
fix build issue
2013-02-07 20:10:01 +00:00
Dale Weiler
aef60b7ec1
Add directory support for extract_all
2013-02-07 20:08:50 +00:00
Dale Weiler
8ecfc51799
Cleanups and fixes to the PAK utility, can now extract/insert, tested and functional for the most part.
2013-02-07 17:21:15 +00:00
Dale Weiler
1fa9fbb94b
Fixes to the PAK utility.
2013-02-07 17:07:29 +00:00
Dale Weiler
86df8c8a78
Work in progress PAK extractor/insterter.
2013-02-07 16:22:47 +00:00