make ANSI C compatible
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Tue, 22 Dec 1987 03:56:51 +0000 (19:56 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Tue, 22 Dec 1987 03:56:51 +0000 (19:56 -0800)
SCCS-vsn: usr.bin/passwd/passwd.c 4.31
SCCS-vsn: lib/libc/gen/getpwnamuid.c 5.3
SCCS-vsn: usr.bin/f77/libI77/rsnmle.c 5.4
SCCS-vsn: old/lex/libln/reject.c 4.2
SCCS-vsn: usr.sbin/lpr/lpc/lpc.c 5.4
SCCS-vsn: usr.sbin/sendmail/src/main.c 5.14

usr/src/lib/libc/gen/getpwnamuid.c
usr/src/old/lex/libln/reject.c
usr/src/usr.bin/f77/libI77/rsnmle.c
usr/src/usr.bin/passwd/passwd.c
usr/src/usr.sbin/lpr/lpc/lpc.c
usr/src/usr.sbin/sendmail/src/main.c

index 8f5c0fe..6d9d93b 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getpwnamuid.c      5.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)getpwnamuid.c      5.3 (Berkeley) %G%";
 #endif LIBC_SCCS and not lint
 
 #include <stdio.h>
 #endif LIBC_SCCS and not lint
 
 #include <stdio.h>
@@ -38,19 +38,19 @@ fetchpw(key)
         cp = key.dptr;
        tp = line;
 
         cp = key.dptr;
        tp = line;
 
-#define        EXPAND(e)       passwd.pw_/**/e = tp; while (*tp++ = *cp++);
-       EXPAND(name);
-       EXPAND(passwd);
+#define        EXPAND(e)       passwd.e = tp; while (*tp++ = *cp++);
+       EXPAND(pw_name);
+       EXPAND(pw_passwd);
        bcopy(cp, (char *)&passwd.pw_uid, sizeof (int));
        cp += sizeof (int);
        bcopy(cp, (char *)&passwd.pw_gid, sizeof (int));
        cp += sizeof (int);
        bcopy(cp, (char *)&passwd.pw_quota, sizeof (int));
        cp += sizeof (int);
        bcopy(cp, (char *)&passwd.pw_uid, sizeof (int));
        cp += sizeof (int);
        bcopy(cp, (char *)&passwd.pw_gid, sizeof (int));
        cp += sizeof (int);
        bcopy(cp, (char *)&passwd.pw_quota, sizeof (int));
        cp += sizeof (int);
-       EXPAND(comment);
-       EXPAND(gecos);
-       EXPAND(dir);
-       EXPAND(shell);
+       EXPAND(pw_comment);
+       EXPAND(pw_gecos);
+       EXPAND(pw_dir);
+       EXPAND(pw_shell);
         return (&passwd);
 }
 
         return (&passwd);
 }
 
index ec47cc1..b52862b 100644 (file)
@@ -1,14 +1,15 @@
-/*     @(#)reject.c    4.1     %G%     */
+/*     @(#)reject.c    4.2     %G%     */
 
 # include <stdio.h>
 
 # include <stdio.h>
-extern struct {int *yyaa, *yybb; int *yystops;} *yylstate [], **yylsp, **yyolsp;
-yyreject ()
-{
 extern FILE *yyout, *yyin;
 extern int yyprevious , *yyfnd;
 extern char yyextra[];
 extern char yytext[];
 extern int yyleng;
 extern FILE *yyout, *yyin;
 extern int yyprevious , *yyfnd;
 extern char yyextra[];
 extern char yytext[];
 extern int yyleng;
+extern struct {int *yyaa, *yybb; int *yystops;} *yylstate [], **yylsp, **yyolsp;
+
+yyreject ()
+{
 for( ; yylsp < yyolsp; yylsp++)
        yytext[yyleng++] = yyinput();
 if (*yyfnd > 0)
 for( ; yylsp < yyolsp; yylsp++)
        yytext[yyleng++] = yyinput();
 if (*yyfnd > 0)
index 242abbb..8141032 100644 (file)
@@ -3,7 +3,7 @@
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
- *     @(#)rsnmle.c    5.3     %G%
+ *     @(#)rsnmle.c    5.4     %G%
  */
 
 /*
  */
 
 /*
@@ -238,7 +238,7 @@ int *subval;
                cnt++;
        }
        UNGETC();
                cnt++;
        }
        UNGETC();
-       if(ch == 'EOF') return EOF;
+       if(ch == EOF) return EOF;
        if(cnt == 0 ) return F_ERNMLIST;
        if(sign== -1) value = -value;
        *subval = value;
        if(cnt == 0 ) return F_ERNMLIST;
        if(sign== -1) value = -value;
        *subval = value;
index 9e4865c..9608e4d 100644 (file)
@@ -11,7 +11,7 @@ char copyright[] =
 #endif not lint
 
 #ifndef lint
 #endif not lint
 
 #ifndef lint
-static char sccsid[] = "@(#)passwd.c   4.30 (Berkeley) %G%";
+static char sccsid[] = "@(#)passwd.c   4.31 (Berkeley) %G%";
 #endif not lint
 
 /*
 #endif not lint
 
 /*
@@ -223,19 +223,19 @@ replace(dp, pwd)
                return;
 
        cp = buf;
                return;
 
        cp = buf;
-#define        COMPACT(e)      tp = pwd->pw_/**/e; while (*cp++ = *tp++);
-       COMPACT(name);
-       COMPACT(passwd);
+#define        COMPACT(e)      tp = pwd->e; while (*cp++ = *tp++);
+       COMPACT(pw_name);
+       COMPACT(pw_passwd);
        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);
        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(shell);
+       COMPACT(pw_comment);
+       COMPACT(pw_gecos);
+       COMPACT(pw_dir);
+       COMPACT(pw_shell);
        content.dptr = buf;
        content.dsize = cp - buf;
        key.dptr = pwd->pw_name;
        content.dptr = buf;
        content.dsize = cp - buf;
        key.dptr = pwd->pw_name;
index f3e62b4..6cfa699 100644 (file)
@@ -11,7 +11,7 @@ char copyright[] =
 #endif not lint
 
 #ifndef lint
 #endif not lint
 
 #ifndef lint
-static char sccsid[] = "@(#)lpc.c      5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)lpc.c      5.4 (Berkeley) %G%";
 #endif not lint
 
 /*
 #endif not lint
 
 /*
@@ -86,8 +86,6 @@ cmdscanner(top)
        int top;
 {
        register struct cmd *c;
        int top;
 {
        register struct cmd *c;
-       extern struct cmd cmdtab[];
-       extern int help();
 
        if (!top)
                putchar('\n');
 
        if (!top)
                putchar('\n');
@@ -119,6 +117,8 @@ cmdscanner(top)
        longjmp(toplevel, 0);
 }
 
        longjmp(toplevel, 0);
 }
 
+extern struct cmd cmdtab[];
+
 struct cmd *
 getcmd(name)
        register char *name;
 struct cmd *
 getcmd(name)
        register char *name;
index a275f0f..ff66842 100644 (file)
@@ -15,7 +15,7 @@ char copyright[] =
 #endif not lint
 
 #ifndef lint
 #endif not lint
 
 #ifndef lint
-static char    SccsId[] = "@(#)main.c  5.13 (Berkeley) %G%";
+static char    SccsId[] = "@(#)main.c  5.14 (Berkeley) %G%";
 #endif not lint
 
 # define  _DEFINE
 #endif not lint
 
 # define  _DEFINE
@@ -927,7 +927,7 @@ thaw(freezefile)
 {
        int f;
        union frz fhdr;
 {
        int f;
        union frz fhdr;
-       extern char edata;
+       extern char edata, end;
        extern char Version[];
        extern caddr_t brk();
 
        extern char Version[];
        extern caddr_t brk();