-
-
Notifications
You must be signed in to change notification settings - Fork 664
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
195 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#include "libc/nt/codegen.h" | ||
.imp advapi32,__imp_RegOpenKeyExA,RegOpenKeyExA | ||
|
||
.text.windows | ||
.ftrace1 | ||
RegOpenKeyExA: | ||
.ftrace2 | ||
#ifdef __x86_64__ | ||
push %rbp | ||
mov %rsp,%rbp | ||
mov __imp_RegOpenKeyExA(%rip),%rax | ||
jmp __sysv2nt6 | ||
#elif defined(__aarch64__) | ||
mov x0,#0 | ||
ret | ||
#endif | ||
.endfn RegOpenKeyExA,globl | ||
.previous |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include "libc/nt/codegen.h" | ||
.imp kernel32,__imp_GetACP,GetACP | ||
|
||
.text.windows | ||
.ftrace1 | ||
GetACP: | ||
.ftrace2 | ||
#ifdef __x86_64__ | ||
push %rbp | ||
mov %rsp,%rbp | ||
sub $32,%rsp | ||
call *__imp_GetACP(%rip) | ||
leave | ||
#elif defined(__aarch64__) | ||
mov x0,#0 | ||
#endif | ||
ret | ||
.endfn GetACP,globl | ||
.previous |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#include "libc/nt/codegen.h" | ||
.imp kernel32,__imp_GetCPInfoExW,GetCPInfoExW | ||
|
||
.text.windows | ||
.ftrace1 | ||
GetCPInfoEx: | ||
.ftrace2 | ||
#ifdef __x86_64__ | ||
push %rbp | ||
mov %rsp,%rbp | ||
mov __imp_GetCPInfoExW(%rip),%rax | ||
jmp __sysv2nt | ||
#elif defined(__aarch64__) | ||
mov x0,#0 | ||
ret | ||
#endif | ||
.endfn GetCPInfoEx,globl | ||
.previous |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#include "libc/nt/codegen.h" | ||
.imp kernel32,__imp_GetLogicalDriveStringsA,GetLogicalDriveStringsA | ||
|
||
.text.windows | ||
.ftrace1 | ||
GetLogicalDriveStringsA: | ||
.ftrace2 | ||
#ifdef __x86_64__ | ||
push %rbp | ||
mov %rsp,%rbp | ||
mov __imp_GetLogicalDriveStringsA(%rip),%rax | ||
jmp __sysv2nt | ||
#elif defined(__aarch64__) | ||
mov x0,#0 | ||
ret | ||
#endif | ||
.endfn GetLogicalDriveStringsA,globl | ||
.previous |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include "libc/nt/codegen.h" | ||
.imp kernel32,__imp_GetOEMCP,GetOEMCP | ||
|
||
.text.windows | ||
.ftrace1 | ||
GetOEMCP: | ||
.ftrace2 | ||
#ifdef __x86_64__ | ||
push %rbp | ||
mov %rsp,%rbp | ||
sub $32,%rsp | ||
call *__imp_GetOEMCP(%rip) | ||
leave | ||
#elif defined(__aarch64__) | ||
mov x0,#0 | ||
#endif | ||
ret | ||
.endfn GetOEMCP,globl | ||
.previous |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#include "libc/nt/codegen.h" | ||
.imp kernel32,__imp_GetShortPathNameW,GetShortPathNameW | ||
|
||
.text.windows | ||
.ftrace1 | ||
GetShortPathName: | ||
.ftrace2 | ||
#ifdef __x86_64__ | ||
push %rbp | ||
mov %rsp,%rbp | ||
mov __imp_GetShortPathNameW(%rip),%rax | ||
jmp __sysv2nt | ||
#elif defined(__aarch64__) | ||
mov x0,#0 | ||
ret | ||
#endif | ||
.endfn GetShortPathName,globl | ||
.previous |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#ifndef COSMOPOLITAN_LIBC_NT_NLS_H_ | ||
#define COSMOPOLITAN_LIBC_NT_NLS_H_ | ||
#include "libc/nt/struct/cpinfoex.h" | ||
/* ░░░░ | ||
▒▒▒░░░▒▒▒▒▒▒▒▓▓▓░ | ||
▒▒▒▒░░░▒▒▒▒▒▒▓▓▓▓▓▓░ | ||
▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓ ▒▓░ | ||
▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓ ▓▓▓▓▓▓▒ ▒▒▒▓▓█ | ||
▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓ | ||
░▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓ █▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█ | ||
▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓░ ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓ | ||
▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓ ▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▒ | ||
▒▒▒▒▓▓ ▓▒▒▓▓▓▓ ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█ | ||
▒▓ ▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓ | ||
░░░░░░░░░░░▒▒▒▒ ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█ | ||
▒▒░░░░░░░░░░▒▒▒▒▒▓▓▓ ▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓ | ||
░▒░░░░░░░░░░░▒▒▒▒▒▓▓ ▓░ ░▓███▓ | ||
▒▒░░░░░░░░░░▒▒▒▒▒▓▓░ ▒▓▓▓▒▒▒ ░▒▒▒▓ ████████████ | ||
▒▒░░░░░░░░░░░▒▒▒▒▒▓▓ ▒▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒░ ░███ | ||
▒░░░░░░░░░░░▒▒▒▒▒▓▓ ▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓ ███ | ||
▒▒░░░░░░░░░░▒▒▒▒▒▒▓▓ ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒ ▓██ | ||
▒░░░░░░░░░░░▒▒▒▒▒▓▓ ▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒▓ ▓██ | ||
▒▒░░░▒▒▒░░░▒▒░▒▒▒▓▓▒ ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒ ███ | ||
░▒▓ ░▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓ ▓██ | ||
╔────────────────────────────────────────────────────────────────▀▀▀─────────│─╗ | ||
│ cosmopolitan § new technology » internationalization ─╬─│┼ | ||
╚────────────────────────────────────────────────────────────────────────────│*/ | ||
COSMOPOLITAN_C_START_ | ||
|
||
uint32_t GetOEMCP(); | ||
uint32_t GetACP(); | ||
bool32 GetCPInfoEx(uint32_t CodePage, uint32_t dwFlags, struct NtCpInfoEx *out_lpCPInfoEx) paramsnonnull((3)); | ||
|
||
COSMOPOLITAN_C_END_ | ||
#endif /* COSMOPOLITAN_LIBC_NT_NLS_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_CPINFOEX_H_ | ||
#define COSMOPOLITAN_LIBC_NT_STRUCT_CPINFOEX_H_ | ||
|
||
struct NtCpInfoEx { | ||
uint32_t MaxCharSize; | ||
uint8_t DefaultChar[2]; | ||
uint8_t LeadByte[12]; | ||
char16_t UnicodeDefaultChar; | ||
uint32_t CodePage; | ||
char16_t CodePageName[260]; | ||
}; | ||
|
||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_CPINFOEX_H_ */ |