pike.git / src / stralloc.c

version» Context lines:

pike.git/src/stralloc.c:20:      #include <errno.h>   #include <float.h>   #include <ctype.h>   #include <math.h>      #ifndef HUGE   #define HUGE HUGE_VAL   #endif /*!HUGE*/    - RCSID("$Id: stralloc.c,v 1.135 2001/09/21 21:53:19 grubba Exp $"); + RCSID("$Id: stralloc.c,v 1.136 2001/09/24 16:44:06 grubba Exp $");      /* #define STRALLOC_USE_PRIMES */      #ifdef STRALLOC_USE_PRIMES      #define SET_HSIZE(X) htable_size=hashprimes[(X)]   #define HMODULO(X) ((X) % htable_size)      #else   
pike.git/src/stralloc.c:1605:    return ret;    }   }         PMOD_EXPORT ptrdiff_t string_search(struct pike_string *haystack,    struct pike_string *needle,    ptrdiff_t start)   {    SearchMojt mojt; -  struct generic_mem_searcher s; +     char *r;       if(needle->size_shift > haystack->size_shift ||    start + needle->len > haystack->len)    return -1;       mojt=compile_memsearcher(MKPCHARP_STR(needle),    needle->len,    haystack->len,    needle);
pike.git/src/stralloc.c:2079:    string_build_mkspace(s, howmany, shift);    tmp = MINIMUM(howmany, len - offset);       generic_memcpy(MKPCHARP_STR_OFF(s->s,s->s->len),    ADD_PCHARP(from,offset),    tmp);    s->s->len+=tmp;    howmany-=tmp;    if(howmany > 0)    { -  void *new_from; +     PCHARP to;    tmp=MINIMUM(howmany, len);    to=MKPCHARP_STR_OFF(s->s,s->s->len);    generic_memcpy(to,from, tmp);    s->s->len+=tmp;    howmany-=tmp;       while(howmany > 0)    {    tmp = MINIMUM(len, howmany);