summaryrefslogtreecommitdiff
path: root/usr.bin/column
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2006-08-26 18:17:41 +0000
committerchristos <christos@NetBSD.org>2006-08-26 18:17:41 +0000
commitcdab3a7a065313dbbaaed36ef839e4ba6aa88f88 (patch)
tree0f0010f3285f7d191c44439d5763c761a0a2ca5e /usr.bin/column
parentd0fb89015b56d2b6a6b30ba0f70e30088de095fd (diff)
More programs using efun.
Diffstat (limited to 'usr.bin/column')
-rw-r--r--usr.bin/column/Makefile5
-rw-r--r--usr.bin/column/column.c39
2 files changed, 7 insertions, 37 deletions
diff --git a/usr.bin/column/Makefile b/usr.bin/column/Makefile
index a2130f6f815..ad1413e3919 100644
--- a/usr.bin/column/Makefile
+++ b/usr.bin/column/Makefile
@@ -1,7 +1,10 @@
-# $NetBSD: Makefile,v 1.5 2006/03/16 16:49:07 christos Exp $
+# $NetBSD: Makefile,v 1.6 2006/08/26 18:17:41 christos Exp $
# @(#)Makefile 8.1 (Berkeley) 6/6/93
PROG= column
WARNS= 4
+LDADD+=-lutil
+DPADD+=${LIBUTIL}
+
.include <bsd.prog.mk>
diff --git a/usr.bin/column/column.c b/usr.bin/column/column.c
index d15181cf88d..1836cf5f0c9 100644
--- a/usr.bin/column/column.c
+++ b/usr.bin/column/column.c
@@ -1,4 +1,4 @@
-/* $NetBSD: column.c,v 1.14 2006/04/09 19:51:23 christos Exp $ */
+/* $NetBSD: column.c,v 1.15 2006/08/26 18:17:41 christos Exp $ */
/*
* Copyright (c) 1989, 1993, 1994
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993, 1994\n\
#if 0
static char sccsid[] = "@(#)column.c 8.4 (Berkeley) 5/4/95";
#endif
-__RCSID("$NetBSD: column.c,v 1.14 2006/04/09 19:51:23 christos Exp $");
+__RCSID("$NetBSD: column.c,v 1.15 2006/08/26 18:17:41 christos Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -53,13 +53,11 @@ __RCSID("$NetBSD: column.c,v 1.14 2006/04/09 19:51:23 christos Exp $");
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <util.h>
#define TAB 8
static void c_columnate(void);
-static void *emalloc(size_t);
-static void *erealloc(void *, size_t);
-static char *estrdup(const char *);
static void input(FILE *);
static void maketbl(void);
static void print(void);
@@ -291,37 +289,6 @@ input(FILE *fp)
}
}
-static void *
-emalloc(size_t size)
-{
- void *p;
-
- if ((p = malloc(size)) == NULL)
- err(1, "malloc");
- (void)memset(p, 0, size);
- return (p);
-}
-
-static void *
-erealloc(void *op, size_t size)
-{
- void *p;
-
- if ((p = realloc(op, size)) == NULL)
- err(1, "realloc");
- return p;
-}
-
-static char *
-estrdup(const char *str)
-{
- char *p;
-
- if ((p = strdup(str)) == NULL)
- err(1, "strdup");
- return p;
-}
-
static void
usage(void)
{