Subversion Repositories Kolibri OS

Rev

Rev 6412 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6412 Rev 6424
Line 5... Line 5...
5
 
5
 
6
char* dllname="/sys/lib/console.obj";
6
char* dllname="/sys/lib/console.obj";
Line 7... Line 7...
7
int   console_init_status;
7
int   console_init_status;
8
 
8
 
-
 
9
char* imports[] = {"START","version","con_init","con_write_asciiz","con_printf","con_exit",NULL};
-
 
10
char* caption = "Console app";
-
 
11
extern int __argc;
-
 
12
extern char** __argv;
Line 9... Line 13...
9
char* imports[] = {"START","version","con_init","con_write_asciiz","con_printf","con_exit",NULL};
13
extern char* __path;
10
char* caption = "Console test - colors";
14
 
11
 
15
 
12
dword* dll_ver;
16
dword* dll_ver;
Line 30... Line 34...
30
                _ksys_cofflib_getproc(exp, imports[4]);
34
                _ksys_cofflib_getproc(exp, imports[4]);
31
        con_exit = (void stdcall (*)(dword))
35
        con_exit = (void stdcall (*)(dword))
32
                _ksys_cofflib_getproc(exp, imports[5]);
36
                _ksys_cofflib_getproc(exp, imports[5]);
33
}
37
}
Line -... Line 38...
-
 
38
 
34
 
39
 
35
int init_console(void)
40
int init_console(void)
36
{
41
{
Line 37... Line 42...
37
  struct import * hDll;
42
  struct import * hDll;
38
 
43
 
39
        if((hDll = (struct import *)_ksys_cofflib_load(dllname)) == 0){
44
        if((hDll = (struct import *)_ksys_cofflib_load(dllname)) == 0){
40
                debug_out_str("can't load lib\n");
45
                debug_out_str("can't load lib\n");
41
                return 1;
46
                return 1;
42
        }
47
        }
Line 43... Line 48...
43
        printf_link(hDll, imports);
48
        printf_link(hDll, imports);
44
        debug_out_str("dll loaded\n");
49
//        debug_out_str("dll loaded\n");
45
 
50
 
Line 46... Line 51...
46
        con_init(-1, -1, -1, -1, caption);
51
        con_init(-1, -1, -1, -1, caption); //__argv[0] && __path dont work
47
        return(0);
52
        return(0);
48
}
53
}
49
 
54
 
50
int printf(const char *format,...)
55
int printf(const char *format,...)
51
{
56
{
52
   int          i;
57
   int          i = 0;