Files
RedBear-OS/tests/wchar/putwchar.c
T
Tibor Nagy d1a424c002 tests: Replace returns with exits in the main functions
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); \
}
```
2019-02-21 12:15:06 +01:00

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);
}
}
}