Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/bin/sh host program portability: don't use <sys/cdefs.h>, __...



details:   https://anonhg.NetBSD.org/src/rev/a58834d66a56
branches:  trunk
changeset: 494969:a58834d66a56
user:      cgd <cgd%NetBSD.org@localhost>
date:      Tue Jul 18 19:13:20 2000 +0000

description:
host program portability: don't use <sys/cdefs.h>, __COPYRIGHT(),
__RCSID(), or __P().  (these programs have been de-__P()'d.)
Repeat after me: "Not all cross-compilation host systems are NetBSD."

diffstat:

 bin/sh/mkinit.c   |  42 +++++++++++++++++++++---------------------
 bin/sh/mknodes.c  |  35 ++++++++++++++++++-----------------
 bin/sh/mksyntax.c |  25 +++++++++++++------------
 3 files changed, 52 insertions(+), 50 deletions(-)

diffs (193 lines):

diff -r f15ed99d6108 -r a58834d66a56 bin/sh/mkinit.c
--- a/bin/sh/mkinit.c   Tue Jul 18 15:59:24 2000 +0000
+++ b/bin/sh/mkinit.c   Tue Jul 18 19:13:20 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mkinit.c,v 1.19 1998/07/28 11:41:56 mycroft Exp $      */
+/*     $NetBSD: mkinit.c,v 1.20 2000/07/18 19:13:20 cgd Exp $  */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -36,17 +36,18 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #ifndef lint
-__COPYRIGHT("@(#) Copyright (c) 1991, 1993\n\
-       The Regents of the University of California.  All rights reserved.\n");
+static const char copyright[] =
+    "@(#) Copyright (c) 1991, 1993\n\
+       The Regents of the University of California.  All rights reserved.\n";
 #endif /* not lint */
 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)mkinit.c   8.2 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: mkinit.c,v 1.19 1998/07/28 11:41:56 mycroft Exp $");
+static const char rcsid[] =
+    "$NetBSD: mkinit.c,v 1.20 2000/07/18 19:13:20 cgd Exp $";
 #endif
 #endif /* not lint */
 
@@ -61,7 +62,6 @@
  */
 
 
-#include <sys/cdefs.h>
 #include <sys/types.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -153,21 +153,21 @@
 int amiddecls;                         /* for formatting */
 
 
-void readfile __P((char *));
-int match __P((char *, char *));
-int gooddefine __P((char *));
-void doevent __P((struct event *, FILE *, char *));
-void doinclude __P((char *));
-void dodecl __P((char *, FILE *));
-void output __P((void));
-void addstr __P((char *, struct text *));
-void addchar __P((int, struct text *));
-void writetext __P((struct text *, FILE *));
-FILE *ckfopen __P((char *, char *));
-void *ckmalloc __P((int));
-char *savestr __P((char *));
-void error __P((char *));
-int main __P((int, char **));
+void readfile(char *);
+int match(char *, char *);
+int gooddefine(char *);
+void doevent(struct event *, FILE *, char *);
+void doinclude(char *);
+void dodecl(char *, FILE *);
+void output(void);
+void addstr(char *, struct text *);
+void addchar(int, struct text *);
+void writetext(struct text *, FILE *);
+FILE *ckfopen(char *, char *);
+void *ckmalloc(int);
+char *savestr(char *);
+void error(char *);
+int main(int, char **);
 
 #define equal(s1, s2)  (strcmp(s1, s2) == 0)
 
diff -r f15ed99d6108 -r a58834d66a56 bin/sh/mknodes.c
--- a/bin/sh/mknodes.c  Tue Jul 18 15:59:24 2000 +0000
+++ b/bin/sh/mknodes.c  Tue Jul 18 19:13:20 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mknodes.c,v 1.16 1998/07/28 05:31:28 mycroft Exp $     */
+/*     $NetBSD: mknodes.c,v 1.17 2000/07/18 19:13:20 cgd Exp $ */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -36,17 +36,18 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #ifndef lint
-__COPYRIGHT("@(#) Copyright (c) 1991, 1993\n\
-       The Regents of the University of California.  All rights reserved.\n");
+static const char copyright[] =
+    "@(#) Copyright (c) 1991, 1993\n\
+       The Regents of the University of California.  All rights reserved.\n";
 #endif /* not lint */
 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)mknodes.c  8.2 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: mknodes.c,v 1.16 1998/07/28 05:31:28 mycroft Exp $");
+static const char rcsid[] =
+    "$NetBSD: mknodes.c,v 1.17 2000/07/18 19:13:20 cgd Exp $";
 #endif
 #endif /* not lint */
 
@@ -104,18 +105,18 @@
 static int linno;
 static char *linep;
 
-static void parsenode __P((void));
-static void parsefield __P((void));
-static void output __P((char *));
-static void outsizes __P((FILE *));
-static void outfunc __P((FILE *, int));
-static void indent __P((int, FILE *));
-static int nextfield __P((char *));
-static void skipbl __P((void));
-static int readline __P((void));
-static void error __P((const char *, ...));
-static char *savestr __P((const char *));
-int main __P((int, char **));
+static void parsenode(void);
+static void parsefield(void);
+static void output(char *);
+static void outsizes(FILE *);
+static void outfunc(FILE *, int);
+static void indent(int, FILE *);
+static int nextfield(char *);
+static void skipbl(void);
+static int readline(void);
+static void error(const char *, ...);
+static char *savestr(const char *);
+int main(int, char **);
 
 
 int
diff -r f15ed99d6108 -r a58834d66a56 bin/sh/mksyntax.c
--- a/bin/sh/mksyntax.c Tue Jul 18 15:59:24 2000 +0000
+++ b/bin/sh/mksyntax.c Tue Jul 18 19:13:20 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mksyntax.c,v 1.22 1999/03/08 17:55:20 castor Exp $     */
+/*     $NetBSD: mksyntax.c,v 1.23 2000/07/18 19:13:21 cgd Exp $        */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -36,17 +36,18 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #ifndef lint
-__COPYRIGHT("@(#) Copyright (c) 1991, 1993\n\
-       The Regents of the University of California.  All rights reserved.\n");
+static const char copyright[] =
+    "@(#) Copyright (c) 1991, 1993\n\
+       The Regents of the University of California.  All rights reserved.\n";
 #endif /* not lint */
 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)mksyntax.c 8.2 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: mksyntax.c,v 1.22 1999/03/08 17:55:20 castor Exp $");
+static const char rcsid[] =
+    "$NetBSD: mksyntax.c,v 1.23 2000/07/18 19:13:21 cgd Exp $";
 #endif
 #endif /* not lint */
 
@@ -113,13 +114,13 @@
 static int nbits;      /* number of bits in a character */
 static int digit_contig;/* true if digits are contiguous */
 
-static void filltable __P((char *));
-static void init __P((void));
-static void add __P((char *, char *));
-static void print __P((char *));
-static void output_type_macros __P((void));
-static void digit_convert __P((void));
-int main __P((int, char **));
+static void filltable(char *);
+static void init(void);
+static void add(char *, char *);
+static void print(char *);
+static void output_type_macros(void);
+static void digit_convert(void);
+int main(int, char **);
 
 int
 main(argc, argv)



Home | Main Index | Thread Index | Old Index