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.187 2004/09/06 11:43:44 grubba Exp $ + || $Id: encode.c,v 1.188 2005/04/21 15:45:06 mast 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.187 2004/09/06 11:43:44 grubba Exp $"); + RCSID("$Id: encode.c,v 1.188 2005/04/21 15:45:06 mast 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:2260:    ONERROR err;       if ((string_no < 0) || (string_no >= p->num_strings)) {    Pike_error("Bad bytecode string number: %d (expected 0 - %d).\n",    string_no, p->num_strings-1);    }       bytecode = p->strings[string_no];       if (bytecode->len % 3) { -  Pike_error("Bad bytecode string length: %d (expected multiple of 3).\n", +  Pike_error("Bad bytecode string length: %"PRINTPTRDIFFT"d (expected multiple of 3).\n",    bytecode->len);    }       init_bytecode();       SET_ONERROR(err, exit_bytecode, NULL);       switch(bytecode->size_shift) {   #define EMIT_BYTECODE(STR) do { \    for (e = 0; e < bytecode->len; e += 3) { \
pike.git/src/encode.c:4055:    local_num_program = p->num_program;    local_num_relocations = p->num_relocations;    local_num_linenumbers = p->num_linenumbers;    }       /* Verify... */   #define FOO(NUMTYPE,TYPE,NAME) \    if (PIKE_CONCAT(local_num_, NAME) != p->PIKE_CONCAT(num_,NAME)) { \    ref_push_program (p); \    decode_error(Pike_sp - 1, NULL, \ -  "Value mismatch for num_" TOSTR(NAME) ": %d != %d\n", \ -  PIKE_CONCAT(local_num_, NAME), \ -  p->PIKE_CONCAT(num_, NAME)); \ +  "Value mismatch for num_" TOSTR(NAME) ": %ld != %ld\n", \ +  (long) PIKE_CONCAT(local_num_, NAME), \ +  (long) p->PIKE_CONCAT(num_, NAME)); \    }   #include "program_areas.h"       /* Decode the actual constants    *    * This must be done after the program has been ended.    */    for (e=0; e<local_num_constants; e++) {    struct program_constant *constant = p->constants+e;    if ((constant->sval.type != T_INT) ||