/* $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.
{
char *hyphen;
- while ((hyphen = index(str, '-')) != (char *)0)
+ while ((hyphen = strchr(str, '-')) != (char *)0)
(void) strcpy(hyphen, hyphen + 1);
}
char *sbuf, *idnumber, *first, *last;
{
char salt[3];
- extern char *crypt();
RemoveHyphens(idnumber);
salt[0] = tolower(last[0]);