pike.git / src / stralloc.c

version» Context lines:

pike.git/src/stralloc.c:3:   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/   /**/   #include "global.h"   #include "stralloc.h"   #include "pike_macros.h"   #include "dynamic_buffer.h"   #include "pike_macros.h"   #include "pike_memory.h" - #include "error.h" + #include "pike_error.h"   #include "gc.h"   #include "stuff.h"   #include "bignum.h"   #include "interpret.h"   #include "block_alloc.h"      #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.108 2000/11/29 21:23:18 hubbe Exp $"); + RCSID("$Id: stralloc.c,v 1.109 2000/12/01 08:09:55 hubbe 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:2190:       return 1;   }      PMOD_EXPORT int convert_stack_top_string_to_inumber(int base)   {    struct svalue r;    int i;       if(sp[-1].type != T_STRING) -  error("Cannot convert stack top to integer number.\n"); +  Pike_error("Cannot convert stack top to integer number.\n");       i=pcharp_to_svalue_inumber(&r, MKPCHARP_STR(sp[-1].u.string), 0, base, 0);       free_string(sp[-1].u.string);    sp[-1] = r;       return i;   }      /* Convert PCHARP to a double. If ENDPTR is not NULL, a pointer to the
pike.git/src/stralloc.c:2331:    }       if(exponent < 0 && exponent >-100) /* make sure we don't underflow */    num /= pow(10.0, (double) -exponent);    else    num *= pow(10.0, (double) exponent);       return num * sign;       overflow: -  /* Return an overflow error. */ +  /* Return an overflow Pike_error. */    errno = ERANGE;    return HUGE * sign;       underflow: -  /* Return an underflow error. */ +  /* Return an underflow Pike_error. */    if (endptr != NULL)    *endptr = nptr;    errno = ERANGE;    return 0.0;       noconv:    /* There was no number. */    if (endptr != NULL)    *endptr = nptr;    return 0.0;