diff options
| -rw-r--r-- | Makefile | 6 | ||||
| -rw-r--r-- | pty.c | 1 | ||||
| -rw-r--r-- | std.c | 1 | ||||
| -rw-r--r-- | util.c | 16 | ||||
| -rw-r--r-- | util.h | 3 |
5 files changed, 3 insertions, 24 deletions
| @@ -3,7 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | include config.mk | 4 | include config.mk |
| 5 | 5 | ||
| 6 | SRC = st.c std.c util.c pty.c | 6 | SRC = st.c std.c pty.c |
| 7 | OBJ = ${SRC:.c=.o} | 7 | OBJ = ${SRC:.c=.o} |
| 8 | 8 | ||
| 9 | all: options st std | 9 | all: options st std |
| @@ -21,11 +21,11 @@ options: | |||
| 21 | 21 | ||
| 22 | ${OBJ}: config.mk | 22 | ${OBJ}: config.mk |
| 23 | 23 | ||
| 24 | st: st.o util.o | 24 | st: st.o |
| 25 | @echo CC -o $@ | 25 | @echo CC -o $@ |
| 26 | @${CC} -o $@ $^ ${LDFLAGS} ${X11LDFLAGS} | 26 | @${CC} -o $@ $^ ${LDFLAGS} ${X11LDFLAGS} |
| 27 | 27 | ||
| 28 | std: std.o pty.o util.o | 28 | std: std.o pty.o |
| 29 | @echo CC -o $@ | 29 | @echo CC -o $@ |
| 30 | @${CC} -o $@ $^ ${LDFLAGS} | 30 | @${CC} -o $@ $^ ${LDFLAGS} |
| 31 | 31 | ||
| @@ -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> |
| @@ -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> |
| @@ -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 | |||
| 9 | void * | ||
| 10 | emallocz(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 | } | ||
| @@ -1,3 +0,0 @@ | |||
| 1 | /* See LICENSE file for copyright and license details. */ | ||
| 2 | |||
| 3 | void *emallocz(unsigned int size); | ||
