/*
* ia32rtools
- * (C) notaz, 2013,2014
+ * (C) notaz, 2013-2015
*
* This work is licensed under the terms of 3-clause BSD license.
* See COPYING file in the top-level directory.
}
static const struct parsed_proto *check_var(FILE *fhdr,
- const char *sym, const char *varname)
+ const char *sym, const char *varname, int is_export)
{
const struct parsed_proto *pp, *pp_sym;
char fp_sym[256], fp_var[256], *p;
return NULL;
}
+ if (is_export)
+ return NULL;
if (!pp->is_func && !pp->is_fptr)
return NULL;
FILE *fout, *fasm, *fhdr = NULL, *frlist;
const struct parsed_proto *pp;
int no_decorations = 0;
+ int in_export_table = 0;
char comment_char = '#';
char words[20][256];
char word[256];
while (my_fgets(line, sizeof(line), frlist)) {
p = sskip(line);
- if (*p == 0 || *p == ';')
+ if (*p == 0 || *p == ';' || *p == '#')
continue;
p = next_word(words[0], sizeof(words[0]), p);
if (i != 0 && !header_mode)
fprintf(fout, "\t\t .skip 0x%x\n", i);
}
+ else if (IS_START(p, "; Export Address"))
+ in_export_table = 1;
+ else if (IS_START(p, "; Export"))
+ in_export_table = 0;
continue;
}
snprintf(g_comment, sizeof(g_comment), "%s", p);
}
else {
- pp = check_var(fhdr, sym, p);
+ pp = check_var(fhdr, sym, p, in_export_table);
if (pp == NULL) {
fprintf(fout, "%s%s",
(no_decorations || p[0] == '_') ? "" : "_", p);
WINBASEAPI BOOL WINAPI MapUserPhysicalPagesScatter(PVOID*,ULONG_PTR,PULONG_PTR);
WINBASEAPI void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION);
+WINBASEAPI int WINAPI CompareStringA(LCID,DWORD,LPCSTR,int,LPCSTR,int);
+WINBASEAPI int WINAPI CompareStringW(LCID,DWORD,LPCWSTR,int,LPCWSTR,int);
+WINBASEAPI UINT WINAPI GetACP(void);
+WINBASEAPI int WINAPI GetCalendarInfoA(LCID,CALID,CALTYPE,LPSTR,int,LPDWORD);
+WINBASEAPI int WINAPI GetCalendarInfoW(LCID,CALID,CALTYPE,LPWSTR,int,LPDWORD);
+WINBASEAPI BOOL WINAPI GetCPInfo(UINT,LPCPINFO);
WINBASEAPI BOOL WINAPI GetCPInfoExA(UINT,DWORD,LPCPINFOEXA);
WINBASEAPI BOOL WINAPI GetCPInfoExW(UINT,DWORD,LPCPINFOEXW);
-WINBASEAPI BOOL WINAPI GetCPInfo(UINT,LPCPINFO);
+WINBASEAPI int WINAPI GetCurrencyFormatA(LCID,DWORD,LPCSTR,const CURRENCYFMTA*,LPSTR,int);
+WINBASEAPI int WINAPI GetCurrencyFormatW(LCID,DWORD,LPCWSTR,const CURRENCYFMTW*,LPWSTR,int);
+WINBASEAPI int WINAPI GetDateFormatA(LCID,DWORD,const SYSTEMTIME*,LPCSTR,LPSTR,int);
+WINBASEAPI int WINAPI GetDateFormatW(LCID,DWORD,const SYSTEMTIME*,LPCWSTR,LPWSTR,int);
+WINBASEAPI int WINAPI GetGeoInfoA(GEOID,GEOTYPE,LPSTR,int,LANGID);
+WINBASEAPI int WINAPI GetGeoInfoW(GEOID,GEOTYPE,LPWSTR,int,LANGID);
+WINBASEAPI int WINAPI GetLocaleInfoA(LCID,LCTYPE,LPSTR,int);
+WINBASEAPI int WINAPI GetLocaleInfoW(LCID,LCTYPE,LPWSTR,int);
+WINBASEAPI BOOL WINAPI GetNLSVersion(NLS_FUNCTION,LCID,LPNLSVERSIONINFO);
+WINBASEAPI int WINAPI GetNumberFormatA(LCID,DWORD,LPCSTR,const NUMBERFMTA*,LPSTR,int);
+WINBASEAPI int WINAPI GetNumberFormatW(LCID,DWORD,LPCWSTR,const NUMBERFMTW*,LPWSTR,int);
+WINBASEAPI UINT WINAPI GetOEMCP(void);
WINBASEAPI BOOL WINAPI GetStringTypeA(LCID,DWORD,LPCSTR,int,LPWORD);
WINBASEAPI BOOL WINAPI GetStringTypeW(DWORD,LPCWSTR,int,LPWORD);
+WINBASEAPI BOOL WINAPI GetStringTypeExA(LCID,DWORD,LPCSTR,int,LPWORD);
+WINBASEAPI BOOL WINAPI GetStringTypeExW(LCID,DWORD,LPCWSTR,int,LPWORD);
+WINBASEAPI LANGID WINAPI GetSystemDefaultLangID(void);
+WINBASEAPI LCID WINAPI GetSystemDefaultLCID(void);
+WINBASEAPI LCID WINAPI GetThreadLocale(void);
+
+WINBASEAPI int WINAPI GetTimeFormatA(LCID,DWORD,const SYSTEMTIME*,LPCSTR,LPSTR,int);
+WINBASEAPI int WINAPI GetTimeFormatW(LCID,DWORD,const SYSTEMTIME*,LPCWSTR,LPWSTR,int);
+WINBASEAPI LANGID WINAPI GetUserDefaultLangID(void);
+WINBASEAPI LCID WINAPI GetUserDefaultLCID(void);
+WINBASEAPI GEOID WINAPI GetUserGeoID(GEOCLASS);
WINBASEAPI BOOL WINAPI IsDBCSLeadByte(BYTE);
WINBASEAPI BOOL WINAPI IsDBCSLeadByteEx(UINT,BYTE);
-WINBASEAPI int WINAPI CompareStringA(LCID,DWORD,LPCSTR,int,LPCSTR,int);
-WINBASEAPI int WINAPI CompareStringW(LCID,DWORD,LPCWSTR,int,LPCWSTR,int);
-WINBASEAPI int WINAPI GetDateFormatA(LCID,DWORD,const SYSTEMTIME*,LPCSTR,LPSTR,int);
-WINBASEAPI int WINAPI GetLocaleInfoA(LCID,LCTYPE,LPSTR,int);
-WINBASEAPI int WINAPI GetTimeFormatA(LCID,DWORD,const SYSTEMTIME*,LPCSTR,LPSTR,int);
+WINBASEAPI BOOL WINAPI IsNLSDefinedString(NLS_FUNCTION,DWORD,LPNLSVERSIONINFO,LPCWSTR,int);
+WINBASEAPI BOOL WINAPI IsValidCodePage(UINT);
+WINBASEAPI BOOL WINAPI IsValidLocale(LCID,DWORD);
WINBASEAPI int WINAPI LCMapStringA(LCID,DWORD,LPCSTR,int,LPSTR,int);
WINBASEAPI int WINAPI LCMapStringW(LCID,DWORD,LPCWSTR,int,LPWSTR,int);
WINBASEAPI int WINAPI MultiByteToWideChar(UINT,DWORD,LPCSTR,int,LPWSTR,int);
WINBASEAPI int WINAPI WideCharToMultiByte(UINT,DWORD,LPCWSTR,int,LPSTR,int,LPCSTR,LPBOOL);
-WINBASEAPI LANGID WINAPI GetUserDefaultLangID(void);
-WINBASEAPI UINT WINAPI GetACP(void);
-WINBASEAPI UINT WINAPI GetOEMCP(void);
WINADVAPI LONG WINAPI RegDeleteValueA(HKEY,LPCSTR);
WINADVAPI LONG WINAPI RegOpenKeyExA(HKEY,LPCSTR,DWORD,REGSAM,PHKEY);