Subversion Repositories Kolibri OS

Rev

Rev 6826 | Rev 8827 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1665 Nasarus 1
 
2
{
3
4
 
5
kol_struct_BDVK	bdvk;
6
unsigned	result, i;
6857 siemargl 7
unsigned long long filesize, pos;
8
char		buf[81]; //буфер
1668 Nasarus 9
char		temp[FILENAME_MAX];
6826 siemargl 10
unsigned	flags;
1665 Nasarus 11
12
 
2617 Albom 13
	{
1665 Nasarus 14
	#if LANG_ENG
1668 Nasarus 15
		printf ("  more \n\r");
16
	#elif LANG_RUS
17
		printf ("  more <имя файла>\n\r");
18
	#endif
19
	return TRUE;
3247 Albom 20
	}
2617 Albom 21
1665 Nasarus 22
 
23
	{
24
	strcpy(temp, file);
25
26
 
27
		{
28
		file_not_found(file);
2617 Albom 29
		return FALSE;
1665 Nasarus 30
		}
31
	}
32
else
33
	{
34
	strcpy(temp, cur_dir);
35
	if (temp[strlen(temp)-1] != '/')
2615 Albom 36
		strcat(temp, "/"); // add slash
37
	strcat(temp, file);
1665 Nasarus 38
39
 
40
		{
41
		file_not_found(file);
2617 Albom 42
		return FALSE;
1665 Nasarus 43
		}
44
	}
45
46
 
47
k70.p04 = k70.p12 = 0;
6857 siemargl 48
//k70.p08 = 0;
49
k70.p16 = (unsigned) &bdvk;
3245 Albom 50
k70.p20 = 0;
1665 Nasarus 51
k70.p21 = temp;
52
53
 
1668 Nasarus 54
if ( 0 != result )
1665 Nasarus 55
	return FALSE;
56
57
 
6857 siemargl 58
1665 Nasarus 59
 
60
flags = con_get_flags();
61
62
 
63
	{
64
65
 
66
67
 
68
	k70.p04 = pos;
69
//	k70.p08 = 0;   // bug for over 4Gb files, but "more" is unusable there
6857 siemargl 70
	k70.p12 = 80;
1665 Nasarus 71
	k70.p16 = (unsigned) buf;
3245 Albom 72
	k70.p20 = 0;
1665 Nasarus 73
	k70.p21 = temp;
74
75
 
1668 Nasarus 76
	for (i=0; i<80; i++)
1665 Nasarus 77
		{
78
79
 
80
			con_set_flags(flags|0x100);
81
		else con_set_flags(flags);
82
83
 
84
		}
85
	if ( 0 != result )
86
		{
87
		con_set_flags(flags);
88
		printf ("\n\r");
89
		return TRUE;
90
		}
91
92
 
93
con_set_flags(flags);
94
printf ("\n\r");
95
return TRUE;
96
}
97
>
3247 Albom 98