Rev 7197 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7197 | Rev 7202 | ||
---|---|---|---|
Line 195... | Line 195... | ||
195 | $mov eax,70 |
195 | $mov eax,70 |
196 | $mov ebx,#read_dir_70.func |
196 | $mov ebx,#read_dir_70.func |
197 | $int 0x40 |
197 | $int 0x40 |
198 | } |
198 | } |
Line 199... | Line 199... | ||
199 | 199 | ||
200 | :char dir_exists(dword fpath) |
200 | :bool dir_exists(dword fpath) |
201 | { |
201 | { |
202 | BDVK fpath_atr; |
202 | BDVK fpath_atr; |
203 | if (GetFileInfo(fpath, #fpath_atr) != 0) return false; |
203 | if (GetFileInfo(fpath, #fpath_atr) != 0) return false; |
204 | return fpath_atr.isfolder; |
204 | return fpath_atr.isfolder; |
205 | } |
205 | } |
206 | :char file_exists(dword fpath) |
206 | :bool file_exists(dword fpath) |
207 | { |
207 | { |
208 | BDVK ReadFile_atr; |
208 | BDVK ReadFile_atr; |
209 | if (! GetFileInfo(fpath, #ReadFile_atr)) return true; |
209 | if (! GetFileInfo(fpath, #ReadFile_atr)) return true; |
210 | return false; |
210 | return false; |
Line 283... | Line 283... | ||
283 | strcat(#absolute_path, relative_path); |
283 | strcat(#absolute_path, relative_path); |
284 | } |
284 | } |
285 | return #absolute_path; |
285 | return #absolute_path; |
286 | } |
286 | } |
Line 287... | Line 287... | ||
287 | 287 | ||
288 | :dword GetIni(dword ini_name) //search it on /kolibrios/ then on /sys/ |
288 | :dword GetIni(dword ini_path, ini_name) //search it on /kolibrios/ then on /sys/ |
289 | { |
- | |
290 | char absolute_path[4096]; |
289 | { |
291 | strcpy(#absolute_path, "/kolibrios/settings/"); |
290 | strcpy(ini_path, "/kolibrios/settings/"); |
292 | strcat(#absolute_path, ini_name); |
291 | strcat(ini_path, ini_name); |
293 | if (!file_exists(#absolute_path)) { |
292 | if (!file_exists(ini_path)) { |
294 | strcpy(#absolute_path, "/sys/settings/"); |
293 | strcpy(ini_path, "/sys/settings/"); |
295 | strcat(#absolute_path, ini_name); |
294 | strcat(ini_path, ini_name); |
296 | } |
295 | } |
297 | return #absolute_path; |
296 | return ini_path; |
Line 298... | Line 297... | ||
298 | } |
297 | } |
299 | 298 | ||
300 | :byte ConvertSize_size_prefix[8]; |
299 | :byte ConvertSize_size_prefix[8]; |