Index: Makefile
===================================================================
RCS file: /cvs/ports/textproc/glimpse/Makefile,v
retrieving revision 1.27
diff -u -p -u -p -r1.27 Makefile
--- Makefile 11 Apr 2017 13:57:34 -0000 1.27
+++ Makefile 6 May 2017 19:20:56 -0000
@@ -3,15 +3,18 @@
COMMENT= text search engine
DISTNAME= glimpse-4.1
-REVISION= 5
+REVISION= 6
CATEGORIES= textproc databases
+HOMEPAGE= http://webglimpse.net/
PERMIT_PACKAGE_CDROM= no fee
PERMIT_PACKAGE_FTP= Yes
WANTLIB= c
-MASTER_SITES= ftp://ftp.cs.arizona.edu/glimpse/
+MASTER_SITES=
http://ftp.gnome.org/mirror/archive/ftp.sunet.se/pub/vendor/sco/skunkware/osr5/fileutil/md5/src/
\
+ http://ftp.icm.edu.pl/pub/unix/www/glimpse/
+
DISTFILES= glimpse-4.1.src.tar.gz
CONFIGURE_STYLE= gnu dest old
Index: patches/patch-compress_main_tbuild_c
===================================================================
RCS file: patches/patch-compress_main_tbuild_c
diff -N patches/patch-compress_main_tbuild_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-compress_main_tbuild_c 6 May 2017 19:20:56 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: compress/main_tbuild.c
+--- compress/main_tbuild.c.orig
++++ compress/main_tbuild.c
+@@ -24,7 +24,7 @@ char *progname;
+
+ main(argc, argv)
+ int argc;
+- unsigned char *argv[];
++ char *argv[];
+ {
+ char comp_dir[MAX_LINE_LEN];
+ int threshold, specialwords;
Index: patches/patch-compress_misc_c
===================================================================
RCS file: patches/patch-compress_misc_c
diff -N patches/patch-compress_misc_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-compress_misc_c 6 May 2017 19:20:56 -0000
@@ -0,0 +1,13 @@
+$OpenBSD$
+
+Index: compress/misc.c
+--- compress/misc.c.orig
++++ compress/misc.c
+@@ -288,6 +288,7 @@ int flags;
+ return 1;
+ }
+
++void
+ uninitialize_common()
+ {
+ initialize_common_done = 0;
Index: patches/patch-get_filename_c
===================================================================
RCS file: patches/patch-get_filename_c
diff -N patches/patch-get_filename_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-get_filename_c 6 May 2017 19:20:56 -0000
@@ -0,0 +1,13 @@
+$OpenBSD$
+
+Index: get_filename.c
+--- get_filename.c.orig
++++ get_filename.c
+@@ -481,6 +481,7 @@ endofinput:
+ return 0;
+ }
+
++void
+ get_filenames(index_vect, argc, argv, dummylen, dummypat, file_num)
+ int *index_vect;
+ int argc; /* the arguments to agrep for -F */
Index: patches/patch-get_index_c
===================================================================
RCS file: patches/patch-get_index_c
diff -N patches/patch-get_index_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-get_index_c 6 May 2017 19:20:56 -0000
@@ -0,0 +1,21 @@
+$OpenBSD$
+
+Index: get_index.c
+--- get_index.c.orig
++++ get_index.c
+@@ -52,6 +52,7 @@ free_list(p1)
+ }
+
+ /* Unions offset lists list2 with list1 sorted in increasing order (deletes
elements from list2) => changes both list1 and list2: f += #elems added */
++void
+ sorted_union(list1, list2, f, pf, cf)
+ struct offsets **list1, **list2;
+ int *f, pf, cf;
+@@ -114,6 +115,7 @@ sorted_union(list1, list2, f, pf, cf)
+ }
+
+ /* Intersects offset lists list2 with list1 sorted in increasing order
(deletes elements from list2) => changes both list1 and list2 */
++void
+ sorted_intersection(filenum, list1, list2, f)
+ struct offsets **list1, **list2;
+ int *f;
Index: patches/patch-index_build_in_c
===================================================================
RCS file: patches/patch-index_build_in_c
diff -N patches/patch-index_build_in_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-index_build_in_c 6 May 2017 19:20:56 -0000
@@ -0,0 +1,123 @@
+$OpenBSD$
+
+Index: index/build_in.c
+--- index/build_in.c.orig
++++ index/build_in.c
+@@ -44,6 +44,13 @@ extern struct stat istbuf;
+ extern struct stat excstbuf;
+ extern struct stat incstbuf;
+
++void build_hash();
++void init_hash_table();
++void insert_h();
++void insert_index();
++void merge_in(FILE *, FILE *, FILE *);
++void remove_filename(int, int);
++
+ extern int ICurrentFileOffset;
+ extern int NextICurrentFileOffset;
+
+@@ -121,6 +128,7 @@ extern struct indices *ip;
+ extern int HashTableSize;
+ struct token **hash_table; /*[MAX_64K_HASH];*/
+
++void
+ build_index()
+ {
+ int i;
+@@ -595,6 +603,7 @@ next_token:
+ #endif
+ }
+
++void
+ traverse1()
+ {
+ FILE *i1, *i2, *i3;
+@@ -777,6 +786,7 @@ build_hash():
+ input: a set of filenames in name_list[], a partition table p_table[]
+ output: a hash table hash_table[].
+ -----------------------------------------------------------------------*/
++void
+ build_hash()
+ {
+ int fd; /* opened file number */
+@@ -1226,6 +1236,7 @@ try_again_1:
+ my_free(buffer_begin, BLOCK_SIZE + 10);
+ }
+
++void
+ init_hash_table()
+ {
+ int i;
+@@ -1245,6 +1256,7 @@ function: insert the word to appropriate position in t
+ otherwise create a new token.
+ THERE ARE NO STATE CHANGES UNLESS WE ARE SURE THAT MALLOCS WON'T FAIL: BG
+ ---------------------------------------------------------------------------*/
++void
+ insert_h(word, pn, attribute)
+ char *word;
+ int pn;
+@@ -1282,7 +1294,8 @@ int attribute;
+ traverse1();
+ init_hash_table();
+ tried_once = 1; /* memory allocation failed in malloc#1 */
+- return insert_h(word, pn, attribute); /* next call can't fail here
since traverse() calls *allfree() */
++ insert_h(word, pn, attribute); /* next call can't fail here since
traverse() calls *allfree() */
++ return;
+ }
+
+ if((tp->word = (char *) wordalloc(sizeof(char) * (wordlen+1))) == NULL) {
+@@ -1297,7 +1310,8 @@ int attribute;
+ traverse1();
+ init_hash_table();
+ tried_once = 2; /* memory allocation failed in malloc#2 */
+- return insert_h(word, pn, attribute); /* next call can't fail here or
above since traverse() calls *allfree() */
++ insert_h(word, pn, attribute); /* next call can't fail here or above
since traverse() calls *allfree() */
++ return;
+ }
+ strcpy(tp->word, word);
+ tp->attribute = attribute;
+@@ -1317,7 +1331,8 @@ int attribute;
+ traverse1();
+ init_hash_table();
+ tried_once = 3; /* memory allocation failed in malloc#3 */
+- return insert_h(word, pn, attribute); /* next call can't fail here or
above or above-above since traverse() calls *allfree() */
++ insert_h(word, pn, attribute); /* next call can't fail here or above
or above-above since traverse() calls *allfree() */
++ return;
+ }
+ icount++;
+
+@@ -1363,6 +1378,7 @@ tp points to the token structure. so, tp->ip is always
+ indices structure.
+ THERE ARE NO STATE CHANGES UNLESS WE ARE SURE THAT MALLOCS WON'T FAIL: BG
+ ------------------------------------------------------------------- */
++void
+ insert_index(tp, pn)
+ struct token *tp; /* insert a index into a indices structure */
+ int pn;
+@@ -1411,7 +1427,8 @@ int pn;
+ traverse1();
+ init_hash_table();
+ tried_once = 1; /* memory allocation failed in malloc#1 */
+- return insert_index(tp, pn);
++ insert_index(tp, pn);
++ return;
+ }
+ icount++;
+
+@@ -1471,6 +1488,7 @@ extern unsigned char *dest_index_buf;
+ extern unsigned char *merge_index_buf;
+
+ /* merge index file f1 and f2, then put the result in index file f3 */
++void
+ merge_in(f1, f2, f3)
+ FILE *f1, *f2, *f3;
+ {
+@@ -1849,6 +1867,7 @@ printf("in merge_in()\n"); fflush(stdout);
+ return;
+ }
+
++void
+ remove_filename(fileindex, new_partition)
+ int fileindex, new_partition;
+ {
Index: patches/patch-index_io_c
===================================================================
RCS file: patches/patch-index_io_c
diff -N patches/patch-index_io_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-index_io_c 6 May 2017 19:20:56 -0000
@@ -0,0 +1,37 @@
+$OpenBSD$
+
+Index: index/io.c
+--- index/io.c.orig
++++ index/io.c
+@@ -221,6 +221,7 @@ CHAR *filter[MAX_FILTER];
+ CHAR *filter_command[MAX_FILTER];
+ struct stat filstbuf;
+
++void
+ read_filters(index_dir, dofilter)
+ char *index_dir;
+ int dofilter;
+@@ -1300,6 +1301,7 @@ get_filename_index(name)
+ return e->index;
+ }
+
++void
+ insert_filename(name, name_index)
+ char *name;
+ int name_index;
+@@ -1352,6 +1354,7 @@ insert_filename(name, name_index)
+ (*pe)->index = name_index;
+ }
+
++void
+ change_filename(name, len, index, newname)
+ char *name;
+ int len;
+@@ -1374,6 +1377,7 @@ change_filename(name, len, index, newname)
+ return;
+ }
+
++void
+ delete_filename(name, name_index)
+ char *name;
+ int name_index;
Index: patches/patch-index_region_c
===================================================================
RCS file: /cvs/ports/textproc/glimpse/patches/patch-index_region_c,v
retrieving revision 1.1
diff -u -p -u -p -r1.1 patch-index_region_c
--- patches/patch-index_region_c 18 Mar 2016 16:41:53 -0000 1.1
+++ patches/patch-index_region_c 6 May 2017 19:20:56 -0000
@@ -1,6 +1,7 @@
$OpenBSD: patch-index_region_c,v 1.1 2016/03/18 16:41:53 naddy Exp $
---- index/region.c.orig Thu Nov 21 03:28:47 1996
-+++ index/region.c Thu Mar 17 23:08:53 2016
+Index: index/region.c
+--- index/region.c.orig
++++ index/region.c
@@ -1,6 +1,7 @@
/* Copyright (c) 1994 Sun Wu, Udi Manber, Burra Gopal. All Rights Reserved.
*/
/* From mail received from Bill Camargo and Darren Hardy in June 1994 */
@@ -9,3 +10,20 @@ $OpenBSD: patch-index_region_c,v 1.1 201
#include "region.h"
/*
+@@ -168,6 +169,7 @@ attr_free_table()
+ }
+
+ /* Looks for embedded attributes and copies the real attribute into dest */
++void
+ attr_extract(dest, src)
+ char *dest, *src;
+ {
+@@ -464,7 +466,7 @@ region_destroy()
+ while (rl != NULL) {
+ trl = rl;
+ rl = rl->next;
+- free(trl, sizeof(region_t));
++ my_free(trl, sizeof(region_t));
+ }
+ current_regions = nextpos = NULL;
+ return 0;