Index: trunk/config.h.in =================================================================== --- trunk/config.h.in (revision 30995) +++ trunk/config.h.in (revision 30996) @@ -31,10 +31,10 @@ switch sys/class case {win32} print [@ -#define PCB_PREFIX pcb_w32_root -#define PCBSHAREDIR pcb_w32_sharedir -#define PCBLIBDIR pcb_w32_libdir -#define BINDIR pcb_w32_bindir +#define PCB_PREFIX rnd_w32_root +#define PCBSHAREDIR rnd_w32_sharedir +#define PCBLIBDIR rnd_w32_libdir +#define BINDIR rnd_w32_bindir #define PCBCONFDIR @/local/confdir_final@ @] end; Index: trunk/src/build_run.c =================================================================== --- trunk/src/build_run.c (revision 30995) +++ trunk/src/build_run.c (revision 30996) @@ -158,7 +158,7 @@ gds_append_str(&info, "none\n"); gds_append_str(&info, "\n----- Compile Time Options -----\n"); - hids = pcb_hid_enumerate(); + hids = rnd_hid_enumerate(); gds_append_str(&info, "GUI:\n"); for (i = 0; hids[i]; i++) { if (hids[i]->gui) { Index: trunk/src/file_act.c =================================================================== --- trunk/src/file_act.c (revision 30995) +++ trunk/src/file_act.c (revision 30996) @@ -501,7 +501,7 @@ for(n = 1; n < argc; n++) RND_PCB_ACT_CONVARG(n, FGW_STR, Export, args[n-1] = argv[n].val.str); - rnd_exporter = pcb_hid_find_exporter(args[0]); + rnd_exporter = rnd_hid_find_exporter(args[0]); if (rnd_exporter == NULL) { rnd_message(RND_MSG_ERROR, "Export plugin %s not found. Was it enabled in ./configure?\n", args[0]); return 1; Index: trunk/src/librnd/core/compat_fs.c =================================================================== --- trunk/src/librnd/core/compat_fs.c (revision 30995) +++ trunk/src/librnd/core/compat_fs.c (revision 30996) @@ -159,7 +159,7 @@ rand_s(&r1); rand_s(&r2); /* crypto secure according to the API doc */ sprintf(num, "%lu%lu", r1, r2); - tmpdir = pcb_w32_cachedir; + tmpdir = rnd_w32_cachedir; res = pcb_concat(tmpdir, "/", num, NULL); for(c = res; *c; c++) if (*c == '\\') Index: trunk/src/librnd/core/hid_attrib.c =================================================================== --- trunk/src/librnd/core/hid_attrib.c (revision 30995) +++ trunk/src/librnd/core/hid_attrib.c (revision 30996) @@ -77,7 +77,7 @@ } } -int pcb_hid_parse_command_line(int *argc, char ***argv) +int rnd_hid_parse_command_line(int *argc, char ***argv) { rnd_hid_attr_node_t *ha; int i, e, ok; Index: trunk/src/librnd/core/hid_init.c =================================================================== --- trunk/src/librnd/core/hid_init.c (revision 30995) +++ trunk/src/librnd/core/hid_init.c (revision 30996) @@ -61,8 +61,8 @@ #include #include -char *pcbhl_conf_dot_dir = ".librnd"; -char *pcbhl_conf_lib_dir = "/usr/lib/librnd"; +char *rnd_conf_dot_dir = ".librnd"; +char *rnd_conf_lib_dir = "/usr/lib/librnd"; static const char *flt_any[] = {"*", "*.*", NULL}; @@ -71,8 +71,8 @@ { NULL, NULL, NULL } }; -rnd_hid_t **pcb_hid_list = 0; -int pcb_hid_num_hids = 0; +rnd_hid_t **rnd_hid_list = 0; +int rnd_hid_num_hids = 0; rnd_hid_t *rnd_gui = NULL; rnd_hid_t *rnd_render = NULL; @@ -80,9 +80,9 @@ int rnd_pixel_slop = 1; -pcb_plugin_dir_t *pcb_plugin_dir_first = NULL, *pcb_plugin_dir_last = NULL; +rnd_plugin_dir_t *rnd_plugin_dir_first = NULL, *rnd_plugin_dir_last = NULL; -void pcb_hid_init() +void rnd_hid_init() { char *tmp; @@ -99,20 +99,20 @@ free(tmp); /* hardwired libdir, just in case exec-prefix goes wrong (e.g. linstall) */ - tmp = pcb_concat(pcbhl_conf_lib_dir, RND_DIR_SEPARATOR_S, "plugins", RND_DIR_SEPARATOR_S, HOST, NULL); + tmp = pcb_concat(rnd_conf_lib_dir, RND_DIR_SEPARATOR_S, "plugins", RND_DIR_SEPARATOR_S, HOST, NULL); pcb_plugin_add_dir(tmp); free(tmp); - tmp = pcb_concat(pcbhl_conf_lib_dir, RND_DIR_SEPARATOR_S, "plugins", NULL); + tmp = pcb_concat(rnd_conf_lib_dir, RND_DIR_SEPARATOR_S, "plugins", NULL); pcb_plugin_add_dir(tmp); free(tmp); /* pcbhl_conf.rc.path.home is set by the conf_core immediately on startup */ if (pcbhl_conf.rc.path.home != NULL) { - tmp = pcb_concat(pcbhl_conf.rc.path.home, RND_DIR_SEPARATOR_S, pcbhl_conf_dot_dir, RND_DIR_SEPARATOR_S, "plugins", RND_DIR_SEPARATOR_S, HOST, NULL); + tmp = pcb_concat(pcbhl_conf.rc.path.home, RND_DIR_SEPARATOR_S, rnd_conf_dot_dir, RND_DIR_SEPARATOR_S, "plugins", RND_DIR_SEPARATOR_S, HOST, NULL); pcb_plugin_add_dir(tmp); free(tmp); - tmp = pcb_concat(pcbhl_conf.rc.path.home, RND_DIR_SEPARATOR_S, pcbhl_conf_dot_dir, RND_DIR_SEPARATOR_S, "plugins", NULL); + tmp = pcb_concat(pcbhl_conf.rc.path.home, RND_DIR_SEPARATOR_S, rnd_conf_dot_dir, RND_DIR_SEPARATOR_S, "plugins", NULL); pcb_plugin_add_dir(tmp); free(tmp); } @@ -124,35 +124,35 @@ pcb_plugin_add_dir("plugins"); } -void pcb_hid_uninit(void) +void rnd_hid_uninit(void) { - pcb_plugin_dir_t *pd, *next; + rnd_plugin_dir_t *pd, *next; - if (pcb_hid_num_hids > 0) { + if (rnd_hid_num_hids > 0) { int i; - for (i = pcb_hid_num_hids-1; i >= 0; i--) { - if (pcb_hid_list[i]->uninit != NULL) - pcb_hid_list[i]->uninit(pcb_hid_list[i]); + for (i = rnd_hid_num_hids-1; i >= 0; i--) { + if (rnd_hid_list[i]->uninit != NULL) + rnd_hid_list[i]->uninit(rnd_hid_list[i]); } } - free(pcb_hid_list); + free(rnd_hid_list); pup_uninit(&pcb_pup); rnd_export_uninit(); - for(pd = pcb_plugin_dir_first; pd != NULL; pd = next) { + for(pd = rnd_plugin_dir_first; pd != NULL; pd = next) { next = pd->next; free(pd->path); free(pd); } - pcb_plugin_dir_first = pcb_plugin_dir_last = NULL; + rnd_plugin_dir_first = rnd_plugin_dir_last = NULL; } -void pcb_hid_register_hid(rnd_hid_t * hid) +void rnd_hid_register_hid(rnd_hid_t * hid) { int i; - int sz = (pcb_hid_num_hids + 2) * sizeof(rnd_hid_t *); + int sz = (rnd_hid_num_hids + 2) * sizeof(rnd_hid_t *); if (hid->struct_size != sizeof(rnd_hid_t)) { fprintf(stderr, "Warning: hid \"%s\" has an incompatible ABI.\n", hid->name); @@ -159,29 +159,29 @@ return; } - for (i = 0; i < pcb_hid_num_hids; i++) - if (hid == pcb_hid_list[i]) + for (i = 0; i < rnd_hid_num_hids; i++) + if (hid == rnd_hid_list[i]) return; - pcb_hid_num_hids++; - if (pcb_hid_list) - pcb_hid_list = (rnd_hid_t **) realloc(pcb_hid_list, sz); + rnd_hid_num_hids++; + if (rnd_hid_list) + rnd_hid_list = (rnd_hid_t **) realloc(rnd_hid_list, sz); else - pcb_hid_list = (rnd_hid_t **) malloc(sz); + rnd_hid_list = (rnd_hid_t **) malloc(sz); - pcb_hid_list[pcb_hid_num_hids - 1] = hid; - pcb_hid_list[pcb_hid_num_hids] = 0; + rnd_hid_list[rnd_hid_num_hids - 1] = hid; + rnd_hid_list[rnd_hid_num_hids] = 0; } -void pcb_hid_remove_hid(rnd_hid_t * hid) +void rnd_hid_remove_hid(rnd_hid_t * hid) { int i; - for (i = 0; i < pcb_hid_num_hids; i++) { - if (hid == pcb_hid_list[i]) { - pcb_hid_list[i] = pcb_hid_list[pcb_hid_num_hids - 1]; - pcb_hid_list[pcb_hid_num_hids - 1] = 0; - pcb_hid_num_hids--; + for (i = 0; i < rnd_hid_num_hids; i++) { + if (hid == rnd_hid_list[i]) { + rnd_hid_list[i] = rnd_hid_list[rnd_hid_num_hids - 1]; + rnd_hid_list[rnd_hid_num_hids - 1] = 0; + rnd_hid_num_hids--; return; } } @@ -188,7 +188,7 @@ } -rnd_hid_t *pcb_hid_find_gui(const char *preference) +rnd_hid_t *rnd_hid_find_gui(const char *preference) { int i; @@ -196,11 +196,11 @@ if ((preference != NULL) && (strcmp(preference, "gtk") == 0)) { rnd_hid_t *g; - g = pcb_hid_find_gui("gtk2_gl"); + g = rnd_hid_find_gui("gtk2_gl"); if (g != NULL) return g; - g = pcb_hid_find_gui("gtk2_gdk"); + g = rnd_hid_find_gui("gtk2_gdk"); if (g != NULL) return g; @@ -209,27 +209,27 @@ /* normal search */ if (preference != NULL) { - for (i = 0; i < pcb_hid_num_hids; i++) - if (!pcb_hid_list[i]->printer && !pcb_hid_list[i]->exporter && !strcmp(pcb_hid_list[i]->name, preference)) - return pcb_hid_list[i]; + for (i = 0; i < rnd_hid_num_hids; i++) + if (!rnd_hid_list[i]->printer && !rnd_hid_list[i]->exporter && !strcmp(rnd_hid_list[i]->name, preference)) + return rnd_hid_list[i]; return NULL; } - for (i = 0; i < pcb_hid_num_hids; i++) - if (!pcb_hid_list[i]->printer && !pcb_hid_list[i]->exporter) - return pcb_hid_list[i]; + for (i = 0; i < rnd_hid_num_hids; i++) + if (!rnd_hid_list[i]->printer && !rnd_hid_list[i]->exporter) + return rnd_hid_list[i]; fprintf(stderr, "Error: No GUI available.\n"); exit(1); } -rnd_hid_t *pcb_hid_find_printer() +rnd_hid_t *rnd_hid_find_printer() { int i; - for (i = 0; i < pcb_hid_num_hids; i++) - if (pcb_hid_list[i]->printer) - return pcb_hid_list[i]; + for (i = 0; i < rnd_hid_num_hids; i++) + if (rnd_hid_list[i]->printer) + return rnd_hid_list[i]; return 0; } @@ -237,12 +237,12 @@ void pcb_hid_print_exporter_list(FILE *f, const char *prefix, const char *suffix) { int i; - for (i = 0; i < pcb_hid_num_hids; i++) - if (pcb_hid_list[i]->exporter) - fprintf(f, "%s%s%s", prefix, pcb_hid_list[i]->name, suffix); + for (i = 0; i < rnd_hid_num_hids; i++) + if (rnd_hid_list[i]->exporter) + fprintf(f, "%s%s%s", prefix, rnd_hid_list[i]->name, suffix); } -rnd_hid_t *pcb_hid_find_exporter(const char *which) +rnd_hid_t *rnd_hid_find_exporter(const char *which) { int i; @@ -256,9 +256,9 @@ return 0; } - for (i = 0; i < pcb_hid_num_hids; i++) - if (pcb_hid_list[i]->exporter && strcmp(which, pcb_hid_list[i]->name) == 0) - return pcb_hid_list[i]; + for (i = 0; i < rnd_hid_num_hids; i++) + if (rnd_hid_list[i]->exporter && strcmp(which, rnd_hid_list[i]->name) == 0) + return rnd_hid_list[i]; fprintf(stderr, "Invalid exporter %s, available ones:", which); @@ -269,12 +269,12 @@ return 0; } -rnd_hid_t **pcb_hid_enumerate() +rnd_hid_t **rnd_hid_enumerate() { - return pcb_hid_list; + return rnd_hid_list; } -const char *pcb_hid_export_fn(const char *filename) +const char *rnd_hid_export_fn(const char *filename) { if (pcbhl_conf.rc.export_basename) { const char *outfn = strrchr(filename, RND_DIR_SEPARATOR_C); @@ -302,7 +302,7 @@ rnd_conf_force_set_str(pcbhl_conf.rc.path.home, get_homedir()); rnd_conf_ro("rc/path/home"); } -void pcb_hidlib_init1(void (*conf_core_init)(void)) +void rnd_hidlib_init1(void (*conf_core_init)(void)) { pcb_events_init(); rnd_file_loaded_init(); @@ -312,7 +312,7 @@ pcb_hidlib_conf_init(); pcb_hidlib_event_init(); pcb_hid_dlg_init(); - pcb_hid_init(); + rnd_hid_init(); rnd_color_init(); } @@ -326,7 +326,7 @@ extern void rnd_gui_act_init2(void); extern void rnd_main_act_init2(void); -void pcb_hidlib_init2(const pup_buildin_t *buildins, const pup_buildin_t *local_buildins) +void rnd_hidlib_init2(const pup_buildin_t *buildins, const pup_buildin_t *local_buildins) { rnd_actions_init(); @@ -378,7 +378,7 @@ } -void pcb_hidlib_uninit(void) +void rnd_hidlib_uninit(void) { pcb_hidlib_event_uninit(); pcb_hid_dlg_uninit(); @@ -386,7 +386,7 @@ if (rnd_conf_isdirty(RND_CFR_USER)) rnd_conf_save_file(NULL, NULL, NULL, RND_CFR_USER, NULL); - pcb_hid_uninit(); + rnd_hid_uninit(); pcb_events_uninit(); rnd_conf_uninit(); pcb_plugin_uninit(); @@ -395,7 +395,7 @@ } /* parse arguments using the gui; if fails and fallback is enabled, try the next gui */ -int pcb_gui_parse_arguments(int autopick_gui, int *hid_argc, char **hid_argv[]) +int rnd_gui_parse_arguments(int autopick_gui, int *hid_argc, char **hid_argv[]) { rnd_conf_listitem_t *apg = NULL; @@ -439,7 +439,7 @@ apg = rnd_conf_list_next_str(apg, &g, &n); if (apg == NULL) goto ran_out_of_hids; - rnd_render = rnd_gui = pcb_hid_find_gui(g); + rnd_render = rnd_gui = rnd_hid_find_gui(g); } while(rnd_gui == NULL); } return 0; @@ -461,11 +461,11 @@ return 0; } extern int pcb_mkdir_(const char *path, int mode); -char *pcb_w32_root; -char *pcb_w32_libdir, *pcb_w32_bindir, *pcb_w32_sharedir, *pcb_w32_cachedir; +char *rnd_w32_root; +char *rnd_w32_libdir, *rnd_w32_bindir, *rnd_w32_sharedir, *rnd_w32_cachedir; #endif -void pcb_fix_locale_and_env() +void rnd_fix_locale_and_env() { static const char *lcs[] = { "LANG", "LC_NUMERIC", "LC_ALL", NULL }; const char **lc; @@ -499,16 +499,16 @@ if (*s == '\\') *s = '/'; - pcb_w32_bindir = rnd_strdup(exedir); + rnd_w32_bindir = rnd_strdup(exedir); truncdir(exedir); - pcb_w32_root = rnd_strdup(exedir); - pcb_w32_libdir = pcb_concat(exedir, "/lib/pcb-rnd", NULL); - pcb_w32_sharedir = pcb_concat(exedir, "/share/pcb-rnd", NULL); + rnd_w32_root = rnd_strdup(exedir); + rnd_w32_libdir = pcb_concat(exedir, "/lib/pcb-rnd", NULL); + rnd_w32_sharedir = pcb_concat(exedir, "/share/pcb-rnd", NULL); - pcb_w32_cachedir = pcb_concat(pcb_w32_root, "/cache", NULL); - pcb_mkdir_(pcb_w32_cachedir, 0755); + rnd_w32_cachedir = pcb_concat(rnd_w32_root, "/cache", NULL); + pcb_mkdir_(rnd_w32_cachedir, 0755); -/* printf("WIN32 root='%s' libdir='%s' sharedir='%s'\n", pcb_w32_root, pcb_w32_libdir, pcb_w32_sharedir);*/ +/* printf("WIN32 root='%s' libdir='%s' sharedir='%s'\n", rnd_w32_root, rnd_w32_libdir, rnd_w32_sharedir);*/ } #endif } @@ -518,9 +518,9 @@ return ((shrt != NULL) && (strcmp(in, shrt) == 0)) || ((lng != NULL) && (strcmp(in, lng) == 0)); } -void pcbhl_main_args_init(pcbhl_main_args_t *ga, int argc, const char **action_args) +void rnd_main_args_init(rnd_main_args_t *ga, int argc, const char **action_args) { - memset(ga, 0, sizeof(pcbhl_main_args_t)); + memset(ga, 0, sizeof(rnd_main_args_t)); ga->hid_argv_orig = ga->hid_argv = calloc(sizeof(char *), argc); vtp0_init(&ga->plugin_cli_conf); ga->action_args = action_args; @@ -527,13 +527,13 @@ ga->autopick_gui = -1; } -void pcbhl_main_args_uninit(pcbhl_main_args_t *ga) +void rnd_main_args_uninit(rnd_main_args_t *ga) { vtp0_uninit(&ga->plugin_cli_conf); free(ga->hid_argv_orig); } -int pcbhl_main_args_add(pcbhl_main_args_t *ga, char *cmd, char *arg) +int rnd_main_args_add(rnd_main_args_t *ga, char *cmd, char *arg) { const char **cs; char *orig_cmd = cmd; @@ -551,21 +551,21 @@ } if ((strcmp(cmd, "g") == 0) || (strcmp(cmd, "-gui") == 0) || (strcmp(cmd, "-hid") == 0)) { - ga->do_what = DO_GUI; + ga->do_what = RND_DO_GUI; ga->hid_name = arg; return 1; } if ((strcmp(cmd, "x") == 0) || (strcmp(cmd, "-export") == 0)) { - ga->do_what = DO_EXPORT; + ga->do_what = RND_DO_EXPORT; ga->hid_name = arg; return 1; } if ((strcmp(cmd, "p") == 0) || (strcmp(cmd, "-print") == 0)) { - ga->do_what = DO_PRINT; + ga->do_what = RND_DO_PRINT; return 0; } - for(cs = ga->action_args; cs[2] != NULL; cs += PCBHL_ACTION_ARGS_WIDTH) { + for(cs = ga->action_args; cs[2] != NULL; cs += RND_ACTION_ARGS_WIDTH) { if (pcbhl_main_arg_match(cmd, cs[0], cs[1])) { if (ga->main_action == NULL) { ga->main_action = cs[2]; @@ -604,7 +604,7 @@ return 0; } -int pcbhl_main_args_setup1(pcbhl_main_args_t *ga) +int rnd_main_args_setup1(rnd_main_args_t *ga) { int n; /* Now that plugins are already initialized, apply plugin config items */ @@ -619,10 +619,10 @@ /* Export pcb from command line if requested. */ switch(ga->do_what) { - case DO_PRINT: rnd_render = rnd_exporter = rnd_gui = pcb_hid_find_printer(); break; - case DO_EXPORT: rnd_render = rnd_exporter = rnd_gui = pcb_hid_find_exporter(ga->hid_name); break; - case DO_GUI: - rnd_render = rnd_gui = pcb_hid_find_gui(ga->hid_name); + case RND_DO_PRINT: rnd_render = rnd_exporter = rnd_gui = rnd_hid_find_printer(); break; + case RND_DO_EXPORT: rnd_render = rnd_exporter = rnd_gui = rnd_hid_find_exporter(ga->hid_name); break; + case RND_DO_GUI: + rnd_render = rnd_gui = rnd_hid_find_gui(ga->hid_name); if (rnd_gui == NULL) { rnd_message(RND_MSG_ERROR, "Can't find the gui (%s) requested.\n", ga->hid_name); return 1; @@ -634,7 +634,7 @@ rnd_render = rnd_gui = NULL; rnd_conf_loop_list_str(&pcbhl_conf.rc.preferred_gui, i, g, ga->autopick_gui) { - rnd_render = rnd_gui = pcb_hid_find_gui(g); + rnd_render = rnd_gui = rnd_hid_find_gui(g); if (rnd_gui != NULL) break; } @@ -642,7 +642,7 @@ /* try anything */ if (rnd_gui == NULL) { rnd_message(RND_MSG_WARNING, "Warning: can't find any of the preferred GUIs, falling back to anything available...\nYou may want to check if the plugin is loaded, try --dump-plugins and --dump-plugindirs\n"); - rnd_render = rnd_gui = pcb_hid_find_gui(NULL); + rnd_render = rnd_gui = rnd_hid_find_gui(NULL); } } } @@ -654,7 +654,7 @@ return 0; } -int pcbhl_main_args_setup2(pcbhl_main_args_t *ga, int *exitval) +int rnd_main_args_setup2(rnd_main_args_t *ga, int *exitval) { *exitval = 0; @@ -672,7 +672,7 @@ } - if (pcb_gui_parse_arguments(ga->autopick_gui, &ga->hid_argc, &ga->hid_argv) != 0) { + if (rnd_gui_parse_arguments(ga->autopick_gui, &ga->hid_argc, &ga->hid_argv) != 0) { pcbhl_log_print_uninit_errs("Export plugin argument parse error"); return 1; } @@ -680,9 +680,9 @@ return 0; } -int pcbhl_main_exported(pcbhl_main_args_t *ga, rnd_hidlib_t *hidlib, rnd_bool is_empty) +int rnd_main_exported(rnd_main_args_t *ga, rnd_hidlib_t *hidlib, rnd_bool is_empty) { - if (!pcbhl_main_exporting) + if (!rnd_main_exporting) return 0; if (is_empty) @@ -696,7 +696,7 @@ return 1; } -void pcbhl_mainloop_interactive(pcbhl_main_args_t *ga, rnd_hidlib_t *hidlib) +void rnd_mainloop_interactive(rnd_main_args_t *ga, rnd_hidlib_t *hidlib) { if (rnd_gui->set_hidlib != NULL) rnd_gui->set_hidlib(rnd_gui, hidlib); Index: trunk/src/librnd/core/hid_init.h =================================================================== --- trunk/src/librnd/core/hid_init.h (revision 30995) +++ trunk/src/librnd/core/hid_init.h (revision 30996) @@ -28,45 +28,45 @@ * */ -#ifndef PCB_HID_INIT_H -#define PCB_HID_INIT_H +#ifndef RND_HID_INIT_H +#define RND_HID_INIT_H #include #include #include -#define PCBHL_ACTION_ARGS_WIDTH 5 +#define RND_ACTION_ARGS_WIDTH 5 /* NULL terminated list of all static HID structures. Built by - hid_register_hid, used by hid_find_*() and pcb_hid_enumerate(). The + hid_register_hid, used by hid_find_*() and rnd_hid_enumerate(). The order in this list is the same as the order of hid_register_hid calls. */ -extern rnd_hid_t **pcb_hid_list; +extern rnd_hid_t **rnd_hid_list; /* Count of entries in the above. */ -extern int pcb_hid_num_hids; +extern int rnd_hid_num_hids; /* Call this as soon as possible from main(). No other HID calls are valid until this is called. */ -void pcb_hid_init(void); +void rnd_hid_init(void); /* Call this at exit */ -void pcb_hid_uninit(void); +void rnd_hid_uninit(void); /* When PCB runs in interactive mode, this is called to instantiate one GUI HID which happens to be the GUI. This HID is the one that interacts with the mouse and keyboard. */ -rnd_hid_t *pcb_hid_find_gui(const char *preference); +rnd_hid_t *rnd_hid_find_gui(const char *preference); /* Finds the one printer HID and instantiates it. */ -rnd_hid_t *pcb_hid_find_printer(void); +rnd_hid_t *rnd_hid_find_printer(void); /* Finds the indicated exporter HID and instantiates it. */ -rnd_hid_t *pcb_hid_find_exporter(const char *); +rnd_hid_t *rnd_hid_find_exporter(const char *); /* This returns a NULL-terminated array of available HIDs. The only real reason to use this is to locate all the export-style HIDs. */ -rnd_hid_t **pcb_hid_enumerate(void); +rnd_hid_t **rnd_hid_enumerate(void); /* HID internal interfaces. These may ONLY be called from the HID modules, not from the common PCB code. */ @@ -74,28 +74,28 @@ /* A HID may use this if it does not need command line arguments in any special format; for example, the Lesstif HID needs to use the Xt parser, but the Postscript HID can use this function. */ -int pcb_hid_parse_command_line(int *argc, char ***argv); +int rnd_hid_parse_command_line(int *argc, char ***argv); -/* Called by the init funcs, used to set up pcb_hid_list. */ -extern void pcb_hid_register_hid(rnd_hid_t * hid); -void pcb_hid_remove_hid(rnd_hid_t * hid); +/* Called by the init funcs, used to set up rnd_hid_list. */ +extern void rnd_hid_register_hid(rnd_hid_t * hid); +void rnd_hid_remove_hid(rnd_hid_t * hid); -typedef struct pcb_plugin_dir_s pcb_plugin_dir_t; -struct pcb_plugin_dir_s { +typedef struct rnd_plugin_dir_s rnd_plugin_dir_t; +struct rnd_plugin_dir_s { char *path; int num_plugins; - pcb_plugin_dir_t *next; + rnd_plugin_dir_t *next; }; -extern pcb_plugin_dir_t *pcb_plugin_dir_first, *pcb_plugin_dir_last; +extern rnd_plugin_dir_t *rnd_plugin_dir_first, *rnd_plugin_dir_last; /* Safe file name for inclusion in export file comments/headers; if the user requested in the config, this becomes the basename of filename, else it is the full file name */ -const char *pcb_hid_export_fn(const char *filename); +const char *rnd_hid_export_fn(const char *filename); /* Config directories the caller needs to load before the conf system is initialized */ -extern char *pcbhl_conf_dot_dir, *pcbhl_conf_lib_dir; +extern char *rnd_conf_dot_dir, *rnd_conf_lib_dir; /*** main(), initialize ***/ @@ -102,10 +102,10 @@ typedef struct { enum { - DO_SOMETHING, - DO_PRINT, - DO_EXPORT, - DO_GUI + RND_DO_SOMETHING, + RND_DO_PRINT, + RND_DO_EXPORT, + RND_DO_GUI } do_what; int hid_argc; const char *main_action, *main_action_hint; @@ -114,50 +114,50 @@ const char *hid_name; const char **action_args; int autopick_gui; -} pcbhl_main_args_t; +} rnd_main_args_t; /* call this before anything, to switch locale to "C" permanently; also sets up the environment on win32. */ -void pcb_fix_locale_and_env(); +void rnd_fix_locale_and_env(); -void pcb_hidlib_init1(void (*conf_core_init)(void)); /* before CLI argument parsing; conf_core_init should conf_reg() at least the hidlib related nodes */ -void pcb_hidlib_init2(const pup_buildin_t *buildins, const pup_buildin_t *local_buildins); /* after CLI argument parsing */ -void pcb_hidlib_uninit(void); +void rnd_hidlib_init1(void (*conf_core_init)(void)); /* before CLI argument parsing; conf_core_init should conf_reg() at least the hidlib related nodes */ +void rnd_hidlib_init2(const pup_buildin_t *buildins, const pup_buildin_t *local_buildins); /* after CLI argument parsing */ +void rnd_hidlib_uninit(void); /* optional: hidlib aspects of main() */ -void pcbhl_main_args_init(pcbhl_main_args_t *ga, int argc, const char **action_args); -void pcbhl_main_args_uninit(pcbhl_main_args_t *ga); +void rnd_main_args_init(rnd_main_args_t *ga, int argc, const char **action_args); +void rnd_main_args_uninit(rnd_main_args_t *ga); /* Parse the next argument using the next two argv[]s. Returns 0 if arg is not consumed, 1 if consimed. */ -int pcbhl_main_args_add(pcbhl_main_args_t *ga, char *cmd, char *arg); +int rnd_main_args_add(rnd_main_args_t *ga, char *cmd, char *arg); /* returns non-zero on error (the application should exit); exitval is the desired exit value of the executable when setup2 fails. */ -int pcbhl_main_args_setup1(pcbhl_main_args_t *ga); -int pcbhl_main_args_setup2(pcbhl_main_args_t *ga, int *exitval); +int rnd_main_args_setup1(rnd_main_args_t *ga); +int rnd_main_args_setup2(rnd_main_args_t *ga, int *exitval); /* if -x was specified, do the export and return 1 (the caller should exit); else return 0 */ -int pcbhl_main_exported(pcbhl_main_args_t *ga, rnd_hidlib_t *hidlib, rnd_bool is_empty); +int rnd_main_exported(rnd_main_args_t *ga, rnd_hidlib_t *hidlib, rnd_bool is_empty); /* launches the GUI or CLI; after it returns, if rnd_gui is not NULL, the user has selected another GUI to switch to. */ -void pcbhl_mainloop_interactive(pcbhl_main_args_t *ga, rnd_hidlib_t *hidlib); +void rnd_mainloop_interactive(rnd_main_args_t *ga, rnd_hidlib_t *hidlib); /* parse arguments using the gui; if fails and fallback is enabled, try the next gui */ -int pcb_gui_parse_arguments(int autopick_gui, int *hid_argc, char **hid_argv[]); +int rnd_gui_parse_arguments(int autopick_gui, int *hid_argc, char **hid_argv[]); /* true if main() is called for printing or exporting (no interactive HID shall be invoked) */ -#define pcbhl_main_exporting (rnd_gui->printer || rnd_gui->exporter) +#define rnd_main_exporting (rnd_gui->printer || rnd_gui->exporter) #ifdef __WIN32__ -extern char *pcb_w32_root; /* installation prefix; what would be $PREFIX on FHS, e.g. /usr/local */ -extern char *pcb_w32_libdir; /* on FHS this would be $PREFIX/lib*/ -extern char *pcb_w32_bindir; /* on FHS this would be $PREFIX/bin - on win32 this also hosts the dlls */ -extern char *pcb_w32_sharedir; /* on FHS this would be $PREFIX/share */ -extern char *pcb_w32_cachedir; /* where to store cache files, e.g. gdk pixbuf loader cache; persistent, but not part of the distribution */ +extern char *rnd_w32_root; /* installation prefix; what would be $PREFIX on FHS, e.g. /usr/local */ +extern char *rnd_w32_libdir; /* on FHS this would be $PREFIX/lib*/ +extern char *rnd_w32_bindir; /* on FHS this would be $PREFIX/bin - on win32 this also hosts the dlls */ +extern char *rnd_w32_sharedir; /* on FHS this would be $PREFIX/share */ +extern char *rnd_w32_cachedir; /* where to store cache files, e.g. gdk pixbuf loader cache; persistent, but not part of the distribution */ #endif #endif Index: trunk/src/librnd/core/paths.c =================================================================== --- trunk/src/librnd/core/paths.c (revision 30995) +++ trunk/src/librnd/core/paths.c (revision 30996) @@ -145,7 +145,7 @@ #ifdef __WIN32__ if (*template == '@') { - gds_append_str(s, pcb_w32_root); + gds_append_str(s, rnd_w32_root); template++; } #endif @@ -247,7 +247,7 @@ if (cn->val.string[0] != NULL) { if (*cn->val.string[0] == '@') { #ifdef __WIN32__ - gds_append_str(s, pcb_w32_root); + gds_append_str(s, rnd_w32_root); gds_append_str(s, cn->val.string[0]+1); #else gds_append_str(s, cn->val.string[0]); Index: trunk/src/librnd/pcb_compat.h =================================================================== --- trunk/src/librnd/pcb_compat.h (revision 30995) +++ trunk/src/librnd/pcb_compat.h (revision 30996) @@ -880,3 +880,45 @@ #define pcb_dad_unit_change_cb rnd_dad_unit_change_cb #define pcb_dad_unit_init rnd_dad_unit_init #define pcb_dad_unit_uninit rnd_dad_unit_uninit +#define PCBHL_ACTION_ARGS_WIDTH RND_ACTION_ARGS_WIDTH +#define pcb_hid_list rnd_hid_list +#define pcb_hid_num_hids rnd_hid_num_hids +#define pcb_hid_init rnd_hid_init +#define pcb_hid_uninit rnd_hid_uninit +#define pcb_hid_find_gui rnd_hid_find_gui +#define pcb_hid_find_printer rnd_hid_find_printer +#define pcb_hid_find_exporter rnd_hid_find_exporter +#define pcb_hid_enumerate rnd_hid_enumerate +#define pcb_hid_parse_command_line rnd_hid_parse_command_line +#define pcb_hid_remove_hid rnd_hid_remove_hid +#define pcb_plugin_dir_s rnd_plugin_dir_s +#define pcb_plugin_dir_t rnd_plugin_dir_t +#define pcb_plugin_dir_first rnd_plugin_dir_first +#define pcb_plugin_dir_last rnd_plugin_dir_last +#define pcb_hid_export_fn rnd_hid_export_fn +#define pcbhl_conf_dot_dir rnd_conf_dot_dir +#define pcbhl_conf_lib_dir rnd_conf_lib_dir +#define DO_SOMETHING RND_DO_SOMETHING +#define DO_PRINT RND_DO_PRINT +#define DO_EXPORT RND_DO_EXPORT +#define DO_GUI RND_DO_GUI +#define pcbhl_main_args_t rnd_main_args_t +#define pcbhl_main_args_init rnd_main_args_init +#define pcbhl_main_args_uninit rnd_main_args_uninit +#define pcbhl_main_args_add rnd_main_args_add +#define pcbhl_main_args_setup1 rnd_main_args_setup1 +#define pcbhl_main_args_setup2 rnd_main_args_setup2 +#define pcbhl_main_exported rnd_main_exported +#define pcbhl_mainloop_interactive rnd_mainloop_interactive +#define pcb_fix_locale_and_env rnd_fix_locale_and_env +#define pcb_hidlib_init1 rnd_hidlib_init1 +#define pcb_hidlib_init2 rnd_hidlib_init2 +#define pcb_hidlib_uninit rnd_hidlib_uninit +#define pcb_gui_parse_arguments rnd_gui_parse_arguments +#define pcbhl_main_exporting rnd_main_exporting +#define pcb_w32_root rnd_w32_root +#define pcb_w32_libdir rnd_w32_libdir +#define pcb_w32_bindir rnd_w32_bindir +#define pcb_w32_sharedir rnd_w32_sharedir +#define pcb_w32_cachedir rnd_w32_cachedir +#define pcb_hid_register_hid rnd_hid_register_hid Index: trunk/src/main.c =================================================================== --- trunk/src/main.c (revision 30995) +++ trunk/src/main.c (revision 30996) @@ -345,7 +345,7 @@ } PCB = NULL; - pcb_hidlib_uninit(); /* plugin unload */ + rnd_hidlib_uninit(); /* plugin unload */ pcb_funchash_uninit(); rnd_file_loaded_uninit(); @@ -401,17 +401,17 @@ int n; char **sp, *exec_prefix, *command_line_pcb = NULL; - pcbhl_main_args_t ga; + rnd_main_args_t ga; - pcbhl_conf_dot_dir = DOT_PCB_RND; - pcbhl_conf_lib_dir = PCBLIBDIR; + rnd_conf_dot_dir = DOT_PCB_RND; + rnd_conf_lib_dir = PCBLIBDIR; - pcb_fix_locale_and_env(); + rnd_fix_locale_and_env(); exec_prefix = main_path_init(argv[0]); pcb_crosshair_pre_init(); - pcbhl_main_args_init(&ga, argc, pcb_action_args); + rnd_main_args_init(&ga, argc, pcb_action_args); /* init application: - make program name available for error handlers @@ -425,7 +425,7 @@ pcb_minuid_init(); pcb_extobj_init(); - pcb_hidlib_init1(conf_core_init); + rnd_hidlib_init1(conf_core_init); pcb_event_init_app(); rnd_conf_set(RND_CFR_INTERNAL, "rc/path/exec_prefix", -1, exec_prefix, RND_POL_OVERWRITE); free(exec_prefix); @@ -437,12 +437,12 @@ /* process arguments */ for(n = 1; n < argc; n++) { /* optionally: handle extra arguments, not processed by the hidlib, here */ - n += pcbhl_main_args_add(&ga, argv[n], argv[n+1]); + n += rnd_main_args_add(&ga, argv[n], argv[n+1]); } pcb_tool_init(); pcb_tool_logic_init(); - pcb_hidlib_init2(pup_buildins, NULL); + rnd_hidlib_init2(pup_buildins, NULL); pcb_actions_init_pcb_only(); setbuf(stdout, 0); @@ -476,9 +476,9 @@ pup_err_stack_process_str(&pcb_pup, print_pup_err); } - if (pcbhl_main_args_setup1(&ga) != 0) { + if (rnd_main_args_setup1(&ga) != 0) { pcb_main_uninit(); - pcbhl_main_args_uninit(&ga); + rnd_main_args_uninit(&ga); exit(1); } @@ -486,9 +486,9 @@ one is registered (there can be only one GUI). */ pcb_main_init_actions(); - if (pcbhl_main_args_setup2(&ga, &n) != 0) { + if (rnd_main_args_setup2(&ga, &n) != 0) { pcb_main_uninit(); - pcbhl_main_args_uninit(&ga); + rnd_main_args_uninit(&ga); exit(n); } @@ -519,7 +519,7 @@ if (command_line_pcb) { int how = conf_core.rc.silently_create_on_load ? 0x10 : 0; if (pcb_load_pcb(command_line_pcb, NULL, pcb_true, how) != 0) { - if (pcbhl_main_exporting) { + if (rnd_main_exporting) { rnd_message(RND_MSG_ERROR, "Can not load file '%s' (specified on command line) for exporting or printing\n", command_line_pcb); pcbhl_log_print_uninit_errs("Export load error"); exit(1); @@ -545,9 +545,9 @@ rnd_parse_actions(&PCB->hidlib, conf_core.rc.action_string); } - if (pcbhl_main_exported(&ga, &PCB->hidlib, pcb_data_is_empty(PCB->Data))) { + if (rnd_main_exported(&ga, &PCB->hidlib, pcb_data_is_empty(PCB->Data))) { pcb_main_uninit(); - pcbhl_main_args_uninit(&ga); + rnd_main_args_uninit(&ga); exit(0); } @@ -566,9 +566,9 @@ } pcb_tool_select_by_name(&PCB->hidlib, "arrow"); rnd_event(&PCB->hidlib, PCB_EVENT_LIBRARY_CHANGED, NULL); - pcbhl_mainloop_interactive(&ga, &PCB->hidlib); + rnd_mainloop_interactive(&ga, &PCB->hidlib); pcb_main_uninit(); - pcbhl_main_args_uninit(&ga); + rnd_main_args_uninit(&ga); return 0; } Index: trunk/src/main_act.c =================================================================== --- trunk/src/main_act.c (revision 30995) +++ trunk/src/main_act.c (revision 30996) @@ -72,7 +72,7 @@ static int help0(void) { - rnd_hid_t **hl = pcb_hid_enumerate(); + rnd_hid_t **hl = rnd_hid_enumerate(); int i; u("pcb-rnd Printed Circuit Board editing program, http://repo.hu/projects/pcb-rnd"); @@ -91,7 +91,7 @@ extern const int PCB_ACTION_ARGS_WIDTH; static int help_main(void) { const char **cs; - for(cs = pcb_action_args; cs[2] != NULL; cs += PCBHL_ACTION_ARGS_WIDTH) { + for(cs = pcb_action_args; cs[2] != NULL; cs += RND_ACTION_ARGS_WIDTH) { fprintf(stderr, "%s [", Progname); if (cs[0] != NULL) fprintf(stderr, "-%s", cs[0]); @@ -106,7 +106,7 @@ static int help_invoc(void) { - rnd_hid_t **hl = pcb_hid_enumerate(); + rnd_hid_t **hl = rnd_hid_enumerate(); int i; int n_printer = 0, n_gui = 0, n_exporter = 0; @@ -149,7 +149,7 @@ u(""); if (topic != NULL) { - rnd_hid_t **hl = pcb_hid_enumerate(); + rnd_hid_t **hl = rnd_hid_enumerate(); int i; if (strcmp(topic, "invocation") == 0) return help_invoc(); Index: trunk/src_plugins/cam/cam.c =================================================================== --- trunk/src_plugins/cam/cam.c (revision 30995) +++ trunk/src_plugins/cam/cam.c (revision 30996) @@ -316,6 +316,6 @@ export_cam_hid.usage = export_cam_usage; - pcb_hid_register_hid(&export_cam_hid); + rnd_hid_register_hid(&export_cam_hid); return 0; } Index: trunk/src_plugins/cam/cam_compile.c =================================================================== --- trunk/src_plugins/cam/cam_compile.c (revision 30995) +++ trunk/src_plugins/cam/cam_compile.c (revision 30996) @@ -215,7 +215,7 @@ *curr = '\0'; curr++; } - code->op.plugin.exporter = pcb_hid_find_exporter(arg); + code->op.plugin.exporter = rnd_hid_find_exporter(arg); if (code->op.plugin.exporter == NULL) { rnd_message(RND_MSG_ERROR, "cam: can not find export plugin: '%s'\n", arg); return -1; Index: trunk/src_plugins/dialogs/dlg_export.c =================================================================== --- trunk/src_plugins/dialogs/dlg_export.c (revision 30995) +++ trunk/src_plugins/dialogs/dlg_export.c (revision 30996) @@ -149,7 +149,7 @@ if (export_ctx.active) return; /* do not open another */ - hids = pcb_hid_enumerate(); + hids = rnd_hid_enumerate(); for(n = 0, export_ctx.len = 0; hids[n] != NULL; n++) { if (((exporters && hids[n]->exporter) || (printers && hids[n]->printer)) && (!hids[n]->hide_from_gui)) export_ctx.len++; Index: trunk/src_plugins/dialogs/dlg_library_param.c =================================================================== --- trunk/src_plugins/dialogs/dlg_library_param.c (revision 30995) +++ trunk/src_plugins/dialogs/dlg_library_param.c (revision 30996) @@ -554,7 +554,7 @@ #ifdef __WIN32__ { char *s; - cmd = pcb_strdup_printf("%s/sh -c \"%s --help\"", pcb_w32_bindir, l->data.fp.loc_info); + cmd = pcb_strdup_printf("%s/sh -c \"%s --help\"", rnd_w32_bindir, l->data.fp.loc_info); for(s = cmd; *s != '\0'; s++) if (*s == '\\') *s = '/'; Index: trunk/src_plugins/dialogs/dlg_printcalib.c =================================================================== --- trunk/src_plugins/dialogs/dlg_printcalib.c (revision 30995) +++ trunk/src_plugins/dialogs/dlg_printcalib.c (revision 30996) @@ -42,7 +42,7 @@ /* DOC: printcalibrate.html */ fgw_error_t pcb_act_PrintCalibrate(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - rnd_hid_t *printer = pcb_hid_find_printer(); + rnd_hid_t *printer = rnd_hid_find_printer(); if (printer == NULL) { rnd_message(RND_MSG_ERROR, "No printer available\n"); Index: trunk/src_plugins/export_bom/bom.c =================================================================== --- trunk/src_plugins/export_bom/bom.c (revision 30995) +++ trunk/src_plugins/export_bom/bom.c (revision 30996) @@ -255,7 +255,7 @@ static int bom_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { rnd_export_register_opts(bom_options, sizeof(bom_options) / sizeof(bom_options[0]), bom_cookie, 0); - return pcb_hid_parse_command_line(argc, argv); + return rnd_hid_parse_command_line(argc, argv); } rnd_hid_t bom_hid; @@ -286,6 +286,6 @@ bom_hid.usage = bom_usage; - pcb_hid_register_hid(&bom_hid); + rnd_hid_register_hid(&bom_hid); return 0; } Index: trunk/src_plugins/export_dsn/dsn.c =================================================================== --- trunk/src_plugins/export_dsn/dsn.c (revision 30995) +++ trunk/src_plugins/export_dsn/dsn.c (revision 30996) @@ -598,7 +598,7 @@ static int dsn_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { - return pcb_hid_parse_command_line(argc, argv); + return rnd_hid_parse_command_line(argc, argv); } int pplg_check_ver_export_dsn(int ver_needed) { return 0; } @@ -621,7 +621,7 @@ dsn_hid.get_export_options = dsn_get_export_options; dsn_hid.do_export = dsn_do_export; dsn_hid.parse_arguments = dsn_parse_arguments; - pcb_hid_register_hid(&dsn_hid); + rnd_hid_register_hid(&dsn_hid); rnd_export_register_opts(dsn_options, sizeof(dsn_options) / sizeof(dsn_options[0]), dsn_cookie, 0); return 0; Index: trunk/src_plugins/export_dxf/dxf.c =================================================================== --- trunk/src_plugins/export_dxf/dxf.c (revision 30995) +++ trunk/src_plugins/export_dxf/dxf.c (revision 30996) @@ -348,7 +348,7 @@ static int dxf_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { rnd_export_register_opts(dxf_attribute_list, sizeof(dxf_attribute_list) / sizeof(dxf_attribute_list[0]), dxf_cookie, 0); - return pcb_hid_parse_command_line(argc, argv); + return rnd_hid_parse_command_line(argc, argv); } static int dxf_set_layer_group(rnd_hid_t *hid, rnd_layergrp_id_t group, const char *purpose, int purpi, rnd_layer_id_t layer, unsigned int flags, int is_empty, rnd_xform_t **xform) @@ -567,7 +567,7 @@ dxf_hid.usage = dxf_usage; - pcb_hid_register_hid(&dxf_hid); + rnd_hid_register_hid(&dxf_hid); return 0; } Index: trunk/src_plugins/export_excellon/excellon.c =================================================================== --- trunk/src_plugins/export_excellon/excellon.c (revision 30995) +++ trunk/src_plugins/export_excellon/excellon.c (revision 30996) @@ -302,7 +302,7 @@ static int excellon_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { rnd_export_register_opts(excellon_options, NUM_OPTIONS, excellon_cookie, 0); - return pcb_hid_parse_command_line(argc, argv); + return rnd_hid_parse_command_line(argc, argv); } static int excellon_set_layer_group(rnd_hid_t *hid, rnd_layergrp_id_t group, const char *purpose, int purpi, rnd_layer_id_t layer, unsigned int flags, int is_empty, rnd_xform_t **xform) @@ -529,7 +529,7 @@ excellon_hid.set_crosshair = excellon_set_crosshair; excellon_hid.usage = excellon_usage; - pcb_hid_register_hid(&excellon_hid); + rnd_hid_register_hid(&excellon_hid); rnd_event_bind(RND_EVENT_EXPORT_SESSION_BEGIN, exc_session_begin, NULL, excellon_cookie); return 0; Index: trunk/src_plugins/export_fidocadj/fidocadj.c =================================================================== --- trunk/src_plugins/export_fidocadj/fidocadj.c (revision 30995) +++ trunk/src_plugins/export_fidocadj/fidocadj.c (revision 30996) @@ -343,7 +343,7 @@ static int fidocadj_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { rnd_export_register_opts(fidocadj_attribute_list, sizeof(fidocadj_attribute_list) / sizeof(fidocadj_attribute_list[0]), fidocadj_cookie, 0); - return pcb_hid_parse_command_line(argc, argv); + return rnd_hid_parse_command_line(argc, argv); } static int fidocadj_usage(rnd_hid_t *hid, const char *topic) @@ -380,7 +380,7 @@ fidocadj_hid.usage = fidocadj_usage; - pcb_hid_register_hid(&fidocadj_hid); + rnd_hid_register_hid(&fidocadj_hid); return 0; } Index: trunk/src_plugins/export_gcode/gcode.c =================================================================== --- trunk/src_plugins/export_gcode/gcode.c (revision 30995) +++ trunk/src_plugins/export_gcode/gcode.c (revision 30996) @@ -380,7 +380,7 @@ static int gcode_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { rnd_export_register_opts(gcode_attribute_list, sizeof(gcode_attribute_list) / sizeof(gcode_attribute_list[0]), pcb_export_gcode_cookie, 0); - return pcb_hid_parse_command_line(argc, argv); + return rnd_hid_parse_command_line(argc, argv); } @@ -420,7 +420,7 @@ gcode_hid.usage = gcode_usage; - pcb_hid_register_hid(&gcode_hid); + rnd_hid_register_hid(&gcode_hid); return 0; Index: trunk/src_plugins/export_gerber/gerber.c =================================================================== --- trunk/src_plugins/export_gerber/gerber.c (revision 30995) +++ trunk/src_plugins/export_gerber/gerber.c (revision 30996) @@ -422,7 +422,7 @@ static int gerber_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { rnd_export_register_opts(gerber_options, NUM_OPTIONS, gerber_cookie, 0); - return pcb_hid_parse_command_line(argc, argv); + return rnd_hid_parse_command_line(argc, argv); } @@ -1110,7 +1110,7 @@ gerber_hid.set_crosshair = gerber_set_crosshair; gerber_hid.usage = gerber_usage; - pcb_hid_register_hid(&gerber_hid); + rnd_hid_register_hid(&gerber_hid); rnd_event_bind(RND_EVENT_EXPORT_SESSION_BEGIN, gerber_session_begin, NULL, gerber_cookie); Index: trunk/src_plugins/export_ipcd356/ipcd356.c =================================================================== --- trunk/src_plugins/export_ipcd356/ipcd356.c (revision 30995) +++ trunk/src_plugins/export_ipcd356/ipcd356.c (revision 30996) @@ -436,7 +436,7 @@ static int ipcd356_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { - return pcb_hid_parse_command_line(argc, argv); + return rnd_hid_parse_command_line(argc, argv); } static void ipcd356_do_export(rnd_hid_t *hid, rnd_hid_attr_val_t *options) @@ -496,7 +496,7 @@ ipcd356_hid.do_export = ipcd356_do_export; ipcd356_hid.parse_arguments = ipcd356_parse_arguments; - pcb_hid_register_hid(&ipcd356_hid); + rnd_hid_register_hid(&ipcd356_hid); rnd_export_register_opts(ipcd356_options, sizeof(ipcd356_options) / sizeof(ipcd356_options[0]), ipcd356_cookie, 0); return 0; Index: trunk/src_plugins/export_lpr/lpr.c =================================================================== --- trunk/src_plugins/export_lpr/lpr.c (revision 30995) +++ trunk/src_plugins/export_lpr/lpr.c (revision 30996) @@ -97,7 +97,7 @@ { lpr_get_export_options(hid, 0); rnd_export_register_opts(lpr_options, num_lpr_options, lpr_cookie, 0); - return pcb_hid_parse_command_line(argc, argv); + return rnd_hid_parse_command_line(argc, argv); } static void lpr_calibrate(rnd_hid_t *hid, double xval, double yval) @@ -142,7 +142,7 @@ lpr_hid.usage = lpr_usage; - pcb_hid_register_hid(&lpr_hid); + rnd_hid_register_hid(&lpr_hid); return 0; } Index: trunk/src_plugins/export_openems/export_openems.c =================================================================== --- trunk/src_plugins/export_openems/export_openems.c (revision 30995) +++ trunk/src_plugins/export_openems/export_openems.c (revision 30996) @@ -684,7 +684,7 @@ static int openems_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { rnd_export_register_opts(openems_attribute_list, sizeof(openems_attribute_list) / sizeof(openems_attribute_list[0]), openems_cookie, 0); - return pcb_hid_parse_command_line(argc, argv); + return rnd_hid_parse_command_line(argc, argv); } static int openems_set_layer_group(rnd_hid_t *hid, rnd_layergrp_id_t group, const char *purpose, int purpi, rnd_layer_id_t layer, unsigned int flags, int is_empty, rnd_xform_t **xform) @@ -874,7 +874,7 @@ openems_hid.usage = openems_usage; - pcb_hid_register_hid(&openems_hid); + rnd_hid_register_hid(&openems_hid); RND_REGISTER_ACTIONS(openems_action_list, openems_cookie); Index: trunk/src_plugins/export_openscad/export_openscad.c =================================================================== --- trunk/src_plugins/export_openscad/export_openscad.c (revision 30995) +++ trunk/src_plugins/export_openscad/export_openscad.c (revision 30996) @@ -354,7 +354,7 @@ static int openscad_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { rnd_export_register_opts(openscad_attribute_list, sizeof(openscad_attribute_list) / sizeof(openscad_attribute_list[0]), openscad_cookie, 0); - return pcb_hid_parse_command_line(argc, argv); + return rnd_hid_parse_command_line(argc, argv); } @@ -701,7 +701,7 @@ openscad_hid.usage = openscad_usage; - pcb_hid_register_hid(&openscad_hid); + rnd_hid_register_hid(&openscad_hid); RND_REGISTER_ACTIONS(scad_action_list, openscad_cookie) Index: trunk/src_plugins/export_png/png.c =================================================================== --- trunk/src_plugins/export_png/png.c (revision 30995) +++ trunk/src_plugins/export_png/png.c (revision 30996) @@ -794,7 +794,7 @@ static int png_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { rnd_export_register_opts(png_attribute_list, sizeof(png_attribute_list) / sizeof(png_attribute_list[0]), png_cookie, 0); - return pcb_hid_parse_command_line(argc, argv); + return rnd_hid_parse_command_line(argc, argv); } @@ -1443,7 +1443,7 @@ png_hid.usage = png_usage; #ifdef HAVE_SOME_FORMAT - pcb_hid_register_hid(&png_hid); + rnd_hid_register_hid(&png_hid); #endif return 0; } Index: trunk/src_plugins/export_ps/eps.c =================================================================== --- trunk/src_plugins/export_ps/eps.c (revision 30995) +++ trunk/src_plugins/export_ps/eps.c (revision 30996) @@ -291,7 +291,7 @@ in_mono = options[HA_mono].lng; if (f != NULL) - eps_print_header(f, pcb_hid_export_fn(filename)); + eps_print_header(f, rnd_hid_export_fn(filename)); if (as_shown) { /* disable (exporter default) hiding overlay in as_shown */ @@ -360,7 +360,7 @@ static int eps_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { rnd_export_register_opts(eps_attribute_list, sizeof(eps_attribute_list) / sizeof(eps_attribute_list[0]), ps_cookie, 0); - return pcb_hid_parse_command_line(argc, argv); + return rnd_hid_parse_command_line(argc, argv); } static int is_mask; @@ -682,5 +682,5 @@ eps_hid.usage = eps_usage; - pcb_hid_register_hid(&eps_hid); + rnd_hid_register_hid(&eps_hid); } Index: trunk/src_plugins/export_ps/ps.c =================================================================== --- trunk/src_plugins/export_ps/ps.c (revision 30995) +++ trunk/src_plugins/export_ps/ps.c (revision 30996) @@ -381,7 +381,7 @@ * %%Title DCS provides text title for the document that is useful * for printing banner pages. */ - fprintf(f, "%%%%Title: %s\n", pcb_hid_export_fn(PCB->hidlib.filename)); + fprintf(f, "%%%%Title: %s\n", rnd_hid_export_fn(PCB->hidlib.filename)); /* * %%CreationDate DCS indicates the date and time the document was @@ -673,7 +673,7 @@ static int ps_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { rnd_export_register_opts(ps_attribute_list, NUM_OPTIONS, ps_cookie, 0); - return pcb_hid_parse_command_line(argc, argv); + return rnd_hid_parse_command_line(argc, argv); } static void corner(FILE * fh, rnd_coord_t x, rnd_coord_t y, int dx, int dy) @@ -753,7 +753,7 @@ if (group < 0 || group != lastgroup) { if (global.pagecount == 1) { currenttime = time(NULL); - fprintf(global.f, "30 30 moveto (%s) show\n", pcb_hid_export_fn(PCB->hidlib.filename)); + fprintf(global.f, "30 30 moveto (%s) show\n", rnd_hid_export_fn(PCB->hidlib.filename)); fprintf(global.f, "(%d.) tocp\n", global.pagecount); fprintf(global.f, "(Table of Contents \\(This Page\\)) toc\n"); @@ -832,7 +832,7 @@ fprintf(global.f, "/Helvetica findfont 10 scalefont setfont\n"); if (global.legend) { gds_t tmp; - fprintf(global.f, "30 30 moveto (%s) show\n", pcb_hid_export_fn(PCB->hidlib.filename)); + fprintf(global.f, "30 30 moveto (%s) show\n", rnd_hid_export_fn(PCB->hidlib.filename)); gds_init(&tmp); if (PCB->hidlib.name) @@ -1498,7 +1498,7 @@ ps_hid.usage = ps_usage; - pcb_hid_register_hid(&ps_hid); + rnd_hid_register_hid(&ps_hid); hid_eps_init(); return 0; Index: trunk/src_plugins/export_stat/stat.c =================================================================== --- trunk/src_plugins/export_stat/stat.c (revision 30995) +++ trunk/src_plugins/export_stat/stat.c (revision 30996) @@ -374,7 +374,7 @@ static int stat_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { rnd_export_register_opts(stat_attribute_list, sizeof(stat_attribute_list) / sizeof(stat_attribute_list[0]), stat_cookie, 0); - return pcb_hid_parse_command_line(argc, argv); + return rnd_hid_parse_command_line(argc, argv); } static int stat_usage(rnd_hid_t *hid, const char *topic) @@ -418,7 +418,7 @@ stat_attribute_list[HA_first_ver].default_val.str = rnd_strdup(PCB_VERSION); stat_attribute_list[HA_license].default_val.str = rnd_strdup("proprietary/private"); - pcb_hid_register_hid(&stat_hid); + rnd_hid_register_hid(&stat_hid); return 0; } Index: trunk/src_plugins/export_stl/export_stl.c =================================================================== --- trunk/src_plugins/export_stl/export_stl.c (revision 30995) +++ trunk/src_plugins/export_stl/export_stl.c (revision 30996) @@ -228,7 +228,7 @@ static int stl_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { rnd_export_register_opts(stl_attribute_list, sizeof(stl_attribute_list) / sizeof(stl_attribute_list[0]), stl_cookie, 0); - return pcb_hid_parse_command_line(argc, argv); + return rnd_hid_parse_command_line(argc, argv); } @@ -267,7 +267,7 @@ stl_hid.usage = stl_usage; - pcb_hid_register_hid(&stl_hid); + rnd_hid_register_hid(&stl_hid); return 0; } Index: trunk/src_plugins/export_svg/svg.c =================================================================== --- trunk/src_plugins/export_svg/svg.c (revision 30995) +++ trunk/src_plugins/export_svg/svg.c (revision 30996) @@ -380,7 +380,7 @@ static int svg_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { rnd_export_register_opts(svg_attribute_list, sizeof(svg_attribute_list) / sizeof(svg_attribute_list[0]), svg_cookie, 0); - return pcb_hid_parse_command_line(argc, argv); + return rnd_hid_parse_command_line(argc, argv); } static int svg_set_layer_group(rnd_hid_t *hid, rnd_layergrp_id_t group, const char *purpose, int purpi, rnd_layer_id_t layer, unsigned int flags, int is_empty, rnd_xform_t **xform) @@ -925,7 +925,7 @@ svg_hid.usage = svg_usage; - pcb_hid_register_hid(&svg_hid); + rnd_hid_register_hid(&svg_hid); return 0; } Index: trunk/src_plugins/export_test/export_test.c =================================================================== --- trunk/src_plugins/export_test/export_test.c (revision 30995) +++ trunk/src_plugins/export_test/export_test.c (revision 30996) @@ -89,7 +89,7 @@ static int export_test_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { rnd_export_register_opts(export_test_options, sizeof(export_test_options) / sizeof(export_test_options[0]), export_test_cookie, 0); - return pcb_hid_parse_command_line(argc, argv); + return rnd_hid_parse_command_line(argc, argv); } rnd_hid_t export_test_hid; @@ -120,6 +120,6 @@ export_test_hid.usage = export_test_usage; - pcb_hid_register_hid(&export_test_hid); + rnd_hid_register_hid(&export_test_hid); return 0; } Index: trunk/src_plugins/export_vfs_fuse/export_vfs_fuse.c =================================================================== --- trunk/src_plugins/export_vfs_fuse/export_vfs_fuse.c (revision 30995) +++ trunk/src_plugins/export_vfs_fuse/export_vfs_fuse.c (revision 30996) @@ -383,6 +383,6 @@ export_vfs_fuse_hid.usage = export_vfs_fuse_usage; - pcb_hid_register_hid(&export_vfs_fuse_hid); + rnd_hid_register_hid(&export_vfs_fuse_hid); return 0; } Index: trunk/src_plugins/export_vfs_mc/export_vfs_mc.c =================================================================== --- trunk/src_plugins/export_vfs_mc/export_vfs_mc.c (revision 30995) +++ trunk/src_plugins/export_vfs_mc/export_vfs_mc.c (revision 30996) @@ -136,7 +136,7 @@ static int export_vfs_mc_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { rnd_export_register_opts(export_vfs_mc_options, sizeof(export_vfs_mc_options) / sizeof(export_vfs_mc_options[0]), export_vfs_mc_cookie, 0); - return pcb_hid_parse_command_line(argc, argv); + return rnd_hid_parse_command_line(argc, argv); } rnd_hid_t export_vfs_mc_hid; @@ -168,6 +168,6 @@ export_vfs_mc_hid.usage = export_vfs_mc_usage; - pcb_hid_register_hid(&export_vfs_mc_hid); + rnd_hid_register_hid(&export_vfs_mc_hid); return 0; } Index: trunk/src_plugins/export_xy/xy.c =================================================================== --- trunk/src_plugins/export_xy/xy.c (revision 30995) +++ trunk/src_plugins/export_xy/xy.c (revision 30996) @@ -841,7 +841,7 @@ static int xy_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { rnd_export_register_opts(xy_options, sizeof(xy_options) / sizeof(xy_options[0]), xy_cookie, 0); - return pcb_hid_parse_command_line(argc, argv); + return rnd_hid_parse_command_line(argc, argv); } rnd_hid_t xy_hid; @@ -884,7 +884,7 @@ xy_hid.usage = xy_usage; - pcb_hid_register_hid(&xy_hid); + rnd_hid_register_hid(&xy_hid); vts0_init(&fmt_names); vts0_init(&fmt_ids); Index: trunk/src_plugins/fp_fs/fp_fs.c =================================================================== --- trunk/src_plugins/fp_fs/fp_fs.c (revision 30995) +++ trunk/src_plugins/fp_fs/fp_fs.c (revision 30996) @@ -403,8 +403,8 @@ #ifdef __WIN32__ { char *s; - cmd = malloc(strlen(pcb_w32_bindir) + strlen(libshell) + strlen(fullname) + strlen(params) + 32); - sprintf(cmd, "%s/sh -c \"%s%s%s %s\"", pcb_w32_bindir, libshell, sep, fullname, params); + cmd = malloc(strlen(rnd_w32_bindir) + strlen(libshell) + strlen(fullname) + strlen(params) + 32); + sprintf(cmd, "%s/sh -c \"%s%s%s %s\"", rnd_w32_bindir, libshell, sep, fullname, params); for(s = cmd; *s != '\0'; s++) if (*s == '\\') *s = '/'; Index: trunk/src_plugins/hid_batch/batch.c =================================================================== --- trunk/src_plugins/hid_batch/batch.c (revision 30995) +++ trunk/src_plugins/hid_batch/batch.c (revision 30996) @@ -158,7 +158,7 @@ static int batch_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { - return pcb_hid_parse_command_line(argc, argv); + return rnd_hid_parse_command_line(argc, argv); } static void batch_invalidate_lr(rnd_hid_t *hid, rnd_coord_t l, rnd_coord_t r, rnd_coord_t t, rnd_coord_t b) @@ -393,7 +393,7 @@ rnd_event_bind(RND_EVENT_BOARD_CHANGED, ev_pcb_changed, NULL, batch_cookie); rnd_event_bind(RND_EVENT_LOG_APPEND, ev_log_append, NULL, batch_cookie); - pcb_hid_register_hid(&batch_hid); + rnd_hid_register_hid(&batch_hid); return 0; } Index: trunk/src_plugins/hid_gtk2_gdk/gtkhid-main.c =================================================================== --- trunk/src_plugins/hid_gtk2_gdk/gtkhid-main.c (revision 30995) +++ trunk/src_plugins/hid_gtk2_gdk/gtkhid-main.c (revision 30996) @@ -39,7 +39,7 @@ gtk2_gdk_hid.name = "gtk2_gdk"; gtk2_gdk_hid.description = "Gtk2 - The Gimp Toolkit, with GDK software pixmap rendering"; - pcb_hid_register_hid(>k2_gdk_hid); + rnd_hid_register_hid(>k2_gdk_hid); return 0; } Index: trunk/src_plugins/hid_gtk2_gl/gtkhid-main.c =================================================================== --- trunk/src_plugins/hid_gtk2_gl/gtkhid-main.c (revision 30995) +++ trunk/src_plugins/hid_gtk2_gl/gtkhid-main.c (revision 30996) @@ -45,7 +45,7 @@ gtk2_gl_hid.name = "gtk2_gl"; gtk2_gl_hid.description = "Gtk2 - The Gimp Toolkit, with opengl rendering"; - pcb_hid_register_hid(>k2_gl_hid); + rnd_hid_register_hid(>k2_gl_hid); return 0; } Index: trunk/src_plugins/hid_lesstif/main.c =================================================================== --- trunk/src_plugins/hid_lesstif/main.c (revision 30995) +++ trunk/src_plugins/hid_lesstif/main.c (revision 30996) @@ -1857,7 +1857,7 @@ } } - pcb_hid_parse_command_line(argc, argv); + rnd_hid_parse_command_line(argc, argv); /* redefine lesstif_colormap, if requested via "-install" */ if (use_private_colormap) { @@ -3048,7 +3048,7 @@ rnd_event_bind(PCB_EVENT_NETLIST_CHANGED, LesstifNetlistChanged, NULL, lesstif_cookie); rnd_event_bind(PCB_EVENT_LIBRARY_CHANGED, LesstifLibraryChanged, NULL, lesstif_cookie); - pcb_hid_register_hid(&lesstif_hid); + rnd_hid_register_hid(&lesstif_hid); if (lesstif_conf_id < 0) lesstif_conf_id = rnd_conf_hid_reg(lesstif_cookie, &ccb); /* lesstif_conf_regs(lesstif_cookie);*/ Index: trunk/src_plugins/hid_remote/remote.c =================================================================== --- trunk/src_plugins/hid_remote/remote.c (revision 30995) +++ trunk/src_plugins/hid_remote/remote.c (revision 30996) @@ -120,7 +120,7 @@ static int remote_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { - return pcb_hid_parse_command_line(argc, argv); + return rnd_hid_parse_command_line(argc, argv); } static void remote_invalidate_lr(rnd_hid_t *hid, rnd_coord_t l, rnd_coord_t r, rnd_coord_t t, rnd_coord_t b) @@ -443,7 +443,7 @@ /* RND_REGISTER_ACTIONS(remote_action_list, remote_cookie)*/ - pcb_hid_register_hid(&remote_hid); + rnd_hid_register_hid(&remote_hid); rnd_event_bind(RND_EVENT_BOARD_CHANGED, ev_pcb_changed, NULL, remote_cookie); Index: trunk/src_plugins/io_tedax/tetest.c =================================================================== --- trunk/src_plugins/io_tedax/tetest.c (revision 30995) +++ trunk/src_plugins/io_tedax/tetest.c (revision 30996) @@ -238,7 +238,7 @@ static int tedax_etest_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { rnd_export_register_opts(tedax_etest_options, sizeof(tedax_etest_options) / sizeof(tedax_etest_options[0]), tedax_etest_cookie, 0); - return pcb_hid_parse_command_line(argc, argv); + return rnd_hid_parse_command_line(argc, argv); } static rnd_hid_t exp_tedax_etest; @@ -265,5 +265,5 @@ exp_tedax_etest.usage = tedax_etest_usage; - pcb_hid_register_hid(&exp_tedax_etest); + rnd_hid_register_hid(&exp_tedax_etest); } Index: trunk/src_plugins/lib_gtk_common/glue_common.c =================================================================== --- trunk/src_plugins/lib_gtk_common/glue_common.c (revision 30995) +++ trunk/src_plugins/lib_gtk_common/glue_common.c (revision 30996) @@ -53,7 +53,7 @@ { char *cache, *cmd, *s; /* set up gdk pixmap modules - without this XPMs won't be loaded */ - cache = pcb_concat(pcb_w32_cachedir, "\\gdk-pixmap-loaders.cache", NULL); + cache = pcb_concat(rnd_w32_cachedir, "\\gdk-pixmap-loaders.cache", NULL); rnd_setenv("GDK_PIXBUF_MODULE_FILE", cache, 1); for(s = cache; *s != '\0'; s++) @@ -60,7 +60,7 @@ if (*s == '\\') *s = '/'; if (!rnd_file_readable(cache)) { - cmd = pcb_concat(pcb_w32_bindir, "\\gdk-pixbuf-query-loaders --update-cache", NULL); + cmd = pcb_concat(rnd_w32_bindir, "\\gdk-pixbuf-query-loaders --update-cache", NULL); fprintf(stderr, "pcb-rnd: updating gdk loader cache: '%s'...\n", cache); system(cmd); free(cmd); Index: trunk/src_plugins/loghid/loghid.c =================================================================== --- trunk/src_plugins/loghid/loghid.c (revision 30995) +++ trunk/src_plugins/loghid/loghid.c (revision 30996) @@ -61,16 +61,16 @@ const char *target_name; rnd_export_register_opts(loghid_attribute_list, NUM_OPTIONS, loghid_cookie, 0); - pcb_hid_parse_command_line(argc, argv); + rnd_hid_parse_command_line(argc, argv); target_name = loghid_attribute_list[HA_target_hid].default_val.str; if (is_gui) { - target = pcb_hid_find_gui(target_name); + target = rnd_hid_find_gui(target_name); me = &loghid_gui; } else { - target = pcb_hid_find_exporter(target_name); + target = rnd_hid_find_exporter(target_name); me = &loghid_exp; } @@ -133,7 +133,7 @@ loghid_gui.usage = loghid_usage; loghid_gui.parse_arguments = loghid_parse_arguments_gui; - pcb_hid_register_hid(&loghid_gui); + rnd_hid_register_hid(&loghid_gui); /* export version */ loghid_exp.struct_size = sizeof(rnd_hid_t); @@ -145,7 +145,7 @@ loghid_exp.usage = loghid_usage; loghid_exp.parse_arguments = loghid_parse_arguments_exp; - pcb_hid_register_hid(&loghid_exp); + rnd_hid_register_hid(&loghid_exp); return 0; } Index: trunk/tests/librnd/librnd_test.c =================================================================== --- trunk/tests/librnd/librnd_test.c (revision 30995) +++ trunk/tests/librnd/librnd_test.c (revision 30996) @@ -22,39 +22,39 @@ int main(int argc, char *argv[]) { int n; - pcbhl_main_args_t ga; + rnd_main_args_t ga; - pcb_fix_locale_and_env(); + rnd_fix_locale_and_env(); - pcbhl_main_args_init(&ga, argc, action_args); + rnd_main_args_init(&ga, argc, action_args); - pcb_hidlib_init1(conf_core_init); + rnd_hidlib_init1(conf_core_init); for(n = 1; n < argc; n++) - n += pcbhl_main_args_add(&ga, argv[n], argv[n+1]); - pcb_hidlib_init2(pup_buildins, local_buildins); + n += rnd_main_args_add(&ga, argv[n], argv[n+1]); + rnd_hidlib_init2(pup_buildins, local_buildins); rnd_conf_set(RND_CFR_CLI, "editor/view/flip_y", 0, "1", RND_POL_OVERWRITE); - if (pcbhl_main_args_setup1(&ga) != 0) { + if (rnd_main_args_setup1(&ga) != 0) { fprintf(stderr, "setup1 fail\n"); - pcbhl_main_args_uninit(&ga); + rnd_main_args_uninit(&ga); exit(1); } - if (pcbhl_main_args_setup2(&ga, &n) != 0) { + if (rnd_main_args_setup2(&ga, &n) != 0) { fprintf(stderr, "setup2 fail\n"); - pcbhl_main_args_uninit(&ga); + rnd_main_args_uninit(&ga); exit(n); } - if (pcbhl_main_exported(&ga, &CTX.hidlib, 0)) { + if (rnd_main_exported(&ga, &CTX.hidlib, 0)) { fprintf(stderr, "main_exported fail\n"); - pcbhl_main_args_uninit(&ga); + rnd_main_args_uninit(&ga); exit(1); } poly_test(); - pcbhl_main_args_uninit(&ga); + rnd_main_args_uninit(&ga); exit(0); }