Small update to err.[ch]

This commit is contained in:
Lucas 2020-06-14 15:00:33 +00:00
parent 84587a4c32
commit 55b0b396dc
3 changed files with 9 additions and 2 deletions

2
cli.c
View File

@ -24,6 +24,8 @@
#include "err.h"
#include "otp.h"
extern const char *__progname;
static void
usage(void)
{

7
err.c
View File

@ -12,6 +12,11 @@
* along with this software. If not, see
* <http://creativecommons.org/publicdomain/zero/1.0/>.
*/
/*
* Inspired by OpenBSD's `err.h' header, found at
* http://man.openbsd.org/err.3
* http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/gen/verr.c
*/
#include <errno.h>
#include <stdarg.h>
@ -21,6 +26,8 @@
#include "err.h"
extern const char *__progname;
void
err(int eval, const char *fmt, ...)
{

2
err.h
View File

@ -13,8 +13,6 @@
* <http://creativecommons.org/publicdomain/zero/1.0/>.
*/
extern const char *__progname;
void err(int, const char *, ...);
void errx(int, const char *, ...);
void warn(const char *, ...);