1
0
mirror of https://github.com/UzixLS/KernelEx.git synced 2025-07-19 07:21:20 +03:00

import KernelEx-4.5-Beta1

This commit is contained in:
UzixLS
2018-11-03 16:21:13 +03:00
parent d6aad6c6c5
commit 09929b2b7d
392 changed files with 17832 additions and 2491 deletions

23
apilibs/kexbasen/common.h Normal file → Executable file
View File

@ -25,6 +25,10 @@
#include <windows.h>
#include <malloc.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef int __stdcall STUB(void);
typedef int __stdcall FWDPROC(void);
@ -34,14 +38,17 @@ int WINAPI CommonUnimpStub(void);
char* file_fixWprefix(char* in);
void fatal_error(const char* msg);
#ifdef __cplusplus
};
#endif
#ifdef __GNUC__
#define UNIMPL_FUNC(name,params) \
__asm__( ".text\n" \
".globl _" #name "_stub@0\n" \
"_" #name "_new@0:\n\t" \
"xor %eax, %eax\n\t" \
"movb $" #params ", %cl\n\t" \
#define UNIMPL_FUNC(name,params) \
__asm__( ".text\n" \
".globl _" #name "_stub@0\n" \
"_" #name "_stub@0:\n\t" \
"xor %eax, %eax\n\t" \
"movb $" #params ", %cl\n\t" \
"jmp _CommonUnimpStub@0\n\t" \
)
#else
@ -61,7 +68,7 @@ void fatal_error(const char* msg);
const WCHAR* p; \
int c; \
for (p = str##W ; *p ; p++); \
c = (int) p - (int) str##W; \
c = p - str##W + 1; \
c *= acp_mcs; \
str##A = (char*) alloca(c); \
WtoA(str, c)
@ -94,7 +101,7 @@ void fatal_error(const char* msg);
const WCHAR* p; \
int c; \
for (p = str##W ; *p ; p++); \
c = (int) p - (int) str##W; \
c = p - str##W + 1; \
c *= acp_mcs; \
str##A = (char*) alloca(c); \
file_WtoA(str, c); \