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.74 2000/08/14 14:04:47 grubba Exp $"); + RCSID("$Id: opcodes.c,v 1.75 2001/01/15 22:17:20 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:1317:    input_len-eye); \    eye=input_len; \    break; \    }else{ \    PIKE_CONCAT(p_wchar, MATCH_SHIFT) *end_str_start; \    PIKE_CONCAT(p_wchar, MATCH_SHIFT) *end_str_end; \    PIKE_CONCAT(p_wchar, MATCH_SHIFT) *s=0; \    PIKE_CONCAT(p_wchar, MATCH_SHIFT) *p=0; \    int start,contains_percent_percent, new_eye; \    \ +  e = cnt; \    start=eye; \    end_str_start=match+cnt+1; \    \    s=match+cnt+1; \    test_again: \    if(*s=='%') \    { \    s++; \    if(*s=='*') s++; \    set.neg=0; \    switch(*s) \    { \ -  +  case 0: \ +  /* FIXME: Should really look at the match len */ \ +  Pike_error("%% without conversion specifier.\n"); \ +  break; \ +  \    case 'n': \    s++; \ -  +  /* Advance the end string start pointer */ \ +  end_str_start = s; \ +  e = s - match; \    goto test_again; \    \    case 's': \    error("Illegal to have two adjecent %%s.\n"); \    return 0; /* make gcc happy */ \    \    /* sscanf("foo-bar","%s%d",a,b) might not work as expected */ \    case 'd': \    MEMSET(set.c, 1, sizeof(set.c)); \    for(e='0';e<='9';e++) set.c[e]=0; \
pike.git/src/opcodes.c:1380:    s-match+1, \    &set, \    match_len); \    set.neg=!set.neg; \    goto match_set; \    } \    } \    \    contains_percent_percent=0; \    \ -  for(e=cnt;e<match_len;e++) \ +  for(;e<match_len;e++) \    { \    if(match[e]=='%') \    { \    if(match[e+1]=='%') \    { \    contains_percent_percent=1; \    e++; \    }else{ \    break; \    } \    } \    } \    \    end_str_end=match+e; \    \ -  if(!contains_percent_percent) \ +  if (end_str_end == end_str_start) { \ +  sval.type=T_STRING; \ +  DO_IF_CHECKER(sval.subtype=0); \ +  sval.u.string=PIKE_CONCAT(make_shared_binary_string, \ +  INPUT_SHIFT)(input+eye, \ +  input_len-eye); \ +  eye=input_len; \ +  break; \ +  } else if(!contains_percent_percent) \    { \    struct generic_mem_searcher searcher; \    PIKE_CONCAT(p_wchar, INPUT_SHIFT) *s2; \    init_generic_memsearcher(&searcher, end_str_start, \    end_str_end - end_str_start, \    MATCH_SHIFT, input_len - eye, \    INPUT_SHIFT); \    s2 = generic_memory_search(&searcher, input+eye, \    input_len - eye, INPUT_SHIFT); \    if(!s2) \