/programs/cmm/app_plus/app_plus.c |
---|
20,29 → 20,13 |
dword scr_pal[] = {0xFFFFFF,0xBBDDFF,0x4166B5,0xE0E4E6,0xAFBEDD,0xC4D4E8,0x52ACDD,0x000000, |
0xE9DAB2,0xC99811,0xFDF9D4,0xF8B93C,0xFDEEBE,0xFBEBA6,0xDFAF4F,0xF3D57C}; |
#define APP_PLUS_INI_PATH "/kolibrios/settings/app_plus.ini" |
#define APP_PLUS_INI_NOT_EXISTS "'APP+\n/kolibrios/settings/app_plus.ini is not exists.\nProgram terminated.' -tE" |
#define WINDOW_TITLE_TEXT "Error" |
#define CONTENT_HEADER_TEXT "/KOLIBRIOS/ NOT MOUNTED" |
#define DESCRIPTION_TEXT "Try to find it manually. It should look |
like image on the right. |
Note: this action can be done only once |
per 1 session of the OS running. If you |
will choose the wrong folder then you |
need to reboot system to try again." |
#define MANUALLY_BUTTON_TEXT "Choose /kolibrios/ folder..." |
void CheckKosMounted() |
{ |
if (dir_exists("/kolibrios/")) |
if (isdir("/kolibrios/")) |
{ |
if (file_exists(APP_PLUS_INI_PATH)) |
io.run("syspanel", APP_PLUS_INI_PATH); |
else |
notify(APP_PLUS_INI_NOT_EXISTS); |
io.run("syspanel", "/kolibrios/settings/app_plus.ini"); |
ExitProcess(); |
} |
} |
85,6 → 69,17 |
} |
} |
#define WINDOW_TITLE_TEXT "Error" |
#define CONTENT_HEADER_TEXT "/KOLIBRIOS/ NOT MOUNTED" |
#define DESCRIPTION_TEXT "Try to find it manually. It should look |
like image on the right. |
Note: this action can be done only once |
per 1 session of the OS running. If you |
will choose the wrong folder then you |
need to reboot system to try again." |
#define MANUALLY_BUTTON_TEXT "Choose /kolibrios/ folder..." |
void draw_window() |
{ |
incn y; |
/programs/cmm/lib/copyf.h |
---|
24,7 → 24,7 |
debugln("Error: copyf->GetFileInfo"); |
return error; |
} |
if (dir_exists(from1)) |
if (isdir(from1)) |
return CopyFolder(from1, in1); |
else |
{ |
85,7 → 85,7 |
sprintf(#copy_from2,"%s/%s",from2,filename); |
sprintf(#copy_in2,"%s/%s",in2,filename); |
if ( TestBit(ESDWORD[filename-40], 4) ) //dir_exists? |
if ( TestBit(ESDWORD[filename-40], 4) ) //isdir? |
{ |
if ( (!strncmp(filename, ".",1)) || (!strncmp(filename, "..",2)) ) continue; |
CopyFolder(#copy_from2, #copy_in2); |
/programs/cmm/lib/file_system.h |
---|
197,23 → 197,15 |
$int 0x40 |
} |
:char dir_exists(dword fpath) |
:char isdir(dword fpath) |
{ |
BDVK fpath_atr; |
GetFileInfo(fpath, #fpath_atr); |
return fpath_atr.isfolder; |
} |
:char file_exists(dword fpath) |
{ |
BDVK ReadFile_atr; |
if (! GetFileInfo(fpath, #ReadFile_atr)) return true; |
return false; |
} |
:int GetFile(dword buf, filesize, read_path) |
{ |
int return_val = 0; |
BDVK ReadFile_atr; |
dword rBuf; |
if (! GetFileInfo(read_path, #ReadFile_atr)) |
223,11 → 215,11 |
{ |
ESDWORD[buf] = rBuf; |
ESDWORD[filesize] = ReadFile_atr.sizelo; |
return_val = 1; |
return 1; |
} |
} |
free(rBuf); |
return return_val; |
return 0; |
} |
enum |
/programs/cmm/eolite/include/properties.h |
---|
57,7 → 57,7 |
{ |
dword dirbuf, fcount, i, filename; |
dword cur_file; |
if (dir_exists(way)) |
if (isdir(way)) |
{ |
cur_file = malloc(4096); |
GetDir(#dirbuf, #fcount, way, DIRS_ONLYREAL); |
105,7 → 105,7 |
SetFileInfo(cur_file, #file_info_general); |
if (prop==2) |
{ |
if (dir_exists(cur_file)) |
if (isdir(cur_file)) |
{ |
SetPropertiesDir(cur_file); |
} |
155,7 → 155,7 |
{ |
dword dirbuf, fcount, i, filename; |
dword cur_file; |
if (dir_exists(way)) |
if (isdir(way)) |
{ |
cur_file = malloc(4096); |
// In the process of recursive descent, memory must be allocated dynamically, |
/programs/cmm/eolite/include/fs.h |
---|
5,7 → 5,7 |
{ |
dword dirbuf, fcount, i, filename; |
dword cur_file; |
if (dir_exists(way)) |
if (isdir(way)) |
{ |
cur_file = malloc(4096); |
// In the process of recursive descent, memory must be allocated dynamically, because the static memory -> was a bug !!! But unfortunately pass away to sacrifice speed. |
/programs/cmm/eolite/Eolite.c |
---|
857,7 → 857,7 |
dword dirbuf, fcount, i, filename; |
int error; |
char del_from[4096]; |
if (dir_exists(way)) |
if (isdir(way)) |
{ |
if (error = GetDir(#dirbuf, #fcount, way, DIRS_ONLYREAL)) del_error = error; |
for (i=0; i<fcount; i++) |
/programs/cmm/appearance/appearance.c |
---|
153,7 → 153,7 |
DrawRectangle3D(list.x-2, list.y-2, list.w+3+scroll1.size_x, list.h+3, system.color.work_dark, system.color.work_light); |
DrawWideRectangle(list.x-LIST_PADDING, list.y-LIST_PADDING, LIST_PADDING*2+list.w+scroll1.size_x, LIST_PADDING*2+list.h, LIST_PADDING-2, system.color.work); |
DrawTab(list.x+10, list.y, SKINS, T_SKINS); |
if (dir_exists(WALP_STANDART_PATH)) DrawTab(strlen(T_SKINS)*8+TAB_PADDING+list.x+21, list.y, WALLPAPERS, T_WALLPAPERS); |
if (isdir(WALP_STANDART_PATH)) DrawTab(strlen(T_SKINS)*8+TAB_PADDING+list.x+21, list.y, WALLPAPERS, T_WALLPAPERS); |
DrawRectangle(list.x-1, list.y-1, list.w+1+scroll1.size_x, list.h+1, system.color.work_graph); |
Draw_List(); |
/programs/cmm/software_widget/software_widget.c |
---|
58,7 → 58,7 |
Libimg_LoadImage(#skin, "/sys/icons32.png"); |
Libimg_FillTransparent(skin.image, skin.w, skin.h, LIST_BACKGROUND_COLOR); |
kolibrios_mounted = dir_exists("/kolibrios"); |
kolibrios_mounted = isdir("/kolibrios"); |
if (param) |
{ |
/programs/cmm/examples/compile_en.bat |
---|
File deleted |
\ No newline at end of file |
/programs/cmm/examples/compile.bat |
---|
0,0 → 1,17 |
c-- window.c |
c-- collections.c |
c-- menu.c |
@echo off |
@del _window |
@del _collections |
@del _menu |
@rename window.com _window |
@rename collections.com _collections |
@rename menu.com _menu |
@del warning.txt |
@echo on |
@pause |