diff --git a/CHANGES.md b/CHANGES.md index 6da02af9e..34980b365 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -18,6 +18,9 @@ found. New mkiocccentry version: 1.0.2 2023-11-06. +`txzchk` also checks for these files in the tarball. New version: 1.0.2 +2023-11-06. + ## Release 1.0.53 2023-09-13 @@ -1234,7 +1237,7 @@ by `--`. It might be that it's supposed to be args to the program, not options. Or it might be that it doesn't matter. This is TBD later. Fix minor bug in `txzchk` that prevented a debug message from being shown even -if the debug level requested was high enough. New version "1.0.1 2023-06-16". +if the debug level requested was high enough. New version "1.0.2 2023-11-06". ## Release 1.0.12 2023-06-15 diff --git a/dbg/man/man3/errp.3 b/dbg/man/man3/errp.3 deleted file mode 120000 index b87272d91..000000000 --- a/dbg/man/man3/errp.3 +++ /dev/null @@ -1 +0,0 @@ -err.3 \ No newline at end of file diff --git a/dbg/man/man3/errp.3 b/dbg/man/man3/errp.3 new file mode 100644 index 000000000..48ee499ea --- /dev/null +++ b/dbg/man/man3/errp.3 @@ -0,0 +1,205 @@ +.\" section 3 man page for dbg +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH err 3 "30 January 2023" "err" +.SH NAME +.BR err() \|, +.BR verr() \|, +.BR ferr() \|, +.BR vferr() \|, +.BR errp() \|, +.BR verrp() \|, +.BR ferrp() \|, +.BR vferrp() +\- fatal error message facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern bool err_output_allowed; /* false ==> disable error messages */" +.sp +.B "void err(int exitcode, const char *name, const char *fmt, ...);" +.br +.B "void verr(int exitcode, char const *name, char const *fmt, va_list ap);" +.br +.B "void ferr(int exitcode, FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vferr(int exitcode, FILE *stream, char const *name, char const *fmt, va_list ap);" +.sp +.B "void errp(int exitcode, const char *name, const char *fmt, ...);" +.br +.B "void verrp(int exitcode, char const *name, char const *fmt, va_list ap);" +.br +.B "void ferrp(int exitcode, FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vferrp(int exitcode, FILE *stream, char const *name, char const *fmt, va_list ap);" +.SH DESCRIPTION +These functions provide a way to write fatal error messages to a stream such as +.BR stderr . +.SS Errno versions +.PP +The functions +.B errp() +and +.B ferrp() +write a message according to the value of +.BR errno , +making sure to restore the +.B errno +value in the case the function returns. +.SS Alternative output FILE * stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.BR ferr() \|, +.BR vferr() \|, +.BR ferrp() +and +.BR vferrp() +can write to an alternative +.B FILE * +stream. +.SS Variadic versions +.PP +The functions +.BR verr() \|, +.BR vferr() \|, +.BR verrp() +and +.BR vferrp() +are equivalent to the functions +.BR err() \|, +.BR ferr() \|, +.BR errp() +and +.BR ferrp() +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I err_output_allowed +is false the +.B err() +functions will not print anything. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +.PP +These functions do not return at all. +More specifically they do call +.BR exit (3) +with the appropriate exit code but immediately after call either +.B __builtin_unreachable +or +.BR abort (3) +depending on the value of +.BR __has_builtin(__builtin_unreachable) , +thereby terminating the program. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.B "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.B "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +.PP +For an example proper please refer to +.BR dbg (3). +.SH SEE ALSO +.BR dbg (3), +.BR msg (3), +.BR printf_usage (3), +.BR warn (3), +.BR werr (3), +.BR warn_or_err (3), +.BR printf (3) +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/fdbg.3 b/dbg/man/man3/fdbg.3 deleted file mode 120000 index 44a0326d1..000000000 --- a/dbg/man/man3/fdbg.3 +++ /dev/null @@ -1 +0,0 @@ -dbg.3 \ No newline at end of file diff --git a/dbg/man/man3/fdbg.3 b/dbg/man/man3/fdbg.3 new file mode 100644 index 000000000..892c4f827 --- /dev/null +++ b/dbg/man/man3/fdbg.3 @@ -0,0 +1,336 @@ +.\" section 3 man page for dbg +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH dbg 3 "05 August 2023" "dbg" +.SH NAME +.BR dbg() \|, +.BR vdbg() \|, +.BR fdbg() \|, +.BR vfdbg() \|, +.BR sndbg() \|, +.BR vsndbg() \|, +.BR parse_verbosity() +\- debug message facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern int verbosity_level; /* maximum debug level for debug messages */" +.br +.B "extern bool dbg_output_allowed; /* false ==> disable debug messages */" +.sp +.B "void dbg(int level, const char *fmt, ...);" +.br +.B "void vdbg(int level, char const *fmt, va_list ap);" +.br +.B "void fdbg(FILE *stream, int level, const char *fmt, ...);" +.br +.B "void vfdbg(FILE *stream, int level, char const *fmt, va_list ap);" +.br +.B "void sndbg(char *str, size_t size, int level, char const *fmt, ...);" +.br +.B "void vsndbg(char *str, size_t size, int level, char const *fmt, va_list ap);" +.br +.B "int parse_verbosity(char const *arg);" +.SH DESCRIPTION +These functions provide a way to write debug messages to a stream such as +.B stderr +or to a +.B char * +of a fixed size. +The messages will not be written unless the boolean +.B dbg_output_allowed +is true and the verbosity (debug) level is high enough. +To parse the verbosity level you can use the function +.BR parse_verbosity (3). +.PP +The general call semantics of the +.BR dbg (3) +functions is passing in a debug level, a format string and any format args. +The other versions are similar except that they take additional args as well, depending on the family. +See below subsections for details. +.SS Alternative output \fBFILE *\fP stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.BR fdbg() +and +.BR vfdbg() +can write to an alternative +.B FILE * +stream. +.SS Writing to a \fBchar *\fP buffer +The function +.BR sndbg() +writes a message to a buffer of a fixed size. +It does not write a newline after the message but the string is NUL terminated. +It does not do anything if passed a NULL pointer or +.I size +<=\ 1. +.SS Variadic versions +.PP +The functions +.BR vdbg() \|, +.BR vfdbg() +and +.BR vsndbg() +are equivalent to the functions +.BR dbg() \|, +.BR fdbg() +and +.BR sndbg() +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I dbg_output_allowed +is false these functions will not print anything. +If +.I level +> +.I verbosity_level +these functions will not print anything. +.SS Parsing verbosity level +We provide a function +.BR parse_verbosity (3) +to let you easily parse the verbosity level in your programs. +The function returns an +.BR int , +which you can assign to the variable +.BR verbosity_level , +and takes +.BR arg , +the option argument to the option you choose for verbosity. +.PP +The return from +.BR parse_verbosity (3) +should be checked for values < 0 +as they indicate that some form of error occurred +while parsing the verbosity level argument. +.PP +If +.B arg +is +.BR NULL , +or a negative number, or otherwise cannot be converted as +an integer, then +.B DBG_INVALID +(a value < 0) is returned. +.PP +A common command line convention is t use +.B \-v +as the verbosity option. +You may choose whichever you wish as +.BR parse_verbosity (3) +does not depend the for of the command line, +or even of the command line is used to +specify the verbosity in the first place. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +These functions return void. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.B "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.B "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +.SS Program source +.RS 4 +.nf +$ cat dbg_example.c +/* + * This is just a trivial demo for the dbg api, see the main function in dbg.c + * for a better example. + */ + +#include "dbg.h" + +#define filename "foo.bar" + +long length = 7; + +int +main(void) +{ + + /* + * We suggest you use getopt(3) and the parse_verbosity(3) function to + * convert \-v verbosity_level on the command line like: + * + * verbosity_level = parse_verbosity(optarg); + * if (verbosity_level < 0) { + * ... report a -v optarg parsing error ... + * } + */ + msg("NOTE: Setting verbosity_level to DBG_MED: %d", DBG_MED); + verbosity_level = DBG_MED; /* DBG_MED == (3) */ + + /* + * This will print: + * + * Warning: main: elephant is sky\-blue pink + * + * with newlines as described. + */ + msg("NOTE: The next line should say: \e"Warning: %s: %s", __func__, "elephant is sky\-blue pink\e""); + warn(__func__, "elephant is sky\-blue pink\n"); + + /* this will not print anything as verbosity_level 3 (DBG_MED) < 5 (DBG_HIGH): */ + dbg(DBG_HIGH, "starting critical section"); + + /* + * Because verbosity_level == 3 (DBG_MED) and filename is "foo.bar" and + * length == 7 this will print (with newlines added as described): + * + * debug[3]: file: foo.bar has length: 7 + */ + msg("NOTE: The next line should read: \e"debug[3]: file: %s has length: %ld\e"", filename, length); + dbg(DBG_MED, "file: %s has length: %ld\n", filename, length); + + /* + * If EPERM == 1 then this will print: + * + * ERROR[2]: main: test: errno[1]: Operation not permitted + * + * with newlines as discussed and then exit 2. + */ + errno = EPERM; + msg("NOTE: The next line should read: \\"ERROR[2]: main: test: errno[%d]: %s\\"", errno, strerror(errno)); + errp(2, __func__, "test"); + not_reached(); + + return 2; /* this return is never reached */ +} +.fi +.RE +.SS Compiling and running the example +.PP +To compile: +.RS 4 +.nf +.RB "$ " "cc \-c dbg.c" +.RB "$ " "cc \-o dbg_example dbg_example.c dbg.o" +.sp +.B # The above two commands could be shortened to just: +.RB "$ " "cc \-o dbg_example dbg_example.c dbg.c" +.fi +.RE +.sp +.PP +To run: +.RS 4 +.nf +.RB "$ " "./dbg_example" +NOTE: Setting verbosity_level to DBG_MED: 3 +NOTE: The next line should say: "Warning: main: elephant is sky\-blue pink" +Warning: main: elephant is sky\-blue pink + +NOTE: The next line should read: "debug[3]: file: foo.bar has length: 7" +debug[3]: file: foo.bar has length: 7 + +NOTE: The next line should read: "ERROR[2]: main: test: errno[1]: Operation not permitted" +ERROR[2]: main: test: errno[1]: Operation not permitted +$ echo $? +2 +.fi +.RE +.SH SEE ALSO +.BR msg (3), +.BR printf_usage (3), +.BR warn (3), +.BR werr (3), +.BR err (3), +.BR warn_or_err (3), +.BR printf (3) +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/ferr.3 b/dbg/man/man3/ferr.3 deleted file mode 120000 index b87272d91..000000000 --- a/dbg/man/man3/ferr.3 +++ /dev/null @@ -1 +0,0 @@ -err.3 \ No newline at end of file diff --git a/dbg/man/man3/ferr.3 b/dbg/man/man3/ferr.3 new file mode 100644 index 000000000..48ee499ea --- /dev/null +++ b/dbg/man/man3/ferr.3 @@ -0,0 +1,205 @@ +.\" section 3 man page for dbg +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH err 3 "30 January 2023" "err" +.SH NAME +.BR err() \|, +.BR verr() \|, +.BR ferr() \|, +.BR vferr() \|, +.BR errp() \|, +.BR verrp() \|, +.BR ferrp() \|, +.BR vferrp() +\- fatal error message facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern bool err_output_allowed; /* false ==> disable error messages */" +.sp +.B "void err(int exitcode, const char *name, const char *fmt, ...);" +.br +.B "void verr(int exitcode, char const *name, char const *fmt, va_list ap);" +.br +.B "void ferr(int exitcode, FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vferr(int exitcode, FILE *stream, char const *name, char const *fmt, va_list ap);" +.sp +.B "void errp(int exitcode, const char *name, const char *fmt, ...);" +.br +.B "void verrp(int exitcode, char const *name, char const *fmt, va_list ap);" +.br +.B "void ferrp(int exitcode, FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vferrp(int exitcode, FILE *stream, char const *name, char const *fmt, va_list ap);" +.SH DESCRIPTION +These functions provide a way to write fatal error messages to a stream such as +.BR stderr . +.SS Errno versions +.PP +The functions +.B errp() +and +.B ferrp() +write a message according to the value of +.BR errno , +making sure to restore the +.B errno +value in the case the function returns. +.SS Alternative output FILE * stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.BR ferr() \|, +.BR vferr() \|, +.BR ferrp() +and +.BR vferrp() +can write to an alternative +.B FILE * +stream. +.SS Variadic versions +.PP +The functions +.BR verr() \|, +.BR vferr() \|, +.BR verrp() +and +.BR vferrp() +are equivalent to the functions +.BR err() \|, +.BR ferr() \|, +.BR errp() +and +.BR ferrp() +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I err_output_allowed +is false the +.B err() +functions will not print anything. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +.PP +These functions do not return at all. +More specifically they do call +.BR exit (3) +with the appropriate exit code but immediately after call either +.B __builtin_unreachable +or +.BR abort (3) +depending on the value of +.BR __has_builtin(__builtin_unreachable) , +thereby terminating the program. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.B "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.B "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +.PP +For an example proper please refer to +.BR dbg (3). +.SH SEE ALSO +.BR dbg (3), +.BR msg (3), +.BR printf_usage (3), +.BR warn (3), +.BR werr (3), +.BR warn_or_err (3), +.BR printf (3) +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/ferrp.3 b/dbg/man/man3/ferrp.3 deleted file mode 120000 index b87272d91..000000000 --- a/dbg/man/man3/ferrp.3 +++ /dev/null @@ -1 +0,0 @@ -err.3 \ No newline at end of file diff --git a/dbg/man/man3/ferrp.3 b/dbg/man/man3/ferrp.3 new file mode 100644 index 000000000..48ee499ea --- /dev/null +++ b/dbg/man/man3/ferrp.3 @@ -0,0 +1,205 @@ +.\" section 3 man page for dbg +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH err 3 "30 January 2023" "err" +.SH NAME +.BR err() \|, +.BR verr() \|, +.BR ferr() \|, +.BR vferr() \|, +.BR errp() \|, +.BR verrp() \|, +.BR ferrp() \|, +.BR vferrp() +\- fatal error message facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern bool err_output_allowed; /* false ==> disable error messages */" +.sp +.B "void err(int exitcode, const char *name, const char *fmt, ...);" +.br +.B "void verr(int exitcode, char const *name, char const *fmt, va_list ap);" +.br +.B "void ferr(int exitcode, FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vferr(int exitcode, FILE *stream, char const *name, char const *fmt, va_list ap);" +.sp +.B "void errp(int exitcode, const char *name, const char *fmt, ...);" +.br +.B "void verrp(int exitcode, char const *name, char const *fmt, va_list ap);" +.br +.B "void ferrp(int exitcode, FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vferrp(int exitcode, FILE *stream, char const *name, char const *fmt, va_list ap);" +.SH DESCRIPTION +These functions provide a way to write fatal error messages to a stream such as +.BR stderr . +.SS Errno versions +.PP +The functions +.B errp() +and +.B ferrp() +write a message according to the value of +.BR errno , +making sure to restore the +.B errno +value in the case the function returns. +.SS Alternative output FILE * stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.BR ferr() \|, +.BR vferr() \|, +.BR ferrp() +and +.BR vferrp() +can write to an alternative +.B FILE * +stream. +.SS Variadic versions +.PP +The functions +.BR verr() \|, +.BR vferr() \|, +.BR verrp() +and +.BR vferrp() +are equivalent to the functions +.BR err() \|, +.BR ferr() \|, +.BR errp() +and +.BR ferrp() +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I err_output_allowed +is false the +.B err() +functions will not print anything. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +.PP +These functions do not return at all. +More specifically they do call +.BR exit (3) +with the appropriate exit code but immediately after call either +.B __builtin_unreachable +or +.BR abort (3) +depending on the value of +.BR __has_builtin(__builtin_unreachable) , +thereby terminating the program. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.B "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.B "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +.PP +For an example proper please refer to +.BR dbg (3). +.SH SEE ALSO +.BR dbg (3), +.BR msg (3), +.BR printf_usage (3), +.BR warn (3), +.BR werr (3), +.BR warn_or_err (3), +.BR printf (3) +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/fmsg.3 b/dbg/man/man3/fmsg.3 deleted file mode 120000 index 00912eceb..000000000 --- a/dbg/man/man3/fmsg.3 +++ /dev/null @@ -1 +0,0 @@ -msg.3 \ No newline at end of file diff --git a/dbg/man/man3/fmsg.3 b/dbg/man/man3/fmsg.3 new file mode 100644 index 000000000..362484c0a --- /dev/null +++ b/dbg/man/man3/fmsg.3 @@ -0,0 +1,196 @@ +.\" section 3 man page for msg +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH msg 3 "30 January 2023" "msg" +.SH NAME +.BR msg() \|, +.BR vmsg() \|, +.BR fmsg() \|, +.BR vfmsg() \|, +.BR snmsg() \|, +.BR vsnmsg() +\- info message facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern int verbosity_level; /* maximum debug level for debug messages */" +.br +.B "extern bool msg_output_allowed; /* false ==> disable informational messages */" +.br +.B "extern bool msg_warn_silent; /* true ==> silence info & warnings if verbosity_level <= 0 */" +.sp +.B "void msg(const char *fmt, ...);" +.br +.B "void vmsg(char const *fmt, va_list ap);" +.br +.B "void fmsg(FILE *stream, const char *fmt, ...);" +.br +.B "void vfmsg(FILE *stream, char const *fmt, va_list ap);" +.br +.B "void snmsg(char *str, size_t size, char const *fmt, ...);" +.br +.B "void vsnmsg(char *str, size_t size, char const *fmt, va_list ap);" +.SH DESCRIPTION +These functions provide a way to write informative messages to a stream such as +.B stderr +or to a +.B char * +of a fixed size. +.SS Alternative output FILE * stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.B fmsg() +and +.B vfmsg() +can write to an alternative +.B FILE * +stream. +.SS Writing to a char * buffer +The functions +.B snmsg() +and +.B vsnmsg() +write a message to a buffer of a fixed size. +They do not write a newline after the message but the string is NUL terminated. +They will not do anything if passed a NULL pointer or +.IR size +<=\ 1. +.SS Variadic versions +.PP +The functions +.BR vmsg(), +.BR vfmsg() +and +.BR vsnmsg() +are equivalent to the functions +.BR msg(), +.BR fmsg() +and +.BR snmsg() +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I msg_output_allowed +is false these functions will not print anything. +.sp +When +.I msg_warn_silent +is true these functions will be silenced if +.IR verbosity_level +<= 0. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +.PP +These functions return void. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.B "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.B "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +.PP +For an example proper please refer to +.BR dbg (3). +.SH SEE ALSO +.BR dbg (3), +.BR printf_usage (3), +.BR warn (3), +.BR werr (3), +.BR err (3), +.BR warn_or_err (3), +.BR printf (3) +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/fprintf_usage.3 b/dbg/man/man3/fprintf_usage.3 deleted file mode 120000 index 3b54a4341..000000000 --- a/dbg/man/man3/fprintf_usage.3 +++ /dev/null @@ -1 +0,0 @@ -printf_usage.3 \ No newline at end of file diff --git a/dbg/man/man3/fprintf_usage.3 b/dbg/man/man3/fprintf_usage.3 new file mode 100644 index 000000000..71b958070 --- /dev/null +++ b/dbg/man/man3/fprintf_usage.3 @@ -0,0 +1,154 @@ +.\" section 3 man page for printf_usage +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH printf_usage 3 "30 January 2023" "printf_usage" +.SH NAME +.BR printf_usage() \|, +.BR vprintf_usage() \|, +.BR fprintf_usage() \|, +.BR vfprintf_usage() +\- usage message facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern bool usage_output_allowed; /* false ==> disable usage messages */" +.br +.B "void printf_usage(int exitcode, const char *fmt, ...) __attribute__((format(printf, 2, 3))); /* 2=format 3=params */" +.br +.B "void vprintf_usage(int exitcode, char const *fmt, va_list ap);" +.br +.BI "void fprintf_usage(int exitcode, FILE *stream, const char *fmt, ...) __attribute__((format(printf, 3, 4))); /* 3=format 4=params */" +.br +.B "void vfprintf_usage(int exitcode, FILE *stream, char const *fmt, va_list ap);" +.SH DESCRIPTION +These functions provide a way to write a usage message to a stream such as +.BR stderr . +.SS Variadic versions +.PP +The functions +.B vprintf_usage() +and +.B vfprintf_usage() +are equivalent to the functions +.B printf_usage() +and +.B fprintf_usage() +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I usage_output_allowed +is false these functions will not print anything. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +.PP +These functions return void except that the functions will call +.BR exit (3) +with the exit code provided to the function if +.I exitcode +is >= 0. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.B "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.B "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +For an example proper please refer to +.BR dbg (3). +.SH SEE ALSO +.BR dbg (3), +.BR msg (3), +.BR warn (3), +.BR werr (3), +.BR err (3), +.BR warn_or_err (3), +.BR printf (3) +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/fwarn.3 b/dbg/man/man3/fwarn.3 deleted file mode 120000 index d70a2beca..000000000 --- a/dbg/man/man3/fwarn.3 +++ /dev/null @@ -1 +0,0 @@ -warn.3 \ No newline at end of file diff --git a/dbg/man/man3/fwarn.3 b/dbg/man/man3/fwarn.3 new file mode 100644 index 000000000..beece7a00 --- /dev/null +++ b/dbg/man/man3/fwarn.3 @@ -0,0 +1,234 @@ +.\" section 3 man page for warn +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH warn 3 "30 January 2023" "warn" +.SH NAME +.BR warn() \|, +.BR vwarn() \|, +.BR fwarn() \|, +.BR vfwarn() \|, +.BR snwarn() \|, +.BR vsnwarn() \|, +.BR warnp() \|, +.BR vwarnp() \|, +.BR fwarnp() \|, +.BR vfwarnp() \|, +.BR snwarnp() \|, +.BR vsnwarnp() +\- warning message facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern int verbosity_level; /* maximum debug level for debug messages */" +.br +.B "extern bool warn_output_allowed; /* false ==> disable warning messages */" +.br +.B "extern bool msg_warn_silent; /* true ==> silence info & warnings if verbosity_level <= 0 */" +.sp +.B "void warn(const char *name, const char *fmt, ...);" +.br +.B "void vwarn(char const *name, char const *fmt, va_list ap);" +.br +.B "void fwarn(FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwarn(FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwarn(char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwarn(char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.sp +.B "void warnp(const char *name, const char *fmt, ...);" +.br +.B "void vwarnp(char const *name, char const *fmt, va_list ap);" +.br +.B "void fwarnp(FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwarnp(FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwarnp(char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwarnp(char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.SH DESCRIPTION +These functions provide a way to write warning messages to a stream such as +.B stderr +or to a +.B char * +of a fixed size. +.SS Errno versions +.PP +The functions +.BR warnp() , +.BR fwarnp() , +.B vfwarnp() +and +.B vsnwarnp() +write a message according to the value of +.BR errno , + making sure to restore the +.B errno +value in the case the function returns. +.SS Alternative output FILE * stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.BR fwarn() \|, +.BR vfwarn() \|, +.BR fwarnp() +and +.BR vfwarnp() +can write to an alternative +.B FILE * +stream. +.SS Writing to a char * buffer +The functions +.BR snwarn() +and +.BR snwarnp() +write a message to a buffer of a fixed size. +They do not write a newline after the message but the string is NUL terminated. +They do not do anything if passed a NULL pointer or +.I size +<= 1. +.SS Variadic versions +.PP +The functions +.BR vwarn() \|, +.BR vfwarn() \|, +.BR vsnwarn() \|, +.BR vwarnp() \|, +.BR vfwarnp() +and +.BR vsnwarnp() +are equivalent to the functions +.BR warn() \|, +.BR fwarn() \|, +.BR snwarn() \|, +.BR warnp() \|, +.B fwarnp() +and +.B snwarnp() +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I warn_output_allowed +is false these functions will not print anything. +.sp +When +.I msg_warn_silent +is true these functions will be silenced if +.I verbosity_level +<= 0. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +.PP +These functions return void. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.BR "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.BR "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +For an example proper please refer to +.BR dbg (3). +.SH SEE ALSO +.BR dbg (3), +.BR msg (3), +.BR printf_usage (3), +.BR werr (3), +.BR err (3), +.BR warn_or_err (3), +.BR printf (3) +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/fwarn_or_err.3 b/dbg/man/man3/fwarn_or_err.3 deleted file mode 120000 index 9123b756a..000000000 --- a/dbg/man/man3/fwarn_or_err.3 +++ /dev/null @@ -1 +0,0 @@ -warn_or_err.3 \ No newline at end of file diff --git a/dbg/man/man3/fwarn_or_err.3 b/dbg/man/man3/fwarn_or_err.3 new file mode 100644 index 000000000..eaa70ae0a --- /dev/null +++ b/dbg/man/man3/fwarn_or_err.3 @@ -0,0 +1,200 @@ +.\" section 3 man page for warn_or_err +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH warn_or_err 3 "29 January 2023" "warn_or_err" +.SH NAME +.BR warn_or_err() \|, +.BR vwarn_or_err() \|, +.BR fwarn_or_err() \|, +.BR vfwarn_or_err() \|, +.BR warnp_or_errp() \|, +.BR vwarnp_or_errp() \|, +.BR fwarnp_or_errp() \|, +.B vfwarnp_or_errp() +\- show either a warning message or a fatal error message +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern int verbosity_level; /* maximum debug level for debug messages */" +.br +.B "extern bool warn_output_allowed; /* false ==> disable warning messages */" +.br +.B "extern bool err_output_allowed; /* false ==> disable error messages */" +.br +.B "extern bool msg_warn_silent; /* true ==> silence info & warnings if verbosity_level <= 0 */" +.sp +.B "void warn_or_err(int exitcode, const char *name, bool warning, const char *fmt, ...);" +.br +.B "void vwarn_or_err(int exitcode, const char *name, bool warning, const char *fmt, va_list ap); +.br +.B "void fwarn_or_err(int exitcode, FILE *stream, const char *name, bool warning, const char *fmt, ...);" +.br +.B "void vfwarn_or_err(int exitcode, FILE *stream, const char *name, bool warning, const char *fmt, va_list ap);" +.SH DESCRIPTION +These functions provide a way to write either a warning message or a fatal error message (prior to aborting) to a stream such as +.BR stderr . +.SS Alternative output FILE * stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.BR fwarn_or_err() \|, +.BR vfwarn_or_err() +and +.BR fwarnp_or_errp() +can write to an alternative +.B FILE * +stream. +.SS Variadic versions +.PP +The functions +.BR vwarn_or_err() \|, +.BR vfwarn_or_err() +and +.BR vwarnp_or_errp() +are equivalent to the functions +.BR warn_or_err(), +.BR fwarn_or_err() +and +.BR warnp_or_errp() +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I warn_output_allowed +is false warning messages will not be printed. +.sp +When +.I err_output_allowed +is false error messages will not be printed. +.sp +When +.I msg_warn_silent +is true warning messages will not be printed if +.IR verbosity_level +<= 0. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +.PP +These functions do not return if +.B warning is false +in the same manner as the functions +.BR err() \|, +.BR verr() \|, +.BR ferr() \|, +.BR vferr() \|, +.BR errp() \|, +.BR verrp() \|, +.BR ferrp() \|, +and +.BR vferrp() . +Otherwise they will return void. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.B "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.B "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.BR "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +.PP +For an example proper please refer to +.BR dbg (3). +.SH SEE ALSO +.BR dbg (3), +.BR msg (3), +.BR printf_usage (3), +.BR warn (3), +.BR werr (3), +.BR err (3), +.BR printf (3). +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/fwarnp.3 b/dbg/man/man3/fwarnp.3 deleted file mode 120000 index d70a2beca..000000000 --- a/dbg/man/man3/fwarnp.3 +++ /dev/null @@ -1 +0,0 @@ -warn.3 \ No newline at end of file diff --git a/dbg/man/man3/fwarnp.3 b/dbg/man/man3/fwarnp.3 new file mode 100644 index 000000000..beece7a00 --- /dev/null +++ b/dbg/man/man3/fwarnp.3 @@ -0,0 +1,234 @@ +.\" section 3 man page for warn +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH warn 3 "30 January 2023" "warn" +.SH NAME +.BR warn() \|, +.BR vwarn() \|, +.BR fwarn() \|, +.BR vfwarn() \|, +.BR snwarn() \|, +.BR vsnwarn() \|, +.BR warnp() \|, +.BR vwarnp() \|, +.BR fwarnp() \|, +.BR vfwarnp() \|, +.BR snwarnp() \|, +.BR vsnwarnp() +\- warning message facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern int verbosity_level; /* maximum debug level for debug messages */" +.br +.B "extern bool warn_output_allowed; /* false ==> disable warning messages */" +.br +.B "extern bool msg_warn_silent; /* true ==> silence info & warnings if verbosity_level <= 0 */" +.sp +.B "void warn(const char *name, const char *fmt, ...);" +.br +.B "void vwarn(char const *name, char const *fmt, va_list ap);" +.br +.B "void fwarn(FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwarn(FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwarn(char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwarn(char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.sp +.B "void warnp(const char *name, const char *fmt, ...);" +.br +.B "void vwarnp(char const *name, char const *fmt, va_list ap);" +.br +.B "void fwarnp(FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwarnp(FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwarnp(char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwarnp(char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.SH DESCRIPTION +These functions provide a way to write warning messages to a stream such as +.B stderr +or to a +.B char * +of a fixed size. +.SS Errno versions +.PP +The functions +.BR warnp() , +.BR fwarnp() , +.B vfwarnp() +and +.B vsnwarnp() +write a message according to the value of +.BR errno , + making sure to restore the +.B errno +value in the case the function returns. +.SS Alternative output FILE * stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.BR fwarn() \|, +.BR vfwarn() \|, +.BR fwarnp() +and +.BR vfwarnp() +can write to an alternative +.B FILE * +stream. +.SS Writing to a char * buffer +The functions +.BR snwarn() +and +.BR snwarnp() +write a message to a buffer of a fixed size. +They do not write a newline after the message but the string is NUL terminated. +They do not do anything if passed a NULL pointer or +.I size +<= 1. +.SS Variadic versions +.PP +The functions +.BR vwarn() \|, +.BR vfwarn() \|, +.BR vsnwarn() \|, +.BR vwarnp() \|, +.BR vfwarnp() +and +.BR vsnwarnp() +are equivalent to the functions +.BR warn() \|, +.BR fwarn() \|, +.BR snwarn() \|, +.BR warnp() \|, +.B fwarnp() +and +.B snwarnp() +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I warn_output_allowed +is false these functions will not print anything. +.sp +When +.I msg_warn_silent +is true these functions will be silenced if +.I verbosity_level +<= 0. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +.PP +These functions return void. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.BR "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.BR "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +For an example proper please refer to +.BR dbg (3). +.SH SEE ALSO +.BR dbg (3), +.BR msg (3), +.BR printf_usage (3), +.BR werr (3), +.BR err (3), +.BR warn_or_err (3), +.BR printf (3) +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/fwerr.3 b/dbg/man/man3/fwerr.3 deleted file mode 120000 index d381538c9..000000000 --- a/dbg/man/man3/fwerr.3 +++ /dev/null @@ -1 +0,0 @@ -werr.3 \ No newline at end of file diff --git a/dbg/man/man3/fwerr.3 b/dbg/man/man3/fwerr.3 new file mode 100644 index 000000000..2f04f5ecb --- /dev/null +++ b/dbg/man/man3/fwerr.3 @@ -0,0 +1,223 @@ +.\" section 3 man page for dbg +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH werr 3 "30 January 2023" "werr" +.SH NAME +.BR werr() \|, +.BR vwerr() \|, +.BR fwerr() \|, +.BR vfwerr() \|, +.BR snwerr() \|, +.BR vsnwerr() \|, +.BR werrp() \|, +.BR vwerrp() \|, +.BR fwerrp() \|, +.BR vfwerrp() \|, +.BR snwerrp() \|, +.BR vsnwerrp() +\- non-fatal error messages facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern bool err_output_allowed; /* false ==> disable error messages */" +.sp +.B "void werr(int error_code, const char *name, const char *fmt, ...);" +.br +.B "void vwerr(int error_code, char const *name, char const *fmt, va_list ap);" +.br +.B "void fwerr(int error_code, FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwerr(int error_code, FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwerr(int error_code, char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwerr(int error_code, char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.sp +.B "void werrp(int error_code, const char *name, const char *fmt, ...);" +.br +.B "void vwerrp(int error_code, char const *name, char const *fmt, va_list ap);" +.br +.B "void fwerrp(int error_code, FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwerrp(int error_code, FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwerrp(int error_code, char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwerrp(int error_code, char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.SH DESCRIPTION +These functions provide a way to write non-fatal error messages to a stream such as +.BR stderr . +.SS Errno versions +.PP +The functions +.BR werrp() , +.B fwerrp() +and +.B vsnwerrp() +write a message according to the value of +.BR errno , +making sure to restore the +.B errno +value in the case the function returns. +.SS Alternative output FILE * stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.BR fwerr() +and +.BR vfwerrp() +can write to an alternative +.B FILE * +stream. +.SS Writing to a char * buffer +The functions +.BR snwerr() +and +.BR snwerrp() +write a message to a buffer of a fixed size. +They do not write a newline after the message but the string is NUL terminated. +They do not do anything if passed a NULL pointer or +.I size +<= 1. +.SS Variadic versions +.PP +The functions +.BR vwerr() \|, +.BR vfwerr() \|, +.BR vsnwerr() \|, +.BR vwerrp() \|, +.BR vfwerrp() +and +.BR vsnwerrp() +are equivalent to the functions +.BR err (3), +.BR ferr (3), +.BR errp (3), +.BR ferrp (3), +.BR werr (3), +.BR fwerr (3), +.BR snwerr (3), +.BR werrp (3), +.BR fwerrp (3) +and +.BR snwerrp (3) +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I err_output_allowed +is false these functions will not print anything. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +.PP +These functions return void. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.B "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.B "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.B "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.B "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +.PP +For an example proper please refer to +.BR dbg (3). +.SH SEE ALSO +.BR dbg (3), +.BR msg (3), +.BR printf_usage (3), +.BR warn (3), +.BR err (3), +.BR warn_or_err (3), +.BR printf (3). +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/fwerrp.3 b/dbg/man/man3/fwerrp.3 deleted file mode 120000 index d381538c9..000000000 --- a/dbg/man/man3/fwerrp.3 +++ /dev/null @@ -1 +0,0 @@ -werr.3 \ No newline at end of file diff --git a/dbg/man/man3/fwerrp.3 b/dbg/man/man3/fwerrp.3 new file mode 100644 index 000000000..2f04f5ecb --- /dev/null +++ b/dbg/man/man3/fwerrp.3 @@ -0,0 +1,223 @@ +.\" section 3 man page for dbg +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH werr 3 "30 January 2023" "werr" +.SH NAME +.BR werr() \|, +.BR vwerr() \|, +.BR fwerr() \|, +.BR vfwerr() \|, +.BR snwerr() \|, +.BR vsnwerr() \|, +.BR werrp() \|, +.BR vwerrp() \|, +.BR fwerrp() \|, +.BR vfwerrp() \|, +.BR snwerrp() \|, +.BR vsnwerrp() +\- non-fatal error messages facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern bool err_output_allowed; /* false ==> disable error messages */" +.sp +.B "void werr(int error_code, const char *name, const char *fmt, ...);" +.br +.B "void vwerr(int error_code, char const *name, char const *fmt, va_list ap);" +.br +.B "void fwerr(int error_code, FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwerr(int error_code, FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwerr(int error_code, char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwerr(int error_code, char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.sp +.B "void werrp(int error_code, const char *name, const char *fmt, ...);" +.br +.B "void vwerrp(int error_code, char const *name, char const *fmt, va_list ap);" +.br +.B "void fwerrp(int error_code, FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwerrp(int error_code, FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwerrp(int error_code, char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwerrp(int error_code, char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.SH DESCRIPTION +These functions provide a way to write non-fatal error messages to a stream such as +.BR stderr . +.SS Errno versions +.PP +The functions +.BR werrp() , +.B fwerrp() +and +.B vsnwerrp() +write a message according to the value of +.BR errno , +making sure to restore the +.B errno +value in the case the function returns. +.SS Alternative output FILE * stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.BR fwerr() +and +.BR vfwerrp() +can write to an alternative +.B FILE * +stream. +.SS Writing to a char * buffer +The functions +.BR snwerr() +and +.BR snwerrp() +write a message to a buffer of a fixed size. +They do not write a newline after the message but the string is NUL terminated. +They do not do anything if passed a NULL pointer or +.I size +<= 1. +.SS Variadic versions +.PP +The functions +.BR vwerr() \|, +.BR vfwerr() \|, +.BR vsnwerr() \|, +.BR vwerrp() \|, +.BR vfwerrp() +and +.BR vsnwerrp() +are equivalent to the functions +.BR err (3), +.BR ferr (3), +.BR errp (3), +.BR ferrp (3), +.BR werr (3), +.BR fwerr (3), +.BR snwerr (3), +.BR werrp (3), +.BR fwerrp (3) +and +.BR snwerrp (3) +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I err_output_allowed +is false these functions will not print anything. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +.PP +These functions return void. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.B "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.B "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.B "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.B "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +.PP +For an example proper please refer to +.BR dbg (3). +.SH SEE ALSO +.BR dbg (3), +.BR msg (3), +.BR printf_usage (3), +.BR warn (3), +.BR err (3), +.BR warn_or_err (3), +.BR printf (3). +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/sndbg.3 b/dbg/man/man3/sndbg.3 deleted file mode 120000 index 44a0326d1..000000000 --- a/dbg/man/man3/sndbg.3 +++ /dev/null @@ -1 +0,0 @@ -dbg.3 \ No newline at end of file diff --git a/dbg/man/man3/sndbg.3 b/dbg/man/man3/sndbg.3 new file mode 100644 index 000000000..892c4f827 --- /dev/null +++ b/dbg/man/man3/sndbg.3 @@ -0,0 +1,336 @@ +.\" section 3 man page for dbg +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH dbg 3 "05 August 2023" "dbg" +.SH NAME +.BR dbg() \|, +.BR vdbg() \|, +.BR fdbg() \|, +.BR vfdbg() \|, +.BR sndbg() \|, +.BR vsndbg() \|, +.BR parse_verbosity() +\- debug message facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern int verbosity_level; /* maximum debug level for debug messages */" +.br +.B "extern bool dbg_output_allowed; /* false ==> disable debug messages */" +.sp +.B "void dbg(int level, const char *fmt, ...);" +.br +.B "void vdbg(int level, char const *fmt, va_list ap);" +.br +.B "void fdbg(FILE *stream, int level, const char *fmt, ...);" +.br +.B "void vfdbg(FILE *stream, int level, char const *fmt, va_list ap);" +.br +.B "void sndbg(char *str, size_t size, int level, char const *fmt, ...);" +.br +.B "void vsndbg(char *str, size_t size, int level, char const *fmt, va_list ap);" +.br +.B "int parse_verbosity(char const *arg);" +.SH DESCRIPTION +These functions provide a way to write debug messages to a stream such as +.B stderr +or to a +.B char * +of a fixed size. +The messages will not be written unless the boolean +.B dbg_output_allowed +is true and the verbosity (debug) level is high enough. +To parse the verbosity level you can use the function +.BR parse_verbosity (3). +.PP +The general call semantics of the +.BR dbg (3) +functions is passing in a debug level, a format string and any format args. +The other versions are similar except that they take additional args as well, depending on the family. +See below subsections for details. +.SS Alternative output \fBFILE *\fP stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.BR fdbg() +and +.BR vfdbg() +can write to an alternative +.B FILE * +stream. +.SS Writing to a \fBchar *\fP buffer +The function +.BR sndbg() +writes a message to a buffer of a fixed size. +It does not write a newline after the message but the string is NUL terminated. +It does not do anything if passed a NULL pointer or +.I size +<=\ 1. +.SS Variadic versions +.PP +The functions +.BR vdbg() \|, +.BR vfdbg() +and +.BR vsndbg() +are equivalent to the functions +.BR dbg() \|, +.BR fdbg() +and +.BR sndbg() +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I dbg_output_allowed +is false these functions will not print anything. +If +.I level +> +.I verbosity_level +these functions will not print anything. +.SS Parsing verbosity level +We provide a function +.BR parse_verbosity (3) +to let you easily parse the verbosity level in your programs. +The function returns an +.BR int , +which you can assign to the variable +.BR verbosity_level , +and takes +.BR arg , +the option argument to the option you choose for verbosity. +.PP +The return from +.BR parse_verbosity (3) +should be checked for values < 0 +as they indicate that some form of error occurred +while parsing the verbosity level argument. +.PP +If +.B arg +is +.BR NULL , +or a negative number, or otherwise cannot be converted as +an integer, then +.B DBG_INVALID +(a value < 0) is returned. +.PP +A common command line convention is t use +.B \-v +as the verbosity option. +You may choose whichever you wish as +.BR parse_verbosity (3) +does not depend the for of the command line, +or even of the command line is used to +specify the verbosity in the first place. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +These functions return void. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.B "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.B "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +.SS Program source +.RS 4 +.nf +$ cat dbg_example.c +/* + * This is just a trivial demo for the dbg api, see the main function in dbg.c + * for a better example. + */ + +#include "dbg.h" + +#define filename "foo.bar" + +long length = 7; + +int +main(void) +{ + + /* + * We suggest you use getopt(3) and the parse_verbosity(3) function to + * convert \-v verbosity_level on the command line like: + * + * verbosity_level = parse_verbosity(optarg); + * if (verbosity_level < 0) { + * ... report a -v optarg parsing error ... + * } + */ + msg("NOTE: Setting verbosity_level to DBG_MED: %d", DBG_MED); + verbosity_level = DBG_MED; /* DBG_MED == (3) */ + + /* + * This will print: + * + * Warning: main: elephant is sky\-blue pink + * + * with newlines as described. + */ + msg("NOTE: The next line should say: \e"Warning: %s: %s", __func__, "elephant is sky\-blue pink\e""); + warn(__func__, "elephant is sky\-blue pink\n"); + + /* this will not print anything as verbosity_level 3 (DBG_MED) < 5 (DBG_HIGH): */ + dbg(DBG_HIGH, "starting critical section"); + + /* + * Because verbosity_level == 3 (DBG_MED) and filename is "foo.bar" and + * length == 7 this will print (with newlines added as described): + * + * debug[3]: file: foo.bar has length: 7 + */ + msg("NOTE: The next line should read: \e"debug[3]: file: %s has length: %ld\e"", filename, length); + dbg(DBG_MED, "file: %s has length: %ld\n", filename, length); + + /* + * If EPERM == 1 then this will print: + * + * ERROR[2]: main: test: errno[1]: Operation not permitted + * + * with newlines as discussed and then exit 2. + */ + errno = EPERM; + msg("NOTE: The next line should read: \\"ERROR[2]: main: test: errno[%d]: %s\\"", errno, strerror(errno)); + errp(2, __func__, "test"); + not_reached(); + + return 2; /* this return is never reached */ +} +.fi +.RE +.SS Compiling and running the example +.PP +To compile: +.RS 4 +.nf +.RB "$ " "cc \-c dbg.c" +.RB "$ " "cc \-o dbg_example dbg_example.c dbg.o" +.sp +.B # The above two commands could be shortened to just: +.RB "$ " "cc \-o dbg_example dbg_example.c dbg.c" +.fi +.RE +.sp +.PP +To run: +.RS 4 +.nf +.RB "$ " "./dbg_example" +NOTE: Setting verbosity_level to DBG_MED: 3 +NOTE: The next line should say: "Warning: main: elephant is sky\-blue pink" +Warning: main: elephant is sky\-blue pink + +NOTE: The next line should read: "debug[3]: file: foo.bar has length: 7" +debug[3]: file: foo.bar has length: 7 + +NOTE: The next line should read: "ERROR[2]: main: test: errno[1]: Operation not permitted" +ERROR[2]: main: test: errno[1]: Operation not permitted +$ echo $? +2 +.fi +.RE +.SH SEE ALSO +.BR msg (3), +.BR printf_usage (3), +.BR warn (3), +.BR werr (3), +.BR err (3), +.BR warn_or_err (3), +.BR printf (3) +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/snmsg.3 b/dbg/man/man3/snmsg.3 deleted file mode 120000 index 00912eceb..000000000 --- a/dbg/man/man3/snmsg.3 +++ /dev/null @@ -1 +0,0 @@ -msg.3 \ No newline at end of file diff --git a/dbg/man/man3/snmsg.3 b/dbg/man/man3/snmsg.3 new file mode 100644 index 000000000..362484c0a --- /dev/null +++ b/dbg/man/man3/snmsg.3 @@ -0,0 +1,196 @@ +.\" section 3 man page for msg +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH msg 3 "30 January 2023" "msg" +.SH NAME +.BR msg() \|, +.BR vmsg() \|, +.BR fmsg() \|, +.BR vfmsg() \|, +.BR snmsg() \|, +.BR vsnmsg() +\- info message facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern int verbosity_level; /* maximum debug level for debug messages */" +.br +.B "extern bool msg_output_allowed; /* false ==> disable informational messages */" +.br +.B "extern bool msg_warn_silent; /* true ==> silence info & warnings if verbosity_level <= 0 */" +.sp +.B "void msg(const char *fmt, ...);" +.br +.B "void vmsg(char const *fmt, va_list ap);" +.br +.B "void fmsg(FILE *stream, const char *fmt, ...);" +.br +.B "void vfmsg(FILE *stream, char const *fmt, va_list ap);" +.br +.B "void snmsg(char *str, size_t size, char const *fmt, ...);" +.br +.B "void vsnmsg(char *str, size_t size, char const *fmt, va_list ap);" +.SH DESCRIPTION +These functions provide a way to write informative messages to a stream such as +.B stderr +or to a +.B char * +of a fixed size. +.SS Alternative output FILE * stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.B fmsg() +and +.B vfmsg() +can write to an alternative +.B FILE * +stream. +.SS Writing to a char * buffer +The functions +.B snmsg() +and +.B vsnmsg() +write a message to a buffer of a fixed size. +They do not write a newline after the message but the string is NUL terminated. +They will not do anything if passed a NULL pointer or +.IR size +<=\ 1. +.SS Variadic versions +.PP +The functions +.BR vmsg(), +.BR vfmsg() +and +.BR vsnmsg() +are equivalent to the functions +.BR msg(), +.BR fmsg() +and +.BR snmsg() +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I msg_output_allowed +is false these functions will not print anything. +.sp +When +.I msg_warn_silent +is true these functions will be silenced if +.IR verbosity_level +<= 0. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +.PP +These functions return void. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.B "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.B "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +.PP +For an example proper please refer to +.BR dbg (3). +.SH SEE ALSO +.BR dbg (3), +.BR printf_usage (3), +.BR warn (3), +.BR werr (3), +.BR err (3), +.BR warn_or_err (3), +.BR printf (3) +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/snwarn.3 b/dbg/man/man3/snwarn.3 deleted file mode 120000 index d70a2beca..000000000 --- a/dbg/man/man3/snwarn.3 +++ /dev/null @@ -1 +0,0 @@ -warn.3 \ No newline at end of file diff --git a/dbg/man/man3/snwarn.3 b/dbg/man/man3/snwarn.3 new file mode 100644 index 000000000..beece7a00 --- /dev/null +++ b/dbg/man/man3/snwarn.3 @@ -0,0 +1,234 @@ +.\" section 3 man page for warn +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH warn 3 "30 January 2023" "warn" +.SH NAME +.BR warn() \|, +.BR vwarn() \|, +.BR fwarn() \|, +.BR vfwarn() \|, +.BR snwarn() \|, +.BR vsnwarn() \|, +.BR warnp() \|, +.BR vwarnp() \|, +.BR fwarnp() \|, +.BR vfwarnp() \|, +.BR snwarnp() \|, +.BR vsnwarnp() +\- warning message facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern int verbosity_level; /* maximum debug level for debug messages */" +.br +.B "extern bool warn_output_allowed; /* false ==> disable warning messages */" +.br +.B "extern bool msg_warn_silent; /* true ==> silence info & warnings if verbosity_level <= 0 */" +.sp +.B "void warn(const char *name, const char *fmt, ...);" +.br +.B "void vwarn(char const *name, char const *fmt, va_list ap);" +.br +.B "void fwarn(FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwarn(FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwarn(char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwarn(char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.sp +.B "void warnp(const char *name, const char *fmt, ...);" +.br +.B "void vwarnp(char const *name, char const *fmt, va_list ap);" +.br +.B "void fwarnp(FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwarnp(FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwarnp(char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwarnp(char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.SH DESCRIPTION +These functions provide a way to write warning messages to a stream such as +.B stderr +or to a +.B char * +of a fixed size. +.SS Errno versions +.PP +The functions +.BR warnp() , +.BR fwarnp() , +.B vfwarnp() +and +.B vsnwarnp() +write a message according to the value of +.BR errno , + making sure to restore the +.B errno +value in the case the function returns. +.SS Alternative output FILE * stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.BR fwarn() \|, +.BR vfwarn() \|, +.BR fwarnp() +and +.BR vfwarnp() +can write to an alternative +.B FILE * +stream. +.SS Writing to a char * buffer +The functions +.BR snwarn() +and +.BR snwarnp() +write a message to a buffer of a fixed size. +They do not write a newline after the message but the string is NUL terminated. +They do not do anything if passed a NULL pointer or +.I size +<= 1. +.SS Variadic versions +.PP +The functions +.BR vwarn() \|, +.BR vfwarn() \|, +.BR vsnwarn() \|, +.BR vwarnp() \|, +.BR vfwarnp() +and +.BR vsnwarnp() +are equivalent to the functions +.BR warn() \|, +.BR fwarn() \|, +.BR snwarn() \|, +.BR warnp() \|, +.B fwarnp() +and +.B snwarnp() +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I warn_output_allowed +is false these functions will not print anything. +.sp +When +.I msg_warn_silent +is true these functions will be silenced if +.I verbosity_level +<= 0. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +.PP +These functions return void. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.BR "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.BR "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +For an example proper please refer to +.BR dbg (3). +.SH SEE ALSO +.BR dbg (3), +.BR msg (3), +.BR printf_usage (3), +.BR werr (3), +.BR err (3), +.BR warn_or_err (3), +.BR printf (3) +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/snwarnp.3 b/dbg/man/man3/snwarnp.3 deleted file mode 120000 index d70a2beca..000000000 --- a/dbg/man/man3/snwarnp.3 +++ /dev/null @@ -1 +0,0 @@ -warn.3 \ No newline at end of file diff --git a/dbg/man/man3/snwarnp.3 b/dbg/man/man3/snwarnp.3 new file mode 100644 index 000000000..beece7a00 --- /dev/null +++ b/dbg/man/man3/snwarnp.3 @@ -0,0 +1,234 @@ +.\" section 3 man page for warn +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH warn 3 "30 January 2023" "warn" +.SH NAME +.BR warn() \|, +.BR vwarn() \|, +.BR fwarn() \|, +.BR vfwarn() \|, +.BR snwarn() \|, +.BR vsnwarn() \|, +.BR warnp() \|, +.BR vwarnp() \|, +.BR fwarnp() \|, +.BR vfwarnp() \|, +.BR snwarnp() \|, +.BR vsnwarnp() +\- warning message facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern int verbosity_level; /* maximum debug level for debug messages */" +.br +.B "extern bool warn_output_allowed; /* false ==> disable warning messages */" +.br +.B "extern bool msg_warn_silent; /* true ==> silence info & warnings if verbosity_level <= 0 */" +.sp +.B "void warn(const char *name, const char *fmt, ...);" +.br +.B "void vwarn(char const *name, char const *fmt, va_list ap);" +.br +.B "void fwarn(FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwarn(FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwarn(char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwarn(char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.sp +.B "void warnp(const char *name, const char *fmt, ...);" +.br +.B "void vwarnp(char const *name, char const *fmt, va_list ap);" +.br +.B "void fwarnp(FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwarnp(FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwarnp(char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwarnp(char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.SH DESCRIPTION +These functions provide a way to write warning messages to a stream such as +.B stderr +or to a +.B char * +of a fixed size. +.SS Errno versions +.PP +The functions +.BR warnp() , +.BR fwarnp() , +.B vfwarnp() +and +.B vsnwarnp() +write a message according to the value of +.BR errno , + making sure to restore the +.B errno +value in the case the function returns. +.SS Alternative output FILE * stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.BR fwarn() \|, +.BR vfwarn() \|, +.BR fwarnp() +and +.BR vfwarnp() +can write to an alternative +.B FILE * +stream. +.SS Writing to a char * buffer +The functions +.BR snwarn() +and +.BR snwarnp() +write a message to a buffer of a fixed size. +They do not write a newline after the message but the string is NUL terminated. +They do not do anything if passed a NULL pointer or +.I size +<= 1. +.SS Variadic versions +.PP +The functions +.BR vwarn() \|, +.BR vfwarn() \|, +.BR vsnwarn() \|, +.BR vwarnp() \|, +.BR vfwarnp() +and +.BR vsnwarnp() +are equivalent to the functions +.BR warn() \|, +.BR fwarn() \|, +.BR snwarn() \|, +.BR warnp() \|, +.B fwarnp() +and +.B snwarnp() +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I warn_output_allowed +is false these functions will not print anything. +.sp +When +.I msg_warn_silent +is true these functions will be silenced if +.I verbosity_level +<= 0. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +.PP +These functions return void. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.BR "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.BR "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +For an example proper please refer to +.BR dbg (3). +.SH SEE ALSO +.BR dbg (3), +.BR msg (3), +.BR printf_usage (3), +.BR werr (3), +.BR err (3), +.BR warn_or_err (3), +.BR printf (3) +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/snwerr.3 b/dbg/man/man3/snwerr.3 deleted file mode 120000 index d381538c9..000000000 --- a/dbg/man/man3/snwerr.3 +++ /dev/null @@ -1 +0,0 @@ -werr.3 \ No newline at end of file diff --git a/dbg/man/man3/snwerr.3 b/dbg/man/man3/snwerr.3 new file mode 100644 index 000000000..2f04f5ecb --- /dev/null +++ b/dbg/man/man3/snwerr.3 @@ -0,0 +1,223 @@ +.\" section 3 man page for dbg +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH werr 3 "30 January 2023" "werr" +.SH NAME +.BR werr() \|, +.BR vwerr() \|, +.BR fwerr() \|, +.BR vfwerr() \|, +.BR snwerr() \|, +.BR vsnwerr() \|, +.BR werrp() \|, +.BR vwerrp() \|, +.BR fwerrp() \|, +.BR vfwerrp() \|, +.BR snwerrp() \|, +.BR vsnwerrp() +\- non-fatal error messages facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern bool err_output_allowed; /* false ==> disable error messages */" +.sp +.B "void werr(int error_code, const char *name, const char *fmt, ...);" +.br +.B "void vwerr(int error_code, char const *name, char const *fmt, va_list ap);" +.br +.B "void fwerr(int error_code, FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwerr(int error_code, FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwerr(int error_code, char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwerr(int error_code, char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.sp +.B "void werrp(int error_code, const char *name, const char *fmt, ...);" +.br +.B "void vwerrp(int error_code, char const *name, char const *fmt, va_list ap);" +.br +.B "void fwerrp(int error_code, FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwerrp(int error_code, FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwerrp(int error_code, char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwerrp(int error_code, char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.SH DESCRIPTION +These functions provide a way to write non-fatal error messages to a stream such as +.BR stderr . +.SS Errno versions +.PP +The functions +.BR werrp() , +.B fwerrp() +and +.B vsnwerrp() +write a message according to the value of +.BR errno , +making sure to restore the +.B errno +value in the case the function returns. +.SS Alternative output FILE * stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.BR fwerr() +and +.BR vfwerrp() +can write to an alternative +.B FILE * +stream. +.SS Writing to a char * buffer +The functions +.BR snwerr() +and +.BR snwerrp() +write a message to a buffer of a fixed size. +They do not write a newline after the message but the string is NUL terminated. +They do not do anything if passed a NULL pointer or +.I size +<= 1. +.SS Variadic versions +.PP +The functions +.BR vwerr() \|, +.BR vfwerr() \|, +.BR vsnwerr() \|, +.BR vwerrp() \|, +.BR vfwerrp() +and +.BR vsnwerrp() +are equivalent to the functions +.BR err (3), +.BR ferr (3), +.BR errp (3), +.BR ferrp (3), +.BR werr (3), +.BR fwerr (3), +.BR snwerr (3), +.BR werrp (3), +.BR fwerrp (3) +and +.BR snwerrp (3) +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I err_output_allowed +is false these functions will not print anything. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +.PP +These functions return void. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.B "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.B "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.B "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.B "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +.PP +For an example proper please refer to +.BR dbg (3). +.SH SEE ALSO +.BR dbg (3), +.BR msg (3), +.BR printf_usage (3), +.BR warn (3), +.BR err (3), +.BR warn_or_err (3), +.BR printf (3). +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/snwerrp.3 b/dbg/man/man3/snwerrp.3 deleted file mode 120000 index d381538c9..000000000 --- a/dbg/man/man3/snwerrp.3 +++ /dev/null @@ -1 +0,0 @@ -werr.3 \ No newline at end of file diff --git a/dbg/man/man3/snwerrp.3 b/dbg/man/man3/snwerrp.3 new file mode 100644 index 000000000..2f04f5ecb --- /dev/null +++ b/dbg/man/man3/snwerrp.3 @@ -0,0 +1,223 @@ +.\" section 3 man page for dbg +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH werr 3 "30 January 2023" "werr" +.SH NAME +.BR werr() \|, +.BR vwerr() \|, +.BR fwerr() \|, +.BR vfwerr() \|, +.BR snwerr() \|, +.BR vsnwerr() \|, +.BR werrp() \|, +.BR vwerrp() \|, +.BR fwerrp() \|, +.BR vfwerrp() \|, +.BR snwerrp() \|, +.BR vsnwerrp() +\- non-fatal error messages facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern bool err_output_allowed; /* false ==> disable error messages */" +.sp +.B "void werr(int error_code, const char *name, const char *fmt, ...);" +.br +.B "void vwerr(int error_code, char const *name, char const *fmt, va_list ap);" +.br +.B "void fwerr(int error_code, FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwerr(int error_code, FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwerr(int error_code, char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwerr(int error_code, char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.sp +.B "void werrp(int error_code, const char *name, const char *fmt, ...);" +.br +.B "void vwerrp(int error_code, char const *name, char const *fmt, va_list ap);" +.br +.B "void fwerrp(int error_code, FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwerrp(int error_code, FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwerrp(int error_code, char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwerrp(int error_code, char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.SH DESCRIPTION +These functions provide a way to write non-fatal error messages to a stream such as +.BR stderr . +.SS Errno versions +.PP +The functions +.BR werrp() , +.B fwerrp() +and +.B vsnwerrp() +write a message according to the value of +.BR errno , +making sure to restore the +.B errno +value in the case the function returns. +.SS Alternative output FILE * stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.BR fwerr() +and +.BR vfwerrp() +can write to an alternative +.B FILE * +stream. +.SS Writing to a char * buffer +The functions +.BR snwerr() +and +.BR snwerrp() +write a message to a buffer of a fixed size. +They do not write a newline after the message but the string is NUL terminated. +They do not do anything if passed a NULL pointer or +.I size +<= 1. +.SS Variadic versions +.PP +The functions +.BR vwerr() \|, +.BR vfwerr() \|, +.BR vsnwerr() \|, +.BR vwerrp() \|, +.BR vfwerrp() +and +.BR vsnwerrp() +are equivalent to the functions +.BR err (3), +.BR ferr (3), +.BR errp (3), +.BR ferrp (3), +.BR werr (3), +.BR fwerr (3), +.BR snwerr (3), +.BR werrp (3), +.BR fwerrp (3) +and +.BR snwerrp (3) +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I err_output_allowed +is false these functions will not print anything. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +.PP +These functions return void. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.B "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.B "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.B "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.B "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +.PP +For an example proper please refer to +.BR dbg (3). +.SH SEE ALSO +.BR dbg (3), +.BR msg (3), +.BR printf_usage (3), +.BR warn (3), +.BR err (3), +.BR warn_or_err (3), +.BR printf (3). +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/vdbg.3 b/dbg/man/man3/vdbg.3 deleted file mode 120000 index 44a0326d1..000000000 --- a/dbg/man/man3/vdbg.3 +++ /dev/null @@ -1 +0,0 @@ -dbg.3 \ No newline at end of file diff --git a/dbg/man/man3/vdbg.3 b/dbg/man/man3/vdbg.3 new file mode 100644 index 000000000..892c4f827 --- /dev/null +++ b/dbg/man/man3/vdbg.3 @@ -0,0 +1,336 @@ +.\" section 3 man page for dbg +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH dbg 3 "05 August 2023" "dbg" +.SH NAME +.BR dbg() \|, +.BR vdbg() \|, +.BR fdbg() \|, +.BR vfdbg() \|, +.BR sndbg() \|, +.BR vsndbg() \|, +.BR parse_verbosity() +\- debug message facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern int verbosity_level; /* maximum debug level for debug messages */" +.br +.B "extern bool dbg_output_allowed; /* false ==> disable debug messages */" +.sp +.B "void dbg(int level, const char *fmt, ...);" +.br +.B "void vdbg(int level, char const *fmt, va_list ap);" +.br +.B "void fdbg(FILE *stream, int level, const char *fmt, ...);" +.br +.B "void vfdbg(FILE *stream, int level, char const *fmt, va_list ap);" +.br +.B "void sndbg(char *str, size_t size, int level, char const *fmt, ...);" +.br +.B "void vsndbg(char *str, size_t size, int level, char const *fmt, va_list ap);" +.br +.B "int parse_verbosity(char const *arg);" +.SH DESCRIPTION +These functions provide a way to write debug messages to a stream such as +.B stderr +or to a +.B char * +of a fixed size. +The messages will not be written unless the boolean +.B dbg_output_allowed +is true and the verbosity (debug) level is high enough. +To parse the verbosity level you can use the function +.BR parse_verbosity (3). +.PP +The general call semantics of the +.BR dbg (3) +functions is passing in a debug level, a format string and any format args. +The other versions are similar except that they take additional args as well, depending on the family. +See below subsections for details. +.SS Alternative output \fBFILE *\fP stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.BR fdbg() +and +.BR vfdbg() +can write to an alternative +.B FILE * +stream. +.SS Writing to a \fBchar *\fP buffer +The function +.BR sndbg() +writes a message to a buffer of a fixed size. +It does not write a newline after the message but the string is NUL terminated. +It does not do anything if passed a NULL pointer or +.I size +<=\ 1. +.SS Variadic versions +.PP +The functions +.BR vdbg() \|, +.BR vfdbg() +and +.BR vsndbg() +are equivalent to the functions +.BR dbg() \|, +.BR fdbg() +and +.BR sndbg() +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I dbg_output_allowed +is false these functions will not print anything. +If +.I level +> +.I verbosity_level +these functions will not print anything. +.SS Parsing verbosity level +We provide a function +.BR parse_verbosity (3) +to let you easily parse the verbosity level in your programs. +The function returns an +.BR int , +which you can assign to the variable +.BR verbosity_level , +and takes +.BR arg , +the option argument to the option you choose for verbosity. +.PP +The return from +.BR parse_verbosity (3) +should be checked for values < 0 +as they indicate that some form of error occurred +while parsing the verbosity level argument. +.PP +If +.B arg +is +.BR NULL , +or a negative number, or otherwise cannot be converted as +an integer, then +.B DBG_INVALID +(a value < 0) is returned. +.PP +A common command line convention is t use +.B \-v +as the verbosity option. +You may choose whichever you wish as +.BR parse_verbosity (3) +does not depend the for of the command line, +or even of the command line is used to +specify the verbosity in the first place. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +These functions return void. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.B "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.B "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +.SS Program source +.RS 4 +.nf +$ cat dbg_example.c +/* + * This is just a trivial demo for the dbg api, see the main function in dbg.c + * for a better example. + */ + +#include "dbg.h" + +#define filename "foo.bar" + +long length = 7; + +int +main(void) +{ + + /* + * We suggest you use getopt(3) and the parse_verbosity(3) function to + * convert \-v verbosity_level on the command line like: + * + * verbosity_level = parse_verbosity(optarg); + * if (verbosity_level < 0) { + * ... report a -v optarg parsing error ... + * } + */ + msg("NOTE: Setting verbosity_level to DBG_MED: %d", DBG_MED); + verbosity_level = DBG_MED; /* DBG_MED == (3) */ + + /* + * This will print: + * + * Warning: main: elephant is sky\-blue pink + * + * with newlines as described. + */ + msg("NOTE: The next line should say: \e"Warning: %s: %s", __func__, "elephant is sky\-blue pink\e""); + warn(__func__, "elephant is sky\-blue pink\n"); + + /* this will not print anything as verbosity_level 3 (DBG_MED) < 5 (DBG_HIGH): */ + dbg(DBG_HIGH, "starting critical section"); + + /* + * Because verbosity_level == 3 (DBG_MED) and filename is "foo.bar" and + * length == 7 this will print (with newlines added as described): + * + * debug[3]: file: foo.bar has length: 7 + */ + msg("NOTE: The next line should read: \e"debug[3]: file: %s has length: %ld\e"", filename, length); + dbg(DBG_MED, "file: %s has length: %ld\n", filename, length); + + /* + * If EPERM == 1 then this will print: + * + * ERROR[2]: main: test: errno[1]: Operation not permitted + * + * with newlines as discussed and then exit 2. + */ + errno = EPERM; + msg("NOTE: The next line should read: \\"ERROR[2]: main: test: errno[%d]: %s\\"", errno, strerror(errno)); + errp(2, __func__, "test"); + not_reached(); + + return 2; /* this return is never reached */ +} +.fi +.RE +.SS Compiling and running the example +.PP +To compile: +.RS 4 +.nf +.RB "$ " "cc \-c dbg.c" +.RB "$ " "cc \-o dbg_example dbg_example.c dbg.o" +.sp +.B # The above two commands could be shortened to just: +.RB "$ " "cc \-o dbg_example dbg_example.c dbg.c" +.fi +.RE +.sp +.PP +To run: +.RS 4 +.nf +.RB "$ " "./dbg_example" +NOTE: Setting verbosity_level to DBG_MED: 3 +NOTE: The next line should say: "Warning: main: elephant is sky\-blue pink" +Warning: main: elephant is sky\-blue pink + +NOTE: The next line should read: "debug[3]: file: foo.bar has length: 7" +debug[3]: file: foo.bar has length: 7 + +NOTE: The next line should read: "ERROR[2]: main: test: errno[1]: Operation not permitted" +ERROR[2]: main: test: errno[1]: Operation not permitted +$ echo $? +2 +.fi +.RE +.SH SEE ALSO +.BR msg (3), +.BR printf_usage (3), +.BR warn (3), +.BR werr (3), +.BR err (3), +.BR warn_or_err (3), +.BR printf (3) +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/verr.3 b/dbg/man/man3/verr.3 deleted file mode 120000 index b87272d91..000000000 --- a/dbg/man/man3/verr.3 +++ /dev/null @@ -1 +0,0 @@ -err.3 \ No newline at end of file diff --git a/dbg/man/man3/verr.3 b/dbg/man/man3/verr.3 new file mode 100644 index 000000000..48ee499ea --- /dev/null +++ b/dbg/man/man3/verr.3 @@ -0,0 +1,205 @@ +.\" section 3 man page for dbg +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH err 3 "30 January 2023" "err" +.SH NAME +.BR err() \|, +.BR verr() \|, +.BR ferr() \|, +.BR vferr() \|, +.BR errp() \|, +.BR verrp() \|, +.BR ferrp() \|, +.BR vferrp() +\- fatal error message facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern bool err_output_allowed; /* false ==> disable error messages */" +.sp +.B "void err(int exitcode, const char *name, const char *fmt, ...);" +.br +.B "void verr(int exitcode, char const *name, char const *fmt, va_list ap);" +.br +.B "void ferr(int exitcode, FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vferr(int exitcode, FILE *stream, char const *name, char const *fmt, va_list ap);" +.sp +.B "void errp(int exitcode, const char *name, const char *fmt, ...);" +.br +.B "void verrp(int exitcode, char const *name, char const *fmt, va_list ap);" +.br +.B "void ferrp(int exitcode, FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vferrp(int exitcode, FILE *stream, char const *name, char const *fmt, va_list ap);" +.SH DESCRIPTION +These functions provide a way to write fatal error messages to a stream such as +.BR stderr . +.SS Errno versions +.PP +The functions +.B errp() +and +.B ferrp() +write a message according to the value of +.BR errno , +making sure to restore the +.B errno +value in the case the function returns. +.SS Alternative output FILE * stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.BR ferr() \|, +.BR vferr() \|, +.BR ferrp() +and +.BR vferrp() +can write to an alternative +.B FILE * +stream. +.SS Variadic versions +.PP +The functions +.BR verr() \|, +.BR vferr() \|, +.BR verrp() +and +.BR vferrp() +are equivalent to the functions +.BR err() \|, +.BR ferr() \|, +.BR errp() +and +.BR ferrp() +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I err_output_allowed +is false the +.B err() +functions will not print anything. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +.PP +These functions do not return at all. +More specifically they do call +.BR exit (3) +with the appropriate exit code but immediately after call either +.B __builtin_unreachable +or +.BR abort (3) +depending on the value of +.BR __has_builtin(__builtin_unreachable) , +thereby terminating the program. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.B "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.B "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +.PP +For an example proper please refer to +.BR dbg (3). +.SH SEE ALSO +.BR dbg (3), +.BR msg (3), +.BR printf_usage (3), +.BR warn (3), +.BR werr (3), +.BR warn_or_err (3), +.BR printf (3) +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/verrp.3 b/dbg/man/man3/verrp.3 deleted file mode 120000 index b87272d91..000000000 --- a/dbg/man/man3/verrp.3 +++ /dev/null @@ -1 +0,0 @@ -err.3 \ No newline at end of file diff --git a/dbg/man/man3/verrp.3 b/dbg/man/man3/verrp.3 new file mode 100644 index 000000000..48ee499ea --- /dev/null +++ b/dbg/man/man3/verrp.3 @@ -0,0 +1,205 @@ +.\" section 3 man page for dbg +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH err 3 "30 January 2023" "err" +.SH NAME +.BR err() \|, +.BR verr() \|, +.BR ferr() \|, +.BR vferr() \|, +.BR errp() \|, +.BR verrp() \|, +.BR ferrp() \|, +.BR vferrp() +\- fatal error message facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern bool err_output_allowed; /* false ==> disable error messages */" +.sp +.B "void err(int exitcode, const char *name, const char *fmt, ...);" +.br +.B "void verr(int exitcode, char const *name, char const *fmt, va_list ap);" +.br +.B "void ferr(int exitcode, FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vferr(int exitcode, FILE *stream, char const *name, char const *fmt, va_list ap);" +.sp +.B "void errp(int exitcode, const char *name, const char *fmt, ...);" +.br +.B "void verrp(int exitcode, char const *name, char const *fmt, va_list ap);" +.br +.B "void ferrp(int exitcode, FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vferrp(int exitcode, FILE *stream, char const *name, char const *fmt, va_list ap);" +.SH DESCRIPTION +These functions provide a way to write fatal error messages to a stream such as +.BR stderr . +.SS Errno versions +.PP +The functions +.B errp() +and +.B ferrp() +write a message according to the value of +.BR errno , +making sure to restore the +.B errno +value in the case the function returns. +.SS Alternative output FILE * stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.BR ferr() \|, +.BR vferr() \|, +.BR ferrp() +and +.BR vferrp() +can write to an alternative +.B FILE * +stream. +.SS Variadic versions +.PP +The functions +.BR verr() \|, +.BR vferr() \|, +.BR verrp() +and +.BR vferrp() +are equivalent to the functions +.BR err() \|, +.BR ferr() \|, +.BR errp() +and +.BR ferrp() +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I err_output_allowed +is false the +.B err() +functions will not print anything. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +.PP +These functions do not return at all. +More specifically they do call +.BR exit (3) +with the appropriate exit code but immediately after call either +.B __builtin_unreachable +or +.BR abort (3) +depending on the value of +.BR __has_builtin(__builtin_unreachable) , +thereby terminating the program. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.B "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.B "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +.PP +For an example proper please refer to +.BR dbg (3). +.SH SEE ALSO +.BR dbg (3), +.BR msg (3), +.BR printf_usage (3), +.BR warn (3), +.BR werr (3), +.BR warn_or_err (3), +.BR printf (3) +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/vfdbg.3 b/dbg/man/man3/vfdbg.3 deleted file mode 120000 index 44a0326d1..000000000 --- a/dbg/man/man3/vfdbg.3 +++ /dev/null @@ -1 +0,0 @@ -dbg.3 \ No newline at end of file diff --git a/dbg/man/man3/vfdbg.3 b/dbg/man/man3/vfdbg.3 new file mode 100644 index 000000000..892c4f827 --- /dev/null +++ b/dbg/man/man3/vfdbg.3 @@ -0,0 +1,336 @@ +.\" section 3 man page for dbg +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH dbg 3 "05 August 2023" "dbg" +.SH NAME +.BR dbg() \|, +.BR vdbg() \|, +.BR fdbg() \|, +.BR vfdbg() \|, +.BR sndbg() \|, +.BR vsndbg() \|, +.BR parse_verbosity() +\- debug message facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern int verbosity_level; /* maximum debug level for debug messages */" +.br +.B "extern bool dbg_output_allowed; /* false ==> disable debug messages */" +.sp +.B "void dbg(int level, const char *fmt, ...);" +.br +.B "void vdbg(int level, char const *fmt, va_list ap);" +.br +.B "void fdbg(FILE *stream, int level, const char *fmt, ...);" +.br +.B "void vfdbg(FILE *stream, int level, char const *fmt, va_list ap);" +.br +.B "void sndbg(char *str, size_t size, int level, char const *fmt, ...);" +.br +.B "void vsndbg(char *str, size_t size, int level, char const *fmt, va_list ap);" +.br +.B "int parse_verbosity(char const *arg);" +.SH DESCRIPTION +These functions provide a way to write debug messages to a stream such as +.B stderr +or to a +.B char * +of a fixed size. +The messages will not be written unless the boolean +.B dbg_output_allowed +is true and the verbosity (debug) level is high enough. +To parse the verbosity level you can use the function +.BR parse_verbosity (3). +.PP +The general call semantics of the +.BR dbg (3) +functions is passing in a debug level, a format string and any format args. +The other versions are similar except that they take additional args as well, depending on the family. +See below subsections for details. +.SS Alternative output \fBFILE *\fP stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.BR fdbg() +and +.BR vfdbg() +can write to an alternative +.B FILE * +stream. +.SS Writing to a \fBchar *\fP buffer +The function +.BR sndbg() +writes a message to a buffer of a fixed size. +It does not write a newline after the message but the string is NUL terminated. +It does not do anything if passed a NULL pointer or +.I size +<=\ 1. +.SS Variadic versions +.PP +The functions +.BR vdbg() \|, +.BR vfdbg() +and +.BR vsndbg() +are equivalent to the functions +.BR dbg() \|, +.BR fdbg() +and +.BR sndbg() +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I dbg_output_allowed +is false these functions will not print anything. +If +.I level +> +.I verbosity_level +these functions will not print anything. +.SS Parsing verbosity level +We provide a function +.BR parse_verbosity (3) +to let you easily parse the verbosity level in your programs. +The function returns an +.BR int , +which you can assign to the variable +.BR verbosity_level , +and takes +.BR arg , +the option argument to the option you choose for verbosity. +.PP +The return from +.BR parse_verbosity (3) +should be checked for values < 0 +as they indicate that some form of error occurred +while parsing the verbosity level argument. +.PP +If +.B arg +is +.BR NULL , +or a negative number, or otherwise cannot be converted as +an integer, then +.B DBG_INVALID +(a value < 0) is returned. +.PP +A common command line convention is t use +.B \-v +as the verbosity option. +You may choose whichever you wish as +.BR parse_verbosity (3) +does not depend the for of the command line, +or even of the command line is used to +specify the verbosity in the first place. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +These functions return void. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.B "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.B "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +.SS Program source +.RS 4 +.nf +$ cat dbg_example.c +/* + * This is just a trivial demo for the dbg api, see the main function in dbg.c + * for a better example. + */ + +#include "dbg.h" + +#define filename "foo.bar" + +long length = 7; + +int +main(void) +{ + + /* + * We suggest you use getopt(3) and the parse_verbosity(3) function to + * convert \-v verbosity_level on the command line like: + * + * verbosity_level = parse_verbosity(optarg); + * if (verbosity_level < 0) { + * ... report a -v optarg parsing error ... + * } + */ + msg("NOTE: Setting verbosity_level to DBG_MED: %d", DBG_MED); + verbosity_level = DBG_MED; /* DBG_MED == (3) */ + + /* + * This will print: + * + * Warning: main: elephant is sky\-blue pink + * + * with newlines as described. + */ + msg("NOTE: The next line should say: \e"Warning: %s: %s", __func__, "elephant is sky\-blue pink\e""); + warn(__func__, "elephant is sky\-blue pink\n"); + + /* this will not print anything as verbosity_level 3 (DBG_MED) < 5 (DBG_HIGH): */ + dbg(DBG_HIGH, "starting critical section"); + + /* + * Because verbosity_level == 3 (DBG_MED) and filename is "foo.bar" and + * length == 7 this will print (with newlines added as described): + * + * debug[3]: file: foo.bar has length: 7 + */ + msg("NOTE: The next line should read: \e"debug[3]: file: %s has length: %ld\e"", filename, length); + dbg(DBG_MED, "file: %s has length: %ld\n", filename, length); + + /* + * If EPERM == 1 then this will print: + * + * ERROR[2]: main: test: errno[1]: Operation not permitted + * + * with newlines as discussed and then exit 2. + */ + errno = EPERM; + msg("NOTE: The next line should read: \\"ERROR[2]: main: test: errno[%d]: %s\\"", errno, strerror(errno)); + errp(2, __func__, "test"); + not_reached(); + + return 2; /* this return is never reached */ +} +.fi +.RE +.SS Compiling and running the example +.PP +To compile: +.RS 4 +.nf +.RB "$ " "cc \-c dbg.c" +.RB "$ " "cc \-o dbg_example dbg_example.c dbg.o" +.sp +.B # The above two commands could be shortened to just: +.RB "$ " "cc \-o dbg_example dbg_example.c dbg.c" +.fi +.RE +.sp +.PP +To run: +.RS 4 +.nf +.RB "$ " "./dbg_example" +NOTE: Setting verbosity_level to DBG_MED: 3 +NOTE: The next line should say: "Warning: main: elephant is sky\-blue pink" +Warning: main: elephant is sky\-blue pink + +NOTE: The next line should read: "debug[3]: file: foo.bar has length: 7" +debug[3]: file: foo.bar has length: 7 + +NOTE: The next line should read: "ERROR[2]: main: test: errno[1]: Operation not permitted" +ERROR[2]: main: test: errno[1]: Operation not permitted +$ echo $? +2 +.fi +.RE +.SH SEE ALSO +.BR msg (3), +.BR printf_usage (3), +.BR warn (3), +.BR werr (3), +.BR err (3), +.BR warn_or_err (3), +.BR printf (3) +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/vferr.3 b/dbg/man/man3/vferr.3 deleted file mode 120000 index b87272d91..000000000 --- a/dbg/man/man3/vferr.3 +++ /dev/null @@ -1 +0,0 @@ -err.3 \ No newline at end of file diff --git a/dbg/man/man3/vferr.3 b/dbg/man/man3/vferr.3 new file mode 100644 index 000000000..48ee499ea --- /dev/null +++ b/dbg/man/man3/vferr.3 @@ -0,0 +1,205 @@ +.\" section 3 man page for dbg +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH err 3 "30 January 2023" "err" +.SH NAME +.BR err() \|, +.BR verr() \|, +.BR ferr() \|, +.BR vferr() \|, +.BR errp() \|, +.BR verrp() \|, +.BR ferrp() \|, +.BR vferrp() +\- fatal error message facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern bool err_output_allowed; /* false ==> disable error messages */" +.sp +.B "void err(int exitcode, const char *name, const char *fmt, ...);" +.br +.B "void verr(int exitcode, char const *name, char const *fmt, va_list ap);" +.br +.B "void ferr(int exitcode, FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vferr(int exitcode, FILE *stream, char const *name, char const *fmt, va_list ap);" +.sp +.B "void errp(int exitcode, const char *name, const char *fmt, ...);" +.br +.B "void verrp(int exitcode, char const *name, char const *fmt, va_list ap);" +.br +.B "void ferrp(int exitcode, FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vferrp(int exitcode, FILE *stream, char const *name, char const *fmt, va_list ap);" +.SH DESCRIPTION +These functions provide a way to write fatal error messages to a stream such as +.BR stderr . +.SS Errno versions +.PP +The functions +.B errp() +and +.B ferrp() +write a message according to the value of +.BR errno , +making sure to restore the +.B errno +value in the case the function returns. +.SS Alternative output FILE * stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.BR ferr() \|, +.BR vferr() \|, +.BR ferrp() +and +.BR vferrp() +can write to an alternative +.B FILE * +stream. +.SS Variadic versions +.PP +The functions +.BR verr() \|, +.BR vferr() \|, +.BR verrp() +and +.BR vferrp() +are equivalent to the functions +.BR err() \|, +.BR ferr() \|, +.BR errp() +and +.BR ferrp() +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I err_output_allowed +is false the +.B err() +functions will not print anything. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +.PP +These functions do not return at all. +More specifically they do call +.BR exit (3) +with the appropriate exit code but immediately after call either +.B __builtin_unreachable +or +.BR abort (3) +depending on the value of +.BR __has_builtin(__builtin_unreachable) , +thereby terminating the program. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.B "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.B "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +.PP +For an example proper please refer to +.BR dbg (3). +.SH SEE ALSO +.BR dbg (3), +.BR msg (3), +.BR printf_usage (3), +.BR warn (3), +.BR werr (3), +.BR warn_or_err (3), +.BR printf (3) +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/vferrp.3 b/dbg/man/man3/vferrp.3 deleted file mode 120000 index b87272d91..000000000 --- a/dbg/man/man3/vferrp.3 +++ /dev/null @@ -1 +0,0 @@ -err.3 \ No newline at end of file diff --git a/dbg/man/man3/vferrp.3 b/dbg/man/man3/vferrp.3 new file mode 100644 index 000000000..48ee499ea --- /dev/null +++ b/dbg/man/man3/vferrp.3 @@ -0,0 +1,205 @@ +.\" section 3 man page for dbg +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH err 3 "30 January 2023" "err" +.SH NAME +.BR err() \|, +.BR verr() \|, +.BR ferr() \|, +.BR vferr() \|, +.BR errp() \|, +.BR verrp() \|, +.BR ferrp() \|, +.BR vferrp() +\- fatal error message facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern bool err_output_allowed; /* false ==> disable error messages */" +.sp +.B "void err(int exitcode, const char *name, const char *fmt, ...);" +.br +.B "void verr(int exitcode, char const *name, char const *fmt, va_list ap);" +.br +.B "void ferr(int exitcode, FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vferr(int exitcode, FILE *stream, char const *name, char const *fmt, va_list ap);" +.sp +.B "void errp(int exitcode, const char *name, const char *fmt, ...);" +.br +.B "void verrp(int exitcode, char const *name, char const *fmt, va_list ap);" +.br +.B "void ferrp(int exitcode, FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vferrp(int exitcode, FILE *stream, char const *name, char const *fmt, va_list ap);" +.SH DESCRIPTION +These functions provide a way to write fatal error messages to a stream such as +.BR stderr . +.SS Errno versions +.PP +The functions +.B errp() +and +.B ferrp() +write a message according to the value of +.BR errno , +making sure to restore the +.B errno +value in the case the function returns. +.SS Alternative output FILE * stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.BR ferr() \|, +.BR vferr() \|, +.BR ferrp() +and +.BR vferrp() +can write to an alternative +.B FILE * +stream. +.SS Variadic versions +.PP +The functions +.BR verr() \|, +.BR vferr() \|, +.BR verrp() +and +.BR vferrp() +are equivalent to the functions +.BR err() \|, +.BR ferr() \|, +.BR errp() +and +.BR ferrp() +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I err_output_allowed +is false the +.B err() +functions will not print anything. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +.PP +These functions do not return at all. +More specifically they do call +.BR exit (3) +with the appropriate exit code but immediately after call either +.B __builtin_unreachable +or +.BR abort (3) +depending on the value of +.BR __has_builtin(__builtin_unreachable) , +thereby terminating the program. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.B "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.B "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +.PP +For an example proper please refer to +.BR dbg (3). +.SH SEE ALSO +.BR dbg (3), +.BR msg (3), +.BR printf_usage (3), +.BR warn (3), +.BR werr (3), +.BR warn_or_err (3), +.BR printf (3) +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/vfmsg.3 b/dbg/man/man3/vfmsg.3 deleted file mode 120000 index 00912eceb..000000000 --- a/dbg/man/man3/vfmsg.3 +++ /dev/null @@ -1 +0,0 @@ -msg.3 \ No newline at end of file diff --git a/dbg/man/man3/vfmsg.3 b/dbg/man/man3/vfmsg.3 new file mode 100644 index 000000000..362484c0a --- /dev/null +++ b/dbg/man/man3/vfmsg.3 @@ -0,0 +1,196 @@ +.\" section 3 man page for msg +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH msg 3 "30 January 2023" "msg" +.SH NAME +.BR msg() \|, +.BR vmsg() \|, +.BR fmsg() \|, +.BR vfmsg() \|, +.BR snmsg() \|, +.BR vsnmsg() +\- info message facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern int verbosity_level; /* maximum debug level for debug messages */" +.br +.B "extern bool msg_output_allowed; /* false ==> disable informational messages */" +.br +.B "extern bool msg_warn_silent; /* true ==> silence info & warnings if verbosity_level <= 0 */" +.sp +.B "void msg(const char *fmt, ...);" +.br +.B "void vmsg(char const *fmt, va_list ap);" +.br +.B "void fmsg(FILE *stream, const char *fmt, ...);" +.br +.B "void vfmsg(FILE *stream, char const *fmt, va_list ap);" +.br +.B "void snmsg(char *str, size_t size, char const *fmt, ...);" +.br +.B "void vsnmsg(char *str, size_t size, char const *fmt, va_list ap);" +.SH DESCRIPTION +These functions provide a way to write informative messages to a stream such as +.B stderr +or to a +.B char * +of a fixed size. +.SS Alternative output FILE * stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.B fmsg() +and +.B vfmsg() +can write to an alternative +.B FILE * +stream. +.SS Writing to a char * buffer +The functions +.B snmsg() +and +.B vsnmsg() +write a message to a buffer of a fixed size. +They do not write a newline after the message but the string is NUL terminated. +They will not do anything if passed a NULL pointer or +.IR size +<=\ 1. +.SS Variadic versions +.PP +The functions +.BR vmsg(), +.BR vfmsg() +and +.BR vsnmsg() +are equivalent to the functions +.BR msg(), +.BR fmsg() +and +.BR snmsg() +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I msg_output_allowed +is false these functions will not print anything. +.sp +When +.I msg_warn_silent +is true these functions will be silenced if +.IR verbosity_level +<= 0. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +.PP +These functions return void. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.B "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.B "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +.PP +For an example proper please refer to +.BR dbg (3). +.SH SEE ALSO +.BR dbg (3), +.BR printf_usage (3), +.BR warn (3), +.BR werr (3), +.BR err (3), +.BR warn_or_err (3), +.BR printf (3) +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/vfprintf_usage.3 b/dbg/man/man3/vfprintf_usage.3 deleted file mode 120000 index 3b54a4341..000000000 --- a/dbg/man/man3/vfprintf_usage.3 +++ /dev/null @@ -1 +0,0 @@ -printf_usage.3 \ No newline at end of file diff --git a/dbg/man/man3/vfprintf_usage.3 b/dbg/man/man3/vfprintf_usage.3 new file mode 100644 index 000000000..71b958070 --- /dev/null +++ b/dbg/man/man3/vfprintf_usage.3 @@ -0,0 +1,154 @@ +.\" section 3 man page for printf_usage +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH printf_usage 3 "30 January 2023" "printf_usage" +.SH NAME +.BR printf_usage() \|, +.BR vprintf_usage() \|, +.BR fprintf_usage() \|, +.BR vfprintf_usage() +\- usage message facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern bool usage_output_allowed; /* false ==> disable usage messages */" +.br +.B "void printf_usage(int exitcode, const char *fmt, ...) __attribute__((format(printf, 2, 3))); /* 2=format 3=params */" +.br +.B "void vprintf_usage(int exitcode, char const *fmt, va_list ap);" +.br +.BI "void fprintf_usage(int exitcode, FILE *stream, const char *fmt, ...) __attribute__((format(printf, 3, 4))); /* 3=format 4=params */" +.br +.B "void vfprintf_usage(int exitcode, FILE *stream, char const *fmt, va_list ap);" +.SH DESCRIPTION +These functions provide a way to write a usage message to a stream such as +.BR stderr . +.SS Variadic versions +.PP +The functions +.B vprintf_usage() +and +.B vfprintf_usage() +are equivalent to the functions +.B printf_usage() +and +.B fprintf_usage() +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I usage_output_allowed +is false these functions will not print anything. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +.PP +These functions return void except that the functions will call +.BR exit (3) +with the exit code provided to the function if +.I exitcode +is >= 0. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.B "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.B "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +For an example proper please refer to +.BR dbg (3). +.SH SEE ALSO +.BR dbg (3), +.BR msg (3), +.BR warn (3), +.BR werr (3), +.BR err (3), +.BR warn_or_err (3), +.BR printf (3) +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/vfwarn.3 b/dbg/man/man3/vfwarn.3 deleted file mode 120000 index d70a2beca..000000000 --- a/dbg/man/man3/vfwarn.3 +++ /dev/null @@ -1 +0,0 @@ -warn.3 \ No newline at end of file diff --git a/dbg/man/man3/vfwarn.3 b/dbg/man/man3/vfwarn.3 new file mode 100644 index 000000000..beece7a00 --- /dev/null +++ b/dbg/man/man3/vfwarn.3 @@ -0,0 +1,234 @@ +.\" section 3 man page for warn +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH warn 3 "30 January 2023" "warn" +.SH NAME +.BR warn() \|, +.BR vwarn() \|, +.BR fwarn() \|, +.BR vfwarn() \|, +.BR snwarn() \|, +.BR vsnwarn() \|, +.BR warnp() \|, +.BR vwarnp() \|, +.BR fwarnp() \|, +.BR vfwarnp() \|, +.BR snwarnp() \|, +.BR vsnwarnp() +\- warning message facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern int verbosity_level; /* maximum debug level for debug messages */" +.br +.B "extern bool warn_output_allowed; /* false ==> disable warning messages */" +.br +.B "extern bool msg_warn_silent; /* true ==> silence info & warnings if verbosity_level <= 0 */" +.sp +.B "void warn(const char *name, const char *fmt, ...);" +.br +.B "void vwarn(char const *name, char const *fmt, va_list ap);" +.br +.B "void fwarn(FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwarn(FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwarn(char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwarn(char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.sp +.B "void warnp(const char *name, const char *fmt, ...);" +.br +.B "void vwarnp(char const *name, char const *fmt, va_list ap);" +.br +.B "void fwarnp(FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwarnp(FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwarnp(char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwarnp(char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.SH DESCRIPTION +These functions provide a way to write warning messages to a stream such as +.B stderr +or to a +.B char * +of a fixed size. +.SS Errno versions +.PP +The functions +.BR warnp() , +.BR fwarnp() , +.B vfwarnp() +and +.B vsnwarnp() +write a message according to the value of +.BR errno , + making sure to restore the +.B errno +value in the case the function returns. +.SS Alternative output FILE * stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.BR fwarn() \|, +.BR vfwarn() \|, +.BR fwarnp() +and +.BR vfwarnp() +can write to an alternative +.B FILE * +stream. +.SS Writing to a char * buffer +The functions +.BR snwarn() +and +.BR snwarnp() +write a message to a buffer of a fixed size. +They do not write a newline after the message but the string is NUL terminated. +They do not do anything if passed a NULL pointer or +.I size +<= 1. +.SS Variadic versions +.PP +The functions +.BR vwarn() \|, +.BR vfwarn() \|, +.BR vsnwarn() \|, +.BR vwarnp() \|, +.BR vfwarnp() +and +.BR vsnwarnp() +are equivalent to the functions +.BR warn() \|, +.BR fwarn() \|, +.BR snwarn() \|, +.BR warnp() \|, +.B fwarnp() +and +.B snwarnp() +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I warn_output_allowed +is false these functions will not print anything. +.sp +When +.I msg_warn_silent +is true these functions will be silenced if +.I verbosity_level +<= 0. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +.PP +These functions return void. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.BR "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.BR "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +For an example proper please refer to +.BR dbg (3). +.SH SEE ALSO +.BR dbg (3), +.BR msg (3), +.BR printf_usage (3), +.BR werr (3), +.BR err (3), +.BR warn_or_err (3), +.BR printf (3) +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/vfwarn_or_err.3 b/dbg/man/man3/vfwarn_or_err.3 deleted file mode 120000 index 9123b756a..000000000 --- a/dbg/man/man3/vfwarn_or_err.3 +++ /dev/null @@ -1 +0,0 @@ -warn_or_err.3 \ No newline at end of file diff --git a/dbg/man/man3/vfwarn_or_err.3 b/dbg/man/man3/vfwarn_or_err.3 new file mode 100644 index 000000000..eaa70ae0a --- /dev/null +++ b/dbg/man/man3/vfwarn_or_err.3 @@ -0,0 +1,200 @@ +.\" section 3 man page for warn_or_err +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH warn_or_err 3 "29 January 2023" "warn_or_err" +.SH NAME +.BR warn_or_err() \|, +.BR vwarn_or_err() \|, +.BR fwarn_or_err() \|, +.BR vfwarn_or_err() \|, +.BR warnp_or_errp() \|, +.BR vwarnp_or_errp() \|, +.BR fwarnp_or_errp() \|, +.B vfwarnp_or_errp() +\- show either a warning message or a fatal error message +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern int verbosity_level; /* maximum debug level for debug messages */" +.br +.B "extern bool warn_output_allowed; /* false ==> disable warning messages */" +.br +.B "extern bool err_output_allowed; /* false ==> disable error messages */" +.br +.B "extern bool msg_warn_silent; /* true ==> silence info & warnings if verbosity_level <= 0 */" +.sp +.B "void warn_or_err(int exitcode, const char *name, bool warning, const char *fmt, ...);" +.br +.B "void vwarn_or_err(int exitcode, const char *name, bool warning, const char *fmt, va_list ap); +.br +.B "void fwarn_or_err(int exitcode, FILE *stream, const char *name, bool warning, const char *fmt, ...);" +.br +.B "void vfwarn_or_err(int exitcode, FILE *stream, const char *name, bool warning, const char *fmt, va_list ap);" +.SH DESCRIPTION +These functions provide a way to write either a warning message or a fatal error message (prior to aborting) to a stream such as +.BR stderr . +.SS Alternative output FILE * stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.BR fwarn_or_err() \|, +.BR vfwarn_or_err() +and +.BR fwarnp_or_errp() +can write to an alternative +.B FILE * +stream. +.SS Variadic versions +.PP +The functions +.BR vwarn_or_err() \|, +.BR vfwarn_or_err() +and +.BR vwarnp_or_errp() +are equivalent to the functions +.BR warn_or_err(), +.BR fwarn_or_err() +and +.BR warnp_or_errp() +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I warn_output_allowed +is false warning messages will not be printed. +.sp +When +.I err_output_allowed +is false error messages will not be printed. +.sp +When +.I msg_warn_silent +is true warning messages will not be printed if +.IR verbosity_level +<= 0. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +.PP +These functions do not return if +.B warning is false +in the same manner as the functions +.BR err() \|, +.BR verr() \|, +.BR ferr() \|, +.BR vferr() \|, +.BR errp() \|, +.BR verrp() \|, +.BR ferrp() \|, +and +.BR vferrp() . +Otherwise they will return void. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.B "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.B "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.BR "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +.PP +For an example proper please refer to +.BR dbg (3). +.SH SEE ALSO +.BR dbg (3), +.BR msg (3), +.BR printf_usage (3), +.BR warn (3), +.BR werr (3), +.BR err (3), +.BR printf (3). +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/vfwarnp.3 b/dbg/man/man3/vfwarnp.3 deleted file mode 120000 index d70a2beca..000000000 --- a/dbg/man/man3/vfwarnp.3 +++ /dev/null @@ -1 +0,0 @@ -warn.3 \ No newline at end of file diff --git a/dbg/man/man3/vfwarnp.3 b/dbg/man/man3/vfwarnp.3 new file mode 100644 index 000000000..beece7a00 --- /dev/null +++ b/dbg/man/man3/vfwarnp.3 @@ -0,0 +1,234 @@ +.\" section 3 man page for warn +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH warn 3 "30 January 2023" "warn" +.SH NAME +.BR warn() \|, +.BR vwarn() \|, +.BR fwarn() \|, +.BR vfwarn() \|, +.BR snwarn() \|, +.BR vsnwarn() \|, +.BR warnp() \|, +.BR vwarnp() \|, +.BR fwarnp() \|, +.BR vfwarnp() \|, +.BR snwarnp() \|, +.BR vsnwarnp() +\- warning message facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern int verbosity_level; /* maximum debug level for debug messages */" +.br +.B "extern bool warn_output_allowed; /* false ==> disable warning messages */" +.br +.B "extern bool msg_warn_silent; /* true ==> silence info & warnings if verbosity_level <= 0 */" +.sp +.B "void warn(const char *name, const char *fmt, ...);" +.br +.B "void vwarn(char const *name, char const *fmt, va_list ap);" +.br +.B "void fwarn(FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwarn(FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwarn(char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwarn(char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.sp +.B "void warnp(const char *name, const char *fmt, ...);" +.br +.B "void vwarnp(char const *name, char const *fmt, va_list ap);" +.br +.B "void fwarnp(FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwarnp(FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwarnp(char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwarnp(char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.SH DESCRIPTION +These functions provide a way to write warning messages to a stream such as +.B stderr +or to a +.B char * +of a fixed size. +.SS Errno versions +.PP +The functions +.BR warnp() , +.BR fwarnp() , +.B vfwarnp() +and +.B vsnwarnp() +write a message according to the value of +.BR errno , + making sure to restore the +.B errno +value in the case the function returns. +.SS Alternative output FILE * stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.BR fwarn() \|, +.BR vfwarn() \|, +.BR fwarnp() +and +.BR vfwarnp() +can write to an alternative +.B FILE * +stream. +.SS Writing to a char * buffer +The functions +.BR snwarn() +and +.BR snwarnp() +write a message to a buffer of a fixed size. +They do not write a newline after the message but the string is NUL terminated. +They do not do anything if passed a NULL pointer or +.I size +<= 1. +.SS Variadic versions +.PP +The functions +.BR vwarn() \|, +.BR vfwarn() \|, +.BR vsnwarn() \|, +.BR vwarnp() \|, +.BR vfwarnp() +and +.BR vsnwarnp() +are equivalent to the functions +.BR warn() \|, +.BR fwarn() \|, +.BR snwarn() \|, +.BR warnp() \|, +.B fwarnp() +and +.B snwarnp() +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I warn_output_allowed +is false these functions will not print anything. +.sp +When +.I msg_warn_silent +is true these functions will be silenced if +.I verbosity_level +<= 0. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +.PP +These functions return void. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.BR "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.BR "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +For an example proper please refer to +.BR dbg (3). +.SH SEE ALSO +.BR dbg (3), +.BR msg (3), +.BR printf_usage (3), +.BR werr (3), +.BR err (3), +.BR warn_or_err (3), +.BR printf (3) +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/vfwerr.3 b/dbg/man/man3/vfwerr.3 deleted file mode 120000 index d381538c9..000000000 --- a/dbg/man/man3/vfwerr.3 +++ /dev/null @@ -1 +0,0 @@ -werr.3 \ No newline at end of file diff --git a/dbg/man/man3/vfwerr.3 b/dbg/man/man3/vfwerr.3 new file mode 100644 index 000000000..2f04f5ecb --- /dev/null +++ b/dbg/man/man3/vfwerr.3 @@ -0,0 +1,223 @@ +.\" section 3 man page for dbg +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH werr 3 "30 January 2023" "werr" +.SH NAME +.BR werr() \|, +.BR vwerr() \|, +.BR fwerr() \|, +.BR vfwerr() \|, +.BR snwerr() \|, +.BR vsnwerr() \|, +.BR werrp() \|, +.BR vwerrp() \|, +.BR fwerrp() \|, +.BR vfwerrp() \|, +.BR snwerrp() \|, +.BR vsnwerrp() +\- non-fatal error messages facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern bool err_output_allowed; /* false ==> disable error messages */" +.sp +.B "void werr(int error_code, const char *name, const char *fmt, ...);" +.br +.B "void vwerr(int error_code, char const *name, char const *fmt, va_list ap);" +.br +.B "void fwerr(int error_code, FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwerr(int error_code, FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwerr(int error_code, char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwerr(int error_code, char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.sp +.B "void werrp(int error_code, const char *name, const char *fmt, ...);" +.br +.B "void vwerrp(int error_code, char const *name, char const *fmt, va_list ap);" +.br +.B "void fwerrp(int error_code, FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwerrp(int error_code, FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwerrp(int error_code, char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwerrp(int error_code, char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.SH DESCRIPTION +These functions provide a way to write non-fatal error messages to a stream such as +.BR stderr . +.SS Errno versions +.PP +The functions +.BR werrp() , +.B fwerrp() +and +.B vsnwerrp() +write a message according to the value of +.BR errno , +making sure to restore the +.B errno +value in the case the function returns. +.SS Alternative output FILE * stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.BR fwerr() +and +.BR vfwerrp() +can write to an alternative +.B FILE * +stream. +.SS Writing to a char * buffer +The functions +.BR snwerr() +and +.BR snwerrp() +write a message to a buffer of a fixed size. +They do not write a newline after the message but the string is NUL terminated. +They do not do anything if passed a NULL pointer or +.I size +<= 1. +.SS Variadic versions +.PP +The functions +.BR vwerr() \|, +.BR vfwerr() \|, +.BR vsnwerr() \|, +.BR vwerrp() \|, +.BR vfwerrp() +and +.BR vsnwerrp() +are equivalent to the functions +.BR err (3), +.BR ferr (3), +.BR errp (3), +.BR ferrp (3), +.BR werr (3), +.BR fwerr (3), +.BR snwerr (3), +.BR werrp (3), +.BR fwerrp (3) +and +.BR snwerrp (3) +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I err_output_allowed +is false these functions will not print anything. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +.PP +These functions return void. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.B "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.B "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.B "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.B "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +.PP +For an example proper please refer to +.BR dbg (3). +.SH SEE ALSO +.BR dbg (3), +.BR msg (3), +.BR printf_usage (3), +.BR warn (3), +.BR err (3), +.BR warn_or_err (3), +.BR printf (3). +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/vfwerrp.3 b/dbg/man/man3/vfwerrp.3 deleted file mode 120000 index d381538c9..000000000 --- a/dbg/man/man3/vfwerrp.3 +++ /dev/null @@ -1 +0,0 @@ -werr.3 \ No newline at end of file diff --git a/dbg/man/man3/vfwerrp.3 b/dbg/man/man3/vfwerrp.3 new file mode 100644 index 000000000..2f04f5ecb --- /dev/null +++ b/dbg/man/man3/vfwerrp.3 @@ -0,0 +1,223 @@ +.\" section 3 man page for dbg +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH werr 3 "30 January 2023" "werr" +.SH NAME +.BR werr() \|, +.BR vwerr() \|, +.BR fwerr() \|, +.BR vfwerr() \|, +.BR snwerr() \|, +.BR vsnwerr() \|, +.BR werrp() \|, +.BR vwerrp() \|, +.BR fwerrp() \|, +.BR vfwerrp() \|, +.BR snwerrp() \|, +.BR vsnwerrp() +\- non-fatal error messages facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern bool err_output_allowed; /* false ==> disable error messages */" +.sp +.B "void werr(int error_code, const char *name, const char *fmt, ...);" +.br +.B "void vwerr(int error_code, char const *name, char const *fmt, va_list ap);" +.br +.B "void fwerr(int error_code, FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwerr(int error_code, FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwerr(int error_code, char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwerr(int error_code, char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.sp +.B "void werrp(int error_code, const char *name, const char *fmt, ...);" +.br +.B "void vwerrp(int error_code, char const *name, char const *fmt, va_list ap);" +.br +.B "void fwerrp(int error_code, FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwerrp(int error_code, FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwerrp(int error_code, char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwerrp(int error_code, char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.SH DESCRIPTION +These functions provide a way to write non-fatal error messages to a stream such as +.BR stderr . +.SS Errno versions +.PP +The functions +.BR werrp() , +.B fwerrp() +and +.B vsnwerrp() +write a message according to the value of +.BR errno , +making sure to restore the +.B errno +value in the case the function returns. +.SS Alternative output FILE * stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.BR fwerr() +and +.BR vfwerrp() +can write to an alternative +.B FILE * +stream. +.SS Writing to a char * buffer +The functions +.BR snwerr() +and +.BR snwerrp() +write a message to a buffer of a fixed size. +They do not write a newline after the message but the string is NUL terminated. +They do not do anything if passed a NULL pointer or +.I size +<= 1. +.SS Variadic versions +.PP +The functions +.BR vwerr() \|, +.BR vfwerr() \|, +.BR vsnwerr() \|, +.BR vwerrp() \|, +.BR vfwerrp() +and +.BR vsnwerrp() +are equivalent to the functions +.BR err (3), +.BR ferr (3), +.BR errp (3), +.BR ferrp (3), +.BR werr (3), +.BR fwerr (3), +.BR snwerr (3), +.BR werrp (3), +.BR fwerrp (3) +and +.BR snwerrp (3) +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I err_output_allowed +is false these functions will not print anything. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +.PP +These functions return void. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.B "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.B "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.B "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.B "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +.PP +For an example proper please refer to +.BR dbg (3). +.SH SEE ALSO +.BR dbg (3), +.BR msg (3), +.BR printf_usage (3), +.BR warn (3), +.BR err (3), +.BR warn_or_err (3), +.BR printf (3). +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/vmsg.3 b/dbg/man/man3/vmsg.3 deleted file mode 120000 index 00912eceb..000000000 --- a/dbg/man/man3/vmsg.3 +++ /dev/null @@ -1 +0,0 @@ -msg.3 \ No newline at end of file diff --git a/dbg/man/man3/vmsg.3 b/dbg/man/man3/vmsg.3 new file mode 100644 index 000000000..362484c0a --- /dev/null +++ b/dbg/man/man3/vmsg.3 @@ -0,0 +1,196 @@ +.\" section 3 man page for msg +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH msg 3 "30 January 2023" "msg" +.SH NAME +.BR msg() \|, +.BR vmsg() \|, +.BR fmsg() \|, +.BR vfmsg() \|, +.BR snmsg() \|, +.BR vsnmsg() +\- info message facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern int verbosity_level; /* maximum debug level for debug messages */" +.br +.B "extern bool msg_output_allowed; /* false ==> disable informational messages */" +.br +.B "extern bool msg_warn_silent; /* true ==> silence info & warnings if verbosity_level <= 0 */" +.sp +.B "void msg(const char *fmt, ...);" +.br +.B "void vmsg(char const *fmt, va_list ap);" +.br +.B "void fmsg(FILE *stream, const char *fmt, ...);" +.br +.B "void vfmsg(FILE *stream, char const *fmt, va_list ap);" +.br +.B "void snmsg(char *str, size_t size, char const *fmt, ...);" +.br +.B "void vsnmsg(char *str, size_t size, char const *fmt, va_list ap);" +.SH DESCRIPTION +These functions provide a way to write informative messages to a stream such as +.B stderr +or to a +.B char * +of a fixed size. +.SS Alternative output FILE * stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.B fmsg() +and +.B vfmsg() +can write to an alternative +.B FILE * +stream. +.SS Writing to a char * buffer +The functions +.B snmsg() +and +.B vsnmsg() +write a message to a buffer of a fixed size. +They do not write a newline after the message but the string is NUL terminated. +They will not do anything if passed a NULL pointer or +.IR size +<=\ 1. +.SS Variadic versions +.PP +The functions +.BR vmsg(), +.BR vfmsg() +and +.BR vsnmsg() +are equivalent to the functions +.BR msg(), +.BR fmsg() +and +.BR snmsg() +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I msg_output_allowed +is false these functions will not print anything. +.sp +When +.I msg_warn_silent +is true these functions will be silenced if +.IR verbosity_level +<= 0. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +.PP +These functions return void. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.B "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.B "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +.PP +For an example proper please refer to +.BR dbg (3). +.SH SEE ALSO +.BR dbg (3), +.BR printf_usage (3), +.BR warn (3), +.BR werr (3), +.BR err (3), +.BR warn_or_err (3), +.BR printf (3) +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/vprintf_usage.3 b/dbg/man/man3/vprintf_usage.3 deleted file mode 120000 index 3b54a4341..000000000 --- a/dbg/man/man3/vprintf_usage.3 +++ /dev/null @@ -1 +0,0 @@ -printf_usage.3 \ No newline at end of file diff --git a/dbg/man/man3/vprintf_usage.3 b/dbg/man/man3/vprintf_usage.3 new file mode 100644 index 000000000..71b958070 --- /dev/null +++ b/dbg/man/man3/vprintf_usage.3 @@ -0,0 +1,154 @@ +.\" section 3 man page for printf_usage +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH printf_usage 3 "30 January 2023" "printf_usage" +.SH NAME +.BR printf_usage() \|, +.BR vprintf_usage() \|, +.BR fprintf_usage() \|, +.BR vfprintf_usage() +\- usage message facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern bool usage_output_allowed; /* false ==> disable usage messages */" +.br +.B "void printf_usage(int exitcode, const char *fmt, ...) __attribute__((format(printf, 2, 3))); /* 2=format 3=params */" +.br +.B "void vprintf_usage(int exitcode, char const *fmt, va_list ap);" +.br +.BI "void fprintf_usage(int exitcode, FILE *stream, const char *fmt, ...) __attribute__((format(printf, 3, 4))); /* 3=format 4=params */" +.br +.B "void vfprintf_usage(int exitcode, FILE *stream, char const *fmt, va_list ap);" +.SH DESCRIPTION +These functions provide a way to write a usage message to a stream such as +.BR stderr . +.SS Variadic versions +.PP +The functions +.B vprintf_usage() +and +.B vfprintf_usage() +are equivalent to the functions +.B printf_usage() +and +.B fprintf_usage() +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I usage_output_allowed +is false these functions will not print anything. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +.PP +These functions return void except that the functions will call +.BR exit (3) +with the exit code provided to the function if +.I exitcode +is >= 0. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.B "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.B "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +For an example proper please refer to +.BR dbg (3). +.SH SEE ALSO +.BR dbg (3), +.BR msg (3), +.BR warn (3), +.BR werr (3), +.BR err (3), +.BR warn_or_err (3), +.BR printf (3) +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/vsndbg.3 b/dbg/man/man3/vsndbg.3 deleted file mode 120000 index 44a0326d1..000000000 --- a/dbg/man/man3/vsndbg.3 +++ /dev/null @@ -1 +0,0 @@ -dbg.3 \ No newline at end of file diff --git a/dbg/man/man3/vsndbg.3 b/dbg/man/man3/vsndbg.3 new file mode 100644 index 000000000..892c4f827 --- /dev/null +++ b/dbg/man/man3/vsndbg.3 @@ -0,0 +1,336 @@ +.\" section 3 man page for dbg +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH dbg 3 "05 August 2023" "dbg" +.SH NAME +.BR dbg() \|, +.BR vdbg() \|, +.BR fdbg() \|, +.BR vfdbg() \|, +.BR sndbg() \|, +.BR vsndbg() \|, +.BR parse_verbosity() +\- debug message facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern int verbosity_level; /* maximum debug level for debug messages */" +.br +.B "extern bool dbg_output_allowed; /* false ==> disable debug messages */" +.sp +.B "void dbg(int level, const char *fmt, ...);" +.br +.B "void vdbg(int level, char const *fmt, va_list ap);" +.br +.B "void fdbg(FILE *stream, int level, const char *fmt, ...);" +.br +.B "void vfdbg(FILE *stream, int level, char const *fmt, va_list ap);" +.br +.B "void sndbg(char *str, size_t size, int level, char const *fmt, ...);" +.br +.B "void vsndbg(char *str, size_t size, int level, char const *fmt, va_list ap);" +.br +.B "int parse_verbosity(char const *arg);" +.SH DESCRIPTION +These functions provide a way to write debug messages to a stream such as +.B stderr +or to a +.B char * +of a fixed size. +The messages will not be written unless the boolean +.B dbg_output_allowed +is true and the verbosity (debug) level is high enough. +To parse the verbosity level you can use the function +.BR parse_verbosity (3). +.PP +The general call semantics of the +.BR dbg (3) +functions is passing in a debug level, a format string and any format args. +The other versions are similar except that they take additional args as well, depending on the family. +See below subsections for details. +.SS Alternative output \fBFILE *\fP stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.BR fdbg() +and +.BR vfdbg() +can write to an alternative +.B FILE * +stream. +.SS Writing to a \fBchar *\fP buffer +The function +.BR sndbg() +writes a message to a buffer of a fixed size. +It does not write a newline after the message but the string is NUL terminated. +It does not do anything if passed a NULL pointer or +.I size +<=\ 1. +.SS Variadic versions +.PP +The functions +.BR vdbg() \|, +.BR vfdbg() +and +.BR vsndbg() +are equivalent to the functions +.BR dbg() \|, +.BR fdbg() +and +.BR sndbg() +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I dbg_output_allowed +is false these functions will not print anything. +If +.I level +> +.I verbosity_level +these functions will not print anything. +.SS Parsing verbosity level +We provide a function +.BR parse_verbosity (3) +to let you easily parse the verbosity level in your programs. +The function returns an +.BR int , +which you can assign to the variable +.BR verbosity_level , +and takes +.BR arg , +the option argument to the option you choose for verbosity. +.PP +The return from +.BR parse_verbosity (3) +should be checked for values < 0 +as they indicate that some form of error occurred +while parsing the verbosity level argument. +.PP +If +.B arg +is +.BR NULL , +or a negative number, or otherwise cannot be converted as +an integer, then +.B DBG_INVALID +(a value < 0) is returned. +.PP +A common command line convention is t use +.B \-v +as the verbosity option. +You may choose whichever you wish as +.BR parse_verbosity (3) +does not depend the for of the command line, +or even of the command line is used to +specify the verbosity in the first place. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +These functions return void. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.B "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.B "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +.SS Program source +.RS 4 +.nf +$ cat dbg_example.c +/* + * This is just a trivial demo for the dbg api, see the main function in dbg.c + * for a better example. + */ + +#include "dbg.h" + +#define filename "foo.bar" + +long length = 7; + +int +main(void) +{ + + /* + * We suggest you use getopt(3) and the parse_verbosity(3) function to + * convert \-v verbosity_level on the command line like: + * + * verbosity_level = parse_verbosity(optarg); + * if (verbosity_level < 0) { + * ... report a -v optarg parsing error ... + * } + */ + msg("NOTE: Setting verbosity_level to DBG_MED: %d", DBG_MED); + verbosity_level = DBG_MED; /* DBG_MED == (3) */ + + /* + * This will print: + * + * Warning: main: elephant is sky\-blue pink + * + * with newlines as described. + */ + msg("NOTE: The next line should say: \e"Warning: %s: %s", __func__, "elephant is sky\-blue pink\e""); + warn(__func__, "elephant is sky\-blue pink\n"); + + /* this will not print anything as verbosity_level 3 (DBG_MED) < 5 (DBG_HIGH): */ + dbg(DBG_HIGH, "starting critical section"); + + /* + * Because verbosity_level == 3 (DBG_MED) and filename is "foo.bar" and + * length == 7 this will print (with newlines added as described): + * + * debug[3]: file: foo.bar has length: 7 + */ + msg("NOTE: The next line should read: \e"debug[3]: file: %s has length: %ld\e"", filename, length); + dbg(DBG_MED, "file: %s has length: %ld\n", filename, length); + + /* + * If EPERM == 1 then this will print: + * + * ERROR[2]: main: test: errno[1]: Operation not permitted + * + * with newlines as discussed and then exit 2. + */ + errno = EPERM; + msg("NOTE: The next line should read: \\"ERROR[2]: main: test: errno[%d]: %s\\"", errno, strerror(errno)); + errp(2, __func__, "test"); + not_reached(); + + return 2; /* this return is never reached */ +} +.fi +.RE +.SS Compiling and running the example +.PP +To compile: +.RS 4 +.nf +.RB "$ " "cc \-c dbg.c" +.RB "$ " "cc \-o dbg_example dbg_example.c dbg.o" +.sp +.B # The above two commands could be shortened to just: +.RB "$ " "cc \-o dbg_example dbg_example.c dbg.c" +.fi +.RE +.sp +.PP +To run: +.RS 4 +.nf +.RB "$ " "./dbg_example" +NOTE: Setting verbosity_level to DBG_MED: 3 +NOTE: The next line should say: "Warning: main: elephant is sky\-blue pink" +Warning: main: elephant is sky\-blue pink + +NOTE: The next line should read: "debug[3]: file: foo.bar has length: 7" +debug[3]: file: foo.bar has length: 7 + +NOTE: The next line should read: "ERROR[2]: main: test: errno[1]: Operation not permitted" +ERROR[2]: main: test: errno[1]: Operation not permitted +$ echo $? +2 +.fi +.RE +.SH SEE ALSO +.BR msg (3), +.BR printf_usage (3), +.BR warn (3), +.BR werr (3), +.BR err (3), +.BR warn_or_err (3), +.BR printf (3) +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/vsnmsg.3 b/dbg/man/man3/vsnmsg.3 deleted file mode 120000 index 00912eceb..000000000 --- a/dbg/man/man3/vsnmsg.3 +++ /dev/null @@ -1 +0,0 @@ -msg.3 \ No newline at end of file diff --git a/dbg/man/man3/vsnmsg.3 b/dbg/man/man3/vsnmsg.3 new file mode 100644 index 000000000..362484c0a --- /dev/null +++ b/dbg/man/man3/vsnmsg.3 @@ -0,0 +1,196 @@ +.\" section 3 man page for msg +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH msg 3 "30 January 2023" "msg" +.SH NAME +.BR msg() \|, +.BR vmsg() \|, +.BR fmsg() \|, +.BR vfmsg() \|, +.BR snmsg() \|, +.BR vsnmsg() +\- info message facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern int verbosity_level; /* maximum debug level for debug messages */" +.br +.B "extern bool msg_output_allowed; /* false ==> disable informational messages */" +.br +.B "extern bool msg_warn_silent; /* true ==> silence info & warnings if verbosity_level <= 0 */" +.sp +.B "void msg(const char *fmt, ...);" +.br +.B "void vmsg(char const *fmt, va_list ap);" +.br +.B "void fmsg(FILE *stream, const char *fmt, ...);" +.br +.B "void vfmsg(FILE *stream, char const *fmt, va_list ap);" +.br +.B "void snmsg(char *str, size_t size, char const *fmt, ...);" +.br +.B "void vsnmsg(char *str, size_t size, char const *fmt, va_list ap);" +.SH DESCRIPTION +These functions provide a way to write informative messages to a stream such as +.B stderr +or to a +.B char * +of a fixed size. +.SS Alternative output FILE * stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.B fmsg() +and +.B vfmsg() +can write to an alternative +.B FILE * +stream. +.SS Writing to a char * buffer +The functions +.B snmsg() +and +.B vsnmsg() +write a message to a buffer of a fixed size. +They do not write a newline after the message but the string is NUL terminated. +They will not do anything if passed a NULL pointer or +.IR size +<=\ 1. +.SS Variadic versions +.PP +The functions +.BR vmsg(), +.BR vfmsg() +and +.BR vsnmsg() +are equivalent to the functions +.BR msg(), +.BR fmsg() +and +.BR snmsg() +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I msg_output_allowed +is false these functions will not print anything. +.sp +When +.I msg_warn_silent +is true these functions will be silenced if +.IR verbosity_level +<= 0. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +.PP +These functions return void. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.B "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.B "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +.PP +For an example proper please refer to +.BR dbg (3). +.SH SEE ALSO +.BR dbg (3), +.BR printf_usage (3), +.BR warn (3), +.BR werr (3), +.BR err (3), +.BR warn_or_err (3), +.BR printf (3) +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/vsnwarn.3 b/dbg/man/man3/vsnwarn.3 deleted file mode 120000 index d70a2beca..000000000 --- a/dbg/man/man3/vsnwarn.3 +++ /dev/null @@ -1 +0,0 @@ -warn.3 \ No newline at end of file diff --git a/dbg/man/man3/vsnwarn.3 b/dbg/man/man3/vsnwarn.3 new file mode 100644 index 000000000..beece7a00 --- /dev/null +++ b/dbg/man/man3/vsnwarn.3 @@ -0,0 +1,234 @@ +.\" section 3 man page for warn +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH warn 3 "30 January 2023" "warn" +.SH NAME +.BR warn() \|, +.BR vwarn() \|, +.BR fwarn() \|, +.BR vfwarn() \|, +.BR snwarn() \|, +.BR vsnwarn() \|, +.BR warnp() \|, +.BR vwarnp() \|, +.BR fwarnp() \|, +.BR vfwarnp() \|, +.BR snwarnp() \|, +.BR vsnwarnp() +\- warning message facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern int verbosity_level; /* maximum debug level for debug messages */" +.br +.B "extern bool warn_output_allowed; /* false ==> disable warning messages */" +.br +.B "extern bool msg_warn_silent; /* true ==> silence info & warnings if verbosity_level <= 0 */" +.sp +.B "void warn(const char *name, const char *fmt, ...);" +.br +.B "void vwarn(char const *name, char const *fmt, va_list ap);" +.br +.B "void fwarn(FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwarn(FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwarn(char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwarn(char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.sp +.B "void warnp(const char *name, const char *fmt, ...);" +.br +.B "void vwarnp(char const *name, char const *fmt, va_list ap);" +.br +.B "void fwarnp(FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwarnp(FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwarnp(char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwarnp(char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.SH DESCRIPTION +These functions provide a way to write warning messages to a stream such as +.B stderr +or to a +.B char * +of a fixed size. +.SS Errno versions +.PP +The functions +.BR warnp() , +.BR fwarnp() , +.B vfwarnp() +and +.B vsnwarnp() +write a message according to the value of +.BR errno , + making sure to restore the +.B errno +value in the case the function returns. +.SS Alternative output FILE * stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.BR fwarn() \|, +.BR vfwarn() \|, +.BR fwarnp() +and +.BR vfwarnp() +can write to an alternative +.B FILE * +stream. +.SS Writing to a char * buffer +The functions +.BR snwarn() +and +.BR snwarnp() +write a message to a buffer of a fixed size. +They do not write a newline after the message but the string is NUL terminated. +They do not do anything if passed a NULL pointer or +.I size +<= 1. +.SS Variadic versions +.PP +The functions +.BR vwarn() \|, +.BR vfwarn() \|, +.BR vsnwarn() \|, +.BR vwarnp() \|, +.BR vfwarnp() +and +.BR vsnwarnp() +are equivalent to the functions +.BR warn() \|, +.BR fwarn() \|, +.BR snwarn() \|, +.BR warnp() \|, +.B fwarnp() +and +.B snwarnp() +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I warn_output_allowed +is false these functions will not print anything. +.sp +When +.I msg_warn_silent +is true these functions will be silenced if +.I verbosity_level +<= 0. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +.PP +These functions return void. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.BR "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.BR "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +For an example proper please refer to +.BR dbg (3). +.SH SEE ALSO +.BR dbg (3), +.BR msg (3), +.BR printf_usage (3), +.BR werr (3), +.BR err (3), +.BR warn_or_err (3), +.BR printf (3) +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/vsnwarnp.3 b/dbg/man/man3/vsnwarnp.3 deleted file mode 120000 index d70a2beca..000000000 --- a/dbg/man/man3/vsnwarnp.3 +++ /dev/null @@ -1 +0,0 @@ -warn.3 \ No newline at end of file diff --git a/dbg/man/man3/vsnwarnp.3 b/dbg/man/man3/vsnwarnp.3 new file mode 100644 index 000000000..beece7a00 --- /dev/null +++ b/dbg/man/man3/vsnwarnp.3 @@ -0,0 +1,234 @@ +.\" section 3 man page for warn +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH warn 3 "30 January 2023" "warn" +.SH NAME +.BR warn() \|, +.BR vwarn() \|, +.BR fwarn() \|, +.BR vfwarn() \|, +.BR snwarn() \|, +.BR vsnwarn() \|, +.BR warnp() \|, +.BR vwarnp() \|, +.BR fwarnp() \|, +.BR vfwarnp() \|, +.BR snwarnp() \|, +.BR vsnwarnp() +\- warning message facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern int verbosity_level; /* maximum debug level for debug messages */" +.br +.B "extern bool warn_output_allowed; /* false ==> disable warning messages */" +.br +.B "extern bool msg_warn_silent; /* true ==> silence info & warnings if verbosity_level <= 0 */" +.sp +.B "void warn(const char *name, const char *fmt, ...);" +.br +.B "void vwarn(char const *name, char const *fmt, va_list ap);" +.br +.B "void fwarn(FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwarn(FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwarn(char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwarn(char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.sp +.B "void warnp(const char *name, const char *fmt, ...);" +.br +.B "void vwarnp(char const *name, char const *fmt, va_list ap);" +.br +.B "void fwarnp(FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwarnp(FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwarnp(char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwarnp(char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.SH DESCRIPTION +These functions provide a way to write warning messages to a stream such as +.B stderr +or to a +.B char * +of a fixed size. +.SS Errno versions +.PP +The functions +.BR warnp() , +.BR fwarnp() , +.B vfwarnp() +and +.B vsnwarnp() +write a message according to the value of +.BR errno , + making sure to restore the +.B errno +value in the case the function returns. +.SS Alternative output FILE * stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.BR fwarn() \|, +.BR vfwarn() \|, +.BR fwarnp() +and +.BR vfwarnp() +can write to an alternative +.B FILE * +stream. +.SS Writing to a char * buffer +The functions +.BR snwarn() +and +.BR snwarnp() +write a message to a buffer of a fixed size. +They do not write a newline after the message but the string is NUL terminated. +They do not do anything if passed a NULL pointer or +.I size +<= 1. +.SS Variadic versions +.PP +The functions +.BR vwarn() \|, +.BR vfwarn() \|, +.BR vsnwarn() \|, +.BR vwarnp() \|, +.BR vfwarnp() +and +.BR vsnwarnp() +are equivalent to the functions +.BR warn() \|, +.BR fwarn() \|, +.BR snwarn() \|, +.BR warnp() \|, +.B fwarnp() +and +.B snwarnp() +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I warn_output_allowed +is false these functions will not print anything. +.sp +When +.I msg_warn_silent +is true these functions will be silenced if +.I verbosity_level +<= 0. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +.PP +These functions return void. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.BR "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.BR "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +For an example proper please refer to +.BR dbg (3). +.SH SEE ALSO +.BR dbg (3), +.BR msg (3), +.BR printf_usage (3), +.BR werr (3), +.BR err (3), +.BR warn_or_err (3), +.BR printf (3) +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/vsnwerr.3 b/dbg/man/man3/vsnwerr.3 deleted file mode 120000 index d381538c9..000000000 --- a/dbg/man/man3/vsnwerr.3 +++ /dev/null @@ -1 +0,0 @@ -werr.3 \ No newline at end of file diff --git a/dbg/man/man3/vsnwerr.3 b/dbg/man/man3/vsnwerr.3 new file mode 100644 index 000000000..2f04f5ecb --- /dev/null +++ b/dbg/man/man3/vsnwerr.3 @@ -0,0 +1,223 @@ +.\" section 3 man page for dbg +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH werr 3 "30 January 2023" "werr" +.SH NAME +.BR werr() \|, +.BR vwerr() \|, +.BR fwerr() \|, +.BR vfwerr() \|, +.BR snwerr() \|, +.BR vsnwerr() \|, +.BR werrp() \|, +.BR vwerrp() \|, +.BR fwerrp() \|, +.BR vfwerrp() \|, +.BR snwerrp() \|, +.BR vsnwerrp() +\- non-fatal error messages facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern bool err_output_allowed; /* false ==> disable error messages */" +.sp +.B "void werr(int error_code, const char *name, const char *fmt, ...);" +.br +.B "void vwerr(int error_code, char const *name, char const *fmt, va_list ap);" +.br +.B "void fwerr(int error_code, FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwerr(int error_code, FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwerr(int error_code, char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwerr(int error_code, char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.sp +.B "void werrp(int error_code, const char *name, const char *fmt, ...);" +.br +.B "void vwerrp(int error_code, char const *name, char const *fmt, va_list ap);" +.br +.B "void fwerrp(int error_code, FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwerrp(int error_code, FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwerrp(int error_code, char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwerrp(int error_code, char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.SH DESCRIPTION +These functions provide a way to write non-fatal error messages to a stream such as +.BR stderr . +.SS Errno versions +.PP +The functions +.BR werrp() , +.B fwerrp() +and +.B vsnwerrp() +write a message according to the value of +.BR errno , +making sure to restore the +.B errno +value in the case the function returns. +.SS Alternative output FILE * stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.BR fwerr() +and +.BR vfwerrp() +can write to an alternative +.B FILE * +stream. +.SS Writing to a char * buffer +The functions +.BR snwerr() +and +.BR snwerrp() +write a message to a buffer of a fixed size. +They do not write a newline after the message but the string is NUL terminated. +They do not do anything if passed a NULL pointer or +.I size +<= 1. +.SS Variadic versions +.PP +The functions +.BR vwerr() \|, +.BR vfwerr() \|, +.BR vsnwerr() \|, +.BR vwerrp() \|, +.BR vfwerrp() +and +.BR vsnwerrp() +are equivalent to the functions +.BR err (3), +.BR ferr (3), +.BR errp (3), +.BR ferrp (3), +.BR werr (3), +.BR fwerr (3), +.BR snwerr (3), +.BR werrp (3), +.BR fwerrp (3) +and +.BR snwerrp (3) +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I err_output_allowed +is false these functions will not print anything. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +.PP +These functions return void. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.B "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.B "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.B "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.B "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +.PP +For an example proper please refer to +.BR dbg (3). +.SH SEE ALSO +.BR dbg (3), +.BR msg (3), +.BR printf_usage (3), +.BR warn (3), +.BR err (3), +.BR warn_or_err (3), +.BR printf (3). +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/vsnwerrp.3 b/dbg/man/man3/vsnwerrp.3 deleted file mode 120000 index d381538c9..000000000 --- a/dbg/man/man3/vsnwerrp.3 +++ /dev/null @@ -1 +0,0 @@ -werr.3 \ No newline at end of file diff --git a/dbg/man/man3/vsnwerrp.3 b/dbg/man/man3/vsnwerrp.3 new file mode 100644 index 000000000..2f04f5ecb --- /dev/null +++ b/dbg/man/man3/vsnwerrp.3 @@ -0,0 +1,223 @@ +.\" section 3 man page for dbg +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH werr 3 "30 January 2023" "werr" +.SH NAME +.BR werr() \|, +.BR vwerr() \|, +.BR fwerr() \|, +.BR vfwerr() \|, +.BR snwerr() \|, +.BR vsnwerr() \|, +.BR werrp() \|, +.BR vwerrp() \|, +.BR fwerrp() \|, +.BR vfwerrp() \|, +.BR snwerrp() \|, +.BR vsnwerrp() +\- non-fatal error messages facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern bool err_output_allowed; /* false ==> disable error messages */" +.sp +.B "void werr(int error_code, const char *name, const char *fmt, ...);" +.br +.B "void vwerr(int error_code, char const *name, char const *fmt, va_list ap);" +.br +.B "void fwerr(int error_code, FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwerr(int error_code, FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwerr(int error_code, char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwerr(int error_code, char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.sp +.B "void werrp(int error_code, const char *name, const char *fmt, ...);" +.br +.B "void vwerrp(int error_code, char const *name, char const *fmt, va_list ap);" +.br +.B "void fwerrp(int error_code, FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwerrp(int error_code, FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwerrp(int error_code, char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwerrp(int error_code, char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.SH DESCRIPTION +These functions provide a way to write non-fatal error messages to a stream such as +.BR stderr . +.SS Errno versions +.PP +The functions +.BR werrp() , +.B fwerrp() +and +.B vsnwerrp() +write a message according to the value of +.BR errno , +making sure to restore the +.B errno +value in the case the function returns. +.SS Alternative output FILE * stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.BR fwerr() +and +.BR vfwerrp() +can write to an alternative +.B FILE * +stream. +.SS Writing to a char * buffer +The functions +.BR snwerr() +and +.BR snwerrp() +write a message to a buffer of a fixed size. +They do not write a newline after the message but the string is NUL terminated. +They do not do anything if passed a NULL pointer or +.I size +<= 1. +.SS Variadic versions +.PP +The functions +.BR vwerr() \|, +.BR vfwerr() \|, +.BR vsnwerr() \|, +.BR vwerrp() \|, +.BR vfwerrp() +and +.BR vsnwerrp() +are equivalent to the functions +.BR err (3), +.BR ferr (3), +.BR errp (3), +.BR ferrp (3), +.BR werr (3), +.BR fwerr (3), +.BR snwerr (3), +.BR werrp (3), +.BR fwerrp (3) +and +.BR snwerrp (3) +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I err_output_allowed +is false these functions will not print anything. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +.PP +These functions return void. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.B "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.B "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.B "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.B "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +.PP +For an example proper please refer to +.BR dbg (3). +.SH SEE ALSO +.BR dbg (3), +.BR msg (3), +.BR printf_usage (3), +.BR warn (3), +.BR err (3), +.BR warn_or_err (3), +.BR printf (3). +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/vwarn.3 b/dbg/man/man3/vwarn.3 deleted file mode 120000 index d70a2beca..000000000 --- a/dbg/man/man3/vwarn.3 +++ /dev/null @@ -1 +0,0 @@ -warn.3 \ No newline at end of file diff --git a/dbg/man/man3/vwarn.3 b/dbg/man/man3/vwarn.3 new file mode 100644 index 000000000..beece7a00 --- /dev/null +++ b/dbg/man/man3/vwarn.3 @@ -0,0 +1,234 @@ +.\" section 3 man page for warn +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH warn 3 "30 January 2023" "warn" +.SH NAME +.BR warn() \|, +.BR vwarn() \|, +.BR fwarn() \|, +.BR vfwarn() \|, +.BR snwarn() \|, +.BR vsnwarn() \|, +.BR warnp() \|, +.BR vwarnp() \|, +.BR fwarnp() \|, +.BR vfwarnp() \|, +.BR snwarnp() \|, +.BR vsnwarnp() +\- warning message facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern int verbosity_level; /* maximum debug level for debug messages */" +.br +.B "extern bool warn_output_allowed; /* false ==> disable warning messages */" +.br +.B "extern bool msg_warn_silent; /* true ==> silence info & warnings if verbosity_level <= 0 */" +.sp +.B "void warn(const char *name, const char *fmt, ...);" +.br +.B "void vwarn(char const *name, char const *fmt, va_list ap);" +.br +.B "void fwarn(FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwarn(FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwarn(char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwarn(char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.sp +.B "void warnp(const char *name, const char *fmt, ...);" +.br +.B "void vwarnp(char const *name, char const *fmt, va_list ap);" +.br +.B "void fwarnp(FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwarnp(FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwarnp(char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwarnp(char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.SH DESCRIPTION +These functions provide a way to write warning messages to a stream such as +.B stderr +or to a +.B char * +of a fixed size. +.SS Errno versions +.PP +The functions +.BR warnp() , +.BR fwarnp() , +.B vfwarnp() +and +.B vsnwarnp() +write a message according to the value of +.BR errno , + making sure to restore the +.B errno +value in the case the function returns. +.SS Alternative output FILE * stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.BR fwarn() \|, +.BR vfwarn() \|, +.BR fwarnp() +and +.BR vfwarnp() +can write to an alternative +.B FILE * +stream. +.SS Writing to a char * buffer +The functions +.BR snwarn() +and +.BR snwarnp() +write a message to a buffer of a fixed size. +They do not write a newline after the message but the string is NUL terminated. +They do not do anything if passed a NULL pointer or +.I size +<= 1. +.SS Variadic versions +.PP +The functions +.BR vwarn() \|, +.BR vfwarn() \|, +.BR vsnwarn() \|, +.BR vwarnp() \|, +.BR vfwarnp() +and +.BR vsnwarnp() +are equivalent to the functions +.BR warn() \|, +.BR fwarn() \|, +.BR snwarn() \|, +.BR warnp() \|, +.B fwarnp() +and +.B snwarnp() +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I warn_output_allowed +is false these functions will not print anything. +.sp +When +.I msg_warn_silent +is true these functions will be silenced if +.I verbosity_level +<= 0. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +.PP +These functions return void. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.BR "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.BR "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +For an example proper please refer to +.BR dbg (3). +.SH SEE ALSO +.BR dbg (3), +.BR msg (3), +.BR printf_usage (3), +.BR werr (3), +.BR err (3), +.BR warn_or_err (3), +.BR printf (3) +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/vwarn_or_err.3 b/dbg/man/man3/vwarn_or_err.3 deleted file mode 120000 index 9123b756a..000000000 --- a/dbg/man/man3/vwarn_or_err.3 +++ /dev/null @@ -1 +0,0 @@ -warn_or_err.3 \ No newline at end of file diff --git a/dbg/man/man3/vwarn_or_err.3 b/dbg/man/man3/vwarn_or_err.3 new file mode 100644 index 000000000..eaa70ae0a --- /dev/null +++ b/dbg/man/man3/vwarn_or_err.3 @@ -0,0 +1,200 @@ +.\" section 3 man page for warn_or_err +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH warn_or_err 3 "29 January 2023" "warn_or_err" +.SH NAME +.BR warn_or_err() \|, +.BR vwarn_or_err() \|, +.BR fwarn_or_err() \|, +.BR vfwarn_or_err() \|, +.BR warnp_or_errp() \|, +.BR vwarnp_or_errp() \|, +.BR fwarnp_or_errp() \|, +.B vfwarnp_or_errp() +\- show either a warning message or a fatal error message +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern int verbosity_level; /* maximum debug level for debug messages */" +.br +.B "extern bool warn_output_allowed; /* false ==> disable warning messages */" +.br +.B "extern bool err_output_allowed; /* false ==> disable error messages */" +.br +.B "extern bool msg_warn_silent; /* true ==> silence info & warnings if verbosity_level <= 0 */" +.sp +.B "void warn_or_err(int exitcode, const char *name, bool warning, const char *fmt, ...);" +.br +.B "void vwarn_or_err(int exitcode, const char *name, bool warning, const char *fmt, va_list ap); +.br +.B "void fwarn_or_err(int exitcode, FILE *stream, const char *name, bool warning, const char *fmt, ...);" +.br +.B "void vfwarn_or_err(int exitcode, FILE *stream, const char *name, bool warning, const char *fmt, va_list ap);" +.SH DESCRIPTION +These functions provide a way to write either a warning message or a fatal error message (prior to aborting) to a stream such as +.BR stderr . +.SS Alternative output FILE * stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.BR fwarn_or_err() \|, +.BR vfwarn_or_err() +and +.BR fwarnp_or_errp() +can write to an alternative +.B FILE * +stream. +.SS Variadic versions +.PP +The functions +.BR vwarn_or_err() \|, +.BR vfwarn_or_err() +and +.BR vwarnp_or_errp() +are equivalent to the functions +.BR warn_or_err(), +.BR fwarn_or_err() +and +.BR warnp_or_errp() +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I warn_output_allowed +is false warning messages will not be printed. +.sp +When +.I err_output_allowed +is false error messages will not be printed. +.sp +When +.I msg_warn_silent +is true warning messages will not be printed if +.IR verbosity_level +<= 0. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +.PP +These functions do not return if +.B warning is false +in the same manner as the functions +.BR err() \|, +.BR verr() \|, +.BR ferr() \|, +.BR vferr() \|, +.BR errp() \|, +.BR verrp() \|, +.BR ferrp() \|, +and +.BR vferrp() . +Otherwise they will return void. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.B "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.B "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.BR "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +.PP +For an example proper please refer to +.BR dbg (3). +.SH SEE ALSO +.BR dbg (3), +.BR msg (3), +.BR printf_usage (3), +.BR warn (3), +.BR werr (3), +.BR err (3), +.BR printf (3). +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/vwarnp.3 b/dbg/man/man3/vwarnp.3 deleted file mode 120000 index d70a2beca..000000000 --- a/dbg/man/man3/vwarnp.3 +++ /dev/null @@ -1 +0,0 @@ -warn.3 \ No newline at end of file diff --git a/dbg/man/man3/vwarnp.3 b/dbg/man/man3/vwarnp.3 new file mode 100644 index 000000000..beece7a00 --- /dev/null +++ b/dbg/man/man3/vwarnp.3 @@ -0,0 +1,234 @@ +.\" section 3 man page for warn +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH warn 3 "30 January 2023" "warn" +.SH NAME +.BR warn() \|, +.BR vwarn() \|, +.BR fwarn() \|, +.BR vfwarn() \|, +.BR snwarn() \|, +.BR vsnwarn() \|, +.BR warnp() \|, +.BR vwarnp() \|, +.BR fwarnp() \|, +.BR vfwarnp() \|, +.BR snwarnp() \|, +.BR vsnwarnp() +\- warning message facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern int verbosity_level; /* maximum debug level for debug messages */" +.br +.B "extern bool warn_output_allowed; /* false ==> disable warning messages */" +.br +.B "extern bool msg_warn_silent; /* true ==> silence info & warnings if verbosity_level <= 0 */" +.sp +.B "void warn(const char *name, const char *fmt, ...);" +.br +.B "void vwarn(char const *name, char const *fmt, va_list ap);" +.br +.B "void fwarn(FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwarn(FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwarn(char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwarn(char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.sp +.B "void warnp(const char *name, const char *fmt, ...);" +.br +.B "void vwarnp(char const *name, char const *fmt, va_list ap);" +.br +.B "void fwarnp(FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwarnp(FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwarnp(char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwarnp(char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.SH DESCRIPTION +These functions provide a way to write warning messages to a stream such as +.B stderr +or to a +.B char * +of a fixed size. +.SS Errno versions +.PP +The functions +.BR warnp() , +.BR fwarnp() , +.B vfwarnp() +and +.B vsnwarnp() +write a message according to the value of +.BR errno , + making sure to restore the +.B errno +value in the case the function returns. +.SS Alternative output FILE * stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.BR fwarn() \|, +.BR vfwarn() \|, +.BR fwarnp() +and +.BR vfwarnp() +can write to an alternative +.B FILE * +stream. +.SS Writing to a char * buffer +The functions +.BR snwarn() +and +.BR snwarnp() +write a message to a buffer of a fixed size. +They do not write a newline after the message but the string is NUL terminated. +They do not do anything if passed a NULL pointer or +.I size +<= 1. +.SS Variadic versions +.PP +The functions +.BR vwarn() \|, +.BR vfwarn() \|, +.BR vsnwarn() \|, +.BR vwarnp() \|, +.BR vfwarnp() +and +.BR vsnwarnp() +are equivalent to the functions +.BR warn() \|, +.BR fwarn() \|, +.BR snwarn() \|, +.BR warnp() \|, +.B fwarnp() +and +.B snwarnp() +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I warn_output_allowed +is false these functions will not print anything. +.sp +When +.I msg_warn_silent +is true these functions will be silenced if +.I verbosity_level +<= 0. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +.PP +These functions return void. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.BR "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.BR "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +For an example proper please refer to +.BR dbg (3). +.SH SEE ALSO +.BR dbg (3), +.BR msg (3), +.BR printf_usage (3), +.BR werr (3), +.BR err (3), +.BR warn_or_err (3), +.BR printf (3) +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/vwerr.3 b/dbg/man/man3/vwerr.3 deleted file mode 120000 index d381538c9..000000000 --- a/dbg/man/man3/vwerr.3 +++ /dev/null @@ -1 +0,0 @@ -werr.3 \ No newline at end of file diff --git a/dbg/man/man3/vwerr.3 b/dbg/man/man3/vwerr.3 new file mode 100644 index 000000000..2f04f5ecb --- /dev/null +++ b/dbg/man/man3/vwerr.3 @@ -0,0 +1,223 @@ +.\" section 3 man page for dbg +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH werr 3 "30 January 2023" "werr" +.SH NAME +.BR werr() \|, +.BR vwerr() \|, +.BR fwerr() \|, +.BR vfwerr() \|, +.BR snwerr() \|, +.BR vsnwerr() \|, +.BR werrp() \|, +.BR vwerrp() \|, +.BR fwerrp() \|, +.BR vfwerrp() \|, +.BR snwerrp() \|, +.BR vsnwerrp() +\- non-fatal error messages facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern bool err_output_allowed; /* false ==> disable error messages */" +.sp +.B "void werr(int error_code, const char *name, const char *fmt, ...);" +.br +.B "void vwerr(int error_code, char const *name, char const *fmt, va_list ap);" +.br +.B "void fwerr(int error_code, FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwerr(int error_code, FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwerr(int error_code, char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwerr(int error_code, char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.sp +.B "void werrp(int error_code, const char *name, const char *fmt, ...);" +.br +.B "void vwerrp(int error_code, char const *name, char const *fmt, va_list ap);" +.br +.B "void fwerrp(int error_code, FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwerrp(int error_code, FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwerrp(int error_code, char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwerrp(int error_code, char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.SH DESCRIPTION +These functions provide a way to write non-fatal error messages to a stream such as +.BR stderr . +.SS Errno versions +.PP +The functions +.BR werrp() , +.B fwerrp() +and +.B vsnwerrp() +write a message according to the value of +.BR errno , +making sure to restore the +.B errno +value in the case the function returns. +.SS Alternative output FILE * stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.BR fwerr() +and +.BR vfwerrp() +can write to an alternative +.B FILE * +stream. +.SS Writing to a char * buffer +The functions +.BR snwerr() +and +.BR snwerrp() +write a message to a buffer of a fixed size. +They do not write a newline after the message but the string is NUL terminated. +They do not do anything if passed a NULL pointer or +.I size +<= 1. +.SS Variadic versions +.PP +The functions +.BR vwerr() \|, +.BR vfwerr() \|, +.BR vsnwerr() \|, +.BR vwerrp() \|, +.BR vfwerrp() +and +.BR vsnwerrp() +are equivalent to the functions +.BR err (3), +.BR ferr (3), +.BR errp (3), +.BR ferrp (3), +.BR werr (3), +.BR fwerr (3), +.BR snwerr (3), +.BR werrp (3), +.BR fwerrp (3) +and +.BR snwerrp (3) +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I err_output_allowed +is false these functions will not print anything. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +.PP +These functions return void. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.B "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.B "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.B "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.B "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +.PP +For an example proper please refer to +.BR dbg (3). +.SH SEE ALSO +.BR dbg (3), +.BR msg (3), +.BR printf_usage (3), +.BR warn (3), +.BR err (3), +.BR warn_or_err (3), +.BR printf (3). +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/vwerrp.3 b/dbg/man/man3/vwerrp.3 deleted file mode 120000 index d381538c9..000000000 --- a/dbg/man/man3/vwerrp.3 +++ /dev/null @@ -1 +0,0 @@ -werr.3 \ No newline at end of file diff --git a/dbg/man/man3/vwerrp.3 b/dbg/man/man3/vwerrp.3 new file mode 100644 index 000000000..2f04f5ecb --- /dev/null +++ b/dbg/man/man3/vwerrp.3 @@ -0,0 +1,223 @@ +.\" section 3 man page for dbg +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH werr 3 "30 January 2023" "werr" +.SH NAME +.BR werr() \|, +.BR vwerr() \|, +.BR fwerr() \|, +.BR vfwerr() \|, +.BR snwerr() \|, +.BR vsnwerr() \|, +.BR werrp() \|, +.BR vwerrp() \|, +.BR fwerrp() \|, +.BR vfwerrp() \|, +.BR snwerrp() \|, +.BR vsnwerrp() +\- non-fatal error messages facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern bool err_output_allowed; /* false ==> disable error messages */" +.sp +.B "void werr(int error_code, const char *name, const char *fmt, ...);" +.br +.B "void vwerr(int error_code, char const *name, char const *fmt, va_list ap);" +.br +.B "void fwerr(int error_code, FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwerr(int error_code, FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwerr(int error_code, char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwerr(int error_code, char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.sp +.B "void werrp(int error_code, const char *name, const char *fmt, ...);" +.br +.B "void vwerrp(int error_code, char const *name, char const *fmt, va_list ap);" +.br +.B "void fwerrp(int error_code, FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwerrp(int error_code, FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwerrp(int error_code, char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwerrp(int error_code, char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.SH DESCRIPTION +These functions provide a way to write non-fatal error messages to a stream such as +.BR stderr . +.SS Errno versions +.PP +The functions +.BR werrp() , +.B fwerrp() +and +.B vsnwerrp() +write a message according to the value of +.BR errno , +making sure to restore the +.B errno +value in the case the function returns. +.SS Alternative output FILE * stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.BR fwerr() +and +.BR vfwerrp() +can write to an alternative +.B FILE * +stream. +.SS Writing to a char * buffer +The functions +.BR snwerr() +and +.BR snwerrp() +write a message to a buffer of a fixed size. +They do not write a newline after the message but the string is NUL terminated. +They do not do anything if passed a NULL pointer or +.I size +<= 1. +.SS Variadic versions +.PP +The functions +.BR vwerr() \|, +.BR vfwerr() \|, +.BR vsnwerr() \|, +.BR vwerrp() \|, +.BR vfwerrp() +and +.BR vsnwerrp() +are equivalent to the functions +.BR err (3), +.BR ferr (3), +.BR errp (3), +.BR ferrp (3), +.BR werr (3), +.BR fwerr (3), +.BR snwerr (3), +.BR werrp (3), +.BR fwerrp (3) +and +.BR snwerrp (3) +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I err_output_allowed +is false these functions will not print anything. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +.PP +These functions return void. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.B "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.B "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.B "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.B "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +.PP +For an example proper please refer to +.BR dbg (3). +.SH SEE ALSO +.BR dbg (3), +.BR msg (3), +.BR printf_usage (3), +.BR warn (3), +.BR err (3), +.BR warn_or_err (3), +.BR printf (3). +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/warnp.3 b/dbg/man/man3/warnp.3 deleted file mode 120000 index d70a2beca..000000000 --- a/dbg/man/man3/warnp.3 +++ /dev/null @@ -1 +0,0 @@ -warn.3 \ No newline at end of file diff --git a/dbg/man/man3/warnp.3 b/dbg/man/man3/warnp.3 new file mode 100644 index 000000000..beece7a00 --- /dev/null +++ b/dbg/man/man3/warnp.3 @@ -0,0 +1,234 @@ +.\" section 3 man page for warn +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH warn 3 "30 January 2023" "warn" +.SH NAME +.BR warn() \|, +.BR vwarn() \|, +.BR fwarn() \|, +.BR vfwarn() \|, +.BR snwarn() \|, +.BR vsnwarn() \|, +.BR warnp() \|, +.BR vwarnp() \|, +.BR fwarnp() \|, +.BR vfwarnp() \|, +.BR snwarnp() \|, +.BR vsnwarnp() +\- warning message facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern int verbosity_level; /* maximum debug level for debug messages */" +.br +.B "extern bool warn_output_allowed; /* false ==> disable warning messages */" +.br +.B "extern bool msg_warn_silent; /* true ==> silence info & warnings if verbosity_level <= 0 */" +.sp +.B "void warn(const char *name, const char *fmt, ...);" +.br +.B "void vwarn(char const *name, char const *fmt, va_list ap);" +.br +.B "void fwarn(FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwarn(FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwarn(char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwarn(char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.sp +.B "void warnp(const char *name, const char *fmt, ...);" +.br +.B "void vwarnp(char const *name, char const *fmt, va_list ap);" +.br +.B "void fwarnp(FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwarnp(FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwarnp(char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwarnp(char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.SH DESCRIPTION +These functions provide a way to write warning messages to a stream such as +.B stderr +or to a +.B char * +of a fixed size. +.SS Errno versions +.PP +The functions +.BR warnp() , +.BR fwarnp() , +.B vfwarnp() +and +.B vsnwarnp() +write a message according to the value of +.BR errno , + making sure to restore the +.B errno +value in the case the function returns. +.SS Alternative output FILE * stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.BR fwarn() \|, +.BR vfwarn() \|, +.BR fwarnp() +and +.BR vfwarnp() +can write to an alternative +.B FILE * +stream. +.SS Writing to a char * buffer +The functions +.BR snwarn() +and +.BR snwarnp() +write a message to a buffer of a fixed size. +They do not write a newline after the message but the string is NUL terminated. +They do not do anything if passed a NULL pointer or +.I size +<= 1. +.SS Variadic versions +.PP +The functions +.BR vwarn() \|, +.BR vfwarn() \|, +.BR vsnwarn() \|, +.BR vwarnp() \|, +.BR vfwarnp() +and +.BR vsnwarnp() +are equivalent to the functions +.BR warn() \|, +.BR fwarn() \|, +.BR snwarn() \|, +.BR warnp() \|, +.B fwarnp() +and +.B snwarnp() +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I warn_output_allowed +is false these functions will not print anything. +.sp +When +.I msg_warn_silent +is true these functions will be silenced if +.I verbosity_level +<= 0. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +.PP +These functions return void. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.BR "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.BR "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.BI "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +For an example proper please refer to +.BR dbg (3). +.SH SEE ALSO +.BR dbg (3), +.BR msg (3), +.BR printf_usage (3), +.BR werr (3), +.BR err (3), +.BR warn_or_err (3), +.BR printf (3) +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dbg/man/man3/werrp.3 b/dbg/man/man3/werrp.3 deleted file mode 120000 index d381538c9..000000000 --- a/dbg/man/man3/werrp.3 +++ /dev/null @@ -1 +0,0 @@ -werr.3 \ No newline at end of file diff --git a/dbg/man/man3/werrp.3 b/dbg/man/man3/werrp.3 new file mode 100644 index 000000000..2f04f5ecb --- /dev/null +++ b/dbg/man/man3/werrp.3 @@ -0,0 +1,223 @@ +.\" section 3 man page for dbg +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. The man page is dedicated to Grace Hopper who popularised the +.\" term 'debugging' after a real moth in a mainframe was causing it to +.\" malfunction (the term had already existed but she made it popular +.\" because of actually removing an insect that was causing a malfunction). +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH werr 3 "30 January 2023" "werr" +.SH NAME +.BR werr() \|, +.BR vwerr() \|, +.BR fwerr() \|, +.BR vfwerr() \|, +.BR snwerr() \|, +.BR vsnwerr() \|, +.BR werrp() \|, +.BR vwerrp() \|, +.BR fwerrp() \|, +.BR vfwerrp() \|, +.BR snwerrp() \|, +.BR vsnwerrp() +\- non-fatal error messages facility +.SH SYNOPSIS +\fB#include "dbg.h"\fP +.sp +\fB#define DBG_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fBextern const char *const dbg_version; /* library version format: major.minor YYYY-MM-DD */\fP +.sp +.B "extern bool err_output_allowed; /* false ==> disable error messages */" +.sp +.B "void werr(int error_code, const char *name, const char *fmt, ...);" +.br +.B "void vwerr(int error_code, char const *name, char const *fmt, va_list ap);" +.br +.B "void fwerr(int error_code, FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwerr(int error_code, FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwerr(int error_code, char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwerr(int error_code, char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.sp +.B "void werrp(int error_code, const char *name, const char *fmt, ...);" +.br +.B "void vwerrp(int error_code, char const *name, char const *fmt, va_list ap);" +.br +.B "void fwerrp(int error_code, FILE *stream, const char *name, const char *fmt, ...);" +.br +.B "void vfwerrp(int error_code, FILE *stream, char const *name, char const *fmt, va_list ap);" +.br +.B "void snwerrp(int error_code, char *str, size_t size, char const *name, char const *fmt, ...);" +.br +.B "void vsnwerrp(int error_code, char *str, size_t size, char const *name, char const *fmt, va_list ap);" +.SH DESCRIPTION +These functions provide a way to write non-fatal error messages to a stream such as +.BR stderr . +.SS Errno versions +.PP +The functions +.BR werrp() , +.B fwerrp() +and +.B vsnwerrp() +write a message according to the value of +.BR errno , +making sure to restore the +.B errno +value in the case the function returns. +.SS Alternative output FILE * stream +The functions that do not take a +.B FILE * +or a +.B char * +write to +.BR stderr . +The functions +.BR fwerr() +and +.BR vfwerrp() +can write to an alternative +.B FILE * +stream. +.SS Writing to a char * buffer +The functions +.BR snwerr() +and +.BR snwerrp() +write a message to a buffer of a fixed size. +They do not write a newline after the message but the string is NUL terminated. +They do not do anything if passed a NULL pointer or +.I size +<= 1. +.SS Variadic versions +.PP +The functions +.BR vwerr() \|, +.BR vfwerr() \|, +.BR vsnwerr() \|, +.BR vwerrp() \|, +.BR vfwerrp() +and +.BR vsnwerrp() +are equivalent to the functions +.BR err (3), +.BR ferr (3), +.BR errp (3), +.BR ferrp (3), +.BR werr (3), +.BR fwerr (3), +.BR snwerr (3), +.BR werrp (3), +.BR fwerrp (3) +and +.BR snwerrp (3) +except that they are called with a +.I va_list +instead of a variable number of arguments. +The state of the +.I va_list +is not modified by these functions. +.SS Format of the fmt string +The format string is a character string in the same form as +.BR printf (3). +As these are quite complex please refer to the +.BR printf (3) +man page for more details and examples. +.SS Output control +.PP +When +.I err_output_allowed +is false these functions will not print anything. +.SS Version string +The string +.BR dbg_version , +which points to +.BR DBG_VERSION , +is the current version of the +.B dbg +library. +.SH RETURN VALUE +.PP +These functions return void. +.SH NOTES +.SS Variadic arguments +In the +.I va_list +functions, the argument +.I ap +is not checked for consistency like they are using the primary interfaces. +For this reason these versions are not recommended for use. +.SS In case of NULL name +If +.I name +is NULL it will be set to +.B "((NULL name))" +and the following warning, preceded by a newline, will be issued: +.sp +.B "Warning: foo: name is NULL, forcing name to be: ((NULL name))" +.sp +where +.B foo +is the name of the function. +.SS The fmt argument +The +.I fmt +argument in the functions is a +.BR printf (3) +style format. +If the format requires arguments, then such arguments may be given after the +.IR fmt . +For modern C compilers, the agreement between any % directives in +.IR fmt , +and any arguments that may follow is checked by the format attribute facility. +Thus having too many arguments, too few arguments, or arguments of the wrong type will result in compiler warnings. +.SS In case of NULL fmt +If +.I fmt +is NULL it will be set to +.B "((NULL fmt))" +and the following warning, preceded by a newline, will be issued: +.sp +.B "Warning: foo: fmt is NULL, forcing fmt to be: ((NULL fmt))" +.sp +where +.B foo +is the name of the function. +.sp +When the +.I fmt +is NULL or contains no +.B % +specifiers the arguments following +.I fmt +will be ignored. +.SS Error checking +All writes are checked for errors. +Write error messages are written to stderr. +However, a persistent problem writing to the stream (such as if the stream being written to was previously closed) will likely prevent such an error from being seen. +.SS Newlines +All functions output extra newlines to help let the messages stand out better. +.SH EXAMPLE +.PP +For an example proper please refer to +.BR dbg (3). +.SH SEE ALSO +.BR dbg (3), +.BR msg (3), +.BR printf_usage (3), +.BR warn (3), +.BR err (3), +.BR warn_or_err (3), +.BR printf (3). +.SH HISTORY +The dbg facility was first written by Landon Curt Noll in 1989. +Version 2.0 was developed and tested within the IOCCC mkiocccentry GitHub repo. diff --git a/dyn_array/man/man3/dyn_array_addr.3 b/dyn_array/man/man3/dyn_array_addr.3 deleted file mode 120000 index 920f68025..000000000 --- a/dyn_array/man/man3/dyn_array_addr.3 +++ /dev/null @@ -1 +0,0 @@ -dyn_array.3 \ No newline at end of file diff --git a/dyn_array/man/man3/dyn_array_addr.3 b/dyn_array/man/man3/dyn_array_addr.3 new file mode 100644 index 000000000..f219ef562 --- /dev/null +++ b/dyn_array/man/man3/dyn_array_addr.3 @@ -0,0 +1,278 @@ +.\" section 3 man page for dyn_array +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH dyn_array 3 "29 January 2023" "dyn_array" +.SH NAME +.BR dyn_array_value() \|, +.BR dyn_array_addr() \|, +.BR dyn_array_tell() \|, +.BR dyn_array_beyond() \|, +.BR dyn_array_alloced() \|, +.BR dyn_array_avail() \|, +.BR dyn_array_rewind() \|, +.BR dyn_array_create() \|, +.BR dyn_array_append_value() \|, +.BR dyn_array_append_set() \|, +.BR dyn_array_concat_array() \|, +.BR dyn_array_seek() \|, +.BR dyn_array_clear() \|, +.BR dyn_array_free() +\- dynamic array facility +.SH SYNOPSIS +\fB#include "dyn_array.h"\fP +.sp +\fB#define DYN_ARRAY_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +.B "extern const char *const dyn_array_version; /* library version format: major.minor YYYY-MM-DD */" +.sp +.B "#define dyn_array_value(array, type, index) (((type *)(((struct dyn_array *)(array))->data))[(index)])" +.br +.B "#define dyn_array_addr(array, type, index) (((type *)(((struct dyn_array *)(array))->data))+(index))" +.br +.B "#define dyn_array_tell(array) (((struct dyn_array *)(array))->count)" +.br +.B "#define dyn_array_beyond(array, type) (dyn_array_addr(array, type, dyn_array_tell(array)))" +.br +.B "#define dyn_array_alloced(array) (((struct dyn_array *)(array))->allocated)" +.br +.B "#define dyn_array_avail(array) (dyn_array_alloced(array) - dyn_array_tell(array))" +.br +.B "#define dyn_array_rewind(array) (dyn_array_seek((struct dyn_array *)(array), 0, SEEK_SET))" +.sp +.B "extern struct dyn_array *dyn_array_create(size_t elm_size, intmax_t chunk, intmax_t start_elm_count, bool zeroize);" +.br +.B "extern void dyn_array_free(struct dyn_array *array);" +.br +.B "extern bool dyn_array_append_value(struct dyn_array *array, void *value_to_add);" +.br +.B "extern bool dyn_array_append_set(struct dyn_array *array, void *array_to_add_p, intmax_t count_of_elements_to_add);" +.br +.B "extern bool dyn_array_concat_array(struct dyn_array *array, struct dyn_array *other);" +.br +.B "extern bool dyn_array_seek(struct dyn_array *array, off_t offset, int whence);" +.br +.B "extern void dyn_array_clear(struct dyn_array *array);" +.SH DESCRIPTION +These macros and functions provide a way to create, modify and manipulate general purpose dynamic arrays. +.sp +The function +.B dyn_array_create() +creates a dynamic array where each element is of size +.IR elm_size . +The +.I chunk +and +.I start_elm_count +specify a fixed number of elements to expand by when allocating and the starting number of elements to allocate, respectively. +If +.I zeroize +is true the newly allocated chunks are zeroed. +The function always allocates one more chunk than requested to serve as a guard chunk. +This extra chunk will not be listed in the total element allocation count. +The function returns a pointer to the new dynamic array, a +.B struct dyn_array +(see below for details). +.sp +The function +.B dyn_array_append_value() +appends the single value +.I value_to_add +to the array +.IR array . +The array will grow if all allocated values are used. +The function will return true if the address of the array of elements moved during +.BR realloc (3). +Otherwise it returns false. +.sp +The function +.B dyn_array_append_set() +appends a set of values of a given array to the end of the dynamic array. +The +.I array +is a pointer to the dynamic array. +The +.I array_to_add_p +is a pointer to the array to add to the end of the dynamic array +.IR array . +The +.I count_of_elements_to_add +is the number of elements to add to the dynamic array. +If after adding the values of the array, all allocated values are used, the array will grow. +If the address of the array of elements moved during +.BR realloc (3) +the function returns true. +Otherwise it returns false. +.sp +The function +.B dyn_array_concat_array() +concatenates the dynamic array +.I other +to the +dynamic array +.IR array . +If the address of the array of elements moved during +.BR realloc (3) +the function returns true. +Otherwise it returns false. +The contents of the other array is not modified nor is it freed. +If after adding the values of the array, all allocated values are used, the dynamic array will grow. +.sp +The function +.B dyn_array_seek() +sets the elements in use in the dynamic array +.IR array . +The +.I offset +is the offset in elements from the +.I whence +which can be: +.RS +.TP +.B SEEK_SET +offset from the dynamic array beginning. +.TQ +.B SEEK_CUR +offset from the current element in use. +.TQ +.B SEEK_END +offset from the end of the allocated elements. +.RE +.sp 1 +The function will return true if the address of the array of elements moved during +.BR realloc (3) +and false otherwise. +Attempting to seek to or before the beginning of the array will have the effect of calling +.B dyn_array_clear() +as described below. +.PP +The function +.B dyn_array_clear() +will clear any element in use in the dynamic array +.I array +(if the +.I zeroize +boolean is true) and then set the number of elements in use to 0. +The function does not free allocated storage. +For that see +.BR dyn_array_free() . +.PP +The function +.B dyn_array_free() +frees the contents of the dynamic array +.BR array . +If +.I array->zeroize +is true and the data of the array is not NULL and the array has allocated nodes and the size of arrays is > 0 the function will clear the array data (via +.BR memset (3)) +first. +The function does not free the +.B struct dyn_array +itself: it only frees any allocated storage. +.SS Convenience macros +.PP +The following macros are available to help you with the dynamic arrays: +.TP +.B dyn_array_value() +obtains the element (the value) of the dynamic array +.I array +of type +.I type +at index +.I index +.TP +.B dyn_array_addr() +obtains the address of the dynamic array +.I array +of an element of type +.I type +at index +.IR index . +.TP +.B dyn_array_tell() +returns the current element count of the dynamic array +.IR array . +.TP +.B dyn_array_beyond() +returns the address of the element just beyond the elements in use in the dynamic array +.IR array . +.TP +.B dyn_array_alloced() +returns the number of elements allocated in memory for the dynamic array +.IR array . +.TP +.B dyn_array_avail() +returns the number of elements available (allocated but not in use) of the dynamic array +.IR array . +.TP +.B dyn_array_rewind() +rewinds the dynamic array +.I array +back to zero elements. +.SS The struct dyn_array +.PP +The +.I dyn_array +structure is defined in +.I dyn_array.h +as follows: +.sp +.in +4n +.nf +struct dyn_array +{ + size_t elm_size; /* Number of bytes for a single element */ + bool zeroize; /* true ==> always zero newly allocated chunks, false ==> don't */ + intmax_t count; /* Number of elements in use */ + intmax_t allocated; /* Number of elements allocated (>= count) */ + intmax_t chunk; /* Number of elements to expand by when allocating */ + void *data; /* allocated dynamic array of identical things or NULL */ +}; +.fi +.in +.SS Version string +The string +.BR dyn_array_version , +which points to +.BR DYN_ARRAY_VERSION , +is the current version of the +.B dyn_array +facility. +.SH RETURN VALUE +.PP +The function +.B dyn_array_create() +returns a pointer to a +.B struct dyn_array +which is the address of the newly allocated struct. +It does not return on error. +.PP +The functions +.BR dyn_array_append_value() \|, +.BR dyn_array_append_set() \|, +.BR dyn_array_concat_array() +and +.BR dyn_array_seek() +return true if the address of the array of elements moved during +.BR realloc (3). +Otherwise they return false. +.PP +The functions +.B dyn_array_clear() +and +.B dyn_array_free() +return void. +.SH EXAMPLE +For an example program that uses the dynamic array facility see the files +.I dyn_test.h +and +.IR dyn_test.c . +.SH HISTORY +The dyn_array facility was first written by Landon Curt Noll in 2014 for use in tools such as STS (see the https://github.com/arcetri/STS GitHub repo). diff --git a/dyn_array/man/man3/dyn_array_alloced.3 b/dyn_array/man/man3/dyn_array_alloced.3 deleted file mode 120000 index 920f68025..000000000 --- a/dyn_array/man/man3/dyn_array_alloced.3 +++ /dev/null @@ -1 +0,0 @@ -dyn_array.3 \ No newline at end of file diff --git a/dyn_array/man/man3/dyn_array_alloced.3 b/dyn_array/man/man3/dyn_array_alloced.3 new file mode 100644 index 000000000..f219ef562 --- /dev/null +++ b/dyn_array/man/man3/dyn_array_alloced.3 @@ -0,0 +1,278 @@ +.\" section 3 man page for dyn_array +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH dyn_array 3 "29 January 2023" "dyn_array" +.SH NAME +.BR dyn_array_value() \|, +.BR dyn_array_addr() \|, +.BR dyn_array_tell() \|, +.BR dyn_array_beyond() \|, +.BR dyn_array_alloced() \|, +.BR dyn_array_avail() \|, +.BR dyn_array_rewind() \|, +.BR dyn_array_create() \|, +.BR dyn_array_append_value() \|, +.BR dyn_array_append_set() \|, +.BR dyn_array_concat_array() \|, +.BR dyn_array_seek() \|, +.BR dyn_array_clear() \|, +.BR dyn_array_free() +\- dynamic array facility +.SH SYNOPSIS +\fB#include "dyn_array.h"\fP +.sp +\fB#define DYN_ARRAY_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +.B "extern const char *const dyn_array_version; /* library version format: major.minor YYYY-MM-DD */" +.sp +.B "#define dyn_array_value(array, type, index) (((type *)(((struct dyn_array *)(array))->data))[(index)])" +.br +.B "#define dyn_array_addr(array, type, index) (((type *)(((struct dyn_array *)(array))->data))+(index))" +.br +.B "#define dyn_array_tell(array) (((struct dyn_array *)(array))->count)" +.br +.B "#define dyn_array_beyond(array, type) (dyn_array_addr(array, type, dyn_array_tell(array)))" +.br +.B "#define dyn_array_alloced(array) (((struct dyn_array *)(array))->allocated)" +.br +.B "#define dyn_array_avail(array) (dyn_array_alloced(array) - dyn_array_tell(array))" +.br +.B "#define dyn_array_rewind(array) (dyn_array_seek((struct dyn_array *)(array), 0, SEEK_SET))" +.sp +.B "extern struct dyn_array *dyn_array_create(size_t elm_size, intmax_t chunk, intmax_t start_elm_count, bool zeroize);" +.br +.B "extern void dyn_array_free(struct dyn_array *array);" +.br +.B "extern bool dyn_array_append_value(struct dyn_array *array, void *value_to_add);" +.br +.B "extern bool dyn_array_append_set(struct dyn_array *array, void *array_to_add_p, intmax_t count_of_elements_to_add);" +.br +.B "extern bool dyn_array_concat_array(struct dyn_array *array, struct dyn_array *other);" +.br +.B "extern bool dyn_array_seek(struct dyn_array *array, off_t offset, int whence);" +.br +.B "extern void dyn_array_clear(struct dyn_array *array);" +.SH DESCRIPTION +These macros and functions provide a way to create, modify and manipulate general purpose dynamic arrays. +.sp +The function +.B dyn_array_create() +creates a dynamic array where each element is of size +.IR elm_size . +The +.I chunk +and +.I start_elm_count +specify a fixed number of elements to expand by when allocating and the starting number of elements to allocate, respectively. +If +.I zeroize +is true the newly allocated chunks are zeroed. +The function always allocates one more chunk than requested to serve as a guard chunk. +This extra chunk will not be listed in the total element allocation count. +The function returns a pointer to the new dynamic array, a +.B struct dyn_array +(see below for details). +.sp +The function +.B dyn_array_append_value() +appends the single value +.I value_to_add +to the array +.IR array . +The array will grow if all allocated values are used. +The function will return true if the address of the array of elements moved during +.BR realloc (3). +Otherwise it returns false. +.sp +The function +.B dyn_array_append_set() +appends a set of values of a given array to the end of the dynamic array. +The +.I array +is a pointer to the dynamic array. +The +.I array_to_add_p +is a pointer to the array to add to the end of the dynamic array +.IR array . +The +.I count_of_elements_to_add +is the number of elements to add to the dynamic array. +If after adding the values of the array, all allocated values are used, the array will grow. +If the address of the array of elements moved during +.BR realloc (3) +the function returns true. +Otherwise it returns false. +.sp +The function +.B dyn_array_concat_array() +concatenates the dynamic array +.I other +to the +dynamic array +.IR array . +If the address of the array of elements moved during +.BR realloc (3) +the function returns true. +Otherwise it returns false. +The contents of the other array is not modified nor is it freed. +If after adding the values of the array, all allocated values are used, the dynamic array will grow. +.sp +The function +.B dyn_array_seek() +sets the elements in use in the dynamic array +.IR array . +The +.I offset +is the offset in elements from the +.I whence +which can be: +.RS +.TP +.B SEEK_SET +offset from the dynamic array beginning. +.TQ +.B SEEK_CUR +offset from the current element in use. +.TQ +.B SEEK_END +offset from the end of the allocated elements. +.RE +.sp 1 +The function will return true if the address of the array of elements moved during +.BR realloc (3) +and false otherwise. +Attempting to seek to or before the beginning of the array will have the effect of calling +.B dyn_array_clear() +as described below. +.PP +The function +.B dyn_array_clear() +will clear any element in use in the dynamic array +.I array +(if the +.I zeroize +boolean is true) and then set the number of elements in use to 0. +The function does not free allocated storage. +For that see +.BR dyn_array_free() . +.PP +The function +.B dyn_array_free() +frees the contents of the dynamic array +.BR array . +If +.I array->zeroize +is true and the data of the array is not NULL and the array has allocated nodes and the size of arrays is > 0 the function will clear the array data (via +.BR memset (3)) +first. +The function does not free the +.B struct dyn_array +itself: it only frees any allocated storage. +.SS Convenience macros +.PP +The following macros are available to help you with the dynamic arrays: +.TP +.B dyn_array_value() +obtains the element (the value) of the dynamic array +.I array +of type +.I type +at index +.I index +.TP +.B dyn_array_addr() +obtains the address of the dynamic array +.I array +of an element of type +.I type +at index +.IR index . +.TP +.B dyn_array_tell() +returns the current element count of the dynamic array +.IR array . +.TP +.B dyn_array_beyond() +returns the address of the element just beyond the elements in use in the dynamic array +.IR array . +.TP +.B dyn_array_alloced() +returns the number of elements allocated in memory for the dynamic array +.IR array . +.TP +.B dyn_array_avail() +returns the number of elements available (allocated but not in use) of the dynamic array +.IR array . +.TP +.B dyn_array_rewind() +rewinds the dynamic array +.I array +back to zero elements. +.SS The struct dyn_array +.PP +The +.I dyn_array +structure is defined in +.I dyn_array.h +as follows: +.sp +.in +4n +.nf +struct dyn_array +{ + size_t elm_size; /* Number of bytes for a single element */ + bool zeroize; /* true ==> always zero newly allocated chunks, false ==> don't */ + intmax_t count; /* Number of elements in use */ + intmax_t allocated; /* Number of elements allocated (>= count) */ + intmax_t chunk; /* Number of elements to expand by when allocating */ + void *data; /* allocated dynamic array of identical things or NULL */ +}; +.fi +.in +.SS Version string +The string +.BR dyn_array_version , +which points to +.BR DYN_ARRAY_VERSION , +is the current version of the +.B dyn_array +facility. +.SH RETURN VALUE +.PP +The function +.B dyn_array_create() +returns a pointer to a +.B struct dyn_array +which is the address of the newly allocated struct. +It does not return on error. +.PP +The functions +.BR dyn_array_append_value() \|, +.BR dyn_array_append_set() \|, +.BR dyn_array_concat_array() +and +.BR dyn_array_seek() +return true if the address of the array of elements moved during +.BR realloc (3). +Otherwise they return false. +.PP +The functions +.B dyn_array_clear() +and +.B dyn_array_free() +return void. +.SH EXAMPLE +For an example program that uses the dynamic array facility see the files +.I dyn_test.h +and +.IR dyn_test.c . +.SH HISTORY +The dyn_array facility was first written by Landon Curt Noll in 2014 for use in tools such as STS (see the https://github.com/arcetri/STS GitHub repo). diff --git a/dyn_array/man/man3/dyn_array_append_set.3 b/dyn_array/man/man3/dyn_array_append_set.3 deleted file mode 120000 index 920f68025..000000000 --- a/dyn_array/man/man3/dyn_array_append_set.3 +++ /dev/null @@ -1 +0,0 @@ -dyn_array.3 \ No newline at end of file diff --git a/dyn_array/man/man3/dyn_array_append_set.3 b/dyn_array/man/man3/dyn_array_append_set.3 new file mode 100644 index 000000000..f219ef562 --- /dev/null +++ b/dyn_array/man/man3/dyn_array_append_set.3 @@ -0,0 +1,278 @@ +.\" section 3 man page for dyn_array +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH dyn_array 3 "29 January 2023" "dyn_array" +.SH NAME +.BR dyn_array_value() \|, +.BR dyn_array_addr() \|, +.BR dyn_array_tell() \|, +.BR dyn_array_beyond() \|, +.BR dyn_array_alloced() \|, +.BR dyn_array_avail() \|, +.BR dyn_array_rewind() \|, +.BR dyn_array_create() \|, +.BR dyn_array_append_value() \|, +.BR dyn_array_append_set() \|, +.BR dyn_array_concat_array() \|, +.BR dyn_array_seek() \|, +.BR dyn_array_clear() \|, +.BR dyn_array_free() +\- dynamic array facility +.SH SYNOPSIS +\fB#include "dyn_array.h"\fP +.sp +\fB#define DYN_ARRAY_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +.B "extern const char *const dyn_array_version; /* library version format: major.minor YYYY-MM-DD */" +.sp +.B "#define dyn_array_value(array, type, index) (((type *)(((struct dyn_array *)(array))->data))[(index)])" +.br +.B "#define dyn_array_addr(array, type, index) (((type *)(((struct dyn_array *)(array))->data))+(index))" +.br +.B "#define dyn_array_tell(array) (((struct dyn_array *)(array))->count)" +.br +.B "#define dyn_array_beyond(array, type) (dyn_array_addr(array, type, dyn_array_tell(array)))" +.br +.B "#define dyn_array_alloced(array) (((struct dyn_array *)(array))->allocated)" +.br +.B "#define dyn_array_avail(array) (dyn_array_alloced(array) - dyn_array_tell(array))" +.br +.B "#define dyn_array_rewind(array) (dyn_array_seek((struct dyn_array *)(array), 0, SEEK_SET))" +.sp +.B "extern struct dyn_array *dyn_array_create(size_t elm_size, intmax_t chunk, intmax_t start_elm_count, bool zeroize);" +.br +.B "extern void dyn_array_free(struct dyn_array *array);" +.br +.B "extern bool dyn_array_append_value(struct dyn_array *array, void *value_to_add);" +.br +.B "extern bool dyn_array_append_set(struct dyn_array *array, void *array_to_add_p, intmax_t count_of_elements_to_add);" +.br +.B "extern bool dyn_array_concat_array(struct dyn_array *array, struct dyn_array *other);" +.br +.B "extern bool dyn_array_seek(struct dyn_array *array, off_t offset, int whence);" +.br +.B "extern void dyn_array_clear(struct dyn_array *array);" +.SH DESCRIPTION +These macros and functions provide a way to create, modify and manipulate general purpose dynamic arrays. +.sp +The function +.B dyn_array_create() +creates a dynamic array where each element is of size +.IR elm_size . +The +.I chunk +and +.I start_elm_count +specify a fixed number of elements to expand by when allocating and the starting number of elements to allocate, respectively. +If +.I zeroize +is true the newly allocated chunks are zeroed. +The function always allocates one more chunk than requested to serve as a guard chunk. +This extra chunk will not be listed in the total element allocation count. +The function returns a pointer to the new dynamic array, a +.B struct dyn_array +(see below for details). +.sp +The function +.B dyn_array_append_value() +appends the single value +.I value_to_add +to the array +.IR array . +The array will grow if all allocated values are used. +The function will return true if the address of the array of elements moved during +.BR realloc (3). +Otherwise it returns false. +.sp +The function +.B dyn_array_append_set() +appends a set of values of a given array to the end of the dynamic array. +The +.I array +is a pointer to the dynamic array. +The +.I array_to_add_p +is a pointer to the array to add to the end of the dynamic array +.IR array . +The +.I count_of_elements_to_add +is the number of elements to add to the dynamic array. +If after adding the values of the array, all allocated values are used, the array will grow. +If the address of the array of elements moved during +.BR realloc (3) +the function returns true. +Otherwise it returns false. +.sp +The function +.B dyn_array_concat_array() +concatenates the dynamic array +.I other +to the +dynamic array +.IR array . +If the address of the array of elements moved during +.BR realloc (3) +the function returns true. +Otherwise it returns false. +The contents of the other array is not modified nor is it freed. +If after adding the values of the array, all allocated values are used, the dynamic array will grow. +.sp +The function +.B dyn_array_seek() +sets the elements in use in the dynamic array +.IR array . +The +.I offset +is the offset in elements from the +.I whence +which can be: +.RS +.TP +.B SEEK_SET +offset from the dynamic array beginning. +.TQ +.B SEEK_CUR +offset from the current element in use. +.TQ +.B SEEK_END +offset from the end of the allocated elements. +.RE +.sp 1 +The function will return true if the address of the array of elements moved during +.BR realloc (3) +and false otherwise. +Attempting to seek to or before the beginning of the array will have the effect of calling +.B dyn_array_clear() +as described below. +.PP +The function +.B dyn_array_clear() +will clear any element in use in the dynamic array +.I array +(if the +.I zeroize +boolean is true) and then set the number of elements in use to 0. +The function does not free allocated storage. +For that see +.BR dyn_array_free() . +.PP +The function +.B dyn_array_free() +frees the contents of the dynamic array +.BR array . +If +.I array->zeroize +is true and the data of the array is not NULL and the array has allocated nodes and the size of arrays is > 0 the function will clear the array data (via +.BR memset (3)) +first. +The function does not free the +.B struct dyn_array +itself: it only frees any allocated storage. +.SS Convenience macros +.PP +The following macros are available to help you with the dynamic arrays: +.TP +.B dyn_array_value() +obtains the element (the value) of the dynamic array +.I array +of type +.I type +at index +.I index +.TP +.B dyn_array_addr() +obtains the address of the dynamic array +.I array +of an element of type +.I type +at index +.IR index . +.TP +.B dyn_array_tell() +returns the current element count of the dynamic array +.IR array . +.TP +.B dyn_array_beyond() +returns the address of the element just beyond the elements in use in the dynamic array +.IR array . +.TP +.B dyn_array_alloced() +returns the number of elements allocated in memory for the dynamic array +.IR array . +.TP +.B dyn_array_avail() +returns the number of elements available (allocated but not in use) of the dynamic array +.IR array . +.TP +.B dyn_array_rewind() +rewinds the dynamic array +.I array +back to zero elements. +.SS The struct dyn_array +.PP +The +.I dyn_array +structure is defined in +.I dyn_array.h +as follows: +.sp +.in +4n +.nf +struct dyn_array +{ + size_t elm_size; /* Number of bytes for a single element */ + bool zeroize; /* true ==> always zero newly allocated chunks, false ==> don't */ + intmax_t count; /* Number of elements in use */ + intmax_t allocated; /* Number of elements allocated (>= count) */ + intmax_t chunk; /* Number of elements to expand by when allocating */ + void *data; /* allocated dynamic array of identical things or NULL */ +}; +.fi +.in +.SS Version string +The string +.BR dyn_array_version , +which points to +.BR DYN_ARRAY_VERSION , +is the current version of the +.B dyn_array +facility. +.SH RETURN VALUE +.PP +The function +.B dyn_array_create() +returns a pointer to a +.B struct dyn_array +which is the address of the newly allocated struct. +It does not return on error. +.PP +The functions +.BR dyn_array_append_value() \|, +.BR dyn_array_append_set() \|, +.BR dyn_array_concat_array() +and +.BR dyn_array_seek() +return true if the address of the array of elements moved during +.BR realloc (3). +Otherwise they return false. +.PP +The functions +.B dyn_array_clear() +and +.B dyn_array_free() +return void. +.SH EXAMPLE +For an example program that uses the dynamic array facility see the files +.I dyn_test.h +and +.IR dyn_test.c . +.SH HISTORY +The dyn_array facility was first written by Landon Curt Noll in 2014 for use in tools such as STS (see the https://github.com/arcetri/STS GitHub repo). diff --git a/dyn_array/man/man3/dyn_array_append_value.3 b/dyn_array/man/man3/dyn_array_append_value.3 deleted file mode 120000 index 920f68025..000000000 --- a/dyn_array/man/man3/dyn_array_append_value.3 +++ /dev/null @@ -1 +0,0 @@ -dyn_array.3 \ No newline at end of file diff --git a/dyn_array/man/man3/dyn_array_append_value.3 b/dyn_array/man/man3/dyn_array_append_value.3 new file mode 100644 index 000000000..f219ef562 --- /dev/null +++ b/dyn_array/man/man3/dyn_array_append_value.3 @@ -0,0 +1,278 @@ +.\" section 3 man page for dyn_array +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH dyn_array 3 "29 January 2023" "dyn_array" +.SH NAME +.BR dyn_array_value() \|, +.BR dyn_array_addr() \|, +.BR dyn_array_tell() \|, +.BR dyn_array_beyond() \|, +.BR dyn_array_alloced() \|, +.BR dyn_array_avail() \|, +.BR dyn_array_rewind() \|, +.BR dyn_array_create() \|, +.BR dyn_array_append_value() \|, +.BR dyn_array_append_set() \|, +.BR dyn_array_concat_array() \|, +.BR dyn_array_seek() \|, +.BR dyn_array_clear() \|, +.BR dyn_array_free() +\- dynamic array facility +.SH SYNOPSIS +\fB#include "dyn_array.h"\fP +.sp +\fB#define DYN_ARRAY_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +.B "extern const char *const dyn_array_version; /* library version format: major.minor YYYY-MM-DD */" +.sp +.B "#define dyn_array_value(array, type, index) (((type *)(((struct dyn_array *)(array))->data))[(index)])" +.br +.B "#define dyn_array_addr(array, type, index) (((type *)(((struct dyn_array *)(array))->data))+(index))" +.br +.B "#define dyn_array_tell(array) (((struct dyn_array *)(array))->count)" +.br +.B "#define dyn_array_beyond(array, type) (dyn_array_addr(array, type, dyn_array_tell(array)))" +.br +.B "#define dyn_array_alloced(array) (((struct dyn_array *)(array))->allocated)" +.br +.B "#define dyn_array_avail(array) (dyn_array_alloced(array) - dyn_array_tell(array))" +.br +.B "#define dyn_array_rewind(array) (dyn_array_seek((struct dyn_array *)(array), 0, SEEK_SET))" +.sp +.B "extern struct dyn_array *dyn_array_create(size_t elm_size, intmax_t chunk, intmax_t start_elm_count, bool zeroize);" +.br +.B "extern void dyn_array_free(struct dyn_array *array);" +.br +.B "extern bool dyn_array_append_value(struct dyn_array *array, void *value_to_add);" +.br +.B "extern bool dyn_array_append_set(struct dyn_array *array, void *array_to_add_p, intmax_t count_of_elements_to_add);" +.br +.B "extern bool dyn_array_concat_array(struct dyn_array *array, struct dyn_array *other);" +.br +.B "extern bool dyn_array_seek(struct dyn_array *array, off_t offset, int whence);" +.br +.B "extern void dyn_array_clear(struct dyn_array *array);" +.SH DESCRIPTION +These macros and functions provide a way to create, modify and manipulate general purpose dynamic arrays. +.sp +The function +.B dyn_array_create() +creates a dynamic array where each element is of size +.IR elm_size . +The +.I chunk +and +.I start_elm_count +specify a fixed number of elements to expand by when allocating and the starting number of elements to allocate, respectively. +If +.I zeroize +is true the newly allocated chunks are zeroed. +The function always allocates one more chunk than requested to serve as a guard chunk. +This extra chunk will not be listed in the total element allocation count. +The function returns a pointer to the new dynamic array, a +.B struct dyn_array +(see below for details). +.sp +The function +.B dyn_array_append_value() +appends the single value +.I value_to_add +to the array +.IR array . +The array will grow if all allocated values are used. +The function will return true if the address of the array of elements moved during +.BR realloc (3). +Otherwise it returns false. +.sp +The function +.B dyn_array_append_set() +appends a set of values of a given array to the end of the dynamic array. +The +.I array +is a pointer to the dynamic array. +The +.I array_to_add_p +is a pointer to the array to add to the end of the dynamic array +.IR array . +The +.I count_of_elements_to_add +is the number of elements to add to the dynamic array. +If after adding the values of the array, all allocated values are used, the array will grow. +If the address of the array of elements moved during +.BR realloc (3) +the function returns true. +Otherwise it returns false. +.sp +The function +.B dyn_array_concat_array() +concatenates the dynamic array +.I other +to the +dynamic array +.IR array . +If the address of the array of elements moved during +.BR realloc (3) +the function returns true. +Otherwise it returns false. +The contents of the other array is not modified nor is it freed. +If after adding the values of the array, all allocated values are used, the dynamic array will grow. +.sp +The function +.B dyn_array_seek() +sets the elements in use in the dynamic array +.IR array . +The +.I offset +is the offset in elements from the +.I whence +which can be: +.RS +.TP +.B SEEK_SET +offset from the dynamic array beginning. +.TQ +.B SEEK_CUR +offset from the current element in use. +.TQ +.B SEEK_END +offset from the end of the allocated elements. +.RE +.sp 1 +The function will return true if the address of the array of elements moved during +.BR realloc (3) +and false otherwise. +Attempting to seek to or before the beginning of the array will have the effect of calling +.B dyn_array_clear() +as described below. +.PP +The function +.B dyn_array_clear() +will clear any element in use in the dynamic array +.I array +(if the +.I zeroize +boolean is true) and then set the number of elements in use to 0. +The function does not free allocated storage. +For that see +.BR dyn_array_free() . +.PP +The function +.B dyn_array_free() +frees the contents of the dynamic array +.BR array . +If +.I array->zeroize +is true and the data of the array is not NULL and the array has allocated nodes and the size of arrays is > 0 the function will clear the array data (via +.BR memset (3)) +first. +The function does not free the +.B struct dyn_array +itself: it only frees any allocated storage. +.SS Convenience macros +.PP +The following macros are available to help you with the dynamic arrays: +.TP +.B dyn_array_value() +obtains the element (the value) of the dynamic array +.I array +of type +.I type +at index +.I index +.TP +.B dyn_array_addr() +obtains the address of the dynamic array +.I array +of an element of type +.I type +at index +.IR index . +.TP +.B dyn_array_tell() +returns the current element count of the dynamic array +.IR array . +.TP +.B dyn_array_beyond() +returns the address of the element just beyond the elements in use in the dynamic array +.IR array . +.TP +.B dyn_array_alloced() +returns the number of elements allocated in memory for the dynamic array +.IR array . +.TP +.B dyn_array_avail() +returns the number of elements available (allocated but not in use) of the dynamic array +.IR array . +.TP +.B dyn_array_rewind() +rewinds the dynamic array +.I array +back to zero elements. +.SS The struct dyn_array +.PP +The +.I dyn_array +structure is defined in +.I dyn_array.h +as follows: +.sp +.in +4n +.nf +struct dyn_array +{ + size_t elm_size; /* Number of bytes for a single element */ + bool zeroize; /* true ==> always zero newly allocated chunks, false ==> don't */ + intmax_t count; /* Number of elements in use */ + intmax_t allocated; /* Number of elements allocated (>= count) */ + intmax_t chunk; /* Number of elements to expand by when allocating */ + void *data; /* allocated dynamic array of identical things or NULL */ +}; +.fi +.in +.SS Version string +The string +.BR dyn_array_version , +which points to +.BR DYN_ARRAY_VERSION , +is the current version of the +.B dyn_array +facility. +.SH RETURN VALUE +.PP +The function +.B dyn_array_create() +returns a pointer to a +.B struct dyn_array +which is the address of the newly allocated struct. +It does not return on error. +.PP +The functions +.BR dyn_array_append_value() \|, +.BR dyn_array_append_set() \|, +.BR dyn_array_concat_array() +and +.BR dyn_array_seek() +return true if the address of the array of elements moved during +.BR realloc (3). +Otherwise they return false. +.PP +The functions +.B dyn_array_clear() +and +.B dyn_array_free() +return void. +.SH EXAMPLE +For an example program that uses the dynamic array facility see the files +.I dyn_test.h +and +.IR dyn_test.c . +.SH HISTORY +The dyn_array facility was first written by Landon Curt Noll in 2014 for use in tools such as STS (see the https://github.com/arcetri/STS GitHub repo). diff --git a/dyn_array/man/man3/dyn_array_avail.3 b/dyn_array/man/man3/dyn_array_avail.3 deleted file mode 120000 index 920f68025..000000000 --- a/dyn_array/man/man3/dyn_array_avail.3 +++ /dev/null @@ -1 +0,0 @@ -dyn_array.3 \ No newline at end of file diff --git a/dyn_array/man/man3/dyn_array_avail.3 b/dyn_array/man/man3/dyn_array_avail.3 new file mode 100644 index 000000000..f219ef562 --- /dev/null +++ b/dyn_array/man/man3/dyn_array_avail.3 @@ -0,0 +1,278 @@ +.\" section 3 man page for dyn_array +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH dyn_array 3 "29 January 2023" "dyn_array" +.SH NAME +.BR dyn_array_value() \|, +.BR dyn_array_addr() \|, +.BR dyn_array_tell() \|, +.BR dyn_array_beyond() \|, +.BR dyn_array_alloced() \|, +.BR dyn_array_avail() \|, +.BR dyn_array_rewind() \|, +.BR dyn_array_create() \|, +.BR dyn_array_append_value() \|, +.BR dyn_array_append_set() \|, +.BR dyn_array_concat_array() \|, +.BR dyn_array_seek() \|, +.BR dyn_array_clear() \|, +.BR dyn_array_free() +\- dynamic array facility +.SH SYNOPSIS +\fB#include "dyn_array.h"\fP +.sp +\fB#define DYN_ARRAY_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +.B "extern const char *const dyn_array_version; /* library version format: major.minor YYYY-MM-DD */" +.sp +.B "#define dyn_array_value(array, type, index) (((type *)(((struct dyn_array *)(array))->data))[(index)])" +.br +.B "#define dyn_array_addr(array, type, index) (((type *)(((struct dyn_array *)(array))->data))+(index))" +.br +.B "#define dyn_array_tell(array) (((struct dyn_array *)(array))->count)" +.br +.B "#define dyn_array_beyond(array, type) (dyn_array_addr(array, type, dyn_array_tell(array)))" +.br +.B "#define dyn_array_alloced(array) (((struct dyn_array *)(array))->allocated)" +.br +.B "#define dyn_array_avail(array) (dyn_array_alloced(array) - dyn_array_tell(array))" +.br +.B "#define dyn_array_rewind(array) (dyn_array_seek((struct dyn_array *)(array), 0, SEEK_SET))" +.sp +.B "extern struct dyn_array *dyn_array_create(size_t elm_size, intmax_t chunk, intmax_t start_elm_count, bool zeroize);" +.br +.B "extern void dyn_array_free(struct dyn_array *array);" +.br +.B "extern bool dyn_array_append_value(struct dyn_array *array, void *value_to_add);" +.br +.B "extern bool dyn_array_append_set(struct dyn_array *array, void *array_to_add_p, intmax_t count_of_elements_to_add);" +.br +.B "extern bool dyn_array_concat_array(struct dyn_array *array, struct dyn_array *other);" +.br +.B "extern bool dyn_array_seek(struct dyn_array *array, off_t offset, int whence);" +.br +.B "extern void dyn_array_clear(struct dyn_array *array);" +.SH DESCRIPTION +These macros and functions provide a way to create, modify and manipulate general purpose dynamic arrays. +.sp +The function +.B dyn_array_create() +creates a dynamic array where each element is of size +.IR elm_size . +The +.I chunk +and +.I start_elm_count +specify a fixed number of elements to expand by when allocating and the starting number of elements to allocate, respectively. +If +.I zeroize +is true the newly allocated chunks are zeroed. +The function always allocates one more chunk than requested to serve as a guard chunk. +This extra chunk will not be listed in the total element allocation count. +The function returns a pointer to the new dynamic array, a +.B struct dyn_array +(see below for details). +.sp +The function +.B dyn_array_append_value() +appends the single value +.I value_to_add +to the array +.IR array . +The array will grow if all allocated values are used. +The function will return true if the address of the array of elements moved during +.BR realloc (3). +Otherwise it returns false. +.sp +The function +.B dyn_array_append_set() +appends a set of values of a given array to the end of the dynamic array. +The +.I array +is a pointer to the dynamic array. +The +.I array_to_add_p +is a pointer to the array to add to the end of the dynamic array +.IR array . +The +.I count_of_elements_to_add +is the number of elements to add to the dynamic array. +If after adding the values of the array, all allocated values are used, the array will grow. +If the address of the array of elements moved during +.BR realloc (3) +the function returns true. +Otherwise it returns false. +.sp +The function +.B dyn_array_concat_array() +concatenates the dynamic array +.I other +to the +dynamic array +.IR array . +If the address of the array of elements moved during +.BR realloc (3) +the function returns true. +Otherwise it returns false. +The contents of the other array is not modified nor is it freed. +If after adding the values of the array, all allocated values are used, the dynamic array will grow. +.sp +The function +.B dyn_array_seek() +sets the elements in use in the dynamic array +.IR array . +The +.I offset +is the offset in elements from the +.I whence +which can be: +.RS +.TP +.B SEEK_SET +offset from the dynamic array beginning. +.TQ +.B SEEK_CUR +offset from the current element in use. +.TQ +.B SEEK_END +offset from the end of the allocated elements. +.RE +.sp 1 +The function will return true if the address of the array of elements moved during +.BR realloc (3) +and false otherwise. +Attempting to seek to or before the beginning of the array will have the effect of calling +.B dyn_array_clear() +as described below. +.PP +The function +.B dyn_array_clear() +will clear any element in use in the dynamic array +.I array +(if the +.I zeroize +boolean is true) and then set the number of elements in use to 0. +The function does not free allocated storage. +For that see +.BR dyn_array_free() . +.PP +The function +.B dyn_array_free() +frees the contents of the dynamic array +.BR array . +If +.I array->zeroize +is true and the data of the array is not NULL and the array has allocated nodes and the size of arrays is > 0 the function will clear the array data (via +.BR memset (3)) +first. +The function does not free the +.B struct dyn_array +itself: it only frees any allocated storage. +.SS Convenience macros +.PP +The following macros are available to help you with the dynamic arrays: +.TP +.B dyn_array_value() +obtains the element (the value) of the dynamic array +.I array +of type +.I type +at index +.I index +.TP +.B dyn_array_addr() +obtains the address of the dynamic array +.I array +of an element of type +.I type +at index +.IR index . +.TP +.B dyn_array_tell() +returns the current element count of the dynamic array +.IR array . +.TP +.B dyn_array_beyond() +returns the address of the element just beyond the elements in use in the dynamic array +.IR array . +.TP +.B dyn_array_alloced() +returns the number of elements allocated in memory for the dynamic array +.IR array . +.TP +.B dyn_array_avail() +returns the number of elements available (allocated but not in use) of the dynamic array +.IR array . +.TP +.B dyn_array_rewind() +rewinds the dynamic array +.I array +back to zero elements. +.SS The struct dyn_array +.PP +The +.I dyn_array +structure is defined in +.I dyn_array.h +as follows: +.sp +.in +4n +.nf +struct dyn_array +{ + size_t elm_size; /* Number of bytes for a single element */ + bool zeroize; /* true ==> always zero newly allocated chunks, false ==> don't */ + intmax_t count; /* Number of elements in use */ + intmax_t allocated; /* Number of elements allocated (>= count) */ + intmax_t chunk; /* Number of elements to expand by when allocating */ + void *data; /* allocated dynamic array of identical things or NULL */ +}; +.fi +.in +.SS Version string +The string +.BR dyn_array_version , +which points to +.BR DYN_ARRAY_VERSION , +is the current version of the +.B dyn_array +facility. +.SH RETURN VALUE +.PP +The function +.B dyn_array_create() +returns a pointer to a +.B struct dyn_array +which is the address of the newly allocated struct. +It does not return on error. +.PP +The functions +.BR dyn_array_append_value() \|, +.BR dyn_array_append_set() \|, +.BR dyn_array_concat_array() +and +.BR dyn_array_seek() +return true if the address of the array of elements moved during +.BR realloc (3). +Otherwise they return false. +.PP +The functions +.B dyn_array_clear() +and +.B dyn_array_free() +return void. +.SH EXAMPLE +For an example program that uses the dynamic array facility see the files +.I dyn_test.h +and +.IR dyn_test.c . +.SH HISTORY +The dyn_array facility was first written by Landon Curt Noll in 2014 for use in tools such as STS (see the https://github.com/arcetri/STS GitHub repo). diff --git a/dyn_array/man/man3/dyn_array_beyond.3 b/dyn_array/man/man3/dyn_array_beyond.3 deleted file mode 120000 index 920f68025..000000000 --- a/dyn_array/man/man3/dyn_array_beyond.3 +++ /dev/null @@ -1 +0,0 @@ -dyn_array.3 \ No newline at end of file diff --git a/dyn_array/man/man3/dyn_array_beyond.3 b/dyn_array/man/man3/dyn_array_beyond.3 new file mode 100644 index 000000000..f219ef562 --- /dev/null +++ b/dyn_array/man/man3/dyn_array_beyond.3 @@ -0,0 +1,278 @@ +.\" section 3 man page for dyn_array +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH dyn_array 3 "29 January 2023" "dyn_array" +.SH NAME +.BR dyn_array_value() \|, +.BR dyn_array_addr() \|, +.BR dyn_array_tell() \|, +.BR dyn_array_beyond() \|, +.BR dyn_array_alloced() \|, +.BR dyn_array_avail() \|, +.BR dyn_array_rewind() \|, +.BR dyn_array_create() \|, +.BR dyn_array_append_value() \|, +.BR dyn_array_append_set() \|, +.BR dyn_array_concat_array() \|, +.BR dyn_array_seek() \|, +.BR dyn_array_clear() \|, +.BR dyn_array_free() +\- dynamic array facility +.SH SYNOPSIS +\fB#include "dyn_array.h"\fP +.sp +\fB#define DYN_ARRAY_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +.B "extern const char *const dyn_array_version; /* library version format: major.minor YYYY-MM-DD */" +.sp +.B "#define dyn_array_value(array, type, index) (((type *)(((struct dyn_array *)(array))->data))[(index)])" +.br +.B "#define dyn_array_addr(array, type, index) (((type *)(((struct dyn_array *)(array))->data))+(index))" +.br +.B "#define dyn_array_tell(array) (((struct dyn_array *)(array))->count)" +.br +.B "#define dyn_array_beyond(array, type) (dyn_array_addr(array, type, dyn_array_tell(array)))" +.br +.B "#define dyn_array_alloced(array) (((struct dyn_array *)(array))->allocated)" +.br +.B "#define dyn_array_avail(array) (dyn_array_alloced(array) - dyn_array_tell(array))" +.br +.B "#define dyn_array_rewind(array) (dyn_array_seek((struct dyn_array *)(array), 0, SEEK_SET))" +.sp +.B "extern struct dyn_array *dyn_array_create(size_t elm_size, intmax_t chunk, intmax_t start_elm_count, bool zeroize);" +.br +.B "extern void dyn_array_free(struct dyn_array *array);" +.br +.B "extern bool dyn_array_append_value(struct dyn_array *array, void *value_to_add);" +.br +.B "extern bool dyn_array_append_set(struct dyn_array *array, void *array_to_add_p, intmax_t count_of_elements_to_add);" +.br +.B "extern bool dyn_array_concat_array(struct dyn_array *array, struct dyn_array *other);" +.br +.B "extern bool dyn_array_seek(struct dyn_array *array, off_t offset, int whence);" +.br +.B "extern void dyn_array_clear(struct dyn_array *array);" +.SH DESCRIPTION +These macros and functions provide a way to create, modify and manipulate general purpose dynamic arrays. +.sp +The function +.B dyn_array_create() +creates a dynamic array where each element is of size +.IR elm_size . +The +.I chunk +and +.I start_elm_count +specify a fixed number of elements to expand by when allocating and the starting number of elements to allocate, respectively. +If +.I zeroize +is true the newly allocated chunks are zeroed. +The function always allocates one more chunk than requested to serve as a guard chunk. +This extra chunk will not be listed in the total element allocation count. +The function returns a pointer to the new dynamic array, a +.B struct dyn_array +(see below for details). +.sp +The function +.B dyn_array_append_value() +appends the single value +.I value_to_add +to the array +.IR array . +The array will grow if all allocated values are used. +The function will return true if the address of the array of elements moved during +.BR realloc (3). +Otherwise it returns false. +.sp +The function +.B dyn_array_append_set() +appends a set of values of a given array to the end of the dynamic array. +The +.I array +is a pointer to the dynamic array. +The +.I array_to_add_p +is a pointer to the array to add to the end of the dynamic array +.IR array . +The +.I count_of_elements_to_add +is the number of elements to add to the dynamic array. +If after adding the values of the array, all allocated values are used, the array will grow. +If the address of the array of elements moved during +.BR realloc (3) +the function returns true. +Otherwise it returns false. +.sp +The function +.B dyn_array_concat_array() +concatenates the dynamic array +.I other +to the +dynamic array +.IR array . +If the address of the array of elements moved during +.BR realloc (3) +the function returns true. +Otherwise it returns false. +The contents of the other array is not modified nor is it freed. +If after adding the values of the array, all allocated values are used, the dynamic array will grow. +.sp +The function +.B dyn_array_seek() +sets the elements in use in the dynamic array +.IR array . +The +.I offset +is the offset in elements from the +.I whence +which can be: +.RS +.TP +.B SEEK_SET +offset from the dynamic array beginning. +.TQ +.B SEEK_CUR +offset from the current element in use. +.TQ +.B SEEK_END +offset from the end of the allocated elements. +.RE +.sp 1 +The function will return true if the address of the array of elements moved during +.BR realloc (3) +and false otherwise. +Attempting to seek to or before the beginning of the array will have the effect of calling +.B dyn_array_clear() +as described below. +.PP +The function +.B dyn_array_clear() +will clear any element in use in the dynamic array +.I array +(if the +.I zeroize +boolean is true) and then set the number of elements in use to 0. +The function does not free allocated storage. +For that see +.BR dyn_array_free() . +.PP +The function +.B dyn_array_free() +frees the contents of the dynamic array +.BR array . +If +.I array->zeroize +is true and the data of the array is not NULL and the array has allocated nodes and the size of arrays is > 0 the function will clear the array data (via +.BR memset (3)) +first. +The function does not free the +.B struct dyn_array +itself: it only frees any allocated storage. +.SS Convenience macros +.PP +The following macros are available to help you with the dynamic arrays: +.TP +.B dyn_array_value() +obtains the element (the value) of the dynamic array +.I array +of type +.I type +at index +.I index +.TP +.B dyn_array_addr() +obtains the address of the dynamic array +.I array +of an element of type +.I type +at index +.IR index . +.TP +.B dyn_array_tell() +returns the current element count of the dynamic array +.IR array . +.TP +.B dyn_array_beyond() +returns the address of the element just beyond the elements in use in the dynamic array +.IR array . +.TP +.B dyn_array_alloced() +returns the number of elements allocated in memory for the dynamic array +.IR array . +.TP +.B dyn_array_avail() +returns the number of elements available (allocated but not in use) of the dynamic array +.IR array . +.TP +.B dyn_array_rewind() +rewinds the dynamic array +.I array +back to zero elements. +.SS The struct dyn_array +.PP +The +.I dyn_array +structure is defined in +.I dyn_array.h +as follows: +.sp +.in +4n +.nf +struct dyn_array +{ + size_t elm_size; /* Number of bytes for a single element */ + bool zeroize; /* true ==> always zero newly allocated chunks, false ==> don't */ + intmax_t count; /* Number of elements in use */ + intmax_t allocated; /* Number of elements allocated (>= count) */ + intmax_t chunk; /* Number of elements to expand by when allocating */ + void *data; /* allocated dynamic array of identical things or NULL */ +}; +.fi +.in +.SS Version string +The string +.BR dyn_array_version , +which points to +.BR DYN_ARRAY_VERSION , +is the current version of the +.B dyn_array +facility. +.SH RETURN VALUE +.PP +The function +.B dyn_array_create() +returns a pointer to a +.B struct dyn_array +which is the address of the newly allocated struct. +It does not return on error. +.PP +The functions +.BR dyn_array_append_value() \|, +.BR dyn_array_append_set() \|, +.BR dyn_array_concat_array() +and +.BR dyn_array_seek() +return true if the address of the array of elements moved during +.BR realloc (3). +Otherwise they return false. +.PP +The functions +.B dyn_array_clear() +and +.B dyn_array_free() +return void. +.SH EXAMPLE +For an example program that uses the dynamic array facility see the files +.I dyn_test.h +and +.IR dyn_test.c . +.SH HISTORY +The dyn_array facility was first written by Landon Curt Noll in 2014 for use in tools such as STS (see the https://github.com/arcetri/STS GitHub repo). diff --git a/dyn_array/man/man3/dyn_array_clear.3 b/dyn_array/man/man3/dyn_array_clear.3 deleted file mode 120000 index 920f68025..000000000 --- a/dyn_array/man/man3/dyn_array_clear.3 +++ /dev/null @@ -1 +0,0 @@ -dyn_array.3 \ No newline at end of file diff --git a/dyn_array/man/man3/dyn_array_clear.3 b/dyn_array/man/man3/dyn_array_clear.3 new file mode 100644 index 000000000..f219ef562 --- /dev/null +++ b/dyn_array/man/man3/dyn_array_clear.3 @@ -0,0 +1,278 @@ +.\" section 3 man page for dyn_array +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH dyn_array 3 "29 January 2023" "dyn_array" +.SH NAME +.BR dyn_array_value() \|, +.BR dyn_array_addr() \|, +.BR dyn_array_tell() \|, +.BR dyn_array_beyond() \|, +.BR dyn_array_alloced() \|, +.BR dyn_array_avail() \|, +.BR dyn_array_rewind() \|, +.BR dyn_array_create() \|, +.BR dyn_array_append_value() \|, +.BR dyn_array_append_set() \|, +.BR dyn_array_concat_array() \|, +.BR dyn_array_seek() \|, +.BR dyn_array_clear() \|, +.BR dyn_array_free() +\- dynamic array facility +.SH SYNOPSIS +\fB#include "dyn_array.h"\fP +.sp +\fB#define DYN_ARRAY_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +.B "extern const char *const dyn_array_version; /* library version format: major.minor YYYY-MM-DD */" +.sp +.B "#define dyn_array_value(array, type, index) (((type *)(((struct dyn_array *)(array))->data))[(index)])" +.br +.B "#define dyn_array_addr(array, type, index) (((type *)(((struct dyn_array *)(array))->data))+(index))" +.br +.B "#define dyn_array_tell(array) (((struct dyn_array *)(array))->count)" +.br +.B "#define dyn_array_beyond(array, type) (dyn_array_addr(array, type, dyn_array_tell(array)))" +.br +.B "#define dyn_array_alloced(array) (((struct dyn_array *)(array))->allocated)" +.br +.B "#define dyn_array_avail(array) (dyn_array_alloced(array) - dyn_array_tell(array))" +.br +.B "#define dyn_array_rewind(array) (dyn_array_seek((struct dyn_array *)(array), 0, SEEK_SET))" +.sp +.B "extern struct dyn_array *dyn_array_create(size_t elm_size, intmax_t chunk, intmax_t start_elm_count, bool zeroize);" +.br +.B "extern void dyn_array_free(struct dyn_array *array);" +.br +.B "extern bool dyn_array_append_value(struct dyn_array *array, void *value_to_add);" +.br +.B "extern bool dyn_array_append_set(struct dyn_array *array, void *array_to_add_p, intmax_t count_of_elements_to_add);" +.br +.B "extern bool dyn_array_concat_array(struct dyn_array *array, struct dyn_array *other);" +.br +.B "extern bool dyn_array_seek(struct dyn_array *array, off_t offset, int whence);" +.br +.B "extern void dyn_array_clear(struct dyn_array *array);" +.SH DESCRIPTION +These macros and functions provide a way to create, modify and manipulate general purpose dynamic arrays. +.sp +The function +.B dyn_array_create() +creates a dynamic array where each element is of size +.IR elm_size . +The +.I chunk +and +.I start_elm_count +specify a fixed number of elements to expand by when allocating and the starting number of elements to allocate, respectively. +If +.I zeroize +is true the newly allocated chunks are zeroed. +The function always allocates one more chunk than requested to serve as a guard chunk. +This extra chunk will not be listed in the total element allocation count. +The function returns a pointer to the new dynamic array, a +.B struct dyn_array +(see below for details). +.sp +The function +.B dyn_array_append_value() +appends the single value +.I value_to_add +to the array +.IR array . +The array will grow if all allocated values are used. +The function will return true if the address of the array of elements moved during +.BR realloc (3). +Otherwise it returns false. +.sp +The function +.B dyn_array_append_set() +appends a set of values of a given array to the end of the dynamic array. +The +.I array +is a pointer to the dynamic array. +The +.I array_to_add_p +is a pointer to the array to add to the end of the dynamic array +.IR array . +The +.I count_of_elements_to_add +is the number of elements to add to the dynamic array. +If after adding the values of the array, all allocated values are used, the array will grow. +If the address of the array of elements moved during +.BR realloc (3) +the function returns true. +Otherwise it returns false. +.sp +The function +.B dyn_array_concat_array() +concatenates the dynamic array +.I other +to the +dynamic array +.IR array . +If the address of the array of elements moved during +.BR realloc (3) +the function returns true. +Otherwise it returns false. +The contents of the other array is not modified nor is it freed. +If after adding the values of the array, all allocated values are used, the dynamic array will grow. +.sp +The function +.B dyn_array_seek() +sets the elements in use in the dynamic array +.IR array . +The +.I offset +is the offset in elements from the +.I whence +which can be: +.RS +.TP +.B SEEK_SET +offset from the dynamic array beginning. +.TQ +.B SEEK_CUR +offset from the current element in use. +.TQ +.B SEEK_END +offset from the end of the allocated elements. +.RE +.sp 1 +The function will return true if the address of the array of elements moved during +.BR realloc (3) +and false otherwise. +Attempting to seek to or before the beginning of the array will have the effect of calling +.B dyn_array_clear() +as described below. +.PP +The function +.B dyn_array_clear() +will clear any element in use in the dynamic array +.I array +(if the +.I zeroize +boolean is true) and then set the number of elements in use to 0. +The function does not free allocated storage. +For that see +.BR dyn_array_free() . +.PP +The function +.B dyn_array_free() +frees the contents of the dynamic array +.BR array . +If +.I array->zeroize +is true and the data of the array is not NULL and the array has allocated nodes and the size of arrays is > 0 the function will clear the array data (via +.BR memset (3)) +first. +The function does not free the +.B struct dyn_array +itself: it only frees any allocated storage. +.SS Convenience macros +.PP +The following macros are available to help you with the dynamic arrays: +.TP +.B dyn_array_value() +obtains the element (the value) of the dynamic array +.I array +of type +.I type +at index +.I index +.TP +.B dyn_array_addr() +obtains the address of the dynamic array +.I array +of an element of type +.I type +at index +.IR index . +.TP +.B dyn_array_tell() +returns the current element count of the dynamic array +.IR array . +.TP +.B dyn_array_beyond() +returns the address of the element just beyond the elements in use in the dynamic array +.IR array . +.TP +.B dyn_array_alloced() +returns the number of elements allocated in memory for the dynamic array +.IR array . +.TP +.B dyn_array_avail() +returns the number of elements available (allocated but not in use) of the dynamic array +.IR array . +.TP +.B dyn_array_rewind() +rewinds the dynamic array +.I array +back to zero elements. +.SS The struct dyn_array +.PP +The +.I dyn_array +structure is defined in +.I dyn_array.h +as follows: +.sp +.in +4n +.nf +struct dyn_array +{ + size_t elm_size; /* Number of bytes for a single element */ + bool zeroize; /* true ==> always zero newly allocated chunks, false ==> don't */ + intmax_t count; /* Number of elements in use */ + intmax_t allocated; /* Number of elements allocated (>= count) */ + intmax_t chunk; /* Number of elements to expand by when allocating */ + void *data; /* allocated dynamic array of identical things or NULL */ +}; +.fi +.in +.SS Version string +The string +.BR dyn_array_version , +which points to +.BR DYN_ARRAY_VERSION , +is the current version of the +.B dyn_array +facility. +.SH RETURN VALUE +.PP +The function +.B dyn_array_create() +returns a pointer to a +.B struct dyn_array +which is the address of the newly allocated struct. +It does not return on error. +.PP +The functions +.BR dyn_array_append_value() \|, +.BR dyn_array_append_set() \|, +.BR dyn_array_concat_array() +and +.BR dyn_array_seek() +return true if the address of the array of elements moved during +.BR realloc (3). +Otherwise they return false. +.PP +The functions +.B dyn_array_clear() +and +.B dyn_array_free() +return void. +.SH EXAMPLE +For an example program that uses the dynamic array facility see the files +.I dyn_test.h +and +.IR dyn_test.c . +.SH HISTORY +The dyn_array facility was first written by Landon Curt Noll in 2014 for use in tools such as STS (see the https://github.com/arcetri/STS GitHub repo). diff --git a/dyn_array/man/man3/dyn_array_concat_array.3 b/dyn_array/man/man3/dyn_array_concat_array.3 deleted file mode 120000 index 920f68025..000000000 --- a/dyn_array/man/man3/dyn_array_concat_array.3 +++ /dev/null @@ -1 +0,0 @@ -dyn_array.3 \ No newline at end of file diff --git a/dyn_array/man/man3/dyn_array_concat_array.3 b/dyn_array/man/man3/dyn_array_concat_array.3 new file mode 100644 index 000000000..f219ef562 --- /dev/null +++ b/dyn_array/man/man3/dyn_array_concat_array.3 @@ -0,0 +1,278 @@ +.\" section 3 man page for dyn_array +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH dyn_array 3 "29 January 2023" "dyn_array" +.SH NAME +.BR dyn_array_value() \|, +.BR dyn_array_addr() \|, +.BR dyn_array_tell() \|, +.BR dyn_array_beyond() \|, +.BR dyn_array_alloced() \|, +.BR dyn_array_avail() \|, +.BR dyn_array_rewind() \|, +.BR dyn_array_create() \|, +.BR dyn_array_append_value() \|, +.BR dyn_array_append_set() \|, +.BR dyn_array_concat_array() \|, +.BR dyn_array_seek() \|, +.BR dyn_array_clear() \|, +.BR dyn_array_free() +\- dynamic array facility +.SH SYNOPSIS +\fB#include "dyn_array.h"\fP +.sp +\fB#define DYN_ARRAY_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +.B "extern const char *const dyn_array_version; /* library version format: major.minor YYYY-MM-DD */" +.sp +.B "#define dyn_array_value(array, type, index) (((type *)(((struct dyn_array *)(array))->data))[(index)])" +.br +.B "#define dyn_array_addr(array, type, index) (((type *)(((struct dyn_array *)(array))->data))+(index))" +.br +.B "#define dyn_array_tell(array) (((struct dyn_array *)(array))->count)" +.br +.B "#define dyn_array_beyond(array, type) (dyn_array_addr(array, type, dyn_array_tell(array)))" +.br +.B "#define dyn_array_alloced(array) (((struct dyn_array *)(array))->allocated)" +.br +.B "#define dyn_array_avail(array) (dyn_array_alloced(array) - dyn_array_tell(array))" +.br +.B "#define dyn_array_rewind(array) (dyn_array_seek((struct dyn_array *)(array), 0, SEEK_SET))" +.sp +.B "extern struct dyn_array *dyn_array_create(size_t elm_size, intmax_t chunk, intmax_t start_elm_count, bool zeroize);" +.br +.B "extern void dyn_array_free(struct dyn_array *array);" +.br +.B "extern bool dyn_array_append_value(struct dyn_array *array, void *value_to_add);" +.br +.B "extern bool dyn_array_append_set(struct dyn_array *array, void *array_to_add_p, intmax_t count_of_elements_to_add);" +.br +.B "extern bool dyn_array_concat_array(struct dyn_array *array, struct dyn_array *other);" +.br +.B "extern bool dyn_array_seek(struct dyn_array *array, off_t offset, int whence);" +.br +.B "extern void dyn_array_clear(struct dyn_array *array);" +.SH DESCRIPTION +These macros and functions provide a way to create, modify and manipulate general purpose dynamic arrays. +.sp +The function +.B dyn_array_create() +creates a dynamic array where each element is of size +.IR elm_size . +The +.I chunk +and +.I start_elm_count +specify a fixed number of elements to expand by when allocating and the starting number of elements to allocate, respectively. +If +.I zeroize +is true the newly allocated chunks are zeroed. +The function always allocates one more chunk than requested to serve as a guard chunk. +This extra chunk will not be listed in the total element allocation count. +The function returns a pointer to the new dynamic array, a +.B struct dyn_array +(see below for details). +.sp +The function +.B dyn_array_append_value() +appends the single value +.I value_to_add +to the array +.IR array . +The array will grow if all allocated values are used. +The function will return true if the address of the array of elements moved during +.BR realloc (3). +Otherwise it returns false. +.sp +The function +.B dyn_array_append_set() +appends a set of values of a given array to the end of the dynamic array. +The +.I array +is a pointer to the dynamic array. +The +.I array_to_add_p +is a pointer to the array to add to the end of the dynamic array +.IR array . +The +.I count_of_elements_to_add +is the number of elements to add to the dynamic array. +If after adding the values of the array, all allocated values are used, the array will grow. +If the address of the array of elements moved during +.BR realloc (3) +the function returns true. +Otherwise it returns false. +.sp +The function +.B dyn_array_concat_array() +concatenates the dynamic array +.I other +to the +dynamic array +.IR array . +If the address of the array of elements moved during +.BR realloc (3) +the function returns true. +Otherwise it returns false. +The contents of the other array is not modified nor is it freed. +If after adding the values of the array, all allocated values are used, the dynamic array will grow. +.sp +The function +.B dyn_array_seek() +sets the elements in use in the dynamic array +.IR array . +The +.I offset +is the offset in elements from the +.I whence +which can be: +.RS +.TP +.B SEEK_SET +offset from the dynamic array beginning. +.TQ +.B SEEK_CUR +offset from the current element in use. +.TQ +.B SEEK_END +offset from the end of the allocated elements. +.RE +.sp 1 +The function will return true if the address of the array of elements moved during +.BR realloc (3) +and false otherwise. +Attempting to seek to or before the beginning of the array will have the effect of calling +.B dyn_array_clear() +as described below. +.PP +The function +.B dyn_array_clear() +will clear any element in use in the dynamic array +.I array +(if the +.I zeroize +boolean is true) and then set the number of elements in use to 0. +The function does not free allocated storage. +For that see +.BR dyn_array_free() . +.PP +The function +.B dyn_array_free() +frees the contents of the dynamic array +.BR array . +If +.I array->zeroize +is true and the data of the array is not NULL and the array has allocated nodes and the size of arrays is > 0 the function will clear the array data (via +.BR memset (3)) +first. +The function does not free the +.B struct dyn_array +itself: it only frees any allocated storage. +.SS Convenience macros +.PP +The following macros are available to help you with the dynamic arrays: +.TP +.B dyn_array_value() +obtains the element (the value) of the dynamic array +.I array +of type +.I type +at index +.I index +.TP +.B dyn_array_addr() +obtains the address of the dynamic array +.I array +of an element of type +.I type +at index +.IR index . +.TP +.B dyn_array_tell() +returns the current element count of the dynamic array +.IR array . +.TP +.B dyn_array_beyond() +returns the address of the element just beyond the elements in use in the dynamic array +.IR array . +.TP +.B dyn_array_alloced() +returns the number of elements allocated in memory for the dynamic array +.IR array . +.TP +.B dyn_array_avail() +returns the number of elements available (allocated but not in use) of the dynamic array +.IR array . +.TP +.B dyn_array_rewind() +rewinds the dynamic array +.I array +back to zero elements. +.SS The struct dyn_array +.PP +The +.I dyn_array +structure is defined in +.I dyn_array.h +as follows: +.sp +.in +4n +.nf +struct dyn_array +{ + size_t elm_size; /* Number of bytes for a single element */ + bool zeroize; /* true ==> always zero newly allocated chunks, false ==> don't */ + intmax_t count; /* Number of elements in use */ + intmax_t allocated; /* Number of elements allocated (>= count) */ + intmax_t chunk; /* Number of elements to expand by when allocating */ + void *data; /* allocated dynamic array of identical things or NULL */ +}; +.fi +.in +.SS Version string +The string +.BR dyn_array_version , +which points to +.BR DYN_ARRAY_VERSION , +is the current version of the +.B dyn_array +facility. +.SH RETURN VALUE +.PP +The function +.B dyn_array_create() +returns a pointer to a +.B struct dyn_array +which is the address of the newly allocated struct. +It does not return on error. +.PP +The functions +.BR dyn_array_append_value() \|, +.BR dyn_array_append_set() \|, +.BR dyn_array_concat_array() +and +.BR dyn_array_seek() +return true if the address of the array of elements moved during +.BR realloc (3). +Otherwise they return false. +.PP +The functions +.B dyn_array_clear() +and +.B dyn_array_free() +return void. +.SH EXAMPLE +For an example program that uses the dynamic array facility see the files +.I dyn_test.h +and +.IR dyn_test.c . +.SH HISTORY +The dyn_array facility was first written by Landon Curt Noll in 2014 for use in tools such as STS (see the https://github.com/arcetri/STS GitHub repo). diff --git a/dyn_array/man/man3/dyn_array_create.3 b/dyn_array/man/man3/dyn_array_create.3 deleted file mode 120000 index 920f68025..000000000 --- a/dyn_array/man/man3/dyn_array_create.3 +++ /dev/null @@ -1 +0,0 @@ -dyn_array.3 \ No newline at end of file diff --git a/dyn_array/man/man3/dyn_array_create.3 b/dyn_array/man/man3/dyn_array_create.3 new file mode 100644 index 000000000..f219ef562 --- /dev/null +++ b/dyn_array/man/man3/dyn_array_create.3 @@ -0,0 +1,278 @@ +.\" section 3 man page for dyn_array +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH dyn_array 3 "29 January 2023" "dyn_array" +.SH NAME +.BR dyn_array_value() \|, +.BR dyn_array_addr() \|, +.BR dyn_array_tell() \|, +.BR dyn_array_beyond() \|, +.BR dyn_array_alloced() \|, +.BR dyn_array_avail() \|, +.BR dyn_array_rewind() \|, +.BR dyn_array_create() \|, +.BR dyn_array_append_value() \|, +.BR dyn_array_append_set() \|, +.BR dyn_array_concat_array() \|, +.BR dyn_array_seek() \|, +.BR dyn_array_clear() \|, +.BR dyn_array_free() +\- dynamic array facility +.SH SYNOPSIS +\fB#include "dyn_array.h"\fP +.sp +\fB#define DYN_ARRAY_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +.B "extern const char *const dyn_array_version; /* library version format: major.minor YYYY-MM-DD */" +.sp +.B "#define dyn_array_value(array, type, index) (((type *)(((struct dyn_array *)(array))->data))[(index)])" +.br +.B "#define dyn_array_addr(array, type, index) (((type *)(((struct dyn_array *)(array))->data))+(index))" +.br +.B "#define dyn_array_tell(array) (((struct dyn_array *)(array))->count)" +.br +.B "#define dyn_array_beyond(array, type) (dyn_array_addr(array, type, dyn_array_tell(array)))" +.br +.B "#define dyn_array_alloced(array) (((struct dyn_array *)(array))->allocated)" +.br +.B "#define dyn_array_avail(array) (dyn_array_alloced(array) - dyn_array_tell(array))" +.br +.B "#define dyn_array_rewind(array) (dyn_array_seek((struct dyn_array *)(array), 0, SEEK_SET))" +.sp +.B "extern struct dyn_array *dyn_array_create(size_t elm_size, intmax_t chunk, intmax_t start_elm_count, bool zeroize);" +.br +.B "extern void dyn_array_free(struct dyn_array *array);" +.br +.B "extern bool dyn_array_append_value(struct dyn_array *array, void *value_to_add);" +.br +.B "extern bool dyn_array_append_set(struct dyn_array *array, void *array_to_add_p, intmax_t count_of_elements_to_add);" +.br +.B "extern bool dyn_array_concat_array(struct dyn_array *array, struct dyn_array *other);" +.br +.B "extern bool dyn_array_seek(struct dyn_array *array, off_t offset, int whence);" +.br +.B "extern void dyn_array_clear(struct dyn_array *array);" +.SH DESCRIPTION +These macros and functions provide a way to create, modify and manipulate general purpose dynamic arrays. +.sp +The function +.B dyn_array_create() +creates a dynamic array where each element is of size +.IR elm_size . +The +.I chunk +and +.I start_elm_count +specify a fixed number of elements to expand by when allocating and the starting number of elements to allocate, respectively. +If +.I zeroize +is true the newly allocated chunks are zeroed. +The function always allocates one more chunk than requested to serve as a guard chunk. +This extra chunk will not be listed in the total element allocation count. +The function returns a pointer to the new dynamic array, a +.B struct dyn_array +(see below for details). +.sp +The function +.B dyn_array_append_value() +appends the single value +.I value_to_add +to the array +.IR array . +The array will grow if all allocated values are used. +The function will return true if the address of the array of elements moved during +.BR realloc (3). +Otherwise it returns false. +.sp +The function +.B dyn_array_append_set() +appends a set of values of a given array to the end of the dynamic array. +The +.I array +is a pointer to the dynamic array. +The +.I array_to_add_p +is a pointer to the array to add to the end of the dynamic array +.IR array . +The +.I count_of_elements_to_add +is the number of elements to add to the dynamic array. +If after adding the values of the array, all allocated values are used, the array will grow. +If the address of the array of elements moved during +.BR realloc (3) +the function returns true. +Otherwise it returns false. +.sp +The function +.B dyn_array_concat_array() +concatenates the dynamic array +.I other +to the +dynamic array +.IR array . +If the address of the array of elements moved during +.BR realloc (3) +the function returns true. +Otherwise it returns false. +The contents of the other array is not modified nor is it freed. +If after adding the values of the array, all allocated values are used, the dynamic array will grow. +.sp +The function +.B dyn_array_seek() +sets the elements in use in the dynamic array +.IR array . +The +.I offset +is the offset in elements from the +.I whence +which can be: +.RS +.TP +.B SEEK_SET +offset from the dynamic array beginning. +.TQ +.B SEEK_CUR +offset from the current element in use. +.TQ +.B SEEK_END +offset from the end of the allocated elements. +.RE +.sp 1 +The function will return true if the address of the array of elements moved during +.BR realloc (3) +and false otherwise. +Attempting to seek to or before the beginning of the array will have the effect of calling +.B dyn_array_clear() +as described below. +.PP +The function +.B dyn_array_clear() +will clear any element in use in the dynamic array +.I array +(if the +.I zeroize +boolean is true) and then set the number of elements in use to 0. +The function does not free allocated storage. +For that see +.BR dyn_array_free() . +.PP +The function +.B dyn_array_free() +frees the contents of the dynamic array +.BR array . +If +.I array->zeroize +is true and the data of the array is not NULL and the array has allocated nodes and the size of arrays is > 0 the function will clear the array data (via +.BR memset (3)) +first. +The function does not free the +.B struct dyn_array +itself: it only frees any allocated storage. +.SS Convenience macros +.PP +The following macros are available to help you with the dynamic arrays: +.TP +.B dyn_array_value() +obtains the element (the value) of the dynamic array +.I array +of type +.I type +at index +.I index +.TP +.B dyn_array_addr() +obtains the address of the dynamic array +.I array +of an element of type +.I type +at index +.IR index . +.TP +.B dyn_array_tell() +returns the current element count of the dynamic array +.IR array . +.TP +.B dyn_array_beyond() +returns the address of the element just beyond the elements in use in the dynamic array +.IR array . +.TP +.B dyn_array_alloced() +returns the number of elements allocated in memory for the dynamic array +.IR array . +.TP +.B dyn_array_avail() +returns the number of elements available (allocated but not in use) of the dynamic array +.IR array . +.TP +.B dyn_array_rewind() +rewinds the dynamic array +.I array +back to zero elements. +.SS The struct dyn_array +.PP +The +.I dyn_array +structure is defined in +.I dyn_array.h +as follows: +.sp +.in +4n +.nf +struct dyn_array +{ + size_t elm_size; /* Number of bytes for a single element */ + bool zeroize; /* true ==> always zero newly allocated chunks, false ==> don't */ + intmax_t count; /* Number of elements in use */ + intmax_t allocated; /* Number of elements allocated (>= count) */ + intmax_t chunk; /* Number of elements to expand by when allocating */ + void *data; /* allocated dynamic array of identical things or NULL */ +}; +.fi +.in +.SS Version string +The string +.BR dyn_array_version , +which points to +.BR DYN_ARRAY_VERSION , +is the current version of the +.B dyn_array +facility. +.SH RETURN VALUE +.PP +The function +.B dyn_array_create() +returns a pointer to a +.B struct dyn_array +which is the address of the newly allocated struct. +It does not return on error. +.PP +The functions +.BR dyn_array_append_value() \|, +.BR dyn_array_append_set() \|, +.BR dyn_array_concat_array() +and +.BR dyn_array_seek() +return true if the address of the array of elements moved during +.BR realloc (3). +Otherwise they return false. +.PP +The functions +.B dyn_array_clear() +and +.B dyn_array_free() +return void. +.SH EXAMPLE +For an example program that uses the dynamic array facility see the files +.I dyn_test.h +and +.IR dyn_test.c . +.SH HISTORY +The dyn_array facility was first written by Landon Curt Noll in 2014 for use in tools such as STS (see the https://github.com/arcetri/STS GitHub repo). diff --git a/dyn_array/man/man3/dyn_array_free.3 b/dyn_array/man/man3/dyn_array_free.3 deleted file mode 120000 index 920f68025..000000000 --- a/dyn_array/man/man3/dyn_array_free.3 +++ /dev/null @@ -1 +0,0 @@ -dyn_array.3 \ No newline at end of file diff --git a/dyn_array/man/man3/dyn_array_free.3 b/dyn_array/man/man3/dyn_array_free.3 new file mode 100644 index 000000000..f219ef562 --- /dev/null +++ b/dyn_array/man/man3/dyn_array_free.3 @@ -0,0 +1,278 @@ +.\" section 3 man page for dyn_array +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH dyn_array 3 "29 January 2023" "dyn_array" +.SH NAME +.BR dyn_array_value() \|, +.BR dyn_array_addr() \|, +.BR dyn_array_tell() \|, +.BR dyn_array_beyond() \|, +.BR dyn_array_alloced() \|, +.BR dyn_array_avail() \|, +.BR dyn_array_rewind() \|, +.BR dyn_array_create() \|, +.BR dyn_array_append_value() \|, +.BR dyn_array_append_set() \|, +.BR dyn_array_concat_array() \|, +.BR dyn_array_seek() \|, +.BR dyn_array_clear() \|, +.BR dyn_array_free() +\- dynamic array facility +.SH SYNOPSIS +\fB#include "dyn_array.h"\fP +.sp +\fB#define DYN_ARRAY_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +.B "extern const char *const dyn_array_version; /* library version format: major.minor YYYY-MM-DD */" +.sp +.B "#define dyn_array_value(array, type, index) (((type *)(((struct dyn_array *)(array))->data))[(index)])" +.br +.B "#define dyn_array_addr(array, type, index) (((type *)(((struct dyn_array *)(array))->data))+(index))" +.br +.B "#define dyn_array_tell(array) (((struct dyn_array *)(array))->count)" +.br +.B "#define dyn_array_beyond(array, type) (dyn_array_addr(array, type, dyn_array_tell(array)))" +.br +.B "#define dyn_array_alloced(array) (((struct dyn_array *)(array))->allocated)" +.br +.B "#define dyn_array_avail(array) (dyn_array_alloced(array) - dyn_array_tell(array))" +.br +.B "#define dyn_array_rewind(array) (dyn_array_seek((struct dyn_array *)(array), 0, SEEK_SET))" +.sp +.B "extern struct dyn_array *dyn_array_create(size_t elm_size, intmax_t chunk, intmax_t start_elm_count, bool zeroize);" +.br +.B "extern void dyn_array_free(struct dyn_array *array);" +.br +.B "extern bool dyn_array_append_value(struct dyn_array *array, void *value_to_add);" +.br +.B "extern bool dyn_array_append_set(struct dyn_array *array, void *array_to_add_p, intmax_t count_of_elements_to_add);" +.br +.B "extern bool dyn_array_concat_array(struct dyn_array *array, struct dyn_array *other);" +.br +.B "extern bool dyn_array_seek(struct dyn_array *array, off_t offset, int whence);" +.br +.B "extern void dyn_array_clear(struct dyn_array *array);" +.SH DESCRIPTION +These macros and functions provide a way to create, modify and manipulate general purpose dynamic arrays. +.sp +The function +.B dyn_array_create() +creates a dynamic array where each element is of size +.IR elm_size . +The +.I chunk +and +.I start_elm_count +specify a fixed number of elements to expand by when allocating and the starting number of elements to allocate, respectively. +If +.I zeroize +is true the newly allocated chunks are zeroed. +The function always allocates one more chunk than requested to serve as a guard chunk. +This extra chunk will not be listed in the total element allocation count. +The function returns a pointer to the new dynamic array, a +.B struct dyn_array +(see below for details). +.sp +The function +.B dyn_array_append_value() +appends the single value +.I value_to_add +to the array +.IR array . +The array will grow if all allocated values are used. +The function will return true if the address of the array of elements moved during +.BR realloc (3). +Otherwise it returns false. +.sp +The function +.B dyn_array_append_set() +appends a set of values of a given array to the end of the dynamic array. +The +.I array +is a pointer to the dynamic array. +The +.I array_to_add_p +is a pointer to the array to add to the end of the dynamic array +.IR array . +The +.I count_of_elements_to_add +is the number of elements to add to the dynamic array. +If after adding the values of the array, all allocated values are used, the array will grow. +If the address of the array of elements moved during +.BR realloc (3) +the function returns true. +Otherwise it returns false. +.sp +The function +.B dyn_array_concat_array() +concatenates the dynamic array +.I other +to the +dynamic array +.IR array . +If the address of the array of elements moved during +.BR realloc (3) +the function returns true. +Otherwise it returns false. +The contents of the other array is not modified nor is it freed. +If after adding the values of the array, all allocated values are used, the dynamic array will grow. +.sp +The function +.B dyn_array_seek() +sets the elements in use in the dynamic array +.IR array . +The +.I offset +is the offset in elements from the +.I whence +which can be: +.RS +.TP +.B SEEK_SET +offset from the dynamic array beginning. +.TQ +.B SEEK_CUR +offset from the current element in use. +.TQ +.B SEEK_END +offset from the end of the allocated elements. +.RE +.sp 1 +The function will return true if the address of the array of elements moved during +.BR realloc (3) +and false otherwise. +Attempting to seek to or before the beginning of the array will have the effect of calling +.B dyn_array_clear() +as described below. +.PP +The function +.B dyn_array_clear() +will clear any element in use in the dynamic array +.I array +(if the +.I zeroize +boolean is true) and then set the number of elements in use to 0. +The function does not free allocated storage. +For that see +.BR dyn_array_free() . +.PP +The function +.B dyn_array_free() +frees the contents of the dynamic array +.BR array . +If +.I array->zeroize +is true and the data of the array is not NULL and the array has allocated nodes and the size of arrays is > 0 the function will clear the array data (via +.BR memset (3)) +first. +The function does not free the +.B struct dyn_array +itself: it only frees any allocated storage. +.SS Convenience macros +.PP +The following macros are available to help you with the dynamic arrays: +.TP +.B dyn_array_value() +obtains the element (the value) of the dynamic array +.I array +of type +.I type +at index +.I index +.TP +.B dyn_array_addr() +obtains the address of the dynamic array +.I array +of an element of type +.I type +at index +.IR index . +.TP +.B dyn_array_tell() +returns the current element count of the dynamic array +.IR array . +.TP +.B dyn_array_beyond() +returns the address of the element just beyond the elements in use in the dynamic array +.IR array . +.TP +.B dyn_array_alloced() +returns the number of elements allocated in memory for the dynamic array +.IR array . +.TP +.B dyn_array_avail() +returns the number of elements available (allocated but not in use) of the dynamic array +.IR array . +.TP +.B dyn_array_rewind() +rewinds the dynamic array +.I array +back to zero elements. +.SS The struct dyn_array +.PP +The +.I dyn_array +structure is defined in +.I dyn_array.h +as follows: +.sp +.in +4n +.nf +struct dyn_array +{ + size_t elm_size; /* Number of bytes for a single element */ + bool zeroize; /* true ==> always zero newly allocated chunks, false ==> don't */ + intmax_t count; /* Number of elements in use */ + intmax_t allocated; /* Number of elements allocated (>= count) */ + intmax_t chunk; /* Number of elements to expand by when allocating */ + void *data; /* allocated dynamic array of identical things or NULL */ +}; +.fi +.in +.SS Version string +The string +.BR dyn_array_version , +which points to +.BR DYN_ARRAY_VERSION , +is the current version of the +.B dyn_array +facility. +.SH RETURN VALUE +.PP +The function +.B dyn_array_create() +returns a pointer to a +.B struct dyn_array +which is the address of the newly allocated struct. +It does not return on error. +.PP +The functions +.BR dyn_array_append_value() \|, +.BR dyn_array_append_set() \|, +.BR dyn_array_concat_array() +and +.BR dyn_array_seek() +return true if the address of the array of elements moved during +.BR realloc (3). +Otherwise they return false. +.PP +The functions +.B dyn_array_clear() +and +.B dyn_array_free() +return void. +.SH EXAMPLE +For an example program that uses the dynamic array facility see the files +.I dyn_test.h +and +.IR dyn_test.c . +.SH HISTORY +The dyn_array facility was first written by Landon Curt Noll in 2014 for use in tools such as STS (see the https://github.com/arcetri/STS GitHub repo). diff --git a/dyn_array/man/man3/dyn_array_rewind.3 b/dyn_array/man/man3/dyn_array_rewind.3 deleted file mode 120000 index 920f68025..000000000 --- a/dyn_array/man/man3/dyn_array_rewind.3 +++ /dev/null @@ -1 +0,0 @@ -dyn_array.3 \ No newline at end of file diff --git a/dyn_array/man/man3/dyn_array_rewind.3 b/dyn_array/man/man3/dyn_array_rewind.3 new file mode 100644 index 000000000..f219ef562 --- /dev/null +++ b/dyn_array/man/man3/dyn_array_rewind.3 @@ -0,0 +1,278 @@ +.\" section 3 man page for dyn_array +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH dyn_array 3 "29 January 2023" "dyn_array" +.SH NAME +.BR dyn_array_value() \|, +.BR dyn_array_addr() \|, +.BR dyn_array_tell() \|, +.BR dyn_array_beyond() \|, +.BR dyn_array_alloced() \|, +.BR dyn_array_avail() \|, +.BR dyn_array_rewind() \|, +.BR dyn_array_create() \|, +.BR dyn_array_append_value() \|, +.BR dyn_array_append_set() \|, +.BR dyn_array_concat_array() \|, +.BR dyn_array_seek() \|, +.BR dyn_array_clear() \|, +.BR dyn_array_free() +\- dynamic array facility +.SH SYNOPSIS +\fB#include "dyn_array.h"\fP +.sp +\fB#define DYN_ARRAY_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +.B "extern const char *const dyn_array_version; /* library version format: major.minor YYYY-MM-DD */" +.sp +.B "#define dyn_array_value(array, type, index) (((type *)(((struct dyn_array *)(array))->data))[(index)])" +.br +.B "#define dyn_array_addr(array, type, index) (((type *)(((struct dyn_array *)(array))->data))+(index))" +.br +.B "#define dyn_array_tell(array) (((struct dyn_array *)(array))->count)" +.br +.B "#define dyn_array_beyond(array, type) (dyn_array_addr(array, type, dyn_array_tell(array)))" +.br +.B "#define dyn_array_alloced(array) (((struct dyn_array *)(array))->allocated)" +.br +.B "#define dyn_array_avail(array) (dyn_array_alloced(array) - dyn_array_tell(array))" +.br +.B "#define dyn_array_rewind(array) (dyn_array_seek((struct dyn_array *)(array), 0, SEEK_SET))" +.sp +.B "extern struct dyn_array *dyn_array_create(size_t elm_size, intmax_t chunk, intmax_t start_elm_count, bool zeroize);" +.br +.B "extern void dyn_array_free(struct dyn_array *array);" +.br +.B "extern bool dyn_array_append_value(struct dyn_array *array, void *value_to_add);" +.br +.B "extern bool dyn_array_append_set(struct dyn_array *array, void *array_to_add_p, intmax_t count_of_elements_to_add);" +.br +.B "extern bool dyn_array_concat_array(struct dyn_array *array, struct dyn_array *other);" +.br +.B "extern bool dyn_array_seek(struct dyn_array *array, off_t offset, int whence);" +.br +.B "extern void dyn_array_clear(struct dyn_array *array);" +.SH DESCRIPTION +These macros and functions provide a way to create, modify and manipulate general purpose dynamic arrays. +.sp +The function +.B dyn_array_create() +creates a dynamic array where each element is of size +.IR elm_size . +The +.I chunk +and +.I start_elm_count +specify a fixed number of elements to expand by when allocating and the starting number of elements to allocate, respectively. +If +.I zeroize +is true the newly allocated chunks are zeroed. +The function always allocates one more chunk than requested to serve as a guard chunk. +This extra chunk will not be listed in the total element allocation count. +The function returns a pointer to the new dynamic array, a +.B struct dyn_array +(see below for details). +.sp +The function +.B dyn_array_append_value() +appends the single value +.I value_to_add +to the array +.IR array . +The array will grow if all allocated values are used. +The function will return true if the address of the array of elements moved during +.BR realloc (3). +Otherwise it returns false. +.sp +The function +.B dyn_array_append_set() +appends a set of values of a given array to the end of the dynamic array. +The +.I array +is a pointer to the dynamic array. +The +.I array_to_add_p +is a pointer to the array to add to the end of the dynamic array +.IR array . +The +.I count_of_elements_to_add +is the number of elements to add to the dynamic array. +If after adding the values of the array, all allocated values are used, the array will grow. +If the address of the array of elements moved during +.BR realloc (3) +the function returns true. +Otherwise it returns false. +.sp +The function +.B dyn_array_concat_array() +concatenates the dynamic array +.I other +to the +dynamic array +.IR array . +If the address of the array of elements moved during +.BR realloc (3) +the function returns true. +Otherwise it returns false. +The contents of the other array is not modified nor is it freed. +If after adding the values of the array, all allocated values are used, the dynamic array will grow. +.sp +The function +.B dyn_array_seek() +sets the elements in use in the dynamic array +.IR array . +The +.I offset +is the offset in elements from the +.I whence +which can be: +.RS +.TP +.B SEEK_SET +offset from the dynamic array beginning. +.TQ +.B SEEK_CUR +offset from the current element in use. +.TQ +.B SEEK_END +offset from the end of the allocated elements. +.RE +.sp 1 +The function will return true if the address of the array of elements moved during +.BR realloc (3) +and false otherwise. +Attempting to seek to or before the beginning of the array will have the effect of calling +.B dyn_array_clear() +as described below. +.PP +The function +.B dyn_array_clear() +will clear any element in use in the dynamic array +.I array +(if the +.I zeroize +boolean is true) and then set the number of elements in use to 0. +The function does not free allocated storage. +For that see +.BR dyn_array_free() . +.PP +The function +.B dyn_array_free() +frees the contents of the dynamic array +.BR array . +If +.I array->zeroize +is true and the data of the array is not NULL and the array has allocated nodes and the size of arrays is > 0 the function will clear the array data (via +.BR memset (3)) +first. +The function does not free the +.B struct dyn_array +itself: it only frees any allocated storage. +.SS Convenience macros +.PP +The following macros are available to help you with the dynamic arrays: +.TP +.B dyn_array_value() +obtains the element (the value) of the dynamic array +.I array +of type +.I type +at index +.I index +.TP +.B dyn_array_addr() +obtains the address of the dynamic array +.I array +of an element of type +.I type +at index +.IR index . +.TP +.B dyn_array_tell() +returns the current element count of the dynamic array +.IR array . +.TP +.B dyn_array_beyond() +returns the address of the element just beyond the elements in use in the dynamic array +.IR array . +.TP +.B dyn_array_alloced() +returns the number of elements allocated in memory for the dynamic array +.IR array . +.TP +.B dyn_array_avail() +returns the number of elements available (allocated but not in use) of the dynamic array +.IR array . +.TP +.B dyn_array_rewind() +rewinds the dynamic array +.I array +back to zero elements. +.SS The struct dyn_array +.PP +The +.I dyn_array +structure is defined in +.I dyn_array.h +as follows: +.sp +.in +4n +.nf +struct dyn_array +{ + size_t elm_size; /* Number of bytes for a single element */ + bool zeroize; /* true ==> always zero newly allocated chunks, false ==> don't */ + intmax_t count; /* Number of elements in use */ + intmax_t allocated; /* Number of elements allocated (>= count) */ + intmax_t chunk; /* Number of elements to expand by when allocating */ + void *data; /* allocated dynamic array of identical things or NULL */ +}; +.fi +.in +.SS Version string +The string +.BR dyn_array_version , +which points to +.BR DYN_ARRAY_VERSION , +is the current version of the +.B dyn_array +facility. +.SH RETURN VALUE +.PP +The function +.B dyn_array_create() +returns a pointer to a +.B struct dyn_array +which is the address of the newly allocated struct. +It does not return on error. +.PP +The functions +.BR dyn_array_append_value() \|, +.BR dyn_array_append_set() \|, +.BR dyn_array_concat_array() +and +.BR dyn_array_seek() +return true if the address of the array of elements moved during +.BR realloc (3). +Otherwise they return false. +.PP +The functions +.B dyn_array_clear() +and +.B dyn_array_free() +return void. +.SH EXAMPLE +For an example program that uses the dynamic array facility see the files +.I dyn_test.h +and +.IR dyn_test.c . +.SH HISTORY +The dyn_array facility was first written by Landon Curt Noll in 2014 for use in tools such as STS (see the https://github.com/arcetri/STS GitHub repo). diff --git a/dyn_array/man/man3/dyn_array_seek.3 b/dyn_array/man/man3/dyn_array_seek.3 deleted file mode 120000 index 920f68025..000000000 --- a/dyn_array/man/man3/dyn_array_seek.3 +++ /dev/null @@ -1 +0,0 @@ -dyn_array.3 \ No newline at end of file diff --git a/dyn_array/man/man3/dyn_array_seek.3 b/dyn_array/man/man3/dyn_array_seek.3 new file mode 100644 index 000000000..f219ef562 --- /dev/null +++ b/dyn_array/man/man3/dyn_array_seek.3 @@ -0,0 +1,278 @@ +.\" section 3 man page for dyn_array +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH dyn_array 3 "29 January 2023" "dyn_array" +.SH NAME +.BR dyn_array_value() \|, +.BR dyn_array_addr() \|, +.BR dyn_array_tell() \|, +.BR dyn_array_beyond() \|, +.BR dyn_array_alloced() \|, +.BR dyn_array_avail() \|, +.BR dyn_array_rewind() \|, +.BR dyn_array_create() \|, +.BR dyn_array_append_value() \|, +.BR dyn_array_append_set() \|, +.BR dyn_array_concat_array() \|, +.BR dyn_array_seek() \|, +.BR dyn_array_clear() \|, +.BR dyn_array_free() +\- dynamic array facility +.SH SYNOPSIS +\fB#include "dyn_array.h"\fP +.sp +\fB#define DYN_ARRAY_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +.B "extern const char *const dyn_array_version; /* library version format: major.minor YYYY-MM-DD */" +.sp +.B "#define dyn_array_value(array, type, index) (((type *)(((struct dyn_array *)(array))->data))[(index)])" +.br +.B "#define dyn_array_addr(array, type, index) (((type *)(((struct dyn_array *)(array))->data))+(index))" +.br +.B "#define dyn_array_tell(array) (((struct dyn_array *)(array))->count)" +.br +.B "#define dyn_array_beyond(array, type) (dyn_array_addr(array, type, dyn_array_tell(array)))" +.br +.B "#define dyn_array_alloced(array) (((struct dyn_array *)(array))->allocated)" +.br +.B "#define dyn_array_avail(array) (dyn_array_alloced(array) - dyn_array_tell(array))" +.br +.B "#define dyn_array_rewind(array) (dyn_array_seek((struct dyn_array *)(array), 0, SEEK_SET))" +.sp +.B "extern struct dyn_array *dyn_array_create(size_t elm_size, intmax_t chunk, intmax_t start_elm_count, bool zeroize);" +.br +.B "extern void dyn_array_free(struct dyn_array *array);" +.br +.B "extern bool dyn_array_append_value(struct dyn_array *array, void *value_to_add);" +.br +.B "extern bool dyn_array_append_set(struct dyn_array *array, void *array_to_add_p, intmax_t count_of_elements_to_add);" +.br +.B "extern bool dyn_array_concat_array(struct dyn_array *array, struct dyn_array *other);" +.br +.B "extern bool dyn_array_seek(struct dyn_array *array, off_t offset, int whence);" +.br +.B "extern void dyn_array_clear(struct dyn_array *array);" +.SH DESCRIPTION +These macros and functions provide a way to create, modify and manipulate general purpose dynamic arrays. +.sp +The function +.B dyn_array_create() +creates a dynamic array where each element is of size +.IR elm_size . +The +.I chunk +and +.I start_elm_count +specify a fixed number of elements to expand by when allocating and the starting number of elements to allocate, respectively. +If +.I zeroize +is true the newly allocated chunks are zeroed. +The function always allocates one more chunk than requested to serve as a guard chunk. +This extra chunk will not be listed in the total element allocation count. +The function returns a pointer to the new dynamic array, a +.B struct dyn_array +(see below for details). +.sp +The function +.B dyn_array_append_value() +appends the single value +.I value_to_add +to the array +.IR array . +The array will grow if all allocated values are used. +The function will return true if the address of the array of elements moved during +.BR realloc (3). +Otherwise it returns false. +.sp +The function +.B dyn_array_append_set() +appends a set of values of a given array to the end of the dynamic array. +The +.I array +is a pointer to the dynamic array. +The +.I array_to_add_p +is a pointer to the array to add to the end of the dynamic array +.IR array . +The +.I count_of_elements_to_add +is the number of elements to add to the dynamic array. +If after adding the values of the array, all allocated values are used, the array will grow. +If the address of the array of elements moved during +.BR realloc (3) +the function returns true. +Otherwise it returns false. +.sp +The function +.B dyn_array_concat_array() +concatenates the dynamic array +.I other +to the +dynamic array +.IR array . +If the address of the array of elements moved during +.BR realloc (3) +the function returns true. +Otherwise it returns false. +The contents of the other array is not modified nor is it freed. +If after adding the values of the array, all allocated values are used, the dynamic array will grow. +.sp +The function +.B dyn_array_seek() +sets the elements in use in the dynamic array +.IR array . +The +.I offset +is the offset in elements from the +.I whence +which can be: +.RS +.TP +.B SEEK_SET +offset from the dynamic array beginning. +.TQ +.B SEEK_CUR +offset from the current element in use. +.TQ +.B SEEK_END +offset from the end of the allocated elements. +.RE +.sp 1 +The function will return true if the address of the array of elements moved during +.BR realloc (3) +and false otherwise. +Attempting to seek to or before the beginning of the array will have the effect of calling +.B dyn_array_clear() +as described below. +.PP +The function +.B dyn_array_clear() +will clear any element in use in the dynamic array +.I array +(if the +.I zeroize +boolean is true) and then set the number of elements in use to 0. +The function does not free allocated storage. +For that see +.BR dyn_array_free() . +.PP +The function +.B dyn_array_free() +frees the contents of the dynamic array +.BR array . +If +.I array->zeroize +is true and the data of the array is not NULL and the array has allocated nodes and the size of arrays is > 0 the function will clear the array data (via +.BR memset (3)) +first. +The function does not free the +.B struct dyn_array +itself: it only frees any allocated storage. +.SS Convenience macros +.PP +The following macros are available to help you with the dynamic arrays: +.TP +.B dyn_array_value() +obtains the element (the value) of the dynamic array +.I array +of type +.I type +at index +.I index +.TP +.B dyn_array_addr() +obtains the address of the dynamic array +.I array +of an element of type +.I type +at index +.IR index . +.TP +.B dyn_array_tell() +returns the current element count of the dynamic array +.IR array . +.TP +.B dyn_array_beyond() +returns the address of the element just beyond the elements in use in the dynamic array +.IR array . +.TP +.B dyn_array_alloced() +returns the number of elements allocated in memory for the dynamic array +.IR array . +.TP +.B dyn_array_avail() +returns the number of elements available (allocated but not in use) of the dynamic array +.IR array . +.TP +.B dyn_array_rewind() +rewinds the dynamic array +.I array +back to zero elements. +.SS The struct dyn_array +.PP +The +.I dyn_array +structure is defined in +.I dyn_array.h +as follows: +.sp +.in +4n +.nf +struct dyn_array +{ + size_t elm_size; /* Number of bytes for a single element */ + bool zeroize; /* true ==> always zero newly allocated chunks, false ==> don't */ + intmax_t count; /* Number of elements in use */ + intmax_t allocated; /* Number of elements allocated (>= count) */ + intmax_t chunk; /* Number of elements to expand by when allocating */ + void *data; /* allocated dynamic array of identical things or NULL */ +}; +.fi +.in +.SS Version string +The string +.BR dyn_array_version , +which points to +.BR DYN_ARRAY_VERSION , +is the current version of the +.B dyn_array +facility. +.SH RETURN VALUE +.PP +The function +.B dyn_array_create() +returns a pointer to a +.B struct dyn_array +which is the address of the newly allocated struct. +It does not return on error. +.PP +The functions +.BR dyn_array_append_value() \|, +.BR dyn_array_append_set() \|, +.BR dyn_array_concat_array() +and +.BR dyn_array_seek() +return true if the address of the array of elements moved during +.BR realloc (3). +Otherwise they return false. +.PP +The functions +.B dyn_array_clear() +and +.B dyn_array_free() +return void. +.SH EXAMPLE +For an example program that uses the dynamic array facility see the files +.I dyn_test.h +and +.IR dyn_test.c . +.SH HISTORY +The dyn_array facility was first written by Landon Curt Noll in 2014 for use in tools such as STS (see the https://github.com/arcetri/STS GitHub repo). diff --git a/dyn_array/man/man3/dyn_array_tell.3 b/dyn_array/man/man3/dyn_array_tell.3 deleted file mode 120000 index 920f68025..000000000 --- a/dyn_array/man/man3/dyn_array_tell.3 +++ /dev/null @@ -1 +0,0 @@ -dyn_array.3 \ No newline at end of file diff --git a/dyn_array/man/man3/dyn_array_tell.3 b/dyn_array/man/man3/dyn_array_tell.3 new file mode 100644 index 000000000..f219ef562 --- /dev/null +++ b/dyn_array/man/man3/dyn_array_tell.3 @@ -0,0 +1,278 @@ +.\" section 3 man page for dyn_array +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH dyn_array 3 "29 January 2023" "dyn_array" +.SH NAME +.BR dyn_array_value() \|, +.BR dyn_array_addr() \|, +.BR dyn_array_tell() \|, +.BR dyn_array_beyond() \|, +.BR dyn_array_alloced() \|, +.BR dyn_array_avail() \|, +.BR dyn_array_rewind() \|, +.BR dyn_array_create() \|, +.BR dyn_array_append_value() \|, +.BR dyn_array_append_set() \|, +.BR dyn_array_concat_array() \|, +.BR dyn_array_seek() \|, +.BR dyn_array_clear() \|, +.BR dyn_array_free() +\- dynamic array facility +.SH SYNOPSIS +\fB#include "dyn_array.h"\fP +.sp +\fB#define DYN_ARRAY_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +.B "extern const char *const dyn_array_version; /* library version format: major.minor YYYY-MM-DD */" +.sp +.B "#define dyn_array_value(array, type, index) (((type *)(((struct dyn_array *)(array))->data))[(index)])" +.br +.B "#define dyn_array_addr(array, type, index) (((type *)(((struct dyn_array *)(array))->data))+(index))" +.br +.B "#define dyn_array_tell(array) (((struct dyn_array *)(array))->count)" +.br +.B "#define dyn_array_beyond(array, type) (dyn_array_addr(array, type, dyn_array_tell(array)))" +.br +.B "#define dyn_array_alloced(array) (((struct dyn_array *)(array))->allocated)" +.br +.B "#define dyn_array_avail(array) (dyn_array_alloced(array) - dyn_array_tell(array))" +.br +.B "#define dyn_array_rewind(array) (dyn_array_seek((struct dyn_array *)(array), 0, SEEK_SET))" +.sp +.B "extern struct dyn_array *dyn_array_create(size_t elm_size, intmax_t chunk, intmax_t start_elm_count, bool zeroize);" +.br +.B "extern void dyn_array_free(struct dyn_array *array);" +.br +.B "extern bool dyn_array_append_value(struct dyn_array *array, void *value_to_add);" +.br +.B "extern bool dyn_array_append_set(struct dyn_array *array, void *array_to_add_p, intmax_t count_of_elements_to_add);" +.br +.B "extern bool dyn_array_concat_array(struct dyn_array *array, struct dyn_array *other);" +.br +.B "extern bool dyn_array_seek(struct dyn_array *array, off_t offset, int whence);" +.br +.B "extern void dyn_array_clear(struct dyn_array *array);" +.SH DESCRIPTION +These macros and functions provide a way to create, modify and manipulate general purpose dynamic arrays. +.sp +The function +.B dyn_array_create() +creates a dynamic array where each element is of size +.IR elm_size . +The +.I chunk +and +.I start_elm_count +specify a fixed number of elements to expand by when allocating and the starting number of elements to allocate, respectively. +If +.I zeroize +is true the newly allocated chunks are zeroed. +The function always allocates one more chunk than requested to serve as a guard chunk. +This extra chunk will not be listed in the total element allocation count. +The function returns a pointer to the new dynamic array, a +.B struct dyn_array +(see below for details). +.sp +The function +.B dyn_array_append_value() +appends the single value +.I value_to_add +to the array +.IR array . +The array will grow if all allocated values are used. +The function will return true if the address of the array of elements moved during +.BR realloc (3). +Otherwise it returns false. +.sp +The function +.B dyn_array_append_set() +appends a set of values of a given array to the end of the dynamic array. +The +.I array +is a pointer to the dynamic array. +The +.I array_to_add_p +is a pointer to the array to add to the end of the dynamic array +.IR array . +The +.I count_of_elements_to_add +is the number of elements to add to the dynamic array. +If after adding the values of the array, all allocated values are used, the array will grow. +If the address of the array of elements moved during +.BR realloc (3) +the function returns true. +Otherwise it returns false. +.sp +The function +.B dyn_array_concat_array() +concatenates the dynamic array +.I other +to the +dynamic array +.IR array . +If the address of the array of elements moved during +.BR realloc (3) +the function returns true. +Otherwise it returns false. +The contents of the other array is not modified nor is it freed. +If after adding the values of the array, all allocated values are used, the dynamic array will grow. +.sp +The function +.B dyn_array_seek() +sets the elements in use in the dynamic array +.IR array . +The +.I offset +is the offset in elements from the +.I whence +which can be: +.RS +.TP +.B SEEK_SET +offset from the dynamic array beginning. +.TQ +.B SEEK_CUR +offset from the current element in use. +.TQ +.B SEEK_END +offset from the end of the allocated elements. +.RE +.sp 1 +The function will return true if the address of the array of elements moved during +.BR realloc (3) +and false otherwise. +Attempting to seek to or before the beginning of the array will have the effect of calling +.B dyn_array_clear() +as described below. +.PP +The function +.B dyn_array_clear() +will clear any element in use in the dynamic array +.I array +(if the +.I zeroize +boolean is true) and then set the number of elements in use to 0. +The function does not free allocated storage. +For that see +.BR dyn_array_free() . +.PP +The function +.B dyn_array_free() +frees the contents of the dynamic array +.BR array . +If +.I array->zeroize +is true and the data of the array is not NULL and the array has allocated nodes and the size of arrays is > 0 the function will clear the array data (via +.BR memset (3)) +first. +The function does not free the +.B struct dyn_array +itself: it only frees any allocated storage. +.SS Convenience macros +.PP +The following macros are available to help you with the dynamic arrays: +.TP +.B dyn_array_value() +obtains the element (the value) of the dynamic array +.I array +of type +.I type +at index +.I index +.TP +.B dyn_array_addr() +obtains the address of the dynamic array +.I array +of an element of type +.I type +at index +.IR index . +.TP +.B dyn_array_tell() +returns the current element count of the dynamic array +.IR array . +.TP +.B dyn_array_beyond() +returns the address of the element just beyond the elements in use in the dynamic array +.IR array . +.TP +.B dyn_array_alloced() +returns the number of elements allocated in memory for the dynamic array +.IR array . +.TP +.B dyn_array_avail() +returns the number of elements available (allocated but not in use) of the dynamic array +.IR array . +.TP +.B dyn_array_rewind() +rewinds the dynamic array +.I array +back to zero elements. +.SS The struct dyn_array +.PP +The +.I dyn_array +structure is defined in +.I dyn_array.h +as follows: +.sp +.in +4n +.nf +struct dyn_array +{ + size_t elm_size; /* Number of bytes for a single element */ + bool zeroize; /* true ==> always zero newly allocated chunks, false ==> don't */ + intmax_t count; /* Number of elements in use */ + intmax_t allocated; /* Number of elements allocated (>= count) */ + intmax_t chunk; /* Number of elements to expand by when allocating */ + void *data; /* allocated dynamic array of identical things or NULL */ +}; +.fi +.in +.SS Version string +The string +.BR dyn_array_version , +which points to +.BR DYN_ARRAY_VERSION , +is the current version of the +.B dyn_array +facility. +.SH RETURN VALUE +.PP +The function +.B dyn_array_create() +returns a pointer to a +.B struct dyn_array +which is the address of the newly allocated struct. +It does not return on error. +.PP +The functions +.BR dyn_array_append_value() \|, +.BR dyn_array_append_set() \|, +.BR dyn_array_concat_array() +and +.BR dyn_array_seek() +return true if the address of the array of elements moved during +.BR realloc (3). +Otherwise they return false. +.PP +The functions +.B dyn_array_clear() +and +.B dyn_array_free() +return void. +.SH EXAMPLE +For an example program that uses the dynamic array facility see the files +.I dyn_test.h +and +.IR dyn_test.c . +.SH HISTORY +The dyn_array facility was first written by Landon Curt Noll in 2014 for use in tools such as STS (see the https://github.com/arcetri/STS GitHub repo). diff --git a/dyn_array/man/man3/dyn_array_value.3 b/dyn_array/man/man3/dyn_array_value.3 deleted file mode 120000 index 920f68025..000000000 --- a/dyn_array/man/man3/dyn_array_value.3 +++ /dev/null @@ -1 +0,0 @@ -dyn_array.3 \ No newline at end of file diff --git a/dyn_array/man/man3/dyn_array_value.3 b/dyn_array/man/man3/dyn_array_value.3 new file mode 100644 index 000000000..f219ef562 --- /dev/null +++ b/dyn_array/man/man3/dyn_array_value.3 @@ -0,0 +1,278 @@ +.\" section 3 man page for dyn_array +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH dyn_array 3 "29 January 2023" "dyn_array" +.SH NAME +.BR dyn_array_value() \|, +.BR dyn_array_addr() \|, +.BR dyn_array_tell() \|, +.BR dyn_array_beyond() \|, +.BR dyn_array_alloced() \|, +.BR dyn_array_avail() \|, +.BR dyn_array_rewind() \|, +.BR dyn_array_create() \|, +.BR dyn_array_append_value() \|, +.BR dyn_array_append_set() \|, +.BR dyn_array_concat_array() \|, +.BR dyn_array_seek() \|, +.BR dyn_array_clear() \|, +.BR dyn_array_free() +\- dynamic array facility +.SH SYNOPSIS +\fB#include "dyn_array.h"\fP +.sp +\fB#define DYN_ARRAY_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +.B "extern const char *const dyn_array_version; /* library version format: major.minor YYYY-MM-DD */" +.sp +.B "#define dyn_array_value(array, type, index) (((type *)(((struct dyn_array *)(array))->data))[(index)])" +.br +.B "#define dyn_array_addr(array, type, index) (((type *)(((struct dyn_array *)(array))->data))+(index))" +.br +.B "#define dyn_array_tell(array) (((struct dyn_array *)(array))->count)" +.br +.B "#define dyn_array_beyond(array, type) (dyn_array_addr(array, type, dyn_array_tell(array)))" +.br +.B "#define dyn_array_alloced(array) (((struct dyn_array *)(array))->allocated)" +.br +.B "#define dyn_array_avail(array) (dyn_array_alloced(array) - dyn_array_tell(array))" +.br +.B "#define dyn_array_rewind(array) (dyn_array_seek((struct dyn_array *)(array), 0, SEEK_SET))" +.sp +.B "extern struct dyn_array *dyn_array_create(size_t elm_size, intmax_t chunk, intmax_t start_elm_count, bool zeroize);" +.br +.B "extern void dyn_array_free(struct dyn_array *array);" +.br +.B "extern bool dyn_array_append_value(struct dyn_array *array, void *value_to_add);" +.br +.B "extern bool dyn_array_append_set(struct dyn_array *array, void *array_to_add_p, intmax_t count_of_elements_to_add);" +.br +.B "extern bool dyn_array_concat_array(struct dyn_array *array, struct dyn_array *other);" +.br +.B "extern bool dyn_array_seek(struct dyn_array *array, off_t offset, int whence);" +.br +.B "extern void dyn_array_clear(struct dyn_array *array);" +.SH DESCRIPTION +These macros and functions provide a way to create, modify and manipulate general purpose dynamic arrays. +.sp +The function +.B dyn_array_create() +creates a dynamic array where each element is of size +.IR elm_size . +The +.I chunk +and +.I start_elm_count +specify a fixed number of elements to expand by when allocating and the starting number of elements to allocate, respectively. +If +.I zeroize +is true the newly allocated chunks are zeroed. +The function always allocates one more chunk than requested to serve as a guard chunk. +This extra chunk will not be listed in the total element allocation count. +The function returns a pointer to the new dynamic array, a +.B struct dyn_array +(see below for details). +.sp +The function +.B dyn_array_append_value() +appends the single value +.I value_to_add +to the array +.IR array . +The array will grow if all allocated values are used. +The function will return true if the address of the array of elements moved during +.BR realloc (3). +Otherwise it returns false. +.sp +The function +.B dyn_array_append_set() +appends a set of values of a given array to the end of the dynamic array. +The +.I array +is a pointer to the dynamic array. +The +.I array_to_add_p +is a pointer to the array to add to the end of the dynamic array +.IR array . +The +.I count_of_elements_to_add +is the number of elements to add to the dynamic array. +If after adding the values of the array, all allocated values are used, the array will grow. +If the address of the array of elements moved during +.BR realloc (3) +the function returns true. +Otherwise it returns false. +.sp +The function +.B dyn_array_concat_array() +concatenates the dynamic array +.I other +to the +dynamic array +.IR array . +If the address of the array of elements moved during +.BR realloc (3) +the function returns true. +Otherwise it returns false. +The contents of the other array is not modified nor is it freed. +If after adding the values of the array, all allocated values are used, the dynamic array will grow. +.sp +The function +.B dyn_array_seek() +sets the elements in use in the dynamic array +.IR array . +The +.I offset +is the offset in elements from the +.I whence +which can be: +.RS +.TP +.B SEEK_SET +offset from the dynamic array beginning. +.TQ +.B SEEK_CUR +offset from the current element in use. +.TQ +.B SEEK_END +offset from the end of the allocated elements. +.RE +.sp 1 +The function will return true if the address of the array of elements moved during +.BR realloc (3) +and false otherwise. +Attempting to seek to or before the beginning of the array will have the effect of calling +.B dyn_array_clear() +as described below. +.PP +The function +.B dyn_array_clear() +will clear any element in use in the dynamic array +.I array +(if the +.I zeroize +boolean is true) and then set the number of elements in use to 0. +The function does not free allocated storage. +For that see +.BR dyn_array_free() . +.PP +The function +.B dyn_array_free() +frees the contents of the dynamic array +.BR array . +If +.I array->zeroize +is true and the data of the array is not NULL and the array has allocated nodes and the size of arrays is > 0 the function will clear the array data (via +.BR memset (3)) +first. +The function does not free the +.B struct dyn_array +itself: it only frees any allocated storage. +.SS Convenience macros +.PP +The following macros are available to help you with the dynamic arrays: +.TP +.B dyn_array_value() +obtains the element (the value) of the dynamic array +.I array +of type +.I type +at index +.I index +.TP +.B dyn_array_addr() +obtains the address of the dynamic array +.I array +of an element of type +.I type +at index +.IR index . +.TP +.B dyn_array_tell() +returns the current element count of the dynamic array +.IR array . +.TP +.B dyn_array_beyond() +returns the address of the element just beyond the elements in use in the dynamic array +.IR array . +.TP +.B dyn_array_alloced() +returns the number of elements allocated in memory for the dynamic array +.IR array . +.TP +.B dyn_array_avail() +returns the number of elements available (allocated but not in use) of the dynamic array +.IR array . +.TP +.B dyn_array_rewind() +rewinds the dynamic array +.I array +back to zero elements. +.SS The struct dyn_array +.PP +The +.I dyn_array +structure is defined in +.I dyn_array.h +as follows: +.sp +.in +4n +.nf +struct dyn_array +{ + size_t elm_size; /* Number of bytes for a single element */ + bool zeroize; /* true ==> always zero newly allocated chunks, false ==> don't */ + intmax_t count; /* Number of elements in use */ + intmax_t allocated; /* Number of elements allocated (>= count) */ + intmax_t chunk; /* Number of elements to expand by when allocating */ + void *data; /* allocated dynamic array of identical things or NULL */ +}; +.fi +.in +.SS Version string +The string +.BR dyn_array_version , +which points to +.BR DYN_ARRAY_VERSION , +is the current version of the +.B dyn_array +facility. +.SH RETURN VALUE +.PP +The function +.B dyn_array_create() +returns a pointer to a +.B struct dyn_array +which is the address of the newly allocated struct. +It does not return on error. +.PP +The functions +.BR dyn_array_append_value() \|, +.BR dyn_array_append_set() \|, +.BR dyn_array_concat_array() +and +.BR dyn_array_seek() +return true if the address of the array of elements moved during +.BR realloc (3). +Otherwise they return false. +.PP +The functions +.B dyn_array_clear() +and +.B dyn_array_free() +return void. +.SH EXAMPLE +For an example program that uses the dynamic array facility see the files +.I dyn_test.h +and +.IR dyn_test.c . +.SH HISTORY +The dyn_array facility was first written by Landon Curt Noll in 2014 for use in tools such as STS (see the https://github.com/arcetri/STS GitHub repo). diff --git a/jparse/man/man3/json_dbg.3 b/jparse/man/man3/json_dbg.3 deleted file mode 120000 index 9bb9886f5..000000000 --- a/jparse/man/man3/json_dbg.3 +++ /dev/null @@ -1 +0,0 @@ -jparse.3 \ No newline at end of file diff --git a/jparse/man/man3/json_dbg.3 b/jparse/man/man3/json_dbg.3 new file mode 100644 index 000000000..816f50a1b --- /dev/null +++ b/jparse/man/man3/json_dbg.3 @@ -0,0 +1,310 @@ +.\" section 3 man page for jparse +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2023. +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH jparse 3 "19 October 2023" "jparse" +.SH NAME +.BR parse_json() \|, +.BR parse_json_stream() \|, +.BR parse_json_file() \|, +.BR json_dbg_allowed() \|, +.BR json_warn_allowed() \|, +.BR json_err_allowed() \|, +.BR json_dbg() +\- JSON parsing library +.SH SYNOPSIS +\fB#include "jparse.h"\fP +.sp +\fB#define JPARSE_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fB#define JSON_PARSER_VERSION "..." /* library format: major.minor YYYY-MM-DD */\fP +.br +\fB#define VALID_JSON_NODE(item) ((item) != NULL && (((item)->parsed == true) || ((item)->converted == true)))\fP +.br +\fB#define PARSED_JSON_NODE(item) ((item) != NULL && ((item)->parsed == true))\fP +.br +\fB#define CONVERTED_PARSED_JSON_NODE(item) ((item) != NULL && (((item)->parsed == true) && ((item)->converted == true)))\fP +.br +\fB#define CONVERTED_JSON_NODE(item) ((item) != NULL && (item)->converted == true)\fP +.sp +.B "extern const char *const json_parser_version; /* library version format: major.minor YYYY-MM-DD */" +.br +.B "extern const char *const jparse_version; /* jparse version format: major.minor YYYY-MM-DD */" +.sp +.B "extern struct json *parse_json(char const *ptr, size_t len, char const *filename, bool *is_valid);" +.br +.B "extern struct json *parse_json_stream(FILE *stream, char const *filename, bool *is_valid);" +.br +.B "extern struct json *parse_json_file(char const *name, bool *is_valid);" +.sp +.B "extern char const *json_get_type_str(struct json *node, bool encoded);" +.sp +.B "extern bool json_dbg_allowed(int json_dbg_lvl);" +.br +.B "extern bool json_warn_allowed(void);" +.br +.B "extern bool json_err_allowed(void);" +.br +.B "extern void json_dbg(int json_dbg_lvl, char const *name, const char *fmt, ...)" +.SH DESCRIPTION +The +.B jparse +library provides a way for C applications to parse JSON in a file (including stdin) or a string, returning a tree of the parsed JSON that one may then manipulate. +The function +.B parse_json +parses a JSON string +.I ptr +of length +.I len +in file +.IR filename . +If +.I is_valid +is not NULL, it will set +.I *is_valid +to true prior to returning the tree but it is an error if it is NULL. +The +.I ptr +is a pointer to the start of the JSON data. +The function will scan up to +.I len +bytes so that as long as one knows where in the string the JSON is, they can parse a document with other kinds of data. +If +.I filename +is NULL then it will read from +.B stdin +which can also be done by passing in \fI"\-"\fP. +The function will return the parsed JSON as a tree of type +.BR struct\ json\ * . +If the parse fails a blank JSON tree is returned instead. +.sp +The function +.B parse_json_stream +is like +.B parse_json +except that it parses an entire +.B FILE * +and does not accept a number of bytes to scan. +The +.I filename +is for messages and is not used to determine what file to open as the stream should already be open. +If you wish to do that you should use the +.B parse_json_file() +function instead. +Unless +.I stream +is +.B stdin +the state of it should be considered unsafe to use after the return of the function as it will be closed. +The function returns the parsed JSON as a +.BR struct\ json\ * . +.sp +The +.B parse_json_file +function is essentially a wrapper to the +.B parse_json_stream +function as it will open the file +.I filename +and then call +.B parse_json_stream +on the stream, returning a +.B struct json * +tree. +.SS Matching functions +The +.B json_get_type_str +returns a +.B char const * +with what was matched in the parser. +Depending on if the +.I encoded +boolean is true or not, it returns the encoded or decoded string, assuming the JSON node type has a distinction. +.SS Debug, warn and error functions +.PP +The function +.B json_dbg_allowed +will return true if debug output would be displayed at the verbosity level +.IR json_dbg_lvl . +.br +The functions +.B json_warn_allowed +and +.B json_err_allowed +will return true if warnings and error output is allowed, respectively. +.sp +The function +.B json_dbg +allows for your application to give debug information to the user. +The +.I json_dbg_lvl +is the verbosity level which, along with the +.I dbg_output_allowed +boolean, will determine if the output is to be printed. +As long as +.I dbg_output_allowed +is true and +.I json_dbg_lvl +is either +.B JSON_DBG_FORCED +or <= the +.I json_verbosity_level +then the output will be displayed. +The +.I name +is the name you wish to provide to the function, whether it be your application name or the function name that called it. +The +.I fmt +is a +.BR printf (3) +style format argument. +.SS The json struct +.PP +The +.I json +structure is defined as: +.sp +.in +4n +.nf +struct json +{ + enum item_type type; /* union item specifier */ + union json_union { +.in +4n +.nf + struct json_number number; /* JTYPE_NUMBER - value is number (integer or floating point) */ + struct json_string string; /* JTYPE_STRING - value is a string */ + struct json_boolean boolean; /* JTYPE_BOOL - value is a JSON boolean */ + struct json_null null; /* JTYPE_NULL - value is a JSON null value */ + struct json_member member; /* JTYPE_MEMBER - value is a JSON member: name : value */ + struct json_object object; /* JTYPE_OBJECT - value is a JSON { members } */ + struct json_array array; /* JTYPE_ARRAY - value is a JSON [ elements ] */ + struct json_elements elements; /* JTYPE_ELEMENTS - zero or more JSON values */ +.in + } item; + + /* + * JSON parse tree links + */ + struct json *parent; /* parent node in the JSON parse tree, or NULL if tree root or unlinked */ +.fi +.in +}; +.SS Checking for converted and/or parsed JSON nodes +.PP +Each JSON node struct has two booleans: +.B converted +and +.B parsed\c +\&. +The +.B converted +boolean indicates that the item could be converted whereas the +.B parsed +boolean indicates that the item could be parsed but it might or might not be converted. +It might be that it could not be converted but is parsable if it is a number string but the number is too big for the C types. +In this case the JSON can still be valid but the value is not converted. +This macro is used in the conversion routines and it is an error if both conversion and parsing fails. +If +.B converted +is true then +.B parsed +should be true too. +.PP +The macro +.B VALID_JSON_NODE +checks that either of the JSON node booleans, +.B converted +and +.B parsed\c +\&, are true. +.PP +The macro +.B PARSED_JSON_NODE +checks that the node's +.B parsed +boolean is true. +.PP +The macro +.B CONVERTED_PARSED_JSON_NODE +checks that the node's +.B converted +boolean is true and that the +.B parsed +boolean is true. +.PP +The macro +.B CONVERTED_JSON_NODE +checks that the node's +.B converted +boolean is true. +.SS Version strings +The string +.BR jparse_version , +which points to +.BR JPARSE_VERSION , +is the current version of the +.B jparse +tool. +The string +.BR json_parser_version , +which points to +.BR JSON_PARSER_VERSION , +is the current version of the parser itself. +.SH RETURN VALUE +.PP +The functions +.BR parse_json , +.B parse_json_stream +and +.B parse_json_file +return a +.B struct json * +which is either blank or, if the parse was successful, a tree of the entire parsed JSON. +.PP +The functions +.BR json_dbg_allowed , +.B json_warn_allowed +and +.B json_err_allowed +will return true if debug, warn or error messages are allowed, respectively, and otherwise false. +.SH NOTES +.PP +This JSON parser was written as a collaboration between Cody Boone Ferguson and Landon Curt Noll, one of the IOCCC Judges, to support +IOCCCMOCK, IOCCC28 and beyond. +.PP +For more detailed history that goes beyond this humble man page we recommend you check +.BR jparse (1), +.IR README.md , +and the GitHub git log as well as reading the source code (or not :\-) ). +Understand that by source we refer to the +.I jparse.l +and +.I jparse.y +files: we do NOT recommend you read the generated code! +This is because doing so might give you nightmares and cause other horrible symptoms. :-) +See the apology at the top of the generated files or look directly at +.I sorry.tm.ca.h +instead. +.SS Valid JSON +In the case that a value cannot be converted but it is valid JSON the parser will still successfully validate the JSON. +This might happen if, for example, a number is too big for the C types but as long as the JSON itself is valid the parse tree will be considered valid and not NULL. +.PP +.SH BUGS +Although error reporting does have locations it is only line numbers and columns. +Additionally the column can be misleading because of characters that take up more than one column but are counted as just one (tabs for example). +.sp +Although the scanner and parser are re-entrant only one parse at one time in a process has been tested. +The testing of more than one parse at the same time is way out of scope of this repo but will be tested more as it's moved to a separate repo. +.sp +If it's not clear this means that having more than one parse active in the same process at the same time is not tested so even though it should be okay there might be some issues that have yet to be discovered. +.SH SEE ALSO +.BR jparse (1), +.IR README.md \|, +.BR printf (3) diff --git a/jparse/man/man3/json_dbg_allowed.3 b/jparse/man/man3/json_dbg_allowed.3 deleted file mode 120000 index 9bb9886f5..000000000 --- a/jparse/man/man3/json_dbg_allowed.3 +++ /dev/null @@ -1 +0,0 @@ -jparse.3 \ No newline at end of file diff --git a/jparse/man/man3/json_dbg_allowed.3 b/jparse/man/man3/json_dbg_allowed.3 new file mode 100644 index 000000000..816f50a1b --- /dev/null +++ b/jparse/man/man3/json_dbg_allowed.3 @@ -0,0 +1,310 @@ +.\" section 3 man page for jparse +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2023. +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH jparse 3 "19 October 2023" "jparse" +.SH NAME +.BR parse_json() \|, +.BR parse_json_stream() \|, +.BR parse_json_file() \|, +.BR json_dbg_allowed() \|, +.BR json_warn_allowed() \|, +.BR json_err_allowed() \|, +.BR json_dbg() +\- JSON parsing library +.SH SYNOPSIS +\fB#include "jparse.h"\fP +.sp +\fB#define JPARSE_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fB#define JSON_PARSER_VERSION "..." /* library format: major.minor YYYY-MM-DD */\fP +.br +\fB#define VALID_JSON_NODE(item) ((item) != NULL && (((item)->parsed == true) || ((item)->converted == true)))\fP +.br +\fB#define PARSED_JSON_NODE(item) ((item) != NULL && ((item)->parsed == true))\fP +.br +\fB#define CONVERTED_PARSED_JSON_NODE(item) ((item) != NULL && (((item)->parsed == true) && ((item)->converted == true)))\fP +.br +\fB#define CONVERTED_JSON_NODE(item) ((item) != NULL && (item)->converted == true)\fP +.sp +.B "extern const char *const json_parser_version; /* library version format: major.minor YYYY-MM-DD */" +.br +.B "extern const char *const jparse_version; /* jparse version format: major.minor YYYY-MM-DD */" +.sp +.B "extern struct json *parse_json(char const *ptr, size_t len, char const *filename, bool *is_valid);" +.br +.B "extern struct json *parse_json_stream(FILE *stream, char const *filename, bool *is_valid);" +.br +.B "extern struct json *parse_json_file(char const *name, bool *is_valid);" +.sp +.B "extern char const *json_get_type_str(struct json *node, bool encoded);" +.sp +.B "extern bool json_dbg_allowed(int json_dbg_lvl);" +.br +.B "extern bool json_warn_allowed(void);" +.br +.B "extern bool json_err_allowed(void);" +.br +.B "extern void json_dbg(int json_dbg_lvl, char const *name, const char *fmt, ...)" +.SH DESCRIPTION +The +.B jparse +library provides a way for C applications to parse JSON in a file (including stdin) or a string, returning a tree of the parsed JSON that one may then manipulate. +The function +.B parse_json +parses a JSON string +.I ptr +of length +.I len +in file +.IR filename . +If +.I is_valid +is not NULL, it will set +.I *is_valid +to true prior to returning the tree but it is an error if it is NULL. +The +.I ptr +is a pointer to the start of the JSON data. +The function will scan up to +.I len +bytes so that as long as one knows where in the string the JSON is, they can parse a document with other kinds of data. +If +.I filename +is NULL then it will read from +.B stdin +which can also be done by passing in \fI"\-"\fP. +The function will return the parsed JSON as a tree of type +.BR struct\ json\ * . +If the parse fails a blank JSON tree is returned instead. +.sp +The function +.B parse_json_stream +is like +.B parse_json +except that it parses an entire +.B FILE * +and does not accept a number of bytes to scan. +The +.I filename +is for messages and is not used to determine what file to open as the stream should already be open. +If you wish to do that you should use the +.B parse_json_file() +function instead. +Unless +.I stream +is +.B stdin +the state of it should be considered unsafe to use after the return of the function as it will be closed. +The function returns the parsed JSON as a +.BR struct\ json\ * . +.sp +The +.B parse_json_file +function is essentially a wrapper to the +.B parse_json_stream +function as it will open the file +.I filename +and then call +.B parse_json_stream +on the stream, returning a +.B struct json * +tree. +.SS Matching functions +The +.B json_get_type_str +returns a +.B char const * +with what was matched in the parser. +Depending on if the +.I encoded +boolean is true or not, it returns the encoded or decoded string, assuming the JSON node type has a distinction. +.SS Debug, warn and error functions +.PP +The function +.B json_dbg_allowed +will return true if debug output would be displayed at the verbosity level +.IR json_dbg_lvl . +.br +The functions +.B json_warn_allowed +and +.B json_err_allowed +will return true if warnings and error output is allowed, respectively. +.sp +The function +.B json_dbg +allows for your application to give debug information to the user. +The +.I json_dbg_lvl +is the verbosity level which, along with the +.I dbg_output_allowed +boolean, will determine if the output is to be printed. +As long as +.I dbg_output_allowed +is true and +.I json_dbg_lvl +is either +.B JSON_DBG_FORCED +or <= the +.I json_verbosity_level +then the output will be displayed. +The +.I name +is the name you wish to provide to the function, whether it be your application name or the function name that called it. +The +.I fmt +is a +.BR printf (3) +style format argument. +.SS The json struct +.PP +The +.I json +structure is defined as: +.sp +.in +4n +.nf +struct json +{ + enum item_type type; /* union item specifier */ + union json_union { +.in +4n +.nf + struct json_number number; /* JTYPE_NUMBER - value is number (integer or floating point) */ + struct json_string string; /* JTYPE_STRING - value is a string */ + struct json_boolean boolean; /* JTYPE_BOOL - value is a JSON boolean */ + struct json_null null; /* JTYPE_NULL - value is a JSON null value */ + struct json_member member; /* JTYPE_MEMBER - value is a JSON member: name : value */ + struct json_object object; /* JTYPE_OBJECT - value is a JSON { members } */ + struct json_array array; /* JTYPE_ARRAY - value is a JSON [ elements ] */ + struct json_elements elements; /* JTYPE_ELEMENTS - zero or more JSON values */ +.in + } item; + + /* + * JSON parse tree links + */ + struct json *parent; /* parent node in the JSON parse tree, or NULL if tree root or unlinked */ +.fi +.in +}; +.SS Checking for converted and/or parsed JSON nodes +.PP +Each JSON node struct has two booleans: +.B converted +and +.B parsed\c +\&. +The +.B converted +boolean indicates that the item could be converted whereas the +.B parsed +boolean indicates that the item could be parsed but it might or might not be converted. +It might be that it could not be converted but is parsable if it is a number string but the number is too big for the C types. +In this case the JSON can still be valid but the value is not converted. +This macro is used in the conversion routines and it is an error if both conversion and parsing fails. +If +.B converted +is true then +.B parsed +should be true too. +.PP +The macro +.B VALID_JSON_NODE +checks that either of the JSON node booleans, +.B converted +and +.B parsed\c +\&, are true. +.PP +The macro +.B PARSED_JSON_NODE +checks that the node's +.B parsed +boolean is true. +.PP +The macro +.B CONVERTED_PARSED_JSON_NODE +checks that the node's +.B converted +boolean is true and that the +.B parsed +boolean is true. +.PP +The macro +.B CONVERTED_JSON_NODE +checks that the node's +.B converted +boolean is true. +.SS Version strings +The string +.BR jparse_version , +which points to +.BR JPARSE_VERSION , +is the current version of the +.B jparse +tool. +The string +.BR json_parser_version , +which points to +.BR JSON_PARSER_VERSION , +is the current version of the parser itself. +.SH RETURN VALUE +.PP +The functions +.BR parse_json , +.B parse_json_stream +and +.B parse_json_file +return a +.B struct json * +which is either blank or, if the parse was successful, a tree of the entire parsed JSON. +.PP +The functions +.BR json_dbg_allowed , +.B json_warn_allowed +and +.B json_err_allowed +will return true if debug, warn or error messages are allowed, respectively, and otherwise false. +.SH NOTES +.PP +This JSON parser was written as a collaboration between Cody Boone Ferguson and Landon Curt Noll, one of the IOCCC Judges, to support +IOCCCMOCK, IOCCC28 and beyond. +.PP +For more detailed history that goes beyond this humble man page we recommend you check +.BR jparse (1), +.IR README.md , +and the GitHub git log as well as reading the source code (or not :\-) ). +Understand that by source we refer to the +.I jparse.l +and +.I jparse.y +files: we do NOT recommend you read the generated code! +This is because doing so might give you nightmares and cause other horrible symptoms. :-) +See the apology at the top of the generated files or look directly at +.I sorry.tm.ca.h +instead. +.SS Valid JSON +In the case that a value cannot be converted but it is valid JSON the parser will still successfully validate the JSON. +This might happen if, for example, a number is too big for the C types but as long as the JSON itself is valid the parse tree will be considered valid and not NULL. +.PP +.SH BUGS +Although error reporting does have locations it is only line numbers and columns. +Additionally the column can be misleading because of characters that take up more than one column but are counted as just one (tabs for example). +.sp +Although the scanner and parser are re-entrant only one parse at one time in a process has been tested. +The testing of more than one parse at the same time is way out of scope of this repo but will be tested more as it's moved to a separate repo. +.sp +If it's not clear this means that having more than one parse active in the same process at the same time is not tested so even though it should be okay there might be some issues that have yet to be discovered. +.SH SEE ALSO +.BR jparse (1), +.IR README.md \|, +.BR printf (3) diff --git a/jparse/man/man3/json_err_allowed.3 b/jparse/man/man3/json_err_allowed.3 deleted file mode 120000 index 9bb9886f5..000000000 --- a/jparse/man/man3/json_err_allowed.3 +++ /dev/null @@ -1 +0,0 @@ -jparse.3 \ No newline at end of file diff --git a/jparse/man/man3/json_err_allowed.3 b/jparse/man/man3/json_err_allowed.3 new file mode 100644 index 000000000..816f50a1b --- /dev/null +++ b/jparse/man/man3/json_err_allowed.3 @@ -0,0 +1,310 @@ +.\" section 3 man page for jparse +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2023. +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH jparse 3 "19 October 2023" "jparse" +.SH NAME +.BR parse_json() \|, +.BR parse_json_stream() \|, +.BR parse_json_file() \|, +.BR json_dbg_allowed() \|, +.BR json_warn_allowed() \|, +.BR json_err_allowed() \|, +.BR json_dbg() +\- JSON parsing library +.SH SYNOPSIS +\fB#include "jparse.h"\fP +.sp +\fB#define JPARSE_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fB#define JSON_PARSER_VERSION "..." /* library format: major.minor YYYY-MM-DD */\fP +.br +\fB#define VALID_JSON_NODE(item) ((item) != NULL && (((item)->parsed == true) || ((item)->converted == true)))\fP +.br +\fB#define PARSED_JSON_NODE(item) ((item) != NULL && ((item)->parsed == true))\fP +.br +\fB#define CONVERTED_PARSED_JSON_NODE(item) ((item) != NULL && (((item)->parsed == true) && ((item)->converted == true)))\fP +.br +\fB#define CONVERTED_JSON_NODE(item) ((item) != NULL && (item)->converted == true)\fP +.sp +.B "extern const char *const json_parser_version; /* library version format: major.minor YYYY-MM-DD */" +.br +.B "extern const char *const jparse_version; /* jparse version format: major.minor YYYY-MM-DD */" +.sp +.B "extern struct json *parse_json(char const *ptr, size_t len, char const *filename, bool *is_valid);" +.br +.B "extern struct json *parse_json_stream(FILE *stream, char const *filename, bool *is_valid);" +.br +.B "extern struct json *parse_json_file(char const *name, bool *is_valid);" +.sp +.B "extern char const *json_get_type_str(struct json *node, bool encoded);" +.sp +.B "extern bool json_dbg_allowed(int json_dbg_lvl);" +.br +.B "extern bool json_warn_allowed(void);" +.br +.B "extern bool json_err_allowed(void);" +.br +.B "extern void json_dbg(int json_dbg_lvl, char const *name, const char *fmt, ...)" +.SH DESCRIPTION +The +.B jparse +library provides a way for C applications to parse JSON in a file (including stdin) or a string, returning a tree of the parsed JSON that one may then manipulate. +The function +.B parse_json +parses a JSON string +.I ptr +of length +.I len +in file +.IR filename . +If +.I is_valid +is not NULL, it will set +.I *is_valid +to true prior to returning the tree but it is an error if it is NULL. +The +.I ptr +is a pointer to the start of the JSON data. +The function will scan up to +.I len +bytes so that as long as one knows where in the string the JSON is, they can parse a document with other kinds of data. +If +.I filename +is NULL then it will read from +.B stdin +which can also be done by passing in \fI"\-"\fP. +The function will return the parsed JSON as a tree of type +.BR struct\ json\ * . +If the parse fails a blank JSON tree is returned instead. +.sp +The function +.B parse_json_stream +is like +.B parse_json +except that it parses an entire +.B FILE * +and does not accept a number of bytes to scan. +The +.I filename +is for messages and is not used to determine what file to open as the stream should already be open. +If you wish to do that you should use the +.B parse_json_file() +function instead. +Unless +.I stream +is +.B stdin +the state of it should be considered unsafe to use after the return of the function as it will be closed. +The function returns the parsed JSON as a +.BR struct\ json\ * . +.sp +The +.B parse_json_file +function is essentially a wrapper to the +.B parse_json_stream +function as it will open the file +.I filename +and then call +.B parse_json_stream +on the stream, returning a +.B struct json * +tree. +.SS Matching functions +The +.B json_get_type_str +returns a +.B char const * +with what was matched in the parser. +Depending on if the +.I encoded +boolean is true or not, it returns the encoded or decoded string, assuming the JSON node type has a distinction. +.SS Debug, warn and error functions +.PP +The function +.B json_dbg_allowed +will return true if debug output would be displayed at the verbosity level +.IR json_dbg_lvl . +.br +The functions +.B json_warn_allowed +and +.B json_err_allowed +will return true if warnings and error output is allowed, respectively. +.sp +The function +.B json_dbg +allows for your application to give debug information to the user. +The +.I json_dbg_lvl +is the verbosity level which, along with the +.I dbg_output_allowed +boolean, will determine if the output is to be printed. +As long as +.I dbg_output_allowed +is true and +.I json_dbg_lvl +is either +.B JSON_DBG_FORCED +or <= the +.I json_verbosity_level +then the output will be displayed. +The +.I name +is the name you wish to provide to the function, whether it be your application name or the function name that called it. +The +.I fmt +is a +.BR printf (3) +style format argument. +.SS The json struct +.PP +The +.I json +structure is defined as: +.sp +.in +4n +.nf +struct json +{ + enum item_type type; /* union item specifier */ + union json_union { +.in +4n +.nf + struct json_number number; /* JTYPE_NUMBER - value is number (integer or floating point) */ + struct json_string string; /* JTYPE_STRING - value is a string */ + struct json_boolean boolean; /* JTYPE_BOOL - value is a JSON boolean */ + struct json_null null; /* JTYPE_NULL - value is a JSON null value */ + struct json_member member; /* JTYPE_MEMBER - value is a JSON member: name : value */ + struct json_object object; /* JTYPE_OBJECT - value is a JSON { members } */ + struct json_array array; /* JTYPE_ARRAY - value is a JSON [ elements ] */ + struct json_elements elements; /* JTYPE_ELEMENTS - zero or more JSON values */ +.in + } item; + + /* + * JSON parse tree links + */ + struct json *parent; /* parent node in the JSON parse tree, or NULL if tree root or unlinked */ +.fi +.in +}; +.SS Checking for converted and/or parsed JSON nodes +.PP +Each JSON node struct has two booleans: +.B converted +and +.B parsed\c +\&. +The +.B converted +boolean indicates that the item could be converted whereas the +.B parsed +boolean indicates that the item could be parsed but it might or might not be converted. +It might be that it could not be converted but is parsable if it is a number string but the number is too big for the C types. +In this case the JSON can still be valid but the value is not converted. +This macro is used in the conversion routines and it is an error if both conversion and parsing fails. +If +.B converted +is true then +.B parsed +should be true too. +.PP +The macro +.B VALID_JSON_NODE +checks that either of the JSON node booleans, +.B converted +and +.B parsed\c +\&, are true. +.PP +The macro +.B PARSED_JSON_NODE +checks that the node's +.B parsed +boolean is true. +.PP +The macro +.B CONVERTED_PARSED_JSON_NODE +checks that the node's +.B converted +boolean is true and that the +.B parsed +boolean is true. +.PP +The macro +.B CONVERTED_JSON_NODE +checks that the node's +.B converted +boolean is true. +.SS Version strings +The string +.BR jparse_version , +which points to +.BR JPARSE_VERSION , +is the current version of the +.B jparse +tool. +The string +.BR json_parser_version , +which points to +.BR JSON_PARSER_VERSION , +is the current version of the parser itself. +.SH RETURN VALUE +.PP +The functions +.BR parse_json , +.B parse_json_stream +and +.B parse_json_file +return a +.B struct json * +which is either blank or, if the parse was successful, a tree of the entire parsed JSON. +.PP +The functions +.BR json_dbg_allowed , +.B json_warn_allowed +and +.B json_err_allowed +will return true if debug, warn or error messages are allowed, respectively, and otherwise false. +.SH NOTES +.PP +This JSON parser was written as a collaboration between Cody Boone Ferguson and Landon Curt Noll, one of the IOCCC Judges, to support +IOCCCMOCK, IOCCC28 and beyond. +.PP +For more detailed history that goes beyond this humble man page we recommend you check +.BR jparse (1), +.IR README.md , +and the GitHub git log as well as reading the source code (or not :\-) ). +Understand that by source we refer to the +.I jparse.l +and +.I jparse.y +files: we do NOT recommend you read the generated code! +This is because doing so might give you nightmares and cause other horrible symptoms. :-) +See the apology at the top of the generated files or look directly at +.I sorry.tm.ca.h +instead. +.SS Valid JSON +In the case that a value cannot be converted but it is valid JSON the parser will still successfully validate the JSON. +This might happen if, for example, a number is too big for the C types but as long as the JSON itself is valid the parse tree will be considered valid and not NULL. +.PP +.SH BUGS +Although error reporting does have locations it is only line numbers and columns. +Additionally the column can be misleading because of characters that take up more than one column but are counted as just one (tabs for example). +.sp +Although the scanner and parser are re-entrant only one parse at one time in a process has been tested. +The testing of more than one parse at the same time is way out of scope of this repo but will be tested more as it's moved to a separate repo. +.sp +If it's not clear this means that having more than one parse active in the same process at the same time is not tested so even though it should be okay there might be some issues that have yet to be discovered. +.SH SEE ALSO +.BR jparse (1), +.IR README.md \|, +.BR printf (3) diff --git a/jparse/man/man3/json_warn_allowed.3 b/jparse/man/man3/json_warn_allowed.3 deleted file mode 120000 index 9bb9886f5..000000000 --- a/jparse/man/man3/json_warn_allowed.3 +++ /dev/null @@ -1 +0,0 @@ -jparse.3 \ No newline at end of file diff --git a/jparse/man/man3/json_warn_allowed.3 b/jparse/man/man3/json_warn_allowed.3 new file mode 100644 index 000000000..816f50a1b --- /dev/null +++ b/jparse/man/man3/json_warn_allowed.3 @@ -0,0 +1,310 @@ +.\" section 3 man page for jparse +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2023. +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH jparse 3 "19 October 2023" "jparse" +.SH NAME +.BR parse_json() \|, +.BR parse_json_stream() \|, +.BR parse_json_file() \|, +.BR json_dbg_allowed() \|, +.BR json_warn_allowed() \|, +.BR json_err_allowed() \|, +.BR json_dbg() +\- JSON parsing library +.SH SYNOPSIS +\fB#include "jparse.h"\fP +.sp +\fB#define JPARSE_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fB#define JSON_PARSER_VERSION "..." /* library format: major.minor YYYY-MM-DD */\fP +.br +\fB#define VALID_JSON_NODE(item) ((item) != NULL && (((item)->parsed == true) || ((item)->converted == true)))\fP +.br +\fB#define PARSED_JSON_NODE(item) ((item) != NULL && ((item)->parsed == true))\fP +.br +\fB#define CONVERTED_PARSED_JSON_NODE(item) ((item) != NULL && (((item)->parsed == true) && ((item)->converted == true)))\fP +.br +\fB#define CONVERTED_JSON_NODE(item) ((item) != NULL && (item)->converted == true)\fP +.sp +.B "extern const char *const json_parser_version; /* library version format: major.minor YYYY-MM-DD */" +.br +.B "extern const char *const jparse_version; /* jparse version format: major.minor YYYY-MM-DD */" +.sp +.B "extern struct json *parse_json(char const *ptr, size_t len, char const *filename, bool *is_valid);" +.br +.B "extern struct json *parse_json_stream(FILE *stream, char const *filename, bool *is_valid);" +.br +.B "extern struct json *parse_json_file(char const *name, bool *is_valid);" +.sp +.B "extern char const *json_get_type_str(struct json *node, bool encoded);" +.sp +.B "extern bool json_dbg_allowed(int json_dbg_lvl);" +.br +.B "extern bool json_warn_allowed(void);" +.br +.B "extern bool json_err_allowed(void);" +.br +.B "extern void json_dbg(int json_dbg_lvl, char const *name, const char *fmt, ...)" +.SH DESCRIPTION +The +.B jparse +library provides a way for C applications to parse JSON in a file (including stdin) or a string, returning a tree of the parsed JSON that one may then manipulate. +The function +.B parse_json +parses a JSON string +.I ptr +of length +.I len +in file +.IR filename . +If +.I is_valid +is not NULL, it will set +.I *is_valid +to true prior to returning the tree but it is an error if it is NULL. +The +.I ptr +is a pointer to the start of the JSON data. +The function will scan up to +.I len +bytes so that as long as one knows where in the string the JSON is, they can parse a document with other kinds of data. +If +.I filename +is NULL then it will read from +.B stdin +which can also be done by passing in \fI"\-"\fP. +The function will return the parsed JSON as a tree of type +.BR struct\ json\ * . +If the parse fails a blank JSON tree is returned instead. +.sp +The function +.B parse_json_stream +is like +.B parse_json +except that it parses an entire +.B FILE * +and does not accept a number of bytes to scan. +The +.I filename +is for messages and is not used to determine what file to open as the stream should already be open. +If you wish to do that you should use the +.B parse_json_file() +function instead. +Unless +.I stream +is +.B stdin +the state of it should be considered unsafe to use after the return of the function as it will be closed. +The function returns the parsed JSON as a +.BR struct\ json\ * . +.sp +The +.B parse_json_file +function is essentially a wrapper to the +.B parse_json_stream +function as it will open the file +.I filename +and then call +.B parse_json_stream +on the stream, returning a +.B struct json * +tree. +.SS Matching functions +The +.B json_get_type_str +returns a +.B char const * +with what was matched in the parser. +Depending on if the +.I encoded +boolean is true or not, it returns the encoded or decoded string, assuming the JSON node type has a distinction. +.SS Debug, warn and error functions +.PP +The function +.B json_dbg_allowed +will return true if debug output would be displayed at the verbosity level +.IR json_dbg_lvl . +.br +The functions +.B json_warn_allowed +and +.B json_err_allowed +will return true if warnings and error output is allowed, respectively. +.sp +The function +.B json_dbg +allows for your application to give debug information to the user. +The +.I json_dbg_lvl +is the verbosity level which, along with the +.I dbg_output_allowed +boolean, will determine if the output is to be printed. +As long as +.I dbg_output_allowed +is true and +.I json_dbg_lvl +is either +.B JSON_DBG_FORCED +or <= the +.I json_verbosity_level +then the output will be displayed. +The +.I name +is the name you wish to provide to the function, whether it be your application name or the function name that called it. +The +.I fmt +is a +.BR printf (3) +style format argument. +.SS The json struct +.PP +The +.I json +structure is defined as: +.sp +.in +4n +.nf +struct json +{ + enum item_type type; /* union item specifier */ + union json_union { +.in +4n +.nf + struct json_number number; /* JTYPE_NUMBER - value is number (integer or floating point) */ + struct json_string string; /* JTYPE_STRING - value is a string */ + struct json_boolean boolean; /* JTYPE_BOOL - value is a JSON boolean */ + struct json_null null; /* JTYPE_NULL - value is a JSON null value */ + struct json_member member; /* JTYPE_MEMBER - value is a JSON member: name : value */ + struct json_object object; /* JTYPE_OBJECT - value is a JSON { members } */ + struct json_array array; /* JTYPE_ARRAY - value is a JSON [ elements ] */ + struct json_elements elements; /* JTYPE_ELEMENTS - zero or more JSON values */ +.in + } item; + + /* + * JSON parse tree links + */ + struct json *parent; /* parent node in the JSON parse tree, or NULL if tree root or unlinked */ +.fi +.in +}; +.SS Checking for converted and/or parsed JSON nodes +.PP +Each JSON node struct has two booleans: +.B converted +and +.B parsed\c +\&. +The +.B converted +boolean indicates that the item could be converted whereas the +.B parsed +boolean indicates that the item could be parsed but it might or might not be converted. +It might be that it could not be converted but is parsable if it is a number string but the number is too big for the C types. +In this case the JSON can still be valid but the value is not converted. +This macro is used in the conversion routines and it is an error if both conversion and parsing fails. +If +.B converted +is true then +.B parsed +should be true too. +.PP +The macro +.B VALID_JSON_NODE +checks that either of the JSON node booleans, +.B converted +and +.B parsed\c +\&, are true. +.PP +The macro +.B PARSED_JSON_NODE +checks that the node's +.B parsed +boolean is true. +.PP +The macro +.B CONVERTED_PARSED_JSON_NODE +checks that the node's +.B converted +boolean is true and that the +.B parsed +boolean is true. +.PP +The macro +.B CONVERTED_JSON_NODE +checks that the node's +.B converted +boolean is true. +.SS Version strings +The string +.BR jparse_version , +which points to +.BR JPARSE_VERSION , +is the current version of the +.B jparse +tool. +The string +.BR json_parser_version , +which points to +.BR JSON_PARSER_VERSION , +is the current version of the parser itself. +.SH RETURN VALUE +.PP +The functions +.BR parse_json , +.B parse_json_stream +and +.B parse_json_file +return a +.B struct json * +which is either blank or, if the parse was successful, a tree of the entire parsed JSON. +.PP +The functions +.BR json_dbg_allowed , +.B json_warn_allowed +and +.B json_err_allowed +will return true if debug, warn or error messages are allowed, respectively, and otherwise false. +.SH NOTES +.PP +This JSON parser was written as a collaboration between Cody Boone Ferguson and Landon Curt Noll, one of the IOCCC Judges, to support +IOCCCMOCK, IOCCC28 and beyond. +.PP +For more detailed history that goes beyond this humble man page we recommend you check +.BR jparse (1), +.IR README.md , +and the GitHub git log as well as reading the source code (or not :\-) ). +Understand that by source we refer to the +.I jparse.l +and +.I jparse.y +files: we do NOT recommend you read the generated code! +This is because doing so might give you nightmares and cause other horrible symptoms. :-) +See the apology at the top of the generated files or look directly at +.I sorry.tm.ca.h +instead. +.SS Valid JSON +In the case that a value cannot be converted but it is valid JSON the parser will still successfully validate the JSON. +This might happen if, for example, a number is too big for the C types but as long as the JSON itself is valid the parse tree will be considered valid and not NULL. +.PP +.SH BUGS +Although error reporting does have locations it is only line numbers and columns. +Additionally the column can be misleading because of characters that take up more than one column but are counted as just one (tabs for example). +.sp +Although the scanner and parser are re-entrant only one parse at one time in a process has been tested. +The testing of more than one parse at the same time is way out of scope of this repo but will be tested more as it's moved to a separate repo. +.sp +If it's not clear this means that having more than one parse active in the same process at the same time is not tested so even though it should be okay there might be some issues that have yet to be discovered. +.SH SEE ALSO +.BR jparse (1), +.IR README.md \|, +.BR printf (3) diff --git a/jparse/man/man3/parse_json.3 b/jparse/man/man3/parse_json.3 deleted file mode 120000 index 9bb9886f5..000000000 --- a/jparse/man/man3/parse_json.3 +++ /dev/null @@ -1 +0,0 @@ -jparse.3 \ No newline at end of file diff --git a/jparse/man/man3/parse_json.3 b/jparse/man/man3/parse_json.3 new file mode 100644 index 000000000..816f50a1b --- /dev/null +++ b/jparse/man/man3/parse_json.3 @@ -0,0 +1,310 @@ +.\" section 3 man page for jparse +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2023. +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH jparse 3 "19 October 2023" "jparse" +.SH NAME +.BR parse_json() \|, +.BR parse_json_stream() \|, +.BR parse_json_file() \|, +.BR json_dbg_allowed() \|, +.BR json_warn_allowed() \|, +.BR json_err_allowed() \|, +.BR json_dbg() +\- JSON parsing library +.SH SYNOPSIS +\fB#include "jparse.h"\fP +.sp +\fB#define JPARSE_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fB#define JSON_PARSER_VERSION "..." /* library format: major.minor YYYY-MM-DD */\fP +.br +\fB#define VALID_JSON_NODE(item) ((item) != NULL && (((item)->parsed == true) || ((item)->converted == true)))\fP +.br +\fB#define PARSED_JSON_NODE(item) ((item) != NULL && ((item)->parsed == true))\fP +.br +\fB#define CONVERTED_PARSED_JSON_NODE(item) ((item) != NULL && (((item)->parsed == true) && ((item)->converted == true)))\fP +.br +\fB#define CONVERTED_JSON_NODE(item) ((item) != NULL && (item)->converted == true)\fP +.sp +.B "extern const char *const json_parser_version; /* library version format: major.minor YYYY-MM-DD */" +.br +.B "extern const char *const jparse_version; /* jparse version format: major.minor YYYY-MM-DD */" +.sp +.B "extern struct json *parse_json(char const *ptr, size_t len, char const *filename, bool *is_valid);" +.br +.B "extern struct json *parse_json_stream(FILE *stream, char const *filename, bool *is_valid);" +.br +.B "extern struct json *parse_json_file(char const *name, bool *is_valid);" +.sp +.B "extern char const *json_get_type_str(struct json *node, bool encoded);" +.sp +.B "extern bool json_dbg_allowed(int json_dbg_lvl);" +.br +.B "extern bool json_warn_allowed(void);" +.br +.B "extern bool json_err_allowed(void);" +.br +.B "extern void json_dbg(int json_dbg_lvl, char const *name, const char *fmt, ...)" +.SH DESCRIPTION +The +.B jparse +library provides a way for C applications to parse JSON in a file (including stdin) or a string, returning a tree of the parsed JSON that one may then manipulate. +The function +.B parse_json +parses a JSON string +.I ptr +of length +.I len +in file +.IR filename . +If +.I is_valid +is not NULL, it will set +.I *is_valid +to true prior to returning the tree but it is an error if it is NULL. +The +.I ptr +is a pointer to the start of the JSON data. +The function will scan up to +.I len +bytes so that as long as one knows where in the string the JSON is, they can parse a document with other kinds of data. +If +.I filename +is NULL then it will read from +.B stdin +which can also be done by passing in \fI"\-"\fP. +The function will return the parsed JSON as a tree of type +.BR struct\ json\ * . +If the parse fails a blank JSON tree is returned instead. +.sp +The function +.B parse_json_stream +is like +.B parse_json +except that it parses an entire +.B FILE * +and does not accept a number of bytes to scan. +The +.I filename +is for messages and is not used to determine what file to open as the stream should already be open. +If you wish to do that you should use the +.B parse_json_file() +function instead. +Unless +.I stream +is +.B stdin +the state of it should be considered unsafe to use after the return of the function as it will be closed. +The function returns the parsed JSON as a +.BR struct\ json\ * . +.sp +The +.B parse_json_file +function is essentially a wrapper to the +.B parse_json_stream +function as it will open the file +.I filename +and then call +.B parse_json_stream +on the stream, returning a +.B struct json * +tree. +.SS Matching functions +The +.B json_get_type_str +returns a +.B char const * +with what was matched in the parser. +Depending on if the +.I encoded +boolean is true or not, it returns the encoded or decoded string, assuming the JSON node type has a distinction. +.SS Debug, warn and error functions +.PP +The function +.B json_dbg_allowed +will return true if debug output would be displayed at the verbosity level +.IR json_dbg_lvl . +.br +The functions +.B json_warn_allowed +and +.B json_err_allowed +will return true if warnings and error output is allowed, respectively. +.sp +The function +.B json_dbg +allows for your application to give debug information to the user. +The +.I json_dbg_lvl +is the verbosity level which, along with the +.I dbg_output_allowed +boolean, will determine if the output is to be printed. +As long as +.I dbg_output_allowed +is true and +.I json_dbg_lvl +is either +.B JSON_DBG_FORCED +or <= the +.I json_verbosity_level +then the output will be displayed. +The +.I name +is the name you wish to provide to the function, whether it be your application name or the function name that called it. +The +.I fmt +is a +.BR printf (3) +style format argument. +.SS The json struct +.PP +The +.I json +structure is defined as: +.sp +.in +4n +.nf +struct json +{ + enum item_type type; /* union item specifier */ + union json_union { +.in +4n +.nf + struct json_number number; /* JTYPE_NUMBER - value is number (integer or floating point) */ + struct json_string string; /* JTYPE_STRING - value is a string */ + struct json_boolean boolean; /* JTYPE_BOOL - value is a JSON boolean */ + struct json_null null; /* JTYPE_NULL - value is a JSON null value */ + struct json_member member; /* JTYPE_MEMBER - value is a JSON member: name : value */ + struct json_object object; /* JTYPE_OBJECT - value is a JSON { members } */ + struct json_array array; /* JTYPE_ARRAY - value is a JSON [ elements ] */ + struct json_elements elements; /* JTYPE_ELEMENTS - zero or more JSON values */ +.in + } item; + + /* + * JSON parse tree links + */ + struct json *parent; /* parent node in the JSON parse tree, or NULL if tree root or unlinked */ +.fi +.in +}; +.SS Checking for converted and/or parsed JSON nodes +.PP +Each JSON node struct has two booleans: +.B converted +and +.B parsed\c +\&. +The +.B converted +boolean indicates that the item could be converted whereas the +.B parsed +boolean indicates that the item could be parsed but it might or might not be converted. +It might be that it could not be converted but is parsable if it is a number string but the number is too big for the C types. +In this case the JSON can still be valid but the value is not converted. +This macro is used in the conversion routines and it is an error if both conversion and parsing fails. +If +.B converted +is true then +.B parsed +should be true too. +.PP +The macro +.B VALID_JSON_NODE +checks that either of the JSON node booleans, +.B converted +and +.B parsed\c +\&, are true. +.PP +The macro +.B PARSED_JSON_NODE +checks that the node's +.B parsed +boolean is true. +.PP +The macro +.B CONVERTED_PARSED_JSON_NODE +checks that the node's +.B converted +boolean is true and that the +.B parsed +boolean is true. +.PP +The macro +.B CONVERTED_JSON_NODE +checks that the node's +.B converted +boolean is true. +.SS Version strings +The string +.BR jparse_version , +which points to +.BR JPARSE_VERSION , +is the current version of the +.B jparse +tool. +The string +.BR json_parser_version , +which points to +.BR JSON_PARSER_VERSION , +is the current version of the parser itself. +.SH RETURN VALUE +.PP +The functions +.BR parse_json , +.B parse_json_stream +and +.B parse_json_file +return a +.B struct json * +which is either blank or, if the parse was successful, a tree of the entire parsed JSON. +.PP +The functions +.BR json_dbg_allowed , +.B json_warn_allowed +and +.B json_err_allowed +will return true if debug, warn or error messages are allowed, respectively, and otherwise false. +.SH NOTES +.PP +This JSON parser was written as a collaboration between Cody Boone Ferguson and Landon Curt Noll, one of the IOCCC Judges, to support +IOCCCMOCK, IOCCC28 and beyond. +.PP +For more detailed history that goes beyond this humble man page we recommend you check +.BR jparse (1), +.IR README.md , +and the GitHub git log as well as reading the source code (or not :\-) ). +Understand that by source we refer to the +.I jparse.l +and +.I jparse.y +files: we do NOT recommend you read the generated code! +This is because doing so might give you nightmares and cause other horrible symptoms. :-) +See the apology at the top of the generated files or look directly at +.I sorry.tm.ca.h +instead. +.SS Valid JSON +In the case that a value cannot be converted but it is valid JSON the parser will still successfully validate the JSON. +This might happen if, for example, a number is too big for the C types but as long as the JSON itself is valid the parse tree will be considered valid and not NULL. +.PP +.SH BUGS +Although error reporting does have locations it is only line numbers and columns. +Additionally the column can be misleading because of characters that take up more than one column but are counted as just one (tabs for example). +.sp +Although the scanner and parser are re-entrant only one parse at one time in a process has been tested. +The testing of more than one parse at the same time is way out of scope of this repo but will be tested more as it's moved to a separate repo. +.sp +If it's not clear this means that having more than one parse active in the same process at the same time is not tested so even though it should be okay there might be some issues that have yet to be discovered. +.SH SEE ALSO +.BR jparse (1), +.IR README.md \|, +.BR printf (3) diff --git a/jparse/man/man3/parse_json_file.3 b/jparse/man/man3/parse_json_file.3 deleted file mode 120000 index 9bb9886f5..000000000 --- a/jparse/man/man3/parse_json_file.3 +++ /dev/null @@ -1 +0,0 @@ -jparse.3 \ No newline at end of file diff --git a/jparse/man/man3/parse_json_file.3 b/jparse/man/man3/parse_json_file.3 new file mode 100644 index 000000000..816f50a1b --- /dev/null +++ b/jparse/man/man3/parse_json_file.3 @@ -0,0 +1,310 @@ +.\" section 3 man page for jparse +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2023. +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH jparse 3 "19 October 2023" "jparse" +.SH NAME +.BR parse_json() \|, +.BR parse_json_stream() \|, +.BR parse_json_file() \|, +.BR json_dbg_allowed() \|, +.BR json_warn_allowed() \|, +.BR json_err_allowed() \|, +.BR json_dbg() +\- JSON parsing library +.SH SYNOPSIS +\fB#include "jparse.h"\fP +.sp +\fB#define JPARSE_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fB#define JSON_PARSER_VERSION "..." /* library format: major.minor YYYY-MM-DD */\fP +.br +\fB#define VALID_JSON_NODE(item) ((item) != NULL && (((item)->parsed == true) || ((item)->converted == true)))\fP +.br +\fB#define PARSED_JSON_NODE(item) ((item) != NULL && ((item)->parsed == true))\fP +.br +\fB#define CONVERTED_PARSED_JSON_NODE(item) ((item) != NULL && (((item)->parsed == true) && ((item)->converted == true)))\fP +.br +\fB#define CONVERTED_JSON_NODE(item) ((item) != NULL && (item)->converted == true)\fP +.sp +.B "extern const char *const json_parser_version; /* library version format: major.minor YYYY-MM-DD */" +.br +.B "extern const char *const jparse_version; /* jparse version format: major.minor YYYY-MM-DD */" +.sp +.B "extern struct json *parse_json(char const *ptr, size_t len, char const *filename, bool *is_valid);" +.br +.B "extern struct json *parse_json_stream(FILE *stream, char const *filename, bool *is_valid);" +.br +.B "extern struct json *parse_json_file(char const *name, bool *is_valid);" +.sp +.B "extern char const *json_get_type_str(struct json *node, bool encoded);" +.sp +.B "extern bool json_dbg_allowed(int json_dbg_lvl);" +.br +.B "extern bool json_warn_allowed(void);" +.br +.B "extern bool json_err_allowed(void);" +.br +.B "extern void json_dbg(int json_dbg_lvl, char const *name, const char *fmt, ...)" +.SH DESCRIPTION +The +.B jparse +library provides a way for C applications to parse JSON in a file (including stdin) or a string, returning a tree of the parsed JSON that one may then manipulate. +The function +.B parse_json +parses a JSON string +.I ptr +of length +.I len +in file +.IR filename . +If +.I is_valid +is not NULL, it will set +.I *is_valid +to true prior to returning the tree but it is an error if it is NULL. +The +.I ptr +is a pointer to the start of the JSON data. +The function will scan up to +.I len +bytes so that as long as one knows where in the string the JSON is, they can parse a document with other kinds of data. +If +.I filename +is NULL then it will read from +.B stdin +which can also be done by passing in \fI"\-"\fP. +The function will return the parsed JSON as a tree of type +.BR struct\ json\ * . +If the parse fails a blank JSON tree is returned instead. +.sp +The function +.B parse_json_stream +is like +.B parse_json +except that it parses an entire +.B FILE * +and does not accept a number of bytes to scan. +The +.I filename +is for messages and is not used to determine what file to open as the stream should already be open. +If you wish to do that you should use the +.B parse_json_file() +function instead. +Unless +.I stream +is +.B stdin +the state of it should be considered unsafe to use after the return of the function as it will be closed. +The function returns the parsed JSON as a +.BR struct\ json\ * . +.sp +The +.B parse_json_file +function is essentially a wrapper to the +.B parse_json_stream +function as it will open the file +.I filename +and then call +.B parse_json_stream +on the stream, returning a +.B struct json * +tree. +.SS Matching functions +The +.B json_get_type_str +returns a +.B char const * +with what was matched in the parser. +Depending on if the +.I encoded +boolean is true or not, it returns the encoded or decoded string, assuming the JSON node type has a distinction. +.SS Debug, warn and error functions +.PP +The function +.B json_dbg_allowed +will return true if debug output would be displayed at the verbosity level +.IR json_dbg_lvl . +.br +The functions +.B json_warn_allowed +and +.B json_err_allowed +will return true if warnings and error output is allowed, respectively. +.sp +The function +.B json_dbg +allows for your application to give debug information to the user. +The +.I json_dbg_lvl +is the verbosity level which, along with the +.I dbg_output_allowed +boolean, will determine if the output is to be printed. +As long as +.I dbg_output_allowed +is true and +.I json_dbg_lvl +is either +.B JSON_DBG_FORCED +or <= the +.I json_verbosity_level +then the output will be displayed. +The +.I name +is the name you wish to provide to the function, whether it be your application name or the function name that called it. +The +.I fmt +is a +.BR printf (3) +style format argument. +.SS The json struct +.PP +The +.I json +structure is defined as: +.sp +.in +4n +.nf +struct json +{ + enum item_type type; /* union item specifier */ + union json_union { +.in +4n +.nf + struct json_number number; /* JTYPE_NUMBER - value is number (integer or floating point) */ + struct json_string string; /* JTYPE_STRING - value is a string */ + struct json_boolean boolean; /* JTYPE_BOOL - value is a JSON boolean */ + struct json_null null; /* JTYPE_NULL - value is a JSON null value */ + struct json_member member; /* JTYPE_MEMBER - value is a JSON member: name : value */ + struct json_object object; /* JTYPE_OBJECT - value is a JSON { members } */ + struct json_array array; /* JTYPE_ARRAY - value is a JSON [ elements ] */ + struct json_elements elements; /* JTYPE_ELEMENTS - zero or more JSON values */ +.in + } item; + + /* + * JSON parse tree links + */ + struct json *parent; /* parent node in the JSON parse tree, or NULL if tree root or unlinked */ +.fi +.in +}; +.SS Checking for converted and/or parsed JSON nodes +.PP +Each JSON node struct has two booleans: +.B converted +and +.B parsed\c +\&. +The +.B converted +boolean indicates that the item could be converted whereas the +.B parsed +boolean indicates that the item could be parsed but it might or might not be converted. +It might be that it could not be converted but is parsable if it is a number string but the number is too big for the C types. +In this case the JSON can still be valid but the value is not converted. +This macro is used in the conversion routines and it is an error if both conversion and parsing fails. +If +.B converted +is true then +.B parsed +should be true too. +.PP +The macro +.B VALID_JSON_NODE +checks that either of the JSON node booleans, +.B converted +and +.B parsed\c +\&, are true. +.PP +The macro +.B PARSED_JSON_NODE +checks that the node's +.B parsed +boolean is true. +.PP +The macro +.B CONVERTED_PARSED_JSON_NODE +checks that the node's +.B converted +boolean is true and that the +.B parsed +boolean is true. +.PP +The macro +.B CONVERTED_JSON_NODE +checks that the node's +.B converted +boolean is true. +.SS Version strings +The string +.BR jparse_version , +which points to +.BR JPARSE_VERSION , +is the current version of the +.B jparse +tool. +The string +.BR json_parser_version , +which points to +.BR JSON_PARSER_VERSION , +is the current version of the parser itself. +.SH RETURN VALUE +.PP +The functions +.BR parse_json , +.B parse_json_stream +and +.B parse_json_file +return a +.B struct json * +which is either blank or, if the parse was successful, a tree of the entire parsed JSON. +.PP +The functions +.BR json_dbg_allowed , +.B json_warn_allowed +and +.B json_err_allowed +will return true if debug, warn or error messages are allowed, respectively, and otherwise false. +.SH NOTES +.PP +This JSON parser was written as a collaboration between Cody Boone Ferguson and Landon Curt Noll, one of the IOCCC Judges, to support +IOCCCMOCK, IOCCC28 and beyond. +.PP +For more detailed history that goes beyond this humble man page we recommend you check +.BR jparse (1), +.IR README.md , +and the GitHub git log as well as reading the source code (or not :\-) ). +Understand that by source we refer to the +.I jparse.l +and +.I jparse.y +files: we do NOT recommend you read the generated code! +This is because doing so might give you nightmares and cause other horrible symptoms. :-) +See the apology at the top of the generated files or look directly at +.I sorry.tm.ca.h +instead. +.SS Valid JSON +In the case that a value cannot be converted but it is valid JSON the parser will still successfully validate the JSON. +This might happen if, for example, a number is too big for the C types but as long as the JSON itself is valid the parse tree will be considered valid and not NULL. +.PP +.SH BUGS +Although error reporting does have locations it is only line numbers and columns. +Additionally the column can be misleading because of characters that take up more than one column but are counted as just one (tabs for example). +.sp +Although the scanner and parser are re-entrant only one parse at one time in a process has been tested. +The testing of more than one parse at the same time is way out of scope of this repo but will be tested more as it's moved to a separate repo. +.sp +If it's not clear this means that having more than one parse active in the same process at the same time is not tested so even though it should be okay there might be some issues that have yet to be discovered. +.SH SEE ALSO +.BR jparse (1), +.IR README.md \|, +.BR printf (3) diff --git a/jparse/man/man3/parse_json_stream.3 b/jparse/man/man3/parse_json_stream.3 deleted file mode 120000 index 9bb9886f5..000000000 --- a/jparse/man/man3/parse_json_stream.3 +++ /dev/null @@ -1 +0,0 @@ -jparse.3 \ No newline at end of file diff --git a/jparse/man/man3/parse_json_stream.3 b/jparse/man/man3/parse_json_stream.3 new file mode 100644 index 000000000..816f50a1b --- /dev/null +++ b/jparse/man/man3/parse_json_stream.3 @@ -0,0 +1,310 @@ +.\" section 3 man page for jparse +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2023. +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH jparse 3 "19 October 2023" "jparse" +.SH NAME +.BR parse_json() \|, +.BR parse_json_stream() \|, +.BR parse_json_file() \|, +.BR json_dbg_allowed() \|, +.BR json_warn_allowed() \|, +.BR json_err_allowed() \|, +.BR json_dbg() +\- JSON parsing library +.SH SYNOPSIS +\fB#include "jparse.h"\fP +.sp +\fB#define JPARSE_VERSION "..." /* format: major.minor YYYY-MM-DD */\fP +.br +\fB#define JSON_PARSER_VERSION "..." /* library format: major.minor YYYY-MM-DD */\fP +.br +\fB#define VALID_JSON_NODE(item) ((item) != NULL && (((item)->parsed == true) || ((item)->converted == true)))\fP +.br +\fB#define PARSED_JSON_NODE(item) ((item) != NULL && ((item)->parsed == true))\fP +.br +\fB#define CONVERTED_PARSED_JSON_NODE(item) ((item) != NULL && (((item)->parsed == true) && ((item)->converted == true)))\fP +.br +\fB#define CONVERTED_JSON_NODE(item) ((item) != NULL && (item)->converted == true)\fP +.sp +.B "extern const char *const json_parser_version; /* library version format: major.minor YYYY-MM-DD */" +.br +.B "extern const char *const jparse_version; /* jparse version format: major.minor YYYY-MM-DD */" +.sp +.B "extern struct json *parse_json(char const *ptr, size_t len, char const *filename, bool *is_valid);" +.br +.B "extern struct json *parse_json_stream(FILE *stream, char const *filename, bool *is_valid);" +.br +.B "extern struct json *parse_json_file(char const *name, bool *is_valid);" +.sp +.B "extern char const *json_get_type_str(struct json *node, bool encoded);" +.sp +.B "extern bool json_dbg_allowed(int json_dbg_lvl);" +.br +.B "extern bool json_warn_allowed(void);" +.br +.B "extern bool json_err_allowed(void);" +.br +.B "extern void json_dbg(int json_dbg_lvl, char const *name, const char *fmt, ...)" +.SH DESCRIPTION +The +.B jparse +library provides a way for C applications to parse JSON in a file (including stdin) or a string, returning a tree of the parsed JSON that one may then manipulate. +The function +.B parse_json +parses a JSON string +.I ptr +of length +.I len +in file +.IR filename . +If +.I is_valid +is not NULL, it will set +.I *is_valid +to true prior to returning the tree but it is an error if it is NULL. +The +.I ptr +is a pointer to the start of the JSON data. +The function will scan up to +.I len +bytes so that as long as one knows where in the string the JSON is, they can parse a document with other kinds of data. +If +.I filename +is NULL then it will read from +.B stdin +which can also be done by passing in \fI"\-"\fP. +The function will return the parsed JSON as a tree of type +.BR struct\ json\ * . +If the parse fails a blank JSON tree is returned instead. +.sp +The function +.B parse_json_stream +is like +.B parse_json +except that it parses an entire +.B FILE * +and does not accept a number of bytes to scan. +The +.I filename +is for messages and is not used to determine what file to open as the stream should already be open. +If you wish to do that you should use the +.B parse_json_file() +function instead. +Unless +.I stream +is +.B stdin +the state of it should be considered unsafe to use after the return of the function as it will be closed. +The function returns the parsed JSON as a +.BR struct\ json\ * . +.sp +The +.B parse_json_file +function is essentially a wrapper to the +.B parse_json_stream +function as it will open the file +.I filename +and then call +.B parse_json_stream +on the stream, returning a +.B struct json * +tree. +.SS Matching functions +The +.B json_get_type_str +returns a +.B char const * +with what was matched in the parser. +Depending on if the +.I encoded +boolean is true or not, it returns the encoded or decoded string, assuming the JSON node type has a distinction. +.SS Debug, warn and error functions +.PP +The function +.B json_dbg_allowed +will return true if debug output would be displayed at the verbosity level +.IR json_dbg_lvl . +.br +The functions +.B json_warn_allowed +and +.B json_err_allowed +will return true if warnings and error output is allowed, respectively. +.sp +The function +.B json_dbg +allows for your application to give debug information to the user. +The +.I json_dbg_lvl +is the verbosity level which, along with the +.I dbg_output_allowed +boolean, will determine if the output is to be printed. +As long as +.I dbg_output_allowed +is true and +.I json_dbg_lvl +is either +.B JSON_DBG_FORCED +or <= the +.I json_verbosity_level +then the output will be displayed. +The +.I name +is the name you wish to provide to the function, whether it be your application name or the function name that called it. +The +.I fmt +is a +.BR printf (3) +style format argument. +.SS The json struct +.PP +The +.I json +structure is defined as: +.sp +.in +4n +.nf +struct json +{ + enum item_type type; /* union item specifier */ + union json_union { +.in +4n +.nf + struct json_number number; /* JTYPE_NUMBER - value is number (integer or floating point) */ + struct json_string string; /* JTYPE_STRING - value is a string */ + struct json_boolean boolean; /* JTYPE_BOOL - value is a JSON boolean */ + struct json_null null; /* JTYPE_NULL - value is a JSON null value */ + struct json_member member; /* JTYPE_MEMBER - value is a JSON member: name : value */ + struct json_object object; /* JTYPE_OBJECT - value is a JSON { members } */ + struct json_array array; /* JTYPE_ARRAY - value is a JSON [ elements ] */ + struct json_elements elements; /* JTYPE_ELEMENTS - zero or more JSON values */ +.in + } item; + + /* + * JSON parse tree links + */ + struct json *parent; /* parent node in the JSON parse tree, or NULL if tree root or unlinked */ +.fi +.in +}; +.SS Checking for converted and/or parsed JSON nodes +.PP +Each JSON node struct has two booleans: +.B converted +and +.B parsed\c +\&. +The +.B converted +boolean indicates that the item could be converted whereas the +.B parsed +boolean indicates that the item could be parsed but it might or might not be converted. +It might be that it could not be converted but is parsable if it is a number string but the number is too big for the C types. +In this case the JSON can still be valid but the value is not converted. +This macro is used in the conversion routines and it is an error if both conversion and parsing fails. +If +.B converted +is true then +.B parsed +should be true too. +.PP +The macro +.B VALID_JSON_NODE +checks that either of the JSON node booleans, +.B converted +and +.B parsed\c +\&, are true. +.PP +The macro +.B PARSED_JSON_NODE +checks that the node's +.B parsed +boolean is true. +.PP +The macro +.B CONVERTED_PARSED_JSON_NODE +checks that the node's +.B converted +boolean is true and that the +.B parsed +boolean is true. +.PP +The macro +.B CONVERTED_JSON_NODE +checks that the node's +.B converted +boolean is true. +.SS Version strings +The string +.BR jparse_version , +which points to +.BR JPARSE_VERSION , +is the current version of the +.B jparse +tool. +The string +.BR json_parser_version , +which points to +.BR JSON_PARSER_VERSION , +is the current version of the parser itself. +.SH RETURN VALUE +.PP +The functions +.BR parse_json , +.B parse_json_stream +and +.B parse_json_file +return a +.B struct json * +which is either blank or, if the parse was successful, a tree of the entire parsed JSON. +.PP +The functions +.BR json_dbg_allowed , +.B json_warn_allowed +and +.B json_err_allowed +will return true if debug, warn or error messages are allowed, respectively, and otherwise false. +.SH NOTES +.PP +This JSON parser was written as a collaboration between Cody Boone Ferguson and Landon Curt Noll, one of the IOCCC Judges, to support +IOCCCMOCK, IOCCC28 and beyond. +.PP +For more detailed history that goes beyond this humble man page we recommend you check +.BR jparse (1), +.IR README.md , +and the GitHub git log as well as reading the source code (or not :\-) ). +Understand that by source we refer to the +.I jparse.l +and +.I jparse.y +files: we do NOT recommend you read the generated code! +This is because doing so might give you nightmares and cause other horrible symptoms. :-) +See the apology at the top of the generated files or look directly at +.I sorry.tm.ca.h +instead. +.SS Valid JSON +In the case that a value cannot be converted but it is valid JSON the parser will still successfully validate the JSON. +This might happen if, for example, a number is too big for the C types but as long as the JSON itself is valid the parse tree will be considered valid and not NULL. +.PP +.SH BUGS +Although error reporting does have locations it is only line numbers and columns. +Additionally the column can be misleading because of characters that take up more than one column but are counted as just one (tabs for example). +.sp +Although the scanner and parser are re-entrant only one parse at one time in a process has been tested. +The testing of more than one parse at the same time is way out of scope of this repo but will be tested more as it's moved to a separate repo. +.sp +If it's not clear this means that having more than one parse active in the same process at the same time is not tested so even though it should be okay there might be some issues that have yet to be discovered. +.SH SEE ALSO +.BR jparse (1), +.IR README.md \|, +.BR printf (3) diff --git a/jparse/man/man8/jsemcgen.sh.8 b/jparse/man/man8/jsemcgen.sh.8 deleted file mode 120000 index b278271b9..000000000 --- a/jparse/man/man8/jsemcgen.sh.8 +++ /dev/null @@ -1 +0,0 @@ -jsemcgen.8 \ No newline at end of file diff --git a/jparse/man/man8/jsemcgen.sh.8 b/jparse/man/man8/jsemcgen.sh.8 new file mode 100644 index 000000000..f29db35e5 --- /dev/null +++ b/jparse/man/man8/jsemcgen.sh.8 @@ -0,0 +1,414 @@ +.\" section 8 man page for jsemcgen.sh +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH jsemcgen.sh 8 "30 January 2023" "jsemcgen.sh" "jparse tools" +.SH NAME +.BR jsemcgen.sh (8) +\- generate JSON semantics table via the +.BR jsemtblgen (8) +tool +.SH SYNOPSIS +.B jsemcgen.sh +.RB [\| \-h \|] +.RB [\| \-v +.IR level \|] +.RB [\| \-J +.IR level \|] +.RB [\| \-q \|] +.RB [\| \-V \|] +.RB [\| \-s \|] +.RB [\| \-I \|] +.RB [\| \-N +.IR name \|] +.RB [\| \-D +.IR def_func \|] +.RB [\| \-P +.IR prefix \|] +.RB [\| \-1 +.IR func \|] +.RB [\| \-S +.IR func \|] +.RB [\-B +.IR func \|] +.RB [\-0 +.IR func \|] +.RB [\-M +.IR func \|] +.RB [\-O +.IR func \|] +.RB [\-A +.IR func \|] +.RB [\-U +.IR func \|] +.RB [\-j +.IR jsemtblgen \|] +.RB [\-p +.IR patch_tool \|] +.I file.json +.I head +.I patch +.I tail +.I out +.SH DESCRIPTION +This tool is a wrapper to the +.BR jsemtblgen (8) +tool which itself creates JSON semantics tables. +JSON semantics tables allow for semantic tests on valid JSON such as testing counts of JSON objects at various depths and testing values of JSON objects as well as testing relationships between values of JSON objects. +.PP +The +.I file.json +file is expected to be a valid JSON file used to generate the initial JSON semantics table. +.sp +The +.I head +file is a file add to the beginning of the +.BR jsemtblgen (8) +output (before patched +.BR jsemtblgen (8) +output). +If +.I head +is +.I . +(dot) then no file is prepended. +.sp 1 +The +.I patch +file is a patch file to apply to the output of +.BR jsemtblgen (8) +with +.I head +and +.IR tail . +If +.I patch +is +.I . +(dot) then no patch is applied. +.sp +The +.I tail +file is a file to add to the end of the +.BR jsemtblgen (8) +output (after patching the +.BR jsemtblgen (8) +output). +If +.I tail +is +.I . +(dot) then no file is appended. +.sp 1 +The +.I out +argument is the +.BR jsemtblgen (8) +output with possible head, tail and patch applied. +.SH OPTIONS +.TP +.B \-h +print help and exit. +.TP +.BI \-v\ level +set verbosity level to +.IR level . +.sp 1 +This option is passed to +.BR jsemtblgen (8) +when it is invoked. +.TP +.BI \-J\ level +set JSON verbosity level to +.IR level . +.sp 1 +This option is passed to +.BR jsemtblgen (8) +when it is invoked. +.TP +.B \-q +set quiet mode. +.sp 1 +This option is passed to +.BR jsemtblgen (8) +when it is invoked. +.TP +.B \-V +print version and exit. +.TP +.B \-s +specify that arg is a string to be processed rather than a file. +.sp 1 +This option is passed to +.BR jsemtblgen (8) +when it is invoked. +.TP +.B \-I +output as a C header file. +.sp 1 +This option is passed to +.BR jsemtblgen (8) +when it is invoked. +.TP +.BI \-N\ name +set name of the semantics table to +.IR name . +.sp 1 +This option is passed to +.BR jsemtblgen (8) +when it is invoked. +.TP +.BI \-D\ def_func +validate with +.I def_func() +unless overridden by another flag. +.sp 1 +This option is passed to +.BR jsemtblgen (8) +when it is invoked. +.TP +.BI \-P\ prefix +validate +.B JTYPE_MEMBER +JSON nodes with +.B prefix_name() +(def: do not) +.RS +Note that the name is based on the +.B JTYPE_MEMBER +JSON decoded name string. +Underscore (_) replaces any name chars that are not valid in a C function name. +.B \-P +overrides any use of +.BR \-M . +.sp 1 +This option is passed to +.BR jsemtblgen (8) +when it is invoked. +.RE +.TP +.BI \-1\ func +validate +.B JTYPE_NUMBER +JSON nodes with +.IR func() . +.sp 1 +This option is passed to +.BR jsemtblgen (8) +when it is invoked. +.TP +.BI \-S\ func +validate +.B JTYPE_STRING +JSON nodes with +.IR func() . +.sp 1 +This option is passed to +.BR jsemtblgen (8) +when it is invoked. +.TP +.BI \-B\ func +validate +.B JTYPE_BOOL +JSON nodes with +.IR func() . +.sp 1 +This option is passed to +.BR jsemtblgen (8) +when it is invoked. +.TP +.BI \-0\ func +validate +.B JTYPE_NULL +JSON nodes with +.IR func() . +.sp 1 +This option is passed to +.BR jsemtblgen (8) +when it is invoked. +.TP +.BI \-M\ func +validate +.B JTYPE_MEMBER +JSON nodes with +.IR func() . +.sp 1 +This option is passed to +.BR jsemtblgen (8) +when it is invoked. +.TP +.BI \-O\ func +validate +.B JTYPE_OBJECT +JSON nodes with +.IR func() . +.sp 1 +This option is passed to +.BR jsemtblgen (8) +when it is invoked. +.TP +.BI \-A\ func +validate +.B JTYPE_ARRAY +JSON nodes with +.IR func() . +.sp 1 +This option is passed to +.BR jsemtblgen (8) +when it is invoked. +.TP +.BI \-U\ func +validate nodes with unknown types with +.IR func() . +.sp 1 +This option is passed to +.BR jsemtblgen (8) +when it is invoked. +.TP +.BI \-j\ jsemtblgen +set path to +.BR jsemtblgen (8) +to +.IR jsemtblgen . +.TP +.BI \-p\ patch_tool +set path to the patch program to +.IR patch_tool . +.SH EXAMPLE +Prepending a +.I head +file and +appending a +.I tail +file is useful for forming a complete C source +or C header file. +.PP +Consider this example: +.sp 1 +.in +0.5i +.nf +jsemcgen.sh \-P chk file.json head.c . . json_chk.c +jsemcgen.sh \-I \-P chk file.json head.h . tail.h json_chk.h +.fi +.in -0.5i +.PP +The following +.I head.c +file would be useful as a prepending file when forming +.IR json_chk.c : +.sp 1 +.in +0.5i +.nf +/* + * json_chk - JSON semantic check table + */ + +#include "json_chk.h" +.fi +.in -0.5i +.PP +The following +.I head.h +file would be useful as a prepending file when forming +.IR json_chk.h : +.sp 1 +.in +0.5i +.nf +/* + * json_chk - JSON semantic check table + */ + +#if !defined(INCLUDE_JSON_CHK_H) +# define INCLUDE_JSON_CHK_H + +#include "json_sem.h" +.fi +.in -0.5i +.PP +Along with the following +.I tail.h +file would be useful as an appending file when forming +.IR json_chk.h : +.sp 1 +.in +0.5i +.nf +#endif /* INCLUDE_JSON_CHK_H */ +.fi +.in -0.5i +.PP +The +.I patch +file is useful to modify the default output of +.BR jsemtblgen (8) +especially when forming the C json semantic table. +For example, the default +.B min +value is always set to 1. +A +.I patch +file can be used to change the minimum value. +.PP +As another example, the default +.B max +value is set to count. +A +.I patch +file can be used to change the maximum values to a value +such as +.B INF +(infinite value). +.SH EXIT STATUS +.TP +0 +valid JSON +.TQ +1 +invalid JSON +.TQ +2 +.B \-h +and help string printed or +.B \-V +and version string printed +.TQ +3 +command line error +.TQ +4 +.I +jsemtblgen +or +.I patch_tool +is not an executable file +.TQ +5 +one of the files +.IR file.json , +.IR head , +.I patch +or +.I tail +is not a readable file +.TQ +>= 10 +internal error +.SH NOTES +.PP +The JSON parser +.B jparse +was co\-developed by Cody Boone Ferguson and Landon Curt Noll (one of the IOCCC Judges) in support for IOCCCMOCK, IOCCC28 and beyond. +.SH BUGS +If you have a problem with the tool (not JSON itself! :\-) ) you can report it at the GitHub issues page. +It can be found at +.br +.IR \ . +.SH SEE ALSO +.BR jsemtblgen (8), +.BR jparse (3) diff --git a/jparse/man/man8/run_bison.sh.8 b/jparse/man/man8/run_bison.sh.8 deleted file mode 120000 index fd9e03f23..000000000 --- a/jparse/man/man8/run_bison.sh.8 +++ /dev/null @@ -1 +0,0 @@ -run_bison.8 \ No newline at end of file diff --git a/jparse/man/man8/run_bison.sh.8 b/jparse/man/man8/run_bison.sh.8 new file mode 100644 index 000000000..43b071f05 --- /dev/null +++ b/jparse/man/man8/run_bison.sh.8 @@ -0,0 +1,285 @@ +.\" section 1 man page for run_bison.sh +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH run_bison.sh 8 "30 January 2023" "run_bison.sh" "IOCCC tools" +.SH NAME +.B run_bison.sh +\- run +.B bison +to generate C code from a +.I *.y +file or use backup files if error +.SH SYNOPSIS +.B run_bison.sh +.RB [\| \-h \|] +.RB [\| \-V \|] +.RB [\| \-v +.IR level \|] +.RB [\| \-o \|] +.RB [\| \-b +.IR bison \|] +.RB [\| \-g +.IR verge \|] +.RB [\| \-p +.IR prefix \|] +.RB [\| \-s +.IR sorry.h \|] +.RB [\| \-S \|] +.RB [\| \-B +.IR dir \|] +.RB [\| \-D +.IR dir \|] +.B \-\- +.RI [\| bison_flags \|] +.SH DESCRIPTION +.B run_bison.sh +attempts to find a recent enough version of +.B bison +(minimum version defined in +.IR run_bison.sh ) +and use it to generate code from the +.I prefix.y +file. +The default prefix is +.I jparse +but this script can be used for other parsers as well. +If a recent enough version is not found or +.BR bison (1) +encounters an error (syntax error or anything else) and the +.B \-o +option is not specified, it attempts to use the backup files +.I prefix.tab.ref.c +and +.IR prefix.tab.ref.h . +.SH OPTIONS +.TP +.B \-h +Print help and exit. +.TP +.B \-V +Print version and exit. +.TP +.BI \-v\ level +Set verbosity level to +.IR level +(def: 0). +.TP +.B \-o +Do +.B NOT +use backup files. +If +.BR bison (1) +cannot be used or fails to generate the files the script will fail. +.TP +.BI \-b\ bison +Set +.BR bison (1) +basename to +.IR bison . +.TP +.BI \-g\ verge +Set path to the +.BR verge (1) +tool to +.IR verge . +This is used to determine if the +.BR bison (1) +tool is recent enough. +.TP +.BI \-p\ prefix +Set prefix of files to use to +.IR prefix . +The +.BR bison (1) +input file will be +.IR prefix.y . +If the +.B \-o option was not used and +.BR bison (1) +cannot be used or fails then the backup files +.I prefix.tab.ref.c +and +.I prefix.tab.ref.h +will be used. +.TP +.BI \-s\ sorry.h +Set path of file to prepend to the C output to +.IR sorry.h . +.TP +.B \-S +Suppress prepending apology to generated C output files. +.TP +.BI \-B\ bison_dir +Add directory +.I bison_dir +to list to search for +.BR bison . +.B \-B +can be used more than once. +If not used the script looks at +.BR $PATH . +.TP +.BI \-D\ dir +Set directory to find the flex source file in to +.IR dir . +Default is +.I . +(dot). +.PP +The +.I bison_flags +are any optional flags to give to +.BR bison (1) +before the prefix. +.SH EXIT STATUS +.TP +0 +.BR bison (1) +output files formed or backup files used instead +.TQ +1 +.BR bison (1) +not found or too old and \-o used +.TQ +2 +good +.BR bison (1) +found and ran but failed to form proper output files +.TQ +3 +.BR bison (1) +input file missing or not readable: backup files had to be used +.TQ +4 +backup files missing or are not readable +.TQ +5 +failed to use backup files to form the +.BR bison (1) +C output files +.TQ +6 +.I sorry.h +file missing/not readable or +.B verge +missing/not executable +.TQ +7 +.B \-h +and help string printed or +.B \-V +and version string printed +.TQ +8 +command line usage error +.TQ +>=10 +internal error +.SH NOTES +.PP +The +.B \-o +option is mainly for maintainers of the +.B jparse +parser and scanner but it can be used to test if you have a recent enough version of +.BR bison . +The idea behind it is if +.B bison +fails it might indicate a syntax error which the authors of +.B jparse +would need to fix. +.PP +Beware that some +.BR make (1) +implementations have a default rule for +.I *.y +files so that if one were to do: +.sp +.RS +.ft B + touch foo.y + make +.ft R +.RE +.sp +and +.I foo.c +is supposed to exist (and not generated by bison +.BR bison (1)) +it will likely cause a compilation error until it is replaced with the original file. +Even worse is that until that file is deleted (assuming +.I foo.y +is in error say because it was created by touch and is empty) make will continue to fail. +This assumes that +.B foo +is a target in the Makefile, of course. +.SH BUGS +.PP +If you have any issues with the tool you can open an issue at +.br +.IR \ . +.SH EXAMPLES +.PP +Run +.B run_bison.sh +with default options, which should attempt to run +.B bison +on the +.I jparse.y +file: +.sp +.RS +.ft B + ./run_bison.sh +.ft R +.RE +.PP +Run +.B run_bison.sh +but specify that backup files are not to be used in case a recent enough version of +.B bison +cannot be found or fails for some reason: +.sp +.RS +.ft B + ./run_bison.sh \-o +.ft R +.RE +.PP +Try and run +.B bison +on the file +.I foobar.y +and don't use any backup files: +.sp +.RS +.ft B + ./run_bison.sh \-o \-p foobar +.ft R +.RE +.PP +Try and run +.B bison +on the file +.I foobar.y +with yacc instead of +.B bison +and don't use any backup files: +.sp +.RS +.ft B + ./run_bison.sh \-o \-p foobar \-b yacc +.ft R +.RE +.SH SEE ALSO +.BR run_flex (1), +.BR jparse (1) diff --git a/jparse/man/man8/run_flex.sh.8 b/jparse/man/man8/run_flex.sh.8 deleted file mode 120000 index 78e9d84e9..000000000 --- a/jparse/man/man8/run_flex.sh.8 +++ /dev/null @@ -1 +0,0 @@ -run_flex.8 \ No newline at end of file diff --git a/jparse/man/man8/run_flex.sh.8 b/jparse/man/man8/run_flex.sh.8 new file mode 100644 index 000000000..7ca0cec64 --- /dev/null +++ b/jparse/man/man8/run_flex.sh.8 @@ -0,0 +1,281 @@ +.\" section 1 man page for run_flex.sh +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH run_flex.sh 8 "30 January 2023" "run_flex.sh" "IOCCC tools" +.SH NAME +.B run_flex.sh +\- run +.BR flex (1) +to generate C code from a +.I *.l +file or use backup files if error +.SH SYNOPSIS +.B run_flex.sh +.RB [\| \-h \| ] +.RB [\| \-V \|] +.RB [\| \-v +.IR level \|] +.RB [\| \-o \|] +.RB [\| \-f +.IR flex \|] +.RB [\| \-g +.IR verge \|] +.RB [\| \-p +.IR prefix \|] +.RB [\| \-s +.IR sorry.h \|] +.RB [\| \-S] +.RB [\| \-F +.IR dir \|] +.RB [\| \-D +.IR dir \|] +.B \-\- +.RB [\| +.RI flex_flags \|] +.SH DESCRIPTION +.B run_flex.sh +attempts to find a recent enough version of +.BR flex (1) +(minimum version defined in +.I run_flex.sh\c +\&) and use it to generate code from the +.I prefix.l +file. +The default prefix is +.I jparse +but this script can be used for other scanners as well. +If a recent enough version is not found or +.BR flex (1) +encounters an error (syntax error or anything else) and the +.B \-o +option is not specified, it attempts to use the backup files +.I prefix.ref.c +and +.IR prefix.lex.ref.h . +.SH OPTIONS +.TP +.B \-h +Print help and exit. +.TP +.B \-V +Print version and exit. +.TP +.BI \-v\ level +Set verbosity level to +.IR level +(def: 0). +.TP +.B \-o +Do +.B NOT +use backup files. +If +.BR flex (1) +cannot be used or fails to generate the files the script will fail. +.TP +.BI \-f\ flex +Set +.BR flex (1) +basename to +.IR flex . +.TP +.BI \-g\ verge +Set path to the +.BR verge (1) +tool to +.IR verge . +This is used to determine if the +.BR flex (1) +tool is recent enough. +.TP +.BI \-p\ prefix +Set prefix of files to use to +.IR prefix . +The +.BR flex (1) +input file will be +.IR prefix.l . +If the +.B \-o +option was not used and +.BR flex (1) +cannot be used or fails then the backup files +.I prefix.ref.c +and +.I prefix.lex.ref.h +will be used. +.TP +.BI \-s\ sorry.h +Set path of file to prepend to the C output to +.IR sorry.h . +.TP +.B \-S +Suppress prepending apology to generated C output files. +.TP +.BI \-F\ flex_dir +Add directory +.I flex_dir +to list to search for +.BR flex (1). +.B \-F +can be used more than once. +If not used the script looks at +.BR $PATH . +.TP +.BI \-D\ dir +Set directory to find the +.BR flex (1) +source file. +Default is +.I . +(dot). +.PP +The +.I flex_flags +are any optional flags to give to +.BR flex (1) +before the prefix. +.SH EXIT STATUS +.TP +0 +.BR flex (1) +output files formed or backup files used instead +.TQ +1 +.BR flex (1) +not found or too old and +.B \-o +used +.TQ +2 +good +.BR flex (1) +found and ran but failed to form proper output files +.TQ +3 +.BR flex (1) +input file missing or not readable: backup files had to be used +.TQ +4 +backup files missing or are not readable +.TQ +5 +failed to use backup files to form the +.BR flex (1) +C output files +.TQ +6 +.I sorry.h +file missing/not readable or +.B verge +missing/not executable +.TQ +.TQ +7 +\-h and help string printed or \-V and version string printed +.TQ +8 +command line usage error +.TQ +>=10 +internal error +.SH NOTES +.PP +The +.B \-o +option is mainly for maintainers of the +.B jparse +scanner and parser but it can be used to test if you have a recent enough version of +.BR flex (1). +The idea behind it is if +.BR flex (1) +fails it might indicate a syntax error which the authors of +.B jparse +would need to fix. +.PP +Beware that some +.BR make (1) +implementations have a default rule for +.I *.l +files so that if one were to in this repo do: +.sp +.RS +.ft B + touch foo.l + make +.ft R +.RE +.sp +the file +.I foo.c +would be overwritten and cause a compilation error. +This appears to be because foo is actually referenced in the Makefile as a target. +.SH BUGS +.PP +If you have any issues with the tool you can open an issue at +.br +.IR \ . +.SH EXAMPLES +.PP +Run +.B run_flex.sh +with default options, which should attempt to run +.BR flex (1) +on the +.I jparse.l +file: +.sp +.RS +.ft B + ./run_flex.sh +.ft R +.RE +.PP +Run +.B run_flex.sh +but specify that the backup files are not to be used in case a recent enough version of +.BR flex (1) +cannot be found or fails for some reason: +.sp +.RS +.ft B + ./run_flex.sh \-o +.ft R +.RE +.PP +Try and run +.BR flex (1) +on the file +.I foobar.l +and don't use the backup files: +.sp +.RS +.ft B + ./run_flex.sh \-o \-p foobar +.ft R +.RE +.PP +Try and run +.BR flex (1) +on the file +.I foobar.l +with lex instead of +.BR flex (1) +and don't use the backup files: +.sp +.RS +.ft B + ./run_flex.sh \-o \-p foobar \-f lex +.ft R +.RE +.SH SEE ALSO +.BR run_bison (1), +.BR jparse (1) diff --git a/jparse/test_jparse/test_JSON/bad/12345678-1234-4321-abcd-1234567890ab-2-info.json b/jparse/test_jparse/test_JSON/bad/12345678-1234-4321-abcd-1234567890ab-2-info.json index effd893c3..8387c5bf9 100644 --- a/jparse/test_jparse/test_JSON/bad/12345678-1234-4321-abcd-1234567890ab-2-info.json +++ b/jparse/test_jparse/test_JSON/bad/12345678-1234-4321-abcd-1234567890ab-2-info.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/jparse/test_jparse/test_JSON/bad/test-0-info.json b/jparse/test_jparse/test_JSON/bad/test-0-info.json index 0beaf8939..b806fdcb5 100644 --- a/jparse/test_jparse/test_JSON/bad/test-0-info.json +++ b/jparse/test_jparse/test_JSON/bad/test-0-info.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "test", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/jparse/test_jparse/test_JSON/bad/test-1-info.json b/jparse/test_jparse/test_JSON/bad/test-1-info.json index 14c6fd809..6ccb91fcc 100644 --- a/jparse/test_jparse/test_JSON/bad/test-1-info.json +++ b/jparse/test_jparse/test_JSON/bad/test-1-info.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "test", "entry_num" : 1, "title" : "title-for-entry0", diff --git a/jparse/test_jparse/test_JSON/bad_loc/12345678-1234-4321-abcd-1234567890ab-2-info.json b/jparse/test_jparse/test_JSON/bad_loc/12345678-1234-4321-abcd-1234567890ab-2-info.json index 322a23c0e..07dd0dbe1 100644 --- a/jparse/test_jparse/test_JSON/bad_loc/12345678-1234-4321-abcd-1234567890ab-2-info.json +++ b/jparse/test_jparse/test_JSON/bad_loc/12345678-1234-4321-abcd-1234567890ab-2-info.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/jparse/test_jparse/test_JSON/bad_loc/test-0-info.json b/jparse/test_jparse/test_JSON/bad_loc/test-0-info.json index 0beaf8939..b806fdcb5 100644 --- a/jparse/test_jparse/test_JSON/bad_loc/test-0-info.json +++ b/jparse/test_jparse/test_JSON/bad_loc/test-0-info.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "test", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/jparse/test_jparse/test_JSON/bad_loc/test-1-info.json b/jparse/test_jparse/test_JSON/bad_loc/test-1-info.json index 14c6fd809..6ccb91fcc 100644 --- a/jparse/test_jparse/test_JSON/bad_loc/test-1-info.json +++ b/jparse/test_jparse/test_JSON/bad_loc/test-1-info.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "test", "entry_num" : 1, "title" : "title-for-entry0", diff --git a/jparse/test_jparse/test_JSON/good/12345678-1234-4321-abcd-1234567890ab-2-info.json b/jparse/test_jparse/test_JSON/good/12345678-1234-4321-abcd-1234567890ab-2-info.json index 62daf73a8..ad94eb5eb 100644 --- a/jparse/test_jparse/test_JSON/good/12345678-1234-4321-abcd-1234567890ab-2-info.json +++ b/jparse/test_jparse/test_JSON/good/12345678-1234-4321-abcd-1234567890ab-2-info.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/jparse/test_jparse/test_JSON/good/test-0-info.json b/jparse/test_jparse/test_JSON/good/test-0-info.json index 16e3ff022..cd63fe940 100644 --- a/jparse/test_jparse/test_JSON/good/test-0-info.json +++ b/jparse/test_jparse/test_JSON/good/test-0-info.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "test", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/jparse/test_jparse/test_JSON/good/test-1-info.json b/jparse/test_jparse/test_JSON/good/test-1-info.json index aeaa1776f..ab5b4f3af 100644 --- a/jparse/test_jparse/test_JSON/good/test-1-info.json +++ b/jparse/test_jparse/test_JSON/good/test-1-info.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "test", "entry_num" : 1, "title" : "title-for-entry0", diff --git a/soup/man/man1/bug_report.sh.1 b/soup/man/man1/bug_report.sh.1 deleted file mode 120000 index c2ca32f7b..000000000 --- a/soup/man/man1/bug_report.sh.1 +++ /dev/null @@ -1 +0,0 @@ -bug_report.1 \ No newline at end of file diff --git a/soup/man/man1/bug_report.sh.1 b/soup/man/man1/bug_report.sh.1 new file mode 100644 index 000000000..8d08f9580 --- /dev/null +++ b/soup/man/man1/bug_report.sh.1 @@ -0,0 +1,149 @@ +.\" section 1 man page for bug_report.sh +.\" +.\" This man page was first written by Cody Boone Ferguson for the IOCCC +.\" in 2022. +.\" +.\" Humour impairment is not virtue nor is it a vice, it's just plain +.\" wrong: almost as wrong as JSON spec mis-features and C++ obfuscation! :-) +.\" +.\" "Share and Enjoy!" +.\" -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-) +.\" +.TH bug_report.sh 1 "30 January 2023" "bug_report.sh" "IOCCC tools" +.SH NAME +.B bug_report.sh +\- run a series of tests, collecting system information in the process, to help report bugs and issues +.SH SYNOPSIS +.B bug_report.sh +.RB [\| \-h \|] +.RB [\| \-V \|] +.RB [\| \-v +.IR level \|] +.RB [\| \-D +.IR level \|] +.RB [\| \-t \|] +.RB [\| \-x \|] +.RB [\| \-l \|] +.RB [\| \-L +.IR logfile \|] +.RB [\| \-M +.IR make_flags \|] +.SH DESCRIPTION +.B bug_report.sh +runs a series of tests and scripts to gather as much information about your system as possible in order to help with reporting bugs or other issues. +If any step fails it will let you know and recommend that you file an issue at the GitHub issue page, reminding you to attach the log file that the script creates. +If no step fails it will tell you that everything is okay but still informs you that if you feel there is an issue you can report it, also reminding you to attach the log file. +If the +.B \-x +option is specified and no problems were detected the log file will be deleted. +The +.B \-L +.I logfile +option allows one to override the log file name. +This is important for +.BR prep.sh (8). +.SH OPTIONS +.TP +.B \-h +Print help and exit. +.TP +.B \-V +Print version and exit. +.TP +.BI \-v\ level +Set verbosity level to +.I level +(def: 0). +.TP +.B \-t +Disable make actions. +.TP +.B \-x +Delete log file if no warnings and no errors were detected. +.TP +.B \-l +Only write to log file: don't write to stdout. +.TP +.BI \-M\ make_flags +Set make flags for the make actions. +If you specify more than one option do not forget to quote it to prevent the shell from causing problems. +We recommend you to +.B NOT +use this when actually reporting bugs. +This is because it will provide us some very useful information. +Nevertheless it is there for the cases where it's useful. +.SH EXIT STATUS +.TP +0 +all tests OK +.TQ +1 +failed to create bug report file +.TQ +2 +help mode exit or print version mode exit +.TQ +3 +invalid command line +.TQ +4 +error in function call +.TQ +>=10 +at least one check failed +.SH NOTES +.PP +Even if the script exits 0 it does not necessarily mean there is no problem. +If you feel there is a problem that was not detected you may still open an issue on the GitHub page (or email the Judges though this is discouraged as not all tools were created by the Judges for example this tool itself). +The script will tell you how to do this whether there are issues detected or not. +.PP +If all tests are OK it will tell you that all should be okay and you can safely delete the log file. +If the +.B \-x +option is specified and no issues are detected the log file will be deleted. +If any issues are found it will recommend you to report it, reminding you to attach the log in your report. +.SH BUGS +.PP +Right now there are no known bugs except that it cannot possibly account for everything. +Previously there was a bug in this script that made it so that issues detected were not reported. +This is very ironic and amusing since the purpose of the script is to help identify bugs. :\-) +.PP +Nevertheless, if you feel there is an issue with this tool you may open an issue at the GitHub issues page. +Running the script will tell you how to report issues and it would be good if you attach the log file in this report as well. +.PP +Please remember that just because the script reports issues does not mean that there's a bug with the script itself. +Instead it probably is a problem with one of the tools on your system which the script detected and is reporting. +If that is the case it will let you know and tell you how to report that issue. +.PP +Please make sure to attach the bug report to your bug report. :\-) +.PP +The output can seem redundant if it fails because of +.BR hostchk (1) +since it will trigger a warning that tells you to use +.BR hostchk (1) +with more verbosity and also tells you to use +.B bug_report.sh +which tells you to use +.BR hostchk (1). +Sorry in advance if (to use an American English phrase which I will happily use for a pun for a pun not made is a wasted opportunity) this throws you for a loop :\-) but we feel that it's better that the warning is really stressed as it most likely means that you won't be able to use the toolkit to successfully create a valid IOCCC tarball. +But now that you're in the loop it shouldn't even matter! :\-) +.SH EXAMPLES +.PP +Run script: +.sp +.RS +.ft B + ./bug_report.sh +.ft R +.RE +.PP +Run script, specifying the log file name, making output only go to the log file and making sure it is deleted if no problems are found: +.sp +.RS +.ft B + ./bug_report.sh -l -L foo.log -x +.ft R +.RE +.SH SEE ALSO +.BR hostchk (1), +.BR prep (8) diff --git a/soup/version.h b/soup/version.h index 0f5784ecf..5a0ce1166 100644 --- a/soup/version.h +++ b/soup/version.h @@ -101,7 +101,7 @@ /* * official txzchk version */ -#define TXZCHK_VERSION "1.0.1 2023-06-16" /* format: major.minor YYYY-MM-DD */ +#define TXZCHK_VERSION "1.0.2 2023-11-06" /* format: major.minor YYYY-MM-DD */ /* * official chkentry version diff --git a/test_ioccc/test_JSON/general.json/bad/info.NUL.json b/test_ioccc/test_JSON/general.json/bad/info.NUL.json index ca68f9288..e38df23cc 100644 Binary files a/test_ioccc/test_JSON/general.json/bad/info.NUL.json and b/test_ioccc/test_JSON/general.json/bad/info.NUL.json differ diff --git a/test_ioccc/test_JSON/general.json/bad/info.extra-quote.json b/test_ioccc/test_JSON/general.json/bad/info.extra-quote.json index 1b4b7daef..dbaadf697 100644 --- a/test_ioccc/test_JSON/general.json/bad/info.extra-quote.json +++ b/test_ioccc/test_JSON/general.json/bad/info.extra-quote.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/bad/info.manifest-1.json b/test_ioccc/test_JSON/general.json/bad/info.manifest-1.json index 06340cc2c..6db6d1e16 100644 --- a/test_ioccc/test_JSON/general.json/bad/info.manifest-1.json +++ b/test_ioccc/test_JSON/general.json/bad/info.manifest-1.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/bad/info.manifest-13.json b/test_ioccc/test_JSON/general.json/bad/info.manifest-13.json index 58a65e9b4..490ce4ca1 100644 --- a/test_ioccc/test_JSON/general.json/bad/info.manifest-13.json +++ b/test_ioccc/test_JSON/general.json/bad/info.manifest-13.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/bad/info.manifest-24.json b/test_ioccc/test_JSON/general.json/bad/info.manifest-24.json index 6a69c265d..0ded37f7d 100644 --- a/test_ioccc/test_JSON/general.json/bad/info.manifest-24.json +++ b/test_ioccc/test_JSON/general.json/bad/info.manifest-24.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/bad/info.manifest-25.json b/test_ioccc/test_JSON/general.json/bad/info.manifest-25.json index 1a2c7992d..91c9cf2fe 100644 --- a/test_ioccc/test_JSON/general.json/bad/info.manifest-25.json +++ b/test_ioccc/test_JSON/general.json/bad/info.manifest-25.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/bad/info.manifest-26.json b/test_ioccc/test_JSON/general.json/bad/info.manifest-26.json index e39207199..20339f4bd 100644 --- a/test_ioccc/test_JSON/general.json/bad/info.manifest-26.json +++ b/test_ioccc/test_JSON/general.json/bad/info.manifest-26.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/bad/info.manifest-7.json b/test_ioccc/test_JSON/general.json/bad/info.manifest-7.json index a462c87bf..c14d5dae6 100644 --- a/test_ioccc/test_JSON/general.json/bad/info.manifest-7.json +++ b/test_ioccc/test_JSON/general.json/bad/info.manifest-7.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/bad/info.manifest-8.json b/test_ioccc/test_JSON/general.json/bad/info.manifest-8.json index 856306ccd..9ba338609 100644 --- a/test_ioccc/test_JSON/general.json/bad/info.manifest-8.json +++ b/test_ioccc/test_JSON/general.json/bad/info.manifest-8.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/bad/info.min-manifest.duplicate-line.01.json b/test_ioccc/test_JSON/general.json/bad/info.min-manifest.duplicate-line.01.json index 825aec125..e1b42fc40 100644 --- a/test_ioccc/test_JSON/general.json/bad/info.min-manifest.duplicate-line.01.json +++ b/test_ioccc/test_JSON/general.json/bad/info.min-manifest.duplicate-line.01.json @@ -8,7 +8,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/bad/info.min-manifest.duplicate-line.34.json b/test_ioccc/test_JSON/general.json/bad/info.min-manifest.duplicate-line.34.json index 82ce51108..0ea5e63be 100644 --- a/test_ioccc/test_JSON/general.json/bad/info.min-manifest.duplicate-line.34.json +++ b/test_ioccc/test_JSON/general.json/bad/info.min-manifest.duplicate-line.34.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/bad/info.min-manifest.duplicate-line.39.json b/test_ioccc/test_JSON/general.json/bad/info.min-manifest.duplicate-line.39.json index 2c2e7d4ac..0cb774a6a 100644 --- a/test_ioccc/test_JSON/general.json/bad/info.min-manifest.duplicate-line.39.json +++ b/test_ioccc/test_JSON/general.json/bad/info.min-manifest.duplicate-line.39.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/bad/info.min-manifest.duplicate-line.40.json b/test_ioccc/test_JSON/general.json/bad/info.min-manifest.duplicate-line.40.json index 08faa5030..4017df216 100644 --- a/test_ioccc/test_JSON/general.json/bad/info.min-manifest.duplicate-line.40.json +++ b/test_ioccc/test_JSON/general.json/bad/info.min-manifest.duplicate-line.40.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/bad/info.min-manifest.duplicate-line.45.json b/test_ioccc/test_JSON/general.json/bad/info.min-manifest.duplicate-line.45.json index ded63c44e..29525adc5 100644 --- a/test_ioccc/test_JSON/general.json/bad/info.min-manifest.duplicate-line.45.json +++ b/test_ioccc/test_JSON/general.json/bad/info.min-manifest.duplicate-line.45.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/bad/info.min-manifest.duplicate-line.46.json b/test_ioccc/test_JSON/general.json/bad/info.min-manifest.duplicate-line.46.json index d3316168c..e11bd0a71 100644 --- a/test_ioccc/test_JSON/general.json/bad/info.min-manifest.duplicate-line.46.json +++ b/test_ioccc/test_JSON/general.json/bad/info.min-manifest.duplicate-line.46.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/bad/info.min-manifest.missing-line.01.json b/test_ioccc/test_JSON/general.json/bad/info.min-manifest.missing-line.01.json index b4b51269b..0863fca31 100644 --- a/test_ioccc/test_JSON/general.json/bad/info.min-manifest.missing-line.01.json +++ b/test_ioccc/test_JSON/general.json/bad/info.min-manifest.missing-line.01.json @@ -6,7 +6,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/bad/info.min-manifest.missing-line.34.json b/test_ioccc/test_JSON/general.json/bad/info.min-manifest.missing-line.34.json index 175cbd364..5b89edaf2 100644 --- a/test_ioccc/test_JSON/general.json/bad/info.min-manifest.missing-line.34.json +++ b/test_ioccc/test_JSON/general.json/bad/info.min-manifest.missing-line.34.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/bad/info.min-manifest.missing-line.39.json b/test_ioccc/test_JSON/general.json/bad/info.min-manifest.missing-line.39.json index dc3fc50fa..e3ec2f60d 100644 --- a/test_ioccc/test_JSON/general.json/bad/info.min-manifest.missing-line.39.json +++ b/test_ioccc/test_JSON/general.json/bad/info.min-manifest.missing-line.39.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/bad/info.min-manifest.missing-line.40.json b/test_ioccc/test_JSON/general.json/bad/info.min-manifest.missing-line.40.json index 7e942012a..38f0c7bb6 100644 --- a/test_ioccc/test_JSON/general.json/bad/info.min-manifest.missing-line.40.json +++ b/test_ioccc/test_JSON/general.json/bad/info.min-manifest.missing-line.40.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/bad/info.min-manifest.missing-line.45.json b/test_ioccc/test_JSON/general.json/bad/info.min-manifest.missing-line.45.json index 60597e139..d9c91754d 100644 --- a/test_ioccc/test_JSON/general.json/bad/info.min-manifest.missing-line.45.json +++ b/test_ioccc/test_JSON/general.json/bad/info.min-manifest.missing-line.45.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/bad/info.min-manifest.missing-line.46.json b/test_ioccc/test_JSON/general.json/bad/info.min-manifest.missing-line.46.json index ef5c122a0..77374f137 100644 --- a/test_ioccc/test_JSON/general.json/bad/info.min-manifest.missing-line.46.json +++ b/test_ioccc/test_JSON/general.json/bad/info.min-manifest.missing-line.46.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/bad/info.missing-line.1.json b/test_ioccc/test_JSON/general.json/bad/info.missing-line.1.json index 61b83e090..f13ef2b86 100644 --- a/test_ioccc/test_JSON/general.json/bad/info.missing-line.1.json +++ b/test_ioccc/test_JSON/general.json/bad/info.missing-line.1.json @@ -6,7 +6,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/bad/info.missing-line.35.json b/test_ioccc/test_JSON/general.json/bad/info.missing-line.35.json index 99b752669..15d8dcb0a 100644 --- a/test_ioccc/test_JSON/general.json/bad/info.missing-line.35.json +++ b/test_ioccc/test_JSON/general.json/bad/info.missing-line.35.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/bad/info.missing-line.44.json b/test_ioccc/test_JSON/general.json/bad/info.missing-line.44.json index b51f8f63a..a8c20433d 100644 --- a/test_ioccc/test_JSON/general.json/bad/info.missing-line.44.json +++ b/test_ioccc/test_JSON/general.json/bad/info.missing-line.44.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/bad/info.missing-line.45.json b/test_ioccc/test_JSON/general.json/bad/info.missing-line.45.json index 25622d35a..164f072a2 100644 --- a/test_ioccc/test_JSON/general.json/bad/info.missing-line.45.json +++ b/test_ioccc/test_JSON/general.json/bad/info.missing-line.45.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/bad/info.missing-line.50.json b/test_ioccc/test_JSON/general.json/bad/info.missing-line.50.json index 7decb92bd..153fe14af 100644 --- a/test_ioccc/test_JSON/general.json/bad/info.missing-line.50.json +++ b/test_ioccc/test_JSON/general.json/bad/info.missing-line.50.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/bad/info.missing-line.51.json b/test_ioccc/test_JSON/general.json/bad/info.missing-line.51.json index 3d5d8e700..683f8731f 100644 --- a/test_ioccc/test_JSON/general.json/bad/info.missing-line.51.json +++ b/test_ioccc/test_JSON/general.json/bad/info.missing-line.51.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/bad/info.number.json b/test_ioccc/test_JSON/general.json/bad/info.number.json index ad387a2d7..3ec06c454 100644 --- a/test_ioccc/test_JSON/general.json/bad/info.number.json +++ b/test_ioccc/test_JSON/general.json/bad/info.number.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/bad/info.sorted.json b/test_ioccc/test_JSON/general.json/bad/info.sorted.json index efc606751..0e2689985 100644 --- a/test_ioccc/test_JSON/general.json/bad/info.sorted.json +++ b/test_ioccc/test_JSON/general.json/bad/info.sorted.json @@ -43,6 +43,6 @@ "trigraph_warning" : false, "ungetc_warning" : false, "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "wordbuf_warning" : false } diff --git a/test_ioccc/test_JSON/general.json/bad/info.string.1.json b/test_ioccc/test_JSON/general.json/bad/info.string.1.json index 0c7158f1b..b50784400 100644 --- a/test_ioccc/test_JSON/general.json/bad/info.string.1.json +++ b/test_ioccc/test_JSON/general.json/bad/info.string.1.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/bad/info.string.2.json b/test_ioccc/test_JSON/general.json/bad/info.string.2.json index c2c528308..57f920512 100644 --- a/test_ioccc/test_JSON/general.json/bad/info.string.2.json +++ b/test_ioccc/test_JSON/general.json/bad/info.string.2.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/bad/info.string.3.json b/test_ioccc/test_JSON/general.json/bad/info.string.3.json index 49c670a31..e1b0569fa 100644 --- a/test_ioccc/test_JSON/general.json/bad/info.string.3.json +++ b/test_ioccc/test_JSON/general.json/bad/info.string.3.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/bad/info.string.4.json b/test_ioccc/test_JSON/general.json/bad/info.string.4.json index 4eef6c704..dd73f66a3 100644 --- a/test_ioccc/test_JSON/general.json/bad/info.string.4.json +++ b/test_ioccc/test_JSON/general.json/bad/info.string.4.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/bad/info.unnamed-array.json b/test_ioccc/test_JSON/general.json/bad/info.unnamed-array.json index f9867bc14..0a3c1584d 100644 --- a/test_ioccc/test_JSON/general.json/bad/info.unnamed-array.json +++ b/test_ioccc/test_JSON/general.json/bad/info.unnamed-array.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.author_count.json b/test_ioccc/test_JSON/general.json/good/info.author_count.json index 6ade4b992..9027c3587 100644 --- a/test_ioccc/test_JSON/general.json/good/info.author_count.json +++ b/test_ioccc/test_JSON/general.json/good/info.author_count.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "author_count" : 1, diff --git a/test_ioccc/test_JSON/general.json/good/info.bad-comment-0.json b/test_ioccc/test_JSON/general.json/good/info.bad-comment-0.json index 8fe5fcf15..554502886 100644 --- a/test_ioccc/test_JSON/general.json/good/info.bad-comment-0.json +++ b/test_ioccc/test_JSON/general.json/good/info.bad-comment-0.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.bad-comment-1.json b/test_ioccc/test_JSON/general.json/good/info.bad-comment-1.json index d4d12e923..ac0d3f0dc 100644 --- a/test_ioccc/test_JSON/general.json/good/info.bad-comment-1.json +++ b/test_ioccc/test_JSON/general.json/good/info.bad-comment-1.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.bad-comment-2.json b/test_ioccc/test_JSON/general.json/good/info.bad-comment-2.json index 4820d5fa9..83dc4e3fa 100644 --- a/test_ioccc/test_JSON/general.json/good/info.bad-comment-2.json +++ b/test_ioccc/test_JSON/general.json/good/info.bad-comment-2.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.contest_id-0.json b/test_ioccc/test_JSON/general.json/good/info.contest_id-0.json index b12edc847..35954b230 100644 --- a/test_ioccc/test_JSON/general.json/good/info.contest_id-0.json +++ b/test_ioccc/test_JSON/general.json/good/info.contest_id-0.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-0234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.contest_id-1.json b/test_ioccc/test_JSON/general.json/good/info.contest_id-1.json index a712727b7..a04be58cd 100644 --- a/test_ioccc/test_JSON/general.json/good/info.contest_id-1.json +++ b/test_ioccc/test_JSON/general.json/good/info.contest_id-1.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-bbcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.contest_id-2.json b/test_ioccc/test_JSON/general.json/good/info.contest_id-2.json index be19e20c2..65e07f333 100644 --- a/test_ioccc/test_JSON/general.json/good/info.contest_id-2.json +++ b/test_ioccc/test_JSON/general.json/good/info.contest_id-2.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-5321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.contest_id-3.json b/test_ioccc/test_JSON/general.json/good/info.contest_id-3.json index eb1e62df3..06316a8cd 100644 --- a/test_ioccc/test_JSON/general.json/good/info.contest_id-3.json +++ b/test_ioccc/test_JSON/general.json/good/info.contest_id-3.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890a", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.contest_id-4.json b/test_ioccc/test_JSON/general.json/good/info.contest_id-4.json index d038d2125..d84aa685a 100644 --- a/test_ioccc/test_JSON/general.json/good/info.contest_id-4.json +++ b/test_ioccc/test_JSON/general.json/good/info.contest_id-4.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890abc", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.contest_id-5.json b/test_ioccc/test_JSON/general.json/good/info.contest_id-5.json index 86a8ca4ff..1d96f990e 100644 --- a/test_ioccc/test_JSON/general.json/good/info.contest_id-5.json +++ b/test_ioccc/test_JSON/general.json/good/info.contest_id-5.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890abx", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.extra-line.1.json b/test_ioccc/test_JSON/general.json/good/info.extra-line.1.json index 4621309a0..51609287e 100644 --- a/test_ioccc/test_JSON/general.json/good/info.extra-line.1.json +++ b/test_ioccc/test_JSON/general.json/good/info.extra-line.1.json @@ -6,7 +6,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.false.json b/test_ioccc/test_JSON/general.json/good/info.false.json index 58993ba68..fa94e8ba5 100644 --- a/test_ioccc/test_JSON/general.json/good/info.false.json +++ b/test_ioccc/test_JSON/general.json/good/info.false.json @@ -6,7 +6,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.formed_UTC.json b/test_ioccc/test_JSON/general.json/good/info.formed_UTC.json index fded8d4bc..fb98ee28d 100644 --- a/test_ioccc/test_JSON/general.json/good/info.formed_UTC.json +++ b/test_ioccc/test_JSON/general.json/good/info.formed_UTC.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "test", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.manifest-0.json b/test_ioccc/test_JSON/general.json/good/info.manifest-0.json index 3d85f2b74..b3d835d11 100644 --- a/test_ioccc/test_JSON/general.json/good/info.manifest-0.json +++ b/test_ioccc/test_JSON/general.json/good/info.manifest-0.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.manifest-10.json b/test_ioccc/test_JSON/general.json/good/info.manifest-10.json index ad8873ff6..0bca68489 100644 --- a/test_ioccc/test_JSON/general.json/good/info.manifest-10.json +++ b/test_ioccc/test_JSON/general.json/good/info.manifest-10.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.manifest-11.json b/test_ioccc/test_JSON/general.json/good/info.manifest-11.json index c7940d163..bca1b1d04 100644 --- a/test_ioccc/test_JSON/general.json/good/info.manifest-11.json +++ b/test_ioccc/test_JSON/general.json/good/info.manifest-11.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.manifest-12.json b/test_ioccc/test_JSON/general.json/good/info.manifest-12.json index 6d4ad5953..1362c8240 100644 --- a/test_ioccc/test_JSON/general.json/good/info.manifest-12.json +++ b/test_ioccc/test_JSON/general.json/good/info.manifest-12.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.manifest-14.json b/test_ioccc/test_JSON/general.json/good/info.manifest-14.json index 37f29aeb2..5f849fb9a 100644 --- a/test_ioccc/test_JSON/general.json/good/info.manifest-14.json +++ b/test_ioccc/test_JSON/general.json/good/info.manifest-14.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.manifest-15.json b/test_ioccc/test_JSON/general.json/good/info.manifest-15.json index f089ab1aa..8a3e79ec2 100644 --- a/test_ioccc/test_JSON/general.json/good/info.manifest-15.json +++ b/test_ioccc/test_JSON/general.json/good/info.manifest-15.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.manifest-16.json b/test_ioccc/test_JSON/general.json/good/info.manifest-16.json index d48cf8c53..f69be1d76 100644 --- a/test_ioccc/test_JSON/general.json/good/info.manifest-16.json +++ b/test_ioccc/test_JSON/general.json/good/info.manifest-16.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.manifest-17.json b/test_ioccc/test_JSON/general.json/good/info.manifest-17.json index e0389f9af..fd720aa0e 100644 --- a/test_ioccc/test_JSON/general.json/good/info.manifest-17.json +++ b/test_ioccc/test_JSON/general.json/good/info.manifest-17.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.manifest-18.json b/test_ioccc/test_JSON/general.json/good/info.manifest-18.json index 18b5eccbf..78cbe02ef 100644 --- a/test_ioccc/test_JSON/general.json/good/info.manifest-18.json +++ b/test_ioccc/test_JSON/general.json/good/info.manifest-18.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.manifest-19.json b/test_ioccc/test_JSON/general.json/good/info.manifest-19.json index 50da420c9..4f2293b3b 100644 --- a/test_ioccc/test_JSON/general.json/good/info.manifest-19.json +++ b/test_ioccc/test_JSON/general.json/good/info.manifest-19.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.manifest-2.json b/test_ioccc/test_JSON/general.json/good/info.manifest-2.json index 8cd98083b..25b1fc625 100644 --- a/test_ioccc/test_JSON/general.json/good/info.manifest-2.json +++ b/test_ioccc/test_JSON/general.json/good/info.manifest-2.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.manifest-20.json b/test_ioccc/test_JSON/general.json/good/info.manifest-20.json index 8e5ade481..5e303a609 100644 --- a/test_ioccc/test_JSON/general.json/good/info.manifest-20.json +++ b/test_ioccc/test_JSON/general.json/good/info.manifest-20.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.manifest-21.json b/test_ioccc/test_JSON/general.json/good/info.manifest-21.json index a30f1a6ba..ddb9bf90e 100644 --- a/test_ioccc/test_JSON/general.json/good/info.manifest-21.json +++ b/test_ioccc/test_JSON/general.json/good/info.manifest-21.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.manifest-22.json b/test_ioccc/test_JSON/general.json/good/info.manifest-22.json index 170596da1..a434c61e2 100644 --- a/test_ioccc/test_JSON/general.json/good/info.manifest-22.json +++ b/test_ioccc/test_JSON/general.json/good/info.manifest-22.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.manifest-23.json b/test_ioccc/test_JSON/general.json/good/info.manifest-23.json index f23833f1b..31cab1772 100644 --- a/test_ioccc/test_JSON/general.json/good/info.manifest-23.json +++ b/test_ioccc/test_JSON/general.json/good/info.manifest-23.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.manifest-27.json b/test_ioccc/test_JSON/general.json/good/info.manifest-27.json index 0a9bce170..4b0d5048c 100644 --- a/test_ioccc/test_JSON/general.json/good/info.manifest-27.json +++ b/test_ioccc/test_JSON/general.json/good/info.manifest-27.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.manifest-28.json b/test_ioccc/test_JSON/general.json/good/info.manifest-28.json index ebb8797a0..0c1810ffa 100644 --- a/test_ioccc/test_JSON/general.json/good/info.manifest-28.json +++ b/test_ioccc/test_JSON/general.json/good/info.manifest-28.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.manifest-29.json b/test_ioccc/test_JSON/general.json/good/info.manifest-29.json index 3e1b7f3a1..ad02fee46 100644 --- a/test_ioccc/test_JSON/general.json/good/info.manifest-29.json +++ b/test_ioccc/test_JSON/general.json/good/info.manifest-29.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.manifest-3.json b/test_ioccc/test_JSON/general.json/good/info.manifest-3.json index 4b6f1e8af..48a28641f 100644 --- a/test_ioccc/test_JSON/general.json/good/info.manifest-3.json +++ b/test_ioccc/test_JSON/general.json/good/info.manifest-3.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.manifest-30.json b/test_ioccc/test_JSON/general.json/good/info.manifest-30.json index 8e5ade481..5e303a609 100644 --- a/test_ioccc/test_JSON/general.json/good/info.manifest-30.json +++ b/test_ioccc/test_JSON/general.json/good/info.manifest-30.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.manifest-31.json b/test_ioccc/test_JSON/general.json/good/info.manifest-31.json index 52be99320..c942c5c83 100644 --- a/test_ioccc/test_JSON/general.json/good/info.manifest-31.json +++ b/test_ioccc/test_JSON/general.json/good/info.manifest-31.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.manifest-32.json b/test_ioccc/test_JSON/general.json/good/info.manifest-32.json index 794a7cac7..51c00bf65 100644 --- a/test_ioccc/test_JSON/general.json/good/info.manifest-32.json +++ b/test_ioccc/test_JSON/general.json/good/info.manifest-32.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.manifest-33.json b/test_ioccc/test_JSON/general.json/good/info.manifest-33.json index a0b54e29a..aea478ebf 100644 --- a/test_ioccc/test_JSON/general.json/good/info.manifest-33.json +++ b/test_ioccc/test_JSON/general.json/good/info.manifest-33.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.manifest-4.json b/test_ioccc/test_JSON/general.json/good/info.manifest-4.json index 3e06aa487..9e59e9e71 100644 --- a/test_ioccc/test_JSON/general.json/good/info.manifest-4.json +++ b/test_ioccc/test_JSON/general.json/good/info.manifest-4.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.manifest-5.json b/test_ioccc/test_JSON/general.json/good/info.manifest-5.json index 1ecf6c7a3..8cc6d757a 100644 --- a/test_ioccc/test_JSON/general.json/good/info.manifest-5.json +++ b/test_ioccc/test_JSON/general.json/good/info.manifest-5.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.manifest-6.json b/test_ioccc/test_JSON/general.json/good/info.manifest-6.json index 7ec438c36..e399c36eb 100644 --- a/test_ioccc/test_JSON/general.json/good/info.manifest-6.json +++ b/test_ioccc/test_JSON/general.json/good/info.manifest-6.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.manifest-9.json b/test_ioccc/test_JSON/general.json/good/info.manifest-9.json index cf7561dc3..5e4a75dee 100644 --- a/test_ioccc/test_JSON/general.json/good/info.manifest-9.json +++ b/test_ioccc/test_JSON/general.json/good/info.manifest-9.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.10.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.10.json index 60b8c595c..3381a1b76 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.10.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.10.json @@ -6,7 +6,7 @@ "mkiocccentry_version" : "1.0.2 2023-11-06", "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.12.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.12.json index de29c54fa..941ed2860 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.12.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.12.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "entry_num" : 2, "title" : "title-for-entry0", "abstract" : "abstract for entry #0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.13.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.13.json index 8270b6326..ec5c10d86 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.13.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.13.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "title" : "title-for-entry0", "abstract" : "abstract for entry #0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.14.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.14.json index f86b83f92..0dad5b9b7 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.14.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.14.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "abstract" : "abstract for entry #0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.15.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.15.json index f4afe4807..ecd8323d3 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.15.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.15.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.16.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.16.json index 0c72db317..b29f7831a 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.16.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.16.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.17.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.17.json index 2493b1316..9f9b2b00f 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.17.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.17.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.18.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.18.json index b2a2eec35..36adbfece 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.18.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.18.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.19.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.19.json index 69a67faa5..c9c3ae92e 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.19.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.19.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.2.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.2.json index 1f7851dd7..d9e4741f2 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.2.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.2.json @@ -6,7 +6,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.20.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.20.json index e6281859e..8fadb74ee 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.20.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.20.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.21.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.21.json index a7725a8de..6b69ef00e 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.21.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.21.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.22.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.22.json index d39253d53..ac1ceeb44 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.22.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.22.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.23.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.23.json index 868bf6467..3414c1cea 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.23.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.23.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.24.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.24.json index 647f5149f..9e3064ea6 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.24.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.24.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.25.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.25.json index 9ad53a7be..aaaae0258 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.25.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.25.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.26.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.26.json index 7171c428f..48e7c81b0 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.26.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.26.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.27.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.27.json index ae84c0c80..6f0b28a52 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.27.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.27.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.28.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.28.json index 02ba408c3..60dc42ea8 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.28.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.28.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.29.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.29.json index 7817c494c..4c7e9879a 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.29.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.29.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.3.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.3.json index 97174fe88..e4e6cf6a4 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.3.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.3.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.30.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.30.json index 2739d2d05..b757a5d64 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.30.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.30.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.31.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.31.json index 032d85d78..720a7880d 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.31.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.31.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.32.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.32.json index fb09de6ae..9b51d8145 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.32.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.32.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.33.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.33.json index fc5a48df4..b55451de9 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.33.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.33.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.34.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.34.json index 3d1d0a83e..f5f45f2e9 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.34.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.34.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.36.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.36.json index a41010ffd..9b13b5188 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.36.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.36.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.37.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.37.json index 437149756..3a0580024 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.37.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.37.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.38.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.38.json index f71344620..2ea3c516e 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.38.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.38.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.39.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.39.json index 98095f4e8..3e0ef0705 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.39.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.39.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.4.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.4.json index bf65879ec..760293d28 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.4.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.4.json @@ -6,7 +6,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.40.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.40.json index 3ca6ef093..4f8a1e6e8 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.40.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.40.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.41.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.41.json index d07ef372a..3e8f6742a 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.41.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.41.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.42.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.42.json index 2c101c695..daef27c2f 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.42.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.42.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.43.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.43.json index c877fdc80..03cd7c9a6 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.43.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.43.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.46.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.46.json index 28883ce19..52ab46b4f 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.46.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.46.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.47.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.47.json index c169f39c8..c066cbe5b 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.47.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.47.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.48.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.48.json index 17b480b23..78745851a 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.48.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.48.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.49.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.49.json index 48ae81801..5ebcc3beb 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.49.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.49.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.5.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.5.json index bf141089d..2b98869fe 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.5.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.5.json @@ -6,7 +6,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.6.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.6.json index de75a0e9d..66ba1cc3a 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.6.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.6.json @@ -6,7 +6,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.7.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.7.json index 9bbf0edd9..3f2b98c9a 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.7.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.7.json @@ -6,7 +6,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.8.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.8.json index 06675081c..5caace158 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.8.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.8.json @@ -6,7 +6,7 @@ "mkiocccentry_version" : "1.0.2 2023-11-06", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.missing-line.9.json b/test_ioccc/test_JSON/general.json/good/info.missing-line.9.json index 8ad8d1c3a..a2c3e69d9 100644 --- a/test_ioccc/test_JSON/general.json/good/info.missing-line.9.json +++ b/test_ioccc/test_JSON/general.json/good/info.missing-line.9.json @@ -6,7 +6,7 @@ "mkiocccentry_version" : "1.0.2 2023-11-06", "iocccsize_version" : "28.13 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.null.json b/test_ioccc/test_JSON/general.json/good/info.null.json index 102ec492c..d212fd7f1 100644 --- a/test_ioccc/test_JSON/general.json/good/info.null.json +++ b/test_ioccc/test_JSON/general.json/good/info.null.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.simple-0.json b/test_ioccc/test_JSON/general.json/good/info.simple-0.json index 2cecda693..2858b92e1 100644 --- a/test_ioccc/test_JSON/general.json/good/info.simple-0.json +++ b/test_ioccc/test_JSON/general.json/good/info.simple-0.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "test", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.tarball-0.json b/test_ioccc/test_JSON/general.json/good/info.tarball-0.json index bac2791e7..0608e82ab 100644 --- a/test_ioccc/test_JSON/general.json/good/info.tarball-0.json +++ b/test_ioccc/test_JSON/general.json/good/info.tarball-0.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.tarball-1.json b/test_ioccc/test_JSON/general.json/good/info.tarball-1.json index 6120652c2..fe99d05ad 100644 --- a/test_ioccc/test_JSON/general.json/good/info.tarball-1.json +++ b/test_ioccc/test_JSON/general.json/good/info.tarball-1.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.tarball-10.json b/test_ioccc/test_JSON/general.json/good/info.tarball-10.json index 6bd8b100a..265ff2b64 100644 --- a/test_ioccc/test_JSON/general.json/good/info.tarball-10.json +++ b/test_ioccc/test_JSON/general.json/good/info.tarball-10.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.tarball-2.json b/test_ioccc/test_JSON/general.json/good/info.tarball-2.json index 4d3559388..8b3aae760 100644 --- a/test_ioccc/test_JSON/general.json/good/info.tarball-2.json +++ b/test_ioccc/test_JSON/general.json/good/info.tarball-2.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.tarball-3.json b/test_ioccc/test_JSON/general.json/good/info.tarball-3.json index f7fc43c2f..a403bad54 100644 --- a/test_ioccc/test_JSON/general.json/good/info.tarball-3.json +++ b/test_ioccc/test_JSON/general.json/good/info.tarball-3.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.tarball-4.json b/test_ioccc/test_JSON/general.json/good/info.tarball-4.json index ead13a84f..56fc5c0e6 100644 --- a/test_ioccc/test_JSON/general.json/good/info.tarball-4.json +++ b/test_ioccc/test_JSON/general.json/good/info.tarball-4.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.tarball-5.json b/test_ioccc/test_JSON/general.json/good/info.tarball-5.json index 8212e3c97..c7156f71f 100644 --- a/test_ioccc/test_JSON/general.json/good/info.tarball-5.json +++ b/test_ioccc/test_JSON/general.json/good/info.tarball-5.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.tarball-6.json b/test_ioccc/test_JSON/general.json/good/info.tarball-6.json index 4a1993216..1c55d6d3c 100644 --- a/test_ioccc/test_JSON/general.json/good/info.tarball-6.json +++ b/test_ioccc/test_JSON/general.json/good/info.tarball-6.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.tarball-7.json b/test_ioccc/test_JSON/general.json/good/info.tarball-7.json index 120c926d5..79028d1d2 100644 --- a/test_ioccc/test_JSON/general.json/good/info.tarball-7.json +++ b/test_ioccc/test_JSON/general.json/good/info.tarball-7.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.tarball-8.json b/test_ioccc/test_JSON/general.json/good/info.tarball-8.json index 16ca5d808..9a1aeacdb 100644 --- a/test_ioccc/test_JSON/general.json/good/info.tarball-8.json +++ b/test_ioccc/test_JSON/general.json/good/info.tarball-8.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.tarball-9.json b/test_ioccc/test_JSON/general.json/good/info.tarball-9.json index 4b62bd866..de7bcf9b2 100644 --- a/test_ioccc/test_JSON/general.json/good/info.tarball-9.json +++ b/test_ioccc/test_JSON/general.json/good/info.tarball-9.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.test_mode.0.json b/test_ioccc/test_JSON/general.json/good/info.test_mode.0.json index 7d255329d..912b43171 100644 --- a/test_ioccc/test_JSON/general.json/good/info.test_mode.0.json +++ b/test_ioccc/test_JSON/general.json/good/info.test_mode.0.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.test_mode.1.json b/test_ioccc/test_JSON/general.json/good/info.test_mode.1.json index c4aded752..d8668b2a8 100644 --- a/test_ioccc/test_JSON/general.json/good/info.test_mode.1.json +++ b/test_ioccc/test_JSON/general.json/good/info.test_mode.1.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "test", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.timestamp-0.json b/test_ioccc/test_JSON/general.json/good/info.timestamp-0.json index 480a3bf24..703b65684 100644 --- a/test_ioccc/test_JSON/general.json/good/info.timestamp-0.json +++ b/test_ioccc/test_JSON/general.json/good/info.timestamp-0.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.timestamp-1.json b/test_ioccc/test_JSON/general.json/good/info.timestamp-1.json index 9d61597f0..eb344617e 100644 --- a/test_ioccc/test_JSON/general.json/good/info.timestamp-1.json +++ b/test_ioccc/test_JSON/general.json/good/info.timestamp-1.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.timestamp-2.json b/test_ioccc/test_JSON/general.json/good/info.timestamp-2.json index 5bae84481..fbaf325ac 100644 --- a/test_ioccc/test_JSON/general.json/good/info.timestamp-2.json +++ b/test_ioccc/test_JSON/general.json/good/info.timestamp-2.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.title-0.json b/test_ioccc/test_JSON/general.json/good/info.title-0.json index 33f22aed2..df97cbeaa 100644 --- a/test_ioccc/test_JSON/general.json/good/info.title-0.json +++ b/test_ioccc/test_JSON/general.json/good/info.title-0.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "Title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.title-1.json b/test_ioccc/test_JSON/general.json/good/info.title-1.json index fc11e58ae..8e0614352 100644 --- a/test_ioccc/test_JSON/general.json/good/info.title-1.json +++ b/test_ioccc/test_JSON/general.json/good/info.title-1.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : ".title-for-entry0", diff --git a/test_ioccc/test_JSON/general.json/good/info.title-2.json b/test_ioccc/test_JSON/general.json/good/info.title-2.json index 36545d4b7..64826d2ce 100644 --- a/test_ioccc/test_JSON/general.json/good/info.title-2.json +++ b/test_ioccc/test_JSON/general.json/good/info.title-2.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry%", diff --git a/test_ioccc/test_JSON/general.json/good/info.title-3.json b/test_ioccc/test_JSON/general.json/good/info.title-3.json index c8d7e63ba..c2f219d92 100644 --- a/test_ioccc/test_JSON/general.json/good/info.title-3.json +++ b/test_ioccc/test_JSON/general.json/good/info.title-3.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "TITLE-FOR-ENTRY0", diff --git a/test_ioccc/test_JSON/general.json/good/info.true.json b/test_ioccc/test_JSON/general.json/good/info.true.json index 17df0ded1..771f86172 100644 --- a/test_ioccc/test_JSON/general.json/good/info.true.json +++ b/test_ioccc/test_JSON/general.json/good/info.true.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.IOCCC_contest.bad_value.json b/test_ioccc/test_JSON/info.json/bad/info.IOCCC_contest.bad_value.json index 4f26fa66b..67e3640cd 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.IOCCC_contest.bad_value.json +++ b/test_ioccc/test_JSON/info.json/bad/info.IOCCC_contest.bad_value.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.IOCCC_contest.wrong_type.json b/test_ioccc/test_JSON/info.json/bad/info.IOCCC_contest.wrong_type.json index 6333ca641..1f7659ada 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.IOCCC_contest.wrong_type.json +++ b/test_ioccc/test_JSON/info.json/bad/info.IOCCC_contest.wrong_type.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.IOCCC_contest_id.bad_value.json b/test_ioccc/test_JSON/info.json/bad/info.IOCCC_contest_id.bad_value.json index fbfe4669c..d9b97d7c9 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.IOCCC_contest_id.bad_value.json +++ b/test_ioccc/test_JSON/info.json/bad/info.IOCCC_contest_id.bad_value.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-xxxx-xxxx-abcd-xxxx567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.IOCCC_contest_id.wrong_type.json b/test_ioccc/test_JSON/info.json/bad/info.IOCCC_contest_id.wrong_type.json index 7b5a0971d..4820ba61c 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.IOCCC_contest_id.wrong_type.json +++ b/test_ioccc/test_JSON/info.json/bad/info.IOCCC_contest_id.wrong_type.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : 12345, "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.IOCCC_info_version.bad_value.json b/test_ioccc/test_JSON/info.json/bad/info.IOCCC_info_version.bad_value.json index 35c822982..159f3435d 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.IOCCC_info_version.bad_value.json +++ b/test_ioccc/test_JSON/info.json/bad/info.IOCCC_info_version.bad_value.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.IOCCC_info_version.wrong_type.json b/test_ioccc/test_JSON/info.json/bad/info.IOCCC_info_version.wrong_type.json index 55dceff7f..5df74b9ec 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.IOCCC_info_version.wrong_type.json +++ b/test_ioccc/test_JSON/info.json/bad/info.IOCCC_info_version.wrong_type.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.IOCCC_year.bad_value.json b/test_ioccc/test_JSON/info.json/bad/info.IOCCC_year.bad_value.json index bc2d4f09c..7fa32216b 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.IOCCC_year.bad_value.json +++ b/test_ioccc/test_JSON/info.json/bad/info.IOCCC_year.bad_value.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.IOCCC_year.wrong_type.json b/test_ioccc/test_JSON/info.json/bad/info.IOCCC_year.wrong_type.json index 0b8f8f204..5341622ad 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.IOCCC_year.wrong_type.json +++ b/test_ioccc/test_JSON/info.json/bad/info.IOCCC_year.wrong_type.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.Makefile.bad_value.json b/test_ioccc/test_JSON/info.json/bad/info.Makefile.bad_value.json index b43dd30d4..157673e5f 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.Makefile.bad_value.json +++ b/test_ioccc/test_JSON/info.json/bad/info.Makefile.bad_value.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.Makefile.wrong_type.json b/test_ioccc/test_JSON/info.json/bad/info.Makefile.wrong_type.json index e88df5130..fbdee717d 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.Makefile.wrong_type.json +++ b/test_ioccc/test_JSON/info.json/bad/info.Makefile.wrong_type.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.Makefile_override.wrong_type.json b/test_ioccc/test_JSON/info.json/bad/info.Makefile_override.wrong_type.json index 982cf0631..3b84482e8 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.Makefile_override.wrong_type.json +++ b/test_ioccc/test_JSON/info.json/bad/info.Makefile_override.wrong_type.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.abstract.bad_value.json b/test_ioccc/test_JSON/info.json/bad/info.abstract.bad_value.json index 8296d6287..6d192bfb0 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.abstract.bad_value.json +++ b/test_ioccc/test_JSON/info.json/bad/info.abstract.bad_value.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.abstract.wrong_type.json b/test_ioccc/test_JSON/info.json/bad/info.abstract.wrong_type.json index d126d3ffd..5b1a4bc60 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.abstract.wrong_type.json +++ b/test_ioccc/test_JSON/info.json/bad/info.abstract.wrong_type.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.auth_JSON.bad_value.json b/test_ioccc/test_JSON/info.json/bad/info.auth_JSON.bad_value.json index d81af9178..197cc3265 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.auth_JSON.bad_value.json +++ b/test_ioccc/test_JSON/info.json/bad/info.auth_JSON.bad_value.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.auth_JSON.wrong_type.json b/test_ioccc/test_JSON/info.json/bad/info.auth_JSON.wrong_type.json index fd3c29a2c..e092912cc 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.auth_JSON.wrong_type.json +++ b/test_ioccc/test_JSON/info.json/bad/info.auth_JSON.wrong_type.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.author_count.json b/test_ioccc/test_JSON/info.json/bad/info.author_count.json index 6ade4b992..9027c3587 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.author_count.json +++ b/test_ioccc/test_JSON/info.json/bad/info.author_count.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "author_count" : 1, diff --git a/test_ioccc/test_JSON/info.json/bad/info.bad-comment-0.json b/test_ioccc/test_JSON/info.json/bad/info.bad-comment-0.json index 8fe5fcf15..554502886 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.bad-comment-0.json +++ b/test_ioccc/test_JSON/info.json/bad/info.bad-comment-0.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.bad-comment-1.json b/test_ioccc/test_JSON/info.json/bad/info.bad-comment-1.json index d4d12e923..ac0d3f0dc 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.bad-comment-1.json +++ b/test_ioccc/test_JSON/info.json/bad/info.bad-comment-1.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.bad-comment-2.json b/test_ioccc/test_JSON/info.json/bad/info.bad-comment-2.json index 4820d5fa9..83dc4e3fa 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.bad-comment-2.json +++ b/test_ioccc/test_JSON/info.json/bad/info.bad-comment-2.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.c_src.bad_value.json b/test_ioccc/test_JSON/info.json/bad/info.c_src.bad_value.json index 62b234c3d..9a00864c6 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.c_src.bad_value.json +++ b/test_ioccc/test_JSON/info.json/bad/info.c_src.bad_value.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.c_src.wrong_type.json b/test_ioccc/test_JSON/info.json/bad/info.c_src.wrong_type.json index 26800c93b..1960c6348 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.c_src.wrong_type.json +++ b/test_ioccc/test_JSON/info.json/bad/info.c_src.wrong_type.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.chkentry_version.bad_value.json b/test_ioccc/test_JSON/info.json/bad/info.chkentry_version.bad_value.json index 6b03899c0..464d9173a 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.chkentry_version.bad_value.json +++ b/test_ioccc/test_JSON/info.json/bad/info.chkentry_version.bad_value.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "x.yy yyyy-mm-dd", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.chkentry_version.wrong_type.json b/test_ioccc/test_JSON/info.json/bad/info.chkentry_version.wrong_type.json index ef2ee2ec8..adc5955dd 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.chkentry_version.wrong_type.json +++ b/test_ioccc/test_JSON/info.json/bad/info.chkentry_version.wrong_type.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : 12345, "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.contest_id-0.json b/test_ioccc/test_JSON/info.json/bad/info.contest_id-0.json index b12edc847..35954b230 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.contest_id-0.json +++ b/test_ioccc/test_JSON/info.json/bad/info.contest_id-0.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-0234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.contest_id-1.json b/test_ioccc/test_JSON/info.json/bad/info.contest_id-1.json index a712727b7..a04be58cd 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.contest_id-1.json +++ b/test_ioccc/test_JSON/info.json/bad/info.contest_id-1.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-bbcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.contest_id-2.json b/test_ioccc/test_JSON/info.json/bad/info.contest_id-2.json index be19e20c2..65e07f333 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.contest_id-2.json +++ b/test_ioccc/test_JSON/info.json/bad/info.contest_id-2.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-5321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.contest_id-3.json b/test_ioccc/test_JSON/info.json/bad/info.contest_id-3.json index eb1e62df3..06316a8cd 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.contest_id-3.json +++ b/test_ioccc/test_JSON/info.json/bad/info.contest_id-3.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890a", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.contest_id-4.json b/test_ioccc/test_JSON/info.json/bad/info.contest_id-4.json index d038d2125..d84aa685a 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.contest_id-4.json +++ b/test_ioccc/test_JSON/info.json/bad/info.contest_id-4.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890abc", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.contest_id-5.json b/test_ioccc/test_JSON/info.json/bad/info.contest_id-5.json index 86a8ca4ff..1d96f990e 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.contest_id-5.json +++ b/test_ioccc/test_JSON/info.json/bad/info.contest_id-5.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890abx", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.empty_override.wrong_type.json b/test_ioccc/test_JSON/info.json/bad/info.empty_override.wrong_type.json index cb7c6421e..752a3c214 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.empty_override.wrong_type.json +++ b/test_ioccc/test_JSON/info.json/bad/info.empty_override.wrong_type.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.entry_num.bad_value.json b/test_ioccc/test_JSON/info.json/bad/info.entry_num.bad_value.json index a912fffac..1589a39a2 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.entry_num.bad_value.json +++ b/test_ioccc/test_JSON/info.json/bad/info.entry_num.bad_value.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 127, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.entry_num.wrong_type.json b/test_ioccc/test_JSON/info.json/bad/info.entry_num.wrong_type.json index ab7909c1b..1b3290566 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.entry_num.wrong_type.json +++ b/test_ioccc/test_JSON/info.json/bad/info.entry_num.wrong_type.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : "0", "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.extra-line.0.json b/test_ioccc/test_JSON/info.json/bad/info.extra-line.0.json index 6d4ad5953..1362c8240 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.extra-line.0.json +++ b/test_ioccc/test_JSON/info.json/bad/info.extra-line.0.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.extra-line.1.json b/test_ioccc/test_JSON/info.json/bad/info.extra-line.1.json index e4881eec9..f65aba7e5 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.extra-line.1.json +++ b/test_ioccc/test_JSON/info.json/bad/info.extra-line.1.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.extra-line.2.json b/test_ioccc/test_JSON/info.json/bad/info.extra-line.2.json index d4c183514..ceb0b0ec7 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.extra-line.2.json +++ b/test_ioccc/test_JSON/info.json/bad/info.extra-line.2.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.false.json b/test_ioccc/test_JSON/info.json/bad/info.false.json index 58993ba68..fa94e8ba5 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.false.json +++ b/test_ioccc/test_JSON/info.json/bad/info.false.json @@ -6,7 +6,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.first_rule_is_all.wrong_type.json b/test_ioccc/test_JSON/info.json/bad/info.first_rule_is_all.wrong_type.json index 7098c81e2..1ad7d8193 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.first_rule_is_all.wrong_type.json +++ b/test_ioccc/test_JSON/info.json/bad/info.first_rule_is_all.wrong_type.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.fnamchk_version.bad_value.json b/test_ioccc/test_JSON/info.json/bad/info.fnamchk_version.bad_value.json index 22663e03a..2b6714e78 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.fnamchk_version.bad_value.json +++ b/test_ioccc/test_JSON/info.json/bad/info.fnamchk_version.bad_value.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "x.y yyyy-mm-dd", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.fnamchk_version.wrong_type.json b/test_ioccc/test_JSON/info.json/bad/info.fnamchk_version.wrong_type.json index d6fecd03e..d2b8c3f0a 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.fnamchk_version.wrong_type.json +++ b/test_ioccc/test_JSON/info.json/bad/info.fnamchk_version.wrong_type.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : 12345, - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.foo.json b/test_ioccc/test_JSON/info.json/bad/info.foo.json index fac01bc60..7e2519711 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.foo.json +++ b/test_ioccc/test_JSON/info.json/bad/info.foo.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.formed_UTC.bad_value.json b/test_ioccc/test_JSON/info.json/bad/info.formed_UTC.bad_value.json index ad51bc2ea..80d8bc7e5 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.formed_UTC.bad_value.json +++ b/test_ioccc/test_JSON/info.json/bad/info.formed_UTC.bad_value.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.formed_UTC.json b/test_ioccc/test_JSON/info.json/bad/info.formed_UTC.json index fded8d4bc..fb98ee28d 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.formed_UTC.json +++ b/test_ioccc/test_JSON/info.json/bad/info.formed_UTC.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "test", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.formed_UTC.wrong_type.json b/test_ioccc/test_JSON/info.json/bad/info.formed_UTC.wrong_type.json index 357babce0..bc0faa031 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.formed_UTC.wrong_type.json +++ b/test_ioccc/test_JSON/info.json/bad/info.formed_UTC.wrong_type.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.formed_timestamp.bad_value.json b/test_ioccc/test_JSON/info.json/bad/info.formed_timestamp.bad_value.json index 54eceb7b9..92672f5bd 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.formed_timestamp.bad_value.json +++ b/test_ioccc/test_JSON/info.json/bad/info.formed_timestamp.bad_value.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.formed_timestamp.wrong_type.json b/test_ioccc/test_JSON/info.json/bad/info.formed_timestamp.wrong_type.json index 8ee1db4b6..f22b62f07 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.formed_timestamp.wrong_type.json +++ b/test_ioccc/test_JSON/info.json/bad/info.formed_timestamp.wrong_type.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.formed_timestamp_usec.bad_value.json b/test_ioccc/test_JSON/info.json/bad/info.formed_timestamp_usec.bad_value.json index a812d3605..f9e815ec0 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.formed_timestamp_usec.bad_value.json +++ b/test_ioccc/test_JSON/info.json/bad/info.formed_timestamp_usec.bad_value.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.formed_timestamp_usec.wrong_type.json b/test_ioccc/test_JSON/info.json/bad/info.formed_timestamp_usec.wrong_type.json index bd3f97abc..b2d968e42 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.formed_timestamp_usec.wrong_type.json +++ b/test_ioccc/test_JSON/info.json/bad/info.formed_timestamp_usec.wrong_type.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.found_all_rule.wrong_type.json b/test_ioccc/test_JSON/info.json/bad/info.found_all_rule.wrong_type.json index 55bc3392f..0c136eb9e 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.found_all_rule.wrong_type.json +++ b/test_ioccc/test_JSON/info.json/bad/info.found_all_rule.wrong_type.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.found_clean_rule.wrong_type.json b/test_ioccc/test_JSON/info.json/bad/info.found_clean_rule.wrong_type.json index 48ee944c5..0306da2e4 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.found_clean_rule.wrong_type.json +++ b/test_ioccc/test_JSON/info.json/bad/info.found_clean_rule.wrong_type.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.found_clobber_rule.wrong_type.json b/test_ioccc/test_JSON/info.json/bad/info.found_clobber_rule.wrong_type.json index 3b3fb0b3b..03949a1ff 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.found_clobber_rule.wrong_type.json +++ b/test_ioccc/test_JSON/info.json/bad/info.found_clobber_rule.wrong_type.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.found_try_rule.wrong_type.json b/test_ioccc/test_JSON/info.json/bad/info.found_try_rule.wrong_type.json index f236865c4..f222fd770 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.found_try_rule.wrong_type.json +++ b/test_ioccc/test_JSON/info.json/bad/info.found_try_rule.wrong_type.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.highbit_warning.wrong_type.json b/test_ioccc/test_JSON/info.json/bad/info.highbit_warning.wrong_type.json index d046340c9..de686e9cd 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.highbit_warning.wrong_type.json +++ b/test_ioccc/test_JSON/info.json/bad/info.highbit_warning.wrong_type.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.info_JSON.bad_value.json b/test_ioccc/test_JSON/info.json/bad/info.info_JSON.bad_value.json index 938d0acc9..24414a047 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.info_JSON.bad_value.json +++ b/test_ioccc/test_JSON/info.json/bad/info.info_JSON.bad_value.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.info_JSON.wrong_type.json b/test_ioccc/test_JSON/info.json/bad/info.info_JSON.wrong_type.json index 3dd2a34e6..d6bc6de61 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.info_JSON.wrong_type.json +++ b/test_ioccc/test_JSON/info.json/bad/info.info_JSON.wrong_type.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.iocccsize_version.bad_value.json b/test_ioccc/test_JSON/info.json/bad/info.iocccsize_version.bad_value.json index e486153a2..62f59428f 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.iocccsize_version.bad_value.json +++ b/test_ioccc/test_JSON/info.json/bad/info.iocccsize_version.bad_value.json @@ -7,7 +7,7 @@ "iocccsize_version" : "2x.yy yyyy-mm-dd", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.iocccsize_version.wrong_type.json b/test_ioccc/test_JSON/info.json/bad/info.iocccsize_version.wrong_type.json index 14ef0b8e3..96e2b629a 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.iocccsize_version.wrong_type.json +++ b/test_ioccc/test_JSON/info.json/bad/info.iocccsize_version.wrong_type.json @@ -7,7 +7,7 @@ "iocccsize_version" : 12345, "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.manifest-0.json b/test_ioccc/test_JSON/info.json/bad/info.manifest-0.json index 3d85f2b74..b3d835d11 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.manifest-0.json +++ b/test_ioccc/test_JSON/info.json/bad/info.manifest-0.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.manifest-10.json b/test_ioccc/test_JSON/info.json/bad/info.manifest-10.json index ad8873ff6..0bca68489 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.manifest-10.json +++ b/test_ioccc/test_JSON/info.json/bad/info.manifest-10.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.manifest-11.json b/test_ioccc/test_JSON/info.json/bad/info.manifest-11.json index c7940d163..bca1b1d04 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.manifest-11.json +++ b/test_ioccc/test_JSON/info.json/bad/info.manifest-11.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.manifest-12.json b/test_ioccc/test_JSON/info.json/bad/info.manifest-12.json index 6d4ad5953..1362c8240 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.manifest-12.json +++ b/test_ioccc/test_JSON/info.json/bad/info.manifest-12.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.manifest-14.json b/test_ioccc/test_JSON/info.json/bad/info.manifest-14.json index 37f29aeb2..5f849fb9a 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.manifest-14.json +++ b/test_ioccc/test_JSON/info.json/bad/info.manifest-14.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.manifest-15.json b/test_ioccc/test_JSON/info.json/bad/info.manifest-15.json index f089ab1aa..8a3e79ec2 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.manifest-15.json +++ b/test_ioccc/test_JSON/info.json/bad/info.manifest-15.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.manifest-16.json b/test_ioccc/test_JSON/info.json/bad/info.manifest-16.json index d48cf8c53..f69be1d76 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.manifest-16.json +++ b/test_ioccc/test_JSON/info.json/bad/info.manifest-16.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.manifest-17.json b/test_ioccc/test_JSON/info.json/bad/info.manifest-17.json index e0389f9af..fd720aa0e 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.manifest-17.json +++ b/test_ioccc/test_JSON/info.json/bad/info.manifest-17.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.manifest-18.json b/test_ioccc/test_JSON/info.json/bad/info.manifest-18.json index 18b5eccbf..78cbe02ef 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.manifest-18.json +++ b/test_ioccc/test_JSON/info.json/bad/info.manifest-18.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.manifest-19.json b/test_ioccc/test_JSON/info.json/bad/info.manifest-19.json index 50da420c9..4f2293b3b 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.manifest-19.json +++ b/test_ioccc/test_JSON/info.json/bad/info.manifest-19.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.manifest-2.json b/test_ioccc/test_JSON/info.json/bad/info.manifest-2.json index 8cd98083b..25b1fc625 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.manifest-2.json +++ b/test_ioccc/test_JSON/info.json/bad/info.manifest-2.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.manifest-20.json b/test_ioccc/test_JSON/info.json/bad/info.manifest-20.json index 8e5ade481..5e303a609 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.manifest-20.json +++ b/test_ioccc/test_JSON/info.json/bad/info.manifest-20.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.manifest-21.json b/test_ioccc/test_JSON/info.json/bad/info.manifest-21.json index a30f1a6ba..ddb9bf90e 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.manifest-21.json +++ b/test_ioccc/test_JSON/info.json/bad/info.manifest-21.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.manifest-22.json b/test_ioccc/test_JSON/info.json/bad/info.manifest-22.json index 170596da1..a434c61e2 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.manifest-22.json +++ b/test_ioccc/test_JSON/info.json/bad/info.manifest-22.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.manifest-23.json b/test_ioccc/test_JSON/info.json/bad/info.manifest-23.json index f23833f1b..31cab1772 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.manifest-23.json +++ b/test_ioccc/test_JSON/info.json/bad/info.manifest-23.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.manifest-27.json b/test_ioccc/test_JSON/info.json/bad/info.manifest-27.json index 0a9bce170..4b0d5048c 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.manifest-27.json +++ b/test_ioccc/test_JSON/info.json/bad/info.manifest-27.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.manifest-28.json b/test_ioccc/test_JSON/info.json/bad/info.manifest-28.json index ebb8797a0..0c1810ffa 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.manifest-28.json +++ b/test_ioccc/test_JSON/info.json/bad/info.manifest-28.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.manifest-29.json b/test_ioccc/test_JSON/info.json/bad/info.manifest-29.json index 3e1b7f3a1..ad02fee46 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.manifest-29.json +++ b/test_ioccc/test_JSON/info.json/bad/info.manifest-29.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.manifest-3.json b/test_ioccc/test_JSON/info.json/bad/info.manifest-3.json index 4b6f1e8af..48a28641f 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.manifest-3.json +++ b/test_ioccc/test_JSON/info.json/bad/info.manifest-3.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.manifest-30.json b/test_ioccc/test_JSON/info.json/bad/info.manifest-30.json index 8e5ade481..5e303a609 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.manifest-30.json +++ b/test_ioccc/test_JSON/info.json/bad/info.manifest-30.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.manifest-31.json b/test_ioccc/test_JSON/info.json/bad/info.manifest-31.json index 52be99320..c942c5c83 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.manifest-31.json +++ b/test_ioccc/test_JSON/info.json/bad/info.manifest-31.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.manifest-32.json b/test_ioccc/test_JSON/info.json/bad/info.manifest-32.json index 794a7cac7..51c00bf65 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.manifest-32.json +++ b/test_ioccc/test_JSON/info.json/bad/info.manifest-32.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.manifest-33.json b/test_ioccc/test_JSON/info.json/bad/info.manifest-33.json index a0b54e29a..aea478ebf 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.manifest-33.json +++ b/test_ioccc/test_JSON/info.json/bad/info.manifest-33.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.manifest-6.json b/test_ioccc/test_JSON/info.json/bad/info.manifest-6.json index 7ec438c36..e399c36eb 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.manifest-6.json +++ b/test_ioccc/test_JSON/info.json/bad/info.manifest-6.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.manifest-9.json b/test_ioccc/test_JSON/info.json/bad/info.manifest-9.json index cf7561dc3..5e4a75dee 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.manifest-9.json +++ b/test_ioccc/test_JSON/info.json/bad/info.manifest-9.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.02.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.02.json index b3151938b..ba141108e 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.02.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.02.json @@ -8,7 +8,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.03.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.03.json index 37dc98538..26895bd4f 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.03.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.03.json @@ -8,7 +8,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.04.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.04.json index 70da2f224..927c8498b 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.04.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.04.json @@ -8,7 +8,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.05.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.05.json index 0675b1d48..ed457688c 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.05.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.05.json @@ -8,7 +8,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.06.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.06.json index 478defb0e..9605aff5a 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.06.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.06.json @@ -8,7 +8,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.07.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.07.json index ed41c49da..b721d6940 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.07.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.07.json @@ -8,7 +8,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.08.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.08.json index 7fe359b79..9437dc1a4 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.08.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.08.json @@ -8,7 +8,7 @@ "chkentry_version" : "1.0 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.09.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.09.json index 9ce4d8ece..917628a66 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.09.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.09.json @@ -8,7 +8,7 @@ "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.10.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.10.json index 1c069144a..f2a204da2 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.10.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.10.json @@ -7,8 +7,8 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.11.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.11.json index e722b9c70..2658551ff 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.11.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.11.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.12.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.12.json index 7ed4b0cc5..f01ad18cf 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.12.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.12.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "entry_num" : 0, diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.13.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.13.json index b12320103..9b374acc7 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.13.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.13.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.14.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.14.json index e66b8b3dd..7d206777f 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.14.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.14.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.15.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.15.json index e60a85773..973f0429e 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.15.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.15.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.16.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.16.json index 2afc80c3d..69166cc34 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.16.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.16.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.17.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.17.json index d44f7ef8c..d650dc32b 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.17.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.17.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.18.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.18.json index 233e0111c..18a73e91f 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.18.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.18.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.19.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.19.json index 0ec54146d..4ede18e8e 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.19.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.19.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.20.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.20.json index c7ece2832..785750179 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.20.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.20.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.21.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.21.json index 6fe04c4fc..849dc3609 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.21.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.21.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.22.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.22.json index 4db4a2701..dc38930b9 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.22.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.22.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.23.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.23.json index e1b7c74ab..1b32b3fb5 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.23.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.23.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.24.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.24.json index 10c3fbb3c..32674fd75 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.24.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.24.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.25.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.25.json index 825f62bcd..d1f5a9b82 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.25.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.25.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.26.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.26.json index a63451089..ef393edb4 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.26.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.26.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.27.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.27.json index 6c1094d55..54198c449 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.27.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.27.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.28.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.28.json index f416e12a6..4c959d46d 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.28.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.28.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.29.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.29.json index 3c9fd6129..019055631 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.29.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.29.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.30.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.30.json index f3b7022fc..01ae332f1 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.30.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.30.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.31.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.31.json index 7da9aa5fa..21647c562 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.31.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.31.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.32.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.32.json index b9ef0a061..0750ade38 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.32.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.32.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.33.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.33.json index 8c1ddb0d2..98f223dab 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.33.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.33.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.35.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.35.json index 1f23d8d25..c7d8396da 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.35.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.35.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.36.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.36.json index 59610ee7b..6e5318fa8 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.36.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.36.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.37.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.37.json index 12ef9778a..bde610f33 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.37.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.37.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.38.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.38.json index 59cb2bce3..83b148335 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.38.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.38.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.39fixed.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.39fixed.json index 4263f541f..8f9f71c7b 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.39fixed.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.39fixed.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.41.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.41.json index 749fedcc4..4f424415d 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.41.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.41.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.42.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.42.json index f9a7a68bd..a8f01ff51 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.42.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.42.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.43.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.43.json index 629da3f61..bc86604fc 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.43.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.43.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.44.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.44.json index e7c751154..c3589161a 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.44.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.44.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.45fixed.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.45fixed.json index 3f0ed2c4d..f90a6eab3 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.45fixed.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.duplicate-line.45fixed.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.02.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.02.json index 52d5f12eb..806e2d004 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.02.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.02.json @@ -6,7 +6,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.03.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.03.json index 08913a47c..400516216 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.03.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.03.json @@ -6,7 +6,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.04.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.04.json index e28cfbd1c..b603ab6bf 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.04.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.04.json @@ -6,7 +6,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.05.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.05.json index 75a1a6ef9..65bbc5759 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.05.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.05.json @@ -6,7 +6,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.06.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.06.json index a9a95e8e0..cac9b7047 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.06.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.06.json @@ -6,7 +6,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.07.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.07.json index 72390e490..716df5d7f 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.07.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.07.json @@ -6,7 +6,7 @@ "mkiocccentry_version" : "1.0.2 2023-11-06", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.08.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.08.json index 5b6d142a8..a7bbeea7a 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.08.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.08.json @@ -6,7 +6,7 @@ "mkiocccentry_version" : "1.0.2 2023-11-06", "iocccsize_version" : "28.13 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.09.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.09.json index 09753d51d..350f1abed 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.09.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.09.json @@ -6,7 +6,7 @@ "mkiocccentry_version" : "1.0.2 2023-11-06", "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.11.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.11.json index 0f3140c0d..e78abdb7e 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.11.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.11.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "entry_num" : 0, "title" : "title-for-entry0", "abstract" : "abstract for entry #0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.12.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.12.json index 77098c5a8..4bd02a00f 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.12.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.12.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "title" : "title-for-entry0", "abstract" : "abstract for entry #0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.13.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.13.json index 9272f38c5..4c2364442 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.13.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.13.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "abstract" : "abstract for entry #0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.14.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.14.json index 4edb46dc0..8bf6086f4 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.14.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.14.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.15.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.15.json index 9ed67ccb1..21b207e6d 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.15.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.15.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.16.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.16.json index 79bf6bfec..25aed19db 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.16.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.16.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.17.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.17.json index 8c900af76..68f3b7f16 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.17.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.17.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.18.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.18.json index 69634e95f..6eb7ffc27 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.18.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.18.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.19.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.19.json index 1e6308cf5..e7bbdc0fa 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.19.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.19.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.20.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.20.json index b8ee283d9..b3ac51c45 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.20.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.20.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.21.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.21.json index 46b348b42..521045ed2 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.21.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.21.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.22.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.22.json index 0739c7b7a..c21e14baa 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.22.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.22.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.23.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.23.json index 46ecdfcfd..d4d9eed24 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.23.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.23.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.24.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.24.json index 3fbbde2e4..1ef0e3075 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.24.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.24.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.25.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.25.json index 7c06a851c..830e238b8 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.25.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.25.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.26.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.26.json index aff31e825..afe4a7f42 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.26.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.26.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.27.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.27.json index 1a457dc62..c51b554e5 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.27.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.27.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.28.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.28.json index 2396ec56c..fff88b223 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.28.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.28.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.29.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.29.json index b0af32fcc..5787dba42 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.29.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.29.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.30.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.30.json index d35b8c0aa..8f6156aa5 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.30.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.30.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.31.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.31.json index 0a09625e9..eed1e9031 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.31.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.31.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.32.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.32.json index 19432d782..688b3591d 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.32.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.32.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.33.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.33.json index 7d9bccf69..8f4a9fdfa 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.33.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.33.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.35.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.35.json index e97eee4f1..213f1cb08 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.35.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.35.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.36.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.36.json index e4c021a70..a00fdb406 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.36.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.36.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.37.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.37.json index 8c73c50f9..3f6c3ca0b 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.37.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.37.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.38.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.38.json index 5a731ad1f..17454a981 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.38.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.38.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.39fixed.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.39fixed.json index debe7a2d8..d9fc29f5e 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.39fixed.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.39fixed.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.41.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.41.json index 650471c83..51e95030c 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.41.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.41.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.42.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.42.json index b11b48a62..2caf12fdd 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.42.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.42.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.43.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.43.json index cbed89164..087b95be7 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.43.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.43.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.44.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.44.json index 76ee7371e..54735f7a8 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.44.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.44.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.45fixed.json b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.45fixed.json index 00ec58b3d..c2c5d045b 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.45fixed.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min-manifest.missing-line.45fixed.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min_timestamp.bad_value.json b/test_ioccc/test_JSON/info.json/bad/info.min_timestamp.bad_value.json index a3e3146a6..5b98f8db4 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min_timestamp.bad_value.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min_timestamp.bad_value.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.min_timestamp.wrong_type.json b/test_ioccc/test_JSON/info.json/bad/info.min_timestamp.wrong_type.json index b112baa31..bcea3860a 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.min_timestamp.wrong_type.json +++ b/test_ioccc/test_JSON/info.json/bad/info.min_timestamp.wrong_type.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.mkiocccentry_version.bad_value.json b/test_ioccc/test_JSON/info.json/bad/info.mkiocccentry_version.bad_value.json index f8c4f6f66..88cc68b2d 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.mkiocccentry_version.bad_value.json +++ b/test_ioccc/test_JSON/info.json/bad/info.mkiocccentry_version.bad_value.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.mkiocccentry_version.wrong_type.json b/test_ioccc/test_JSON/info.json/bad/info.mkiocccentry_version.wrong_type.json index 3524ecdfc..eadf5c13b 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.mkiocccentry_version.wrong_type.json +++ b/test_ioccc/test_JSON/info.json/bad/info.mkiocccentry_version.wrong_type.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.no_comment.bad_value.json b/test_ioccc/test_JSON/info.json/bad/info.no_comment.bad_value.json index fc16b711f..cff7b346a 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.no_comment.bad_value.json +++ b/test_ioccc/test_JSON/info.json/bad/info.no_comment.bad_value.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.no_comment.wrong_type.json b/test_ioccc/test_JSON/info.json/bad/info.no_comment.wrong_type.json index a5ff7f47a..fa8589b60 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.no_comment.wrong_type.json +++ b/test_ioccc/test_JSON/info.json/bad/info.no_comment.wrong_type.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.nul_warning.wrong_type.json b/test_ioccc/test_JSON/info.json/bad/info.nul_warning.wrong_type.json index 7779c7b1a..398029ddb 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.nul_warning.wrong_type.json +++ b/test_ioccc/test_JSON/info.json/bad/info.nul_warning.wrong_type.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.null.json b/test_ioccc/test_JSON/info.json/bad/info.null.json index 102ec492c..d212fd7f1 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.null.json +++ b/test_ioccc/test_JSON/info.json/bad/info.null.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.remarks.bad_value.json b/test_ioccc/test_JSON/info.json/bad/info.remarks.bad_value.json index 115c6e9f1..750dad718 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.remarks.bad_value.json +++ b/test_ioccc/test_JSON/info.json/bad/info.remarks.bad_value.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.remarks.wrong_type.json b/test_ioccc/test_JSON/info.json/bad/info.remarks.wrong_type.json index 2f76bbba8..5e3e5a9b2 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.remarks.wrong_type.json +++ b/test_ioccc/test_JSON/info.json/bad/info.remarks.wrong_type.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.rule_2a_mismatch.wrong_type.json b/test_ioccc/test_JSON/info.json/bad/info.rule_2a_mismatch.wrong_type.json index 742e06448..c03b74674 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.rule_2a_mismatch.wrong_type.json +++ b/test_ioccc/test_JSON/info.json/bad/info.rule_2a_mismatch.wrong_type.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.rule_2a_override.wrong_type.json b/test_ioccc/test_JSON/info.json/bad/info.rule_2a_override.wrong_type.json index 48e11ac6c..644d1a56d 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.rule_2a_override.wrong_type.json +++ b/test_ioccc/test_JSON/info.json/bad/info.rule_2a_override.wrong_type.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.rule_2a_size.wrong_type.json b/test_ioccc/test_JSON/info.json/bad/info.rule_2a_size.wrong_type.json index 60d20e53a..d051dfdd2 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.rule_2a_size.wrong_type.json +++ b/test_ioccc/test_JSON/info.json/bad/info.rule_2a_size.wrong_type.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.rule_2b_override.wrong_type.json b/test_ioccc/test_JSON/info.json/bad/info.rule_2b_override.wrong_type.json index 4002cb3e1..f39fdddeb 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.rule_2b_override.wrong_type.json +++ b/test_ioccc/test_JSON/info.json/bad/info.rule_2b_override.wrong_type.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.rule_2b_size.wrong_type.json b/test_ioccc/test_JSON/info.json/bad/info.rule_2b_size.wrong_type.json index de581cdf0..05db902b7 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.rule_2b_size.wrong_type.json +++ b/test_ioccc/test_JSON/info.json/bad/info.rule_2b_size.wrong_type.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.simple-0.json b/test_ioccc/test_JSON/info.json/bad/info.simple-0.json index 2cecda693..2858b92e1 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.simple-0.json +++ b/test_ioccc/test_JSON/info.json/bad/info.simple-0.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "test", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.tarball-0.json b/test_ioccc/test_JSON/info.json/bad/info.tarball-0.json index bac2791e7..0608e82ab 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.tarball-0.json +++ b/test_ioccc/test_JSON/info.json/bad/info.tarball-0.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.tarball-1.json b/test_ioccc/test_JSON/info.json/bad/info.tarball-1.json index 6120652c2..fe99d05ad 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.tarball-1.json +++ b/test_ioccc/test_JSON/info.json/bad/info.tarball-1.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.tarball-10.json b/test_ioccc/test_JSON/info.json/bad/info.tarball-10.json index 6bd8b100a..265ff2b64 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.tarball-10.json +++ b/test_ioccc/test_JSON/info.json/bad/info.tarball-10.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.tarball-2.json b/test_ioccc/test_JSON/info.json/bad/info.tarball-2.json index 4d3559388..8b3aae760 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.tarball-2.json +++ b/test_ioccc/test_JSON/info.json/bad/info.tarball-2.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.tarball-3.json b/test_ioccc/test_JSON/info.json/bad/info.tarball-3.json index f7fc43c2f..a403bad54 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.tarball-3.json +++ b/test_ioccc/test_JSON/info.json/bad/info.tarball-3.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.tarball-4.json b/test_ioccc/test_JSON/info.json/bad/info.tarball-4.json index ead13a84f..56fc5c0e6 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.tarball-4.json +++ b/test_ioccc/test_JSON/info.json/bad/info.tarball-4.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.tarball-5.json b/test_ioccc/test_JSON/info.json/bad/info.tarball-5.json index 8212e3c97..c7156f71f 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.tarball-5.json +++ b/test_ioccc/test_JSON/info.json/bad/info.tarball-5.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.tarball-7.json b/test_ioccc/test_JSON/info.json/bad/info.tarball-7.json index 120c926d5..79028d1d2 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.tarball-7.json +++ b/test_ioccc/test_JSON/info.json/bad/info.tarball-7.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.tarball-8.json b/test_ioccc/test_JSON/info.json/bad/info.tarball-8.json index 16ca5d808..9a1aeacdb 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.tarball-8.json +++ b/test_ioccc/test_JSON/info.json/bad/info.tarball-8.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.tarball-9.json b/test_ioccc/test_JSON/info.json/bad/info.tarball-9.json index 4b62bd866..de7bcf9b2 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.tarball-9.json +++ b/test_ioccc/test_JSON/info.json/bad/info.tarball-9.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.tarball.bad_value.json b/test_ioccc/test_JSON/info.json/bad/info.tarball.bad_value.json index 27f9bbe5e..f2c75a8b8 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.tarball.bad_value.json +++ b/test_ioccc/test_JSON/info.json/bad/info.tarball.bad_value.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.tarball.wrong_type.json b/test_ioccc/test_JSON/info.json/bad/info.tarball.wrong_type.json index 498be00d6..1c4ebfbc2 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.tarball.wrong_type.json +++ b/test_ioccc/test_JSON/info.json/bad/info.tarball.wrong_type.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.test_mode.0.json b/test_ioccc/test_JSON/info.json/bad/info.test_mode.0.json index 7d255329d..912b43171 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.test_mode.0.json +++ b/test_ioccc/test_JSON/info.json/bad/info.test_mode.0.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.test_mode.1.json b/test_ioccc/test_JSON/info.json/bad/info.test_mode.1.json index c4aded752..d8668b2a8 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.test_mode.1.json +++ b/test_ioccc/test_JSON/info.json/bad/info.test_mode.1.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "test", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.test_mode.bad_value.json b/test_ioccc/test_JSON/info.json/bad/info.test_mode.bad_value.json index 8f5642677..b8ed6b291 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.test_mode.bad_value.json +++ b/test_ioccc/test_JSON/info.json/bad/info.test_mode.bad_value.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.test_mode.wrong_type.json b/test_ioccc/test_JSON/info.json/bad/info.test_mode.wrong_type.json index c86c3ddde..e59c3330a 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.test_mode.wrong_type.json +++ b/test_ioccc/test_JSON/info.json/bad/info.test_mode.wrong_type.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.timestamp-1.json b/test_ioccc/test_JSON/info.json/bad/info.timestamp-1.json index 9d61597f0..eb344617e 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.timestamp-1.json +++ b/test_ioccc/test_JSON/info.json/bad/info.timestamp-1.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.timestamp-2.json b/test_ioccc/test_JSON/info.json/bad/info.timestamp-2.json index 5bae84481..fbaf325ac 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.timestamp-2.json +++ b/test_ioccc/test_JSON/info.json/bad/info.timestamp-2.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.timestamp_epoch.bad_value.json b/test_ioccc/test_JSON/info.json/bad/info.timestamp_epoch.bad_value.json index 79dfd9a4f..5bc66660c 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.timestamp_epoch.bad_value.json +++ b/test_ioccc/test_JSON/info.json/bad/info.timestamp_epoch.bad_value.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.timestamp_epoch.wrong_type.json b/test_ioccc/test_JSON/info.json/bad/info.timestamp_epoch.wrong_type.json index 36ca2553f..5c56917b6 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.timestamp_epoch.wrong_type.json +++ b/test_ioccc/test_JSON/info.json/bad/info.timestamp_epoch.wrong_type.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.title-0.json b/test_ioccc/test_JSON/info.json/bad/info.title-0.json index 33f22aed2..df97cbeaa 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.title-0.json +++ b/test_ioccc/test_JSON/info.json/bad/info.title-0.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "Title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.title-1.json b/test_ioccc/test_JSON/info.json/bad/info.title-1.json index fc11e58ae..8e0614352 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.title-1.json +++ b/test_ioccc/test_JSON/info.json/bad/info.title-1.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : ".title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.title-2.json b/test_ioccc/test_JSON/info.json/bad/info.title-2.json index 36545d4b7..64826d2ce 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.title-2.json +++ b/test_ioccc/test_JSON/info.json/bad/info.title-2.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry%", diff --git a/test_ioccc/test_JSON/info.json/bad/info.title-3.json b/test_ioccc/test_JSON/info.json/bad/info.title-3.json index c8d7e63ba..c2f219d92 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.title-3.json +++ b/test_ioccc/test_JSON/info.json/bad/info.title-3.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "TITLE-FOR-ENTRY0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.title.bad_value.json b/test_ioccc/test_JSON/info.json/bad/info.title.bad_value.json index 1a5628e07..02c949006 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.title.bad_value.json +++ b/test_ioccc/test_JSON/info.json/bad/info.title.bad_value.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title for entry!", diff --git a/test_ioccc/test_JSON/info.json/bad/info.title.wrong_type.json b/test_ioccc/test_JSON/info.json/bad/info.title.wrong_type.json index 7f7dddc96..94ae88dd6 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.title.wrong_type.json +++ b/test_ioccc/test_JSON/info.json/bad/info.title.wrong_type.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : 12345, diff --git a/test_ioccc/test_JSON/info.json/bad/info.trigraph_warning.wrong_type.json b/test_ioccc/test_JSON/info.json/bad/info.trigraph_warning.wrong_type.json index 7dcae7dbe..bac1bb2d6 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.trigraph_warning.wrong_type.json +++ b/test_ioccc/test_JSON/info.json/bad/info.trigraph_warning.wrong_type.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.true.json b/test_ioccc/test_JSON/info.json/bad/info.true.json index 17df0ded1..771f86172 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.true.json +++ b/test_ioccc/test_JSON/info.json/bad/info.true.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.ungetc_warning.wrong_type.json b/test_ioccc/test_JSON/info.json/bad/info.ungetc_warning.wrong_type.json index f0d3516c7..079dcfba0 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.ungetc_warning.wrong_type.json +++ b/test_ioccc/test_JSON/info.json/bad/info.ungetc_warning.wrong_type.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/bad/info.wordbuf_warning.wrong_type.json b/test_ioccc/test_JSON/info.json/bad/info.wordbuf_warning.wrong_type.json index 66a3d5e2d..a38af0757 100644 --- a/test_ioccc/test_JSON/info.json/bad/info.wordbuf_warning.wrong_type.json +++ b/test_ioccc/test_JSON/info.json/bad/info.wordbuf_warning.wrong_type.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/good/info.abstract-with-encoded-NUL.json b/test_ioccc/test_JSON/info.json/good/info.abstract-with-encoded-NUL.json index 4e740d16d..b2148c6f3 100644 --- a/test_ioccc/test_JSON/info.json/good/info.abstract-with-encoded-NUL.json +++ b/test_ioccc/test_JSON/info.json/good/info.abstract-with-encoded-NUL.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/good/info.array-last.json b/test_ioccc/test_JSON/info.json/good/info.array-last.json index 14509311f..3b5252d2d 100644 --- a/test_ioccc/test_JSON/info.json/good/info.array-last.json +++ b/test_ioccc/test_JSON/info.json/good/info.array-last.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry2", diff --git a/test_ioccc/test_JSON/info.json/good/info.empty-override.json b/test_ioccc/test_JSON/info.json/good/info.empty-override.json index 88360b8fd..f4f13c800 100644 --- a/test_ioccc/test_JSON/info.json/good/info.empty-override.json +++ b/test_ioccc/test_JSON/info.json/good/info.empty-override.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "test", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/good/info.good.json b/test_ioccc/test_JSON/info.json/good/info.good.json index 86b9a92b2..89acbc82f 100644 --- a/test_ioccc/test_JSON/info.json/good/info.good.json +++ b/test_ioccc/test_JSON/info.json/good/info.good.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "title-for-entry2", diff --git a/test_ioccc/test_JSON/info.json/good/info.max-manifest.json b/test_ioccc/test_JSON/info.json/good/info.max-manifest.json index ce7556d32..5b09a8b27 100644 --- a/test_ioccc/test_JSON/info.json/good/info.max-manifest.json +++ b/test_ioccc/test_JSON/info.json/good/info.max-manifest.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/good/info.min-manifest.json b/test_ioccc/test_JSON/info.json/good/info.min-manifest.json index cf9ebf1dc..41d05680a 100644 --- a/test_ioccc/test_JSON/info.json/good/info.min-manifest.json +++ b/test_ioccc/test_JSON/info.json/good/info.min-manifest.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/good/info.min-whitespace-nonl.json b/test_ioccc/test_JSON/info.json/good/info.min-whitespace-nonl.json index 0c226bdb4..0bbd98a67 100644 --- a/test_ioccc/test_JSON/info.json/good/info.min-whitespace-nonl.json +++ b/test_ioccc/test_JSON/info.json/good/info.min-whitespace-nonl.json @@ -1 +1 @@ -{"no_comment":"mandatory comment: because comments were removed from the original JSON spec","IOCCC_info_version":"1.14 2023-02-04","IOCCC_contest":"IOCCCMOCK","IOCCC_year":2023,"mkiocccentry_version":"1.0.2 2023-11-06","iocccsize_version":"28.13 2023-02-04","chkentry_version":"1.0 2023-02-04","fnamchk_version":"1.0 2023-02-04","txzchk_version":"1.0.1 2023-06-16","IOCCC_contest_id":"12345678-1234-4321-abcd-1234567890ab","entry_num":2,"title":"title-for-entry2","abstract":"abstract for entry #2","tarball":"entry.12345678-1234-4321-abcd-1234567890ab-2.1675547786.txz","rule_2a_size":61,"rule_2b_size":38,"empty_override":false,"rule_2a_override":false,"rule_2a_mismatch":false,"rule_2b_override":false,"highbit_warning":false,"nul_warning":false,"trigraph_warning":false,"wordbuf_warning":false,"ungetc_warning":false,"Makefile_override":false,"first_rule_is_all":true,"found_all_rule":true,"found_clean_rule":true,"found_clobber_rule":true,"found_try_rule":true,"test_mode":false,"manifest":[ {"info_JSON":".info.json"}, {"auth_JSON":".auth.json"}, {"c_src":"prog.c"}, {"Makefile":"Makefile"}, {"remarks":"remarks.md"}, {"extra_file":"extra1"}, {"extra_file":"extra2"}, {"extra_file":"foo"}, {"extra_file":"bar"} ],"formed_timestamp":1675547786,"formed_timestamp_usec":213882,"timestamp_epoch":"Thu Jan 01 00:00:00 1970 UTC","min_timestamp":1675547786,"formed_UTC":"Sat Feb 04 21:56:26 2023 UTC"} +{"no_comment":"mandatory comment: because comments were removed from the original JSON spec","IOCCC_info_version":"1.14 2023-02-04","IOCCC_contest":"IOCCCMOCK","IOCCC_year":2023,"mkiocccentry_version":"1.0.2 2023-11-06","iocccsize_version":"28.13 2023-02-04","chkentry_version":"1.0 2023-02-04","fnamchk_version":"1.0 2023-02-04","txzchk_version":"1.0.2 2023-11-06","IOCCC_contest_id":"12345678-1234-4321-abcd-1234567890ab","entry_num":2,"title":"title-for-entry2","abstract":"abstract for entry #2","tarball":"entry.12345678-1234-4321-abcd-1234567890ab-2.1675547786.txz","rule_2a_size":61,"rule_2b_size":38,"empty_override":false,"rule_2a_override":false,"rule_2a_mismatch":false,"rule_2b_override":false,"highbit_warning":false,"nul_warning":false,"trigraph_warning":false,"wordbuf_warning":false,"ungetc_warning":false,"Makefile_override":false,"first_rule_is_all":true,"found_all_rule":true,"found_clean_rule":true,"found_clobber_rule":true,"found_try_rule":true,"test_mode":false,"manifest":[ {"info_JSON":".info.json"}, {"auth_JSON":".auth.json"}, {"c_src":"prog.c"}, {"Makefile":"Makefile"}, {"remarks":"remarks.md"}, {"extra_file":"extra1"}, {"extra_file":"extra2"}, {"extra_file":"foo"}, {"extra_file":"bar"} ],"formed_timestamp":1675547786,"formed_timestamp_usec":213882,"timestamp_epoch":"Thu Jan 01 00:00:00 1970 UTC","min_timestamp":1675547786,"formed_UTC":"Sat Feb 04 21:56:26 2023 UTC"} diff --git a/test_ioccc/test_JSON/info.json/good/info.min-whitespace.json b/test_ioccc/test_JSON/info.json/good/info.min-whitespace.json index 0c226bdb4..0bbd98a67 100644 --- a/test_ioccc/test_JSON/info.json/good/info.min-whitespace.json +++ b/test_ioccc/test_JSON/info.json/good/info.min-whitespace.json @@ -1 +1 @@ -{"no_comment":"mandatory comment: because comments were removed from the original JSON spec","IOCCC_info_version":"1.14 2023-02-04","IOCCC_contest":"IOCCCMOCK","IOCCC_year":2023,"mkiocccentry_version":"1.0.2 2023-11-06","iocccsize_version":"28.13 2023-02-04","chkentry_version":"1.0 2023-02-04","fnamchk_version":"1.0 2023-02-04","txzchk_version":"1.0.1 2023-06-16","IOCCC_contest_id":"12345678-1234-4321-abcd-1234567890ab","entry_num":2,"title":"title-for-entry2","abstract":"abstract for entry #2","tarball":"entry.12345678-1234-4321-abcd-1234567890ab-2.1675547786.txz","rule_2a_size":61,"rule_2b_size":38,"empty_override":false,"rule_2a_override":false,"rule_2a_mismatch":false,"rule_2b_override":false,"highbit_warning":false,"nul_warning":false,"trigraph_warning":false,"wordbuf_warning":false,"ungetc_warning":false,"Makefile_override":false,"first_rule_is_all":true,"found_all_rule":true,"found_clean_rule":true,"found_clobber_rule":true,"found_try_rule":true,"test_mode":false,"manifest":[ {"info_JSON":".info.json"}, {"auth_JSON":".auth.json"}, {"c_src":"prog.c"}, {"Makefile":"Makefile"}, {"remarks":"remarks.md"}, {"extra_file":"extra1"}, {"extra_file":"extra2"}, {"extra_file":"foo"}, {"extra_file":"bar"} ],"formed_timestamp":1675547786,"formed_timestamp_usec":213882,"timestamp_epoch":"Thu Jan 01 00:00:00 1970 UTC","min_timestamp":1675547786,"formed_UTC":"Sat Feb 04 21:56:26 2023 UTC"} +{"no_comment":"mandatory comment: because comments were removed from the original JSON spec","IOCCC_info_version":"1.14 2023-02-04","IOCCC_contest":"IOCCCMOCK","IOCCC_year":2023,"mkiocccentry_version":"1.0.2 2023-11-06","iocccsize_version":"28.13 2023-02-04","chkentry_version":"1.0 2023-02-04","fnamchk_version":"1.0 2023-02-04","txzchk_version":"1.0.2 2023-11-06","IOCCC_contest_id":"12345678-1234-4321-abcd-1234567890ab","entry_num":2,"title":"title-for-entry2","abstract":"abstract for entry #2","tarball":"entry.12345678-1234-4321-abcd-1234567890ab-2.1675547786.txz","rule_2a_size":61,"rule_2b_size":38,"empty_override":false,"rule_2a_override":false,"rule_2a_mismatch":false,"rule_2b_override":false,"highbit_warning":false,"nul_warning":false,"trigraph_warning":false,"wordbuf_warning":false,"ungetc_warning":false,"Makefile_override":false,"first_rule_is_all":true,"found_all_rule":true,"found_clean_rule":true,"found_clobber_rule":true,"found_try_rule":true,"test_mode":false,"manifest":[ {"info_JSON":".info.json"}, {"auth_JSON":".auth.json"}, {"c_src":"prog.c"}, {"Makefile":"Makefile"}, {"remarks":"remarks.md"}, {"extra_file":"extra1"}, {"extra_file":"extra2"}, {"extra_file":"foo"}, {"extra_file":"bar"} ],"formed_timestamp":1675547786,"formed_timestamp_usec":213882,"timestamp_epoch":"Thu Jan 01 00:00:00 1970 UTC","min_timestamp":1675547786,"formed_UTC":"Sat Feb 04 21:56:26 2023 UTC"} diff --git a/test_ioccc/test_JSON/info.json/good/info.quote-null.json b/test_ioccc/test_JSON/info.json/good/info.quote-null.json index 262138c18..4c1ecb4b8 100644 --- a/test_ioccc/test_JSON/info.json/good/info.quote-null.json +++ b/test_ioccc/test_JSON/info.json/good/info.quote-null.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 2, "title" : "null", diff --git a/test_ioccc/test_JSON/info.json/good/info.reference.json b/test_ioccc/test_JSON/info.json/good/info.reference.json index ce7556d32..5b09a8b27 100644 --- a/test_ioccc/test_JSON/info.json/good/info.reference.json +++ b/test_ioccc/test_JSON/info.json/good/info.reference.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/good/info.simple-0.json b/test_ioccc/test_JSON/info.json/good/info.simple-0.json index ad9c59a3d..7e7cb250a 100644 --- a/test_ioccc/test_JSON/info.json/good/info.simple-0.json +++ b/test_ioccc/test_JSON/info.json/good/info.simple-0.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "test", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/good/info.simple-1.json b/test_ioccc/test_JSON/info.json/good/info.simple-1.json index a79054e6c..777eed055 100644 --- a/test_ioccc/test_JSON/info.json/good/info.simple-1.json +++ b/test_ioccc/test_JSON/info.json/good/info.simple-1.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "12345678-1234-4321-abcd-1234567890ab", "entry_num" : 0, "title" : "title-for-entry0", diff --git a/test_ioccc/test_JSON/info.json/good/info.sorted.json b/test_ioccc/test_JSON/info.json/good/info.sorted.json index 691b1ae34..ce99d307b 100644 --- a/test_ioccc/test_JSON/info.json/good/info.sorted.json +++ b/test_ioccc/test_JSON/info.json/good/info.sorted.json @@ -44,7 +44,7 @@ "timestamp_epoch" : "Thu Jan 01 00:00:00 1970 UTC", "title" : "title-for-entry0", "trigraph_warning" : false, - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "ungetc_warning" : false, "wordbuf_warning" : false } diff --git a/test_ioccc/test_JSON/info.json/good/info.test-0.json b/test_ioccc/test_JSON/info.json/good/info.test-0.json index 63fd9fb8c..931d62014 100644 --- a/test_ioccc/test_JSON/info.json/good/info.test-0.json +++ b/test_ioccc/test_JSON/info.json/good/info.test-0.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "test", "entry_num" : 1, "title" : "title-for-entry1", diff --git a/test_ioccc/test_JSON/info.json/good/info.test-1.json b/test_ioccc/test_JSON/info.json/good/info.test-1.json index 370aea0f3..77fa4497d 100644 --- a/test_ioccc/test_JSON/info.json/good/info.test-1.json +++ b/test_ioccc/test_JSON/info.json/good/info.test-1.json @@ -7,7 +7,7 @@ "iocccsize_version" : "28.13 2023-02-04", "chkentry_version" : "1.0 2023-02-04", "fnamchk_version" : "1.0 2023-02-04", - "txzchk_version" : "1.0.1 2023-06-16", + "txzchk_version" : "1.0.2 2023-11-06", "IOCCC_contest_id" : "test", "entry_num" : 1, "title" : "title-for-entry1", diff --git a/txzchk.c b/txzchk.c index 799d0e72f..f7a1e2019 100644 --- a/txzchk.c +++ b/txzchk.c @@ -327,6 +327,10 @@ show_tarball_info(char const *tarball_path) dbg(DBG_MED, "%s has %ju file%s named '.'", tarball_path, tarball.named_dot, singular_or_plural(tarball.named_dot)); dbg(DBG_MED, "%s has %ju file%s with at least one unsafe char", tarball_path, tarball.unsafe_chars, singular_or_plural(tarball.unsafe_chars)); + if (tarball.invalid_filenames) { + dbg(DBG_MED, "%s has %ju invalidly named file%s", tarball_path, tarball.invalid_filenames, + singular_or_plural(tarball.invalid_filenames)); + } if (tarball.total_feathers > 0) { dbg(DBG_VHIGH, "%s has %ju feather%s stuck in tarball :-(", tarball_path, tarball.total_feathers, singular_or_plural(tarball.total_feathers)); @@ -648,6 +652,12 @@ check_txz_file(char const *tarball_path, char const *dir_name, struct txz_file * ++tarball.unsafe_chars; warn(__func__, "%s: file basename does not match regexp ^[0-9A-Za-z][0-9A-Za-z._+-]*$: %s", tarball_path, file->basename); + } else if (!strcasecmp(file->basename, README_MD_FILENAME) || !strcasecmp(file->basename, PROG_ORIG_C_FILENAME) || + !strcasecmp(file->basename, PROG_FILENAME) || !strcasecmp(file->basename, PROG_ORIG_FILENAME) || + !strcasecmp(file->basename, INDEX_HTML_FILENAME) || !strcasecmp(file->basename, INVENTORY_HTML_FILENAME)) { + ++tarball.total_feathers; + ++tarball.invalid_filenames; + warn(__func__, "%s: filename not allowed: %s", tarball_path, file->basename); } } diff --git a/txzchk.h b/txzchk.h index e280821ee..1459deaa9 100644 --- a/txzchk.h +++ b/txzchk.h @@ -110,6 +110,7 @@ struct tarball uintmax_t named_dot; /* number of files called just '.' */ uintmax_t total_files; /* total files in the tarball */ uintmax_t abnormal_files; /* total number of abnormal files in tarball (i.e. not regular files) */ + uintmax_t invalid_filenames; /* total number of invalid filenames in tarball */ uintmax_t total_feathers; /* number of total feathers stuck in tarball (i.e. issues found) */ };