aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile6
-rw-r--r--pty.c1
-rw-r--r--std.c1
-rw-r--r--util.c16
-rw-r--r--util.h3
5 files changed, 3 insertions, 24 deletions
diff --git a/Makefile b/Makefile
index ddf1952..72154e9 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@
3 3
4include config.mk 4include config.mk
5 5
6SRC = st.c std.c util.c pty.c 6SRC = st.c std.c pty.c
7OBJ = ${SRC:.c=.o} 7OBJ = ${SRC:.c=.o}
8 8
9all: options st std 9all: options st std
@@ -21,11 +21,11 @@ options:
21 21
22${OBJ}: config.mk 22${OBJ}: config.mk
23 23
24st: st.o util.o 24st: st.o
25 @echo CC -o $@ 25 @echo CC -o $@
26 @${CC} -o $@ $^ ${LDFLAGS} ${X11LDFLAGS} 26 @${CC} -o $@ $^ ${LDFLAGS} ${X11LDFLAGS}
27 27
28std: std.o pty.o util.o 28std: std.o pty.o
29 @echo CC -o $@ 29 @echo CC -o $@
30 @${CC} -o $@ $^ ${LDFLAGS} 30 @${CC} -o $@ $^ ${LDFLAGS}
31 31
diff --git a/pty.c b/pty.c
index a173dab..3efaa7f 100644
--- a/pty.c
+++ b/pty.c
@@ -1,5 +1,4 @@
1/* See LICENSE file for copyright and license details. */ 1/* See LICENSE file for copyright and license details. */
2#include "util.h"
3#include <sys/types.h> 2#include <sys/types.h>
4#include <sys/stat.h> 3#include <sys/stat.h>
5#include <fcntl.h> 4#include <fcntl.h>
diff --git a/std.c b/std.c
index daf759e..5b430b8 100644
--- a/std.c
+++ b/std.c
@@ -1,5 +1,4 @@
1/* See LICENSE file for copyright and license details. */ 1/* See LICENSE file for copyright and license details. */
2#include "util.h"
3#include <sys/types.h> 2#include <sys/types.h>
4#include <sys/wait.h> 3#include <sys/wait.h>
5#include <ctype.h> 4#include <ctype.h>
diff --git a/util.c b/util.c
deleted file mode 100644
index 2e33fbd..0000000
--- a/util.c
+++ /dev/null
@@ -1,16 +0,0 @@
1/* See LICENSE file for copyright and license details. */
2#include "util.h"
3#include <errno.h>
4#include <stdarg.h>
5#include <stdio.h>
6#include <stdlib.h>
7#include <string.h>
8
9void *
10emallocz(unsigned int size) {
11 void *res = calloc(1, size);
12
13 if(!res)
14 err(EXIT_FAILURE, "could not malloc() %u bytes\n", size);
15 return res;
16}
diff --git a/util.h b/util.h
deleted file mode 100644
index 9d87a95..0000000
--- a/util.h
+++ /dev/null
@@ -1,3 +0,0 @@
1/* See LICENSE file for copyright and license details. */
2
3void *emallocz(unsigned int size);