Commit Graph

13 Commits

Author SHA1 Message Date
Andrew Bettison
1bd599f79d Add --omit option to 'tfw_createfile' utility
Allows generation of files that do not contain a specific set
of characters.
2015-12-07 22:35:42 +10:30
Jeremy Lakeman
3b9075344f Allow write to return less bytes than we asked for, or zero 2014-10-31 13:45:46 +10:30
Jeremy Lakeman
a92b3ff29d Fix compilation warning 2014-10-30 13:37:12 +10:30
Jeremy Lakeman
bcd9575b54 Fix minor compilation issues on CentOS.
- ensure size_t is defined when compiling xprintf.h
- declare overlay_route_record as a union field in overlay_route_record to avoid alignment issues
- set the result of fwrite and fputs
- support slightly older git version
2014-10-20 12:35:21 +10:30
Andrew Bettison
54bebb1ebd Fix -Wsign-compare warnings in tfw_createfile 2013-12-11 14:00:41 +10:30
Petter Reinholdtsen
804af66308 Add supid copyright headers on request from Andrew Bettison in the serval project. 2013-12-07 18:38:14 +01:00
Petter Reinholdtsen
4d80c7c5db Merge branch 'development' into warnings-security 2013-12-07 17:57:46 +01:00
Andrew Bettison
9b64bb87e0 Uniform copyright notices
Added some missing copyright/license block comments
2013-12-04 17:15:36 +10:30
Petter Reinholdtsen
1124e3de34 Remove useless tests that have constant value because the variables are unsigned. 2013-10-13 22:56:48 +02:00
Jeremy Lakeman
ec44a3c9b2 Fix string format warning 2013-08-19 13:54:19 +09:30
Andrew Bettison
494a766b9e Improve str.h and str.c
Move alloca_tohex() from serval.h into str.h so it can be used stand-alone.

Rename str_to_ll_scaled() to str_to_int64_scaled().  Add str_to_uint64_scaled()
and scale_factor().

Add a few more URI parsing functions.  Move some functions out of str.c and
into str.h as inline functions.
2012-11-22 18:15:40 +10:30
Andrew Bettison
c84b7e5db4 Improve str.h functions
Add strn_startswith() and strncase_startswith().

Make all str*_startswith() functions take const char * arguments, to make it
possible to do safe programming with consts.
2012-11-20 18:10:08 +10:30
Andrew Bettison
d38ce66c95 Improve test framework: create_file()
New executable in Makefile 'all' target: tfw_createfile.

New str.h function: str_to_ll_scaled().
2012-10-31 18:13:33 +10:30