Wrapped __isoc99_swscanf libc function

This commit is contained in:
ptitSeb 2023-03-23 10:36:39 +01:00
parent e85bcb671a
commit 3eb16fb7bd
4 changed files with 12 additions and 2 deletions

View File

@ -3037,6 +3037,7 @@ wrappedlibc:
- iFppV:
- __isoc99_fscanf
- __isoc99_sscanf
- __isoc99_swscanf
- fscanf
- sscanf
- swscanf

View File

@ -146,6 +146,7 @@ typedef int32_t (*iFpLiLppp_t)(void*, uintptr_t, int32_t, uintptr_t, void*, void
GO(_IO_vfscanf, iFppp_t) \
GO(__isoc99_fscanf, iFppV_t) \
GO(__isoc99_sscanf, iFppV_t) \
GO(__isoc99_swscanf, iFppV_t) \
GO(fscanf, iFppV_t) \
GO(sscanf, iFppV_t) \
GO(swscanf, iFppV_t) \

View File

@ -986,6 +986,14 @@ EXPORT int my___isoc99_sscanf(x86emu_t* emu, void* stream, void* fmt, void* b)
return ((iFppp_t)f)(stream, fmt, VARARGS);
}
EXPORT int my___isoc99_swscanf(x86emu_t* emu, void* stream, void* fmt, void* b)
{
(void)b;
void* f = swscanf;
PREPARE_VALIST;
return ((iFppp_t)f)(stream, fmt, VARARGS);
}
#endif
EXPORT int my_vsnprintf(x86emu_t* emu, void* buff, uint32_t s, void * fmt, void * b, va_list V) {

View File

@ -902,7 +902,7 @@ GOM(__isoc99_fscanf, iFEppV) //%%
// __isoc99_fwscanf
// __isoc99_scanf
GOM(__isoc99_sscanf, iFEppV) //%%
// __isoc99_swscanf
GOM(__isoc99_swscanf, iFEppV) //%%
GOM(__isoc99_vfscanf, iFEppp) //%%
// __isoc99_vfwscanf
// __isoc99_vscanf
@ -915,7 +915,7 @@ GO2(__isoc99_fscanf, iFppV, __isoc99_vfscanf)
// __isoc99_fwscanf
// __isoc99_scanf
GO2(__isoc99_sscanf, iFppV, __isoc99_vsscanf)
// __isoc99_swscanf
GO2(__isoc99_swscanf, iFppV, __isoc99_vswscanf)
GO(__isoc99_vfscanf, iFppp)
// __isoc99_vfwscanf
// __isoc99_vscanf