Fixed all misuse of "/rd/1" (changed to "/sys"; all except "/programs/*" and "/kernel/*")

ati2d: fixed log creation

git-svn-id: svn://kolibrios.org@9583 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
vitalkrilov
2022-01-06 19:34:04 +00:00
parent d8bc7bb476
commit 8800305655
37 changed files with 226 additions and 226 deletions

View File

@@ -30,13 +30,13 @@ char* load_file_inmem(char* fname, int32_t* read_sz); // see below
void* read_folderdata(char* name);
void control_minimal_window_size(int wmin, int hmin);
int main(int argc, char **argv)
{
/* Load all libraries, initialize global tables like system color table and
operations table. kolibri_gui_init() will EXIT with mcall -1 if it fails
to do it's job. This is all you need to call and all libraries and GUI
elements can be used after a successful call to this function
*/
int main(int argc, char **argv)
{
/* Load all libraries, initialize global tables like system color table and
operations table. kolibri_gui_init() will EXIT with mcall -1 if it fails
to do it's job. This is all you need to call and all libraries and GUI
elements can be used after a successful call to this function
*/
kolibri_gui_init();
kolibri_proclib_init(); // opensave && color dialogs
kolibri_libimg_init(); // png handling
@@ -71,7 +71,7 @@ int main(int argc, char **argv)
free(filedata);
// creating GUI using library functions
kolibri_window *main_window = kolibri_new_window(50, 40, 430, 500, "PictureButton and File dialog demo");
kolibri_window *main_window = kolibri_new_window(50, 40, 430, 500, "PictureButton and File dialog demo");
pict_button tbar[3];
gui_add_pict_button(main_window, kolibri_pict_button(&tbar[0], X_Y(10, 16), X_Y(10, 16), image_data_rgb, image_data_rgb + icon_rgb_size, image_data_rgb + icon_rgb_size * 2, 24, NULL, 0));
@@ -90,7 +90,7 @@ int main(int argc, char **argv)
gui_add_pathview(main_window, kolibri_pathview(&pview, X_Y(10, 50), 330, 1, 0, dlg_opensave->openfile_path, temp_path, 0, 0)); // black font, no background, font 1
filebrowser brows;
filedata = load_file_inmem("/rd/1/File managers/z_icons.png", &read_bytes);
filedata = load_file_inmem("/sys/File managers/z_icons.png", &read_bytes);
image_data_rgb = malloc(icon_rgb_size * 20); // we know size
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> image_data
image_data = (*img_decode)(filedata, read_bytes, 0);
@@ -100,16 +100,16 @@ int main(int argc, char **argv)
(*img_destroy)(image_data);
free(filedata);
filedata = load_file_inmem("/rd/1/File managers/icons.ini", &read_bytes);
filedata = load_file_inmem("/sys/File managers/icons.ini", &read_bytes);
gui_add_filebrowser(main_window, kolibri_filebrowser(&brows, X_Y(10, 400), X_Y(80, 300), X_Y(6, 9), X_Y(16, 16), image_data_rgb, NULL, 24,
filedata, filedata + read_bytes,
0x00FF00, 0xbbddff, 0x000000, 0xFFFFFF, 0xFF0000));
// try devices "/" - good
brows.folder_data = read_folderdata("/rd/1");
brows.folder_data = read_folderdata("/sys");
brows.select_panel_counter = 1; // if want to show selection
do /* Start of main activity loop */
do /* Start of main activity loop */
{
switch(gui_event)
{
@@ -127,14 +127,14 @@ int main(int argc, char **argv)
//kolibri_handle_event_key(main_window);
break;
case KOLIBRI_EVENT_BUTTON:
pressed_button = get_os_button();
switch (pressed_button)
{
case BTN_QUIT:
return 0;
break;
}
break;
pressed_button = get_os_button();
switch (pressed_button)
{
case BTN_QUIT:
return 0;
break;
}
break;
case KOLIBRI_EVENT_MOUSE:
// mouse_pos = get_mouse_pos(POS_WINDOW); // window relative
// mouse_button = get_mouse_eventstate();
@@ -189,14 +189,14 @@ int main(int argc, char **argv)
brows.all_redraw = 0;
}
break;
break;
}
gui_event = get_os_event();
} while(1) ; /* End of main activity loop */
return 0;
}
} while(1) ; /* End of main activity loop */
return 0;
}
char* load_file_inmem(char* fname, int32_t* read_sz)

View File

@@ -80,7 +80,7 @@ int main(int argc, char **argv)
// load sample file
//int res, len;
//res = editor_openfile(ed, "/rd/1/boardlog.txt", &len);
//res = editor_openfile(ed, "/sys/boardlog.txt", &len);
//debug_board_printf("loaded sample file err=%d, len=%d\n", res, len);
//adding sample text @cursor

View File

@@ -1,49 +1,49 @@
#ifndef KOLIBRI_COLORIALOG_H
#define KOLIBRI_COLORIALOG_H
char cd_com_area_name[] = "FFFFFFFF_color_dialog";
char cd_start_path[] = "/rd/1/colrdial";
typedef struct __attribute__ ((__packed__)) {
unsigned int type;
unsigned int procinfo;
unsigned int com_area_name;
unsigned int com_area;
unsigned int start_path;
unsigned int draw_window;
unsigned int status;
unsigned short x_size;
unsigned short x_start;
unsigned short y_size;
unsigned short y_start;
unsigned int color_type;
unsigned int color;
}color_dialog;
void cd_fake_on_redraw(void) {}
struct open_dialog* kolibri_new_color_dialog(unsigned int type, unsigned short tlx, unsigned short tly, unsigned short x_size, unsigned short y_size)
{
color_dialog *new_colordialog = (color_dialog *)malloc(sizeof(color_dialog));
char *proc_info = (char *)calloc(1024, sizeof(char));
new_colordialog -> type = type;
new_colordialog -> procinfo = proc_info;
new_colordialog -> com_area_name = &cd_com_area_name;
new_colordialog -> com_area = 0;
new_colordialog -> start_path = &cd_start_path;
new_colordialog -> draw_window = &cd_fake_on_redraw;
new_colordialog -> status = 0;
new_colordialog -> x_size = x_size;
new_colordialog -> x_start = tlx;
new_colordialog -> y_size = y_size;
new_colordialog -> y_start = tly;
new_colordialog -> color_type = 0;
new_colordialog -> color = 0;
return new_colordialog;
}
#ifndef KOLIBRI_COLORIALOG_H
#define KOLIBRI_COLORIALOG_H
char cd_com_area_name[] = "FFFFFFFF_color_dialog";
char cd_start_path[] = "/sys/colrdial";
typedef struct __attribute__ ((__packed__)) {
unsigned int type;
unsigned int procinfo;
unsigned int com_area_name;
unsigned int com_area;
unsigned int start_path;
unsigned int draw_window;
unsigned int status;
unsigned short x_size;
unsigned short x_start;
unsigned short y_size;
unsigned short y_start;
unsigned int color_type;
unsigned int color;
}color_dialog;
void cd_fake_on_redraw(void) {}
struct open_dialog* kolibri_new_color_dialog(unsigned int type, unsigned short tlx, unsigned short tly, unsigned short x_size, unsigned short y_size)
{
color_dialog *new_colordialog = (color_dialog *)malloc(sizeof(color_dialog));
char *proc_info = (char *)calloc(1024, sizeof(char));
new_colordialog -> type = type;
new_colordialog -> procinfo = proc_info;
new_colordialog -> com_area_name = &cd_com_area_name;
new_colordialog -> com_area = 0;
new_colordialog -> start_path = &cd_start_path;
new_colordialog -> draw_window = &cd_fake_on_redraw;
new_colordialog -> status = 0;
new_colordialog -> x_size = x_size;
new_colordialog -> x_start = tlx;
new_colordialog -> y_size = y_size;
new_colordialog -> y_start = tly;
new_colordialog -> color_type = 0;
new_colordialog -> color = 0;
return new_colordialog;
}
extern void kolibri_proclib_init() __attribute__((__stdcall__));
extern void (*ColorDialog_init)(color_dialog *) __attribute__((__stdcall__));
extern void (*ColorDialog_start)(color_dialog *) __attribute__((__stdcall__));
#endif /* KOLIBRI_COLORDIALOG_H */
extern void (*ColorDialog_init)(color_dialog *) __attribute__((__stdcall__));
extern void (*ColorDialog_start)(color_dialog *) __attribute__((__stdcall__));
#endif /* KOLIBRI_COLORDIALOG_H */

View File

@@ -208,8 +208,8 @@ static inline filebrowser* kolibri_new_filebrowser(uint32_t x_w, uint32_t y_h, u
inline filebrowser* kolibri_filebrowser_def(filebrowser* fb, uint32_t x_w, uint32_t y_h)
{
// load default icons and icon association
char icons_ini[] = "/rd/1/File managers/icons.ini";
char icons16img[] = "/rd/1/File managers/z_icons.png";
char icons_ini[] = "/sys/File managers/icons.ini";
char icons16img[] = "/sys/File managers/z_icons.png";
return kolibri_filebrowser(fb, x_w, y_h, X_Y(9, 16), X_Y(16, 16), icon_raw_area, icon_palette_raw, icon_res,
ini_file_start, ini_file_end,

View File

@@ -1,74 +1,74 @@
#ifndef KOLIBRI_OPENDIALOG_H
#define KOLIBRI_OPENDIALOG_H
char sz_com_area_name[] = "FFFFFFFF_open_dialog";
char sz_dir_default_path[] = "/rd/1";
char sz_start_path[] = "/rd/1/File managers/opendial";
#ifndef KOLIBRI_OPENDIALOG_H
#define KOLIBRI_OPENDIALOG_H
char sz_com_area_name[] = "FFFFFFFF_open_dialog";
char sz_dir_default_path[] = "/sys";
char sz_start_path[] = "/sys/File managers/opendial";
enum open_dialog_mode {
OPEN,
SAVE,
SELECT
};
typedef struct __attribute__ ((__packed__)) {
unsigned int size;
unsigned char end;
}od_filter;
};
typedef struct __attribute__ ((__packed__)) {
unsigned int size;
unsigned char end;
}od_filter;
typedef struct __attribute__ ((__packed__)) {
unsigned int mode;
char* procinfo;
char* com_area_name;
unsigned int com_area;
char* opendir_path;
char* dir_default_path;
char* start_path;
void (*draw_window)();
unsigned int status;
char* openfile_path;
char* filename_area;
od_filter* filter_area;
unsigned short x_size;
unsigned short x_start;
unsigned short y_size;
unsigned short y_start;
}open_dialog;
void fake_on_redraw(void) {}
open_dialog* kolibri_new_open_dialog(unsigned int mode, unsigned short tlx, unsigned short tly, unsigned short x_size, unsigned short y_size)
{
open_dialog *new_opendialog = (open_dialog *)malloc(sizeof(open_dialog));
od_filter *new_od_filter = (od_filter *)malloc(sizeof(od_filter));
char *plugin_path = (char *)calloc(4096, sizeof(char));
char *openfile_path = (char *)calloc(4096, sizeof(char));
char *proc_info = (char *)calloc(1024, sizeof(char));
char *filename_area = (char *)calloc(256, sizeof(char));
new_od_filter -> size = 0;
new_od_filter -> end = 0;
new_opendialog -> mode = mode;
new_opendialog -> procinfo = proc_info;
new_opendialog -> com_area_name = sz_com_area_name;
new_opendialog -> com_area = 0;
new_opendialog -> opendir_path = plugin_path;
new_opendialog -> dir_default_path = sz_dir_default_path;
new_opendialog -> start_path = sz_start_path;
new_opendialog -> draw_window = &fake_on_redraw;
new_opendialog -> status = 0;
new_opendialog -> openfile_path = openfile_path;
new_opendialog -> filename_area = filename_area;
new_opendialog -> filter_area = new_od_filter;
new_opendialog -> x_size = x_size;
new_opendialog -> x_start = tlx;
new_opendialog -> y_size = y_size;
new_opendialog -> y_start = tly;
return new_opendialog;
}
typedef struct __attribute__ ((__packed__)) {
unsigned int mode;
char* procinfo;
char* com_area_name;
unsigned int com_area;
char* opendir_path;
char* dir_default_path;
char* start_path;
void (*draw_window)();
unsigned int status;
char* openfile_path;
char* filename_area;
od_filter* filter_area;
unsigned short x_size;
unsigned short x_start;
unsigned short y_size;
unsigned short y_start;
}open_dialog;
void fake_on_redraw(void) {}
open_dialog* kolibri_new_open_dialog(unsigned int mode, unsigned short tlx, unsigned short tly, unsigned short x_size, unsigned short y_size)
{
open_dialog *new_opendialog = (open_dialog *)malloc(sizeof(open_dialog));
od_filter *new_od_filter = (od_filter *)malloc(sizeof(od_filter));
char *plugin_path = (char *)calloc(4096, sizeof(char));
char *openfile_path = (char *)calloc(4096, sizeof(char));
char *proc_info = (char *)calloc(1024, sizeof(char));
char *filename_area = (char *)calloc(256, sizeof(char));
new_od_filter -> size = 0;
new_od_filter -> end = 0;
new_opendialog -> mode = mode;
new_opendialog -> procinfo = proc_info;
new_opendialog -> com_area_name = sz_com_area_name;
new_opendialog -> com_area = 0;
new_opendialog -> opendir_path = plugin_path;
new_opendialog -> dir_default_path = sz_dir_default_path;
new_opendialog -> start_path = sz_start_path;
new_opendialog -> draw_window = &fake_on_redraw;
new_opendialog -> status = 0;
new_opendialog -> openfile_path = openfile_path;
new_opendialog -> filename_area = filename_area;
new_opendialog -> filter_area = new_od_filter;
new_opendialog -> x_size = x_size;
new_opendialog -> x_start = tlx;
new_opendialog -> y_size = y_size;
new_opendialog -> y_start = tly;
return new_opendialog;
}
extern void kolibri_proclib_init();
extern void (*OpenDialog_init)(open_dialog *) __attribute__((__stdcall__));
extern void (*OpenDialog_start)(open_dialog *) __attribute__((__stdcall__));
#endif /* KOLIBRI_OPENDIALOG_H */
extern void (*OpenDialog_init)(open_dialog *) __attribute__((__stdcall__));
extern void (*OpenDialog_start)(open_dialog *) __attribute__((__stdcall__));
#endif /* KOLIBRI_OPENDIALOG_H */

View File

@@ -101,12 +101,12 @@ fake_on_redraw:
section '.rdata' align 16
sz_proc_lib db "/rd/1/lib/proc_lib.obj",0
sz_proc_lib db "/sys/lib/proc_lib.obj",0
sz_OpenDialog_init db "OpenDialog_init",0
sz_OpenDialog_start db "OpenDialog_start",0
sz_com_area_name db "FFFFFFFF_open_dialog",0
sz_dir_default_path db "/rd/1",0
sz_start_path db "/rd/1/File managers/opendial",0
sz_dir_default_path db "/sys",0
sz_start_path db "/sys/File managers/opendial",0
section '.data' align 16

View File

@@ -596,12 +596,12 @@ dd filefilter.end - filefilter
sz_proc_lib db "/rd/1/lib/proc_lib.obj",0
sz_proc_lib db "/sys/lib/proc_lib.obj",0
sz_OpenDialog_init db "OpenDialog_init",0
sz_OpenDialog_start db "OpenDialog_start",0
sz_com_area_name db "FFFFFFFF_open_dialog",0
sz_dir_default_path db "/rd/1",0
sz_start_path db "/rd/1/File managers/opendial",0
sz_dir_default_path db "/sys",0
sz_start_path db "/sys/File managers/opendial",0
msg_print db '%s',0x0D,0x0A,0
msg_init_fail db 'Cannot initialize mpg123 library: %s', 0x0D,0x0A,0

View File

@@ -59,7 +59,7 @@ int main(int argc, char *argv[])
::"a"(40), "b"(0xc0000027));
if(argc < 2)
uf = load_file("/RD/1/EXAMPLE.ASM");
uf = load_file("/SYS/EXAMPLE.ASM");
else uf = load_file(argv[1]);
if(uf.data == NULL ||

View File

@@ -31,8 +31,8 @@ int app_main(int argc, char *argv[])
SDL_printf("Couldn't initialize TTF library\n");
exit(-1);
}
fnt=TTF_OpenFont("/RD/1/INDIGO.TTF",50);
fnt1=TTF_OpenFont("/RD/1/HYDROGEN.TTF",35);
fnt=TTF_OpenFont("/SYS/INDIGO.TTF",50);
fnt1=TTF_OpenFont("/SYS/HYDROGEN.TTF",35);
TTF_SetFontStyle(fnt,TTF_STYLE_ITALIC|TTF_STYLE_BOLD|TTF_STYLE_UNDERLINE);
txt=TTF_RenderText_Solid(fnt,"MenuetOS",kolor);
if(!txt)

View File

@@ -98,12 +98,12 @@ fake_on_redraw:
section '.rdata' align 16
sz_proc_lib db "/rd/1/lib/proc_lib.obj",0
sz_proc_lib db "/sys/lib/proc_lib.obj",0
sz_OpenDialog_init db "OpenDialog_init",0
sz_OpenDialog_start db "OpenDialog_start",0
sz_com_area_name db "FFFFFFFF_open_dialog",0
sz_dir_default_path db "/rd/1",0
sz_start_path db "/rd/1/File managers/opendial",0
sz_dir_default_path db "/sys",0
sz_start_path db "/sys/File managers/opendial",0
section '.data' align 16

View File

@@ -596,12 +596,12 @@ dd filefilter.end - filefilter
sz_proc_lib db "/rd/1/lib/proc_lib.obj",0
sz_proc_lib db "/sys/lib/proc_lib.obj",0
sz_OpenDialog_init db "OpenDialog_init",0
sz_OpenDialog_start db "OpenDialog_start",0
sz_com_area_name db "FFFFFFFF_open_dialog",0
sz_dir_default_path db "/rd/1",0
sz_start_path db "/rd/1/File managers/opendial",0
sz_dir_default_path db "/sys",0
sz_start_path db "/sys/File managers/opendial",0
msg_print db '%s',0x0D,0x0A,0
msg_init_fail db 'Cannot initialize mpg123 library: %s', 0x0D,0x0A,0