length of key argument can be set with -k in command line.
authorGary M. Levin <garrison@ucbvax.Berkeley.EDU>
Mon, 10 Jun 1985 21:17:10 +0000 (13:17 -0800)
committerGary M. Levin <garrison@ucbvax.Berkeley.EDU>
Mon, 10 Jun 1985 21:17:10 +0000 (13:17 -0800)
SCCS-vsn: contrib/bib/src/bib.c 2.8

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

index 7d0c9df..7321f56 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)bib.c      2.7     %G%";
+static char sccsid[] = "@(#)bib.c      2.8     %G%";
 #endif not lint
 /*
         Bib - bibliographic formatter
 #endif not lint
 /*
         Bib - bibliographic formatter
@@ -46,7 +46,7 @@ static char sccsid[] = "@(#)bib.c     2.7     %G%";
    int  findex = false;         /* can we read the file INDEX ?          */
 
 /* global variables in bibargs */
    int  findex = false;         /* can we read the file INDEX ?          */
 
 /* global variables in bibargs */
-   extern int foot, doacite, sort, personal;
+   extern int foot, doacite, sort, max_klen, personal;
    extern int hyphen, ordcite, biblineno;
    extern char sortstr[], pfile[], citetemplate[], bibfname[];
 
    extern int hyphen, ordcite, biblineno;
    extern char sortstr[], pfile[], citetemplate[], bibfname[];
 
@@ -368,7 +368,7 @@ struct refinfo *refssearch(rf)
    char file[], huntstr[];
 {  char *p, *r, *locate();
 
    char file[], huntstr[];
 {  char *p, *r, *locate();
 
-   r = locate(huntstr, file, 6, common);
+   r = locate(huntstr, file, max_klen, common);
 
    if (r == NULL)
       return(NULL);  /* error */
 
    if (r == NULL)
       return(NULL);  /* error */
@@ -416,8 +416,8 @@ int  fn, footrefs[];
         */
 
        ncites = 0;
         */
 
        ncites = 0;
-       neg = 1;
        do {
        do {
+               neg = 1;
                n = 0;
                do{
                        getch(c, ifd);
                n = 0;
                do{
                        getch(c, ifd);