to change the citation format string. Unfortunately, the citation string
can only be set once, and effect the entire file. Also, add citation format
9, for printing the entire last name of the principle author.
SCCS-vsn: contrib/bib/src/bib.c 2.3
char huntstr[HUNTSIZE];
{ char rf[REFSIZE], ref[REFSIZE], *r, *hunt();
int i, match(), getwrd();
char huntstr[HUNTSIZE];
{ char rf[REFSIZE], ref[REFSIZE], *r, *hunt();
int i, match(), getwrd();
+ char *realhstr;
+
+ realhstr = huntstr;
+ if (strncmp(huntstr, "$C$", 3) == 0){
+ char *from, *to;
+ for(from = huntstr + 3, to = citetemplate; *from; from++, to++){
+ switch(*from){
+ case '\0':
+ case ' ':
+ case '\n':
+ case '\t': goto outcopy;
+ default: *to = *from;
+ }
+ }
+ outcopy: ;
+ *to = 0;
+ *from = 0;
+ realhstr = from + 1;
+ }
+ r = hunt(realhstr);
if (r != NULL) {
/* exapand defined string */
strcpy(rf, r);
if (r != NULL) {
/* exapand defined string */
strcpy(rf, r);
return(refspos[numrefs]);
}
else {
return(refspos[numrefs]);
}
else {
- bibwarning("no reference matching %s\n", huntstr);
+ bibwarning("no reference matching %s\n", realhstr);