Index: trunk/src/main.c =================================================================== --- trunk/src/main.c (revision 34756) +++ trunk/src/main.c (revision 34757) @@ -86,8 +86,8 @@ #include "buildin.c" #undef pup_buildins -const char *rnd_menu_file_paths[4]; -const char *rnd_menu_name_fmt = "pcb-menu-%s.lht"; +static const char *menu_file_paths[4]; +static const char *menu_name_fmt = "pcb-menu-%s.lht"; #define CONF_USER_DIR "~/" DOT_PCB_RND const char *rnd_conf_userdir_path, *rnd_conf_user_path; @@ -201,10 +201,10 @@ if (se != 0) fprintf(stderr, "WARNING: setenv() failed - external commands such as parametric footprints may not have a proper environment\n"); - rnd_menu_file_paths[0] = "./"; - rnd_menu_file_paths[1] = "~/.pcb-rnd/"; - rnd_menu_file_paths[2] = rnd_concat(PCBCONFDIR, "/", NULL); - rnd_menu_file_paths[3] = NULL; + menu_file_paths[0] = "./"; + menu_file_paths[1] = "~/.pcb-rnd/"; + menu_file_paths[2] = rnd_concat(PCBCONFDIR, "/", NULL); + menu_file_paths[3] = NULL; rnd_conf_userdir_path = CONF_USER_DIR; rnd_conf_user_path = rnd_concat(CONF_USER_DIR, "/pcb-conf.lht", NULL); @@ -218,7 +218,7 @@ static void main_path_uninit(void) { /* const for all other parts of the code, but we had to concat (alloc) it above */ - free((char *)rnd_menu_file_paths[2]); + free((char *)menu_file_paths[2]); free((char *)rnd_conf_user_path); free((char *)rnd_conf_sys_path); } @@ -409,6 +409,8 @@ {"F_END", F_END} }; +extern const char *rnd_hidlib_default_embedded_menu; + int main(int argc, char *argv[]) { int n; @@ -416,6 +418,10 @@ rnd_main_args_t ga; + rnd_app.menu_file_paths = menu_file_paths; + rnd_app.menu_name_fmt = menu_name_fmt; + rnd_app.default_embedded_menu = rnd_hidlib_default_embedded_menu; + rnd_conf_dot_dir = DOT_PCB_RND; rnd_conf_lib_dir = PCBLIBDIR; Index: trunk/util/gsch2pcb-rnd/glue.c =================================================================== --- trunk/util/gsch2pcb-rnd/glue.c (revision 34756) +++ trunk/util/gsch2pcb-rnd/glue.c (revision 34757) @@ -30,11 +30,6 @@ /* glue for pcb-rnd core */ -const char *rnd_menu_file_paths[4]; -const char *rnd_menu_name_fmt = "pcb-menu-%s.lht"; - -const char *rnd_hidlib_default_embedded_menu = ""; - void rnd_hidlib_crosshair_move_to(rnd_hidlib_t *hl, rnd_coord_t abs_x, rnd_coord_t abs_y, int mouse_mot) { } Index: trunk/util/gsch2pcb-rnd/gsch2pcb.c =================================================================== --- trunk/util/gsch2pcb-rnd/gsch2pcb.c (revision 34756) +++ trunk/util/gsch2pcb-rnd/gsch2pcb.c (revision 34757) @@ -397,10 +397,6 @@ rnd_conf_user_path = rnd_concat(CONF_USER_DIR, "/pcb-conf.lht", NULL); rnd_conf_sysdir_path = PCBCONFDIR; rnd_conf_sys_path = rnd_concat(PCBCONFDIR, "/pcb-conf.lht", NULL); - rnd_menu_file_paths[0] = "./"; - rnd_menu_file_paths[1] = "~/.pcb-rnd/"; - rnd_menu_file_paths[2] = rnd_concat(PCBCONFDIR, "/", NULL); - rnd_menu_file_paths[3] = NULL; rnd_hidlib_init1(gsch2pcb_conf_core_init);