pike.git / src / encode.c

version» Context lines:

pike.git/src/encode.c:18:   #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.92 2001/03/17 16:37:42 grubba Exp $"); + RCSID("$Id: encode.c,v 1.93 2001/03/18 00:59:33 grubba 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:282: Inside #if defined(USE_PIKE_TYPE)
   /*NOTREACHED*/       break;       case PIKE_T_NAME:    /* Strip the name. */    t=t->cdr;    goto one_more_type;       case T_ASSIGN: -  addchar((ptrdiff_t)t->car); +  if (((ptrdiff_t)t->car < 0) || ((ptrdiff_t)t->car > 9)) { +  fatal("Bad assign marker: %ld\n", (long)(ptrdiff_t)t->car); +  } +  addchar('0' + (ptrdiff_t)t->car);    t = t->cdr;    goto one_more_type;       case T_FUNCTION:    while(t->type == T_FUNCTION) {    encode_type(t->car, data);    t = t->cdr;    }    addchar(T_MANY);    /* FALL_THROUGH */
pike.git/src/encode.c:1133:    ONERROR err2;       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();    switch(tmp)    {    default: -  fatal("error in type string (%d).\n", tmp); +  Pike_error("decode_value(): Error in type string (%d).\n", tmp);    /*NOTREACHED*/    break;       case T_ASSIGN: -  +  tmp = GETC(); +  if ((tmp < '0') || (tmp > '9')) { +  Pike_error("decode_value(): Bad marker in type string (%d).\n", tmp); +  }   #ifdef USE_PIKE_TYPE    low_decode_type(data); -  push_assign_type(GETC()); +  push_assign_type(tmp); /* Actually reverse, but they're the same */    break;   #else /* !USE_PIKE_TYPE */ -  +  push_type(T_ASSIGN);    push_type(tmp); -  push_type(GETC()); +     goto one_more_type;   #endif /* USE_PIKE_TYPE */       case T_FUNCTION:   #ifdef USE_PIKE_TYPE    {    int narg = 0;       while (GETC() != T_MANY) {    data->ptr--;