pike.git / src / opcodes.c

version» Context lines:

pike.git/src/opcodes.c:14:   #include "multiset.h"   #include "opcodes.h"   #include "object.h"   #include "error.h"   #include "pike_types.h"   #include "pike_memory.h"   #include "fd_control.h"   #include "cyclic.h"   #include "builtin_functions.h"    - RCSID("$Id: opcodes.c,v 1.17 1998/04/06 04:18:33 hubbe Exp $"); + RCSID("$Id: opcodes.c,v 1.18 1998/04/14 20:10:49 hubbe Exp $");      void index_no_free(struct svalue *to,struct svalue *what,struct svalue *ind)   {    INT32 i;    switch(what->type)    {    case T_ARRAY:    simple_array_index_no_free(to,what->u.array,ind);    break;   
pike.git/src/opcodes.c:497:    sval.u.integer|=EXTRACT_UCHAR(input+eye);    eye++;    }    break;       case 'd':    {    char * t;       if(eye>=input_len) return matches; +  if(field_length != -1 && eye+field_length < input_len) +  { +  char save=input[eye+field_length+1];    sval.u.integer=STRTOL(input+eye,&t,10); -  +  input[eye+field_length+1]=save; +  }else +  sval.u.integer=STRTOL(input+eye,&t,10); +     if(input + eye == t) return matches;    eye=t-input;    sval.type=T_INT;    sval.subtype=NUMBER_NUMBER;    break;    }       case 'x':    {    char * t;       if(eye>=input_len) return matches; -  +  if(field_length != -1 && eye+field_length < input_len) +  { +  char save=input[eye+field_length+1];    sval.u.integer=STRTOL(input+eye,&t,16); -  +  input[eye+field_length+1]=save; +  }else +  sval.u.integer=STRTOL(input+eye,&t,16);    if(input + eye == t) return matches;    eye=t-input;    sval.type=T_INT;    sval.subtype=NUMBER_NUMBER;    break;    }       case 'o':    {    char * t;       if(eye>=input_len) return matches; -  +  if(field_length != -1 && eye+field_length < input_len) +  { +  char save=input[eye+field_length+1];    sval.u.integer=STRTOL(input+eye,&t,8); -  +  input[eye+field_length+1]=save; +  }else +  sval.u.integer=STRTOL(input+eye,&t,8);    if(input + eye == t) return matches;    eye=t-input;    sval.type=T_INT;    sval.subtype=NUMBER_NUMBER;    break;    }       case 'D':    case 'i':    {    char * t;       if(eye>=input_len) return matches; -  +  if(field_length != -1 && eye+field_length < input_len) +  { +  char save=input[eye+field_length+1];    sval.u.integer=STRTOL(input+eye,&t,0); -  +  input[eye+field_length+1]=save; +  }else +  sval.u.integer=STRTOL(input+eye,&t,0);    if(input + eye == t) return matches;    eye=t-input;    sval.type=T_INT;    sval.subtype=NUMBER_NUMBER;    break;    }       case 'f':    {    char * t;