]> andersk Git - moira.git/blobdiff - lib/idno.c
POSIX, ANSI, sanity fixes
[moira.git] / lib / idno.c
index 7d11372c4a31bf69f6c6f59eef797a6a6c5e06b6..e98222a62b4d1a2e39d4abe36c7d9fc752b1d19d 100644 (file)
@@ -1,11 +1,21 @@
 /* $Header$
  *
  * Routines to encrypt ID's
+ *
+ *  (c) Copyright 1988 by the Massachusetts Institute of Technology.
+ *  For copying and distribution information, please see the file
+ *  <mit-copyright.h>.
  */
 
-#include <strings.h>
+#include <mit-copyright.h>
+#include <string.h>
 #include <ctype.h>
-
+#ifdef POSIX
+#include <unistd.h>
+#endif
+#ifdef USE_CRYPT_H
+#include <crypt.h>
+#endif
 
 /*     Function Name: RemoveHyphens
  *     Description: Removes all hyphens from the string passed to it.
@@ -19,7 +29,7 @@ char *str;
 {
     char *hyphen;
 
-    while ((hyphen = index(str, '-')) != (char *)0)
+    while ((hyphen = strchr(str, '-')) != (char *)0)
        (void) strcpy(hyphen, hyphen + 1);
 }
 
@@ -37,7 +47,6 @@ EncryptID(sbuf, idnumber, first, last)
 char *sbuf, *idnumber, *first, *last;
 {
     char salt[3];
-    extern char *crypt();
 
     RemoveHyphens(idnumber);
     salt[0] = tolower(last[0]);
This page took 0.092655 seconds and 4 git commands to generate.