pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.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: builtin_functions.c,v 1.516 2003/11/07 18:06:30 nilsson Exp $ + || $Id: builtin_functions.c,v 1.517 2003/11/07 21:28:07 mast Exp $   */      #include "global.h" - RCSID("$Id: builtin_functions.c,v 1.516 2003/11/07 18:06:30 nilsson Exp $"); + RCSID("$Id: builtin_functions.c,v 1.517 2003/11/07 21:28:07 mast Exp $");   #include "interpret.h"   #include "svalue.h"   #include "pike_macros.h"   #include "object.h"   #include "program.h"   #include "array.h"   #include "pike_error.h"   #include "constants.h"   #include "mapping.h"   #include "stralloc.h"
pike.git/src/builtin_functions.c:38:   #include "opcodes.h"   #include "cyclic.h"   #include "signal_handler.h"   #include "security.h"   #include "builtin_functions.h"   #include "bignum.h"   #include "language.h"   #include "peep.h"   #include "docode.h"   #include "lex.h" + #include "pike_float.h"      #ifdef HAVE_POLL   #ifdef HAVE_POLL_H   #include <poll.h>   #endif /* HAVE_POLL_H */      #ifdef HAVE_SYS_POLL_H   #include <sys/poll.h>   #endif /* HAVE_SYS_POLL_H */   #endif /* HAVE_POLL */
pike.git/src/builtin_functions.c:2887:    e=((e & 0x55555555UL)<<1) + ((e & 0xaaaaaaaaUL)>>1);    e=((e & 0x33333333UL)<<2) + ((e & 0xccccccccUL)>>2);    e=((e & 0x0f0f0f0fUL)<<4) + ((e & 0xf0f0f0f0UL)>>4);    e=((e & 0x00ff00ffUL)<<8) + ((e & 0xff00ff00UL)>>8);    e=((e & 0x0000ffffUL)<<16)+ ((e & 0xffff0000UL)>>16);    Pike_sp[-args].u.integer=e;    pop_n_elems(args-1);    break;    }    +  /* FIXME: Bignum support. */ +     case T_ARRAY:    {    struct array *a;    a=reverse_array(Pike_sp[-args].u.array);    pop_n_elems(args);    push_array(a);    break;    }       default:
pike.git/src/builtin_functions.c:4758:       /* The min array */    push_array(min = allocate_array(arr->size));       /* Initialize the min array */    for (i = 0; i < arr->size; i++) {    struct mapping *m;    /* e and k are used by MAPPING_LOOP() */    INT32 e;    struct keypair *k; -  INT_TYPE low = 0x7fffffff; +  INT_TYPE low = MAX_INT_TYPE;   #ifdef PIKE_DEBUG    if (ITEM(arr)[i].type != T_MAPPING) {    Pike_error("interleave_array(): Element %d is not a mapping!\n", i);    }   #endif /* PIKE_DEBUG */    m = ITEM(arr)[i].u.mapping;    MAPPING_LOOP(m) {    if (k->ind.type != T_INT) {    Pike_error("interleave_array(): Index not an integer in mapping %d!\n", i);    }
pike.git/src/builtin_functions.c:8432: Inside #if defined(PIKE_DEBUG)
   ADD_EFUN("_dump_backlog", f__dump_backlog,    tFunc(tNone,tVoid), OPT_SIDE_EFFECT);    ADD_EFUN("_gdb_breakpoint", pike_gdb_breakpoint,    tFuncV(tNone,tMix,tVoid), OPT_SIDE_EFFECT);   #endif       ADD_EFUN("_gc_status",f__gc_status,    tFunc(tNone,tMap(tString,tOr(tInt,tFloat))),    OPT_EXTERNAL_DEPEND);    +  ADD_INT_CONSTANT ("NATIVE_INT_MAX", MAX_INT_TYPE, 0); +  ADD_INT_CONSTANT ("NATIVE_INT_MIN", MIN_INT_TYPE, 0); +  +  /* Maybe make PIKEFLOAT_MANT_DIG, PIKEFLOAT_MIN_EXP and +  * PIKEFLOAT_MAX_EXP available, but do we have to export FLT_RADIX +  * too? It'd be nice to always assume it's 2 to save the pike +  * programmer from that headache. */ +  ADD_INT_CONSTANT ("FLOAT_DIGITS_10", PIKEFLOAT_DIG, 0); +  ADD_INT_CONSTANT ("FLOAT_MIN_10_EXP", PIKEFLOAT_MIN_10_EXP, 0); +  ADD_INT_CONSTANT ("FLOAT_MAX_10_EXP", PIKEFLOAT_MAX_10_EXP, 0); +  ADD_FLOAT_CONSTANT ("FLOAT_MAX", PIKEFLOAT_MAX, 0); +  ADD_FLOAT_CONSTANT ("FLOAT_MIN", PIKEFLOAT_MIN, 0); +  ADD_FLOAT_CONSTANT ("FLOAT_EPSILON", PIKEFLOAT_EPSILON, 0); +    #ifdef WITH_DOUBLE_PRECISION_SVALUE    ADD_INT_CONSTANT("__DOUBLE_PRECISION_FLOAT__",1,0);   #else   #ifdef WITH_LONG_DOUBLE_PRECISION_SVALUE    ADD_INT_CONSTANT("__LONG_DOUBLE_PRECISION_FLOAT__",1,0);   #else    ADD_INT_CONSTANT("__FLOAT_PRECISION_FLOAT__",1,0);   #endif   #endif   }