Branch: Tag:

2001-07-22

2001-07-22 22:00:53 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Improved debug.

Rev: src/encode.c:1.117

25:   #include "version.h"   #include "bignum.h"    - RCSID("$Id: encode.c,v 1.116 2001/07/22 21:16:21 grubba Exp $"); + RCSID("$Id: encode.c,v 1.117 2001/07/22 22:00:53 grubba Exp $");      /* #define ENCODE_DEBUG */   
917: Inside #if defined(ENCODE_PROGRAM) and #if defined(PIKE_DEBUG)
  #ifdef ENCODE_PROGRAM   #ifdef PIKE_DEBUG    { -  ptrdiff_t bufpos = data->buf.s->len; +  ptrdiff_t bufpos = data->buf.s.len;   #endif /* PIKE_DEBUG */    ENCODE_PROGRAM(p, &(data->buf));   #ifdef PIKE_DEBUG    if (p->num_program * sizeof(p->program[0]) != -  data->buf.s->len - bufpos) { +  data->buf.s.len - bufpos) {    fatal("ENCODE_PROGRAM() failed:\n"    "Encoded data len: %ld\n"    "Expected data len: %ld\n",    DO_NOT_WARN((long)(p->num_program * sizeof(p->program[0]))), -  DO_NOT_WARN((long)(data->buf.s->len - bufpos))); +  DO_NOT_WARN((long)(data->buf.s.len - bufpos)));    }    }   #endif /* PIKE_DEBUG */