bit operations generate longword reference which may reference the
[unix-history] / usr / src / bin / sh / mystring.c
index 557c553..1fc1abd 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)mystring.c 5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)mystring.c 5.2 (Berkeley) %G%";
 #endif /* not lint */
 
 /*
 #endif /* not lint */
 
 /*
@@ -18,8 +18,6 @@ static char sccsid[] = "@(#)mystring.c        5.1 (Berkeley) %G%";
  *     equal(s1, s2)           Return true if strings are equal.
  *     scopy(from, to)         Copy a string.
  *     scopyn(from, to, n)     Like scopy, but checks for overflow.
  *     equal(s1, s2)           Return true if strings are equal.
  *     scopy(from, to)         Copy a string.
  *     scopyn(from, to, n)     Like scopy, but checks for overflow.
- *     strchr(s, c)            Find first occurance of c in s.
- *     bcopy(from, to, n)      Copy a block of memory.
  *     number(s)               Convert a string of digits to an integer.
  *     is_number(s)            Return true if s is a string of digits.
  */
  *     number(s)               Convert a string of digits to an integer.
  *     is_number(s)            Return true if s is a string of digits.
  */
@@ -32,6 +30,14 @@ static char sccsid[] = "@(#)mystring.c       5.1 (Berkeley) %G%";
 
 char nullstr[1];               /* zero length string */
 
 
 char nullstr[1];               /* zero length string */
 
+/*
+ * equal - #defined in mystring.h
+ */
+
+/*
+ * scopy - #defined in mystring.h
+ */
+
 
 /*
  * scopyn - copy a string from "from" to "to", truncating the string
 
 /*
  * scopyn - copy a string from "from" to "to", truncating the string
@@ -54,50 +60,6 @@ scopyn(from, to, size)
 }
 
 
 }
 
 
-/*
- * strchr - find first occurrence of a character in a string.
- */
-
-#ifndef SYS5
-char *
-mystrchr(s, charwanted)
-       char const *s;
-       register char charwanted;
-       {
-       register char const *scan;
-
-       /*
-        * The odd placement of the two tests is so NUL is findable.
-        */
-       for (scan = s ; *scan != charwanted ; ) /* ++ moved down for opt. */
-               if (*scan++ == '\0')
-                       return NULL;
-       return (char *)scan;
-}
-#endif
-
-
-
-/*
- * bcopy - copy bytes
- *
- * This routine was derived from code by Henry Spencer.
- */
-
-void
-mybcopy(src, dst, length)
-       pointer dst;
-       const pointer src;
-       register int length;
-       {
-       register char *d = dst;
-       register char *s = src;
-
-       while (--length >= 0)
-               *d++ = *s++;
-}
-
-
 /*
  * prefix -- see if pfx is a prefix of string.
  */
 /*
  * prefix -- see if pfx is a prefix of string.
  */