5 /* program_invocation_short_name GNU extension - http://linux.die.net/man/3/program_invocation_short_name */
6 extern char* __progname
;
7 #define program_invocation_short_name __progname
9 /* error(3) GNU extension - http://man7.org/linux/man-pages/man3/error.3.html */
10 unsigned int error_message_count
;
11 static inline void error(int status
, int errnum
, const char* format
, ...) {
12 error_message_count
++;
14 va_start(myargs
, format
);
15 vfprintf(stderr
, format
, myargs
);
20 /* strchrnul(3) GNU extension - http://man7.org/linux/man-pages/man3/strchr.3.html */
21 static inline char* strchrnul(char const* s
, int c
)
23 char* result
= strchr(s
, c
);
24 return (result
== NULL
) ?
(char*)(s
+ strlen(s
)) : result
;