diff options
| author | Richard Brooksby | 2012-08-31 20:50:47 +0100 |
|---|---|---|
| committer | Richard Brooksby | 2012-08-31 20:50:47 +0100 |
| commit | 51efd85c4d2bb536e2828b5bb678b7a5d7665cca (patch) | |
| tree | 0fc6e1d0f4e8d911d94d556fd504f787609e3e15 /mps/code | |
| parent | 125a2f60a4896f0085ed464881adf02b931ec79f (diff) | |
| download | emacs-51efd85c4d2bb536e2828b5bb678b7a5d7665cca.tar.gz emacs-51efd85c4d2bb536e2828b5bb678b7a5d7665cca.zip | |
Fixing event clock width assumptions found by microsoft c.
Copied from Perforce
Change: 179146
ServerID: perforce.ravenbrook.com
Diffstat (limited to 'mps/code')
| -rw-r--r-- | mps/code/eventcnv.c | 12 | ||||
| -rw-r--r-- | mps/code/eventpro.c | 4 | ||||
| -rw-r--r-- | mps/code/eventpro.h | 2 |
3 files changed, 10 insertions, 8 deletions
diff --git a/mps/code/eventcnv.c b/mps/code/eventcnv.c index 7a0b226b520..bd8be9701a4 100644 --- a/mps/code/eventcnv.c +++ b/mps/code/eventcnv.c | |||
| @@ -190,7 +190,7 @@ static char *parseArgs(int argc, char *argv[]) | |||
| 190 | 190 | ||
| 191 | /* processEvent -- process event */ | 191 | /* processEvent -- process event */ |
| 192 | 192 | ||
| 193 | static void processEvent(EventProc proc, Event event, Word etime) | 193 | static void processEvent(EventProc proc, Event event, EventClock etime) |
| 194 | { | 194 | { |
| 195 | Res res; | 195 | Res res; |
| 196 | 196 | ||
| @@ -288,17 +288,19 @@ static void reportEventResults(eventCountArray eventCounts) | |||
| 288 | 288 | ||
| 289 | /* reportBucketResults -- report results of the current bucket */ | 289 | /* reportBucketResults -- report results of the current bucket */ |
| 290 | 290 | ||
| 291 | static void reportBucketResults(Word bucketLimit) | 291 | static void reportBucketResults(EventClock bucketLimit) |
| 292 | { | 292 | { |
| 293 | switch (style) { | 293 | switch (style) { |
| 294 | case '\0': | 294 | case '\0': |
| 295 | printf("%8"PRIuLONGEST":", (ulongest_t)bucketLimit); | 295 | EVENT_CLOCK_PRINT(stdout, bucketLimit); |
| 296 | putchar(':'); | ||
| 296 | break; | 297 | break; |
| 297 | case 'L': | 298 | case 'L': |
| 298 | printf("(%"PRIXLONGEST, (ulongest_t)bucketLimit); | 299 | putchar('('); |
| 300 | EVENT_CLOCK_PRINT(stdout, bucketLimit); | ||
| 299 | break; | 301 | break; |
| 300 | case 'C': | 302 | case 'C': |
| 301 | printf("%"PRIuLONGEST, (ulongest_t)bucketLimit); | 303 | EVENT_CLOCK_PRINT(stdout, bucketLimit); |
| 302 | break; | 304 | break; |
| 303 | } | 305 | } |
| 304 | if (reportEvents) { | 306 | if (reportEvents) { |
diff --git a/mps/code/eventpro.c b/mps/code/eventpro.c index 95f245dc588..21523825854 100644 --- a/mps/code/eventpro.c +++ b/mps/code/eventpro.c | |||
| @@ -193,7 +193,7 @@ typedef struct symbolStruct *Symbol; | |||
| 193 | 193 | ||
| 194 | typedef struct labelStruct { | 194 | typedef struct labelStruct { |
| 195 | Word id; | 195 | Word id; |
| 196 | Word time; | 196 | EventClock time; |
| 197 | Addr addr; | 197 | Addr addr; |
| 198 | } labelStruct; | 198 | } labelStruct; |
| 199 | typedef struct labelStruct *Label; | 199 | typedef struct labelStruct *Label; |
| @@ -277,7 +277,7 @@ Res EventRead(Event *eventReturn, EventProc proc) | |||
| 277 | * stuff in the future. | 277 | * stuff in the future. |
| 278 | */ | 278 | */ |
| 279 | 279 | ||
| 280 | Res EventRecord(EventProc proc, Event event, Word etime) | 280 | Res EventRecord(EventProc proc, Event event, EventClock etime) |
| 281 | { | 281 | { |
| 282 | Res res; | 282 | Res res; |
| 283 | 283 | ||
diff --git a/mps/code/eventpro.h b/mps/code/eventpro.h index d9074d8638f..375eaec19c2 100644 --- a/mps/code/eventpro.h +++ b/mps/code/eventpro.h | |||
| @@ -30,7 +30,7 @@ extern char *LabelText(EventProc proc, Word label); | |||
| 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); |
| 32 | 32 | ||
| 33 | extern Res EventRecord(EventProc proc, Event event, Word etime); | 33 | extern Res EventRecord(EventProc proc, Event event, EventClock etime); |
| 34 | 34 | ||
| 35 | extern Res EventProcCreate(EventProc *procReturn, Bool partial, | 35 | extern Res EventProcCreate(EventProc *procReturn, Bool partial, |
| 36 | EventProcReader reader, void *readerP); | 36 | EventProcReader reader, void *readerP); |