diff options
| author | Richard Brooksby | 2012-08-31 20:17:16 +0100 |
|---|---|---|
| committer | Richard Brooksby | 2012-08-31 20:17:16 +0100 |
| commit | 880d79ba0e4e38e700a500560557d843095f6b04 (patch) | |
| tree | 279c9902d2a1fe45eab8a4bcb5f1050e6bb88c9a /mps/code | |
| parent | 03b25f13a52d6a9dc7b1e6532952c99e31c5d030 (diff) | |
| download | emacs-880d79ba0e4e38e700a500560557d843095f6b04.tar.gz emacs-880d79ba0e4e38e700a500560557d843095f6b04.zip | |
Missing changes from changelist 179142. oops.
Copied from Perforce
Change: 179144
ServerID: perforce.ravenbrook.com
Diffstat (limited to 'mps/code')
| -rw-r--r-- | mps/code/eventcnv.c | 19 | ||||
| -rw-r--r-- | mps/code/eventpro.h | 2 |
2 files changed, 11 insertions, 10 deletions
diff --git a/mps/code/eventcnv.c b/mps/code/eventcnv.c index ffdad909ad6..7a0b226b520 100644 --- a/mps/code/eventcnv.c +++ b/mps/code/eventcnv.c | |||
| @@ -209,14 +209,13 @@ static void processEvent(EventProc proc, Event event, Word etime) | |||
| 209 | 209 | ||
| 210 | /* printStr -- print an EventString */ | 210 | /* printStr -- print an EventString */ |
| 211 | 211 | ||
| 212 | static void printStr(EventString str, Bool quotes) | 212 | static void printStr(const char *str, Bool quotes) |
| 213 | { | 213 | { |
| 214 | size_t i, len; | 214 | size_t i; |
| 215 | 215 | ||
| 216 | if (quotes) putchar('"'); | 216 | if (quotes) putchar('"'); |
| 217 | len = str->len; | 217 | for (i = 0; str[i] != '\0'; ++i) { |
| 218 | for (i = 0; i < len; ++ i) { | 218 | char c = str[i]; |
| 219 | char c = str->str[i]; | ||
| 220 | if (quotes && (c == '"' || c == '\\')) putchar('\\'); | 219 | if (quotes && (c == '"' || c == '\\')) putchar('\\'); |
| 221 | putchar(c); | 220 | putchar(c); |
| 222 | } | 221 | } |
| @@ -233,7 +232,7 @@ static void printAddr(EventProc proc, Addr addr) | |||
| 233 | label = AddrLabel(proc, addr); | 232 | label = AddrLabel(proc, addr); |
| 234 | if (label != 0 && addr != 0) { | 233 | if (label != 0 && addr != 0) { |
| 235 | /* We assume labelling zero is meant to record a point in time */ | 234 | /* We assume labelling zero is meant to record a point in time */ |
| 236 | EventString sym = LabelText(proc, label); | 235 | const char *sym = LabelText(proc, label); |
| 237 | if (sym != NULL) { | 236 | if (sym != NULL) { |
| 238 | putchar(' '); | 237 | putchar(' '); |
| 239 | printStr(sym, (style == 'C')); | 238 | printStr(sym, (style == 'C')); |
| @@ -358,6 +357,7 @@ static void printParamW(EventProc proc, char *styleConv, Word w) | |||
| 358 | static void printParamD(EventProc proc, char *styleConv, double d) | 357 | static void printParamD(EventProc proc, char *styleConv, double d) |
| 359 | { | 358 | { |
| 360 | UNUSED(proc); | 359 | UNUSED(proc); |
| 360 | UNUSED(styleConv); | ||
| 361 | switch (style) { | 361 | switch (style) { |
| 362 | case '\0': | 362 | case '\0': |
| 363 | printf(" %#8.3g", d); break; | 363 | printf(" %#8.3g", d); break; |
| @@ -368,12 +368,13 @@ static void printParamD(EventProc proc, char *styleConv, double d) | |||
| 368 | } | 368 | } |
| 369 | } | 369 | } |
| 370 | 370 | ||
| 371 | static void printParamS(EventProc proc, char *styleConv, EventStringStruct s) | 371 | static void printParamS(EventProc proc, char *styleConv, const char *s) |
| 372 | { | 372 | { |
| 373 | UNUSED(proc); | 373 | UNUSED(proc); |
| 374 | UNUSED(styleConv); | ||
| 374 | if (style == 'C') putchar(','); | 375 | if (style == 'C') putchar(','); |
| 375 | putchar(' '); | 376 | putchar(' '); |
| 376 | printStr(&s, (style == 'C' || style == 'L')); | 377 | printStr(s, (style == 'C' || style == 'L')); |
| 377 | } | 378 | } |
| 378 | 379 | ||
| 379 | static void printParamB(EventProc proc, char *styleConv, Bool b) | 380 | static void printParamB(EventProc proc, char *styleConv, Bool b) |
| @@ -479,7 +480,7 @@ static void readLog(EventProc proc) | |||
| 479 | switch (style) { | 480 | switch (style) { |
| 480 | case '\0': case 'C': | 481 | case '\0': case 'C': |
| 481 | { | 482 | { |
| 482 | EventString sym = LabelText(proc, event->Label.f1); | 483 | const char *sym = LabelText(proc, event->Label.f1); |
| 483 | printf(style == '\0' ? | 484 | printf(style == '\0' ? |
| 484 | " %08"PRIXLONGEST" " : | 485 | " %08"PRIXLONGEST" " : |
| 485 | ", %"PRIuLONGEST", ", | 486 | ", %"PRIuLONGEST", ", |
diff --git a/mps/code/eventpro.h b/mps/code/eventpro.h index bd6cbebfc76..d9074d8638f 100644 --- a/mps/code/eventpro.h +++ b/mps/code/eventpro.h | |||
| @@ -25,7 +25,7 @@ extern char *EventCode2Format(EventCode code); | |||
| 25 | extern Bool EventCodeIsValid(EventCode code); | 25 | extern Bool EventCodeIsValid(EventCode code); |
| 26 | 26 | ||
| 27 | extern Word AddrLabel(EventProc proc, Addr addr); | 27 | extern Word AddrLabel(EventProc proc, Addr addr); |
| 28 | extern EventString LabelText(EventProc proc, Word label); | 28 | extern char *LabelText(EventProc proc, Word label); |
| 29 | 29 | ||
| 30 | extern Res EventRead(Event *eventReturn, EventProc proc); | 30 | extern Res EventRead(Event *eventReturn, EventProc proc); |
| 31 | extern void EventDestroy(EventProc proc, Event event); | 31 | extern void EventDestroy(EventProc proc, Event event); |