pike.git / src / encode.c

version» Context lines:

pike.git/src/encode.c:8:   #include "stralloc.h"   #include "pike_macros.h"   #include "object.h"   #include "constants.h"   #include "interpret.h"   #include "svalue.h"   #include "mapping.h"   #include "array.h"   #include "multiset.h"   #include "dynamic_buffer.h" - #include "error.h" + #include "pike_error.h"   #include "operators.h"   #include "builtin_functions.h"   #include "module_support.h"   #include "fsort.h"   #include "threads.h"   #include "stuff.h"   #include "version.h"   #include "bignum.h"    - RCSID("$Id: encode.c,v 1.77 2000/11/08 20:03:45 hubbe Exp $"); + RCSID("$Id: encode.c,v 1.78 2000/12/01 08:09:46 hubbe Exp $");      /* #define ENCODE_DEBUG */      #ifdef ENCODE_DEBUG   #define EDB(X) X   #else   #define EDB(X)   #endif      /* The sp macro conflicts with Solaris 2.5.1's <sys/conf.h>. */
pike.git/src/encode.c:264:   #endif      static ptrdiff_t encode_type(char *t, struct encode_data *data)   {    char *q=t;   one_more_type:    addchar(EXTRACT_UCHAR(t));    switch(EXTRACT_UCHAR(t++))    {    default: -  fatal("error in type string.\n"); +  fatal("Pike_error in type string.\n");    /*NOTREACHED*/       break;       case T_ASSIGN:    addchar(EXTRACT_UCHAR(t++));    goto one_more_type;       case T_FUNCTION:    while(EXTRACT_UCHAR(t)!=T_MANY)
pike.git/src/encode.c:391:    */    code_entry(TAG_INT, val->u.integer,data);    break;       case T_STRING:    adddata(val->u.string);    break;       case T_TYPE:    if (data->canonic) -  error("Canonical encoding of the type type not supported.\n"); -  error("Encoding of the type type not supported yet!\n"); +  Pike_error("Canonical encoding of the type type not supported.\n"); +  Pike_error("Encoding of the type type not supported yet!\n");    break;       case T_FLOAT:    {    if(val->u.float_number==0.0)    {    code_entry(TAG_FLOAT,0,data);    code_entry(TAG_FLOAT,0,data);    }else{    INT64 x;
pike.git/src/encode.c:462:       if (data->canonic) {    INT32 *order;    if (val->u.mapping->data->ind_types & ~(BIT_BASIC & ~BIT_TYPE)) {    mapping_fix_type_field(val->u.mapping);    if (val->u.mapping->data->ind_types & ~(BIT_BASIC & ~BIT_TYPE))    /* This doesn't let bignums through. That's necessary as    * long as they aren't handled deterministically by the    * sort function. */    /* They should be hanled deterministically now - Hubbe */ -  error("Canonical encoding requires basic types in indices.\n"); +  Pike_error("Canonical encoding requires basic types in indices.\n");    }    order = get_switch_order(Pike_sp[-2].u.array);    order_array(Pike_sp[-2].u.array, order);    order_array(Pike_sp[-1].u.array, order);    free((char *) order);    }       code_entry(TAG_MAPPING, Pike_sp[-2].u.array->size,data);    for(i=0; i<Pike_sp[-2].u.array->size; i++)    {
pike.git/src/encode.c:489:    case T_MULTISET:    code_entry(TAG_MULTISET, val->u.multiset->ind->size,data);    if (data->canonic) {    INT32 *order;    if (val->u.multiset->ind->type_field & ~(BIT_BASIC & ~BIT_TYPE)) {    array_fix_type_field(val->u.multiset->ind);    if (val->u.multiset->ind->type_field & ~(BIT_BASIC & ~BIT_TYPE))    /* This doesn't let bignums through. That's necessary as    * long as they aren't handled deterministically by the    * sort function. */ -  error("Canonical encoding requires basic types in indices.\n"); +  Pike_error("Canonical encoding requires basic types in indices.\n");    }    check_stack(1);    ref_push_array(val->u.multiset->ind);    order = get_switch_order(Pike_sp[-1].u.array);    order_array(Pike_sp[-1].u.array, order);    free((char *) order);    for (i = 0; i < Pike_sp[-1].u.array->size; i++)    encode_value2(ITEM(Pike_sp[-1].u.array)+i, data);    pop_stack();    }
pike.git/src/encode.c:521: Inside #if defined(AUTO_BIGNUM)
   */    if(is_bignum_object(val->u.object))    {    code_entry(TAG_OBJECT, 2, data);    /* 256 would be better, but then negative numbers    * doesn't work... /Hubbe    */    push_int(36);    apply(val->u.object,"digits",1);    if(Pike_sp[-1].type != T_STRING) -  error("Gmp.mpz->digits did not return a string!\n"); +  Pike_error("Gmp.mpz->digits did not return a string!\n");    encode_value2(Pike_sp-1, data);    pop_stack();    break;    }   #endif       if (data->canonic) -  error("Canonical encoding of objects not supported.\n"); +  Pike_error("Canonical encoding of objects not supported.\n");    push_svalue(val);    apply(data->codec, "nameof", 1);    switch(Pike_sp[-1].type)    {    case T_INT:    if(Pike_sp[-1].subtype == NUMBER_UNDEFINED)    {    pop_stack();    push_svalue(val);    f_object_program(1);
pike.git/src/encode.c:561:    default:    code_entry(type_to_tag(val->type), 0,data);    break;    }    encode_value2(Pike_sp-1, data);    pop_stack();    break;       case T_FUNCTION:    if (data->canonic) -  error("Canonical encoding of functions not supported.\n"); +  Pike_error("Canonical encoding of functions not supported.\n");    check_stack(1);    push_svalue(val);    apply(data->codec,"nameof", 1);    if(Pike_sp[-1].type == T_INT && Pike_sp[-1].subtype==NUMBER_UNDEFINED)    {    if(val->subtype != FUNCTION_BUILTIN)    {    int eq;       code_entry(type_to_tag(val->type), 1, data);
pike.git/src/encode.c:609:    code_entry(type_to_tag(val->type), 0,data);    encode_value2(Pike_sp-1, data);    pop_stack();    break;          case T_PROGRAM:    {    int d;    if (data->canonic) -  error("Canonical encoding of programs not supported.\n"); +  Pike_error("Canonical encoding of programs not supported.\n");    check_stack(1);    push_svalue(val);    apply(data->codec,"nameof", 1);    if(Pike_sp[-1].type == val->type) -  error("Error in master()->nameof(), same type returned.\n"); +  Pike_error("Error in master()->nameof(), same type returned.\n");    if(Pike_sp[-1].type == T_INT && Pike_sp[-1].subtype == NUMBER_UNDEFINED)    {    INT32 e;    struct program *p=val->u.program;    if(p->init || p->exit || p->gc_recurse_func || p->gc_check_func ||    (p->flags & PROGRAM_HAS_C_METHODS)) -  error("Cannot encode C programs.\n"); +  Pike_error("Cannot encode C programs.\n");    code_entry(type_to_tag(val->type), 1,data);    f_version(0);    encode_value2(Pike_sp-1,data);    pop_stack();    code_number(p->flags,data);    code_number(p->storage_needed,data);    code_number(p->alignment_needed,data);    code_number(p->timestamp.tv_sec,data);    code_number(p->timestamp.tv_usec,data);   
pike.git/src/encode.c:790:    struct svalue counter;    struct object *codec;    int pickyness;   };      static void decode_value2(struct decode_data *data);      static int my_extract_char(struct decode_data *data)   {    if(data->ptr >= data->len) -  error("Format error, not enough data in string.\n"); +  Pike_error("Format Pike_error, not enough data in string.\n");    return data->data [ data->ptr++ ];   }      #define GETC() my_extract_char(data)      #define DECODE(Z) do { \    EDB( \    fprintf(stderr,"decode(%s) at %d: ",(Z),__LINE__)); \    what=GETC(); \    e=what>>SIZE_SHIFT; \
pike.git/src/encode.c:834:    (long)num) ); \   } while (0)            #define decode_entry(X,Y,Z) \    do { \    INT32 what, e, num, numh; \    DECODE("decode_entry"); \    if((what & TAG_MASK) != (X)) \ -  error("Failed to decode, wrong bits (%d).\n", what & TAG_MASK); \ +  Pike_error("Failed to decode, wrong bits (%d).\n", what & TAG_MASK); \    (Y)=num; \    } while(0);      #define getdata2(S,L) do { \    if(data->ptr + (ptrdiff_t)(sizeof(S[0])*(L)) > data->len) \ -  error("Failed to decode string. (string range error)\n"); \ +  Pike_error("Failed to decode string. (string range Pike_error)\n"); \    MEMCPY((S),(data->data + data->ptr), sizeof(S[0])*(L)); \    data->ptr+=sizeof(S[0])*(L); \    }while(0)      #if BYTEORDER == 4123   #define BITFLIP(S)   #else   #define BITFLIP(S) \    switch(what) \    { \
pike.git/src/encode.c:863:    }   #endif      #define get_string_data(STR,LEN, data) do { \    if((LEN) == -1) \    { \    INT32 what, e, num, numh; \    DECODE("get_string_data"); \    what &= TAG_MASK; \    if(data->ptr + num > data->len || num <0) \ -  error("Failed to decode string. (string range error)\n"); \ +  Pike_error("Failed to decode string. (string range Pike_error)\n"); \    if(what<0 || what>2) \ -  error("Failed to decode string. (Illegal size shift)\n"); \ +  Pike_error("Failed to decode string. (Illegal size shift)\n"); \    STR=begin_wide_shared_string(num, what); \    MEMCPY(STR->str, data->data + data->ptr, num << what); \    data->ptr+=(num << what); \    BITFLIP(STR); \    STR=end_shared_string(STR); \    }else{ \    if(data->ptr + (LEN) > data->len || (LEN) <0) \ -  error("Failed to decode string. (string range error)\n"); \ +  Pike_error("Failed to decode string. (string range Pike_error)\n"); \    STR=make_shared_binary_string((char *)(data->data + data->ptr), (LEN)); \    data->ptr+=(LEN); \    } \   }while(0)      #define getdata(X) do { \    long length; \    decode_entry(TAG_STRING, length,data); \    get_string_data(X, length, data); \    }while(0)
pike.git/src/encode.c:899:    { \    case TAG_INT: \    X=0; \    break; \    \    case TAG_STRING: \    get_string_data(X,num,data); \    break; \    \    default: \ -  error("Failed to decode string, tag is wrong: %d\n", \ +  Pike_error("Failed to decode string, tag is wrong: %d\n", \    what & TAG_MASK); \    } \   }while(0)      #define decode_number(X,data) do { \    INT32 what, e, num, numh; \    DECODE("decode_number"); \    X=(what & TAG_MASK) | (num<<4); \    }while(0) \   
pike.git/src/encode.c:956:       SET_ONERROR(err1, restore_type_stack, Pike_compiler->type_stackp);    SET_ONERROR(err2, restore_type_mark, Pike_compiler->pike_type_mark_stackp);      one_more_type:    tmp = GETC();    push_type(tmp);    switch(tmp)    {    default: -  fatal("error in type string.\n"); +  fatal("Pike_error in type string.\n");    /*NOTREACHED*/    break;       case T_ASSIGN:    push_type(GETC());    goto one_more_type;       case T_FUNCTION:    while(GETC()!=T_MANY)    {
pike.git/src/encode.c:1035:    break;       case T_PROGRAM:    push_type_int(Pike_sp[-1].u.program->id);    break;       case T_FUNCTION:    {    struct program *prog;    if (Pike_sp[-1].subtype == FUNCTION_BUILTIN) { -  error("Failed to decode object type.\n"); +  Pike_error("Failed to decode object type.\n");    }    prog = program_from_svalue(Pike_sp-1);    if (!prog) { -  error("Failed to decode object type.\n"); +  Pike_error("Failed to decode object type.\n");    }    push_type_int(prog->id);    }    break;       default: -  error("Failed to decode type " +  Pike_error("Failed to decode type "    "(object(%s), expected object(zero|program)).\n",    get_name_of_type(Pike_sp[-1].type));    }    pop_stack();    type_stack_reverse();    }    }       UNSET_ONERROR(err2);    UNSET_ONERROR(err1);
pike.git/src/encode.c:1094:    switch(what & TAG_MASK)    {    case TAG_AGAIN:    tmp.type=T_INT;    tmp.subtype=0;    tmp.u.integer=num;    if((tmp2=low_mapping_lookup(data->decoded, &tmp)))    {    push_svalue(tmp2);    }else{ -  error("Failed to decode string. (invalid T_AGAIN)\n"); +  Pike_error("Failed to decode string. (invalid T_AGAIN)\n");    }    return;       case TAG_INT:    tmp=data->counter;    data->counter.u.integer++;    push_int(num);    break;       case TAG_STRING:
pike.git/src/encode.c:1138:    DECODE("float");       EDB(fprintf(stderr, "Exponent: %d\n", num));       push_float(LDEXP(res, num));    break;    }       case TAG_TYPE:    { -  error("Failed to decode string. " +  Pike_error("Failed to decode string. "    "(decode of the type type isn't supported yet).\n");    break;    }       case TAG_ARRAY:    {    struct array *a;    if(num < 0) -  error("Failed to decode string. (array size is negative)\n"); +  Pike_error("Failed to decode string. (array size is negative)\n");       /* Heruetical */    if(data->ptr + num > data->len) -  error("Failed to decode array. (not enough data)\n"); +  Pike_error("Failed to decode array. (not enough data)\n");       tmp.type=T_ARRAY;    tmp.u.array=a=allocate_array(num);    mapping_insert(data->decoded, & data->counter, &tmp);    data->counter.u.integer++;       /* Since a reference to the array is stored in the mapping, we can    * safely decrease this reference here. Thus it will be automatically    * freed if something goes wrong.    */
pike.git/src/encode.c:1179:    dmalloc_touch_svalue(Pike_sp);    }    ref_push_array(a);    return;    }       case TAG_MAPPING:    {    struct mapping *m;    if(num<0) -  error("Failed to decode string. (mapping size is negative)\n"); +  Pike_error("Failed to decode string. (mapping size is negative)\n");       /* Heruetical */    if(data->ptr + num > data->len) -  error("Failed to decode mapping. (not enough data)\n"); +  Pike_error("Failed to decode mapping. (not enough data)\n");       m=allocate_mapping(num);    tmp.type=T_MAPPING;    tmp.u.mapping=m;    mapping_insert(data->decoded, & data->counter, &tmp);    data->counter.u.integer++;    m->refs--;       for(e=0;e<num;e++)    {
pike.git/src/encode.c:1208:    }    ref_push_mapping(m);    return;    }       case TAG_MULTISET:    {    struct multiset *m;    struct array *a;    if(num<0) -  error("Failed to decode string. (multiset size is negative)\n"); +  Pike_error("Failed to decode string. (multiset size is negative)\n");       /* Heruetical */    if(data->ptr + num > data->len) -  error("Failed to decode multiset. (not enough data)\n"); +  Pike_error("Failed to decode multiset. (not enough data)\n");       /* NOTE: This code knows stuff about the implementation of multisets...*/    a = low_allocate_array(num, 0);    m = allocate_multiset(a);    tmp.type = T_MULTISET;    tmp.u.multiset = m;    mapping_insert(data->decoded, & data->counter, &tmp);    data->counter.u.integer++;    debug_malloc_touch(m);   
pike.git/src/encode.c:1267:    {    mapping_insert(data->decoded, &tmp, Pike_sp-1);    decode_value2(data);    pop_stack();    }else{    f_call_function(1);    mapping_insert(data->decoded, &tmp, Pike_sp-1);    push_svalue(Pike_sp-1);    decode_value2(data);    if(!data->codec) -  error("Failed to decode (no codec)\n"); +  Pike_error("Failed to decode (no codec)\n");    apply(data->codec,"decode_object",2);    pop_stack();    }    if(data->pickyness && Pike_sp[-1].type != T_OBJECT) -  error("Failed to decode object.\n"); +  Pike_error("Failed to decode object.\n");    return;      #ifdef AUTO_BIGNUM    /* It is possible that we should do this even without    * AUTO_BIGNUM /Hubbe    * However, that requires that some of the bignum functions    * are always available...    */    case 2:    {
pike.git/src/encode.c:1295: Inside #if defined(AUTO_BIGNUM)
   * doesn't work... /Hubbe    */    push_int(36);    convert_stack_top_with_base_to_bignum();    break;    }      #endif       default: -  error("Object coding not compatible.\n"); +  Pike_error("Object coding not compatible.\n");    break;    }    if(data->pickyness && Pike_sp[-1].type != T_OBJECT) -  error("Failed to decode (got type %d; expected object).\n", +  Pike_error("Failed to decode (got type %d; expected object).\n",    Pike_sp[-1].type);    break;       case TAG_FUNCTION:    tmp=data->counter;    data->counter.u.integer++;    decode_value2(data);       switch(num)    {
pike.git/src/encode.c:1332:    decode_value2(data);    if(Pike_sp[-2].type==T_INT)    {    pop_stack();    }else{    f_arrow(2);    }    break;       default: -  error("Function coding not compatible.\n"); +  Pike_error("Function coding not compatible.\n");    break;    }    if(data->pickyness && Pike_sp[-1].type != T_FUNCTION) -  error("Failed to decode function.\n"); +  Pike_error("Failed to decode function.\n");    break;          case TAG_PROGRAM:    switch(num)    {    case 0:    {    struct svalue *prog_code;       tmp=data->counter;    data->counter.u.integer++;    decode_value2(data);    -  /* Keep the value so that we can make a good error-message. */ +  /* Keep the value so that we can make a good Pike_error-message. */    prog_code = Pike_sp-1;    stack_dup();       if(data->codec)    {    apply(data->codec,"programof", 1);    }else{    ref_push_mapping(get_builtin_constants());    stack_swap();    f_index(2);    }    if(data->pickyness && !program_from_svalue(Pike_sp-1)) {    if ((prog_code->type == T_STRING) &&    (prog_code->u.string->len < 128) &&    (!prog_code->u.string->size_shift)) { -  error("Failed to decode program \"%s\".\n", +  Pike_error("Failed to decode program \"%s\".\n",    prog_code->u.string->str);    } -  error("Failed to decode program.\n"); +  Pike_error("Failed to decode program.\n");    }    /* Remove the extra entry from the stack. */    stack_swap();    pop_stack();    break;    }    case 1:    {    int d;    size_t size=0;
pike.git/src/encode.c:1403:    debug_malloc_touch(p);    tmp.type=T_PROGRAM;    tmp.u.program=p;    mapping_insert(data->decoded, & data->counter, &tmp);    data->counter.u.integer++;    p->refs--;       decode_value2(data);    f_version(0);    if(!is_eq(Pike_sp-1,Pike_sp-2)) -  error("Cannot decode programs encoded with other driver version.\n"); +  Pike_error("Cannot decode programs encoded with other driver version.\n");    pop_n_elems(2);       decode_number(p->flags,data);    p->flags &= ~(PROGRAM_FINISHED | PROGRAM_OPTIMIZED);    p->flags |= PROGRAM_AVOID_CHECK;    decode_number(p->storage_needed,data);    decode_number(p->alignment_needed,data);    decode_number(p->timestamp.tv_sec,data);    decode_number(p->timestamp.tv_usec,data);   
pike.git/src/encode.c:1466:    }   #endif          for(d=0;d<p->num_identifier_index;d++)    {    decode_number(p->identifier_index[d],data);    if(p->identifier_index[d] > p->num_identifier_references)    {    p->identifier_index[d]=0; -  error("Malformed program in decode.\n"); +  Pike_error("Malformed program in decode.\n");    }    }       for(d=0;d<p->num_variable_index;d++)    {    decode_number(p->variable_index[d],data);    if(p->variable_index[d] > p->num_identifiers)    {    p->variable_index[d]=0; -  error("Malformed program in decode.\n"); +  Pike_error("Malformed program in decode.\n");    }    }       for(d=0;d<p->num_identifier_references;d++)    {    decode_number(p->identifier_references[d].inherit_offset,data);    if(p->identifier_references[d].inherit_offset > p->num_inherits)    {    p->identifier_references[d].inherit_offset=0; -  error("Malformed program in decode.\n"); +  Pike_error("Malformed program in decode.\n");    }    decode_number(p->identifier_references[d].identifier_offset,data);    decode_number(p->identifier_references[d].id_flags,data);    }       for(d=0;d<p->num_strings;d++)    getdata(p->strings[d]);       debug_malloc_touch(dat);   
pike.git/src/encode.c:1517:    decode_number(p->inherits[d].identifier_level,data);    decode_number(p->inherits[d].parent_offset,data);    decode_number(p->inherits[d].parent_identifier,data);    decode_number(p->inherits[d].storage_offset,data);       decode_value2(data);    if(d==0)    {    if(Pike_sp[-1].type != T_PROGRAM ||    Pike_sp[-1].u.program != p) -  error("Program decode failed!\n"); +  Pike_error("Program decode failed!\n");    p->refs--;    }       switch(Pike_sp[-1].type)    {    case T_FUNCTION:    if(Pike_sp[-1].subtype == FUNCTION_BUILTIN) -  error("Failed to decode parent.\n"); +  Pike_error("Failed to decode parent.\n");       p->inherits[d].parent_identifier=Pike_sp[-1].subtype;    p->inherits[d].prog=program_from_svalue(Pike_sp-1);    if(!p->inherits[d].prog) -  error("Failed to decode parent.\n"); +  Pike_error("Failed to decode parent.\n");    add_ref(p->inherits[d].prog);    p->inherits[d].parent=Pike_sp[-1].u.object;    Pike_sp--;    dmalloc_touch_svalue(Pike_sp);    break;       case T_PROGRAM:    p->inherits[d].prog=Pike_sp[-1].u.program;    Pike_sp--;    dmalloc_touch_svalue(Pike_sp);    break;    default: -  error("Failed to decode inheritance.\n"); +  Pike_error("Failed to decode inheritance.\n");    }       getdata3(p->inherits[d].name);    }       debug_malloc_touch(dat);       SET_ONERROR(err1, restore_type_stack, Pike_compiler->type_stackp);    SET_ONERROR(err2, restore_type_mark, Pike_compiler->pike_type_mark_stackp);   
pike.git/src/encode.c:1609:   #endif /* PIKE_DEBUG */      #ifdef _REENTRANT    UNSET_ONERROR(err);    exit_threads_disable(NULL);   #endif    return;    }       default: -  error("Cannot decode program encoding type %d\n",num); +  Pike_error("Cannot decode program encoding type %d\n",num);    }    break;       default: -  error("Failed to restore string. (Illegal type)\n"); +  Pike_error("Failed to restore string. (Illegal type)\n");    }       mapping_insert(data->decoded, & tmp, Pike_sp-1);   }         static void free_decode_data(struct decode_data *data)   {    free_mapping(data->decoded);   }
pike.git/src/encode.c:1661:    decode_value2(data);    UNSET_ONERROR(err);    free_mapping(data->decoded);    return 1;   }      /* Compatibilidy decoder */      static unsigned char extract_char(char **v, ptrdiff_t *l)   { -  if(!*l) error("Format error, not enough place for char.\n"); +  if(!*l) Pike_error("Format Pike_error, not enough place for char.\n");    else (*l)--;    (*v)++;    return ((unsigned char *)(*v))[-1];   }      static ptrdiff_t extract_int(char **v, ptrdiff_t *l)   {    INT32 j;    ptrdiff_t i;       j=extract_char(v,l);    if(j & 0x80) return (j & 0x7f);       if((j & ~8) > 4) -  error("Format Error: Error in format string, invalid integer.\n"); +  Pike_error("Format Error: Error in format string, invalid integer.\n");    i=0;    while(j & 7) { i=(i<<8) | extract_char(v,l); j--; }    if(j & 8) return -i;    return i;   }      static void rec_restore_value(char **v, ptrdiff_t *l)   {    ptrdiff_t t, i;       i = extract_int(v,l);    t = extract_int(v,l);    switch(i)    {    case TAG_INT:    push_int(DO_NOT_WARN(t));    return;       case TAG_FLOAT:    if(sizeof(ptrdiff_t) < sizeof(FLOAT_TYPE)) /* FIXME FIXME FIXME FIXME */ -  error("Float architecture not supported.\n"); +  Pike_error("Float architecture not supported.\n");    push_int(DO_NOT_WARN(t)); /* WARNING! */    Pike_sp[-1].type = T_FLOAT;    return;       case TAG_TYPE: -  error("Format error:decoding of the type type not supported yet.\n"); +  Pike_error("Format Pike_error:decoding of the type type not supported yet.\n");    return;       case TAG_STRING: -  if(t<0) error("Format error, length of string is negative.\n"); -  if(*l < t) error("Format error, string to short\n"); +  if(t<0) Pike_error("Format Pike_error, length of string is negative.\n"); +  if(*l < t) Pike_error("Format Pike_error, string to short\n");    push_string(make_shared_binary_string(*v, t));    (*l)-= t;    (*v)+= t;    return;       case TAG_ARRAY: -  if(t<0) error("Format error, length of array is negative.\n"); +  if(t<0) Pike_error("Format Pike_error, length of array is negative.\n");    check_stack(t);    for(i=0;i<t;i++) rec_restore_value(v,l);    f_aggregate(DO_NOT_WARN(t));    return;       case TAG_MULTISET: -  if(t<0) error("Format error, length of multiset is negative.\n"); +  if(t<0) Pike_error("Format Pike_error, length of multiset is negative.\n");    check_stack(t);    for(i=0;i<t;i++) rec_restore_value(v,l);    f_aggregate_multiset(DO_NOT_WARN(t));    return;       case TAG_MAPPING: -  if(t<0) error("Format error, length of mapping is negative.\n"); +  if(t<0) Pike_error("Format Pike_error, length of mapping is negative.\n");    check_stack(t*2);    for(i=0;i<t;i++)    {    rec_restore_value(v,l);    rec_restore_value(v,l);    }    f_aggregate_mapping(DO_NOT_WARN(t*2));    return;       case TAG_OBJECT: -  if(t<0) error("Format error, length of object is negative.\n"); -  if(*l < t) error("Format error, string to short\n"); +  if(t<0) Pike_error("Format Pike_error, length of object is negative.\n"); +  if(*l < t) Pike_error("Format Pike_error, string to short\n");    push_string(make_shared_binary_string(*v, t));    (*l) -= t; (*v) += t;    APPLY_MASTER("objectof", 1);    return;       case TAG_FUNCTION: -  if(t<0) error("Format error, length of function is negative.\n"); -  if(*l < t) error("Format error, string to short\n"); +  if(t<0) Pike_error("Format Pike_error, length of function is negative.\n"); +  if(*l < t) Pike_error("Format Pike_error, string to short\n");    push_string(make_shared_binary_string(*v, t));    (*l) -= t; (*v) += t;    APPLY_MASTER("functionof", 1);    return;       case TAG_PROGRAM: -  if(t<0) error("Format error, length of program is negative.\n"); -  if(*l < t) error("Format error, string to short\n"); +  if(t<0) Pike_error("Format Pike_error, length of program is negative.\n"); +  if(*l < t) Pike_error("Format Pike_error, string to short\n");    push_string(make_shared_binary_string(*v, t));    (*l) -= t; (*v) += t;    APPLY_MASTER("programof", 1);    return;       default: -  error("Format error. Unknown type tag %ld:%ld\n", +  Pike_error("Format Pike_error. Unknown type tag %ld:%ld\n",    PTRDIFF_T_TO_LONG(i), PTRDIFF_T_TO_LONG(t));    }   }      void f_decode_value(INT32 args)   {    struct pike_string *s;    struct object *codec;       check_all_args("decode_value", args,