mirror of
https://gitlab.com/80486DX2-66/gists
synced 2025-01-10 17:32:05 +05:30
C: clock-malfunction-imitation.c: reformat macros
This commit is contained in:
parent
130179ab6b
commit
f345d55d3a
@ -16,19 +16,19 @@
|
|||||||
#define SECOND_PRECISION 1L
|
#define SECOND_PRECISION 1L
|
||||||
#define TIME_BEFORE_ACCIDENT 2UL
|
#define TIME_BEFORE_ACCIDENT 2UL
|
||||||
|
|
||||||
#define TEST_LABEL(s) { \
|
#define TEST_LABEL(s) do { \
|
||||||
printf("Test: %s\n", s); \
|
printf("Test: %s\n", s); \
|
||||||
fflush(stdout); \
|
fflush(stdout); \
|
||||||
}
|
} while (0)
|
||||||
|
|
||||||
#define CLOCK_FUN_BEGIN \
|
#define CLOCK_FUN_BEGIN \
|
||||||
static unsigned ticks_before_accident = TIME_BEFORE_ACCIDENT; \
|
static unsigned ticks_before_accident = TIME_BEFORE_ACCIDENT; \
|
||||||
time_t y;
|
time_t y;
|
||||||
|
|
||||||
#define CLOCK_FUN_END \
|
#define CLOCK_FUN_END \
|
||||||
if (x != NULL) { \
|
if (x != NULL) \
|
||||||
*x = y; \
|
*x = y; \
|
||||||
} \
|
\
|
||||||
return y;
|
return y;
|
||||||
|
|
||||||
time_t clock_change_time(time_t* x);
|
time_t clock_change_time(time_t* x);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user