pike.git / src / opcodes.c

version» Context lines:

pike.git/src/opcodes.c:17:   #include "error.h"   #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"    - RCSID("$Id: opcodes.c,v 1.47 1999/10/22 18:16:15 noring Exp $"); + RCSID("$Id: opcodes.c,v 1.48 1999/10/23 06:51:29 hubbe 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:899:    case 'd':    {    char * t;       if(eye>=input_len)    {    chars_matched[0]=eye;    return matches;    }    -  /* This can be here independently of AUTO_BIGNUM. Besides, -  we really want to reduce the number of number parsers -  around here. :) /Noring */ - #ifdef AUTO_BIGNUM +     string_to_svalue_inumber(&sval, input+eye, &t, 10, field_length); - #else -  if(field_length != -1 && eye+field_length < input_len) -  { -  char save=input[eye+field_length]; -  input[eye+field_length]=0; /* DANGEROUS */ -  sval.u.integer=STRTOL(input+eye,&t,10); -  input[eye+field_length]=save; -  } -  else -  sval.u.integer=STRTOL(input+eye,&t,10); +     -  sval.type=T_INT; -  sval.subtype=NUMBER_NUMBER; - #endif /* AUTO_BIGNUM */ -  +     if(input + eye == t)    {    chars_matched[0]=eye;    return matches;    }    eye=t-input;    break;    }       case 'x':    {    char * t;       if(eye>=input_len)    {    chars_matched[0]=eye;    return matches;    }    -  /* This can be here independently of AUTO_BIGNUM. Besides, -  we really want to reduce the number of number parsers -  around here. :) /Noring */ - #ifdef AUTO_BIGNUM +     string_to_svalue_inumber(&sval, input+eye, &t, 16, field_length); - #else -  if(field_length != -1 && eye+field_length < input_len) -  { -  char save=input[eye+field_length]; -  input[eye+field_length]=0; /* DANGEROUS */ -  sval.u.integer=STRTOL(input+eye,&t,16); -  input[eye+field_length]=save; -  } -  else -  sval.u.integer=STRTOL(input+eye,&t,16); +     -  sval.type=T_INT; -  sval.subtype=NUMBER_NUMBER; - #endif /* AUTO_BIGNUM */ -  +     if(input + eye == t)    {    chars_matched[0]=eye;    return matches;    }    eye=t-input;    break;    }       case 'o':    {    char * t;       if(eye>=input_len)    {    chars_matched[0]=eye;    return matches;    }    -  /* This can be here independently of AUTO_BIGNUM. Besides, -  we really want to reduce the number of number parsers -  around here. :) /Noring */ - #ifdef AUTO_BIGNUM +     string_to_svalue_inumber(&sval, input+eye, &t, 8, field_length); - #else -  if(field_length != -1 && eye+field_length < input_len) -  { -  char save=input[eye+field_length]; -  input[eye+field_length]=0; /* DANGEROUS */ -  sval.u.integer=STRTOL(input+eye,&t,8); -  input[eye+field_length]=save; -  } -  else -  sval.u.integer=STRTOL(input+eye,&t,8); +     -  sval.type=T_INT; -  sval.subtype=NUMBER_NUMBER; - #endif /* AUTO_BIGNUM */ -  +     if(input + eye == t)    {    chars_matched[0]=eye;    return matches;    }    eye=t-input;    break;    }       case 'D':    case 'i':    {    char * t;       if(eye>=input_len)    {    chars_matched[0]=eye;    return matches;    }    -  /* This can be here independently of AUTO_BIGNUM. Besides, -  we really want to reduce the number of number parsers -  around here. :) /Noring */ - #ifdef AUTO_BIGNUM +     string_to_svalue_inumber(&sval, input+eye, &t, 0, field_length); - #else -  if(field_length != -1 && eye+field_length < input_len) -  { -  char save=input[eye+field_length]; -  input[eye+field_length]=0; /* DANGEROUS */ -  sval.u.integer=STRTOL(input+eye,&t,0); -  input[eye+field_length]=save; -  } -  else -  sval.u.integer=STRTOL(input+eye,&t,0); +     -  sval.type=T_INT; -  sval.subtype=NUMBER_NUMBER; - #endif /* AUTO_BIGNUM */ -  +     if(input + eye == t)    {    chars_matched[0]=eye;    return matches;    }    eye=t-input;    break;    }       case 'f':