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.86 2000/08/14 20:31:17 grubba Exp $"); + RCSID("$Id: opcodes.c,v 1.87 2000/08/15 11:38:23 grubba 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:745:    if(last < (size_t)sizeof(set->c)) \    set->c[last]=1; \   CHAROPT( \    else{ \    if(set_size && \    ((size_t)sp[-1].u.integer) == last-1) \    { \    sp[-1].u.integer++; \    }else{ \    check_stack(2); \ -  push_int(last); \ -  push_int(last); \ +  push_int64(last); \ +  push_int64(last); \    set_size++; \    } \    } \   ) \    } \    \   CHAROPT( \    if(set_size) \    { \    INT32 *order; \
pike.git/src/opcodes.c:967:    x[3] = (INPUT)[3]; \    x[4] = (INPUT)[4]; \    x[5] = (INPUT)[5]; \    x[6] = (INPUT)[6]; \    x[7] = (INPUT)[7]; \    (SVAL).u.float_number = low_parse_IEEE_float(x, 8); \    } while(0)   #endif   #endif    + /* Avoid some warnings about loss of precision */ + #ifdef __ECL + static inline int TO_INT32(ptrdiff_t x) + { +  return DO_NOT_WARN((int)x); + } + #else /* !__ECL */ + #define TO_INT32(x) ((int)x) + #endif /* __ECL */ +    #define MK_VERY_LOW_SSCANF(INPUT_SHIFT, MATCH_SHIFT) \   static INT32 PIKE_CONCAT4(very_low_sscanf_,INPUT_SHIFT,_,MATCH_SHIFT)( \    PIKE_CONCAT(p_wchar, INPUT_SHIFT) *input, \    ptrdiff_t input_len, \    PIKE_CONCAT(p_wchar, MATCH_SHIFT) *match, \    ptrdiff_t match_len, \    ptrdiff_t *chars_matched, \    int *success) \   { \    struct svalue sval; \
pike.git/src/opcodes.c:1094:    struct svalue *save_sp=sp; \    PIKE_CONCAT4(very_low_sscanf_, INPUT_SHIFT, _, MATCH_SHIFT)( \    input+eye, \    input_len-eye, \    match+cnt+1, \    e-cnt-2, \    &tmp, \    &yes); \    if(yes && tmp) \    { \ -  f_aggregate(sp-save_sp); \ +  f_aggregate(TO_INT32(sp-save_sp)); \    sval.u.array=append_array(sval.u.array,sp-1); \    pop_stack(); \    eye+=tmp; \    }else{ \    pop_n_elems(sp-save_sp); \    break; \    } \    } \    cnt=e; \    UNSET_ONERROR(err); \
pike.git/src/opcodes.c:1490:    if(set.a) { free_array(set.a); set.a=0; } \    sval.type=T_STRING; \    DO_IF_CHECKER(sval.subtype=0); \    sval.u.string=PIKE_CONCAT(make_shared_binary_string, \    INPUT_SHIFT)(input+e,eye-e); \    break; \    \    case 'n': \    sval.type=T_INT; \    sval.subtype=NUMBER_NUMBER; \ -  sval.u.integer=eye; \ +  sval.u.integer=TO_INT32(eye); \    break; \    \    default: \    error("Unknown sscanf token %%%c(0x%02x)\n", \    match[cnt], match[cnt]); \    } \    break; \    } \    matches++; \    \