BSD 4_4 release
[unix-history] / usr / src / old / refer / refer / glue5.c
index 5c02a5b..41dcdd8 100644 (file)
@@ -1,6 +1,12 @@
+/*-
+ * This module is believed to contain source code proprietary to AT&T.
+ * Use and redistribution is subject to the Berkeley Software License
+ * Agreement and your Software Agreement with AT&T (Western Electric).
+ */
+
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)glue5.c     4.1 (Berkeley) %G%";
-#endif
+static char sccsid[] = "@(#)glue5.c    4.3 (Berkeley) 4/18/91";
+#endif /* not lint */
 
 #include <stdio.h>
 #include <ctype.h>
 
 #include <stdio.h>
 #include <ctype.h>
@@ -38,10 +44,11 @@ static int flag = 0;
 fgrep(argc, argv)
 char **argv;
 {
 fgrep(argc, argv)
 char **argv;
 {
-       instr = nsucc = need = inct = rflag = numwords = nfound = 0;
+       nsucc = need = inct = rflag = numwords = nfound = 0;
+       instr = 0;
        flag = 0;
        if (www==0)
        flag = 0;
        if (www==0)
-               www = zalloc(MAXSIZ, sizeof (*www));
+               www = (struct words *) zalloc(MAXSIZ, sizeof (*www));
        if (www==NULL)
                err("Can't get space for machines", 0);
        for (q=www; q<www+MAXSIZ; q++) {
        if (www==NULL)
                err("Can't get space for machines", 0);
        for (q=www; q<www+MAXSIZ; q++) {
@@ -57,12 +64,12 @@ char **argv;
                                rflag++;
                                break;
                        case 'n': /* number of answers needed */
                                rflag++;
                                break;
                        case 'n': /* number of answers needed */
-                               need = xargv[1];
+                               need = (int) xargv[1];
                                xargv++; xargc--;
                                break;
                        case 'i':
                                instr = xargv[1];
                                xargv++; xargc--;
                                break;
                        case 'i':
                                instr = xargv[1];
-                               inct = xargv[2]+2;
+                               inct = (int) xargv[2]+2;
 # if D2
 fprintf(stderr,"inct %d xargv.2. %o %d\n",inct, xargv[2],xargv[2]);
 # endif
 # if D2
 fprintf(stderr,"inct %d xargv.2. %o %d\n",inct, xargv[2],xargv[2]);
 # endif