/*
- Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
return len;
}
int
-SDL_main(int argc, char *argv[])
+main(int argc, char *argv[])
{
const char *formats[] = {
"UTF8",
SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
if (!argv[1]) {
- argv[1] = "res/utf8.txt";
+ argv[1] = "./res/utf8.txt";
}
file = fopen(argv[1], "rb");
if (!file) {
- SDLTest_LogError(SDL_LOG_CATEGORY_APPLICATION, "Unable to open %s\n", argv[1]);
+ SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Unable to open %s\n", argv[1]);
return (1);
}
test[0] = SDL_iconv_string(formats[i], "UCS-4", ucs4, len);
test[1] = SDL_iconv_string("UCS-4", formats[i], test[0], len);
if (!test[1] || SDL_memcmp(test[1], ucs4, len) != 0) {
- SDLTest_LogError(SDL_LOG_CATEGORY_APPLICATION, "FAIL: %s\n", formats[i]);
+ SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "FAIL: %s\n", formats[i]);
++errors;
}
SDL_free(test[0]);