fix macro_hooks patch
[nedit-bw.git] / InterpretDebug-mods.patch
blobdf99609df97ac31007f12456fa7ef0cf8c7a65af
1 Subject: modifications to the InterpretDebug patch
3 ---
5 makefiles/Makefile.bertw | 3
6 source/interpret.c | 249 ++++++++++++++++++++++++++++++++---------------
7 source/interpret.h | 5
8 source/parse.y | 14 --
9 source/userCmds.c | 4
10 5 files changed, 184 insertions(+), 91 deletions(-)
12 diff --quilt old/source/interpret.c new/source/interpret.c
13 --- old/source/interpret.c
14 +++ new/source/interpret.c
15 @@ -112,23 +112,24 @@ static const char *tagToStr(enum typeTag
17 #if defined(DEBUG_ASSEMBLY) || defined(DEBUG_STACK)
18 #define DEBUG_DISASSEMBLER
19 -static const char *printd(const char *f, ...);
20 -static int outPrintd();
21 -static void disasm(Inst *inst, int nInstr);
22 +static const char *printd(const char *f, ...)
23 +__attribute__((__format__(printf,1,2)));
24 +static int outPrintd(void);
25 +static void disasm(const char *name, Inst *inst, int nInstr);
26 static void disasmInternal(Inst *inst, int nInstr);
27 #endif /* #if defined(DEBUG_ASSEMBLY) || defined(DEBUG_STACK) */
29 #ifdef DEBUG_ASSEMBLY /* for disassembly */
30 -#define DISASM(i, n) disasm(i, n)
31 +#define DISASM(name, i, n) disasm(name, i, n)
32 #else /* #ifndef DEBUG_ASSEMBLY */
33 -#define DISASM(i, n)
34 +#define DISASM(name, i, n)
35 #endif /* #ifndef DEBUG_ASSEMBLY */
37 #ifdef DEBUG_STACK /* for run-time instruction and stack trace */
38 static void stackdump(int n, int extra);
39 static void stackdumpInternal(int n, int extra);
40 #define STACKDUMP(n, x) stackdump(n, x)
41 -#define DISASM_RT(i, n) disasm(i, n)
42 +#define DISASM_RT(i, n) disasm(NULL, i, n)
43 #else /* #ifndef DEBUG_STACK */
44 #define STACKDUMP(n, x)
45 #define DISASM_RT(i, n)
46 @@ -161,6 +162,8 @@ static Inst *ProgP; /* next free spot
47 static Inst *LoopStack[LOOP_STACK_SIZE]; /* addresses of break, cont stmts */
48 static Inst **LoopStackPtr = LoopStack; /* to fill at the end of a loop */
50 +static const char *ProgramName = "";
52 /* Global data for the interpreter */
53 static DataValue *TheStack; /* the stack */
54 static DataValue *StackP; /* next free spot on stack */
55 @@ -253,7 +256,7 @@ void InitMacroGlobals(void)
56 ** Start collecting instructions for a program. Clears the program
57 ** and the symbol table.
59 -void BeginCreatingProgram(AccumulatorData *acc)
60 +void BeginCreatingProgram(const char *name, AccumulatorData *acc)
62 /* save state */
63 acc->localSymList = LocalSymList;
64 @@ -261,10 +264,12 @@ void BeginCreatingProgram(AccumulatorDat
65 acc->progP = ProgP;
66 memcpy(acc->loopStack, LoopStack, sizeof(*LoopStack) * LOOP_STACK_SIZE);
67 acc->loopStackPtr = LoopStackPtr;
68 + acc->name = ProgramName;
70 LocalSymList = NULL;
71 ProgP = Prog;
72 LoopStackPtr = LoopStack;
73 + ProgramName = name;
77 @@ -278,12 +283,13 @@ Program *FinishCreatingProgram(Accumulat
78 int progLen, fpOffset = 0;
79 Symbol *s;
81 - newProg = (Program *)XtMalloc(sizeof(Program));
82 + newProg = XtNew(Program);
83 + newProg->name = XtMalloc(strlen(ProgramName) + 1); /* +1 for '\0' */
84 progLen = ((char *)ProgP) - ((char *)Prog);
85 newProg->code = (Inst *)XtMalloc(progLen);
86 memcpy(newProg->code, Prog, progLen);
87 newProg->localSymList = LocalSymList;
88 - newProg->name = NULL;
89 + strcpy(newProg->name, ProgramName);
90 newProg->refcount = 1;
92 /* Local variables' values are stored on the stack. Here we assign
93 @@ -291,7 +297,7 @@ Program *FinishCreatingProgram(Accumulat
94 for (s = newProg->localSymList; s != NULL; s = s->next)
95 s->value.val.n = fpOffset++;
97 - DISASM(newProg->code, ProgP - Prog);
98 + DISASM(newProg->name, newProg->code, ProgP - Prog);
100 /* restore state */
101 LocalSymList = acc->localSymList;
102 @@ -299,6 +305,7 @@ Program *FinishCreatingProgram(Accumulat
103 ProgP = acc->progP;
104 memcpy(LoopStack, acc->loopStack, sizeof(*LoopStack) * LOOP_STACK_SIZE);
105 LoopStackPtr = acc->loopStackPtr;
106 + ProgramName = acc->name;
108 return newProg;
110 @@ -3588,7 +3595,9 @@ static int errCheck(const char *s)
112 static char *stackDumpStr(DataValue *fp, const char *msg, char **s, int *pLen)
114 - int len;
115 + static const char backtraceMsg[] = "\n\nBacktrace:";
116 + char frameBuf[TYPE_INT_STR_SIZE(int) + 2];
117 + int len, nFrames, frameWidth, thisFrameWidth;
118 const char *op;
119 char *np;
120 DataValue *nfp = fp;
121 @@ -3596,26 +3605,30 @@ static char *stackDumpStr(DataValue *fp,
123 #ifdef DEBUG_STACK
124 const char *dump;
125 - printd("\n\n");
126 + static const char stackdumpMsg[] = "\n\nStack:\n";
127 disasmInternal(PC - 1, 1);
128 stackdumpInternal(0, 50);
129 dump = printd(NULL);
130 #endif
132 /* first measure the lengths */
133 - len = strlen(msg) + 1;
134 + len = strlen(msg) + strlen(backtraceMsg) + 1;
135 nfp = fp;
136 + nFrames = 0;
137 do {
138 + nFrames++;
139 len = len + FP_GET_ITEM(nfp, FP_FUNCTION_NAME).val.str.len + 1;
140 pc = FP_GET_RET_PC(nfp);
141 nfp = FP_GET_OLD_FP(nfp);
142 } while (pc);
143 + frameWidth = lenLongAsStr(nFrames);
144 + len += nFrames * (2 + frameWidth);
145 #ifdef DEBUG_STACK
146 - len += strlen(dump);
147 + len += strlen(stackdumpMsg) + strlen(dump);
148 #endif
149 if (*pLen < len)
151 - *s = *s ? XtRealloc(*s, len) : XtMalloc(len);
152 + *s = XtRealloc(*s, len);
153 *pLen = len;
155 /* now copy */
156 @@ -3623,10 +3636,25 @@ static char *stackDumpStr(DataValue *fp,
157 op = msg;
158 while (*op)
159 *np++ = *op++;
160 + op = backtraceMsg;
161 + while (*op)
162 + *np++ = *op++;
164 nfp = fp;
165 + nFrames = 0;
166 do {
167 + nFrames++;
168 *np++ = '\n';
169 + *np++ = '#';
170 + thisFrameWidth = 0;
171 + op = longAsStr(nFrames);
172 + while (*op) {
173 + thisFrameWidth++;
174 + *np++ = *op++;
176 + while (thisFrameWidth++ < frameWidth)
177 + *np++ = ' ';
178 + *np++ = ' ';
179 op = FP_GET_ITEM(nfp, FP_FUNCTION_NAME).val.str.rep;
180 while (*op)
181 *np++ = *op++;
182 @@ -3634,12 +3662,15 @@ static char *stackDumpStr(DataValue *fp,
183 nfp = FP_GET_OLD_FP(nfp);
184 } while (pc);
185 #ifdef DEBUG_STACK
186 + op = stackdumpMsg;
187 + while (*op)
188 + *np++ = *op++;
189 op = dump;
190 while (*op)
191 *np++ = *op++;
192 #endif
194 - *np = 0;
195 + *np = '\0';
196 return *s;
199 @@ -3754,27 +3785,27 @@ static const char *printd(const char *f,
200 return printdBuffer;
203 -int outPrintd()
204 +int outPrintd(void)
206 const char *s = printd(NULL);
207 const char *cp;
209 static int outIsTTY = -1;
210 if (outIsTTY == -1)
211 - outIsTTY = isatty(fileno(stdout));
212 + outIsTTY = isatty(fileno(stderr));
214 if (outIsTTY)
216 for (cp = s; *cp; cp++)
217 if (*cp == '\n')
218 - printf("\033[K\n");
219 + fprintf(stderr, "\033[K\n");
220 else
221 - putchar(*cp);
222 + fputc(*cp, stderr);
224 else
226 for (cp = s; *cp; cp++)
227 - putchar(*cp);
228 + fputc(*cp, stderr);
230 return cp - s;
232 @@ -3785,40 +3816,59 @@ static void dumpVal(DataValue dv)
234 switch (dv.tag) {
235 case INT_TAG:
236 - printd("i=%d", dv.val.n);
237 + printd(" <%s %d>", tagToStr(INT_TAG), dv.val.n);
238 break;
239 case STRING_TAG:
241 - int k;
242 - char s[21];
243 - char *src = dv.val.str.rep;
244 + int k, l;
245 + char s[64];
246 + const char *src = dv.val.str.rep;
247 + unsigned len = dv.val.str.len;
248 if (!src) {
249 - printd("s=<NULL>");
250 + printd(" <%s NULL>", tagToStr(STRING_TAG));
252 else {
253 - for (k = 0; src[k] && k < sizeof s - 1; k++) {
254 - s[k] = isprint(src[k]) ? src[k] : '?';
255 + for (k = 0, l = 0; src[k] && l < sizeof s - 1; k++, l++) {
256 + char *e;
257 + const char to[] = "\\\"ntbrfave";
258 +#ifdef EBCDIC_CHARSET
259 + const char from[] = "\\\"\n\t\b\r\f\a\v\x27"; /* EBCDIC escape */
260 +#else
261 + const char from[] = "\\\"\n\t\b\r\f\a\v\x1B"; /* ASCII escape */
262 +#endif
263 + if ((e = strchr(from, src[k]))) {
264 + if (l < sizeof s - 2) {
265 + s[l++] = '\\';
266 + s[l] = to[e - from];
269 + else if (isprint(src[k])) {
270 + s[l] = src[k];
272 + else {
273 + s[l] = '?';
276 - s[k] = 0;
277 - printd("s=\"%s\"%s[%d]", s,
278 - src[k] ? "..." : "", strlen(src));
279 + s[l] = 0;
280 + printd(" <%s %u:\"%s\"%s>", tagToStr(STRING_TAG),
281 + len, s, src[k] ? "..." : "");
284 break;
285 case ARRAY_TAG:
286 - printd("%08p <%s>[%d]", dv.val.arrayPtr, tagToStr(ARRAY_TAG),
287 - ArraySize(&dv));
288 + printd(" <%s %u:%p>", tagToStr(ARRAY_TAG), ArraySize(&dv),
289 + dv.val.arrayPtr);
290 break;
291 case NO_TAG:
292 - if (!dv.val.inst) {
293 - printd("<%s>", tagToStr(NO_TAG));
294 + if (!*(void **)&dv.val) {
295 + printd(" <%s>", tagToStr(NO_TAG));
297 else {
298 - printd("?%8p", dv.val.inst);
299 + printd(" ?%p", *(void **)&dv.val);
301 break;
302 default:
303 - printd("UNKNOWN DATA TAG %d ?%8p", dv.tag, dv.val.inst);
304 + printd(" <unknown value %d:%p>", dv.tag, *(void **)&dv.val);
305 break;
308 @@ -3833,57 +3883,65 @@ static void disasmInternal(Inst *inst, i
309 #undef OP
311 int i, j;
312 + static size_t opLen;
314 - printd("\n");
315 + if (!opLen) {
316 + for (j = 0; j < N_OPS; ++j) {
317 + if (opLen < strlen(opNames[j])) {
318 + opLen = strlen(opNames[j]);
323 for (i = 0; i < nInstr; ++i) {
324 - printd("Prog %8p ", &inst[i]);
325 + printd("Prog %10p", &inst[i]);
326 for (j = 0; j < N_OPS; ++j) {
327 if (inst[i].func == OpFns[j]) {
328 - printd("%22s ", opNames[j]);
329 + printd(" %*s", (int)opLen, opNames[j]);
330 if (j == OP_PUSH_SYM || j == OP_ASSIGN) {
331 Symbol *sym = inst[i+1].sym;
332 - printd("%s", sym->name);
333 - if (sym->value.tag == STRING_TAG &&
334 - strncmp(sym->name, "string #", 8) == 0) {
335 + printd(" %s", sym->name);
336 + if (sym->type == CONST_SYM
337 + && sym->value.tag == STRING_TAG) {
338 dumpVal(sym->value);
340 ++i;
342 else if (j == OP_PUSH_IMMED) {
343 - printd("i=%d", inst[i+1].value);
344 + printd(" <immediate %d>", inst[i+1].value);
345 ++i;
347 else if (j == OP_BRANCH || j == OP_BRANCH_FALSE ||
348 j == OP_BRANCH_NEVER || j == OP_BRANCH_TRUE) {
349 - printd("to=(%d) %p", inst[i+1].value,
350 + printd(" to=(%+d) %p", inst[i+1].value,
351 &inst[i+1] + inst[i+1].value);
352 ++i;
354 else if (j == OP_CONCAT) {
355 - printd("nExpr=%d", inst[i+1].value);
356 + printd(" nExpr=%d", inst[i+1].value);
357 ++i;
359 else if (j == OP_SUBR_CALL) {
360 int args = inst[i+2].value;
361 - printd("%s ", inst[i+1].sym->name);
362 + printd(" %s", inst[i+1].sym->name);
363 if (args < 0) {
364 - printd("%d+args[] (%d)", -args - 1, args);
365 + printd(" %d+args[] (%d)", -args - 1, args);
367 else {
368 - printd("%d args", args);
369 + printd(" %d args", args);
371 i += 2;
373 else if (j == OP_SUBR_CALL_STACKED_N) {
374 - printd("%s args[] (?)", inst[i+1].sym->name);
375 + printd(" %s args[] (?)", inst[i+1].sym->name);
376 ++i;
378 else if (j == OP_BEGIN_ARRAY_ITER) {
379 - printd("%s in", inst[i+1].sym->name);
380 + printd(" %s in", inst[i+1].sym->name);
381 ++i;
383 else if (j == OP_ARRAY_ITER) {
384 - printd("%s = %s++ end-loop=(%d) %p",
385 + printd(" %s = %s++ end-loop=(%+d) %p",
386 inst[i+1].sym->name,
387 inst[i+2].sym->name,
388 inst[i+3].value, &inst[i+3] + inst[i+3].value);
389 @@ -3895,18 +3953,20 @@ static void disasmInternal(Inst *inst, i
390 j == OP_ANONARRAY_INDEX_VAL ||
391 j == OP_NAMED_ARG1 ||
392 j == OP_NAMED_ARGN) {
393 - printd("nDim=%d", inst[i+1].value);
394 + printd(" nDim=%d", inst[i+1].value);
395 ++i;
397 else if (j == OP_ARRAY_REF_ASSIGN_SETUP) {
398 - printd("binOp=%s ", inst[i+1].value ? "true" : "false");
399 - printd("nDim=%d", inst[i+2].value);
400 + printd(" binOp=%s nDim=%d",
401 + inst[i+1].value ? "true" : "false",
402 + inst[i+2].value);
403 i += 2;
405 else if (j == OP_PUSH_ARRAY_SYM) {
406 - printd("%s", inst[++i].sym->name);
407 - printd(" %s", inst[i+1].value ? "createAndRef" : "refOnly");
408 - ++i;
409 + printd(" %s %s",
410 + inst[i+1].sym->name,
411 + inst[i+2].value ? "createAndRef" : "refOnly");
412 + i += 2;
415 printd("\n");
416 @@ -3914,18 +3974,20 @@ static void disasmInternal(Inst *inst, i
419 if (j == N_OPS) {
420 - printd("%x\n", inst[i].value);
421 + printd(" %x\n", inst[i].value);
426 -static void disasm(Inst *inst, int nInstr)
427 +static void disasm(const char *name, Inst *inst, int nInstr)
429 static int outIsTTY = -1;
430 - if (outIsTTY == -1) outIsTTY = isatty(fileno(stdout));
431 + if (outIsTTY == -1) outIsTTY = isatty(fileno(stderr));
432 if (outIsTTY) { printd("\033[H"); }
433 + if (name) printd(">> %s\n", name);
434 disasmInternal(inst, nInstr);
435 if (outIsTTY) { printd("\033[J\n"); }
436 + if (name) printd("\n");
437 outPrintd();
439 #endif /* #ifdef DEBUG_DISASSEMBLER */
440 @@ -3938,7 +4000,11 @@ static void stackdumpframe(DataValue *ar
441 Inst *retPC = FP_GET_RET_PC(fp);
442 DataValue *oldFP = retPC ? FP_GET_OLD_FP(fp) : NULL;
443 DataValue *arg1 = &FP_GET_ARG_N(fp, 0);
444 + DataValue *argc = &FP_GET_ITEM(fp, FP_ARG_COUNT_INDEX);
445 DataValue *fnNm = &FP_GET_ITEM(fp, FP_FUNCTION_NAME);
446 + DataValue *prFP = &FP_GET_ITEM(fp, FP_PROG_INDEX);
447 + DataValue *ofFP = &FP_GET_ITEM(fp, FP_OLD_FP_INDEX);
448 + DataValue *rpFP = &FP_GET_ITEM(fp, FP_RET_PC_INDEX);
449 DataValue *dv;
450 DataValue *endDv = (arg1 > outpt) ? arg1 : outpt;
451 int nArgs = FP_GET_ARG_COUNT(fp);
452 @@ -3976,17 +4042,16 @@ static void stackdumpframe(DataValue *ar
453 for (dv = endDv; dv < sp; dv++)
454 #endif /* #ifdef DEBUG_STACK_HEADFIRST */
456 - const char *posFmt = "%-6s ";
457 + const char *posFmt = "%-6s";
458 const char *symName = "";
460 char *pos = "";
461 char buffer[sizeof(STACK_DUMP_ARG_PREFIX) + TYPE_INT_STR_SIZE(int)];
462 int offset = dv - fp;
463 - const char *leadIn = (dv >= arrow) ? ">>>>" :
464 - (dv == arg1) ? "----" :
465 - (dv == fnNm) ? "====" : "";
466 - printd("%4.4s", leadIn);
467 - printd("%8p%c", dv, topMark);
468 + const char *leadIn = (dv >= arrow) ? ">>>>>" :
469 + (dv == arg1) ? "---->" :
470 + (dv == argc) ? "====>" : "";
471 + printd("%5.5s%10p%c", leadIn, dv, topMark);
472 switch (offset) {
473 case FP_ARG_COUNT_INDEX: pos = "NArgs"; break; /* num. arguments */
474 case FP_FUNCTION_NAME: pos = "FnName"; break;
475 @@ -4004,10 +4069,7 @@ static void stackdumpframe(DataValue *ar
477 else if (0 <= offset && offset < nSyms) {
478 sprintf(pos = buffer, offset ? "[%d]" : "FP[%d]", offset);
479 - posFmt = "%6s ";
481 - else if (offset == 0) {
482 - pos = "FrameP";
483 + posFmt = "%6s";
485 break;
487 @@ -4022,12 +4084,39 @@ static void stackdumpframe(DataValue *ar
491 - printd("%-*.*s ", symLen, symLen, symName);
492 + printd(" %-*.*s", symLen, symLen, symName);
494 - if (dv == fnNm && dv->tag == STRING_TAG && dv->val.str.rep)
495 - printd("%s", dv->val.str.rep);
496 + if (dv == fnNm && dv->tag == STRING_TAG && dv->val.str.rep) {
497 + printd(" %s", dv->val.str.rep);
499 + else
500 + if (dv == ofFP) {
501 + if (dv->val.dataval) {
502 + printd(" %p", dv->val.dataval);
504 + else {
505 + printd(" <end>");
508 + else
509 + if (dv == rpFP) {
510 + if (dv->val.inst) {
511 + printd(" %p", dv->val.inst);
513 + else {
514 + printd(" <end>");
517 else
518 + if (dv == prFP) {
519 + Program *prog = dv->val.prog;
520 + printd(" <%s:%u %p>",
521 + prog->name, prog->refcount,
522 + prog);
524 + else {
525 dumpVal(*dv);
528 printd("\n");
530 @@ -4054,7 +4143,7 @@ static void stackdumpInternal(int n, int
531 if (outpt < TheStack)
532 printd("--------------Stack base--------------\n");
533 stackdumpframe(arrow, outpt, FrameP, StackP, '*');
534 - printd("Stack ----->\n");
535 + printd("Stack ----->\n\n");
536 #endif /* #ifdef DEBUG_STACK_HEADFIRST */
539 @@ -4062,15 +4151,19 @@ static void stackdump(int n, int extra)
541 static int outIsTTY = -1;
542 if (outIsTTY == -1)
543 - outIsTTY = isatty(fileno(stdout));
544 + outIsTTY = isatty(fileno(stderr));
546 - stackdumpInternal(n, extra);
547 +#ifndef DEBUG_STACKDUMP_EXTRA
548 +#define DEBUG_STACKDUMP_EXTRA 0
549 +#endif
550 + stackdumpInternal(n, extra + DEBUG_STACKDUMP_EXTRA);
551 +#undef DEBUG_STACKDUMP_EXTRA
553 if (outIsTTY)
554 printd("\033[J\n");
556 outPrintd();
557 - fflush(stdout);
558 + fflush(stderr);
561 #endif /* ifdef DEBUG_STACK */
562 diff --quilt old/source/interpret.h new/source/interpret.h
563 --- old/source/interpret.h
564 +++ new/source/interpret.h
565 @@ -105,10 +105,10 @@ typedef struct SymbolRec {
566 } Symbol;
568 typedef struct ProgramTag {
569 + char *name;
570 Symbol *localSymList;
571 Inst *code;
572 unsigned refcount;
573 - char *name;
574 } Program;
576 /* Information needed to re-start a preempted macro */
577 @@ -128,6 +128,7 @@ typedef struct AccumulatorDataTag {
578 Inst *progP;
579 Inst *loopStack[LOOP_STACK_SIZE];
580 Inst **loopStackPtr;
581 + const char *name;
582 } AccumulatorData;
584 void InitMacroGlobals(void);
585 @@ -144,7 +145,7 @@ int ArrayCopy(DataValue *dstArray, DataV
587 /* Routines for creating a program, (accumulated beginning with
588 BeginCreatingProgram and returned via FinishCreatingProgram) */
589 -void BeginCreatingProgram(AccumulatorData *acc);
590 +void BeginCreatingProgram(const char *name, AccumulatorData *acc);
591 int AddOp(int op, char **msg);
592 int AddSym(Symbol *sym, char **msg);
593 int AddImmediate(int value, char **msg);
594 diff --quilt old/source/parse.y new/source/parse.y
595 --- old/source/parse.y
596 +++ new/source/parse.y
597 @@ -196,7 +196,7 @@ definesym: SYMBOL {
598 yyerror("try to override built-in subroutine"); YYERROR;
600 $$.sym = PromoteToGlobal($1);
601 - BeginCreatingProgram($$.acc);
602 + BeginCreatingProgram($$.sym->name, $$.acc);
605 define: definekw blank definesym blank blockwb {
606 @@ -745,14 +745,16 @@ Program *ParseMacro(char *expr, char **m
608 Program *prog;
609 AccumulatorData *acc = XtNew(AccumulatorData);
610 - static const char *prefix = ">> ";
612 #if YYDEBUG
613 int oldyydebug = yydebug;
614 yydebug = 1;
615 #endif
617 - BeginCreatingProgram(acc);
618 + if (!name)
619 + name = "--unknown--";
621 + BeginCreatingProgram(name, acc);
623 /* whether we allow the "define" keyword */
624 AllowDefine = allowDefine;
625 @@ -780,12 +782,6 @@ Program *ParseMacro(char *expr, char **m
626 prog = FinishCreatingProgram(acc);
627 XtFree((char *)acc);
629 - if (!name)
630 - name = "--unknown--";
632 - prog->name = XtMalloc(strlen(name) + strlen(prefix) + 1);
633 - strcat(strcpy(prog->name, prefix), name);
635 /* parse succeeded */
636 *msg = "";
637 *stoppedAt = InPtr;
638 diff --quilt old/source/userCmds.c new/source/userCmds.c
639 --- old/source/userCmds.c
640 +++ new/source/userCmds.c
641 @@ -1286,13 +1286,13 @@ static int doMacroMenuCmd(WindowInfo *wi
642 int DoNamedMacroMenuCmd(WindowInfo *window, const char *itemName)
644 return doMacroMenuCmd(window, itemName, MacroMenuItems, NMacroMenuItems,
645 - "macro-menu>");
646 + "Macro Menu>");
649 int DoNamedBGMenuCmd(WindowInfo *window, const char *itemName)
651 return doMacroMenuCmd(window, itemName, BGMenuItems, NBGMenuItems,
652 - "background-menu>");
653 + "Background Menu>");
657 diff --quilt old/makefiles/Makefile.bertw new/makefiles/Makefile.bertw
658 --- old/makefiles/Makefile.bertw
659 +++ new/makefiles/Makefile.bertw
660 @@ -23,6 +23,9 @@ ifdef DEBUG
661 ifdef DEBUG_MACRO
662 ifndef DEBUG_NO_STACKDUMP
663 CFLAGS += -DDEBUG_STACK
664 + ifdef DEBUG_STACKDUMP_EXTRA
665 + CFLAGS += -DDEBUG_STACKDUMP_EXTRA=$(DEBUG_STACKDUMP_EXTRA)
666 + endif
667 endif
668 ifndef DEBUG_NO_DISASM
669 CFLAGS += -DDEBUG_ASSEMBLY