Rev 8793 | Rev 9554 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8793 | Rev 9094 | ||
---|---|---|---|
Line 25... | Line 25... | ||
25 | char* stdcall (*con_gets2)(con_gets2_callback callback, char* str, int n); |
25 | char* stdcall (*con_gets2)(con_gets2_callback callback, char* str, int n); |
26 | void stdcall (*con_cls)(); |
26 | void stdcall (*con_cls)(); |
27 | void stdcall (*con_get_cursor_pos)(int* px, int* py); |
27 | void stdcall (*con_get_cursor_pos)(int* px, int* py); |
28 | void stdcall (*con_set_cursor_pos)(int x, int y); |
28 | void stdcall (*con_set_cursor_pos)(int x, int y); |
Line 29... | Line 29... | ||
29 | 29 | ||
30 | static void __con_panic(char* func_name) |
30 | /*static void __con_panic(char* func_name) |
31 | { |
31 | { |
32 | debug_printf("In console.obj %s=NULL!\n", func_name); |
32 | debug_printf("In console.obj %s=NULL!\n", func_name); |
33 | _ksys_exit(); |
33 | _ksys_exit(); |
Line 34... | Line 34... | ||
34 | } |
34 | }*/ |
35 | 35 | ||
36 | static void __con_lib_link(ksys_coff_etable_t *exp) |
36 | static void __con_lib_link(ksys_dll_t *exp) |
37 | { |
37 | { |
38 | __con_init_hidden = _ksys_get_coff_func(exp, "con_init", __con_panic); |
38 | __con_init_hidden = _ksys_dlsym(exp, "con_init"); |
39 | con_exit = _ksys_get_coff_func(exp, "con_exit", __con_panic); |
39 | con_exit = _ksys_dlsym(exp, "con_exit"); |
40 | con_set_title = _ksys_get_coff_func(exp, "con_set_title", __con_panic); |
40 | con_set_title = _ksys_dlsym(exp, "con_set_title"); |
41 | con_write_asciiz = _ksys_get_coff_func(exp, "con_write_asciiz", __con_panic); |
41 | con_write_asciiz = _ksys_dlsym(exp, "con_write_asciiz"); |
42 | con_write_string = _ksys_get_coff_func(exp, "con_write_string", __con_panic); |
42 | con_write_string = _ksys_dlsym(exp, "con_write_string"); |
43 | con_printf = _ksys_get_coff_func(exp, "con_printf", __con_panic); |
43 | con_printf = _ksys_dlsym(exp, "con_printf"); |
44 | con_get_flags = _ksys_get_coff_func(exp, "con_get_flags", __con_panic); |
44 | con_get_flags = _ksys_dlsym(exp, "con_get_flags"); |
45 | con_set_flags = _ksys_get_coff_func(exp, "con_set_flags", __con_panic); |
45 | con_set_flags = _ksys_dlsym(exp, "con_set_flags"); |
46 | con_get_font_height = _ksys_get_coff_func(exp, "con_get_font_height", __con_panic); |
46 | con_get_font_height = _ksys_dlsym(exp, "con_get_font_height"); |
47 | con_get_cursor_height = _ksys_get_coff_func(exp, "con_get_cursor_height", __con_panic); |
47 | con_get_cursor_height = _ksys_dlsym(exp, "con_get_cursor_height"); |
48 | con_set_cursor_height = _ksys_get_coff_func(exp, "con_set_cursor_height", __con_panic); |
48 | con_set_cursor_height = _ksys_dlsym(exp, "con_set_cursor_height"); |
49 | con_getch = _ksys_get_coff_func(exp, "con_getch", __con_panic); |
49 | con_getch = _ksys_dlsym(exp, "con_getch"); |
50 | con_getch2 = _ksys_get_coff_func(exp, "con_getch2", __con_panic); |
50 | con_getch2 = _ksys_dlsym(exp, "con_getch2"); |
51 | con_kbhit = _ksys_get_coff_func(exp, "con_kbhit", __con_panic); |
51 | con_kbhit = _ksys_dlsym(exp, "con_kbhit"); |
52 | con_gets = _ksys_get_coff_func(exp, "con_gets", __con_panic); |
52 | con_gets = _ksys_dlsym(exp, "con_gets"); |
53 | con_gets2 = _ksys_get_coff_func(exp, "con_gets2", __con_panic); |
53 | con_gets2 = _ksys_dlsym(exp, "con_gets2"); |
54 | con_cls = _ksys_get_coff_func(exp, "con_cls", __con_panic); |
54 | con_cls = _ksys_dlsym(exp, "con_cls"); |
55 | con_get_cursor_pos = _ksys_get_coff_func(exp, "con_get_cursor_pos", __con_panic); |
55 | con_get_cursor_pos = _ksys_dlsym(exp, "con_get_cursor_pos"); |
Line 56... | Line 56... | ||
56 | con_set_cursor_pos = _ksys_get_coff_func(exp, "con_set_cursor_pos", __con_panic); |
56 | con_set_cursor_pos = _ksys_dlsym(exp, "con_set_cursor_pos"); |
57 | } |
57 | } |
58 | 58 | ||
59 | int con_init_opt(dword wnd_width, dword wnd_height, dword scr_width, dword scr_height, const char* title) |
59 | int con_init_opt(dword wnd_width, dword wnd_height, dword scr_width, dword scr_height, const char* title) |
60 | { |
60 | { |
61 | if(!__con_is_load){ |
61 | if(!__con_is_load){ |
62 | ksys_coff_etable_t *__con_lib; |
62 | ksys_dll_t *__con_lib; |
63 | __con_lib = _ksys_load_coff(__con_dllname); |
63 | __con_lib = _ksys_dlopen(__con_dllname); |
64 | if(__con_lib==NULL){ |
64 | if(__con_lib==NULL){ |
65 | _ksys_debug_puts("Error! Can't load console.obj lib\n"); |
65 | _ksys_debug_puts("Error! Can't load console.obj lib\n"); |