Commit graph

179 commits

Author SHA1 Message Date
Dale Weiler
783b7b6594 Update license headers 2015-01-09 14:53:35 -05:00
Dale Weiler
a371c4ee27 On platforms that the byte order check fails on the runtime test is concluded instead. It still needs these swap functions at compile time since the runtime test has to run. This fixes a FTBFS on BE selected ARMs. 2014-05-09 02:39:25 -04:00
Jim Thoenen
56edc3db9c White space tweak 2014-02-22 22:21:29 -06:00
Jim Thoenen
52adc2113f Tweak for coding convention 2014-02-22 21:22:41 -06:00
Jim Thoenen
69b89dc6ac Allow testsuite to pass on big endian
Move the progs header and body byteswapping into util functions and
call those functions when either reading or writing the progs.
2014-02-10 20:31:54 -06:00
Wolfgang Bumiller
24763aad65 moving the length multiplication for 64 bit types from util_endianswap into util_swap64; renaming length parameter to count 2014-02-02 11:04:18 +01:00
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
3070c03fc0 Oops, scale int64 count into int32 count for swapper. 2014-02-02 01:52: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
2024b3bd71 Merge branch 'master' into cooking 2013-11-30 13:14:04 -05:00
Igor Gnatenko
a20127b063 fix build on big endian arches
Signed-off-by: Dan HorĂ¡k <dan@danny.cz>
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2013-11-30 12:28:59 +04:00
Dale Weiler
4583cb8280 cleanup 2013-11-29 13:13:39 -05:00
Dale Weiler
8a26ed7664 Fix CRC16 2013-11-25 02:11:45 -05:00
Dale Weiler
457a1b9690 Undefine macros after using them 2013-11-23 07:47:16 -05:00
Dale Weiler
943cb2ca64 Mark restrict on input too 2013-11-23 07:45:45 -05:00
Dale Weiler
556a84a46f Mark const for better generated code 2013-11-23 07:44:34 -05:00
Dale Weiler
b52cf4d47e Add comment abotu CRC16 2013-11-23 07:42:38 -05:00
Wolfgang Bumiller
0860b7a68b crc16 slice-by-8 table generator code included for reference 2013-11-23 11:58:20 +01:00
Wolfgang Bumiller
759fca6921 slice-by-8 crc16 2013-11-23 11:50:30 +01:00
Dale Weiler
3b6e7d0ce1 indent 2013-11-23 03:54:11 -05:00
Dale Weiler
ae9d3d42cf A better mod implementation 2013-11-23 03:53:07 -05:00
Dale Weiler
29f2cc302b Add reference tool 2013-11-23 03:10:09 -05:00
Dale Weiler
7011a2ef2c Faster CRC16 algorithm based on the Slicing-by-8 algorithm, by Michael E. Kounavis and Frank L. Berry from Intel Corp. 2013-11-23 01:00:32 -05:00
Dale Weiler
0f6c44d671 We're doing it this way. 2013-10-18 05:37:26 -04:00
Dale Weiler
ef51b30387 Fix windows builds, add strip target for makefiles, update distro build makefiles to use it for release builds. 2013-10-11 09:51:08 -04:00
Dale Weiler
f008cc257d Some cleanups 2013-10-11 09:32:46 -04:00
Dale Weiler
63fdab8422 Some more cleanup 2013-10-11 06:36:05 -04: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
e8955f17ea More cleanups, gmqcc.h doesn't need to include stdio.h now! 2013-10-11 04:06:52 -04:00
Dale Weiler
151606e255 Initial platform / compiler specific code refactoring. 2013-10-11 02:39:30 -04:00
Dale Weiler
76c37d9cc0 Rid of util_debug 2013-08-30 06:49:24 -04:00
Dale Weiler
95138b1e5b Some typos 2013-08-21 23:28:49 -04:00
Dale Weiler
c64005966f Remove some trailing whitespace 2013-08-17 23:43:41 +00:00
Dale Weiler
bee14a6df7 Some bug fixes 2013-08-14 07:19:49 +00:00
Dale Weiler
0a5353532b Remove my MT impl for PRNG, it's full of buffer overflows that I don't want to fix. Just fallback to using srand/rand 2013-08-14 06:22:32 +00:00
Dale Weiler
85ee52128c Fix 2013-08-14 04:27:11 +00:00
Dale Weiler
a68f0fcb35 Cleanups 2013-08-14 04:24:06 +00:00
Dale Weiler
5e54db46c4 Some statistics as Samual wanted. 2013-08-14 04:08:00 +00:00
Dale Weiler
c8c25ef6f7 Some cleanups and smaller binaries! 2013-07-28 00:23:15 +00:00
Dale Weiler
adc9e7bf22 Fix some more bugs (coverity you're a life saver) 2013-06-22 02:05:04 +00:00
Dale Weiler
560b45dd16 Buffer overflow! 2013-06-22 01:58:20 +00:00
Dale Weiler
6db2e69f9a Oh my god microsoft you suck 2013-06-20 11:20:56 +00:00
Dale Weiler
8afd373e4f Fixed whitespace 2013-06-14 21:36:16 +00:00
Dale Weiler
b773702a47 Fix builds 2013-06-09 00:11:52 +00:00
Dale Weiler
144672fada Strict prototyping 2013-06-06 02:51:13 +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
ec7bf4767a Some static 2013-06-02 05:32:37 +00:00
Dale Weiler
1ce8d2ea6e Hashtable statistics too 2013-06-02 05:09:28 +00:00