pike.git / src / stralloc.c

version» Context lines:

pike.git/src/stralloc.c:11:   #include "pike_macros.h"   #include "pike_memory.h"   #include "error.h"   #include "gc.h"   #include "stuff.h"      #include <errno.h>   #include <ctype.h>   #include <math.h>    - RCSID("$Id: stralloc.c,v 1.55 1999/03/01 05:32:35 hubbe Exp $"); + RCSID("$Id: stralloc.c,v 1.56 1999/03/04 06:05:11 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:885:    return 1;    }else if(alen < blen){    tmp=MEMCMP(a, b, alen);    if(tmp) return tmp;    return -1;    }else{    return MEMCMP(a, b, alen);    }   }    +    /* does not take locale into account */   int generic_quick_binary_strcmp(const char *a,INT32 alen, int asize,    const char *b,INT32 blen, int bsize)   {    if(!asize && !bsize)    {    int tmp;    if(alen > blen)    {    tmp=MEMCMP(a, b, blen);
pike.git/src/stralloc.c:916:    for(pos=0;pos< MINIMUM(alen,blen) ;pos++)    {    INT32 ac=generic_extract(a,asize,pos);    INT32 bc=generic_extract(b,bsize,pos);    if(ac-bc) return ac-bc;    }    return alen-blen;    }   }    + int c_compare_string(struct pike_string *s, char *foo, int len) + { +  return s->len == len && s->size_shift == 0 && !MEMCMP(s->str,foo,len); + } +    #ifndef HAVE_STRCOLL   /* No locale function available */   static int low_binary_strcmp(char *a,INT32 alen,    char *b,INT32 blen)   {    low_quick_binary_strcmp(a,alen,b,blen);   }   #else      /* takes locale into account */