pike.git / src / opcodes.c

version» Context lines:

pike.git/src/opcodes.c:19:   #include "pike_types.h"   #include "pike_memory.h"   #include "fd_control.h"   #include "cyclic.h"   #include "builtin_functions.h"   #include "module_support.h"   #include "security.h"   #include "bignum.h"   #include "operators.h"    - RCSID("$Id: opcodes.c,v 1.81 2000/08/09 14:49:50 grubba Exp $"); + RCSID("$Id: opcodes.c,v 1.82 2000/08/10 09:51:51 per Exp $");      void index_no_free(struct svalue *to,struct svalue *what,struct svalue *ind)   {    INT32 i;      #ifdef PIKE_SECURITY    if(what->type <= MAX_COMPLEX)    if(!CHECK_DATA_SECURITY(what->u.array, SECURITY_BIT_INDEX))    error("Index permission denied.\n");   #endif
pike.git/src/opcodes.c:803:   #endif      #ifdef NEED_CUSTOM_IEEE      #if HAVE_LDEXP   #define LDEXP ldexp   #else   extern double LDEXP(double x, int exp); /* defined in encode.c */   #endif    - static INLINE float low_parse_IEEE_float(char *b, int sz) + static INLINE FLOAT_TYPE low_parse_IEEE_float(char *b, int sz)   {    unsigned INT32 f, extra_f;    int s, e;    unsigned char x[4];    double r;       x[0] = EXTRACT_UCHAR(b);    x[1] = EXTRACT_UCHAR(b+1);    x[2] = EXTRACT_UCHAR(b+2);    x[3] = EXTRACT_UCHAR(b+3);
pike.git/src/opcodes.c:848:    e -= 1023+20;    } else    e -= 1022+20;    }    if(e>=9999)    if(f||extra_f) {    /* NAN */       /* Hmm... No idea how to generate NaN in a portable way. */    /* Let's turn it into a 0 for now... */ -  return (float)0.0; +  return (FLOAT_TYPE)0.0;    } else {    /* +/- Infinity */   #ifdef HUGE_VAL -  return (float)(s? -HUGE_VAL:HUGE_VAL); +  return (FLOAT_TYPE)(s? -HUGE_VAL:HUGE_VAL);   #else    /* This number is infinite enough... :) */    e = 1024;    f = 1;    extra_f = 0;   #endif    }       r = (double)f;    if(extra_f)    r += ((double)extra_f)/4294967296.0; -  return (float)(s? -LDEXP(r, e):LDEXP(r, e)); +  return (FLOAT_TYPE)(s? -LDEXP(r, e):LDEXP(r, e));   }      #endif      #ifdef PIKE_DEBUG   #define DO_IF_DEBUG(X) X   #else /* !PIKE_DEBUG */   #define DO_IF_DEBUG(X)   #endif /* PIKE_DEBUG */