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.43 1998/10/14 05:48:46 hubbe Exp $"); + RCSID("$Id: stralloc.c,v 1.44 1998/10/14 22:18:18 hubbe 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:132:   { int tmp; while(--len>=0) if((tmp=*(to++)-*(from++))) return tmp; return 0; }         CONVERT(0,1)   CONVERT(0,2)   CONVERT(1,0)   CONVERT(1,2)   CONVERT(2,0)   CONVERT(2,1)    - #ifdef DEBUG - #ifdef DEBUG_MALLOC - #define DM(X) X - #else - #define DM(X) - #endif +       int generic_compare_strings(const void *a,int alen, int asize,    const void *b,int blen, int bsize)   {   #define TWO_SIZES(X,Y) (((X)<<2)+(Y))    if(alen != blen) return 0;    if(asize==bsize)    {    return !MEMCPY(a,b,alen<<asize);    }else{
pike.git/src/stralloc.c:201:    break;    }   }      INLINE void pike_string_cpy(PCHARP to,    struct pike_string *from)   {    generic_memcpy(to,MKPCHARP_STR(from),from->len);   }    +  + #ifdef DEBUG + #ifdef DEBUG_MALLOC + #define DM(X) X + #else + #define DM(X) + #endif +    static void locate_problem(int (*isproblem)(struct pike_string *))   {    unsigned INT32 e;    struct pike_string *s;    DM(struct memhdr *yes=alloc_memhdr());    DM(struct memhdr *no=alloc_memhdr());       for(e=0;e<htable_size;e++)    {    for(s=base_table[e];s;s=s->next)