Mike Lambert wrote:
> Anyways, cd to languages/BASIC, run basic.pl, type "LOAD wumpus", and > watch it die on "Not a string!". Tracing this beast down, needs attached patch, to cut displayed arg strings. BTW trace.c nether frees this escaped string. The last instruction executed is: PC=1457; OP=102 (set_p_ki_s); ARGS=(P22=0x81565d4, [I1=1], S0="1 REM Taken from David Ahl's 101 BASIC G...") Not a string! .... where actually the hash key I1 is not a string. AFAIK this behaviour is intended. The key patch is working fine, all perl6 tests succeed as before. leo
--- debug.c Tue Aug 20 07:06:07 2002 +++ /home/lt/src/parrot-007/debug.c Wed Aug 21 09:39:42 2002 @@ -497,10 +497,19 @@ { const char *end = string + length; char *new,*fill; + int cut = 0; +#define DISP_LEN 40 /* Return if there is no string to escape*/ if (!string || !*string) return NULL; + /* if string is too long, cut it */ + if (length > DISP_LEN) { + length = DISP_LEN; + end = string + length; + cut = 1; + length += 2; + } fill = new = (char *)mem_sys_allocate(length * 2 + 1); @@ -539,6 +548,11 @@ break; } } + if (cut) { + *(fill++) = '.'; + *(fill++) = '.'; + *(fill++) = '.'; + } *fill = '\0'; return new; }