d1a424c002
This will allow us to redefine the exit function.
For example:
```
#define exit(code) { \
fprintf(stderr, "%s:%d: exit(%s) in function ‘%s’\n",
__FILE__, __LINE__, #code, __func__); \
_exit(code); \
}
```
19 lines
357 B
C
19 lines
357 B
C
#include <string.h>
|
|
#include <stdio.h>
|
|
#include <wchar.h>
|
|
#include <stdlib.h>
|
|
|
|
int main(void) {
|
|
wchar_t *wcs = L"zß水🍌";
|
|
|
|
int i;
|
|
for (i = 0; wcs[i] != L'\0'; i++)
|
|
{
|
|
if (0xFFFFFFFFu == putwchar(wcs[i]))
|
|
{
|
|
printf("Unable to putwchar() the wide character.\n");
|
|
exit(EXIT_FAILURE);
|
|
}
|
|
}
|
|
}
|