pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/www/swish-e Don't conflict with uncompress2 from zlib.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/86ac52be4230
branches:  trunk
changeset: 358291:86ac52be4230
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Thu Feb 09 00:18:01 2017 +0000

description:
Don't conflict with uncompress2 from zlib.

diffstat:

 www/swish-e/distinfo                         |   13 ++-
 www/swish-e/patches/patch-src_btree.c        |  116 +++++++++++++++++++++++++++
 www/swish-e/patches/patch-src_compress.c     |   64 ++++++++++++++
 www/swish-e/patches/patch-src_compress.h     |   13 +++
 www/swish-e/patches/patch-src_db__native.c   |   13 +++
 www/swish-e/patches/patch-src_db__read.c     |   63 ++++++++++++++
 www/swish-e/patches/patch-src_db__write.c    |  112 ++++++++++++++++++++++++++
 www/swish-e/patches/patch-src_dump.c         |   52 ++++++++++++
 www/swish-e/patches/patch-src_index.c        |   69 ++++++++++++++++
 www/swish-e/patches/patch-src_merge.c        |   31 +++++++
 www/swish-e/patches/patch-src_result__sort.c |   13 +++
 www/swish-e/patches/patch-src_search.c       |   31 +++++++
 12 files changed, 589 insertions(+), 1 deletions(-)

diffs (truncated from 645 to 300 lines):

diff -r d364772f7197 -r 86ac52be4230 www/swish-e/distinfo
--- a/www/swish-e/distinfo      Thu Feb 09 00:17:07 2017 +0000
+++ b/www/swish-e/distinfo      Thu Feb 09 00:18:01 2017 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.10 2015/11/04 02:47:39 agc Exp $
+$NetBSD: distinfo,v 1.11 2017/02/09 00:18:01 joerg Exp $
 
 SHA1 (swish-e-2.4.5.tar.gz) = 9e93580ef75c372eb232bc0a4940ce76f41a87f6
 RMD160 (swish-e-2.4.5.tar.gz) = b89d8cc8d8f850d2ddf0b52b583a1cb1c0f3c1b3
@@ -9,3 +9,14 @@
 SHA1 (patch-ad) = 52e5061b9fb54d6f68b833dcbaa13c24b1138927
 SHA1 (patch-ae) = 216aaac5d791ec537f00c73d4e77033e90e15147
 SHA1 (patch-af) = a15bd7a6d6c6077b657a7b4b7c29e08a31f18a76
+SHA1 (patch-src_btree.c) = 5c5fde012c52b187649dc5d05618ccc718a963c4
+SHA1 (patch-src_compress.c) = 33adc08cb02adf24c87a4ca3e6ea81eee33f18ad
+SHA1 (patch-src_compress.h) = 5946b3c2d8c40491269d5a46b5ade09ba0315fec
+SHA1 (patch-src_db__native.c) = f845c49a2d5fd6d1436a5b6a52350e6333bb5e74
+SHA1 (patch-src_db__read.c) = f95833b15ee4e797613d7bfd9cd1705eaa4b60c5
+SHA1 (patch-src_db__write.c) = aef2f748675c459086d75f2bf7e3c50963f8a9ec
+SHA1 (patch-src_dump.c) = 4f8a2242cea218aa18b9c8519df54aa7a485630a
+SHA1 (patch-src_index.c) = e9abd6b2c8be0a1aa53166413d1ab37762b5edb6
+SHA1 (patch-src_merge.c) = ab2fe40304697635d01657bdcab6faeb245a4c75
+SHA1 (patch-src_result__sort.c) = 438293733093084926f7e310ef77421055f09ae1
+SHA1 (patch-src_search.c) = c8a1a9bd5676245ce5576b31049b6eca071f2581
diff -r d364772f7197 -r 86ac52be4230 www/swish-e/patches/patch-src_btree.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/swish-e/patches/patch-src_btree.c     Thu Feb 09 00:18:01 2017 +0000
@@ -0,0 +1,116 @@
+$NetBSD: patch-src_btree.c,v 1.1 2017/02/09 00:18:01 joerg Exp $
+
+--- src/btree.c.orig   2017-02-08 21:49:08.790805235 +0000
++++ 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));
diff -r d364772f7197 -r 86ac52be4230 www/swish-e/patches/patch-src_compress.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/swish-e/patches/patch-src_compress.c  Thu Feb 09 00:18:01 2017 +0000
@@ -0,0 +1,64 @@
+$NetBSD: patch-src_compress.c,v 1.1 2017/02/09 00:18:01 joerg Exp $
+
+--- src/compress.c.orig        2017-02-08 21:54:48.736189312 +0000
++++ 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)
+@@ -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 */
diff -r d364772f7197 -r 86ac52be4230 www/swish-e/patches/patch-src_compress.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/swish-e/patches/patch-src_compress.h  Thu Feb 09 00:18:01 2017 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_compress.h,v 1.1 2017/02/09 00:18:01 joerg Exp $
+
+--- src/compress.h.orig        2017-02-08 21:48:02.207439712 +0000
++++ 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);
diff -r d364772f7197 -r 86ac52be4230 www/swish-e/patches/patch-src_db__native.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/swish-e/patches/patch-src_db__native.c        Thu Feb 09 00:18:01 2017 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_db__native.c,v 1.1 2017/02/09 00:18:01 joerg Exp $
+
+--- src/db_native.c.orig       2017-02-08 21:49:04.614639531 +0000
++++ src/db_native.c
+@@ -1595,7 +1595,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 */
diff -r d364772f7197 -r 86ac52be4230 www/swish-e/patches/patch-src_db__read.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/swish-e/patches/patch-src_db__read.c  Thu Feb 09 00:18:01 2017 +0000
@@ -0,0 +1,63 @@
+$NetBSD: patch-src_db__read.c,v 1.1 2017/02/09 00:18:01 joerg Exp $
+
+--- src/db_read.c.orig 2017-02-08 21:49:36.517681427 +0000
++++ 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';



Home | Main Index | Thread Index | Old Index