diff options
author | Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com> | 2019-05-28 19:31:12 -0500 |
---|---|---|
committer | Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com> | 2019-05-28 19:31:12 -0500 |
commit | 915f92f0eb78b1f87f9ea604e5466b50fa05f315 (patch) | |
tree | 1f101d3a18bdc6be3fa7756b007eb999a462bd57 | |
parent | f125ed7f8201f86e80362bfd3937b135cfd69bbb (diff) | |
download | userland-915f92f0eb78b1f87f9ea604e5466b50fa05f315.tar.gz userland-915f92f0eb78b1f87f9ea604e5466b50fa05f315.tar.bz2 userland-915f92f0eb78b1f87f9ea604e5466b50fa05f315.tar.xz userland-915f92f0eb78b1f87f9ea604e5466b50fa05f315.zip |
usr.bin/csplit: violating my own rule here; it builds, ship it! :V
-rw-r--r-- | usr.bin/csplit/csplit.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/usr.bin/csplit/csplit.c b/usr.bin/csplit/csplit.c index 9308ed8..7f12a45 100644 --- a/usr.bin/csplit/csplit.c +++ b/usr.bin/csplit/csplit.c @@ -45,11 +45,6 @@ * assumption about the input. */ -#include <sys/cdefs.h> -#ifndef lint -__RCSID("$NetBSD: csplit.c,v 1.7 2017/07/30 23:02:53 cheusov Exp $"); -#endif - #include <sys/types.h> #include <ctype.h> @@ -62,9 +57,9 @@ __RCSID("$NetBSD: csplit.c,v 1.7 2017/07/30 23:02:53 cheusov Exp $"); #include <stdint.h> #include <stdio.h> #include <stdlib.h> +#include <bsd/stdlib.h> #include <string.h> #include <unistd.h> -#include <util.h> static void cleanup(void); static void do_lineno(const char *); @@ -73,7 +68,7 @@ static char *get_line(void); static void handlesig(int); static FILE *newfile(void); static void toomuch(FILE *, long); -static void usage(void) __dead; +static void usage(void); /* * Command line options @@ -224,7 +219,7 @@ usage(void) exit(1); } -__dead static void +static void handlesig(int sig) { char msg[BUFSIZ]; @@ -235,7 +230,7 @@ handlesig(int sig) if (len < sizeof(msg)) (void)write(STDERR_FILENO, msg, len); cleanup(); - (void)raise_default_signal(sig); + (void)raise(sig); _exit(2); } @@ -388,7 +383,7 @@ do_rexp(const char *expr) } else ofs = 0; - if (regcomp(&cre, re, REG_BASIC|REG_NOSUB) != 0) + if (regcomp(&cre, re, REG_NOSUB) != 0) errx(1, "%s: bad regular expression", re); if (*expr == '/') |