pike.git / src / opcodes.c

version» Context lines:

pike.git/src/opcodes.c:16:   #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"   #include "module_support.h"   #include "security.h"    - RCSID("$Id: opcodes.c,v 1.39 1999/06/19 20:02:03 hubbe Exp $"); + RCSID("$Id: opcodes.c,v 1.40 1999/07/01 16:21:06 mirar 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:696:      static INT32 really_low_sscanf(char *input,    long input_len,    char *match,    long match_len,    long *chars_matched,    int *success)   {    struct svalue sval;    int e,cnt,matches,eye,arg; -  int no_assign,field_length; +  int no_assign,field_length,minus_flag;    char set[256];    struct svalue *argp;       success[0]=0;       arg=eye=matches=0;       for(cnt=0;cnt<match_len;cnt++)    {    for(;cnt<match_len;cnt++)
pike.git/src/opcodes.c:739: Inside #if defined(PIKE_DEBUG)
     #ifdef PIKE_DEBUG    if(match[cnt]!='%' || match[cnt+1]=='%')    {    fatal("Error in sscanf.\n");    }   #endif       no_assign=0;    field_length=-1; +  minus_flag=0;       cnt++;    if(cnt>=match_len)    error("Error in sscanf format string.\n");       while(1)    {    switch(match[cnt])    {    case '*':
pike.git/src/opcodes.c:764:       case '0': case '1': case '2': case '3': case '4':    case '5': case '6': case '7': case '8': case '9':    {    char *t;    field_length=STRTOL(match+cnt,&t,10);    cnt=t-match;    continue;    }    +  case '-': +  minus_flag=1; +  cnt++; +  continue; +     case '{':    {    ONERROR err;    long tmp;    for(e=cnt+1,tmp=1;tmp;e++)    {    if(!match[e])    {    error("Missing %%} in format string.\n");    break; /* UNREACHED */
pike.git/src/opcodes.c:825:    case 'c':    if(field_length == -1) field_length = 1;    if(eye+field_length > input_len)    {    chars_matched[0]=eye;    return matches;    }    sval.type=T_INT;    sval.subtype=NUMBER_NUMBER;    sval.u.integer=0; +  if (minus_flag) +  { +  int pos=0;    while(--field_length >= 0)    { -  +  pos+=8; +  sval.u.integer|=EXTRACT_UCHAR(input+eye)<<pos; +  eye++; +  } +  } +  else +  while(--field_length >= 0) +  {    sval.u.integer<<=8;    sval.u.integer|=EXTRACT_UCHAR(input+eye);    eye++;    }    break;       case 'd':    {    char * t;