BSD 4_3_Reno release
[unix-history] / usr / src / usr.sbin / kvm_mkdb / kvm_mkdb.c
index 488f53b..d003350 100644 (file)
@@ -2,7 +2,19 @@
  * Copyright (c) 1990 The Regents of the University of California.
  * All rights reserved.
  *
  * Copyright (c) 1990 The Regents of the University of California.
  * All rights reserved.
  *
- * %sccs.include.redist.c%
+ * Redistribution and use in source and binary forms are permitted provided
+ * that: (1) source distributions retain this entire copyright notice and
+ * comment, and (2) distributions including binaries display the following
+ * acknowledgement:  ``This product includes software developed by the
+ * University of California, Berkeley and its contributors'' in the
+ * documentation or other materials provided with the distribution and in
+ * all advertising materials mentioning features or use of this software.
+ * Neither the name of the University nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
 #ifndef lint
  */
 
 #ifndef lint
@@ -12,7 +24,7 @@ char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)kvm_mkdb.c 5.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)kvm_mkdb.c 5.5 (Berkeley) 6/25/90";
 #endif /* not lint */
 
 #include <sys/param.h>
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -29,7 +41,6 @@ static char sccsid[] = "@(#)kvm_mkdb.c        5.4 (Berkeley) %G%";
 char *tmp;
 #define basename(cp)   ((tmp=rindex((cp), '/')) ? tmp+1 : (cp))
 #define USAGE  "kvm_mkdb"
 char *tmp;
 #define basename(cp)   ((tmp=rindex((cp), '/')) ? tmp+1 : (cp))
 #define USAGE  "kvm_mkdb"
-extern errno;
 
 char *progname;
 
 
 char *progname;
 
@@ -182,7 +193,7 @@ create_knlist(name, db)
                         * store the value of version in VERSION
                         */
                        datum vers;
                         * store the value of version in VERSION
                         */
                        datum vers;
-                       char versbuf[LINE_MAX];
+                       char versbuf[_BSD_LINE_MAX];
                        long versoff;
                        long reloffset;
 
                        long versoff;
                        long reloffset;
 
@@ -212,7 +223,7 @@ create_knlist(name, db)
                         * Just read version string up to, and
                         * including newline.
                         */
                         * Just read version string up to, and
                         * including newline.
                         */
-                       if (fgets(versbuf, LINE_MAX, fstr) == NULL)
+                       if (fgets(versbuf, _BSD_LINE_MAX, fstr) == NULL)
                                syserrexit("can't read version");
                        strcpy(sbuf+1, "VERSION");
                        key.dsize = (sizeof ("VERSION") - 1) + 1;
                                syserrexit("can't read version");
                        strcpy(sbuf+1, "VERSION");
                        key.dsize = (sizeof ("VERSION") - 1) + 1;