From cdb35d118cef7a4ec366984eee09299364599519 Mon Sep 17 00:00:00 2001 From: simonb Date: Mon, 31 Jul 2000 11:29:48 +0000 Subject: Don't use __COPYRIGHT/__RCSID macros or err function for host programs - use portable ANSI constructs instead. Patches from Chris Demetriou. --- boggle/mkindex/mkindex.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'boggle') diff --git a/boggle/mkindex/mkindex.c b/boggle/mkindex/mkindex.c index 25d8af98..ef0126ed 100644 --- a/boggle/mkindex/mkindex.c +++ b/boggle/mkindex/mkindex.c @@ -1,4 +1,4 @@ -/* $NetBSD: mkindex.c,v 1.7 1999/12/07 07:47:08 jsm Exp $ */ +/* $NetBSD: mkindex.c,v 1.8 2000/07/31 11:29:48 simonb Exp $ */ /*- * Copyright (c) 1993 @@ -36,28 +36,25 @@ * SUCH DAMAGE. */ -#include #ifndef lint -__COPYRIGHT("@(#) Copyright (c) 1993\n\ - The Regents of the University of California. All rights reserved.\n"); -#endif /* not lint */ +static char copyright[] = "@(#) Copyright (c) 1993\n\ + The Regents of the University of California. All rights reserved.\n"; -#ifndef lint #if 0 static char sccsid[] = "@(#)mkindex.c 8.1 (Berkeley) 6/11/93"; #else -__RCSID("$NetBSD: mkindex.c,v 1.7 1999/12/07 07:47:08 jsm Exp $"); +static char rcsid[] = + "$NetBSD: mkindex.c,v 1.8 2000/07/31 11:29:48 simonb Exp $"; #endif #endif /* not lint */ -#include #include #include #include "bog.h" -int main __P((void)); -char *nextword __P((FILE *, char *, int *, int *)); +int main(void); +char *nextword(FILE *, char *, int *, int *); int main(void) @@ -89,8 +86,10 @@ main(void) for (i = prev + 1; i <= 'z'; i++) printf("%c %6ld %6ld\n", i, off, off - 1); fflush(stdout); - if (ferror(stdout)) - err(1, "writing standard output"); + if (ferror(stdout)) { + perror("error writing standard output"); + exit(1); + } exit(0); } -- cgit v1.2.3-56-ge451