Branch: Tag:

1998-03-17

1998-03-17 23:03:34 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Added some DEBUG code for diff_longest_sequence.

Rev: src/builtin_functions.c:1.83

4:   ||| See the files COPYING and DISCLAIMER for more information.   \*/   #include "global.h" - RCSID("$Id: builtin_functions.c,v 1.82 1998/03/16 22:11:48 grubba Exp $"); + RCSID("$Id: builtin_functions.c,v 1.83 1998/03/17 23:03:34 grubba Exp $");   #include "interpret.h"   #include "svalue.h"   #include "pike_macros.h"
1919: Inside #if defined(DIFF_DEBUG)
  #ifdef DIFF_DEBUG    fprintf(stderr, "DIFF: j=%d, x=%d\n", j, x);   #endif /* DIFF_DEBUG */ + #ifdef DEBUG +  if (x >= blen) { +  fatal("diff_longest_sequence(): x:%d >= blen:%d\n", x, blen); +  } else if (x < 0) { +  fatal("diff_longest_sequence(): x:%d < 0\n", x); +  } + #endif /* DEBUG */    if (!marks[x]) {    int pos;   
1955: Inside #if defined(DIFF_DEBUG)
  #ifdef DIFF_DEBUG    fprintf(stderr, "DIFF: New j=%d, x=%d\n", j, x);   #endif /* DIFF_DEBUG */ + #ifdef DEBUG +  if (x >= blen) { +  fatal("diff_longest_sequence(): x:%d >= blen:%d\n", x, blen); +  } else if (x < 0) { +  fatal("diff_longest_sequence(): x:%d < 0\n", x); +  } + #endif /* DEBUG */       /* Put x on the stack. */    marks[x] = 1;