projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bell 32V development
[unix-history]
/
usr
/
src
/
cmd
/
refer
/
hunt8.c
diff --git
a/usr/src/cmd/refer/hunt8.c
b/usr/src/cmd/refer/hunt8.c
index
d33d708
..
c9e9e51
100644
(file)
--- a/
usr/src/cmd/refer/hunt8.c
+++ b/
usr/src/cmd/refer/hunt8.c
@@
-2,6
+2,7
@@
# include "assert.h"
# define unopen(fil) {if (fil!=NULL) {fclose(fil); fil=NULL;}}
extern long indexdate, gdate();
# include "assert.h"
# define unopen(fil) {if (fil!=NULL) {fclose(fil); fil=NULL;}}
extern long indexdate, gdate();
+extern FILE *iopen();
runbib (s)
char *s;
{
runbib (s)
char *s;
{
@@
-13,7
+14,7
@@
system(tmp);
makefgrep(indexname)
char *indexname;
{
makefgrep(indexname)
char *indexname;
{
- FILE *fa
=NULL, *fb =NULL
;
+ FILE *fa
, *fb
;
if (ckexist(indexname, ".ig"))
{
/* existing gfrep -type index */
if (ckexist(indexname, ".ig"))
{
/* existing gfrep -type index */
@@
-24,8
+25,7
@@
makefgrep(indexname)
fb = iopen(indexname, "");
if (gdate(fb)>gdate(fa))
{
fb = iopen(indexname, "");
if (gdate(fb)>gdate(fa))
{
- if (fa!=NULL)
- fclose(fa);
+ fclose(fa);
runbib(indexname);
fa= iopen(indexname, ".ig");
}
runbib(indexname);
fa= iopen(indexname, ".ig");
}
@@
-55,6
+55,7
@@
strcpy (fnam, s);
strcat (fnam, t);
return (access(fnam, 04) != -1);
}
strcat (fnam, t);
return (access(fnam, 04) != -1);
}
+FILE *
iopen (s, t)
char *s, *t;
{
iopen (s, t)
char *s, *t;
{