add more msvcrt funcs
authornotaz <notasas@gmail.com>
Fri, 7 Feb 2014 00:35:33 +0000 (02:35 +0200)
committernotaz <notasas@gmail.com>
Fri, 7 Feb 2014 00:35:33 +0000 (02:35 +0200)
stdc.hlist
stdc.list
tools/asmproc.c

index 68e111b..2918656 100644 (file)
@@ -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);
 
index 840b592..a09cb23 100644 (file)
--- 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
index 678f58f..fe6fa47 100644 (file)
@@ -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