restore keywords
[unix-history] / usr / src / old / mkpasswd / mkpasswd.c
index c7717a7..a3fe0f3 100644 (file)
@@ -1,6 +1,18 @@
+/*
+ * Copyright (c) 1983 Regents of the University of California.
+ * All rights reserved.  The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ */
+
+#ifndef lint
+char copyright[] =
+"@(#) Copyright (c) 1980 Regents of the University of California.\n\
+ All rights reserved.\n";
+#endif not lint
+
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)mkpasswd.c  4.5 (Berkeley) 84/10/26";
-#endif
+static char sccsid[] = "@(#)mkpasswd.c 5.1 (Berkeley) %G%";
+#endif not lint
 
 #include <sys/file.h>
 #include <stdio.h>
 
 #include <sys/file.h>
 #include <stdio.h>
@@ -46,9 +58,12 @@ main(argc, argv)
 #define        COMPACT(e)      tp = pwd->pw_/**/e; while (*cp++ = *tp++);
                COMPACT(name);
                COMPACT(passwd);
 #define        COMPACT(e)      tp = pwd->pw_/**/e; while (*cp++ = *tp++);
                COMPACT(name);
                COMPACT(passwd);
-               *(int *)cp = pwd->pw_uid; cp += sizeof (int);
-               *(int *)cp = pwd->pw_gid; cp += sizeof (int);
-               *(int *)cp = pwd->pw_quota; cp += sizeof (int);
+               bcopy((char *)&pwd->pw_uid, cp, sizeof (int));
+               cp += sizeof (int);
+               bcopy((char *)&pwd->pw_gid, cp, sizeof (int));
+               cp += sizeof (int);
+               bcopy((char *)&pwd->pw_quota, cp, sizeof (int));
+               cp += sizeof (int);
                COMPACT(comment);
                COMPACT(gecos);
                COMPACT(dir);
                COMPACT(comment);
                COMPACT(gecos);
                COMPACT(dir);