pike.git / src / stuff.c

version» Context lines:

pike.git/src/stuff.c:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/      /* -  * $Id: stuff.c,v 1.7 1999/02/27 20:35:34 grubba Exp $ +  * $Id: stuff.c,v 1.8 1999/02/27 21:54:39 grubba Exp $    */ -  + #include "global.h"   #include "stuff.h" -  + #include "stralloc.h"      /* Not all of these are primes, but they should be adequate */   INT32 hashprimes[32] =   {    31, /* ~ 2^0 = 1 */    31, /* ~ 2^1 = 2 */    31, /* ~ 2^2 = 4 */    31, /* ~ 2^3 = 8 */    31, /* ~ 2^4 = 16 */    31, /* ~ 2^5 = 32 */
pike.git/src/stuff.c:129:    /* NOTE: Cuts at 63 digits */       char buff[64];    int i;    double res;    char *end_;       endptr->shift = ptr.shift;       if (!ptr.shift) { -  return my_strtod(ptr.ptr, &endptr->ptr); +  return my_strtod(ptr.ptr, (char **)&endptr->ptr);    }       for (i=0; i < 63; i++) {    unsigned int c = INDEX_PCHARP(ptr, i);    if (!c || (c >= 256)) {    break;    }    buff[i] = c;    }    buff[i] = 0;       res = my_strtod(buff, &end_);    -  endptr->ptr = ptr.ptr + ((end_ - buff)<<SHIFT); +  endptr->ptr = ptr.ptr + ((end_ - buff)<<ptr.shift);    return res;   }