pike.git / src / stralloc.c

version» Context lines:

pike.git/src/stralloc.c:8:   #include "pike_macros.h"   #include "dynamic_buffer.h"   #include "pike_macros.h"   #include "pike_memory.h"   #include "error.h"   #include "gc.h"   #include "stuff.h"      #include <ctype.h>    - RCSID("$Id: stralloc.c,v 1.36 1998/05/25 10:38:46 hubbe Exp $"); + RCSID("$Id: stralloc.c,v 1.37 1998/05/25 19:38:31 grubba Exp $");      #define BEGIN_HASH_SIZE 997   #define MAX_AVG_LINK_LENGTH 3   #define HASH_PREFIX 64      unsigned INT32 htable_size=0;   static unsigned int hashprimes_entry=0;   static struct pike_string **base_table=0;   static unsigned INT32 full_hash_value;   unsigned INT32 num_strings=0;
pike.git/src/stralloc.c:373: Inside #if defined(DEBUG)
   if(s->str[s->len])    {    locate_problem(improper_zero_termination);    fatal("Shared string is not zero terminated properly.\n");    }   }      void verify_shared_strings_tables(void)   {    unsigned INT32 e, h, num=0; +  unsigned INT32 orig_full_hash = full_hash_value;    struct pike_string *s;       for(e=0;e<htable_size;e++)    {    h=0;    for(s=base_table[e];s;s=s->next)    {    num++;    h++;    if(s->len < 0)
pike.git/src/stralloc.c:418: Inside #if defined(DEBUG)
   struct pike_string *s2;    for(s2=s;s2;s2=s2->next)    if(s2 == s)    fatal("Shared string table is cyclic.\n");    h=0;    }    }    }    if(num != num_strings)    fatal("Num strings is wrong %d!=%d\n",num,num_strings); +  full_hash_value = orig_full_hash;   }      int safe_debug_findstring(struct pike_string *foo)   {    unsigned INT32 e;    if(!base_table) return 0;    for(e=0;e<htable_size;e++)    {    struct pike_string *p;    for(p=base_table[e];p;p=p->next)