summaryrefslogtreecommitdiff
path: root/usr.bin/unexpand
diff options
context:
space:
mode:
authorKiyoshi Aman <kiyoshi.aman+adelie@gmail.com>2019-06-20 01:52:51 -0500
committerKiyoshi Aman <kiyoshi.aman+adelie@gmail.com>2019-06-20 01:52:51 -0500
commit3a6b0bbb51eb12f9cee6948e4a6e316d195fdca3 (patch)
tree56c2a154e314a5665311af1838c4ed1747f56548 /usr.bin/unexpand
parente417bbfd8fee8217b1c454bbbac970c4fb96fd5b (diff)
downloaduserland-3a6b0bbb51eb12f9cee6948e4a6e316d195fdca3.tar.gz
userland-3a6b0bbb51eb12f9cee6948e4a6e316d195fdca3.tar.bz2
userland-3a6b0bbb51eb12f9cee6948e4a6e316d195fdca3.tar.xz
userland-3a6b0bbb51eb12f9cee6948e4a6e316d195fdca3.zip
usr.bin/unexpand: make buildable with libbsd
Diffstat (limited to 'usr.bin/unexpand')
-rw-r--r--usr.bin/unexpand/unexpand.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/usr.bin/unexpand/unexpand.c b/usr.bin/unexpand/unexpand.c
index a9d7279..5edc21c 100644
--- a/usr.bin/unexpand/unexpand.c
+++ b/usr.bin/unexpand/unexpand.c
@@ -29,30 +29,16 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-#ifndef lint
-__COPYRIGHT("@(#) Copyright (c) 1980, 1993\
- The Regents of the University of California. All rights reserved.");
-#endif /* not lint */
-
-#ifndef lint
-#if 0
-static char sccsid[] = "@(#)unexpand.c 8.1 (Berkeley) 6/6/93";
-#endif
-__RCSID("$NetBSD: unexpand.c,v 1.15 2016/02/03 05:32:14 christos Exp $");
-#endif /* not lint */
-
/*
* unexpand - put tabs into a file replacing blanks
*/
#include <limits.h>
#include <stdio.h>
-#include <stdlib.h>
+#include <bsd/stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <err.h>
-#include <util.h>
#define DSTOP 8
@@ -103,7 +89,7 @@ main(int argc, char **argv)
"Invalid tabstop `%s'", tab);
if (nstops >= maxstops) {
maxstops += 20;
- tabstops = erealloc(tabstops, maxstops);
+ tabstops = realloc(tabstops, maxstops);
}
if (nstops && tabstops[nstops - 1] >= (size_t)i)
errx(EXIT_FAILURE,