Subversion Repositories Kolibri OS

Rev

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

Rev Author Line No. Line
959 leency 1
 
2
3
 
4
5
 
6
{
7
kol_struct70	k70;
8
int		result;
9
10
 
11
k70.p04 = 0;
12
k70.p08 = 0;
13
k70.p12 = 2*1024*1024; // 2 MB
14
k70.p16 = (unsigned) malloc(2*1024*1024);
3245 Albom 15
k70.p20 = 0;
959 leency 16
k70.p21 = dir;
17
18
 
19
20
 
3245 Albom 21
959 leency 22
 
23
	return TRUE;
24
else
25
	return FALSE;
26
27
 
28
29
 
30
31
 
32
{
33
int i;
34
i = strlen(dir)-1;
35
for (;;i--)
36
	if ('/' == dir[i])
37
		{
38
		dir[i+1] = 0;
39
		break;
40
		}
41
}
42
43
 
44
45
 
46
{
47
kol_struct70	k70;
48
int		result;
49
50
 
51
k70.p04 = 0;
52
k70.p08 = 0;
53
k70.p12 = 0;
54
k70.p16 = 0;
55
k70.p20 = 0;
56
k70.p21 = file;
57
58
 
59
60
 
61
	return TRUE;
62
else
63
	return FALSE;
64
}
65
66
 
67
68
 
2617 Albom 69
{
70
#if LANG_ENG
71
	printf ("  File '%s' not found.\n\r", file);
72
#elif LANG_RUS
73
	printf ("  ” ©« '%s' ­¥ ­ ©¤¥­.\n\r", file);
74
#endif
75
}
76
77
 
78
79
 
959 leency 80
{
81
return ((' ' == c) || ('\t' == c) || (13 == c) || (10 == c));
82
}
83
84
 
85
86
 
87
{
88
int i, j;
89
90
 
91
	if ( !iswhite(string[i]) )
92
		break;
93
j = 0;
94
for (;;i++, j++)
95
	{
96
	string[j] = string[i];
97
	if ('\0' == string[i] )
98
		break;
99
	}
100
101
 
102
	if ('\0' == string[i])
103
		break;
104
i--;
105
for (;i>0;--i)
106
	if ( iswhite(string[i]) )
107
		string[i] = '\0';
108
	else
109
		break;
110
}
111
112
 
113
114
 
115
{
116
117
 
1647 Nasarus 118
119
 
959 leency 120
strcat(title, SHELL_VERSION);
121
CONSOLE_INIT(title);
122
123
 
124
dir_truncate(cur_dir);
125
126
 
127
128
 
1647 Nasarus 129
130
 
4106 Albom 131
{
4109 leency 132
   strcpy(CMD, cur_dir);
4106 Albom 133
   strcat(CMD, ".shell");
134
   if ( !file_check(CMD) )
135
       strcpy(CMD, "/sys/settings/.shell");
136
}
4109 leency 137
else
3988 leency 138
{
139
	if (PARAM[0] == '/')
140
	{
141
		strcpy(cur_dir, PARAM);
142
		*(strrchr(cur_dir, '/')+1)=0;
4109 leency 143
	}
3988 leency 144
	strcpy(CMD, PARAM);
959 leency 145
}
3988 leency 146
959 leency 147
 
148
149
 
150
	{
151
	printf ("# ");
152
	command_get();
153
	command_execute();
154
	}
155
156
 
157
kol_exit();
158
}
159
160
 
161