pike.git / src / stralloc.c

version» Context lines:

pike.git/src/stralloc.c:2446:    Pike_fatal("Non-positive count in call to string_builder_putchars().\n");    if (!count) return;       string_build_mkspace(s, count, mag);    if (mag > s->known_shift) {    s->known_shift = mag;    }       switch (s->s->size_shift) {    case 0: -  MEMSET (STR0 (s->s) + s->s->len, ch, count); +  memset (STR0 (s->s) + s->s->len, ch, count);    break;    case 1: {    int i;    for (i = 0; i < count; i++)    (STR1 (s->s) + s->s->len)[i] = ch;    break;    }    case 2: {    int i;    for (i = 0; i < count; i++)
pike.git/src/stralloc.c:2601: Inside #if defined(PIKE_DEBUG)
  #ifdef PIKE_DEBUG    if(len<=0)    Pike_fatal("Cannot fill with zero length strings!\n");   #endif    if(howmany<=0) return;       if(!s->s->size_shift &&    len == 1 &&    (!from.shift || !min_magnitude(EXTRACT_PCHARP(from))))    { -  MEMSET(string_builder_allocate(s,howmany,0), +  memset(string_builder_allocate(s,howmany,0),    EXTRACT_PCHARP(from),    howmany);    /* Ensure NUL-termination */    s->s->str[s->s->len << s->s->size_shift] = 0;    return;    }       if ((shift = from.shift) > s->s->size_shift) {    /* Check if we really need the extra magnitude. */    /* FIXME: What about offset? */
pike.git/src/stralloc.c:3539:    free_string(Pike_sp[-1].u.string);    Pike_sp[-1] = r;       return i;   }      /* Convert PCHARP to a double. If ENDPTR is not NULL, a pointer to the    character after the last one used in the number is put in *ENDPTR. */   PMOD_EXPORT double STRTOD_PCHARP(PCHARP nptr, PCHARP *endptr)   { -  /* Note: Code duplication in STRTOD. */ +  /* Note: Code duplication in strtod. */       register PCHARP s;    short int sign;       /* The number so far. */    double num;       int got_dot; /* Found a decimal point. */    int got_digit; /* Seen any digits. */