From de15d43b1c3c125e7585b59d55e13b134a897f65 Mon Sep 17 00:00:00 2001 From: notaz Date: Fri, 7 Feb 2014 02:35:33 +0200 Subject: [PATCH] add more msvcrt funcs --- stdc.hlist | 2 ++ stdc.list | 18 ++++++++++++++++++ tools/asmproc.c | 12 +++++++++++- 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/stdc.hlist b/stdc.hlist index 68e111b..2918656 100644 --- a/stdc.hlist +++ b/stdc.hlist @@ -185,6 +185,8 @@ int __cdecl _mbsnicmp (const unsigned char*, const unsigned char*, size_t); int __cdecl _mbsnbcmp (const unsigned char*, const unsigned char*, size_t); int __cdecl _mbsnbicmp (const unsigned char*, const unsigned char*, size_t); +void * __cdecl _onexit (int (__cdecl *)(void)); + void * __cdecl signal (int, void *); int __cdecl raise (int); diff --git a/stdc.list b/stdc.list index 840b592..a09cb23 100644 --- a/stdc.list +++ b/stdc.list @@ -65,6 +65,24 @@ __onexit _atexit __stricmp __strnicmp + +__strupr +_sprintf +_vsprintf +__strlwr +__fullpath +_toupper +_wcslen +_wcstombs +_setlocale +__setmbcp +__lseek +__write +__isatty +_xtoa +__itoa +__close + # not from mingw _memcpy_0 # math diff --git a/tools/asmproc.c b/tools/asmproc.c index 678f58f..fe6fa47 100644 --- a/tools/asmproc.c +++ b/tools/asmproc.c @@ -193,7 +193,7 @@ int main(int argc, char *argv[]) } } - if (IS_OR3(word, "call", "jmp", "public")) { + if (IS_OR2(word, "call", "jmp")) { ssym.name = word2; sym = bsearch(&ssym, symlist, symlist_cnt, sizeof(symlist[0]), cmp_sym); @@ -206,6 +206,16 @@ int main(int argc, char *argv[]) } } + if (IS(word, "public")) { + ssym.name = word2; + sym = bsearch(&ssym, symlist, symlist_cnt, + sizeof(symlist[0]), cmp_sym); + if (sym != NULL) { + fprintf(fout, "\t\tpublic %s%s", sym_use(sym), p); + continue; + } + } + p = sskip(p); if (*p == 0 || *p == ';') goto pass; // need at least 3 words -- 2.39.2