pike.git / src / stralloc.c

version» Context lines:

pike.git/src/stralloc.c:19:      #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.119 2001/08/29 11:52:11 grubba Exp $"); + RCSID("$Id: stralloc.c,v 1.120 2001/09/21 21:53:08 grubba Exp $");      #define BEGIN_HASH_SIZE 997   #define MAX_AVG_LINK_LENGTH 3      /* Experimental dynamic hash length */   #ifndef HASH_PREFIX   static unsigned int HASH_PREFIX=64;   static unsigned int need_more_hash_prefix=0;   #endif   
pike.git/src/stralloc.c:1788:    really_free_pike_string(s->s);    s->malloced=l;    s->s=n;    }    else if(((size_t)s->s->len+chars) > ((size_t)s->malloced))    {    size_t newlen = MAXIMUM((size_t)(s->malloced*2),    (size_t)(s->s->len + chars));    ptrdiff_t oldlen = s->s->len;    +  s->s->len = s->malloced; /* Restore the real length */    s->s = realloc_unlinked_string(s->s, newlen);    s->s->len = oldlen;    s->malloced = newlen;    }   }      PMOD_EXPORT void *string_builder_allocate(struct string_builder *s, ptrdiff_t chars, int mag)   {    void *ret;    string_build_mkspace(s, chars, mag);