Index: harvest/ChangeLog
diff -c harvest/ChangeLog:2.36 harvest/ChangeLog:2.39
*** harvest/ChangeLog:2.36	Tue Nov  4 13:14:11 1997
--- harvest/ChangeLog	Thu Dec 11 11:14:31 1997
***************
*** 1,4 ****
--- 1,18 ----
  Changes in current version
+ 	- Fixes to sys_errlist definitions for Linux compatibility (Tim Riker)
+ 	- Fixed local file handling so that it doesn't hang if it tries to
+ 	  access a "special" file (Simon Wilkinson)
+ 	- Fixes for glimpse internationalization - ISO_CHAR_SET has to
+           be not only defined, but be non-zero (Marjan Erzen)
+ 	- Added status code logging to liburl, so failed requests are 
+ 	  logged with the reason for failure (Marjan Erzen)
+ 	- Altered robots.txt code, so that an empty User-Agent exists 
+ 	  every one may collect data (Marjan Erzen)
+ 	- Fixed gather.c so that it will compile with Sun's CC, and so
+ 	  it doesn't redefine existing code (Marjan Erzen)
+ 	- Added a new admin command to the Broker - 'parse-template'
+ 	  which will add a SOIF stream to the broker (Marjan Erzen)
+ 	- Added a command line md5 tool (Marjan Erzen)
   	- Altered Makefiles so that objects can be built outside of the
  	  current source directory when using a make that supports VPATH
  	  - such as gnumake. (Simon Wilkinson)
Index: harvest/components/broker/standard/WWW/DisplayObject.c
diff -c harvest/components/broker/standard/WWW/DisplayObject.c:2.3 harvest/components/broker/standard/WWW/DisplayObject.c:2.4
*** harvest/components/broker/standard/WWW/DisplayObject.c:2.3	Tue Aug 26 11:04:47 1997
--- harvest/components/broker/standard/WWW/DisplayObject.c	Thu Dec 11 11:14:33 1997
***************
*** 1,4 ****
! static char rcsid[] = "DisplayObject.c,v 2.3 1997/08/26 15:04:47 sxw Exp";
  /*
   *  DisplayObject.c - httpd-based CGI program that HTML-ifies a
   *  SOIF Object for clients.
--- 1,4 ----
! static char rcsid[] = "DisplayObject.c,v 2.4 1997/12/11 16:14:33 sxw Exp";
  /*
   *  DisplayObject.c - httpd-based CGI program that HTML-ifies a
   *  SOIF Object for clients.
***************
*** 215,221 ****
  int n;
  {
  	extern int sys_nerr;
! #if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__bsdi__)
  	extern char *sys_errlist[];
  #endif
  
--- 215,221 ----
  int n;
  {
  	extern int sys_nerr;
! #if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__bsdi__) && !defined(__linux__)
  	extern char *sys_errlist[];
  #endif
  
Index: harvest/components/broker/standard/glimpse/main.c
diff -c harvest/components/broker/standard/glimpse/main.c:2.0 harvest/components/broker/standard/glimpse/main.c:2.1
*** harvest/components/broker/standard/glimpse/main.c:2.0	Sun Mar 16 16:57:40 1997
--- harvest/components/broker/standard/glimpse/main.c	Wed Nov 26 13:33:41 1997
***************
*** 3112,3118 ****
  	char	*outfile;
  	ParseTree *GParse;
  	CHAR	GD_pattern[];
! 	int	GD_length[];
  	int	GOUTTAIL;
  	FILE	*nullfp;
  	int	num_attr;
--- 3112,3118 ----
  	char	*outfile;
  	ParseTree *GParse;
  	CHAR	GD_pattern[];
! 	int	GD_length;
  	int	GOUTTAIL;
  	FILE	*nullfp;
  	int	num_attr;
Index: harvest/components/broker/standard/glimpse/agrep/Makefile.in
diff -c harvest/components/broker/standard/glimpse/agrep/Makefile.in:2.0 harvest/components/broker/standard/glimpse/agrep/Makefile.in:2.1
*** harvest/components/broker/standard/glimpse/agrep/Makefile.in:2.0	Sun Mar 16 16:57:47 1997
--- harvest/components/broker/standard/glimpse/agrep/Makefile.in	Fri Nov 21 12:38:08 1997
***************
*** 29,35 ****
  TCOMPSRC      = $(srcdir)/../compress
  TEMPLATESRC   = ../../../../../src/common
  
! CFLAGS = @CFLAGS@ -O -DDOTCOMPRESSED=0 -DISO_CHAR_SET -I$(TEMPLATESRC)/include
  ALL_CFLAGS    = $(CFLAGS) $(DEFS)
  LINKFLAGS	= @LINKFLAGS@ -I$(INDEXSRC) -I$(AGREPSRC) -I$(TEMPLATESRC)/include
  
--- 29,35 ----
  TCOMPSRC      = $(srcdir)/../compress
  TEMPLATESRC   = ../../../../../src/common
  
! CFLAGS = @CFLAGS@ -O -DDOTCOMPRESSED=0 -DISO_CHAR_SET=1 -I$(TEMPLATESRC)/include
  ALL_CFLAGS    = $(CFLAGS) $(DEFS)
  LINKFLAGS	= @LINKFLAGS@ -I$(INDEXSRC) -I$(AGREPSRC) -I$(TEMPLATESRC)/include
  
Index: harvest/components/broker/standard/glimpse/index/Makefile.in
diff -c harvest/components/broker/standard/glimpse/index/Makefile.in:2.1 harvest/components/broker/standard/glimpse/index/Makefile.in:2.2
*** harvest/components/broker/standard/glimpse/index/Makefile.in:2.1	Tue Nov  4 13:14:42 1997
--- harvest/components/broker/standard/glimpse/index/Makefile.in	Fri Nov 21 12:38:09 1997
***************
*** 40,46 ****
  INCLUDE		= -I$(AGREPSRC) -I$(srcdir)/$(TEMPLATESRC)/include \
  		  -I$(TEMPLATESRC)/include
  
! CFLAGS = @CFLAGS@ -O -DSTRUCTURED_QUERIES=1 -DISO_CHAR_SET $(DEBUG_TOP)
  ALL_CFLAGS    = $(CFLAGS) $(DEFS) $(INCLUDE)
  LINKFLAGS	= @LINKFLAGS@ -I$(INDEXSRC) -I$(AGREPSRC) -I$(TEMPLATESRC)/include
  
--- 40,46 ----
  INCLUDE		= -I$(AGREPSRC) -I$(srcdir)/$(TEMPLATESRC)/include \
  		  -I$(TEMPLATESRC)/include
  
! CFLAGS = @CFLAGS@ -O -DSTRUCTURED_QUERIES=1 -DISO_CHAR_SET=1 $(DEBUG_TOP)
  ALL_CFLAGS    = $(CFLAGS) $(DEFS) $(INCLUDE)
  LINKFLAGS	= @LINKFLAGS@ -I$(INDEXSRC) -I$(AGREPSRC) -I$(TEMPLATESRC)/include
  
Index: harvest/components/broker/standard/glimpse/index/io.c
diff -c harvest/components/broker/standard/glimpse/index/io.c:2.0 harvest/components/broker/standard/glimpse/index/io.c:2.1
*** harvest/components/broker/standard/glimpse/index/io.c:2.0	Sun Mar 16 16:59:44 1997
--- harvest/components/broker/standard/glimpse/index/io.c	Wed Nov 26 13:33:44 1997
***************
*** 495,500 ****
--- 495,502 ----
      char *s;
      static int i=100;
  
+     if (len==0) len=1;
+ 
      if ((s = malloc(len)) != NULL) memory_usage += len;
      else fprintf(stderr, "malloc failed after memory_usage = %x Bytes\n", memory_usage);
      /* Don't exit since might do traverse here: exit in glimpse though */
Index: harvest/components/broker/swish/merge.c
diff -c harvest/components/broker/swish/merge.c:1.2 harvest/components/broker/swish/merge.c:1.3
*** harvest/components/broker/swish/merge.c:1.2	Fri Oct 31 11:28:18 1997
--- harvest/components/broker/swish/merge.c	Fri Nov 21 12:36:09 1997
***************
*** 38,53 ****
  	FILE *fp1, *fp2, *fp3;
  	struct metaMergeEntry *metaFile1, *metaFile2;
  
- 	initindexfilehashlist();
- 
  	/* remapVar is used into addindexfilelist and need to be
  	** initialized each time two indexes are merged.
  	*/
  	remapVar = 0;
  	metaFile1 = metaFile2 = NULL;
  
- 	initmapentrylist();
- 
  	if ((fp1 = fopen(file1, "r")) == NULL) {
  		sprintf(errorstr, "Couldn't read the index file \"%s\".",
  		file1);
--- 38,49 ----
***************
*** 99,104 ****
--- 95,103 ----
  
  	if (verbose)
  		printf("\nReading file info...");
+ 
+ 	totalfiles=indexfilenum1+indexfilenum2;
+ /*
  	fseek(fp1, fileinfo1, 0);
  	for (i = 1; i <= indexfilenum1; i++) {
  		fgets(line, MAXSTRLEN, fp1);
***************
*** 109,114 ****
--- 108,114 ----
  		fgets(line, MAXSTRLEN, fp2);
  		addindexfilelist(i + indexfilenum1, line, &totalfiles);
  	}
+ */
  
  	if ((fp3 = fopen(outfile, "w")) == NULL) {
  		sprintf(errorstr,
***************
*** 135,143 ****
  
  	skipwords = 0;
  	while (1) {
! 		if (buffer1 == NULL) {
! 			ip1 = (struct indexentry *) 
! 			  readindexline(fp1, limit1,metaFile1);
  			if (ip1 == NULL) {
  			  if (ip2 == NULL) {
  			    break;
--- 135,142 ----
  
  	skipwords = 0;
  	while (1) {
! 		if (buffer1 == 	NULL) {
! 			ip1 = readindexline(fp1, limit1,metaFile1);
  			if (ip1 == NULL) {
  			  if (ip2 == NULL) {
  			    break;
***************
*** 146,153 ****
  			buffer1 = ip1;
  		}
  		if (buffer2 == NULL) {
! 			ip2 = (struct indexentry *) 
! 			  readindexline(fp2, limit2,metaFile2);
  			if (ip2 == NULL){
  			  if (ip1 == NULL) {
  			    break;
--- 145,151 ----
  			buffer1 = ip1;
  		}
  		if (buffer2 == NULL) {
! 			ip2 = readindexline(fp2, limit2,metaFile2);
  			if (ip2 == NULL){
  			  if (ip1 == NULL) {
  			    break;
***************
*** 164,174 ****
  		else
  		  result = strcmp(ip1->word, ip2->word);
  		if (!result) {
! 			ip3 = (struct indexentry *) mergeindexentries(ip1, ip2);
  			printindexentry(ip3, fp3);
  			freeindexentry(ip1);
  			freeindexentry(ip2);
  			freeindexentry(ip3);
  			buffer1 = buffer2 = NULL;
  			skipwords++;
  		}
--- 162,173 ----
  		else
  		  result = strcmp(ip1->word, ip2->word);
  		if (!result) {
! 			ip3 = mergeindexentries(ip1, ip2);
  			printindexentry(ip3, fp3);
  			freeindexentry(ip1);
  			freeindexentry(ip2);
  			freeindexentry(ip3);
+ 			ip1 = ip2 = ip3 = NULL;
  			buffer1 = buffer2 = NULL;
  			skipwords++;
  		}
***************
*** 176,186 ****
--- 175,187 ----
  			printindexentry(ip1, fp3);
  			freeindexentry(ip1);
  			buffer1 = NULL;
+ 			ip1 = NULL;
  		}
  		else {
  			printindexentry(ip2, fp3);
  			freeindexentry(ip2);
  			buffer2 = NULL;
+ 			ip2 = NULL;
  		}
  	}
  
***************
*** 198,209 ****
  		printf("\nMerging file info... ");
  
  	offsets[FILELISTPOS] = ftell(fp3);
  	for (i = j = 1; i <= indexfilenum1 + indexfilenum2; i++)
  		if (getmap(i) == j) {
  			addtofilehashlist(j++ - 1, ftell(fp3));
  			fprintf(fp3, "%s", lookupindexfilenum(i));
  		}
! 
  	skipfiles = (indexfilenum1 + indexfilenum2) - totalfiles;
  	if (verbose) {
  		if (skipfiles)
--- 199,224 ----
  		printf("\nMerging file info... ");
  
  	offsets[FILELISTPOS] = ftell(fp3);
+ 
+ 	fseek(fp1, fileinfo1, 0);
+ 	for (i= 1; i <= indexfilenum1; i++) {
+ 		addtofilehashlist(i-1, ftell(fp3));
+ 		fgets(line, MAXSTRLEN, fp1);
+ 		fputs(line, fp3);
+ 	}
+ 	fseek(fp2, fileinfo2, 0);
+ 	for (i= 1; i <= indexfilenum2; i++) {
+ 		addtofilehashlist(i+indexfilenum1-1, ftell(fp3));
+ 		fgets(line, MAXSTRLEN, fp2);
+ 		fputs(line, fp3);
+ 	}
+ /*
  	for (i = j = 1; i <= indexfilenum1 + indexfilenum2; i++)
  		if (getmap(i) == j) {
  			addtofilehashlist(j++ - 1, ftell(fp3));
  			fprintf(fp3, "%s", lookupindexfilenum(i));
  		}
! */
  	skipfiles = (indexfilenum1 + indexfilenum2) - totalfiles;
  	if (verbose) {
  		if (skipfiles)
***************
*** 262,269 ****
  
  	rp = ip->result;
  	while (rp != NULL) {
! 		rp->filenum =
! 		encodefilenum(getmap(decodefilenum(rp->filenum) + num));
  		rp = rp->next;
  	}
  }
--- 277,283 ----
  
  	rp = ip->result;
  	while (rp != NULL) {
! 		rp->filenum = encodefilenum(decodefilenum(rp->filenum) + num);
  		rp = rp->next;
  	}
  }
***************
*** 326,333 ****
  				    break;
  				  }
  				}
!                                 rp = (struct resultMerge *)
!                                 addtoresultlistMerge(rp, filenum,
  				rank, attribute);
  				countnum = 1;
                          }
--- 340,346 ----
  				    break;
  				  }
  				}
!                                 rp = addtoresultlistMerge(rp, filenum,
  				rank, attribute);
  				countnum = 1;
                          }
***************
*** 341,452 ****
          return ip;
  }
  
- /* This puts all the file info into a hash table so that it can
- ** be looked up by its pathname and filenumber. This is how
- ** we find redundant file information.
- */
- 
- void addindexfilelist(num, info, totalfiles)
-      int num;
-      char *info;
-      int *totalfiles;
- {
- 	int i;
- 	unsigned hashval;
- 	char tmpstr[MAXSTRLEN], path[MAXSTRLEN];
- 	struct indexfileinfo *ip1, *ip2;
- 
- 	strcpy(path, extractpath(info));
- 
- 	i = lookupindexfilepath(path);
- 	if (i != -1) {
- 		*totalfiles = *totalfiles - 1;
- 		remap(num, i);
- 		return;
- 	}
- 
- 	remap(num, remapVar + 1);
- 	remapVar++;
- 
- 	ip1 = (struct indexfileinfo *) emalloc(sizeof(struct indexfileinfo));
- 	ip1->filenum = num;
- 	ip1->fileinfo = (char *) mystrdup(info);
- 	ip1->path = (char *) mystrdup(path);
- 
- 	sprintf(tmpstr, "%d", num);
- 	hashval = bighash(tmpstr);
- 	ip1->next = indexfilehashlist[hashval];
- 	indexfilehashlist[hashval] = ip1;
- 
- 	ip2 = (struct indexfileinfo *) emalloc(sizeof(struct indexfileinfo));
- 	ip2->filenum = num;
- 	ip2->fileinfo = (char *) mystrdup(info);
- 	ip2->path = (char *) mystrdup(path);
- 
- 	hashval = bighash(path);
- 	ip2->next = indexfilehashlist[hashval];
- 	indexfilehashlist[hashval] = ip2;
- }
- 
- /* This extracts the pathname information from the file information
- ** line as stored in the index file.
- */
- 
- char *extractpath(s)
-      char *s;
- {
- 	int i;
- 	static char path[MAXSTRLEN];
- 
- 	for (i = 0; s[i] && s[i] != '\"'; i++)
- 		path[i] = s[i];
- 	path[i - 1] = '\0';
- 	path[i] = '\0';
- 
- 	return path;
- }
- 
- /* This returns the file information corresponding to a file number.
- */
- 
- char *lookupindexfilenum(num)
-      int num;
- {
- 	unsigned hashval;
- 	char tmpstr[MAXSTRLEN];
- 	struct indexfileinfo *ip;
- 
- 	sprintf(tmpstr, "%d", num);
- 	hashval = bighash(tmpstr);
- 	ip = indexfilehashlist[hashval];
- 
- 	while (ip != NULL) {
- 		if (ip->filenum == num)
- 			return ip->fileinfo;
- 		ip = ip->next;
- 	}
- 	return NULL;
- }
- 
- /* This returns the file number corresponding to a pathname.
- */
- 
- int lookupindexfilepath(path)
-      char *path;
- {
- 	unsigned hashval;
- 	struct indexfileinfo *ip;
- 
- 	hashval = bighash(path);
- 	ip = indexfilehashlist[hashval];
- 
- 	while (ip != NULL) {
- 		if (!strcmp(ip->path, path))
- 			return ip->filenum;
- 		ip = ip->next;
- 	}
- 	return -1;
- }
  
  /* This simply concatenates two information lists that correspond
  ** to a word found in both index files.
--- 354,359 ----
***************
*** 463,475 ****
  	newrp = NULL;
  
  	while (rp1 != NULL) {
! 		newrp = (struct resultMerge *) addtoresultlistMerge(newrp,
! 		rp1->filenum, rp1->rank, rp1->attribute);
  		rp1 = rp1->next;
  	}
  	while (rp2 != NULL) {
! 		newrp = (struct resultMerge *) addtoresultlistMerge(newrp,
! 		rp2->filenum, rp2->rank, rp2->attribute);
  		rp2 = rp2->next;
  	}
  
--- 370,382 ----
  	newrp = NULL;
  
  	while (rp1 != NULL) {
! 		newrp = addtoresultlistMerge(newrp, rp1->filenum, rp1->rank, 
! 					     rp1->attribute);
  		rp1 = rp1->next;
  	}
  	while (rp2 != NULL) {
! 		newrp = addtoresultlistMerge(newrp, rp2->filenum, rp2->rank, 
! 					     rp2->attribute);
  		rp2 = rp2->next;
  	}
  
***************
*** 495,516 ****
  		if ((ip->word)[0] == indexchars[i] && !offsets[i])
  			offsets[i] = ftell(fp);
  	fprintf(fp, "%s:", ip->word);
- 	initmarkentrylistMerge();
  	rp = ip->result;
  	while (rp != NULL) {
  		num = rp->filenum;
  		attribute = rp->attribute;
! 		if (!ismarkedMerge(num,attribute)) {
! 			marknumMerge(num,attribute);
! 			compress(num, fp);
! 			compress(rp->rank, fp);
! 			compress(rp->attribute,fp);
! 		}
  		rp = rp->next;
  	}
  	fputc(0, fp);
  }
  
  /* This associates a number with a new number.
  ** This function is used to remap file numbers from index
  ** files to a new merged index file.
--- 402,420 ----
  		if ((ip->word)[0] == indexchars[i] && !offsets[i])
  			offsets[i] = ftell(fp);
  	fprintf(fp, "%s:", ip->word);
  	rp = ip->result;
  	while (rp != NULL) {
  		num = rp->filenum;
  		attribute = rp->attribute;
! 		compress(num, fp);
! 		compress(rp->rank, fp);
! 		compress(rp->attribute,fp);
  		rp = rp->next;
  	}
  	fputc(0, fp);
  }
  
+ #ifdef NDEF
  /* This associates a number with a new number.
  ** This function is used to remap file numbers from index
  ** files to a new merged index file.
***************
*** 534,542 ****
--- 438,448 ----
  	mapentrylist[hashval] = mp;
  }
  
+ 
  /* This retrieves the number associated with another.
  */
  
+ 
  int getmap(num)
       int num;
  {
***************
*** 555,560 ****
--- 461,468 ----
  	}
  	return num;
  }
+ #endif
+ 
  
  /* This marks a number as having been printed.
  */
***************
*** 575,580 ****
--- 483,489 ----
  	markentrylist[hashval] = mp;
  }
  
+ #ifdef NDEF
  /* Same thing but for merge only */
  void marknumMerge(num, attribute)
       int num;
***************
*** 593,598 ****
--- 502,508 ----
          mp->next = markentrylistMerge[hashval];
          markentrylistMerge[hashval] = mp;
  }      
+ #endif
  
  /* Has a number been printed?
  */
***************
*** 616,622 ****
  	return 0;
  }
  
! 
  int ismarkedMerge(int num,int attribute)
  {
          unsigned hashval;
--- 526,532 ----
  	return 0;
  }
  
! #ifdef NDEF
  int ismarkedMerge(int num,int attribute)
  {
          unsigned hashval;
***************
*** 634,639 ****
--- 544,550 ----
  	      }
          return 0;
        }
+ #endif
  
  /* Initialize the marking list.
  */
***************
*** 651,656 ****
--- 562,568 ----
  	}
  }
  
+ #ifdef NDEF
  void initmarkentrylistMerge()
  {
          int i;
***************
*** 697,703 ****
    }
  }
  
! 
  
  /* Frees up used index entries, my best attempt at memory management...
  ** I still have bytes leaking elsewhere...
--- 609,615 ----
    }
  }
  
! #endif
  
  /* Frees up used index entries, my best attempt at memory management...
  ** I still have bytes leaking elsewhere...
***************
*** 751,756 ****
--- 663,669 ----
  
  	return num;
  }
+ 
  /* Similar to addtoresultlist, but also adding the meta name
  */
  
Index: harvest/components/broker/swish/search.c
diff -c harvest/components/broker/swish/search.c:1.2 harvest/components/broker/swish/search.c:1.3
*** harvest/components/broker/swish/search.c:1.2	Fri Oct 31 11:28:20 1997
--- harvest/components/broker/swish/search.c	Fri Nov 21 12:36:10 1997
***************
*** 646,652 ****
  
  struct result *getfileinfo(char *word, FILE *fp, int attribute)
  {
! 	int i, c, x, countnum, rank = 0, filenum = 0;
          char fileword[MAXWORDLEN];
          struct result *rp;
  
--- 646,652 ----
  
  struct result *getfileinfo(char *word, FILE *fp, int attribute)
  {
! 	int i, c, x, s, countnum, rank = 0, filenum = 0;
          char fileword[MAXWORDLEN];
          struct result *rp;
  
***************
*** 656,663 ****
                  if (c == ':') {
                          fileword[i] = '\0';
  			i = 0;
!                         if (!strcmp(word, fileword))
                                  break;
                          else {
  				while ((c = fgetc(fp)) != 0)
  					;
--- 656,667 ----
                  if (c == ':') {
                          fileword[i] = '\0';
  			i = 0;
! 			s = strcmp(word, fileword);
! 
!                         if (s==0)
                                  break;
+ 			else if (s<0) 
+ 				return NULL;
                          else {
  				while ((c = fgetc(fp)) != 0)
  					;
***************
*** 669,676 ****
  		else
  			fileword[i++] = c;
  	}
! 	if (c == 0)
! 		return NULL;
  
          countnum = 1;
  
--- 673,679 ----
  		else
  			fileword[i++] = c;
  	}
! 	if (c == 0) return NULL;
  
          countnum = 1;
  
***************
*** 870,877 ****
          newnode->filenum = filenum;
          newnode->rank = rank;
          newnode->next = NULL;
- 
- 	printf("Added one\n");
  
          if (rp == NULL)
                  rp = newnode;
--- 873,878 ----
Index: harvest/components/broker/swish/swish_config.h
diff -c harvest/components/broker/swish/swish_config.h:1.2 harvest/components/broker/swish/swish_config.h:1.3
*** harvest/components/broker/swish/swish_config.h:1.2	Fri Oct 31 11:28:25 1997
--- harvest/components/broker/swish/swish_config.h	Fri Nov 21 12:36:11 1997
***************
*** 21,27 ****
  ** permissions to be changed for you, comment out this line.
  */
  
! #define PLIMIT 99
  #define FLIMIT 10000
  
  /* SWISH uses these parameters to automatically mark words as
--- 21,27 ----
  ** permissions to be changed for you, comment out this line.
  */
  
! #define PLIMIT 80
  #define FLIMIT 10000
  
  /* SWISH uses these parameters to automatically mark words as
Index: harvest/src/configure
diff -c harvest/src/configure:2.3 harvest/src/configure:2.4
*** harvest/src/configure:2.3	Mon Sep 22 12:05:06 1997
--- harvest/src/configure	Wed Nov 26 13:33:46 1997
***************
*** 1848,1853 ****
--- 1848,1947 ----
  fi
  
  
+ echo $ac_n "checking for bcopy""... $ac_c" 1>&6
+ echo "configure:1853: checking for bcopy" >&5
+ if eval "test \"`echo '$''{'ac_cv_func_bcopy'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+ #line 1858 "configure"
+ #include "confdefs.h"
+ /* System header to define __stub macros and hopefully few prototypes,
+     which can conflict with char bcopy(); below.  */
+ #include <assert.h>
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ /* We use char because int might match the return type of a gcc2
+     builtin and then its argument prototype would still apply.  */
+ char bcopy();
+ 
+ int main() {
+ 
+ /* The GNU C library defines this for functions which it implements
+     to always fail with ENOSYS.  Some functions are actually named
+     something starting with __ and the normal name is an alias.  */
+ #if defined (__stub_bcopy) || defined (__stub___bcopy)
+ choke me
+ #else
+ bcopy();
+ #endif
+ 
+ ; return 0; }
+ EOF
+ if { (eval echo configure:1881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+   rm -rf conftest*
+   eval "ac_cv_func_bcopy=yes"
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -rf conftest*
+   eval "ac_cv_func_bcopy=no"
+ fi
+ rm -f conftest*
+ fi
+ 
+ if eval "test \"`echo '$ac_cv_func_'bcopy`\" = yes"; then
+   echo "$ac_t""yes" 1>&6
+   :
+ else
+   echo "$ac_t""no" 1>&6
+ NEED_BSD="yes"
+ fi
+ 
+ 
+ if test "$NEED_BSD" = "yes"; then
+    CFLAGS="$CFLAGS -L/usr/ucblib/"
+    echo $ac_n "checking for bcopy in -lucb""... $ac_c" 1>&6
+ echo "configure:1905: checking for bcopy in -lucb" >&5
+ ac_lib_var=`echo ucb'_'bcopy | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   ac_save_LIBS="$LIBS"
+ LIBS="-lucb  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+ #line 1913 "configure"
+ #include "confdefs.h"
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ /* We use char because int might match the return type of a gcc2
+     builtin and then its argument prototype would still apply.  */
+ char bcopy();
+ 
+ int main() {
+ bcopy()
+ ; return 0; }
+ EOF
+ if { (eval echo configure:1924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+   rm -rf conftest*
+   eval "ac_cv_lib_$ac_lib_var=yes"
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -rf conftest*
+   eval "ac_cv_lib_$ac_lib_var=no"
+ fi
+ rm -f conftest*
+ LIBS="$ac_save_LIBS"
+ 
+ fi
+ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+   echo "$ac_t""yes" 1>&6
+   XTRA_LIBS="$XTRA_LIBS -lucb"
+ else
+   echo "$ac_t""no" 1>&6
+ fi
+ 
+ fi
+ 
  for ac_func in bcopy bzero flock fsync ftruncate getcwd getdtablesize \
  	      getrusage lrand48 memmove mktime nice on_exit random rename \
  	      regcomp regexec regfree \
***************
*** 1855,1866 ****
  	      strftime sysconf timegm usleep vfork
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:1859: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1864 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
--- 1949,1960 ----
  	      strftime sysconf timegm usleep vfork
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:1953: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1958 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
***************
*** 1883,1889 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:1887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
--- 1977,1983 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:1981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
***************
*** 1910,1916 ****
  
  
  echo $ac_n "checking for main in -lmalloc""... $ac_c" 1>&6
! echo "configure:1914: checking for main in -lmalloc" >&5
  ac_lib_var=`echo malloc'_'main | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 2004,2010 ----
  
  
  echo $ac_n "checking for main in -lmalloc""... $ac_c" 1>&6
! echo "configure:2008: checking for main in -lmalloc" >&5
  ac_lib_var=`echo malloc'_'main | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 1918,1931 ****
    ac_save_LIBS="$LIBS"
  LIBS="-lmalloc  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 1922 "configure"
  #include "confdefs.h"
  
  int main() {
  main()
  ; return 0; }
  EOF
! if { (eval echo configure:1929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 2012,2025 ----
    ac_save_LIBS="$LIBS"
  LIBS="-lmalloc  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2016 "configure"
  #include "confdefs.h"
  
  int main() {
  main()
  ; return 0; }
  EOF
! if { (eval echo configure:2023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 1947,1953 ****
  
  
  echo $ac_n "checking for main in -lresolv""... $ac_c" 1>&6
! echo "configure:1951: checking for main in -lresolv" >&5
  ac_lib_var=`echo resolv'_'main | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 2041,2047 ----
  
  
  echo $ac_n "checking for main in -lresolv""... $ac_c" 1>&6
! echo "configure:2045: checking for main in -lresolv" >&5
  ac_lib_var=`echo resolv'_'main | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 1955,1968 ****
    ac_save_LIBS="$LIBS"
  LIBS="-lresolv  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 1959 "configure"
  #include "confdefs.h"
  
  int main() {
  main()
  ; return 0; }
  EOF
! if { (eval echo configure:1966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 2049,2062 ----
    ac_save_LIBS="$LIBS"
  LIBS="-lresolv  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2053 "configure"
  #include "confdefs.h"
  
  int main() {
  main()
  ; return 0; }
  EOF
! if { (eval echo configure:2060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 1983,1989 ****
  fi
  
  echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
! echo "configure:1987: checking for main in -lsocket" >&5
  ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 2077,2083 ----
  fi
  
  echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
! echo "configure:2081: checking for main in -lsocket" >&5
  ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 1991,2004 ****
    ac_save_LIBS="$LIBS"
  LIBS="-lsocket  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 1995 "configure"
  #include "confdefs.h"
  
  int main() {
  main()
  ; return 0; }
  EOF
! if { (eval echo configure:2002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 2085,2098 ----
    ac_save_LIBS="$LIBS"
  LIBS="-lsocket  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2089 "configure"
  #include "confdefs.h"
  
  int main() {
  main()
  ; return 0; }
  EOF
! if { (eval echo configure:2096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 2019,2025 ****
  fi
  
  echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
! echo "configure:2023: checking for main in -lnsl" >&5
  ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 2113,2119 ----
  fi
  
  echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
! echo "configure:2117: checking for main in -lnsl" >&5
  ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 2027,2040 ****
    ac_save_LIBS="$LIBS"
  LIBS="-lnsl  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2031 "configure"
  #include "confdefs.h"
  
  int main() {
  main()
  ; return 0; }
  EOF
! if { (eval echo configure:2038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 2121,2134 ----
    ac_save_LIBS="$LIBS"
  LIBS="-lnsl  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2125 "configure"
  #include "confdefs.h"
  
  int main() {
  main()
  ; return 0; }
  EOF
! if { (eval echo configure:2132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 2056,2062 ****
  
  
  echo $ac_n "checking for inet_aton in -l44bsd""... $ac_c" 1>&6
! echo "configure:2060: checking for inet_aton in -l44bsd" >&5
  ac_lib_var=`echo 44bsd'_'inet_aton | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 2150,2156 ----
  
  
  echo $ac_n "checking for inet_aton in -l44bsd""... $ac_c" 1>&6
! echo "configure:2154: checking for inet_aton in -l44bsd" >&5
  ac_lib_var=`echo 44bsd'_'inet_aton | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 2064,2070 ****
    ac_save_LIBS="$LIBS"
  LIBS="-l44bsd  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2068 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
--- 2158,2164 ----
    ac_save_LIBS="$LIBS"
  LIBS="-l44bsd  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2162 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
***************
*** 2075,2081 ****
  inet_aton()
  ; return 0; }
  EOF
! if { (eval echo configure:2079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 2169,2175 ----
  inet_aton()
  ; return 0; }
  EOF
! if { (eval echo configure:2173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 2096,2102 ****
  fi
  
  echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6
! echo "configure:2100: checking for inet_aton in -lresolv" >&5
  ac_lib_var=`echo resolv'_'inet_aton | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 2190,2196 ----
  fi
  
  echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6
! echo "configure:2194: checking for inet_aton in -lresolv" >&5
  ac_lib_var=`echo resolv'_'inet_aton | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 2104,2110 ****
    ac_save_LIBS="$LIBS"
  LIBS="-lresolv  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2108 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
--- 2198,2204 ----
    ac_save_LIBS="$LIBS"
  LIBS="-lresolv  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2202 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
***************
*** 2115,2121 ****
  inet_aton()
  ; return 0; }
  EOF
! if { (eval echo configure:2119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 2209,2215 ----
  inet_aton()
  ; return 0; }
  EOF
! if { (eval echo configure:2213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 2137,2143 ****
  
  
  echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
! echo "configure:2141: checking for crypt in -lcrypt" >&5
  ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 2231,2237 ----
  
  
  echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
! echo "configure:2235: checking for crypt in -lcrypt" >&5
  ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 2145,2151 ****
    ac_save_LIBS="$LIBS"
  LIBS="-lcrypt  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2149 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
--- 2239,2245 ----
    ac_save_LIBS="$LIBS"
  LIBS="-lcrypt  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2243 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
***************
*** 2156,2162 ****
  crypt()
  ; return 0; }
  EOF
! if { (eval echo configure:2160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 2250,2256 ----
  crypt()
  ; return 0; }
  EOF
! if { (eval echo configure:2254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 2178,2184 ****
  
  
  echo $ac_n "checking for main in -ldbm""... $ac_c" 1>&6
! echo "configure:2182: checking for main in -ldbm" >&5
  ac_lib_var=`echo dbm'_'main | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 2272,2278 ----
  
  
  echo $ac_n "checking for main in -ldbm""... $ac_c" 1>&6
! echo "configure:2276: checking for main in -ldbm" >&5
  ac_lib_var=`echo dbm'_'main | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 2186,2199 ****
    ac_save_LIBS="$LIBS"
  LIBS="-ldbm  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2190 "configure"
  #include "confdefs.h"
  
  int main() {
  main()
  ; return 0; }
  EOF
! if { (eval echo configure:2197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 2280,2293 ----
    ac_save_LIBS="$LIBS"
  LIBS="-ldbm  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2284 "configure"
  #include "confdefs.h"
  
  int main() {
  main()
  ; return 0; }
  EOF
! if { (eval echo configure:2291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 2221,2227 ****
  fi
  
  echo $ac_n "checking for main in -lndbm""... $ac_c" 1>&6
! echo "configure:2225: checking for main in -lndbm" >&5
  ac_lib_var=`echo ndbm'_'main | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 2315,2321 ----
  fi
  
  echo $ac_n "checking for main in -lndbm""... $ac_c" 1>&6
! echo "configure:2319: checking for main in -lndbm" >&5
  ac_lib_var=`echo ndbm'_'main | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 2229,2242 ****
    ac_save_LIBS="$LIBS"
  LIBS="-lndbm  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2233 "configure"
  #include "confdefs.h"
  
  int main() {
  main()
  ; return 0; }
  EOF
! if { (eval echo configure:2240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 2323,2336 ----
    ac_save_LIBS="$LIBS"
  LIBS="-lndbm  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2327 "configure"
  #include "confdefs.h"
  
  int main() {
  main()
  ; return 0; }
  EOF
! if { (eval echo configure:2334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 2279,2290 ****
  fi
  
  echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
! echo "configure:2283: checking for st_blksize in struct stat" >&5
  if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2288 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/stat.h>
--- 2373,2384 ----
  fi
  
  echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
! echo "configure:2377: checking for st_blksize in struct stat" >&5
  if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2382 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/stat.h>
***************
*** 2292,2298 ****
  struct stat s; s.st_blksize;
  ; return 0; }
  EOF
! if { (eval echo configure:2296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_struct_st_blksize=yes
  else
--- 2386,2392 ----
  struct stat s; s.st_blksize;
  ; return 0; }
  EOF
! if { (eval echo configure:2390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_struct_st_blksize=yes
  else
***************
*** 2315,2333 ****
  # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
  # for constant arguments.  Useless!
  echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
! echo "configure:2319: checking for working alloca.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2324 "configure"
  #include "confdefs.h"
  #include <alloca.h>
  int main() {
  char *p = alloca(2 * sizeof(int));
  ; return 0; }
  EOF
! if { (eval echo configure:2331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    ac_cv_header_alloca_h=yes
  else
--- 2409,2427 ----
  # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
  # for constant arguments.  Useless!
  echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
! echo "configure:2413: checking for working alloca.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2418 "configure"
  #include "confdefs.h"
  #include <alloca.h>
  int main() {
  char *p = alloca(2 * sizeof(int));
  ; return 0; }
  EOF
! if { (eval echo configure:2425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    ac_cv_header_alloca_h=yes
  else
***************
*** 2348,2359 ****
  fi
  
  echo $ac_n "checking for alloca""... $ac_c" 1>&6
! echo "configure:2352: checking for alloca" >&5
  if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2357 "configure"
  #include "confdefs.h"
  
  #ifdef __GNUC__
--- 2442,2453 ----
  fi
  
  echo $ac_n "checking for alloca""... $ac_c" 1>&6
! echo "configure:2446: checking for alloca" >&5
  if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2451 "configure"
  #include "confdefs.h"
  
  #ifdef __GNUC__
***************
*** 2376,2382 ****
  char *p = (char *) alloca(1);
  ; return 0; }
  EOF
! if { (eval echo configure:2380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    ac_cv_func_alloca_works=yes
  else
--- 2470,2476 ----
  char *p = (char *) alloca(1);
  ; return 0; }
  EOF
! if { (eval echo configure:2474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    ac_cv_func_alloca_works=yes
  else
***************
*** 2408,2419 ****
  
  
  echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
! echo "configure:2412: checking whether alloca needs Cray hooks" >&5
  if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2417 "configure"
  #include "confdefs.h"
  #if defined(CRAY) && ! defined(CRAY2)
  webecray
--- 2502,2513 ----
  
  
  echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
! echo "configure:2506: checking whether alloca needs Cray hooks" >&5
  if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2511 "configure"
  #include "confdefs.h"
  #if defined(CRAY) && ! defined(CRAY2)
  webecray
***************
*** 2438,2449 ****
  if test $ac_cv_os_cray = yes; then
  for ac_func in _getb67 GETB67 getb67; do
    echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:2442: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2447 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
--- 2532,2543 ----
  if test $ac_cv_os_cray = yes; then
  for ac_func in _getb67 GETB67 getb67; do
    echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:2536: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2541 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
***************
*** 2466,2472 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:2470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
--- 2560,2566 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:2564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
***************
*** 2493,2499 ****
  fi
  
  echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
! echo "configure:2497: checking stack direction for C alloca" >&5
  if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 2587,2593 ----
  fi
  
  echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
! echo "configure:2591: checking stack direction for C alloca" >&5
  if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 2501,2507 ****
    ac_cv_c_stack_direction=0
  else
    cat > conftest.$ac_ext <<EOF
! #line 2505 "configure"
  #include "confdefs.h"
  find_stack_direction ()
  {
--- 2595,2601 ----
    ac_cv_c_stack_direction=0
  else
    cat > conftest.$ac_ext <<EOF
! #line 2599 "configure"
  #include "confdefs.h"
  find_stack_direction ()
  {
***************
*** 2520,2526 ****
    exit (find_stack_direction() < 0);
  }
  EOF
! if { (eval echo configure:2524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  then
    ac_cv_c_stack_direction=1
  else
--- 2614,2620 ----
    exit (find_stack_direction() < 0);
  }
  EOF
! if { (eval echo configure:2618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  then
    ac_cv_c_stack_direction=1
  else
***************
*** 2542,2553 ****
  fi
  
  echo $ac_n "checking for off_t""... $ac_c" 1>&6
! echo "configure:2546: checking for off_t" >&5
  if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2551 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #if STDC_HEADERS
--- 2636,2647 ----
  fi
  
  echo $ac_n "checking for off_t""... $ac_c" 1>&6
! echo "configure:2640: checking for off_t" >&5
  if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2645 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #if STDC_HEADERS
***************
*** 2575,2586 ****
  fi
  
  echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
! echo "configure:2579: checking for uid_t in sys/types.h" >&5
  if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2584 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  EOF
--- 2669,2680 ----
  fi
  
  echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
! echo "configure:2673: checking for uid_t in sys/types.h" >&5
  if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2678 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  EOF
Index: harvest/src/configure.in
diff -c harvest/src/configure.in:2.4 harvest/src/configure.in:2.5
*** harvest/src/configure.in:2.4	Mon Sep 22 12:05:08 1997
--- harvest/src/configure.in	Wed Nov 26 13:33:47 1997
***************
*** 1,7 ****
  dnl
  dnl  Configuration input file for Harvest
  dnl
! dnl  configure.in,v 2.4 1997/09/22 16:05:08 sxw Exp
  dnl
  
  AC_PREREQ(2.12)
--- 1,7 ----
  dnl
  dnl  Configuration input file for Harvest
  dnl
! dnl  configure.in,v 2.5 1997/11/26 18:33:47 sxw Exp
  dnl
  
  AC_PREREQ(2.12)
***************
*** 121,126 ****
--- 121,134 ----
  AC_CHECK_SIZEOF(int)
  AC_CHECK_SIZEOF(long)
  AC_C_CONST
+ 
+ dnl Check to see if we need UCB compatibilty stuff
+ AC_CHECK_FUNC(bcopy, ,[NEED_BSD="yes"])
+ 
+ if test "$NEED_BSD" = "yes"; then
+    CFLAGS="$CFLAGS -L/usr/ucblib/"
+    AC_CHECK_LIB(ucb, bcopy, [XTRA_LIBS="$XTRA_LIBS -lucb"])
+ fi
  
  dnl Check for library functions
  AC_CHECK_FUNCS(bcopy bzero flock fsync ftruncate getcwd getdtablesize \
Index: harvest/src/broker/Makefile.in
diff -c harvest/src/broker/Makefile.in:2.5 harvest/src/broker/Makefile.in:2.6
*** harvest/src/broker/Makefile.in:2.5	Tue Nov  4 13:15:24 1997
--- harvest/src/broker/Makefile.in	Wed Nov 26 09:14:45 1997
***************
*** 1,7 ****
  #
  #  Makefile for the Harvest Broker
  #
! #  Makefile.in,v 2.5 1997/11/04 18:15:24 sxw Exp
  #
  
  srcdir = @srcdir@
--- 1,7 ----
  #
  #  Makefile for the Harvest Broker
  #
! #  Makefile.in,v 2.6 1997/11/26 14:14:45 sxw Exp
  #
  
  srcdir = @srcdir@
***************
*** 110,116 ****
  	$(CC) -o $@ stor_reg.o dumpregistry.o brkutil.o gid.o $(LDFLAGS) $(LIBS)
  
  y.tab.c y.tab.h:	query.y 
! 	$(YACC) $(YFLAGS) $<
  
  lex.yy.c:	query.l y.tab.h
  	$(LEX) $(LFLAGS) $(srcdir)/query.l
--- 110,116 ----
  	$(CC) -o $@ stor_reg.o dumpregistry.o brkutil.o gid.o $(LDFLAGS) $(LIBS)
  
  y.tab.c y.tab.h:	query.y 
! 	$(YACC) $(YFLAGS) $(srcdir)/query.y
  
  lex.yy.c:	query.l y.tab.h
  	$(LEX) $(LFLAGS) $(srcdir)/query.l
Index: harvest/src/broker/admin.c
diff -c harvest/src/broker/admin.c:2.1 harvest/src/broker/admin.c:2.2
*** harvest/src/broker/admin.c:2.1	Fri Mar 21 12:19:48 1997
--- harvest/src/broker/admin.c	Fri Nov 21 12:42:51 1997
***************
*** 1,4 ****
! static char rcsid[] = "admin.c,v 2.1 1997/03/21 17:19:48 sxw Exp";
  /*
   *  admin.c -- Performs administrative actions.
   *  
--- 1,4 ----
! static char rcsid[] = "admin.c,v 2.2 1997/11/21 17:42:51 sxw Exp";
  /*
   *  admin.c -- Performs administrative actions.
   *  
***************
*** 152,157 ****
--- 152,166 ----
  	ret = run_cmd(buf);
  	(void)chmod("stats.html", 0664);
  	return (ret == 0 ? SUCCESS : ERROR);
+ }
+ 
+ /*
+  *  AD_parse_templatefile - parses the templates from filename Broker
+  */
+ int AD_parse_templatefile(name)
+ char *name;
+ {
+ 	return P_parse_input(name, BAFULL_U);
  }
  
  /*
Index: harvest/src/broker/broker.h
diff -c harvest/src/broker/broker.h:2.2 harvest/src/broker/broker.h:2.3
*** harvest/src/broker/broker.h:2.2	Tue Jul 22 08:37:36 1997
--- harvest/src/broker/broker.h	Fri Nov 21 12:42:52 1997
***************
*** 4,10 ****
   *  DEBUG: none
   *  AUTHOR: Harvest derived
   *
!  *  broker.h,v 2.2 1997/07/22 12:37:36 sxw Exp
   *
   *  Harvest Indexer http://www.tardis.ed.ac.uk/harvest/
   *  ---------------------------------------------------
--- 4,10 ----
   *  DEBUG: none
   *  AUTHOR: Harvest derived
   *
!  *  broker.h,v 2.3 1997/11/21 17:42:52 sxw Exp
   *
   *  Harvest Indexer http://www.tardis.ed.ac.uk/harvest/
   *  ---------------------------------------------------
***************
*** 681,686 ****
--- 681,687 ----
  event_t *EV_deq _PARAMS((void));
  
  /* admin.c */
+ int AD_parse_templatefile _PARAMS((char *));
  int AD_add_object _PARAMS((char *));
  int AD_remove_name _PARAMS((char *));
  int AD_log_on _PARAMS((char *));
Index: harvest/src/broker/query.l
diff -c harvest/src/broker/query.l:2.1 harvest/src/broker/query.l:2.2
*** harvest/src/broker/query.l:2.1	Fri Mar 21 12:20:06 1997
--- harvest/src/broker/query.l	Fri Nov 21 12:42:53 1997
***************
*** 1,5 ****
  %{
! static char rcsid[] = "query.l,v 2.1 1997/03/21 17:20:06 sxw Exp";
  /* 
   *  query.l - Broker query manager interface lexical analyzer (lex/flex).
   *
--- 1,5 ----
  %{
! static char rcsid[] = "query.l,v 2.2 1997/11/21 17:42:53 sxw Exp";
  /* 
   *  query.l - Broker query manager interface lexical analyzer (lex/flex).
   *
***************
*** 161,166 ****
--- 161,167 ----
  #[Rr][Ee][Mm]-[Ll][Oo][Gg]              {return(LOGR_);}
  #[Aa][Dd][Dd]-[Oo][Bb][Jj][Ee][Cc][Tt]                          {return(ADDO_);}
  #[Rr][Ee][Mm]-[Oo][Bb][Jj][Ee][Cc][Tt]-[Pp][Aa][Tt][Hh]         {return(REMON_);}
+ #[Pp][Aa][Rr][Ss][Ee]-[Tt][Ee][Mm][Pp][Ll][Aa][Tt][Ee]          {return(PARSTF_);}
  #[Rr][Ee][Mm]-[Oo][Bb][Jj][Ee][Cc][Tt]-[Qq][Uu][Ee][Rr][Yy]     {return(REMOQ_);}
  #[Cc][Oo][Ll][Ll][Ee][Cc][Tt][Ii][Oo][Nn]                       {return(COLLECT_);}
  #[Cc][Ll][Ee][Aa][Nn]-[Bb][Rr][Oo][Kk][Ee][Rr]                  {return(CLEAN_);}
Index: harvest/src/broker/query.y
diff -c harvest/src/broker/query.y:2.1 harvest/src/broker/query.y:2.2
*** harvest/src/broker/query.y:2.1	Fri Mar 21 12:20:08 1997
--- harvest/src/broker/query.y	Fri Nov 21 12:42:54 1997
***************
*** 1,5 ****
  %{
! static char rcsid[] = "query.y,v 2.1 1997/03/21 17:20:08 sxw Exp";
  /* 
   *  query.y -- Broker query manager interface grammer (yacc/bison).
   *
--- 1,5 ----
  %{
! static char rcsid[] = "query.y,v 2.2 1997/11/21 17:42:54 sxw Exp";
  /* 
   *  query.y -- Broker query manager interface grammer (yacc/bison).
   *
***************
*** 148,160 ****
  %token REGEXP_ LSST_ GTRT_ BULK_ BESTTOK_ ADMIN_ USERQ_ ALLB_ END_ DO_
  %token SET_ COLLECT_ CLEAN_ FINDEX_ START_ COMPRESS_ ATTRIBUTE_ OPERATION_
  %token LFLUSH_ LCLOSE_ LOPEN_ LROTATE_ IINDEX_ SINCETOK_
! %token LOGA_ LOGR_ ADDO_ REMOQ_ REMON_ SHUTDN_ PASSWD_ DOSTATS_
  %token INFO_ PING_
  %token DESCFLAG_ INDEXFLAG_ OPAQUEFLAG_ 
  %token UNIQIFY_ RESTIDXSVR_
  
  %type <ChPtr> id indexflag adminflags logical_c
! %type <INTT>  selectop logical doadmin commands addlist remlist safecommand
  %type <QL>    clauselist clause restspec query command relation 
  %type <QL>    primary logoprel func
  %type <A>     arg arglist
--- 148,160 ----
  %token REGEXP_ LSST_ GTRT_ BULK_ BESTTOK_ ADMIN_ USERQ_ ALLB_ END_ DO_
  %token SET_ COLLECT_ CLEAN_ FINDEX_ START_ COMPRESS_ ATTRIBUTE_ OPERATION_
  %token LFLUSH_ LCLOSE_ LOPEN_ LROTATE_ IINDEX_ SINCETOK_
! %token LOGA_ LOGR_ ADDO_ REMOQ_ REMON_ SHUTDN_ PASSWD_ DOSTATS_ PARSTF_
  %token INFO_ PING_
  %token DESCFLAG_ INDEXFLAG_ OPAQUEFLAG_ 
  %token UNIQIFY_ RESTIDXSVR_
  
  %type <ChPtr> id indexflag adminflags logical_c
! %type <INTT>  selectop logical doadmin commands addlist remlist safecommand parstflist
  %type <QL>    clauselist clause restspec query command relation 
  %type <QL>    primary logoprel func
  %type <A>     arg arglist
***************
*** 261,266 ****
--- 261,271 ----
                 | { $$ = SUCCESS; }
                 ;
  
+ parstflist     : parstflist id 
+                  { if (AD_parse_templatefile($2) != SUCCESS) $$ = ERROR; else $$ = $1; xfree($2); }
+                | { $$ = SUCCESS; }
+                ;
+ 
  commands       : COLLECT_ 		{$$ = COL_Do_Collection();}
                 | CLEAN_   		{$$ = RG_Cleaner(); }
                 | COMPRESS_   		{$$ = Do_Compression(); }
***************
*** 284,289 ****
--- 289,296 ----
                 | ADDO_ { do_IND_Index_Start(); } addlist 
                   {if (do_IND_Index_Flush()!=SUCCESS) $$ = ERROR; else $$ = $3;}
                 | REMON_ { do_IND_Index_Start(); } remlist 
+                  {if (do_IND_Index_Flush()!=SUCCESS) $$ = ERROR; else $$ = $3;}
+                | PARSTF_ { do_IND_Index_Start(); } parstflist 
                   {if (do_IND_Index_Flush()!=SUCCESS) $$ = ERROR; else $$ = $3;}
                 ;
  
Index: harvest/src/common/include/version.h
diff -c harvest/src/common/include/version.h:2.3 harvest/src/common/include/version.h:2.4
*** harvest/src/common/include/version.h:2.3	Mon Oct 27 18:29:16 1997
--- harvest/src/common/include/version.h	Mon Nov 24 18:25:38 1997
***************
*** 3,7 ****
   */
  #ifndef HARVEST_VERSION
  /* UPDATE VERSION HERE */
! #define HARVEST_VERSION	"1.5pl14"
  #endif
--- 3,7 ----
   */
  #ifndef HARVEST_VERSION
  /* UPDATE VERSION HERE */
! #define HARVEST_VERSION	"1.5.16"
  #endif
Index: harvest/src/common/md5/Makefile.in
diff -c harvest/src/common/md5/Makefile.in:2.4 harvest/src/common/md5/Makefile.in:2.6
*** harvest/src/common/md5/Makefile.in:2.4	Tue Nov  4 13:15:26 1997
--- harvest/src/common/md5/Makefile.in	Wed Nov 26 09:14:46 1997
***************
*** 1,7 ****
  #
  #  Makefile for MD5 library code and example
  #
! #  Makefile.in,v 2.4 1997/11/04 18:15:26 sxw Exp
  #
  
  srcdir = @srcdir@
--- 1,7 ----
  #
  #  Makefile for MD5 library code and example
  #
! #  Makefile.in,v 2.6 1997/11/26 14:14:46 sxw Exp
  #
  
  srcdir = @srcdir@
***************
*** 23,29 ****
  LIBDIR		= ../lib
  LIBFILE		= libmd5.a
  
! all:	install-lib
  
  $(LIBFILE):	md5.o
  	ar r $(LIBFILE) md5.o
--- 23,29 ----
  LIBDIR		= ../lib
  LIBFILE		= libmd5.a
  
! all:	install-lib md5
  
  $(LIBFILE):	md5.o
  	ar r $(LIBFILE) md5.o
***************
*** 31,36 ****
--- 31,39 ----
  
  install-lib:	$(LIBDIR)/$(LIBFILE)
  
+ md5:	$(LIBFILE) main.c
+ 	$(CC) -o $@ $(srcdir)/main.c -L. -lmd5
+ 
  $(LIBDIR)/$(LIBFILE):	$(LIBFILE)
  	$(INSTALL_FILE) $(LIBFILE) $(LIBDIR)/$(LIBFILE)
  	$(RANLIB) $(LIBDIR)/$(LIBFILE)
***************
*** 42,47 ****
--- 45,51 ----
  	-rm -f Makefile
  
  install: all
+ 	$(INSTALL_BIN) md5 $(INSTALL_LIBDIR)
  
  shar:
  	@shar README Makefile md5.c md5.h main.c
Index: harvest/src/common/url/http.c
diff -c harvest/src/common/url/http.c:2.5 harvest/src/common/url/http.c:2.6
*** harvest/src/common/url/http.c:2.5	Fri Oct 31 12:11:06 1997
--- harvest/src/common/url/http.c	Fri Nov 21 12:40:23 1997
***************
*** 1,4 ****
! static char rcsid[] = "http.c,v 2.5 1997/10/31 17:11:06 sxw Exp";
  /*
   *  http.c - URL processing for http-specific URLs.  HTTP/1.0 compliant.
   *
--- 1,4 ----
! static char rcsid[] = "http.c,v 2.6 1997/11/21 17:40:23 sxw Exp";
  /*
   *  http.c - URL processing for http-specific URLs.  HTTP/1.0 compliant.
   *
***************
*** 148,153 ****
--- 148,156 ----
  /*
   *  HTTP/1.0 Status Codes from:
   *     http://info.cern.ch/hypertext/WWW/Protocols/HTTP/HTRESP.html
+  *
+  *  HTTP/1.1 Status Codes from:
+  *     RFC 2068 "Hypertext Transfer Protocol -- HTTP/1.1"
   */
  #define HTTP_SUCCESS_STATUS(x) \
  	( \
***************
*** 155,161 ****
  	((x) == 201) ||	/* Success: CREATED */ \
  	((x) == 202) ||	/* Success: Accepted */ \
  	((x) == 203) ||	/* Success: Partial Information */ \
! 	((x) == 204)   	/* Success: No Response */ \
  	)
  
  #define HTTP_REDIRECTION_STATUS(x) \
--- 158,166 ----
  	((x) == 201) ||	/* Success: CREATED */ \
  	((x) == 202) ||	/* Success: Accepted */ \
  	((x) == 203) ||	/* Success: Partial Information */ \
! 	((x) == 204) ||	/* Success: No Response */ \
!      	((x) == 205) ||	/* 1.1 Success: Reset Content */ \
!      	((x) == 206)   	/* 1.1 Success: Partial Content */ \
  	)
  
  #define HTTP_REDIRECTION_STATUS(x) \
***************
*** 163,174 ****
  	((x) == 301) ||	/* Redirection: Moved */ \
  	((x) == 302) ||	/* Redirection: Found */ \
  	((x) == 303) ||	/* Redirection: Method */ \
! 	((x) == 304)   	/* Redirection: Not Modified */ \
  	)
  
  #define HTTP_UNAUTHORIZED_STATUS(x) \
  	( \
! 	((x) == 401)   	/* Error: Unauthorized */ \
  	)
  
  #define HTTP_ERROR_STATUS(x) \
--- 168,181 ----
  	((x) == 301) ||	/* Redirection: Moved */ \
  	((x) == 302) ||	/* Redirection: Found */ \
  	((x) == 303) ||	/* Redirection: Method */ \
! 	((x) == 304) ||	/* Redirection: Not Modified */ \
! 	((x) == 305)   	/* 1.1 Redirection: Use Proxy */ \
  	)
  
  #define HTTP_UNAUTHORIZED_STATUS(x) \
  	( \
! 	((x) == 401) ||	/* Error: Unauthorized */ \
! 	((x) == 407)   	/* 1.1 Error: Proxy Authentication Required */ \
  	)
  
  #define HTTP_ERROR_STATUS(x) \
***************
*** 177,186 ****
  	((x) == 402) ||	/* Error: PaymentRequired */ \
  	((x) == 403) ||	/* Error: Forbidden */ \
  	((x) == 404) ||	/* Error: Not found */ \
  	((x) == 500) ||	/* Error: Internal Error */ \
  	((x) == 501) ||	/* Error: Not implemented */ \
  	((x) == 502) ||	/* Error: Service temporarily overloaded */ \
! 	((x) == 503)   	/* Error: Gateway timeout 503 */ \
  	)
  
  #define HTTP_VALID_STATUS(x) \
--- 184,205 ----
  	((x) == 402) ||	/* Error: PaymentRequired */ \
  	((x) == 403) ||	/* Error: Forbidden */ \
  	((x) == 404) ||	/* Error: Not found */ \
+ 	((x) == 405) ||	/* 1.1 Error: Method Not Allowed */ \
+ 	((x) == 406) ||	/* 1.1 Error: Not Acceptable */ \
+ 	((x) == 408) ||	/* 1.1 Error: Request Timeout */ \
+ 	((x) == 409) ||	/* 1.1 Error: Conflict */ \
+ 	((x) == 410) ||	/* 1.1 Error: Gone */ \
+ 	((x) == 411) ||	/* 1.1 Error: Length Required */ \
+ 	((x) == 412) ||	/* 1.1 Error: Precondition Failed */ \
+ 	((x) == 413) ||	/* 1.1 Error: Request Entity Too Large */ \
+ 	((x) == 414) ||	/* 1.1 Error: Request-URI Too Long */ \
+ 	((x) == 415) ||	/* 1.1 Error: Unsupported Media Type */ \
  	((x) == 500) ||	/* Error: Internal Error */ \
  	((x) == 501) ||	/* Error: Not implemented */ \
  	((x) == 502) ||	/* Error: Service temporarily overloaded */ \
! 	((x) == 503) ||	/* Error: Gateway timeout 503 */ \
! 	((x) == 504) ||	/* 1.1 Error: Gateway Timeout */ \
! 	((x) == 505)   	/* 1.1 Error: HTTP Version Not Supported */ \
  	)
  
  #define HTTP_VALID_STATUS(x) \
***************
*** 456,462 ****
  					bufp++, n--;
  
  				if (!HTTP_VALID_STATUS(up->http_status_code)) {
! 					errorlog("Failed HTTP/1.0 transfer for %s: %s\n", up->url, bufp);
  					close(s);
  					fclose(up->fp);
  					return 10;
--- 475,481 ----
  					bufp++, n--;
  
  				if (!HTTP_VALID_STATUS(up->http_status_code)) {
! 					errorlog("Failed HTTP/1.0 transfer for %s: %s (status code: %d)\n", up->url, bufp,up->http_status_code);
  					close(s);
  					fclose(up->fp);
  					return 10;
Index: harvest/src/common/url/url.c
diff -c harvest/src/common/url/url.c:2.1 harvest/src/common/url/url.c:2.2
*** harvest/src/common/url/url.c:2.1	Fri Mar 21 13:10:10 1997
--- harvest/src/common/url/url.c	Tue Dec  9 12:08:43 1997
***************
*** 1,4 ****
! static char rcsid[] = "url.c,v 2.1 1997/03/21 18:10:10 sxw Exp";
  /*
   *  url.c - URL processing code 
   *
--- 1,4 ----
! static char rcsid[] = "url.c,v 2.2 1997/12/09 17:08:43 sxw Exp";
  /*
   *  url.c - URL processing code 
   *
***************
*** 341,349 ****
  			 *  if fstat() fails, if it's a special file, or if
  			 *  it's executable.
  			 */
! 			if ((fd = open(local_filename, O_RDONLY, 0)) < 0 ||
! 			    fstat(fd, &sb) < 0 || !S_ISREG(sb.st_mode) ||
! 			    (sb.st_mode & S_IXUSR)) {
  				xfree(local_filename);
  				local_filename = NULL;
  			}
--- 341,350 ----
  			 *  if fstat() fails, if it's a special file, or if
  			 *  it's executable.
  			 */
! 			if (stat(local_filename, &sb) < 0 || 
! 			    !S_ISREG(sb.st_mode) ||
! 			    (sb.st_mode & S_IXUSR) || 
! 			    (fd = open(local_filename, O_RDONLY, 0)) < 0) {
  				xfree(local_filename);
  				local_filename = NULL;
  			}
Index: harvest/src/gatherer/enumerate/robots-txt.c
diff -c harvest/src/gatherer/enumerate/robots-txt.c:2.4 harvest/src/gatherer/enumerate/robots-txt.c:2.5
*** harvest/src/gatherer/enumerate/robots-txt.c:2.4	Tue Aug 26 14:06:46 1997
--- harvest/src/gatherer/enumerate/robots-txt.c	Fri Nov 21 12:40:55 1997
***************
*** 1,4 ****
! static char rcsid[]="robots-txt.c,v 2.4 1997/08/26 18:06:46 sxw Exp";
  /*
   *  DEBUG: section  48, level 1, 5      Gatherer enumeration robots.txt stuff
   *
--- 1,4 ----
! static char rcsid[]="robots-txt.c,v 2.5 1997/11/21 17:40:55 sxw Exp";
  /*
   *  DEBUG: section  48, level 1, 5      Gatherer enumeration robots.txt stuff
   *
***************
*** 72,79 ****
       char *pattern;
       char *path;
  {
-     if (pattern == (char *) NULL)
- 	return 1;
      if (!strncmp(pattern, path, strlen(pattern)))
  	return 1;
      return 0;
--- 72,77 ----
Index: harvest/src/gatherer/essence/Makefile.in
diff -c harvest/src/gatherer/essence/Makefile.in:2.3 harvest/src/gatherer/essence/Makefile.in:2.4
*** harvest/src/gatherer/essence/Makefile.in:2.3	Tue Nov  4 13:15:39 1997
--- harvest/src/gatherer/essence/Makefile.in	Wed Nov 26 09:14:47 1997
***************
*** 1,7 ****
  #
  #  Makefile for the Essence source directory 
  #
! #  Makefile.in,v 2.3 1997/11/04 18:15:39 sxw Exp
  #
  srcdir = @srcdir@
  VPATH = $(srcdir)
--- 1,7 ----
  #
  #  Makefile for the Essence source directory 
  #
! #  Makefile.in,v 2.4 1997/11/26 14:14:47 sxw Exp
  #
  srcdir = @srcdir@
  VPATH = $(srcdir)
***************
*** 28,34 ****
  
  DEBUG		= $(DEBUG_TOP) #-O #-g #-DDEBUG 
  LFLAGS		=
! YFLAGS		= -d #-t #-v
  
  #######################################################################
  #  You should not need to change anything below here
--- 28,34 ----
  
  DEBUG		= $(DEBUG_TOP) #-O #-g #-DDEBUG 
  LFLAGS		=
! YFLAGS		= -d
  
  #######################################################################
  #  You should not need to change anything below here
***************
*** 188,194 ****
  $(PPOBJS): y.tab.h
  
  y.tab.c y.tab.h:	pp_rules.y
! 	$(YACC) $(YFLAGS) $<
  
  lex.yy.c:	pp_rules.l y.tab.h
  	$(LEX) $(LFLAGS) $(srcdir)/pp_rules.l
--- 188,194 ----
  $(PPOBJS): y.tab.h
  
  y.tab.c y.tab.h:	pp_rules.y
! 	$(YACC) $(YFLAGS) $(srcdir)/pp_rules.y
  
  lex.yy.c:	pp_rules.l y.tab.h
  	$(LEX) $(LFLAGS) $(srcdir)/pp_rules.l
Index: harvest/src/gatherer/essence/file/print.c
diff -c harvest/src/gatherer/essence/file/print.c:2.1 harvest/src/gatherer/essence/file/print.c:2.2
*** harvest/src/gatherer/essence/file/print.c:2.1	Tue Jun 10 15:39:37 1997
--- harvest/src/gatherer/essence/file/print.c	Thu Dec 11 11:14:34 1997
***************
*** 78,84 ****
       char *f, *a;
  {
  	extern int errno, sys_nerr;
! #if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__bsdi__)
  	extern char *sys_errlist[];
  #endif
  	int myerrno;
--- 78,84 ----
       char *f, *a;
  {
  	extern int errno, sys_nerr;
! #if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__bsdi__) && !defined(__linux__)
  	extern char *sys_errlist[];
  #endif
  	int myerrno;
Index: harvest/src/gatherer/gatherd/gather.c
diff -c harvest/src/gatherer/gatherd/gather.c:2.2 harvest/src/gatherer/gatherd/gather.c:2.3
*** harvest/src/gatherer/gatherd/gather.c:2.2	Mon Jul 21 12:04:30 1997
--- harvest/src/gatherer/gatherd/gather.c	Fri Nov 21 12:41:49 1997
***************
*** 1,4 ****
! static char rcsid[] = "gather.c,v 2.2 1997/07/21 16:04:30 sxw Exp";
  /*
   *  gather.c - Simple, portable client to retrieve data from a Gatherer,
   *  and print it to stdout.  Uses the GNU zip compression to transmit
--- 1,4 ----
! static char rcsid[] = "gather.c,v 2.3 1997/11/21 17:41:49 sxw Exp";
  /*
   *  gather.c - Simple, portable client to retrieve data from a Gatherer,
   *  and print it to stdout.  Uses the GNU zip compression to transmit
***************
*** 126,132 ****
  /* Wait 5 minutes for a response from the remote Gatherer */
  #define WAIT_MAX_SECS	300
  
! static void sigdie()
  {
  	fprintf(stderr, "gather: Timed out after waiting %d seconds for a response from the remote Gatherer.\n", WAIT_MAX_SECS);
  	exit(1);
--- 126,132 ----
  /* Wait 5 minutes for a response from the remote Gatherer */
  #define WAIT_MAX_SECS	300
  
! static void sigdie(int unused)
  {
  	fprintf(stderr, "gather: Timed out after waiting %d seconds for a response from the remote Gatherer.\n", WAIT_MAX_SECS);
  	exit(1);
***************
*** 147,155 ****
  /* Local functions */
  static void grab_data_v0_2();
  static void die();
- static char *getfullhostname();
  static void send_msg();
- static char *xstrdup();		/* same as strdup(3) for portability */
  static void gzip_message();
  static void do_plain_text_retrieve();
  static void do_compressed_retrieve();
--- 147,153 ----
***************
*** 433,456 ****
  	(void) waitpid(pid, NULL, 0);
  }
  
- /*
-  *  getfullhostname() - Returns the fully qualified name of the current 
-  *  host, or NULL on error.  Pointer is only valid until the next call
-  *  to the gethost*() functions.
-  */
- static char *getfullhostname()
- {
- 	struct hostent *hp;
- 	static char buf[MAXHOSTNAMELEN + 1];
- 	extern int gethostname();	/* UNIX system call */
- 
- 	if (gethostname(buf, MAXHOSTNAMELEN) < 0)
- 		return (NULL);
- 	if ((hp = xgethostbyname(buf)) == NULL)
- 		return (xstrdup(buf));
- 	return (xstrdup(hp->h_name));
- }
- 
  static struct hostent *xgethostbyname(name)
       char *name;
  {
--- 431,436 ----
***************
*** 501,526 ****
  	}
  }
  
- 
- /*
-  *   xstrdup() - same as xstrdup(3)
-  */
- static char *xstrdup(s)
-      char *s;
- {
- 	static char *p = NULL;
- 	int sz;
- 
- 	sz = strlen(s);
- 	p = (char *) malloc((size_t) sz + 1);	/* allocate memory for string */
- 	if (p == NULL) {
- 		perror("gather: malloc");
- 		exit(1);
- 	}
- 	memcpy(p, s, sz);	/* copy string */
- 	p[sz] = '\0';		/* terminate string */
- 	return (p);
- }
  
  static void gzip_message()
  {
--- 481,486 ----
