-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
74b0152
commit fdfaa5d
Showing
37 changed files
with
17,397 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
#include <err.h> | ||
#include <stdio.h> | ||
#include <stdarg.h> | ||
#include <stdlib.h> | ||
|
||
extern char *__progname; | ||
|
||
void vwarn(const char *fmt, va_list ap) | ||
{ | ||
fprintf (stderr, "%s: ", __progname); | ||
if (fmt) { | ||
vfprintf(stderr, fmt, ap); | ||
fputs (": ", stderr); | ||
} | ||
perror(0); | ||
} | ||
|
||
void vwarnx(const char *fmt, va_list ap) | ||
{ | ||
fprintf (stderr, "%s: ", __progname); | ||
if (fmt) vfprintf(stderr, fmt, ap); | ||
putc('\n', stderr); | ||
} | ||
|
||
_Noreturn void verr(int status, const char *fmt, va_list ap) | ||
{ | ||
vwarn(fmt, ap); | ||
exit(status); | ||
} | ||
|
||
_Noreturn void verrx(int status, const char *fmt, va_list ap) | ||
{ | ||
vwarnx(fmt, ap); | ||
exit(status); | ||
} | ||
|
||
void warn(const char *fmt, ...) | ||
{ | ||
va_list ap; | ||
va_start(ap, fmt); | ||
vwarn(fmt, ap); | ||
va_end(ap); | ||
} | ||
|
||
void warnx(const char *fmt, ...) | ||
{ | ||
va_list ap; | ||
va_start(ap, fmt); | ||
vwarnx(fmt, ap); | ||
va_end(ap); | ||
} | ||
|
||
_Noreturn void err(int status, const char *fmt, ...) | ||
{ | ||
va_list ap; | ||
va_start(ap, fmt); | ||
verr(status, fmt, ap); | ||
va_end(ap); | ||
} | ||
|
||
_Noreturn void errx(int status, const char *fmt, ...) | ||
{ | ||
va_list ap; | ||
va_start(ap, fmt); | ||
verrx(status, fmt, ap); | ||
va_end(ap); | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# TODO: create pkg + uninstall files for all these, commit, push. | ||
|
||
basename | ||
dirname | ||
false | ||
getopt | ||
hexdump od hd (single package) | ||
jot | ||
mktemp | ||
printf | ||
seq | ||
which | ||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.