libc,obj:
- changed wrapper names git-svn-id: svn://kolibrios.org@9094 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
e10c8c25cc
commit
52dd2872bf
@ -314,6 +314,20 @@ void _ksys_delay(uint32_t time){
|
||||
);
|
||||
}
|
||||
|
||||
/*=============== Function 7 - draw image in the window. ===============*/
|
||||
|
||||
static inline
|
||||
void _ksys_draw_bitmap(void *bitmap, int x, int y, int w, int h)
|
||||
{
|
||||
asm_inline(
|
||||
"int $0x40"
|
||||
::"a"(7), "b"(bitmap),
|
||||
"c"((w << 16) | h),
|
||||
"d"((x << 16) | y)
|
||||
:"memory"
|
||||
);
|
||||
}
|
||||
|
||||
/*=============== Function 8 - define/delete the button. ===============*/
|
||||
|
||||
static inline
|
||||
@ -1404,8 +1418,6 @@ int _ksys_file_rename(const char *name, const char *new_name)
|
||||
|
||||
/* ######### Old names of functions and structures. Do not use again! ##########*/
|
||||
|
||||
#define ksys_coff_etable_t ksys_dll_t
|
||||
#define ksys_proc_table_t ksys_thread_t
|
||||
#define _ksys_get_event _ksys_wait_event
|
||||
|
||||
#endif // _KSYS_H_
|
||||
|
@ -26,7 +26,7 @@ int main(int argc, char** argv) {
|
||||
"#include <sys/ksys.h>\n\n" \
|
||||
"#include <math.h>\n\n" \
|
||||
"#include <setjmp.h>\n\n" \
|
||||
"ksys_coff_etable_t EXPORTS[] = {\n");
|
||||
"ksys_dll_t EXPORTS[] = {\n");
|
||||
|
||||
// Generate
|
||||
char symbol[256];
|
||||
|
@ -7,7 +7,7 @@
|
||||
ksys_colors_table_t sys_color_table;
|
||||
|
||||
char statusbar[255];
|
||||
ksys_proc_table_t proc_info;
|
||||
ksys_thread_t proc_info;
|
||||
char text_line[255];
|
||||
|
||||
enum BUTTONS
|
||||
@ -29,7 +29,7 @@ void draw_window()
|
||||
_ksys_start_draw();
|
||||
// define&draw window
|
||||
_ksys_create_window(10, 40, 600, 400, "My window", sys_color_table.work_area, 0x13);
|
||||
_ksys_process_info(&proc_info, -1);
|
||||
_ksys_thread_info(&proc_info, -1);
|
||||
|
||||
win_width = proc_info.winx_size;
|
||||
win_hight = proc_info.winy_size;
|
||||
|
@ -46,7 +46,7 @@ int main(){
|
||||
ioctl.out_data_size = 0;
|
||||
|
||||
printf("Create '/tmp%u/' disk a %u Mb size...\n", tmpdisk_add.disk_id, TMPDISK_SIZE);
|
||||
unsigned status =_ksys_work_driver(&ioctl);
|
||||
unsigned status =_ksys_driver_control(&ioctl);
|
||||
if(status<7){
|
||||
puts(tmpdisk_res_text[status]);
|
||||
}else{
|
||||
|
@ -27,40 +27,40 @@ void stdcall (*con_cls)();
|
||||
void stdcall (*con_get_cursor_pos)(int* px, int* py);
|
||||
void stdcall (*con_set_cursor_pos)(int x, int y);
|
||||
|
||||
static void __con_panic(char* func_name)
|
||||
/*static void __con_panic(char* func_name)
|
||||
{
|
||||
debug_printf("In console.obj %s=NULL!\n", func_name);
|
||||
_ksys_exit();
|
||||
}
|
||||
}*/
|
||||
|
||||
static void __con_lib_link(ksys_coff_etable_t *exp)
|
||||
static void __con_lib_link(ksys_dll_t *exp)
|
||||
{
|
||||
__con_init_hidden = _ksys_get_coff_func(exp, "con_init", __con_panic);
|
||||
con_exit = _ksys_get_coff_func(exp, "con_exit", __con_panic);
|
||||
con_set_title = _ksys_get_coff_func(exp, "con_set_title", __con_panic);
|
||||
con_write_asciiz = _ksys_get_coff_func(exp, "con_write_asciiz", __con_panic);
|
||||
con_write_string = _ksys_get_coff_func(exp, "con_write_string", __con_panic);
|
||||
con_printf = _ksys_get_coff_func(exp, "con_printf", __con_panic);
|
||||
con_get_flags = _ksys_get_coff_func(exp, "con_get_flags", __con_panic);
|
||||
con_set_flags = _ksys_get_coff_func(exp, "con_set_flags", __con_panic);
|
||||
con_get_font_height = _ksys_get_coff_func(exp, "con_get_font_height", __con_panic);
|
||||
con_get_cursor_height = _ksys_get_coff_func(exp, "con_get_cursor_height", __con_panic);
|
||||
con_set_cursor_height = _ksys_get_coff_func(exp, "con_set_cursor_height", __con_panic);
|
||||
con_getch = _ksys_get_coff_func(exp, "con_getch", __con_panic);
|
||||
con_getch2 = _ksys_get_coff_func(exp, "con_getch2", __con_panic);
|
||||
con_kbhit = _ksys_get_coff_func(exp, "con_kbhit", __con_panic);
|
||||
con_gets = _ksys_get_coff_func(exp, "con_gets", __con_panic);
|
||||
con_gets2 = _ksys_get_coff_func(exp, "con_gets2", __con_panic);
|
||||
con_cls = _ksys_get_coff_func(exp, "con_cls", __con_panic);
|
||||
con_get_cursor_pos = _ksys_get_coff_func(exp, "con_get_cursor_pos", __con_panic);
|
||||
con_set_cursor_pos = _ksys_get_coff_func(exp, "con_set_cursor_pos", __con_panic);
|
||||
__con_init_hidden = _ksys_dlsym(exp, "con_init");
|
||||
con_exit = _ksys_dlsym(exp, "con_exit");
|
||||
con_set_title = _ksys_dlsym(exp, "con_set_title");
|
||||
con_write_asciiz = _ksys_dlsym(exp, "con_write_asciiz");
|
||||
con_write_string = _ksys_dlsym(exp, "con_write_string");
|
||||
con_printf = _ksys_dlsym(exp, "con_printf");
|
||||
con_get_flags = _ksys_dlsym(exp, "con_get_flags");
|
||||
con_set_flags = _ksys_dlsym(exp, "con_set_flags");
|
||||
con_get_font_height = _ksys_dlsym(exp, "con_get_font_height");
|
||||
con_get_cursor_height = _ksys_dlsym(exp, "con_get_cursor_height");
|
||||
con_set_cursor_height = _ksys_dlsym(exp, "con_set_cursor_height");
|
||||
con_getch = _ksys_dlsym(exp, "con_getch");
|
||||
con_getch2 = _ksys_dlsym(exp, "con_getch2");
|
||||
con_kbhit = _ksys_dlsym(exp, "con_kbhit");
|
||||
con_gets = _ksys_dlsym(exp, "con_gets");
|
||||
con_gets2 = _ksys_dlsym(exp, "con_gets2");
|
||||
con_cls = _ksys_dlsym(exp, "con_cls");
|
||||
con_get_cursor_pos = _ksys_dlsym(exp, "con_get_cursor_pos");
|
||||
con_set_cursor_pos = _ksys_dlsym(exp, "con_set_cursor_pos");
|
||||
}
|
||||
|
||||
int con_init_opt(dword wnd_width, dword wnd_height, dword scr_width, dword scr_height, const char* title)
|
||||
{
|
||||
if(!__con_is_load){
|
||||
ksys_coff_etable_t *__con_lib;
|
||||
__con_lib = _ksys_load_coff(__con_dllname);
|
||||
ksys_dll_t *__con_lib;
|
||||
__con_lib = _ksys_dlopen(__con_dllname);
|
||||
if(__con_lib==NULL){
|
||||
_ksys_debug_puts("Error! Can't load console.obj lib\n");
|
||||
return 1;
|
||||
|
@ -6,11 +6,11 @@ static char buf[FILENAME_MAX + 1];
|
||||
static int static_index = 0;
|
||||
|
||||
char *tmpnam(char *name) {
|
||||
ksys_proc_table_t table;
|
||||
_ksys_process_info(&table, -1);
|
||||
ksys_thread_t table;
|
||||
_ksys_thread_info(&table, -1);
|
||||
|
||||
char *out = name ? name : buf;
|
||||
// PID is also unique for each thread
|
||||
sprintf(out, "/tmp0/1/%x_%x.tmp", table.pid, static_index++);
|
||||
return out;
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ static struct tm __buffertime;
|
||||
time_t time(time_t *timer){
|
||||
int kos_date, kos_time;
|
||||
kos_date = _ksys_get_date().val;
|
||||
kos_time = _ksys_get_clock();
|
||||
kos_time = _ksys_get_time().val;
|
||||
|
||||
int bcd_day = (kos_date >> 16);
|
||||
int bcd_mon = ((kos_date & 0xFF00) >> 8);
|
||||
|
Loading…
Reference in New Issue
Block a user