fixed formats on new version so as not to conflict with
authorGary M. Levin <garrison@ucbvax.Berkeley.EDU>
Fri, 7 Oct 1983 09:23:32 +0000 (01:23 -0800)
committerGary M. Levin <garrison@ucbvax.Berkeley.EDU>
Fri, 7 Oct 1983 09:23:32 +0000 (01:23 -0800)
SCCS keywords

SCCS-vsn: contrib/bib/src/invert.c 2.2

usr/src/contrib/bib/src/invert.c

index 1d07cbd..5c771ef 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef lint
 static char sccsid[] = "@(#)invert.c   2.2     %G%";
 #endif not lint
 #ifndef lint
 static char sccsid[] = "@(#)invert.c   2.2     %G%";
 #endif not lint
-
+#
 /*  input:  records of lines, separated by blank lines
     output: key:file1 start/length ... start/length:file2 start/length ...
 */
 /*  input:  records of lines, separated by blank lines
     output: key:file1 start/length ... start/length:file2 start/length ...
 */
@@ -72,7 +72,7 @@ char **arglist;
             records++;
            kcnt= 0;
             length= recsize(input,start);
             records++;
            kcnt= 0;
             length= recsize(input,start);
-            sprintf(tag_line, " %s %ld %ld\n", filename, start, length);
+            sprintf(tag_line, " %s %d %d\n", filename, start, length);
 
             while (ftell(input) < start+length && kcnt < max_kcnt)
             {   getword(input,word,ignore);
 
             while (ftell(input) < start+length && kcnt < max_kcnt)
             {   getword(input,word,ignore);
@@ -93,7 +93,7 @@ char **arglist;
     distinct = shorten(tmpfile,INDEX);
     if( silent == 0 )
        fprintf(stderr,
     distinct = shorten(tmpfile,INDEX);
     if( silent == 0 )
        fprintf(stderr,
-           "%ld documents   %ld distinct keys  %ld key occurrences\n",
+           "%d documents   %d distinct keys  %d key occurrences\n",
            records, distinct, keys);
 }
 
            records, distinct, keys);
 }
 
@@ -159,22 +159,22 @@ char *inf, *outf;
     }
 
     getline(in,line);
     }
 
     getline(in,line);
-    sscanf(line,"%s%s%ld%ld", key, file, &start, &length);
-    fprintf(out, "%s :%s %ld/%ld", key, file, start, length);
+    sscanf(line,"%s%s%d%d", key, file, &start, &length);
+    fprintf(out, "%s :%s %d/%d", key, file, start, length);
     for ( getline(in, line) ; !feof(in);  getline(in, line))
     for ( getline(in, line) ; !feof(in);  getline(in, line))
-    {   sscanf(line,"%s%s%ld%ld", newkey, newfile, &start, &length);
+    {   sscanf(line,"%s%s%d%d", newkey, newfile, &start, &length);
         if (strcmp(key,newkey)!=0)
         {   strcpy(key, newkey);
             strcpy(file, newfile);
         if (strcmp(key,newkey)!=0)
         {   strcpy(key, newkey);
             strcpy(file, newfile);
-            fprintf(out, "\n%s :%s %ld/%ld",  key, file, start, length);
+            fprintf(out, "\n%s :%s %d/%d",  key, file, start, length);
            lines++;
         }
         else if (strcmp(file,newfile)!=0)
         {   strcpy(file,newfile);
            lines++;
         }
         else if (strcmp(file,newfile)!=0)
         {   strcpy(file,newfile);
-            fprintf(out, ":%s %ld/%ld", file, start, length);
+            fprintf(out, ":%s %d/%d", file, start, length);
         }
         else
         }
         else
-            fprintf(out, " %ld/%ld", start, length);
+            fprintf(out, " %d/%d", start, length);
     }
     fprintf(out, "\n");
     lines++;
     }
     fprintf(out, "\n");
     lines++;