Branch: Tag:

1999-11-18

1999-11-18 04:14:55 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

resolved some conflicts for PHP

Rev: src/builtin_functions.h:1.10
Rev: src/errors.h:1.7
Rev: src/interpret.h:1.35
Rev: src/interpreter.h:1.18
Rev: src/lexer.h:1.11
Rev: src/preprocessor.h:1.15
Rev: src/program.c:1.174
Rev: src/program.h:1.66
Rev: src/security.h:1.8
Rev: src/svalue.h:1.38
Rev: src/threads.h:1.71

143:    CASE(F_MARK_AND_STRING); *(mark_sp++)=sp;    CASE(F_STRING);    copy_shared_string(sp->u.string,fp->context.prog->strings[GET_ARG()]); -  sp->type=T_STRING; +  sp->type=PIKE_T_STRING;    sp->subtype=0;    sp++;    print_return_value();
151:       CASE(F_ARROW_STRING);    copy_shared_string(sp->u.string,fp->context.prog->strings[GET_ARG()]); -  sp->type=T_STRING; +  sp->type=PIKE_T_STRING;    sp->subtype=1; /* Magic */    sp++;    print_return_value();
163:    break;       CASE(F_FLOAT); -  sp->type=T_FLOAT; +  sp->type=PIKE_T_FLOAT;    MEMCPY((void *)&sp->u.float_number, pc, sizeof(FLOAT_TYPE));    pc+=sizeof(FLOAT_TYPE);    sp++;
173:    sp->u.object=fp->current_object;    add_ref(fp->current_object);    sp->subtype=GET_ARG()+fp->context.identifier_level; -  sp->type=T_FUNCTION; +  sp->type=PIKE_T_FUNCTION;    sp++;    print_return_value();    break;
404:    CASE(F_CLEAR_2_LOCAL);    instr=GET_ARG();    free_svalues(fp->locals + instr, 2, -1); -  fp->locals[instr].type=T_INT; +  fp->locals[instr].type=PIKE_T_INT;    fp->locals[instr].subtype=0;    fp->locals[instr].u.integer=0; -  fp->locals[instr+1].type=T_INT; +  fp->locals[instr+1].type=PIKE_T_INT;    fp->locals[instr+1].subtype=0;    fp->locals[instr+1].u.integer=0;    break;
419:    free_svalues(fp->locals + instr, 4, -1);    for(e=0;e<4;e++)    { -  fp->locals[instr+e].type=T_INT; +  fp->locals[instr+e].type=PIKE_T_INT;    fp->locals[instr+e].subtype=0;    fp->locals[instr+e].u.integer=0;    }
429:    CASE(F_CLEAR_LOCAL);    instr=GET_ARG();    free_svalue(fp->locals + instr); -  fp->locals[instr].type=T_INT; +  fp->locals[instr].type=PIKE_T_INT;    fp->locals[instr].subtype=0;    fp->locals[instr].u.integer=0;    break;
437:    CASE(F_INC_LOCAL);    instr=GET_ARG();   #ifdef AUTO_BIGNUM -  if(fp->locals[instr].type == T_INT && +  if(fp->locals[instr].type == PIKE_T_INT &&    !INT_TYPE_ADD_OVERFLOW(fp->locals[instr].u.integer, 1))   #else -  if(fp->locals[instr].type == T_INT) +  if(fp->locals[instr].type == PIKE_T_INT)   #endif /* AUTO_BIGNUM */    {    fp->locals[instr].u.integer++;
464:    instr=GET_ARG();    inc_local_and_pop:   #ifdef AUTO_BIGNUM -  if(fp->locals[instr].type == T_INT && +  if(fp->locals[instr].type == PIKE_T_INT &&    !INT_TYPE_ADD_OVERFLOW(fp->locals[instr].u.integer, 1))   #else -  if(fp->locals[instr].type == T_INT) +  if(fp->locals[instr].type == PIKE_T_INT)   #endif /* AUTO_BIGNUM */    {    fp->locals[instr].u.integer++;
483:    CASE(F_DEC_LOCAL);    instr=GET_ARG();   #ifdef AUTO_BIGNUM -  if(fp->locals[instr].type == T_INT && +  if(fp->locals[instr].type == PIKE_T_INT &&    !INT_TYPE_SUB_OVERFLOW(fp->locals[instr].u.integer, 1))   #else -  if(fp->locals[instr].type == T_INT) +  if(fp->locals[instr].type == PIKE_T_INT)   #endif /* AUTO_BIGNUM */    {    fp->locals[instr].u.integer--;
510:    instr=GET_ARG();    dec_local_and_pop:   #ifdef AUTO_BIGNUM -  if(fp->locals[instr].type == T_INT && +  if(fp->locals[instr].type == PIKE_T_INT &&    !INT_TYPE_SUB_OVERFLOW(fp->locals[instr].u.integer, 1))   #else -  if(fp->locals[instr].type == T_INT) +  if(fp->locals[instr].type == PIKE_T_INT)   #endif /* AUTO_BIGNUM */    {    fp->locals[instr].u.integer--;
533:       CASE(F_LTOSVAL2);    sp[0]=sp[-1]; -  sp[-1].type=T_INT; +  sp[-1].type=PIKE_T_INT;    sp++;    lvalue_to_svalue_no_free(sp-2,sp-4);   
546:    if( (1 << sp[-2].type) & ( BIT_ARRAY | BIT_MULTISET | BIT_MAPPING | BIT_STRING ))    {    struct svalue s; -  s.type=T_INT; +  s.type=PIKE_T_INT;    s.subtype=0;    s.u.integer=0;    assign_lvalue(sp-4,&s);
556:       CASE(F_ADD_TO_AND_POP);    sp[0]=sp[-1]; -  sp[-1].type=T_INT; +  sp[-1].type=PIKE_T_INT;    sp++;    lvalue_to_svalue_no_free(sp-2,sp-4);   
569:    if( (1 << sp[-2].type) & ( BIT_ARRAY | BIT_MULTISET | BIT_MAPPING | BIT_STRING ))    {    struct svalue s; -  s.type=T_INT; +  s.type=PIKE_T_INT;    s.subtype=0;    s.u.integer=0;    assign_lvalue(sp-4,&s);
608:       CASE(F_INC);    { -  union anything *u=get_pointer_if_this_type(sp-2, T_INT); +  union anything *u=get_pointer_if_this_type(sp-2, PIKE_T_INT);    if(u   #ifdef AUTO_BIGNUM    && !INT_TYPE_ADD_OVERFLOW(u->integer, 1)
631:       CASE(F_DEC);    { -  union anything *u=get_pointer_if_this_type(sp-2, T_INT); +  union anything *u=get_pointer_if_this_type(sp-2, PIKE_T_INT);    if(u   #ifdef AUTO_BIGNUM    && !INT_TYPE_SUB_OVERFLOW(u->integer, 1)
654:       CASE(F_DEC_AND_POP);    { -  union anything *u=get_pointer_if_this_type(sp-2, T_INT); +  union anything *u=get_pointer_if_this_type(sp-2, PIKE_T_INT);    if(u   #ifdef AUTO_BIGNUM    && !INT_TYPE_SUB_OVERFLOW(u->integer, 1)
675:       CASE(F_INC_AND_POP);    { -  union anything *u=get_pointer_if_this_type(sp-2, T_INT); +  union anything *u=get_pointer_if_this_type(sp-2, PIKE_T_INT);    if(u   #ifdef AUTO_BIGNUM    && !INT_TYPE_ADD_OVERFLOW(u->integer, 1)
696:       CASE(F_POST_INC);    { -  union anything *u=get_pointer_if_this_type(sp-2, T_INT); +  union anything *u=get_pointer_if_this_type(sp-2, PIKE_T_INT);    if(u   #ifdef AUTO_BIGNUM    && !INT_TYPE_ADD_OVERFLOW(u->integer, 1)
720:       CASE(F_POST_DEC);    { -  union anything *u=get_pointer_if_this_type(sp-2, T_INT); +  union anything *u=get_pointer_if_this_type(sp-2, PIKE_T_INT);    if(u   #ifdef AUTO_BIGNUM    && !INT_TYPE_SUB_OVERFLOW(u->integer, 1)
830:    CASE(F_POP_MARK); --mark_sp; break;       CASE(F_CLEAR_STRING_SUBTYPE); -  if(sp[-1].type==T_STRING) sp[-1].subtype=0; +  if(sp[-1].type==PIKE_T_STRING) sp[-1].subtype=0;    break;       /* Jumps */
841:    CASE(F_BRANCH_IF_NOT_LOCAL_ARROW);    {    struct svalue tmp; -  tmp.type=T_STRING; +  tmp.type=PIKE_T_STRING;    tmp.u.string=fp->context.prog->strings[GET_ARG()];    tmp.subtype=1; -  sp->type=T_INT; +  sp->type=PIKE_T_INT;    sp++;    index_no_free(sp-1,fp->locals+GET_ARG2() , &tmp);    print_return_value();
996:       CASE(F_FOREACH) /* array, lvalue, X, i */    { -  if(sp[-4].type != T_ARRAY) +  if(sp[-4].type != PIKE_T_ARRAY)    PIKE_ERROR("foreach", "Bad argument 1.\n", sp-3, 1);    if(sp[-1].u.integer < sp[-4].u.array->size)    {
1023:   /* fprintf(stderr,"NOT EXPENDIBLE!\n"); */    MEMMOVE(sp-args+1,sp-args,args*sizeof(struct svalue));    sp++; -  sp[-args-1].type=T_INT; +  sp[-args-1].type=PIKE_T_INT;    }    /* We sabotage the stack here */    assign_svalue(sp-args-1,&fp->context.prog->constants[GET_ARG()].sval);
1037:    {    MEMMOVE(sp-args+1,sp-args,args*sizeof(struct svalue));    sp++; -  sp[-args-1].type=T_INT; +  sp[-args-1].type=PIKE_T_INT;    }else{    free_svalue(sp-args-1);    }
1048: Inside #if defined(PIKE_DEBUG)
   if(t_flag > 9)    fprintf(stderr,"- IDENTIFIER_LEVEL: %d\n",fp->context.identifier_level);   #endif -  sp[-args-1].type=T_FUNCTION; +  sp[-args-1].type=PIKE_T_FUNCTION;    add_ref(fp->current_object);       return args+1;
1087:    return -1;       CASE(F_NEGATE); -  if(sp[-1].type == T_INT) +  if(sp[-1].type == PIKE_T_INT)    {   #ifdef AUTO_BIGNUM    if(INT_TYPE_NEG_OVERFLOW(sp[-1].u.integer))
1099:   #endif /* AUTO_BIGNUM */    sp[-1].u.integer =- sp[-1].u.integer;    } -  else if(sp[-1].type == T_FLOAT) +  else if(sp[-1].type == PIKE_T_FLOAT)    {    sp[-1].u.float_number =- sp[-1].u.float_number;    }else{
1112:    CASE(F_NOT);    switch(sp[-1].type)    { -  case T_INT: +  case PIKE_T_INT:    sp[-1].u.integer =! sp[-1].u.integer;    break;    -  case T_FUNCTION: -  case T_OBJECT: +  case PIKE_T_FUNCTION: +  case PIKE_T_OBJECT:    if(IS_ZERO(sp-1))    {    pop_stack();
1130:       default:    free_svalue(sp-1); -  sp[-1].type=T_INT; +  sp[-1].type=PIKE_T_INT;    sp[-1].u.integer=0;    }    break;
1163:    default:    PIKE_ERROR("@", "Bad argument.\n", sp, 1);    -  case T_OBJECT: +  case PIKE_T_OBJECT:    if(!sp[-1].u.object->prog || FIND_LFUN(sp[-1].u.object->prog,LFUN__VALUES) == -1)    PIKE_ERROR("@", "Bad argument.\n", sp, 1);       apply_lfun(sp[-1].u.object, LFUN__VALUES, 0); -  if(sp[-1].type != T_ARRAY) +  if(sp[-1].type != PIKE_T_ARRAY)    error("Bad return type from o->_values() in @\n");    free_svalue(sp-2);    sp[-2]=sp[-1];    sp--;    break;    -  case T_ARRAY: break; +  case PIKE_T_ARRAY: break;    }    sp--;    push_array_items(sp->u.array);
1184:    CASE(F_LOCAL_LOCAL_INDEX);    {    struct svalue *s=fp->locals+GET_ARG(); -  if(s->type == T_STRING) s->subtype=0; -  sp++->type=T_INT; +  if(s->type == PIKE_T_STRING) s->subtype=0; +  sp++->type=PIKE_T_INT;    index_no_free(sp-1,fp->locals+GET_ARG2(),s);    break;    }
1193:    CASE(F_LOCAL_INDEX);    {    struct svalue tmp,*s=fp->locals+GET_ARG(); -  if(s->type == T_STRING) s->subtype=0; +  if(s->type == PIKE_T_STRING) s->subtype=0;    index_no_free(&tmp,sp-1,s);    free_svalue(sp-1);    sp[-1]=tmp;
1208:    GET_ARG() + fp->context.identifier_level);    sp++;    s=fp->locals+GET_ARG2(); -  if(s->type == T_STRING) s->subtype=0; +  if(s->type == PIKE_T_STRING) s->subtype=0;    index_no_free(&tmp,sp-1,s);    free_svalue(sp-1);    sp[-1]=tmp;
1218:    CASE(F_LOCAL_ARROW);    {    struct svalue tmp; -  tmp.type=T_STRING; +  tmp.type=PIKE_T_STRING;    tmp.u.string=fp->context.prog->strings[GET_ARG()];    tmp.subtype=1; -  sp->type=T_INT; +  sp->type=PIKE_T_INT;    sp++;    index_no_free(sp-1,fp->locals+GET_ARG2() , &tmp);    print_return_value();
1231:    CASE(F_ARROW);    {    struct svalue tmp,tmp2; -  tmp.type=T_STRING; +  tmp.type=PIKE_T_STRING;    tmp.u.string=fp->context.prog->strings[GET_ARG()];    tmp.subtype=1;    index_no_free(&tmp2, sp-1, &tmp);
1244:    CASE(F_STRING_INDEX);    {    struct svalue tmp,tmp2; -  tmp.type=T_STRING; +  tmp.type=PIKE_T_STRING;    tmp.u.string=fp->context.prog->strings[GET_ARG()];    tmp.subtype=0;    index_no_free(&tmp2, sp-1, &tmp);
1299:    {    struct svalue s;    lvalue_to_svalue_no_free(&s,sp-2); -  if(s.type != T_STRING) +  if(s.type != PIKE_T_STRING)    {    pop_n_elems(2);    *sp=s;
1372:    PIKE_ERROR("`()", "Too few arguments.\n", sp, 0);    switch(sp[-args].type)    { -  case T_INT: +  case PIKE_T_INT:    if (!sp[-args].u.integer) {    PIKE_ERROR("`()", "Attempt to call the NULL-value\n", sp, args);    } -  case T_STRING: -  case T_FLOAT: -  case T_MAPPING: -  case T_MULTISET: +  case PIKE_T_STRING: +  case PIKE_T_FLOAT: +  case PIKE_T_MAPPING: +  case PIKE_T_MULTISET:    PIKE_ERROR("`()", "Attempt to call a non-function value.\n", sp, args);    }    return args;