diff options
author | Greg Hudson <ghudson@mit.edu> | 1997-09-14 17:50:06 +0000 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 1997-09-14 17:50:06 +0000 |
commit | ac16f380e349fa39ec7e26bccb5456cb300006a5 (patch) | |
tree | c07ca88af97b4f6b77d28a2dc723d2e4621ed302 /clients/znol | |
parent | d33e482744fad80d95cdd89ed380c5b8401e49bf (diff) |
Pull in sources from zephyr locker. See /mit/zephyr/repository for
detailed change information.
Diffstat (limited to 'clients/znol')
-rw-r--r-- | clients/znol/Imakefile | 15 | ||||
-rw-r--r-- | clients/znol/Makefile.in | 47 | ||||
-rw-r--r-- | clients/znol/znol.c | 9 |
3 files changed, 51 insertions, 20 deletions
diff --git a/clients/znol/Imakefile b/clients/znol/Imakefile deleted file mode 100644 index 40e3833..0000000 --- a/clients/znol/Imakefile +++ /dev/null @@ -1,15 +0,0 @@ -/**/# Copyright 1988 Massachusetts Institute of Technology. -/**/# -/**/# For copying and distribution information, see the file -/**/# "mit-copyright.h". -/**/# -/**/# $Source$ -/**/# $Author$ -/**/# $Id$ -/**/# - -SRCS = znol.c -OBJS = znol.o - -zprogram(znol,) -install_man(znol.1,znol.1) diff --git a/clients/znol/Makefile.in b/clients/znol/Makefile.in new file mode 100644 index 0000000..597ab3f --- /dev/null +++ b/clients/znol/Makefile.in @@ -0,0 +1,47 @@ +SHELL = /bin/sh + +prefix=@prefix@ +exec_prefix=@exec_prefix@ +datadir=@datadir@ +confdir=@confdir@ +sbindir=@sbindir@ +lsbindir=@lsbindir@ + +includedir=${prefix}/include +mandir=${prefix}/man +libdir=${exec_prefix}/lib +bindir=${exec_prefix}/bin + +srcdir=@srcdir@ +top_srcdir=@top_srcdir@ +BUILDTOP=../.. +VPATH=@srcdir@ +CC=@CC@ +INSTALL=@INSTALL@ + +DEBUG=-O +CFLAGS=${DEBUG} -I${top_srcdir}/h -I${BUILDTOP}/h @CPPFLAGS@ +LDFLAGS=${DEBUG} -L${BUILDTOP}/lib/zephyr @ET_LDFLAGS@ @LDFLAGS@ +LIBS=-lzephyr @LIBS@ -lcom_err + +OBJS= znol.o + +all: znol + +znol: ${OBJS} ${BUILDTOP}/lib/zephyr/libzephyr.a @ETDEP@ + ${CC} ${LDFLAGS} -o $@ ${OBJS} ${LIBS} + +check: + +install: znol + ${INSTALL} -m 755 -s znol ${DESTDIR}${bindir} + ${INSTALL} -m 644 ${srcdir}/znol.1 ${DESTDIR}${mandir}/man1 + +clean: + rm -f ${OBJS} znol + +${OBJS}: ${top_srcdir}/h/sysdep.h ${BUILDTOP}/h/config.h +${OBJS}: ${BUILDTOP}/h/zephyr/zephyr.h ${BUILDTOP}/h/zephyr/zephyr_err.h + +.PHONY: all check install clean + diff --git a/clients/znol/znol.c b/clients/znol/znol.c index 9bc6764..fe29055 100644 --- a/clients/znol/znol.c +++ b/clients/znol/znol.c @@ -11,13 +11,13 @@ * "mit-copyright.h". */ +#include <sysdep.h> #include <zephyr/zephyr.h> #include <pwd.h> -#include <string.h> #ifndef lint -static char rcsid_znol_c[] = "$Id$"; +static const char rcsid_znol_c[] = "$Id$"; #endif #define SUBSATONCE 7 @@ -142,9 +142,8 @@ main(argc,argv) *comment_ptr = '\0'; /* Ignore from # onwards */ /* Get rid of old-style nol entries, just in case */ cp = cleanname + strlen(cleanname) - 1; - if (*cp == '\n') - *cp = '\0'; - while (*--cp == ' ') + *cp = '\0'; + while(*--cp == ' ') *cp = '\0'; if (*cleanname == '@' || !*cleanname) continue; |