diff --git a/usr.bin/logger/Makefile b/usr.bin/logger/Makefile new file mode 100644 index 0000000..aebf45f --- /dev/null +++ b/usr.bin/logger/Makefile @@ -0,0 +1,9 @@ +# +# $Id: Makefile,v 1.1 1998/06/23 23:23:52 gdr-ftp Exp $ +# + +PROG = logger +STACK = 1280 # highest observed: 900-some-odd bytes +BINDIR = /usr/bin + +.INCLUDE: /src/gno/prog.mk diff --git a/usr.bin/logger/logger.c b/usr.bin/logger/logger.c index 3fd3b6b..8f7d31e 100644 --- a/usr.bin/logger/logger.c +++ b/usr.bin/logger/logger.c @@ -31,6 +31,7 @@ * SUCH DAMAGE. */ +#ifndef __GNO__ #ifndef lint static char copyright[] = "@(#) Copyright (c) 1983, 1993\n\ @@ -40,6 +41,7 @@ static char copyright[] = #ifndef lint static char sccsid[] = "@(#)logger.c 8.1 (Berkeley) 6/6/93"; #endif /* not lint */ +#endif /* not __GNO__ */ #include #include @@ -47,12 +49,15 @@ static char sccsid[] = "@(#)logger.c 8.1 (Berkeley) 6/6/93"; #include #include #include +#ifdef __GNO__ +#include +#endif #define SYSLOG_NAMES #include -int decode __P((char *, CODE *)); -int pencode __P((char *)); +long decode __P((char *, CODE *)); +long pencode __P((char *)); void usage __P((void)); /* @@ -62,13 +67,16 @@ void usage __P((void)); * log. */ int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char **argv) { - int ch, logflags, pri; - char *tag, buf[1024]; + int ch, logflags; + long pri; + char *tag; + static char buf[1024]; +#ifdef __GNO__ + __REPORT_STACK(); +#endif tag = NULL; pri = LOG_NOTICE; logflags = 0; @@ -80,6 +88,10 @@ main(argc, argv) optarg, strerror(errno)); exit(1); } +#ifdef __appleiigs__ + /* if we don't do this, then fgets() crashes */ + fsettext(stdin); +#endif break; case 'i': /* log process id also */ logflags |= LOG_PID; @@ -135,12 +147,11 @@ main(argc, argv) /* * Decode a symbolic name to a numeric value */ -int -pencode(s) - register char *s; +long +pencode(register char *s) { char *save; - int fac, lev; + long fac, lev; for (save = s; *s && *s != '.'; ++s); if (*s) { @@ -166,10 +177,8 @@ pencode(s) return ((lev & LOG_PRIMASK) | (fac & LOG_FACMASK)); } -int -decode(name, codetab) - char *name; - CODE *codetab; +long +decode(char *name, CODE *codetab) { register CODE *c; @@ -184,7 +193,7 @@ decode(name, codetab) } void -usage() +usage(void) { (void)fprintf(stderr, "logger: [-is] [-f file] [-p pri] [-t tag] [ message ... ]\n"); diff --git a/usr.bin/logger/logger.desc b/usr.bin/logger/logger.desc new file mode 100644 index 0000000..c20eccd --- /dev/null +++ b/usr.bin/logger/logger.desc @@ -0,0 +1,9 @@ +Name: logger +Version: 1.0 (23 Jun 98) +Shell: GNO +Author: Ported by Devin Reade. +Contact: gdr@trenco.gno.org +Where: /usr/bin +FTP: ftp.gno.org + +Log messages to system log files via syslog(3) interface. diff --git a/usr.bin/logger/logger.rez b/usr.bin/logger/logger.rez new file mode 100644 index 0000000..74b836a --- /dev/null +++ b/usr.bin/logger/logger.rez @@ -0,0 +1,19 @@ +/* + * $Id: logger.rez,v 1.1 1998/06/23 23:23:55 gdr-ftp Exp $ + */ + +#include "Types.Rez" +#include "/src/gno/build.tools/builddate.rez" + +resource rVersion (0x1, purgeable3, nocrossbank) { + + { 1, 0, 0, /* version 1.0.0 */ + release, /* development|alpha|beta|final|release */ + 0 /* non-final release number */ + }, + verUS, + "logger", + "Log messages to system log files.\n" + "Ported by Devin Reade for GNO v2.0.6\n" + BUILD_DATE +};