I am uploading a NMU to fix this. The debdiff is attached.
diff -Nru swish-e-2.4.7/conf/example9.pl swish-e-2.4.7/conf/example9.pl
--- swish-e-2.4.7/conf/example9.pl 2023-08-15 22:31:00.000000000 +0200
+++ swish-e-2.4.7/conf/example9.pl 2009-04-05 03:58:27.000000000 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/local/bin/perl -w
use strict;
# This is a short example that basically does the same
diff -Nru swish-e-2.4.7/debian/changelog swish-e-2.4.7/debian/changelog
--- swish-e-2.4.7/debian/changelog 2023-08-15 22:31:00.000000000 +0200
+++ swish-e-2.4.7/debian/changelog 2023-08-15 21:36:06.000000000 +0200
@@ -1,3 +1,11 @@
+swish-e (2.4.7-6.2) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Build without pcre. Closes: #999947
+ * Convert to source format 3.0 (quilt). Closes: #1007314
+
+ -- Bastian Germann <b...@debian.org> Tue, 15 Aug 2023 21:36:06 +0200
+
swish-e (2.4.7-6.1) unstable; urgency=medium
* Non-maintainer upload.
diff -Nru swish-e-2.4.7/debian/control swish-e-2.4.7/debian/control
--- swish-e-2.4.7/debian/control 2023-08-15 22:31:00.000000000 +0200
+++ swish-e-2.4.7/debian/control 2023-08-15 21:36:06.000000000 +0200
@@ -3,7 +3,7 @@
Priority: optional
Maintainer: Ludovic Drolez <ldro...@debian.org>
Standards-Version: 4.1.1
-Build-Depends: debhelper (>= 5), zlib1g-dev, perl, libxml2-dev (>= 2.4.3),
libpcre3-dev (>= 3.4), sharutils, autotools-dev
+Build-Depends: debhelper (>= 5), zlib1g-dev, perl, libxml2-dev (>= 2.4.3),
sharutils, autotools-dev
Package: swish-e
Architecture: any
diff -Nru swish-e-2.4.7/debian/files swish-e-2.4.7/debian/files
--- swish-e-2.4.7/debian/files 2009-04-05 03:58:26.000000000 +0200
+++ swish-e-2.4.7/debian/files 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-swish-e_2.4.0-0_i386.deb web optional
diff -Nru swish-e-2.4.7/debian/patches/debian.patch
swish-e-2.4.7/debian/patches/debian.patch
--- swish-e-2.4.7/debian/patches/debian.patch 1970-01-01 01:00:00.000000000
+0100
+++ swish-e-2.4.7/debian/patches/debian.patch 2023-08-15 21:36:06.000000000
+0200
@@ -0,0 +1,718 @@
+--- swish-e-2.4.7.orig/conf/example9.pl
++++ swish-e-2.4.7/conf/example9.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl -w
++#!/usr/bin/perl -w
+ use strict;
+
+ # This is a short example that basically does the same
+--- swish-e-2.4.7.orig/man/SWISH-FAQ.1
++++ swish-e-2.4.7/man/SWISH-FAQ.1
+@@ -131,7 +131,7 @@
+ .IX Title "SWISH-FAQ 1"
+ .TH SWISH-FAQ 1 "2009-04-04" "2.4.7" "SWISH-E Documentation"
+ .SH "NAME"
+-The Swish\-e FAQ \- Answers to Common Questions
++SWISH-FAQ \- The Swish\-e FAQ. Answers to Common Questions
+ .SH "OVERVIEW"
+ .IX Header "OVERVIEW"
+ List of commonly asked and answered questions. Please review this
+--- swish-e-2.4.7.orig/perl/API.pm
++++ swish-e-2.4.7/perl/API.pm
+@@ -214,10 +214,17 @@ The list of possible header names can be
+
+ =item $swish-E<gt>rank_scheme( 0|1 );
+
+-Similar to the -R option with the swish-e command line tool. The default
++Like the -R option with the swish-e command line tool. The default
+ ranking scheme is 0. Set it to 1 to experiment with other ranking features.
+ See the SWISH-CONFIG documentation for more on ranking schemes.
+
++=item $swish-E<gt>return_raw_rank( 0|1 );
++
++Like the -a option with the swish-e command line tool. The default, 0,
++return ranks normalized to the range 0-1000. When enabled by setting to 1,
++ranks are returned 'raw' (as computed by Swish-e internally during the search)
++and are only guaranteed to be non-negative.
++
+ =back
+
+ =head3 Error Handling
+--- swish-e-2.4.7.orig/perl/API.xs
++++ swish-e-2.4.7/perl/API.xs
+@@ -221,7 +221,9 @@ decode_header_value( swish_handle, heade
+ break;
+
+ default:
+- croak(" Unknown header type '%d'\n", header_type );
++ croak(" Unknown header type '%ld'\n", (long int)header_type
);
++ /* constants used in cases above are enum-ed in headers.h */
++
+ }
+
+
+--- swish-e-2.4.7.orig/perl/Makefile.PL
++++ swish-e-2.4.7/perl/Makefile.PL
+@@ -211,7 +211,7 @@ sub read_swish_config {
+
+ my %config;
+ $config{VERSION} = backtick("$binary --version");
+- $config{LIBS} = backtick("$binary --libs");
++ $config{LIBS} = "-L../src/.libs/ -lxml2 ".backtick("$binary --libs");
+ $config{INC} = backtick("$binary --cflags");
+ $config{BINDIR} = dirname($binary);
+
+--- swish-e-2.4.7.orig/prog-bin/spider.pl.in
++++ swish-e-2.4.7/prog-bin/spider.pl.in
+@@ -35,7 +35,7 @@ use HTML::LinkExtor;
+ use HTML::Tagset;
+
+ use vars '$VERSION';
+-$VERSION = sprintf '%d.%02d', q$Revision: 1900 $ =~ /: (\d+)\.(\d+)/;
++$VERSION = '1.0';
+
+ use vars '$bit';
+ use constant DEBUG_ERRORS => $bit = 1; # program errors
+--- swish-e-2.4.7.orig/src/btree.c
++++ swish-e-2.4.7/src/btree.c
+@@ -321,7 +321,7 @@ unsigned char *key_k;
+ {
+ k = j + (i - j) / 2;
+ key_k = BTREE_KeyData(pg,k);
+- key_len_k = uncompress2(&key_k);
++ key_len_k = swish_uncompress2(&key_k);
+ isbigger = BTREE_CompareKeys(key,key_len,key_k,key_len_k);
+ if (!isbigger)
+ break;
+@@ -358,7 +358,7 @@ sw_off_t data_pointer;
+ return 0;
+
+ *found = BTREE_KeyData(pg,k);
+- *found_len = uncompress2(found);
++ *found_len = swish_uncompress2(found);
+
+ /* Solaris do not like this. Use memcpy instead
+ data_pointer = *(sw_off_t *) (*found + *found_len);
+@@ -483,7 +483,7 @@ int j, k = pos;
+
+ /* Compute length of deleted key */
+ del_key_start = q = BTREE_KeyData(pg,k);
+- q += uncompress2(&q);
++ q += swish_uncompress2(&q);
+ q += sizeof(sw_off_t);
+ del_key_end = q;
+ del_entry_len = del_key_end - del_key_start;
+@@ -610,7 +610,7 @@ int tmp;
+ for(i = 0; i < n; i++)
+ {
+ key_data = start = BTREE_KeyData(pg, pg->n - n + i);
+- key_len = uncompress2(&key_data);
++ key_len = swish_uncompress2(&key_data);
+
+ memcpy(p, start, (key_data - start) + key_len + sizeof(sw_off_t));
+ tmp = p - new_pg->data;
+@@ -628,7 +628,7 @@ int tmp;
+ for(i = 0; i < (int)pg->n ; i++)
+ {
+ key_data = start = BTREE_KeyData(pg,i);
+- key_len = uncompress2(&key_data);
++ key_len = swish_uncompress2(&key_data);
+
+ memmove(p, start, (key_data - start) + key_len + sizeof(sw_off_t));
+ tmp = p - pg->data;
+@@ -687,7 +687,7 @@ int comp;
+ if(!(pg->flags & BTREE_ROOT_NODE))
+ {
+ key_data0 = BTREE_KeyData(pg,0);
+- key_len0 = uncompress2(&key_data0);
++ key_len0 = swish_uncompress2(&key_data0);
+ father_pg = BTREE_ReadPage(b,b->tree[level]);
+ BTREE_InsertInPage(b,father_pg, key_data0, key_len0,
pg->page_number, level - 1, 1);
+ }
+@@ -711,7 +711,7 @@ int comp;
+ pg->next = new_pg->page_number;
+
+ key_data0 = BTREE_KeyData(new_pg,0);
+- key_len0 = uncompress2(&key_data0);
++ key_len0 = swish_uncompress2(&key_data0);
+
+ /* Let's see where to put the key */
+ if(BTREE_CompareKeys(key, key_len, key_data0, key_len0) > 0)
+@@ -740,10 +740,10 @@ int comp;
+ root_page = BTREE_NewPage(b,b->page_size, BTREE_ROOT_NODE);
+
+ key_data0 = BTREE_KeyData(pg,0);
+- key_len0 = uncompress2(&key_data0);
++ key_len0 = swish_uncompress2(&key_data0);
+ BTREE_AddKeyToPage(root_page, 0, key_data0, key_len0 ,
pg->page_number);
+ key_data0 = BTREE_KeyData(new_pg,0);
+- key_len0 = uncompress2(&key_data0);
++ key_len0 = swish_uncompress2(&key_data0);
+ BTREE_AddKeyToPage(root_page, 1, key_data0, key_len0,
new_pg->page_number);
+
+ b->root_page = root_page->page_number;
+@@ -769,7 +769,7 @@ int comp;
+ BTREE_FreePage(b, pg);
+
+ key_data0 = BTREE_KeyData(new_pg,0);
+- key_len0 = uncompress2(&key_data0);
++ key_len0 = swish_uncompress2(&key_data0);
+ BTREE_FreePage(b, BTREE_Walk(b,key_data0,key_len0));
+ }
+ else
+@@ -778,7 +778,7 @@ int comp;
+ BTREE_FreePage(b, pg);
+
+ key_data0 = BTREE_KeyData(new_pg,0);
+- key_len0 = uncompress2(&key_data0);
++ key_len0 = swish_uncompress2(&key_data0);
+ }
+
+ if(!(new_pg->flags & BTREE_ROOT_NODE))
+@@ -827,7 +827,7 @@ BTREE_Page *pg = BTREE_Walk(b,key,key_le
+
+ key_k = BTREE_KeyData(pg,k);
+
+- key_len_k = uncompress2(&key_k);
++ key_len_k = swish_uncompress2(&key_k);
+
+ if ( key_len_k != key_len)
+ return -1; /* Error - Should never happen */
+@@ -903,7 +903,7 @@ int key_len_k;
+ b->current_position = 0;
+ }
+ key_k = BTREE_KeyData(pg,b->current_position);
+- *found_len = key_len_k = uncompress2(&key_k);
++ *found_len = key_len_k = swish_uncompress2(&key_k);
+ *found = emalloc(key_len_k);
+ memcpy(*found,key_k,key_len_k);
+ data_pointer = UNPACKFILEOFFSET(*(unsigned long *) (key_k + key_len_k));
+--- swish-e-2.4.7.orig/src/compress.c
++++ swish-e-2.4.7/src/compress.c
+@@ -194,7 +194,7 @@ int uncompress1(FILE * fp, int (*f_g
+
+ /* same routine but this works with a memory forward buffer instead of file */
+ /* it also increases the buffer pointer */
+-int uncompress2(unsigned char **buffer)
++int swish_uncompress2(unsigned char **buffer)
+ {
+ int _c;
+ int num = 0;
+@@ -604,10 +604,10 @@ void uncompress_location_values(unsigned
+ else
+ (*frequency) |= (*flag) & 15; /* Binary 00001111 */
+
+- *filenum = uncompress2(&p);
++ *filenum = swish_uncompress2(&p);
+
+ if(! (*frequency))
+- *frequency = uncompress2(&p);
++ *frequency = swish_uncompress2(&p);
+
+ *buf = p;
+ }
+@@ -656,7 +656,7 @@ void uncompress_location_positions(unsig
+ }
+
+ /* First position is always "as is" */
+- posdata[0] = (unsigned int)uncompress2(&p);
++ posdata[0] = (unsigned int)swish_uncompress2(&p);
+
+ /* Check if positions where stored as two values per byte or the old
"compress" style */
+ if(flag & POS_4_BIT)
+@@ -674,7 +674,7 @@ void uncompress_location_positions(unsig
+ {
+ for (i = 1; i < frequency; i++)
+ {
+- tmp = uncompress2(&p);
++ tmp = swish_uncompress2(&p);
+ posdata[i] = (unsigned int)tmp;
+ }
+ }
+@@ -974,8 +974,8 @@ void remove_worddata_longs(unsigned c
+ src = worddata;
+
+ /* Jump over tfrequency and get first metaID */
+- tfrequency = uncompress2(&src); /* tfrequency */
+- metaID = uncompress2(&src); /* metaID */
++ tfrequency = swish_uncompress2(&src); /* tfrequency */
++ metaID = swish_uncompress2(&src); /* metaID */
+ dst = src;
+
+ while(1)
+@@ -995,7 +995,7 @@ void remove_worddata_longs(unsigned c
+ progerr("Internal error in remove_worddata_longs");
+
+ /* dst may be smaller than src. So move the data */
+- memcpy(dst,src,data_len);
++ memmove(dst,src,data_len);
+
+ /* Increase pointers */
+ src += data_len;
+@@ -1006,7 +1006,7 @@ void remove_worddata_longs(unsigned c
+ break; /* End of worddata */
+
+ /* Get next metaID */
+- metaID = uncompress2(&src);
++ metaID = swish_uncompress2(&src);
+ dst = compress3(metaID,dst);
+ }
+ /* Adjust to new size */
+--- swish-e-2.4.7.orig/src/compress.h
++++ swish-e-2.4.7/src/compress.h
+@@ -36,7 +36,7 @@ void compress1(int num, FILE *fp, int (*
+ unsigned char *compress3(int num, unsigned char *buffer);
+
+ int uncompress1(FILE *fp, int (*f_getc)(FILE *fp));
+-int uncompress2(unsigned char **buffer);
++int swish_uncompress2(unsigned char **buffer);
+
+
+ unsigned long PACKLONG(unsigned long num);
+--- /dev/null
++++ swish-e-2.4.7/src/compress.loT
+@@ -0,0 +1,7 @@
++# compress.lo - a libtool object file
++# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18
22:14:06)
++#
++# Please DO NOT delete this file!
++# It is necessary for linking the library.
++
++# Name of the PIC object.
+--- swish-e-2.4.7.orig/src/db_native.c
++++ swish-e-2.4.7/src/db_native.c
+@@ -1601,7 +1601,7 @@ long DB_ReadWordData_Native(sw_off_t
+
+ *worddata = buf = WORDDATA_Get(DB->worddata,wordID,data_size);
+ /* Get saved_bytes and adjust data_size */
+- *saved_bytes = uncompress2(&buf);
++ *saved_bytes = swish_uncompress2(&buf);
+ *data_size -= (buf - (*worddata));
+ /* Remove saved_bytes from buffer
+ ** We need to use memmove because data overlaps */
+--- swish-e-2.4.7.orig/src/db_read.c
++++ swish-e-2.4.7/src/db_read.c
+@@ -308,24 +308,24 @@ void parse_MetaNames_from_buffer(INDE
+ /* First clear out the default metanames */
+ freeMetaEntries( header );
+
+- num_metanames = uncompress2(&s);
++ num_metanames = swish_uncompress2(&s);
+
+ for (i = 0; i < num_metanames; i++)
+ {
+- len = uncompress2(&s);
++ len = swish_uncompress2(&s);
+ word = emalloc(len +1);
+ memcpy(word,s,len); s += len;
+ word[len] = '\0';
+ /* Read metaID */
+- metaID = uncompress2(&s);
++ metaID = swish_uncompress2(&s);
+ /* metaType was saved as metaType+1 */
+- metaType = uncompress2(&s);
++ metaType = swish_uncompress2(&s);
+
+- alias = uncompress2(&s) - 1;
++ alias = swish_uncompress2(&s) - 1;
+
+- sort_len = uncompress2(&s);
++ sort_len = swish_uncompress2(&s);
+
+- bias = uncompress2(&s) - RANK_BIAS_RANGE - 1;
++ bias = swish_uncompress2(&s) - RANK_BIAS_RANGE - 1;
+
+
+ /* add the meta tag */
+@@ -350,11 +350,11 @@ static void load_word_hash_from_buffer(W
+
+ unsigned char *s = (unsigned char *)buffer;
+
+- num_words = uncompress2(&s);
++ num_words = swish_uncompress2(&s);
+
+ for (i=0; i < num_words ; i++)
+ {
+- len = uncompress2(&s);
++ len = swish_uncompress2(&s);
+ word = emalloc(len+1);
+ memcpy(word,s,len); s += len;
+ word[len] = '\0';
+@@ -373,10 +373,10 @@ void parse_integer_table_from_buffer(int
+ int tmp,i;
+ unsigned char *s = (unsigned char *)buffer;
+
+- tmp = uncompress2(&s); /* Jump the number of elements */
++ tmp = swish_uncompress2(&s); /* Jump the number of elements */
+ for (i = 0; i < table_size; i++)
+ {
+- tmp = uncompress2(&s); /* Gut all the elements */
++ tmp = swish_uncompress2(&s); /* Gut all the elements */
+ table[i] = tmp - 1;
+ }
+ }
+--- swish-e-2.4.7.orig/src/db_write.c
++++ swish-e-2.4.7/src/db_write.c
+@@ -239,7 +239,7 @@ void build_worddata(SWISH * sw, ENTRY *
+ /* Jump pointer to next element */
+ p = compressed_data + sizeof(LOCATION *);
+
+- metaID = uncompress2(&p);
++ metaID = swish_uncompress2(&p);
+
+ memcpy((char *)&chunk_size,(char *)p,sizeof(chunk_size));
+ p += sizeof(chunk_size);
+@@ -386,12 +386,12 @@ unsigned char *q;
+ ** are presents to calculate a safe size for olddata with packedlongs */
+ p1=olddata;
+ num_metaids1=0;
+- uncompress2(&p1); /* Jump tfreq */
++ swish_uncompress2(&p1); /* Jump tfreq */
+ do
+ {
+ num_metaids1++;
+- uncompress2(&p1); /* Jump metaid */
+- metadata_length_1 = uncompress2(&p1);
++ swish_uncompress2(&p1); /* Jump metaid */
++ metadata_length_1 = swish_uncompress2(&p1);
+ p1 += metadata_length_1;
+ } while ((p1 - olddata) != sz_olddata);
+ maxtotsize = sw->Index->sz_worddata_buffer + (sz_olddata + num_metaids1 *
sizeof(long));
+@@ -417,17 +417,17 @@ unsigned char *q;
+ q = p = sw->Index->worddata_buffer;
+
+ /* Now read tfrequency */
+- tfreq1 = uncompress2(&p1); /* tfrequency - number of files with this word
*/
+- tfreq2 = uncompress2(&p2); /* tfrequency - number of files with this word
*/
++ tfreq1 = swish_uncompress2(&p1); /* tfrequency - number of files with
this word */
++ tfreq2 = swish_uncompress2(&p2); /* tfrequency - number of files with
this word */
+ /* Write tfrequency */
+ p = compress3(tfreq1 + tfreq2, p);
+
+ /* Now look for MetaIDs */
+- curmetaID_1 = uncompress2(&p1);
+- curmetaID_2 = uncompress2(&p2);
++ curmetaID_1 = swish_uncompress2(&p1);
++ curmetaID_2 = swish_uncompress2(&p2);
+
+ /* Old data is compressed in a different more optimized schema */
+- metadata_length_1 = uncompress2(&p1);
++ metadata_length_1 = swish_uncompress2(&p1);
+ nextposmetaname_1 = p1 - olddata + metadata_length_1;
+
+ curmetanamepos_1 = p1 - olddata;
+@@ -485,8 +485,8 @@ unsigned char *q;
+ /* Values for next metaID if exists */
+ if(curmetaID_1)
+ {
+- curmetaID_1 = uncompress2(&p1); /* Next metaID */
+- metadata_length_1 = uncompress2(&p1);
++ curmetaID_1 = swish_uncompress2(&p1); /* Next metaID */
++ metadata_length_1 = swish_uncompress2(&p1);
+ nextposmetaname_1 = p1 - olddata + metadata_length_1;
+ curmetanamepos_1 = p1 - olddata;
+ }
+@@ -522,7 +522,7 @@ unsigned char *q;
+ /* Values for next metaID if exists */
+ if(curmetaID_2)
+ {
+- curmetaID_2 = uncompress2(&p2); /* Next metaID */
++ curmetaID_2 = swish_uncompress2(&p2); /* Next metaID */
+ nextposmetaname_2 = UNPACKLONG2(p2);
+ p2 += sizeof(long);
+ curmetanamepos_2 = p2 - newdata;
+@@ -539,8 +539,8 @@ unsigned char *q;
+ }
+ else
+ {
+- curmetaID_1 = uncompress2(&p1); /* Next metaID */
+- metadata_length_1 = uncompress2(&p1);
++ curmetaID_1 = swish_uncompress2(&p1); /* Next metaID */
++ metadata_length_1 = swish_uncompress2(&p1);
+ nextposmetaname_1 = p1 - olddata + metadata_length_1;
+ curmetanamepos_1 = p1 - olddata;
+ }
+@@ -556,7 +556,7 @@ unsigned char *q;
+ }
+ else
+ {
+- curmetaID_2 = uncompress2(&p2); /* Next metaID */
++ curmetaID_2 = swish_uncompress2(&p2); /* Next metaID */
+ nextposmetaname_2 = UNPACKLONG2(p2);
+ p2 += sizeof(long);
+ curmetanamepos_2 = p2 - newdata;
+@@ -587,8 +587,8 @@ unsigned char *q;
+ }
+ else
+ {
+- curmetaID_1 = uncompress2(&p1); /* Next metaID */
+- metadata_length_1 = uncompress2(&p1);
++ curmetaID_1 = swish_uncompress2(&p1); /* Next metaID */
++ metadata_length_1 = swish_uncompress2(&p1);
+ nextposmetaname_1 = p1 - olddata + metadata_length_1;
+ curmetanamepos_1 = p1 - olddata;
+ }
+@@ -615,7 +615,7 @@ unsigned char *q;
+ }
+ else
+ {
+- curmetaID_2 = uncompress2(&p2); /* Next metaID */
++ curmetaID_2 = swish_uncompress2(&p2); /* Next metaID */
+ nextposmetaname_2 = UNPACKLONG2(p2);
+ p2+= sizeof(long);
+ curmetanamepos_2= p2 - newdata;
+--- swish-e-2.4.7.orig/src/dump.c
++++ swish-e-2.4.7/src/dump.c
+@@ -249,9 +249,9 @@ void DB_decompress(SWISH * sw, IndexF
+ /* parse and print word's data */
+ s = worddata;
+
+- tmpval = uncompress2(&s); /* tfrequency */
+- metaID = uncompress2(&s); /* metaID */
+- metadata_length = uncompress2(&s);
++ tmpval = swish_uncompress2(&s); /* tfrequency */
++ metaID = swish_uncompress2(&s); /* metaID */
++ metadata_length = swish_uncompress2(&s);
+
+ filenum = 0;
+ start = s;
+@@ -276,8 +276,8 @@ void DB_decompress(SWISH * sw, IndexF
+ if ( metadata_length == (s - start))
+ {
+ filenum = 0;
+- metaID = uncompress2(&s);
+- metadata_length = uncompress2(&s);
++ metaID = swish_uncompress2(&s);
++ metadata_length = swish_uncompress2(&s);
+ start = s;
+ }
+
+@@ -337,9 +337,9 @@ void DB_decompress(SWISH * sw, IndexF
+ /* parse and print word's data */
+ s = worddata;
+
+- tmpval = uncompress2(&s); /* tfrequency */
+- metaID = uncompress2(&s); /* metaID */
+- metadata_length = uncompress2(&s);
++ tmpval = swish_uncompress2(&s); /* tfrequency */
++ metaID = swish_uncompress2(&s); /* metaID */
++ metadata_length = swish_uncompress2(&s);
+
+ filenum = 0;
+ start = s;
+@@ -437,8 +437,8 @@ void DB_decompress(SWISH * sw, IndexF
+ if ( metadata_length == (s - start))
+ {
+ filenum = 0;
+- metaID = uncompress2(&s);
+- metadata_length = uncompress2(&s);
++ metaID = swish_uncompress2(&s);
++ metadata_length = swish_uncompress2(&s);
+ start = s;
+ }
+ }
+--- swish-e-2.4.7.orig/src/headers.c
++++ swish-e-2.4.7/src/headers.c
+@@ -280,7 +280,7 @@ static SWISH_HEADER_VALUE fetch_single_h
+
+ case SWISH_NUMBER:
+ case SWISH_BOOL:
+- value.number = *(unsigned long *) data_pointer;
++ value.number = *(unsigned int *) data_pointer;
+
+ /* $$$ Ugly hack alert! */
+ /* correct for removed files */
+--- swish-e-2.4.7.orig/src/index.c
++++ swish-e-2.4.7/src/index.c
+@@ -1748,7 +1748,7 @@ void getPositionsFromIgnoreLimitWords(SW
+ /* Jump pointer to next element */
+ p = compressed_data + sizeof(LOCATION *);
+
+- metaID = uncompress2(&p);
++ metaID = swish_uncompress2(&p);
+
+ memcpy((char *)&chunk_size,(char *)p,sizeof(chunk_size));
+ p += sizeof(chunk_size);
+@@ -1842,8 +1842,8 @@ void adjustWordPositions(unsigned char *
+
+ p = worddata;
+
+- tmpval = uncompress2(&p); /* tfrequency */
+- metaID = uncompress2(&p); /* metaID */
++ tmpval = swish_uncompress2(&p); /* tfrequency */
++ metaID = swish_uncompress2(&p); /* metaID */
+ r_nextposmeta = UNPACKLONG2(p);
+ w_nextposmeta = p;
+ p += sizeof(long);
+@@ -1907,7 +1907,7 @@ void adjustWordPositions(unsigned char *
+ if(q != p)
+ PACKLONG2(q - worddata, w_nextposmeta);
+
+- metaID = uncompress2(&p);
++ metaID = swish_uncompress2(&p);
+ q = compress3(metaID,q);
+
+ r_nextposmeta = UNPACKLONG2(p);
+@@ -2035,7 +2035,7 @@ static void sortChunkLocations(ENTRY
+ /* Jump next offset */
+ compressed_data += sizeof(LOCATION *);
+
+- metaID = uncompress2(&compressed_data);
++ metaID = swish_uncompress2(&compressed_data);
+
uncompress_location_values(&compressed_data,&flag,&filenum,&frequency);
+ pi[0] = metaID;
+ pi[1] = filenum;
+@@ -2784,7 +2784,7 @@ void add_coalesced(SWISH *sw, ENTRY *e,
+ for(tprev =NULL, tloc = e->allLocationList; tloc; )
+ {
+ tp = (unsigned char *)tloc + sizeof(void *);
+- tmp = uncompress2(&tp); /* Read metaID */
++ tmp = swish_uncompress2(&tp); /* Read metaID */
+ if(tmp > metaID)
+ break;
+ tprev = tloc;
+@@ -2854,7 +2854,7 @@ void coalesce_word_locations(SWISH *
+ p += sizeof(LOCATION *);
+
+ /* get metaID of LOCATION */
+- metaID = uncompress2(&p);
++ metaID = swish_uncompress2(&p);
+
+ /* Check for new metaID */
+ if(metaID != curmetaID)
+@@ -3149,7 +3149,7 @@ static void sortSwapLocData(ENTRY *e)
+ /* Jump fileoffset */
+ compressed_data += sizeof(LOCATION *);
+
+- metaID = uncompress2(&compressed_data);
++ metaID = swish_uncompress2(&compressed_data);
+ pi[0] = metaID;
+ pi[1] = i-k;
+ ptmp2 += 2 * sizeof(int);
+--- swish-e-2.4.7.orig/src/merge.c
++++ swish-e-2.4.7/src/merge.c
+@@ -221,12 +221,12 @@ void merge_indexes( SWISH *sw_input, SWI
+
+ /* Now, parse word's data */
+ s = worddata;
+- tmpval = uncompress2(&s); /* tfrequency */
+- metaID = uncompress2(&s); /* metaID */
++ tmpval = swish_uncompress2(&s); /* tfrequency */
++ metaID = swish_uncompress2(&s); /* metaID */
+
+ if (metaID)
+ {
+- metadata_length = uncompress2(&s);
++ metadata_length = swish_uncompress2(&s);
+ }
+
+ filenum = 0;
+@@ -274,8 +274,8 @@ void merge_indexes( SWISH *sw_input, SWI
+ if ( metadata_length == (s - start))
+ {
+ filenum = 0;
+- metaID = uncompress2(&s);
+- metadata_length = uncompress2(&s);
++ metaID = swish_uncompress2(&s);
++ metadata_length = swish_uncompress2(&s);
+ start = s;
+ }
+ }
+--- swish-e-2.4.7.orig/src/parser.c
++++ swish-e-2.4.7/src/parser.c
+@@ -1760,7 +1760,7 @@ static void error(void *data, const char
+ va_start(args, msg);
+ vsnprintf(str, 1000, msg, args );
+ va_end(args);
+- xmlParserError(parse_data->ctxt, str);
++ xmlParserError(parse_data->ctxt, "%s", str);
+ }
+
+ static void warning(void *data, const char *msg, ...)
+@@ -1772,7 +1772,7 @@ static void warning(void *data, const ch
+ va_start(args, msg);
+ vsnprintf(str, 1000, msg, args );
+ va_end(args);
+- xmlParserWarning(parse_data->ctxt, str);
++ xmlParserWarning(parse_data->ctxt, "%s", str);
+ }
+
+
+--- swish-e-2.4.7.orig/src/result_output.c
++++ swish-e-2.4.7/src/result_output.c
+@@ -752,7 +752,7 @@ static void printPropertyResultControl(F
+ s = (char *) emalloc(MAXWORDLEN + 1);
+ n = strftime(s, (size_t) MAXWORDLEN, fmt,
localtime(&(pv->value.v_date)));
+ if (n && f)
+- fprintf(f, s);
++ fprintf(f, "%s", s);
+ efree(s);
+ }
+ break;
+--- swish-e-2.4.7.orig/src/result_sort.c
++++ swish-e-2.4.7/src/result_sort.c
+@@ -260,7 +260,7 @@ int *LoadSortedProps(IndexFILE * inde
+
+ /* Unpack / decompress the numbers */
+ for (j = 0; j < indexf->header.totalfiles; j++)
+- m->sorted_data[j] = uncompress2(&s);
++ m->sorted_data[j] = swish_uncompress2(&s);
+
+ efree(buffer);
+ }
+--- swish-e-2.4.7.orig/src/search.c
++++ swish-e-2.4.7/src/search.c
+@@ -1736,14 +1736,14 @@ static RESULT_LIST *getfileinfo(DB_RESUL
+ // buffer structure = <tfreq><metaID><delta to next meta>
+
+ /* Get the data of the word */
+- tfrequency = uncompress2(&s); /* tfrequency - number of files with
this word */
++ tfrequency = swish_uncompress2(&s); /* tfrequency - number of files
with this word */
+
+ /* Now look for a correct Metaname */
+- curmetaID = uncompress2(&s);
++ curmetaID = swish_uncompress2(&s);
+
+ while (curmetaID)
+ {
+- metadata_length = uncompress2(&s);
++ metadata_length = swish_uncompress2(&s);
+
+ if (curmetaID >= metaID)
+ break;
+@@ -1755,7 +1755,7 @@ static RESULT_LIST *getfileinfo(DB_RESUL
+ if(s == (buffer + sz_buffer))
+ break; /* exit if no more meta data */
+
+- curmetaID = uncompress2(&s);
++ curmetaID = swish_uncompress2(&s);
+ }
+
+ if (curmetaID == metaID) /* found a matching meta value */
+--- swish-e-2.4.7.orig/src/swishspider
++++ swish-e-2.4.7/src/swishspider
+@@ -27,6 +27,7 @@ use LWP::UserAgent;
+ use HTTP::Status;
+ use HTML::Parser 3.00;
+ use HTML::LinkExtor;
++use Encode;
+
+ if (scalar(@ARGV) != 2) {
+ print STDERR "Usage: $0 localpath url\n";
+@@ -94,7 +95,7 @@ use HTML::LinkExtor;
+ # Don't allow links above the base
+ $URI::ABS_REMOTE_LEADING_DOTS = 1;
+
+- $p->parse( $$content_ref );
++ $p->parse( decode_utf8 $$content_ref );
+ close( LINKS );
+
+ exit;
+--- swish-e-2.4.7.orig/swish-e.pc.in
++++ swish-e-2.4.7/swish-e.pc.in
+@@ -9,4 +9,4 @@ Version: @VERSION@
+ Description: SWISH-E - Simple Web Indexing System for Humans - Enhanced
+ Requires:
+ Libs: -L${libdir} -lswish-e @Z_LIBS@ @LIBS@
+-Cflags: @CFLAGS@ -I${includedir} @Z_CFLAGS@
++Cflags: -I${includedir} @Z_CFLAGS@
diff -Nru swish-e-2.4.7/debian/patches/series
swish-e-2.4.7/debian/patches/series
--- swish-e-2.4.7/debian/patches/series 1970-01-01 01:00:00.000000000 +0100
+++ swish-e-2.4.7/debian/patches/series 2023-08-15 21:36:06.000000000 +0200
@@ -0,0 +1,2 @@
+debian.patch
+ver.patch
diff -Nru swish-e-2.4.7/debian/patches/ver.patch
swish-e-2.4.7/debian/patches/ver.patch
--- swish-e-2.4.7/debian/patches/ver.patch 1970-01-01 01:00:00.000000000
+0100
+++ swish-e-2.4.7/debian/patches/ver.patch 2023-08-15 21:36:06.000000000
+0200
@@ -0,0 +1,11 @@
+--- swish-e-2.4.7.orig/perl/API.pm
++++ swish-e-2.4.7/perl/API.pm
+@@ -3,7 +3,7 @@ package SWISH::API;
+ # $Id: API.pm 1806 2006-06-21 19:01:20Z karman $
+
+ use vars qw/ @ISA $VERSION /;
+-$VERSION = '0.04';
++$VERSION = '0.05';
+
+ # prefer XSLoader over DynaLoader
+ eval {
diff -Nru swish-e-2.4.7/debian/rules swish-e-2.4.7/debian/rules
--- swish-e-2.4.7/debian/rules 2023-08-15 22:31:00.000000000 +0200
+++ swish-e-2.4.7/debian/rules 2023-08-15 21:36:06.000000000 +0200
@@ -35,7 +35,7 @@
build.stamp:
dh_testdir
dh_update_autotools_config
- env CC=gcc CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure
--mandir=\$${prefix}/share/man --with-libxml2 --with-pcre --prefix=/usr
+ env CC=gcc CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure
--mandir=\$${prefix}/share/man --with-libxml2 --prefix=/usr
$(MAKE)
#$(MAKE) docs
#(cd doc;$(MAKE) man)
diff -Nru swish-e-2.4.7/debian/source/format swish-e-2.4.7/debian/source/format
--- swish-e-2.4.7/debian/source/format 1970-01-01 01:00:00.000000000 +0100
+++ swish-e-2.4.7/debian/source/format 2023-08-15 21:36:06.000000000 +0200
@@ -0,0 +1 @@
+3.0 (quilt)
diff -Nru swish-e-2.4.7/debian/swish-e.substvars
swish-e-2.4.7/debian/swish-e.substvars
--- swish-e-2.4.7/debian/swish-e.substvars 2009-04-05 03:58:26.000000000
+0200
+++ swish-e-2.4.7/debian/swish-e.substvars 1970-01-01 01:00:00.000000000
+0100
@@ -1 +0,0 @@
-shlibs:Depends=libc6 (>= 2.3.2-1), libxml2 (>= 2.5.7-1), zlib1g (>= 1:1.1.4)
diff -Nru swish-e-2.4.7/man/SWISH-FAQ.1 swish-e-2.4.7/man/SWISH-FAQ.1
--- swish-e-2.4.7/man/SWISH-FAQ.1 2023-08-15 22:31:00.000000000 +0200
+++ swish-e-2.4.7/man/SWISH-FAQ.1 2009-04-05 04:02:34.000000000 +0200
@@ -131,7 +131,7 @@
.IX Title "SWISH-FAQ 1"
.TH SWISH-FAQ 1 "2009-04-04" "2.4.7" "SWISH-E Documentation"
.SH "NAME"
-SWISH-FAQ \- The Swish\-e FAQ. Answers to Common Questions
+The Swish\-e FAQ \- Answers to Common Questions
.SH "OVERVIEW"
.IX Header "OVERVIEW"
List of commonly asked and answered questions. Please review this
diff -Nru swish-e-2.4.7/perl/API.pm swish-e-2.4.7/perl/API.pm
--- swish-e-2.4.7/perl/API.pm 2023-08-15 22:31:00.000000000 +0200
+++ swish-e-2.4.7/perl/API.pm 2009-04-05 03:58:33.000000000 +0200
@@ -1,9 +1,9 @@
package SWISH::API;
-# $Id$
+# $Id: API.pm 1806 2006-06-21 19:01:20Z karman $
use vars qw/ @ISA $VERSION /;
-$VERSION = '0.05';
+$VERSION = '0.04';
# prefer XSLoader over DynaLoader
eval {
@@ -214,17 +214,10 @@
=item $swish-E<gt>rank_scheme( 0|1 );
-Like the -R option with the swish-e command line tool. The default
+Similar to the -R option with the swish-e command line tool. The default
ranking scheme is 0. Set it to 1 to experiment with other ranking features.
See the SWISH-CONFIG documentation for more on ranking schemes.
-=item $swish-E<gt>return_raw_rank( 0|1 );
-
-Like the -a option with the swish-e command line tool. The default, 0,
-return ranks normalized to the range 0-1000. When enabled by setting to 1,
-ranks are returned 'raw' (as computed by Swish-e internally during the search)
-and are only guaranteed to be non-negative.
-
=back
=head3 Error Handling
diff -Nru swish-e-2.4.7/perl/API.xs swish-e-2.4.7/perl/API.xs
--- swish-e-2.4.7/perl/API.xs 2023-08-15 22:31:00.000000000 +0200
+++ swish-e-2.4.7/perl/API.xs 2009-04-05 03:58:33.000000000 +0200
@@ -2,7 +2,7 @@
#include "perl.h"
#include "XSUB.h"
-/* $Id$ */
+/* $Id: API.xs 2291 2009-03-31 01:56:00Z karpet $ */
#include <swish-e.h>
@@ -221,9 +221,7 @@
break;
default:
- croak(" Unknown header type '%ld'\n", (long int)header_type );
- /* constants used in cases above are enum-ed in headers.h */
-
+ croak(" Unknown header type '%d'\n", header_type );
}
diff -Nru swish-e-2.4.7/perl/Makefile.PL swish-e-2.4.7/perl/Makefile.PL
--- swish-e-2.4.7/perl/Makefile.PL 2023-08-15 22:31:00.000000000 +0200
+++ swish-e-2.4.7/perl/Makefile.PL 2009-04-05 03:58:33.000000000 +0200
@@ -211,7 +211,7 @@
my %config;
$config{VERSION} = backtick("$binary --version");
- $config{LIBS} = "-L../src/.libs/ -lxml2 ".backtick("$binary --libs");
+ $config{LIBS} = backtick("$binary --libs");
$config{INC} = backtick("$binary --cflags");
$config{BINDIR} = dirname($binary);
diff -Nru swish-e-2.4.7/prog-bin/spider.pl.in
swish-e-2.4.7/prog-bin/spider.pl.in
--- swish-e-2.4.7/prog-bin/spider.pl.in 2023-08-15 22:31:00.000000000 +0200
+++ swish-e-2.4.7/prog-bin/spider.pl.in 2009-04-05 03:58:35.000000000 +0200
@@ -4,7 +4,7 @@
# This is set to where Swish-e's "make install" installed the helper modules.
use lib ( '@@perlmoduledir@@' );
-# $Id$
+# $Id: spider.pl.in 1900 2007-02-07 17:28:56Z moseley $
#
# "prog" document source for spidering web servers
#
@@ -35,7 +35,7 @@
use HTML::Tagset;
use vars '$VERSION';
-$VERSION = '1.0';
+$VERSION = sprintf '%d.%02d', q$Revision: 1900 $ =~ /: (\d+)\.(\d+)/;
use vars '$bit';
use constant DEBUG_ERRORS => $bit = 1; # program errors
diff -Nru swish-e-2.4.7/src/btree.c swish-e-2.4.7/src/btree.c
--- swish-e-2.4.7/src/btree.c 2023-08-15 22:31:00.000000000 +0200
+++ swish-e-2.4.7/src/btree.c 2009-04-05 03:58:32.000000000 +0200
@@ -321,7 +321,7 @@
{
k = j + (i - j) / 2;
key_k = BTREE_KeyData(pg,k);
- key_len_k = swish_uncompress2(&key_k);
+ key_len_k = uncompress2(&key_k);
isbigger = BTREE_CompareKeys(key,key_len,key_k,key_len_k);
if (!isbigger)
break;
@@ -358,7 +358,7 @@
return 0;
*found = BTREE_KeyData(pg,k);
- *found_len = swish_uncompress2(found);
+ *found_len = uncompress2(found);
/* Solaris do not like this. Use memcpy instead
data_pointer = *(sw_off_t *) (*found + *found_len);
@@ -483,7 +483,7 @@
/* Compute length of deleted key */
del_key_start = q = BTREE_KeyData(pg,k);
- q += swish_uncompress2(&q);
+ q += uncompress2(&q);
q += sizeof(sw_off_t);
del_key_end = q;
del_entry_len = del_key_end - del_key_start;
@@ -610,7 +610,7 @@
for(i = 0; i < n; i++)
{
key_data = start = BTREE_KeyData(pg, pg->n - n + i);
- key_len = swish_uncompress2(&key_data);
+ key_len = uncompress2(&key_data);
memcpy(p, start, (key_data - start) + key_len + sizeof(sw_off_t));
tmp = p - new_pg->data;
@@ -628,7 +628,7 @@
for(i = 0; i < (int)pg->n ; i++)
{
key_data = start = BTREE_KeyData(pg,i);
- key_len = swish_uncompress2(&key_data);
+ key_len = uncompress2(&key_data);
memmove(p, start, (key_data - start) + key_len + sizeof(sw_off_t));
tmp = p - pg->data;
@@ -687,7 +687,7 @@
if(!(pg->flags & BTREE_ROOT_NODE))
{
key_data0 = BTREE_KeyData(pg,0);
- key_len0 = swish_uncompress2(&key_data0);
+ key_len0 = uncompress2(&key_data0);
father_pg = BTREE_ReadPage(b,b->tree[level]);
BTREE_InsertInPage(b,father_pg, key_data0, key_len0,
pg->page_number, level - 1, 1);
}
@@ -711,7 +711,7 @@
pg->next = new_pg->page_number;
key_data0 = BTREE_KeyData(new_pg,0);
- key_len0 = swish_uncompress2(&key_data0);
+ key_len0 = uncompress2(&key_data0);
/* Let's see where to put the key */
if(BTREE_CompareKeys(key, key_len, key_data0, key_len0) > 0)
@@ -740,10 +740,10 @@
root_page = BTREE_NewPage(b,b->page_size, BTREE_ROOT_NODE);
key_data0 = BTREE_KeyData(pg,0);
- key_len0 = swish_uncompress2(&key_data0);
+ key_len0 = uncompress2(&key_data0);
BTREE_AddKeyToPage(root_page, 0, key_data0, key_len0 ,
pg->page_number);
key_data0 = BTREE_KeyData(new_pg,0);
- key_len0 = swish_uncompress2(&key_data0);
+ key_len0 = uncompress2(&key_data0);
BTREE_AddKeyToPage(root_page, 1, key_data0, key_len0,
new_pg->page_number);
b->root_page = root_page->page_number;
@@ -769,7 +769,7 @@
BTREE_FreePage(b, pg);
key_data0 = BTREE_KeyData(new_pg,0);
- key_len0 = swish_uncompress2(&key_data0);
+ key_len0 = uncompress2(&key_data0);
BTREE_FreePage(b, BTREE_Walk(b,key_data0,key_len0));
}
else
@@ -778,7 +778,7 @@
BTREE_FreePage(b, pg);
key_data0 = BTREE_KeyData(new_pg,0);
- key_len0 = swish_uncompress2(&key_data0);
+ key_len0 = uncompress2(&key_data0);
}
if(!(new_pg->flags & BTREE_ROOT_NODE))
@@ -827,7 +827,7 @@
key_k = BTREE_KeyData(pg,k);
- key_len_k = swish_uncompress2(&key_k);
+ key_len_k = uncompress2(&key_k);
if ( key_len_k != key_len)
return -1; /* Error - Should never happen */
@@ -903,7 +903,7 @@
b->current_position = 0;
}
key_k = BTREE_KeyData(pg,b->current_position);
- *found_len = key_len_k = swish_uncompress2(&key_k);
+ *found_len = key_len_k = uncompress2(&key_k);
*found = emalloc(key_len_k);
memcpy(*found,key_k,key_len_k);
data_pointer = UNPACKFILEOFFSET(*(unsigned long *) (key_k + key_len_k));
diff -Nru swish-e-2.4.7/src/compress.c swish-e-2.4.7/src/compress.c
--- swish-e-2.4.7/src/compress.c 2023-08-15 22:31:00.000000000 +0200
+++ swish-e-2.4.7/src/compress.c 2009-04-05 03:58:32.000000000 +0200
@@ -194,7 +194,7 @@
/* same routine but this works with a memory forward buffer instead of file */
/* it also increases the buffer pointer */
-int swish_uncompress2(unsigned char **buffer)
+int uncompress2(unsigned char **buffer)
{
int _c;
int num = 0;
@@ -604,10 +604,10 @@
else
(*frequency) |= (*flag) & 15; /* Binary 00001111 */
- *filenum = swish_uncompress2(&p);
+ *filenum = uncompress2(&p);
if(! (*frequency))
- *frequency = swish_uncompress2(&p);
+ *frequency = uncompress2(&p);
*buf = p;
}
@@ -656,7 +656,7 @@
}
/* First position is always "as is" */
- posdata[0] = (unsigned int)swish_uncompress2(&p);
+ posdata[0] = (unsigned int)uncompress2(&p);
/* Check if positions where stored as two values per byte or the old
"compress" style */
if(flag & POS_4_BIT)
@@ -674,7 +674,7 @@
{
for (i = 1; i < frequency; i++)
{
- tmp = swish_uncompress2(&p);
+ tmp = uncompress2(&p);
posdata[i] = (unsigned int)tmp;
}
}
@@ -974,8 +974,8 @@
src = worddata;
/* Jump over tfrequency and get first metaID */
- tfrequency = swish_uncompress2(&src); /* tfrequency */
- metaID = swish_uncompress2(&src); /* metaID */
+ tfrequency = uncompress2(&src); /* tfrequency */
+ metaID = uncompress2(&src); /* metaID */
dst = src;
while(1)
@@ -995,7 +995,7 @@
progerr("Internal error in remove_worddata_longs");
/* dst may be smaller than src. So move the data */
- memmove(dst,src,data_len);
+ memcpy(dst,src,data_len);
/* Increase pointers */
src += data_len;
@@ -1006,7 +1006,7 @@
break; /* End of worddata */
/* Get next metaID */
- metaID = swish_uncompress2(&src);
+ metaID = uncompress2(&src);
dst = compress3(metaID,dst);
}
/* Adjust to new size */
diff -Nru swish-e-2.4.7/src/compress.h swish-e-2.4.7/src/compress.h
--- swish-e-2.4.7/src/compress.h 2023-08-15 22:31:00.000000000 +0200
+++ swish-e-2.4.7/src/compress.h 2009-04-05 03:58:32.000000000 +0200
@@ -36,7 +36,7 @@
unsigned char *compress3(int num, unsigned char *buffer);
int uncompress1(FILE *fp, int (*f_getc)(FILE *fp));
-int swish_uncompress2(unsigned char **buffer);
+int uncompress2(unsigned char **buffer);
unsigned long PACKLONG(unsigned long num);
diff -Nru swish-e-2.4.7/src/compress.loT swish-e-2.4.7/src/compress.loT
--- swish-e-2.4.7/src/compress.loT 2023-08-15 22:31:00.000000000 +0200
+++ swish-e-2.4.7/src/compress.loT 1970-01-01 01:00:00.000000000 +0100
@@ -1,7 +0,0 @@
-# compress.lo - a libtool object file
-# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18
22:14:06)
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# Name of the PIC object.
diff -Nru swish-e-2.4.7/src/db_native.c swish-e-2.4.7/src/db_native.c
--- swish-e-2.4.7/src/db_native.c 2023-08-15 22:31:00.000000000 +0200
+++ swish-e-2.4.7/src/db_native.c 2009-04-05 03:58:32.000000000 +0200
@@ -1601,7 +1601,7 @@
*worddata = buf = WORDDATA_Get(DB->worddata,wordID,data_size);
/* Get saved_bytes and adjust data_size */
- *saved_bytes = swish_uncompress2(&buf);
+ *saved_bytes = uncompress2(&buf);
*data_size -= (buf - (*worddata));
/* Remove saved_bytes from buffer
** We need to use memmove because data overlaps */
diff -Nru swish-e-2.4.7/src/db_read.c swish-e-2.4.7/src/db_read.c
--- swish-e-2.4.7/src/db_read.c 2023-08-15 22:31:00.000000000 +0200
+++ swish-e-2.4.7/src/db_read.c 2009-04-05 03:58:32.000000000 +0200
@@ -308,24 +308,24 @@
/* First clear out the default metanames */
freeMetaEntries( header );
- num_metanames = swish_uncompress2(&s);
+ num_metanames = uncompress2(&s);
for (i = 0; i < num_metanames; i++)
{
- len = swish_uncompress2(&s);
+ len = uncompress2(&s);
word = emalloc(len +1);
memcpy(word,s,len); s += len;
word[len] = '\0';
/* Read metaID */
- metaID = swish_uncompress2(&s);
+ metaID = uncompress2(&s);
/* metaType was saved as metaType+1 */
- metaType = swish_uncompress2(&s);
+ metaType = uncompress2(&s);
- alias = swish_uncompress2(&s) - 1;
+ alias = uncompress2(&s) - 1;
- sort_len = swish_uncompress2(&s);
+ sort_len = uncompress2(&s);
- bias = swish_uncompress2(&s) - RANK_BIAS_RANGE - 1;
+ bias = uncompress2(&s) - RANK_BIAS_RANGE - 1;
/* add the meta tag */
@@ -350,11 +350,11 @@
unsigned char *s = (unsigned char *)buffer;
- num_words = swish_uncompress2(&s);
+ num_words = uncompress2(&s);
for (i=0; i < num_words ; i++)
{
- len = swish_uncompress2(&s);
+ len = uncompress2(&s);
word = emalloc(len+1);
memcpy(word,s,len); s += len;
word[len] = '\0';
@@ -373,10 +373,10 @@
int tmp,i;
unsigned char *s = (unsigned char *)buffer;
- tmp = swish_uncompress2(&s); /* Jump the number of elements */
+ tmp = uncompress2(&s); /* Jump the number of elements */
for (i = 0; i < table_size; i++)
{
- tmp = swish_uncompress2(&s); /* Gut all the elements */
+ tmp = uncompress2(&s); /* Gut all the elements */
table[i] = tmp - 1;
}
}
diff -Nru swish-e-2.4.7/src/db_write.c swish-e-2.4.7/src/db_write.c
--- swish-e-2.4.7/src/db_write.c 2023-08-15 22:31:00.000000000 +0200
+++ swish-e-2.4.7/src/db_write.c 2009-04-05 03:58:32.000000000 +0200
@@ -239,7 +239,7 @@
/* Jump pointer to next element */
p = compressed_data + sizeof(LOCATION *);
- metaID = swish_uncompress2(&p);
+ metaID = uncompress2(&p);
memcpy((char *)&chunk_size,(char *)p,sizeof(chunk_size));
p += sizeof(chunk_size);
@@ -386,12 +386,12 @@
** are presents to calculate a safe size for olddata with packedlongs */
p1=olddata;
num_metaids1=0;
- swish_uncompress2(&p1); /* Jump tfreq */
+ uncompress2(&p1); /* Jump tfreq */
do
{
num_metaids1++;
- swish_uncompress2(&p1); /* Jump metaid */
- metadata_length_1 = swish_uncompress2(&p1);
+ uncompress2(&p1); /* Jump metaid */
+ metadata_length_1 = uncompress2(&p1);
p1 += metadata_length_1;
} while ((p1 - olddata) != sz_olddata);
maxtotsize = sw->Index->sz_worddata_buffer + (sz_olddata + num_metaids1 *
sizeof(long));
@@ -417,17 +417,17 @@
q = p = sw->Index->worddata_buffer;
/* Now read tfrequency */
- tfreq1 = swish_uncompress2(&p1); /* tfrequency - number of files with this
word */
- tfreq2 = swish_uncompress2(&p2); /* tfrequency - number of files with this
word */
+ tfreq1 = uncompress2(&p1); /* tfrequency - number of files with this word
*/
+ tfreq2 = uncompress2(&p2); /* tfrequency - number of files with this word
*/
/* Write tfrequency */
p = compress3(tfreq1 + tfreq2, p);
/* Now look for MetaIDs */
- curmetaID_1 = swish_uncompress2(&p1);
- curmetaID_2 = swish_uncompress2(&p2);
+ curmetaID_1 = uncompress2(&p1);
+ curmetaID_2 = uncompress2(&p2);
/* Old data is compressed in a different more optimized schema */
- metadata_length_1 = swish_uncompress2(&p1);
+ metadata_length_1 = uncompress2(&p1);
nextposmetaname_1 = p1 - olddata + metadata_length_1;
curmetanamepos_1 = p1 - olddata;
@@ -485,8 +485,8 @@
/* Values for next metaID if exists */
if(curmetaID_1)
{
- curmetaID_1 = swish_uncompress2(&p1); /* Next metaID */
- metadata_length_1 = swish_uncompress2(&p1);
+ curmetaID_1 = uncompress2(&p1); /* Next metaID */
+ metadata_length_1 = uncompress2(&p1);
nextposmetaname_1 = p1 - olddata + metadata_length_1;
curmetanamepos_1 = p1 - olddata;
}
@@ -522,7 +522,7 @@
/* Values for next metaID if exists */
if(curmetaID_2)
{
- curmetaID_2 = swish_uncompress2(&p2); /* Next metaID */
+ curmetaID_2 = uncompress2(&p2); /* Next metaID */
nextposmetaname_2 = UNPACKLONG2(p2);
p2 += sizeof(long);
curmetanamepos_2 = p2 - newdata;
@@ -539,8 +539,8 @@
}
else
{
- curmetaID_1 = swish_uncompress2(&p1); /* Next metaID */
- metadata_length_1 = swish_uncompress2(&p1);
+ curmetaID_1 = uncompress2(&p1); /* Next metaID */
+ metadata_length_1 = uncompress2(&p1);
nextposmetaname_1 = p1 - olddata + metadata_length_1;
curmetanamepos_1 = p1 - olddata;
}
@@ -556,7 +556,7 @@
}
else
{
- curmetaID_2 = swish_uncompress2(&p2); /* Next metaID */
+ curmetaID_2 = uncompress2(&p2); /* Next metaID */
nextposmetaname_2 = UNPACKLONG2(p2);
p2 += sizeof(long);
curmetanamepos_2 = p2 - newdata;
@@ -587,8 +587,8 @@
}
else
{
- curmetaID_1 = swish_uncompress2(&p1); /* Next metaID */
- metadata_length_1 = swish_uncompress2(&p1);
+ curmetaID_1 = uncompress2(&p1); /* Next metaID */
+ metadata_length_1 = uncompress2(&p1);
nextposmetaname_1 = p1 - olddata + metadata_length_1;
curmetanamepos_1 = p1 - olddata;
}
@@ -615,7 +615,7 @@
}
else
{
- curmetaID_2 = swish_uncompress2(&p2); /* Next metaID */
+ curmetaID_2 = uncompress2(&p2); /* Next metaID */
nextposmetaname_2 = UNPACKLONG2(p2);
p2+= sizeof(long);
curmetanamepos_2= p2 - newdata;
diff -Nru swish-e-2.4.7/src/dump.c swish-e-2.4.7/src/dump.c
--- swish-e-2.4.7/src/dump.c 2023-08-15 22:31:00.000000000 +0200
+++ swish-e-2.4.7/src/dump.c 2009-04-05 03:58:32.000000000 +0200
@@ -249,9 +249,9 @@
/* parse and print word's data */
s = worddata;
- tmpval = swish_uncompress2(&s); /* tfrequency */
- metaID = swish_uncompress2(&s); /* metaID */
- metadata_length = swish_uncompress2(&s);
+ tmpval = uncompress2(&s); /* tfrequency */
+ metaID = uncompress2(&s); /* metaID */
+ metadata_length = uncompress2(&s);
filenum = 0;
start = s;
@@ -276,8 +276,8 @@
if ( metadata_length == (s - start))
{
filenum = 0;
- metaID = swish_uncompress2(&s);
- metadata_length = swish_uncompress2(&s);
+ metaID = uncompress2(&s);
+ metadata_length = uncompress2(&s);
start = s;
}
@@ -337,9 +337,9 @@
/* parse and print word's data */
s = worddata;
- tmpval = swish_uncompress2(&s); /* tfrequency */
- metaID = swish_uncompress2(&s); /* metaID */
- metadata_length = swish_uncompress2(&s);
+ tmpval = uncompress2(&s); /* tfrequency */
+ metaID = uncompress2(&s); /* metaID */
+ metadata_length = uncompress2(&s);
filenum = 0;
start = s;
@@ -437,8 +437,8 @@
if ( metadata_length == (s - start))
{
filenum = 0;
- metaID = swish_uncompress2(&s);
- metadata_length = swish_uncompress2(&s);
+ metaID = uncompress2(&s);
+ metadata_length = uncompress2(&s);
start = s;
}
}
diff -Nru swish-e-2.4.7/src/headers.c swish-e-2.4.7/src/headers.c
--- swish-e-2.4.7/src/headers.c 2023-08-15 22:31:00.000000000 +0200
+++ swish-e-2.4.7/src/headers.c 2009-04-05 03:58:32.000000000 +0200
@@ -280,7 +280,7 @@
case SWISH_NUMBER:
case SWISH_BOOL:
- value.number = *(unsigned int *) data_pointer;
+ value.number = *(unsigned long *) data_pointer;
/* $$$ Ugly hack alert! */
/* correct for removed files */
diff -Nru swish-e-2.4.7/src/index.c swish-e-2.4.7/src/index.c
--- swish-e-2.4.7/src/index.c 2023-08-15 22:31:00.000000000 +0200
+++ swish-e-2.4.7/src/index.c 2009-04-05 03:58:32.000000000 +0200
@@ -1748,7 +1748,7 @@
/* Jump pointer to next element */
p = compressed_data + sizeof(LOCATION *);
- metaID = swish_uncompress2(&p);
+ metaID = uncompress2(&p);
memcpy((char *)&chunk_size,(char *)p,sizeof(chunk_size));
p += sizeof(chunk_size);
@@ -1842,8 +1842,8 @@
p = worddata;
- tmpval = swish_uncompress2(&p); /* tfrequency */
- metaID = swish_uncompress2(&p); /* metaID */
+ tmpval = uncompress2(&p); /* tfrequency */
+ metaID = uncompress2(&p); /* metaID */
r_nextposmeta = UNPACKLONG2(p);
w_nextposmeta = p;
p += sizeof(long);
@@ -1907,7 +1907,7 @@
if(q != p)
PACKLONG2(q - worddata, w_nextposmeta);
- metaID = swish_uncompress2(&p);
+ metaID = uncompress2(&p);
q = compress3(metaID,q);
r_nextposmeta = UNPACKLONG2(p);
@@ -2035,7 +2035,7 @@
/* Jump next offset */
compressed_data += sizeof(LOCATION *);
- metaID = swish_uncompress2(&compressed_data);
+ metaID = uncompress2(&compressed_data);
uncompress_location_values(&compressed_data,&flag,&filenum,&frequency);
pi[0] = metaID;
pi[1] = filenum;
@@ -2784,7 +2784,7 @@
for(tprev =NULL, tloc = e->allLocationList; tloc; )
{
tp = (unsigned char *)tloc + sizeof(void *);
- tmp = swish_uncompress2(&tp); /* Read metaID */
+ tmp = uncompress2(&tp); /* Read metaID */
if(tmp > metaID)
break;
tprev = tloc;
@@ -2854,7 +2854,7 @@
p += sizeof(LOCATION *);
/* get metaID of LOCATION */
- metaID = swish_uncompress2(&p);
+ metaID = uncompress2(&p);
/* Check for new metaID */
if(metaID != curmetaID)
@@ -3149,7 +3149,7 @@
/* Jump fileoffset */
compressed_data += sizeof(LOCATION *);
- metaID = swish_uncompress2(&compressed_data);
+ metaID = uncompress2(&compressed_data);
pi[0] = metaID;
pi[1] = i-k;
ptmp2 += 2 * sizeof(int);
diff -Nru swish-e-2.4.7/src/merge.c swish-e-2.4.7/src/merge.c
--- swish-e-2.4.7/src/merge.c 2023-08-15 22:31:00.000000000 +0200
+++ swish-e-2.4.7/src/merge.c 2009-04-05 03:58:32.000000000 +0200
@@ -221,12 +221,12 @@
/* Now, parse word's data */
s = worddata;
- tmpval = swish_uncompress2(&s); /* tfrequency */
- metaID = swish_uncompress2(&s); /* metaID */
+ tmpval = uncompress2(&s); /* tfrequency */
+ metaID = uncompress2(&s); /* metaID */
if (metaID)
{
- metadata_length = swish_uncompress2(&s);
+ metadata_length = uncompress2(&s);
}
filenum = 0;
@@ -274,8 +274,8 @@
if ( metadata_length == (s - start))
{
filenum = 0;
- metaID = swish_uncompress2(&s);
- metadata_length = swish_uncompress2(&s);
+ metaID = uncompress2(&s);
+ metadata_length = uncompress2(&s);
start = s;
}
}
diff -Nru swish-e-2.4.7/src/parser.c swish-e-2.4.7/src/parser.c
--- swish-e-2.4.7/src/parser.c 2023-08-15 22:31:00.000000000 +0200
+++ swish-e-2.4.7/src/parser.c 2009-04-05 03:58:32.000000000 +0200
@@ -1760,7 +1760,7 @@
va_start(args, msg);
vsnprintf(str, 1000, msg, args );
va_end(args);
- xmlParserError(parse_data->ctxt, "%s", str);
+ xmlParserError(parse_data->ctxt, str);
}
static void warning(void *data, const char *msg, ...)
@@ -1772,7 +1772,7 @@
va_start(args, msg);
vsnprintf(str, 1000, msg, args );
va_end(args);
- xmlParserWarning(parse_data->ctxt, "%s", str);
+ xmlParserWarning(parse_data->ctxt, str);
}
diff -Nru swish-e-2.4.7/src/result_output.c swish-e-2.4.7/src/result_output.c
--- swish-e-2.4.7/src/result_output.c 2023-08-15 22:31:00.000000000 +0200
+++ swish-e-2.4.7/src/result_output.c 2009-04-05 03:58:32.000000000 +0200
@@ -752,7 +752,7 @@
s = (char *) emalloc(MAXWORDLEN + 1);
n = strftime(s, (size_t) MAXWORDLEN, fmt,
localtime(&(pv->value.v_date)));
if (n && f)
- fprintf(f, "%s", s);
+ fprintf(f, s);
efree(s);
}
break;
diff -Nru swish-e-2.4.7/src/result_sort.c swish-e-2.4.7/src/result_sort.c
--- swish-e-2.4.7/src/result_sort.c 2023-08-15 22:31:00.000000000 +0200
+++ swish-e-2.4.7/src/result_sort.c 2009-04-05 03:58:32.000000000 +0200
@@ -260,7 +260,7 @@
/* Unpack / decompress the numbers */
for (j = 0; j < indexf->header.totalfiles; j++)
- m->sorted_data[j] = swish_uncompress2(&s);
+ m->sorted_data[j] = uncompress2(&s);
efree(buffer);
}
diff -Nru swish-e-2.4.7/src/search.c swish-e-2.4.7/src/search.c
--- swish-e-2.4.7/src/search.c 2023-08-15 22:31:00.000000000 +0200
+++ swish-e-2.4.7/src/search.c 2009-04-05 03:58:32.000000000 +0200
@@ -1736,14 +1736,14 @@
// buffer structure = <tfreq><metaID><delta to next meta>
/* Get the data of the word */
- tfrequency = swish_uncompress2(&s); /* tfrequency - number of files
with this word */
+ tfrequency = uncompress2(&s); /* tfrequency - number of files with
this word */
/* Now look for a correct Metaname */
- curmetaID = swish_uncompress2(&s);
+ curmetaID = uncompress2(&s);
while (curmetaID)
{
- metadata_length = swish_uncompress2(&s);
+ metadata_length = uncompress2(&s);
if (curmetaID >= metaID)
break;
@@ -1755,7 +1755,7 @@
if(s == (buffer + sz_buffer))
break; /* exit if no more meta data */
- curmetaID = swish_uncompress2(&s);
+ curmetaID = uncompress2(&s);
}
if (curmetaID == metaID) /* found a matching meta value */
diff -Nru swish-e-2.4.7/src/swishspider swish-e-2.4.7/src/swishspider
--- swish-e-2.4.7/src/swishspider 2023-08-15 22:31:00.000000000 +0200
+++ swish-e-2.4.7/src/swishspider 2009-04-05 03:58:32.000000000 +0200
@@ -27,7 +27,6 @@
use HTTP::Status;
use HTML::Parser 3.00;
use HTML::LinkExtor;
-use Encode;
if (scalar(@ARGV) != 2) {
print STDERR "Usage: $0 localpath url\n";
@@ -95,7 +94,7 @@
# Don't allow links above the base
$URI::ABS_REMOTE_LEADING_DOTS = 1;
- $p->parse( decode_utf8 $$content_ref );
+ $p->parse( $$content_ref );
close( LINKS );
exit;
diff -Nru swish-e-2.4.7/swish-e.pc.in swish-e-2.4.7/swish-e.pc.in
--- swish-e-2.4.7/swish-e.pc.in 2023-08-15 22:31:00.000000000 +0200
+++ swish-e-2.4.7/swish-e.pc.in 2009-04-05 03:58:35.000000000 +0200
@@ -9,4 +9,4 @@
Description: SWISH-E - Simple Web Indexing System for Humans - Enhanced
Requires:
Libs: -L${libdir} -lswish-e @Z_LIBS@ @LIBS@
-Cflags: -I${includedir} @Z_CFLAGS@
+Cflags: @CFLAGS@ -I${includedir} @Z_CFLAGS@