13 Commits

Author SHA1 Message Date
Eric Biggers
a735fa830f lib, programs: remove all unnecessary 'extern' keywords
'extern' on function declarations is redundant.
2020-04-17 21:27:56 -07:00
Eric Biggers
ce6a95f47b programs: add test_util
Move program utility functions that are used only by "test programs"
(i.e. not by gzip/gunzip) from prog_util.{c,h} into test_util.{c,h}.
This reduces the code that is compiled for the default build target,
which excludes the test programs.
2018-12-28 10:25:44 -06:00
Eric Biggers
a5a4822e2a prog_util: add guarded buffer allocator 2018-12-23 12:34:50 -06:00
Eric Biggers
dd1c157750 prog_util: add timer_KB_per_s() 2018-12-23 12:03:00 -06:00
Eric Biggers
6c26eb18ea prog_util: add ASSERT() macro 2018-12-23 12:03:00 -06:00
Eric Biggers
f100a42c02 gzip, gunzip: require -f or -c to (de)compress symlink
This matches the behavior of GNU gzip.
2016-10-23 13:54:53 -07:00
Eric Biggers
f3861da7cd prog_util: use 64-bit 'struct stat' on Windows and support stat() 2016-10-23 13:54:53 -07:00
Eric Biggers
4dbc5173b6 prog_util: always use 64-bit utime() on Windows 2016-10-23 13:54:53 -07:00
Eric Biggers
1cc88c6f86 prog_util: remove unused skip_bytes() function 2016-10-16 18:16:38 -07:00
Eric Biggers
e20e275081 prog_util: use QueryPerformanceCounter() on Windows
QueryPerformanceCounter() is much more accurate than
GetSystemTimeAsFileTime().

Also avoid converting into a specific time unit until the results need
to be displayed.  This is more efficient and avoids losing precision.
2016-10-16 14:20:18 -07:00
Eric Biggers
3992efa340 Update API to avoid naming collisions 2016-08-27 23:11:32 -07:00
Eric Biggers
94145eb14e programs: use sequential file access hints 2016-08-20 14:22:18 -07:00
Eric Biggers
f2c3a5b4e9 Various reorganization and cleanups
* Bring in common headers and program code from xpack project
* Move program code to programs/
* Move library code to lib/
* GNU89 and MSVC2010 compatibility
* Other changes
2016-05-21 15:38:15 -05:00