blob: cda93281383cb581f7e55eec9877c7db02774632 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#ifndef _UNICODE
#define _UNICODE
#endif
#ifndef UNICODE
#define UNICODE
#endif
#include <al/types.h>
#include <al/str.h>
#include <al/wstr.h>
#include <nnwt/common.h>
#ifdef NAUNET_ON_WINDOWS
s32 wmain(s32 argc, wchar_t **argv)
#else
s32 main(s32 argc, char *argv[])
#endif
{
if (!nn_common_init(NULL)) {
return EXIT_FAILURE;
}
for (s32 i = 0; i < argc; i++) {
#ifdef NAUNET_ON_WINDOWS
al_printf("%d: %ls %zu\n", i, argv[i], al_wcsnlen(argv[i], MAX_ALLOC_32 / sizeof(wchar_t)));
#else
al_printf("%d: %.*s %zu\n", i, al_str_x(&al_str_cr(argv[i])), al_strlen(argv[i]));
#endif
}
return EXIT_SUCCESS;
}
|