Rev 1085 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1085 | pj | 1 | /* |
2 | * |
||
3 | * |
||
4 | * |
||
5 | */ |
||
6 | |||
7 | #include <ll/i386/cons.h> |
||
8 | #include <drivers/keyb.h> |
||
9 | |||
10 | #include <stdio.h> |
||
11 | #include <stdlib.h> |
||
12 | #include <string.h> |
||
13 | |||
14 | int main(int argc,char *argv[]) |
||
15 | { |
||
16 | char buffer[256]; |
||
17 | char *s; |
||
18 | // int res; |
||
19 | int c; |
||
20 | |||
21 | /* |
||
22 | temp_device=bdev_scan_devices(choose_temp_callback); |
||
23 | if (temp_device<0) { |
||
24 | cprintf("can't find a filesystem to mount on /TEMP!!!\n"); |
||
25 | return -1; |
||
26 | } |
||
27 | |||
28 | res=mount(temp_device,FS_MSDOS,"/TEMP",NULL); |
||
29 | if (res!=0) { |
||
30 | cprintf("can't mount XXX on /TEMP (errno: %i)\n",errno); |
||
31 | sys_end(); |
||
32 | return -1; |
||
33 | } |
||
34 | */ |
||
35 | |||
36 | /* |
||
37 | * |
||
38 | */ |
||
39 | |||
40 | printf("try using printf() to write on console!\n"); |
||
41 | printf("second line of the test\n"); |
||
42 | fprintf(stdout,"using fprintf() to write on stdout\n"); |
||
43 | fprintf(stderr,"try using fprintf() to write on stderr!\n"); |
||
44 | fprintf(stderr,"all this %i message are using ?printf() functions\n",4); |
||
45 | |||
46 | printf("now try to write a phrase and press [Enter] to finish\n"); |
||
47 | s=fgets(buffer,sizeof(buffer),stdin); |
||
48 | if (s!=NULL) printf("you have typed: '%s'\n",s); |
||
49 | |||
50 | cprintf("[press 'x' to exit]\n"); |
||
51 | |||
52 | while ((c = keyb_getchar()) != 'x') ; |
||
53 | |||
54 | return 0; |
||
55 | } |