Rev 8827 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1665 | Nasarus | 1 | |
8827 | rgimad | 2 | |
1665 | Nasarus | 3 | |
8827 | rgimad | 4 | kol_struct_BDVK bdvk; |
5 | unsigned result, i; |
||
6 | unsigned long long filesize, pos; |
||
7 | char buf[81]; //���� |
||
8 | char* temp = (char*) malloc(FILENAME_MAX); |
||
9808 | Coldy | 9 | unsigned flags; |
8827 | rgimad | 10 | |
1665 | Nasarus | 11 | |
8827 | rgimad | 12 | printf (CMD_MORE_USAGE); |
13 | return TRUE; |
||
14 | } |
||
2617 | Albom | 15 | |
1665 | Nasarus | 16 | |
8827 | rgimad | 17 | { |
18 | strcpy(temp, file); |
||
19 | |||
1665 | Nasarus | 20 | |
8827 | rgimad | 21 | { |
22 | file_not_found(file); |
||
23 | return FALSE; |
||
24 | } |
||
25 | } |
||
1665 | Nasarus | 26 | else |
8827 | rgimad | 27 | { |
1665 | Nasarus | 28 | strcpy(temp, cur_dir); |
8827 | rgimad | 29 | if (temp[strlen(temp)-1] != '/') |
30 | strcat(temp, "/"); // add slash |
||
31 | strcat(temp, file); |
||
32 | |||
33 | |||
34 | { |
||
35 | file_not_found(file); |
||
36 | return FALSE; |
||
37 | } |
||
38 | } |
||
1665 | Nasarus | 39 | |
40 | |||
8827 | rgimad | 41 | k70.p04 = k70.p12 = 0; |
42 | //k70.p08 = 0; |
||
43 | k70.p16 = (unsigned) &bdvk; |
||
44 | k70.p20 = 0; |
||
45 | k70.p21 = temp; |
||
46 | |||
1665 | Nasarus | 47 | |
8827 | rgimad | 48 | if ( 0 != result ) |
49 | return FALSE; |
||
50 | |||
1665 | Nasarus | 51 | |
8827 | rgimad | 52 | |
1665 | Nasarus | 53 | |
8827 | rgimad | 54 | flags = con_get_flags(); |
55 | |||
1665 | Nasarus | 56 | |
8827 | rgimad | 57 | { |
58 | |||
1665 | Nasarus | 59 | |
8827 | rgimad | 60 | |
1665 | Nasarus | 61 | |
8827 | rgimad | 62 | k70.p04 = pos; |
63 | // k70.p08 = 0; // bug for over 4Gb files, but "more" is unusable there |
||
64 | k70.p12 = 80; |
||
65 | k70.p16 = (unsigned) buf; |
||
66 | k70.p20 = 0; |
||
67 | k70.p21 = temp; |
||
68 | |||
1665 | Nasarus | 69 | |
8827 | rgimad | 70 | for (i=0; i<80; i++) |
71 | { |
||
72 | |||
1665 | Nasarus | 73 | |
8827 | rgimad | 74 | con_set_flags(flags|0x100); |
75 | else con_set_flags(flags); |
||
76 | |||
1665 | Nasarus | 77 | |
8827 | rgimad | 78 | } |
79 | if ( 0 != result ) |
||
80 | { |
||
81 | con_set_flags(flags); |
||
82 | printf ("\n\r"); |
||
83 | return TRUE; |
||
84 | } |
||
85 | |||
86 | |||
1665 | Nasarus | 87 | con_set_flags(flags); |
8827 | rgimad | 88 | printf ("\n\r"); |
89 | free(temp); |
||
9808 | Coldy | 90 | return TRUE; |
8827 | rgimad | 91 | }80;> |
1665 | Nasarus | 92 | >1)> |
3247 | Albom | 93 |