pike.git / src / encode.c

version» Context lines:

pike.git/src/encode.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: encode.c,v 1.209 2003/12/17 21:08:56 marcus Exp $ + || $Id: encode.c,v 1.210 2004/03/14 05:45:44 nilsson Exp $   */      #include "global.h"   #include "stralloc.h"   #include "pike_macros.h"   #include "object.h"   #include "constants.h"   #include "interpret.h"   #include "svalue.h"   #include "mapping.h"
pike.git/src/encode.c:25:   #include "fsort.h"   #include "threads.h"   #include "stuff.h"   #include "version.h"   #include "bignum.h"   #include "pikecode.h"   #include "pike_types.h"   #include "opcodes.h"   #include "peep.h"    - RCSID("$Id: encode.c,v 1.209 2003/12/17 21:08:56 marcus Exp $"); + RCSID("$Id: encode.c,v 1.210 2004/03/14 05:45:44 nilsson Exp $");      /* #define ENCODE_DEBUG */      /* Use the old encoding method for programs. */   /* #define OLD_PIKE_ENCODE_PROGRAM */      #ifdef ENCODE_DEBUG   /* Pass a nonzero integer as the third arg to encode_value,    * encode_value_canonic and decode_value to activate this debug. */   #define EDB(N,X) do { debug_malloc_touch(data); if (data->debug>=N) {X;} } while (0)
pike.git/src/encode.c:1669: Inside #if defined(ENCODE_DEBUG)
   * other uses in the future. */    BIT_VOID | BIT_INT,   #endif    0);       initialize_buf(&data->buf);    data->canonic = 0;    data->encoded=allocate_mapping(128);    data->delayed = allocate_array (0);    data->counter.type=T_INT; +  data->counter.subtype=NUMBER_NUMBER;    data->counter.u.integer=COUNTER_START;      #ifdef ENCODE_DEBUG    data->debug = args > 2 ? Pike_sp[2-args].u.integer : 0;    data->depth = -2;   #endif       if(args > 1 && Pike_sp[1-args].type == T_OBJECT)    {    data->codec=Pike_sp[1-args].u.object;
pike.git/src/encode.c:2324:   #endif       DECODE("decode_value2");       switch(what & TAG_MASK)    {    case TAG_DELAYED:    EDB (2, fprintf(stderr, "%*sDecoding delay encoded from <%d>\n",    data->depth, "", num););    entry_id.type = T_INT; -  entry_id.subtype = 0; +  entry_id.subtype = NUMBER_NUMBER;    entry_id.u.integer = num;    if (!(delayed_enc_val = low_mapping_lookup (data->decoded, &entry_id)))    Pike_error ("Failed to find previous record of delay encoded entry <%d>.\n",    num);    DECODE ("decode_value2");    break;       case TAG_AGAIN:    EDB (1, fprintf(stderr, "%*sDecoding TAG_AGAIN from <%d>\n",    data->depth, "", num););    entry_id.type=T_INT; -  entry_id.subtype=0; +  entry_id.subtype=NUMBER_NUMBER;    entry_id.u.integer=num;    if((tmp2=low_mapping_lookup(data->decoded, &entry_id)))    {    push_svalue(tmp2);    }else{    Pike_error("Failed to decode TAG_AGAIN entry <%d>.\n", num);    }    goto decode_done;       default:
pike.git/src/encode.c:4271:    push_svalue(res);    return 1;    }    /* Possible recursion detected. */    /* return 0; */    }    }       data=ALLOC_STRUCT(decode_data);    data->counter.type=T_INT; +  data->counter.subtype=NUMBER_NUMBER;    data->counter.u.integer=COUNTER_START;    data->data=(unsigned char *)tmp->str;    data->len=tmp->len;    data->ptr=0;    data->codec=codec;    data->pickyness=0;    data->pass=1;    data->unfinished_programs=0;    data->unfinished_objects=0;    data->raw = tmp;