mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-05 17:30:27 +00:00
Exported method WideCharToMultiByte to convert Windows wchar_t strings to multibyte
This commit is contained in:
parent
ac3ac44d06
commit
70828ee0ca
3 changed files with 23 additions and 2 deletions
|
@ -1,2 +1,12 @@
|
|||
.include "o/libc/nt/codegen.inc"
|
||||
.imp kernel32,__imp_WideCharToMultiByte,WideCharToMultiByte,0
|
||||
.imp kernel32,__imp_WideCharToMultiByte,WideCharToMultiByte,1553
|
||||
|
||||
.text.windows
|
||||
WideCharToMultiByte:
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
.profilable
|
||||
mov __imp_WideCharToMultiByte(%rip),%rax
|
||||
jmp __sysv2nt8
|
||||
.endfn WideCharToMultiByte,globl
|
||||
.previous
|
||||
|
|
|
@ -7093,7 +7093,7 @@ imp 'WerpNotifyLoadStringResource' WerpNotifyLoadStringResource KernelBase
|
|||
imp 'WerpNotifyLoadStringResourceWorker' WerpNotifyLoadStringResourceWorker kernel32 1540
|
||||
imp 'WerpNotifyUseStringResource' WerpNotifyUseStringResource KernelBase 1809
|
||||
imp 'WerpNotifyUseStringResourceWorker' WerpNotifyUseStringResourceWorker kernel32 1541
|
||||
imp 'WideCharToMultiByte' WideCharToMultiByte kernel32 0 # KernelBase
|
||||
imp 'WideCharToMultiByte' WideCharToMultiByte kernel32 1553 8
|
||||
imp 'WidenPath' WidenPath gdi32 1941
|
||||
imp 'Win32DeleteFile' Win32DeleteFile shell32 164
|
||||
imp 'WinExec' WinExec kernel32 1543
|
||||
|
|
|
@ -91,6 +91,17 @@ bool32 TrackPopupMenu(int64_t hMenu, uint32_t uFlags, int32_t x, int32_t y,
|
|||
int32_t nReserved, int64_t hWnd,
|
||||
const struct NtRect *prcRect);
|
||||
|
||||
int WideCharToMultiByte(unsigned int CodePage,
|
||||
uint32_t dwFlags,
|
||||
uint16_t * lpWideCharStr,
|
||||
int cchWideChar,
|
||||
char * lpMultiByteStr,
|
||||
int cbMultiByte,
|
||||
uint16_t * lpDefaultChar,
|
||||
int * lpUsedDefaultChar
|
||||
);
|
||||
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_WINDOWS_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue