Rev 7873 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
7873 | rgimad | 1 | // ------------------------------------------------------------- |
2 | // KWINE is a fork of program PELoad written by 0CodErr |
||
3 | // author of fork - rgimad |
||
4 | //------------------------------------------------------------- |
||
5 | #include "stddef.h" |
||
6 | #include |
||
7 | #include "msvcrt.dll.h" |
||
8 | |||
9 | #include "string.c" |
||
10 | //#include "dlfcn.c" |
||
11 | #include "conio.c" |
||
12 | #include "stdio.c" |
||
13 | #include "stdlib.c" |
||
14 | |||
7880 | rgimad | 15 | #include "time.h" |
16 | #include "time.c" |
||
7873 | rgimad | 17 | |
7880 | rgimad | 18 | |
7873 | rgimad | 19 | typedef struct |
20 | { |
||
21 | char *name; |
||
22 | void *f; |
||
23 | } export_t; |
||
24 | |||
25 | // conio |
||
26 | const char sz__getch[] = "_getch"; |
||
27 | const char sz__kbhit[] = "_kbhit"; |
||
28 | |||
29 | // stdio |
||
30 | const char sz_printf[] = "printf"; |
||
31 | const char sz_puts[] = "puts"; |
||
32 | const char sz_gets[] = "gets"; |
||
33 | |||
34 | //string |
||
35 | const char sz_strlen[] = "strlen"; |
||
36 | const char sz_strcmp[] = "strcmp"; |
||
37 | const char sz_strcat[] = "strcat"; |
||
38 | |||
39 | // stdlib |
||
40 | const char sz_malloc[] = "malloc"; |
||
41 | const char sz_free[] = "free"; |
||
42 | const char sz_realloc[] = "realloc"; |
||
43 | //const char sz_[] = ""; |
||
44 | |||
7880 | rgimad | 45 | // time |
46 | const char sz_time[] = "time"; |
||
47 | |||
7873 | rgimad | 48 | |
49 | //uint32_t EXPORTS[] __asm__("EXPORTS") = |
||
50 | export_t EXPORTS[] = |
||
51 | { |
||
52 | {sz__getch, (void*)_getch}, |
||
53 | {sz__kbhit, (void*)_kbhit}, |
||
54 | |||
55 | {sz_printf, (void*)printf}, |
||
56 | {sz_puts, (void*)puts}, |
||
57 | {sz_gets, (void*)gets}, |
||
58 | |||
59 | {sz_strlen, (void*)strlen}, |
||
60 | {sz_strcmp, (void*)strcmp}, |
||
61 | {sz_strcat, (void*)strcat}, |
||
62 | |||
63 | {sz_malloc, (void*)malloc}, |
||
64 | {sz_free, (void*)free}, |
||
65 | {sz_realloc, (void*)realloc}, |
||
7880 | rgimad | 66 | |
67 | {sz_time, (void*)time}, |
||
68 | |||
7873 | rgimad | 69 | {NULL, NULL}, |
70 | }; |
||
71 | |||
72 | |||
73 | int lib_init() |
||
74 | { |
||
75 | con_init_console_dll(); |
||
76 | } |