pike.git / src / stralloc.c

version» Context lines:

pike.git/src/stralloc.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: stralloc.c,v 1.150 2002/12/01 00:16:55 mast Exp $ + || $Id: stralloc.c,v 1.151 2003/02/26 12:31:57 mast Exp $   */      #include "global.h"   #include "stralloc.h"   #include "pike_macros.h"   #include "dynamic_buffer.h"   #include "pike_macros.h"   #include "pike_memory.h"   #include "pike_error.h"   #include "gc.h"
pike.git/src/stralloc.c:21:      #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.150 2002/12/01 00:16:55 mast Exp $"); + RCSID("$Id: stralloc.c,v 1.151 2003/02/26 12:31:57 mast 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:2414:    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. */ +     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. */       /* The exponent of the number. */
pike.git/src/stralloc.c:2547:       return num * sign;       overflow:    /* Return an overflow error. */    errno = ERANGE;    return HUGE * sign;       underflow:    /* Return an underflow error. */ + #if 0    if (endptr != NULL)    *endptr = nptr; -  + #endif    errno = ERANGE;    return 0.0;       noconv:    /* There was no number. */    if (endptr != NULL)    *endptr = nptr;    return 0.0;   }