From 352f413762a28005f5d892d7d1cd2b368ba7cca8 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Mon, 22 Aug 2016 17:33:03 +0200 Subject: Cleanup --- Makefile | 2 -- Makefile.linux | 7 +++++++ watch.c | 22 ++-------------------- 3 files changed, 9 insertions(+), 22 deletions(-) create mode 100644 Makefile.linux diff --git a/Makefile b/Makefile index 73e21e4..1979014 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,3 @@ -# $Id$ - PROG= watch BINDIR= /usr/local/bin MAN= watch.1 diff --git a/Makefile.linux b/Makefile.linux new file mode 100644 index 0000000..03a17a6 --- /dev/null +++ b/Makefile.linux @@ -0,0 +1,7 @@ +PROG = watch +LDFLAGS += -lncurses -lbsd + +all: ${PROG} + +clean: + ${RM} ${PROG} *.o diff --git a/watch.c b/watch.c index 23d369e..d927286 100644 --- a/watch.c +++ b/watch.c @@ -1,4 +1,3 @@ -/* $Id$ */ /* * Copyright (c) 2003 Dimitri Sokolyuk * @@ -15,15 +14,6 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef lint -static const char rcsid[] = -"$Id$"; -#endif /* not lint */ - -/* version */ -const int major = 2; -const int minor = 1; - #include #include #include @@ -38,14 +28,6 @@ const int minor = 1; #include #include -#if defined(__linux__) -#ifndef __dead -#define __dead __attribute__((noreturn)) -#endif -#define strlcpy(d,s,l) (strncpy(d,s,(l) - strlen(d) - 1), (d)[(l) - 1] = '\0') -#define strlcat(d,s,l) strncat(d,s,(l) - strlen(d) - 1) -#endif - #ifndef DELAY #define DELAY 2 /* default delay between screen updates in seconds */ #endif @@ -64,7 +46,7 @@ int display(WINDOW *, char *, char *, size_t); void title(WINDOW *, char *, int); void resize(void); void settimer(int); -__dead void usage(void); +void usage(void); void catchsig(int sig) @@ -285,7 +267,7 @@ settimer(int sec) setitimer(ITIMER_REAL, &itv, NULL); } -__dead void +void usage(void) { (void)fprintf(stderr, "usage: %s [-htv] [-n time] [command]\n", -- cgit v1.2.3