keep string.h and source in sync
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Fri, 18 May 1990 03:05:49 +0000 (19:05 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Fri, 18 May 1990 03:05:49 +0000 (19:05 -0800)
SCCS-vsn: lib/libc/string/ffs.c 5.4
SCCS-vsn: lib/libc/string/rindex.c 5.6
SCCS-vsn: lib/libc/string/strcat.c 5.4
SCCS-vsn: lib/libc/string/strcpy.c 5.5
SCCS-vsn: lib/libc/string/strdup.c 5.2
SCCS-vsn: lib/libc/string/strerror.c 5.2
SCCS-vsn: lib/libc/string/strftime.c 5.7
SCCS-vsn: lib/libc/string/strmode.c 5.2
SCCS-vsn: lib/libc/string/strspn.c 5.5
SCCS-vsn: lib/libc/string/strtok.c 5.6
SCCS-vsn: lib/libc/string/swab.c 5.5

usr/src/lib/libc/string/ffs.c
usr/src/lib/libc/string/rindex.c
usr/src/lib/libc/string/strcat.c
usr/src/lib/libc/string/strcpy.c
usr/src/lib/libc/string/strdup.c
usr/src/lib/libc/string/strerror.c
usr/src/lib/libc/string/strftime.c
usr/src/lib/libc/string/strmode.c
usr/src/lib/libc/string/strspn.c
usr/src/lib/libc/string/strtok.c
usr/src/lib/libc/string/swab.c

index 5fa3f9d..8497e57 100644 (file)
@@ -6,9 +6,11 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)ffs.c      5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)ffs.c      5.4 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 #endif /* LIBC_SCCS and not lint */
 
+#include <string.h>
+
 /*
  * ffs -- vax ffs instruction
  */
 /*
  * ffs -- vax ffs instruction
  */
index c9abfd4..72e3199 100644 (file)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)rindex.c   5.5 (Berkeley) %G%";
+static char sccsid[] = "@(#)rindex.c   5.6 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 #include <stddef.h>
 #endif /* LIBC_SCCS and not lint */
 
 #include <stddef.h>
+#include <string.h>
 
 char *
 rindex(p, ch)
 
 char *
 rindex(p, ch)
index 6cb778f..ea2aa0d 100644 (file)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)strcat.c   5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)strcat.c   5.4 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 #endif /* LIBC_SCCS and not lint */
 
+#include <string.h>
+
 char *
 strcat(s, append)
        register char *s, *append;
 char *
 strcat(s, append)
        register char *s, *append;
index 3b39498..85b47ae 100644 (file)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)strcpy.c   5.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)strcpy.c   5.5 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 #endif /* LIBC_SCCS and not lint */
 
+#include <string.h>
+
 char *
 strcpy(to, from)
        register char *to, *from;
 char *
 strcpy(to, from)
        register char *to, *from;
index b479186..e876f7f 100644 (file)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)strdup.c   5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)strdup.c   5.2 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
-#include <stdio.h>
+#include <stddef.h>
+#include <string.h>
+
 
 char *
 strdup(str)
 
 char *
 strdup(str)
index 41ad66b..b1cf6e2 100644 (file)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)strerror.c 5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)strerror.c 5.2 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 #endif /* LIBC_SCCS and not lint */
 
+#include <string.h>
+
 char *
 strerror(errnum)
        int errnum;
 char *
 strerror(errnum)
        int errnum;
index 6daa2cb..bcfc490 100644 (file)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)strftime.c 5.6 (Berkeley) %G%";
+static char sccsid[] = "@(#)strftime.c 5.7 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
 #include <sys/time.h>
 #include <tzfile.h>
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
 #include <sys/time.h>
 #include <tzfile.h>
+#include <string.h>
 
 static char *afmt[] = {
        "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat",
 
 static char *afmt[] = {
        "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat",
index 1f3e927..3495dc2 100644 (file)
@@ -6,12 +6,14 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)strmode.c  5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)strmode.c  5.2 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
 #include <sys/stat.h>
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
 #include <sys/stat.h>
+#include <string.h>
 
 
+void
 strmode(mode, p)
        register mode_t mode;
        register char *p;
 strmode(mode, p)
        register mode_t mode;
        register char *p;
@@ -117,5 +119,4 @@ strmode(mode, p)
        }
        *p++ = ' ';             /* will be a '+' if ACL's implemented */
        *p = '\0';
        }
        *p++ = ' ';             /* will be a '+' if ACL's implemented */
        *p = '\0';
-       return(0);
 }
 }
index 2b9b86b..0811894 100644 (file)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)strspn.c   5.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)strspn.c   5.5 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 #endif /* LIBC_SCCS and not lint */
 
+#include <string.h>
+
 strspn(s, set)
        register char *s, *set;
 {
 strspn(s, set)
        register char *s, *set;
 {
index 9dc736d..70b89b9 100644 (file)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)strtok.c   5.5 (Berkeley) %G%";
+static char sccsid[] = "@(#)strtok.c   5.6 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 #endif /* LIBC_SCCS and not lint */
 
-#include <stdio.h>
+#include <stddef.h>
+#include <string.h>
 
 char *
 strtok(s, delim)
 
 char *
 strtok(s, delim)
index 65b1d09..1a4f15d 100644 (file)
@@ -2,6 +2,9 @@
  * Copyright (c) 1988 Regents of the University of California.
  * All rights reserved.
  *
  * Copyright (c) 1988 Regents of the University of California.
  * All rights reserved.
  *
+ * This code is derived from software contributed to Berkeley by
+ * Jeffrey Mogul.
+ *
  * Redistribution and use in source and binary forms are permitted
  * provided that the above copyright notice and this paragraph are
  * duplicated in all such forms and that any documentation,
  * Redistribution and use in source and binary forms are permitted
  * provided that the above copyright notice and this paragraph are
  * duplicated in all such forms and that any documentation,
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)swab.c     5.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)swab.c     5.5 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 #endif /* LIBC_SCCS and not lint */
 
-/*
- * Swab bytes
- * Jeffrey Mogul, Stanford
- */
+#include <string.h>
 
 
+void
 swab(from, to, n)
        register char *from, *to;
        register int n;
 swab(from, to, n)
        register char *from, *to;
        register int n;