Subversion Repositories Kolibri OS

Rev

Rev 4109 | Rev 6857 | 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
 
6826 siemargl 124
{
125
	printf("Invalid struct align kol_struct70, need to fix compile options\n\r");
126
	kol_exit();
127
}
128
129
 
130
 
959 leency 131
dir_truncate(cur_dir);
132
133
 
134
135
 
1647 Nasarus 136
137
 
4106 Albom 138
{
4109 leency 139
   strcpy(CMD, cur_dir);
4106 Albom 140
   strcat(CMD, ".shell");
141
   if ( !file_check(CMD) )
142
       strcpy(CMD, "/sys/settings/.shell");
143
}
4109 leency 144
else
3988 leency 145
{
146
	if (PARAM[0] == '/')
147
	{
148
		strcpy(cur_dir, PARAM);
149
		*(strrchr(cur_dir, '/')+1)=0;
4109 leency 150
	}
3988 leency 151
	strcpy(CMD, PARAM);
959 leency 152
}
3988 leency 153
959 leency 154
 
155
156
 
157
	{
158
	printf ("# ");
159
	command_get();
160
	command_execute();
161
	}
162
163
 
164
kol_exit();
165
}
166
167
 
168