moved non-win32 CharNextExA implementation to util.cpp

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5208 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2007-07-18 19:18:00 +00:00
parent 9d1ab6f1ae
commit 3e9377d5b2
3 changed files with 19 additions and 16 deletions

View file

@ -413,6 +413,23 @@ char *CharNext(const char *s) {
return (char *) s + l;
}
char *CharNextExA(WORD codepage, const char *s, int flags) {
char buf[1024];
snprintf(buf, 1024, "CP%d", codepage);
setlocale(LC_CTYPE, buf);
const char* np;
int len = mblen(s, strlen(s));
if (len > 0)
np = s + len;
else
np = s + 1;
setlocale(LC_CTYPE, "");
return (char *) np;
}
int wsprintf(char *s, const char *format, ...) {
va_list val;
va_start(val, format);