Index: trunk/scconfig/Rev.h =================================================================== --- trunk/scconfig/Rev.h (revision 31016) +++ trunk/scconfig/Rev.h (revision 31017) @@ -1 +1 @@ -static const int myrev = 31012; +static const int myrev = 31017; Index: trunk/scconfig/Rev.tab =================================================================== --- trunk/scconfig/Rev.tab (revision 31016) +++ trunk/scconfig/Rev.tab (revision 31017) @@ -1,4 +1,4 @@ -31012 configure pcb_ -> rnd_ renames in librnd +31017 configure pcb_ -> rnd_ renames in librnd 30779 configure remove distaligntext - all cases handled by distalign properly 30754 configure remove the old import_sch plugin (in favor of import_sch2) 30753 configure disable the old drc, enable the new drc Index: trunk/src/board.c =================================================================== --- trunk/src/board.c (revision 31016) +++ trunk/src/board.c (revision 31017) @@ -124,7 +124,7 @@ const char *tmp_fn = ".pcb-rnd.default.pcb"; /* We can parse from file only, make a temp file */ - f = pcb_fopen_fn(NULL, tmp_fn, "wb", &efn); + f = rnd_fopen_fn(NULL, tmp_fn, "wb", &efn); if (f != NULL) { fwrite(default_pcb_internal, strlen(default_pcb_internal), 1, f); fclose(f); @@ -133,7 +133,7 @@ rnd_message(RND_MSG_WARNING, "Couldn't find default.pcb - using the embedded fallback\n"); else rnd_message(RND_MSG_ERROR, "Couldn't find default.pcb and failed to load the embedded fallback\n"); - pcb_remove(NULL, efn); + rnd_remove(NULL, efn); free(efn); } } Index: trunk/src/buffer.c =================================================================== --- trunk/src/buffer.c (revision 31016) +++ trunk/src/buffer.c (revision 31017) @@ -1076,7 +1076,7 @@ { FILE *exist; - if ((!force) && ((exist = pcb_fopen(RND_ACT_HIDLIB, name, "r")))) { + if ((!force) && ((exist = rnd_fopen(RND_ACT_HIDLIB, name, "r")))) { fclose(exist); if (rnd_hid_message_box(RND_ACT_HIDLIB, "warning", "Buffer: overwrite file", "File exists! Ok to overwrite?", "cancel", 0, "yes", 1, NULL) == 1) pcb_save_buffer(name, fmt); Index: trunk/src/file_act.c =================================================================== --- trunk/src/file_act.c (revision 31016) +++ trunk/src/file_act.c (revision 31017) @@ -382,7 +382,7 @@ else name = rnd_strdup(fn); - f = pcb_fopen(RND_ACT_HIDLIB, name, "w"); + f = rnd_fopen(RND_ACT_HIDLIB, name, "w"); if (f == NULL) { rnd_message(RND_MSG_ERROR, "Failed to open %s for write\n", name); free(name); @@ -439,7 +439,7 @@ FILE *f; char *fullname = rnd_strdup_printf("%s.%ld%s%s", name, (long)sit.count, sep, ending); - f = pcb_fopen(RND_ACT_HIDLIB, fullname, "w"); + f = rnd_fopen(RND_ACT_HIDLIB, fullname, "w"); free(fullname); if (f != NULL) { if (p->write_subcs_head(p, &udata, f, 0, 1) == 0) { Index: trunk/src/librnd/config.h.in =================================================================== --- trunk/src/librnd/config.h.in (revision 31016) +++ trunk/src/librnd/config.h.in (revision 31017) @@ -218,11 +218,11 @@ # undef snprintf # undef round # undef strcasecmp -# define strdup never_use_strdup__use_pcb_strdup -# define strndup never_use_strndup__use_pcb_strndup -# define snprintf never_use_snprintf__use_pcb_snprintf -# define round never_use_round__use_pcb_round -# define strcasecmp never_use_strcasecmp__use_pcb_strcasecmp +# define strdup never_use_strdup__use_rnd_strdup +# define strndup never_use_strndup__use_rnd_strndup +# define snprintf never_use_snprintf__use_rnd_snprintf +# define round never_use_round__use_rnd_round +# define strcasecmp never_use_strcasecmp__use_rnd_strcasecmp # ifndef PCB_SAFE_FS # undef fopen # undef popen @@ -229,17 +229,17 @@ # undef system # undef remove # undef rename -# define fopen never_use_fopen__use_pcb_fopen -# define popen never_use_popen__use_pcb_popen -# define system never_use_system__use_pcb_system -# define remove never_use_remove__use_pcb_remove -# define rename never_use_rename__use_pcb_rename -# define mkdir never_use_mkdir__use_pcb_mkdir -# define unlink never_use_unlink__use_pcb_unlink -# define opendir never_use_opendir__use_pcb_opendir -# define readdir never_use_readdir__use_pcb_readdir -# define closedir never_use_closedir__use_pcb_closedir -# define access never_use_access__use_pcb_file_readable +# define fopen never_use_fopen__use_rnd_fopen +# define popen never_use_popen__use_rnd_popen +# define system never_use_system__use_rnd_system +# define remove never_use_remove__use_rnd_remove +# define rename never_use_rename__use_rnd_rename +# define mkdir never_use_mkdir__use_rnd_mkdir +# define unlink never_use_unlink__use_rnd_unlink +# define opendir never_use_opendir__use_rnd_opendir +# define readdir never_use_readdir__use_rnd_readdir +# define closedir never_use_closedir__use_rnd_closedir +# define access never_use_access__use_rnd_file_readable # endif #endif Index: trunk/src/librnd/core/actions.c =================================================================== --- trunk/src/librnd/core/actions.c (revision 31016) +++ trunk/src/librnd/core/actions.c (revision 31017) @@ -896,7 +896,7 @@ char *s, line[4096]; int res = 0; - f = pcb_fopen(hidlib, fn, "r"); + f = rnd_fopen(hidlib, fn, "r"); if (f == NULL) { rnd_message(RND_MSG_ERROR, "rnd_act_execute_file(): Could not open actions file \"%s\".\n", fn); return 1; Index: trunk/src/librnd/core/compat_fs.c =================================================================== --- trunk/src/librnd/core/compat_fs.c (revision 31016) +++ trunk/src/librnd/core/compat_fs.c (revision 31017) @@ -90,7 +90,7 @@ int rnd_file_readable(const char *path) { FILE *f; - f = pcb_fopen(NULL, path, "r"); + f = rnd_fopen(NULL, path, "r"); if (f != NULL) { fclose(f); return 1; Index: trunk/src/librnd/core/conf.c =================================================================== --- trunk/src/librnd/core/conf.c (revision 31016) +++ trunk/src/librnd/core/conf.c (revision 31017) @@ -189,7 +189,7 @@ FILE *f; char *efn; - f = pcb_fopen_fn(NULL, fn, "r", &efn); + f = rnd_fopen_fn(NULL, fn, "r", &efn); if (f != NULL) { /* warn only if the file is there - missing file is normal */ rnd_message(RND_MSG_ERROR, "error: failed to load lht config: %s (%s)\n", fn, efn); fclose(f); @@ -491,7 +491,7 @@ check:; *try = res; - f = pcb_fopen_fn(NULL, res, "r", &efn); + f = rnd_fopen_fn(NULL, res, "r", &efn); if (f != NULL) { fclose(f); strncpy(res, efn, sizeof(res)-1); @@ -1908,7 +1908,7 @@ if (r != NULL) { FILE *f; - f = pcb_fopen_fn(hidlib, fn, "w", &efn); + f = rnd_fopen_fn(hidlib, fn, "w", &efn); if ((f == NULL) && (role == RND_CFR_USER)) { /* create the directory and try again */ char *path = NULL, *end; @@ -1927,10 +1927,10 @@ end = strrchr(path, '/'); if (end != NULL) { *end = '\0'; - if (pcb_mkdir(NULL, path, 0755) == 0) { + if (rnd_mkdir(NULL, path, 0755) == 0) { rnd_message(RND_MSG_INFO, "Created directory %s for saving %s\n", path, fn); *end = '/'; - f = pcb_fopen(hidlib, path, "w"); + f = rnd_fopen(hidlib, path, "w"); } else rnd_message(RND_MSG_ERROR, "Error: failed to create directory %s for saving %s\n", path, efn); @@ -1962,7 +1962,7 @@ if (at == NULL) return -1; - f = pcb_fopen(hidlib, fn, "w"); + f = rnd_fopen(hidlib, fn, "w"); if (f == NULL) return -1; Index: trunk/src/librnd/core/error.c =================================================================== --- trunk/src/librnd/core/error.c (revision 31016) +++ trunk/src/librnd/core/error.c (revision 31017) @@ -166,7 +166,7 @@ FILE *f; rnd_logline_t *n; - f = pcb_fopen(hidlib, fn, "w"); + f = rnd_fopen(hidlib, fn, "w"); if (f == NULL) return -1; Index: trunk/src/librnd/core/hid_cfg.c =================================================================== --- trunk/src/librnd/core/hid_cfg.c (revision 31016) +++ trunk/src/librnd/core/hid_cfg.c (revision 31017) @@ -59,7 +59,7 @@ lht_doc_t *doc; int error = 0; - f = pcb_fopen(hidlib, filename, "r"); + f = rnd_fopen(hidlib, filename, "r"); if (f == NULL) return NULL; Index: trunk/src/librnd/core/safe_fs.c =================================================================== --- trunk/src/librnd/core/safe_fs.c (revision 31016) +++ trunk/src/librnd/core/safe_fs.c (revision 31017) @@ -62,7 +62,7 @@ } \ } while(0) -FILE *pcb_fopen_fn(rnd_hidlib_t *hidlib, const char *path, const char *mode, char **fn_out) +FILE *rnd_fopen_fn(rnd_hidlib_t *hidlib, const char *path, const char *mode, char **fn_out) { FILE *f; char *path_exp; @@ -99,12 +99,12 @@ return NULL; } -FILE *pcb_fopen(rnd_hidlib_t *hidlib, const char *path, const char *mode) +FILE *rnd_fopen(rnd_hidlib_t *hidlib, const char *path, const char *mode) { - return pcb_fopen_fn(hidlib, path, mode, NULL); + return rnd_fopen_fn(hidlib, path, mode, NULL); } -FILE *pcb_fopen_askovr(rnd_hidlib_t *hidlib, const char *path, const char *mode, int *all) +FILE *rnd_fopen_askovr(rnd_hidlib_t *hidlib, const char *path, const char *mode, int *all) { if (hidlib->batch_ask_ovr != NULL) all = hidlib->batch_ask_ovr; @@ -113,7 +113,7 @@ /* if the action does not exist, use the old behavor: just overwrite anything */ if (fun != NULL) { - FILE *f = pcb_fopen(hidlib, path, "r"); + FILE *f = rnd_fopen(hidlib, path, "r"); if (f != NULL) { int res = 0; fclose(f); @@ -139,10 +139,10 @@ } } } - return pcb_fopen(hidlib, path, mode); + return rnd_fopen(hidlib, path, mode); } -int *pcb_batched_ask_ovr_init(rnd_hidlib_t *hidlib, int *storage) +int *rnd_batched_ask_ovr_init(rnd_hidlib_t *hidlib, int *storage) { int *old = hidlib->batch_ask_ovr; if (hidlib->batch_ask_ovr != NULL) @@ -151,7 +151,7 @@ return old; } -void pcb_batched_ask_ovr_uninit(rnd_hidlib_t *hidlib, int *init_retval) +void rnd_batched_ask_ovr_uninit(rnd_hidlib_t *hidlib, int *init_retval) { if (init_retval != NULL) *init_retval = *hidlib->batch_ask_ovr; @@ -158,7 +158,7 @@ hidlib->batch_ask_ovr = init_retval; } -char *pcb_fopen_check(rnd_hidlib_t *hidlib, const char *path, const char *mode) +char *rnd_fopen_check(rnd_hidlib_t *hidlib, const char *path, const char *mode) { char *path_exp = rnd_build_fn(hidlib, path); @@ -171,7 +171,7 @@ return NULL; } -FILE *pcb_popen(rnd_hidlib_t *hidlib, const char *cmd, const char *mode) +FILE *rnd_popen(rnd_hidlib_t *hidlib, const char *cmd, const char *mode) { FILE *f = NULL; char *cmd_exp = rnd_build_fn(hidlib, cmd); @@ -187,13 +187,13 @@ return f; } -int pcb_pclose(FILE *f) +int rnd_pclose(FILE *f) { return pclose(f); } -int pcb_system(rnd_hidlib_t *hidlib, const char *cmd) +int rnd_system(rnd_hidlib_t *hidlib, const char *cmd) { int res = -1; char *cmd_exp = rnd_build_fn(hidlib, cmd); @@ -209,7 +209,7 @@ return res; } -int pcb_remove(rnd_hidlib_t *hidlib, const char *path) +int rnd_remove(rnd_hidlib_t *hidlib, const char *path) { int res = -1; char *path_exp = rnd_build_fn(hidlib, path); @@ -224,7 +224,7 @@ return res; } -int pcb_rename(rnd_hidlib_t *hidlib, const char *old_path, const char *new_path) +int rnd_rename(rnd_hidlib_t *hidlib, const char *old_path, const char *new_path) { int res = -1; char *old_path_exp = rnd_build_fn(hidlib, old_path); @@ -242,7 +242,7 @@ return res; } -int pcb_unlink(rnd_hidlib_t *hidlib, const char *path) +int rnd_unlink(rnd_hidlib_t *hidlib, const char *path) { int res; char *path_exp = rnd_build_fn(hidlib, path); @@ -283,7 +283,7 @@ /* try the trivial: directly under this dir */ rnd_snprintf(tmp, sizeof(tmp), "%s%c%s", from, RND_DIR_SEPARATOR_C, fn); - res = pcb_fopen(hidlib, tmp, mode); + res = rnd_fopen(hidlib, tmp, mode); if (res != NULL) { if (full_path != NULL) @@ -320,7 +320,7 @@ return NULL; } -FILE *pcb_fopen_at(rnd_hidlib_t *hidlib, const char *dir, const char *fn, const char *mode, char **full_path, int recursive) +FILE *rnd_fopen_at(rnd_hidlib_t *hidlib, const char *dir, const char *fn, const char *mode, char **full_path, int recursive) { if (full_path != NULL) *full_path = NULL; @@ -328,7 +328,7 @@ return pcb_fopen_at_(hidlib, dir, fn, mode, full_path, recursive); } -FILE *pcb_fopen_first(rnd_hidlib_t *hidlib, const rnd_conflist_t *paths, const char *fn, const char *mode, char **full_path, int recursive) +FILE *rnd_fopen_first(rnd_hidlib_t *hidlib, const rnd_conflist_t *paths, const char *fn, const char *mode, char **full_path, int recursive) { FILE *res; char *real_fn = rnd_build_fn(hidlib, fn); @@ -341,7 +341,7 @@ return NULL; if (rnd_is_path_abs(fn)) { - res = pcb_fopen(hidlib, real_fn, mode); + res = rnd_fopen(hidlib, real_fn, mode); if ((res != NULL) && (full_path != NULL)) *full_path = real_fn; else @@ -367,7 +367,7 @@ if ((pl > 0) && (real_p[pl-1] == '/')) real_p[pl-1] = '\0'; - res = pcb_fopen_at(hidlib, real_p, real_fn, mode, full_path, recursive); + res = rnd_fopen_at(hidlib, real_p, real_fn, mode, full_path, recursive); free(real_p); if (res != NULL) { @@ -381,7 +381,7 @@ } extern int pcb_mkdir_(const char *path, int mode); -int pcb_mkdir(rnd_hidlib_t *hidlib, const char *path, int mode) +int rnd_mkdir(rnd_hidlib_t *hidlib, const char *path, int mode) { CHECK("mkdir", "access", path, NULL, return -1); CHECK("mkdir", "mkdir", path, NULL, return -1); @@ -391,7 +391,7 @@ extern long pcb_file_size_(const char *path); -long pcb_file_size(rnd_hidlib_t *hidlib, const char *path) +long rnd_file_size(rnd_hidlib_t *hidlib, const char *path) { CHECK("file_size", "access", path, NULL, return -1); CHECK("file_size", "stat", path, NULL, return -1); @@ -399,7 +399,7 @@ } extern int pcb_is_dir_(const char *path); -int pcb_is_dir(rnd_hidlib_t *hidlib, const char *path) +int rnd_is_dir(rnd_hidlib_t *hidlib, const char *path) { CHECK("is_dir", "access", path, NULL, return -1); CHECK("is_dir", "stat", path, NULL, return -1); @@ -407,7 +407,7 @@ } extern double pcb_file_mtime_(const char *path); -double pcb_file_mtime(rnd_hidlib_t *hidlib, const char *path) +double rnd_file_mtime(rnd_hidlib_t *hidlib, const char *path) { CHECK("file_mtime", "access", path, NULL, return -1); CHECK("file_mtime", "stat", path, NULL, return -1); Index: trunk/src/librnd/core/safe_fs.h =================================================================== --- trunk/src/librnd/core/safe_fs.h (revision 31016) +++ trunk/src/librnd/core/safe_fs.h (revision 31017) @@ -29,8 +29,8 @@ of the % substitutions will not be performed (the ones that depend on design (file) name) */ -#ifndef PCB_SAFE_FS_H -#define PCB_SAFE_FS_H +#ifndef RND_SAFE_FS_H +#define RND_SAFE_FS_H #include #include @@ -38,46 +38,46 @@ /* file name templating wrappers around file system calls; later they will also execute checks to avoid unsafe access */ -FILE *pcb_fopen(rnd_hidlib_t *hidlib, const char *path, const char *mode); -FILE *pcb_fopen_askovr(rnd_hidlib_t *hidlib, const char *path, const char *mode, int *all); -FILE *pcb_popen(rnd_hidlib_t *hidlib, const char *cmd, const char *mode); -int pcb_pclose(FILE *f); -int pcb_system(rnd_hidlib_t *hidlib, const char *cmd); -int pcb_remove(rnd_hidlib_t *hidlib, const char *path); -int pcb_rename(rnd_hidlib_t *hidlib, const char *old_path, const char *new_path); -int pcb_mkdir(rnd_hidlib_t *hidlib, const char *path, int mode); -int pcb_unlink(rnd_hidlib_t *hidlib, const char *path); +FILE *rnd_fopen(rnd_hidlib_t *hidlib, const char *path, const char *mode); +FILE *rnd_fopen_askovr(rnd_hidlib_t *hidlib, const char *path, const char *mode, int *all); +FILE *rnd_popen(rnd_hidlib_t *hidlib, const char *cmd, const char *mode); +int rnd_pclose(FILE *f); +int rnd_system(rnd_hidlib_t *hidlib, const char *cmd); +int rnd_remove(rnd_hidlib_t *hidlib, const char *path); +int rnd_rename(rnd_hidlib_t *hidlib, const char *old_path, const char *new_path); +int rnd_mkdir(rnd_hidlib_t *hidlib, const char *path, int mode); +int rnd_unlink(rnd_hidlib_t *hidlib, const char *path); /* Batched ask-overwrite in storage provided by the caller; the return value of the init() call needs to be passed to the uninit() so nested batching is possible. */ -int *pcb_batched_ask_ovr_init(rnd_hidlib_t *hidlib, int *storage); -void pcb_batched_ask_ovr_uninit(rnd_hidlib_t *hidlib, int *init_retval); +int *rnd_batched_ask_ovr_init(rnd_hidlib_t *hidlib, int *storage); +void rnd_batched_ask_ovr_uninit(rnd_hidlib_t *hidlib, int *init_retval); /* Return the size of non-large files; on error or for large files (size larger than the value long can hold) return -1 */ -long pcb_file_size(rnd_hidlib_t *hidlib, const char *path); +long rnd_file_size(rnd_hidlib_t *hidlib, const char *path); /* Return -1 on error or the last modification time (in sec from epoch) */ -double pcb_file_mtime(rnd_hidlib_t *hidlib, const char *path); +double rnd_file_mtime(rnd_hidlib_t *hidlib, const char *path); /* Return non-zero if path is a directory */ -int pcb_is_dir(rnd_hidlib_t *hidlib, const char *path); +int rnd_is_dir(rnd_hidlib_t *hidlib, const char *path); /* Check if path could be open with mode; if yes, return the substituted/expanded file name, if no, return NULL */ -char *pcb_fopen_check(rnd_hidlib_t *hidlib, const char *path, const char *mode); +char *rnd_fopen_check(rnd_hidlib_t *hidlib, const char *path, const char *mode); -/* Same as pcb_fopen(), but on success load fn_out() with the malloc()'d +/* Same as rnd_fopen(), but on success load fn_out() with the malloc()'d file name as it looked after the substitution */ -FILE *pcb_fopen_fn(rnd_hidlib_t *hidlib, const char *path, const char *mode, char **fn_out); +FILE *rnd_fopen_fn(rnd_hidlib_t *hidlib, const char *path, const char *mode, char **fn_out); /* Open a file given as a basename fn, under the directory dir, optionally doing a recusrive search in the directory tree. If full_path is not NULL, and the call succeeds, load it with the full path of the file opened. */ -FILE *pcb_fopen_at(rnd_hidlib_t *hidlib, const char *dir, const char *fn, const char *mode, char **full_path, int recursive); +FILE *rnd_fopen_at(rnd_hidlib_t *hidlib, const char *dir, const char *fn, const char *mode, char **full_path, int recursive); #include @@ -89,6 +89,6 @@ (or NULL on failure); the caller needs to call free() on it. If recursive is set, all subcirectories under each path is also searched for the file. */ -FILE *pcb_fopen_first(rnd_hidlib_t *hidlib, const rnd_conflist_t *paths, const char *fn, const char *mode, char **full_path, int recursive); +FILE *rnd_fopen_first(rnd_hidlib_t *hidlib, const rnd_conflist_t *paths, const char *fn, const char *mode, char **full_path, int recursive); #endif Index: trunk/src/librnd/pcb_compat.h =================================================================== --- trunk/src/librnd/pcb_compat.h (revision 31016) +++ trunk/src/librnd/pcb_compat.h (revision 31017) @@ -1086,3 +1086,21 @@ #define PCB_HOOK_UNREGISTER RND_HOOK_UNREGISTER #define PCB_COORD_ROTATE90 RND_COORD_ROTATE90 #define pcb_rotate rnd_rotate +#define pcb_fopen rnd_fopen +#define pcb_fopen_askovr rnd_fopen_askovr +#define pcb_popen rnd_popen +#define pcb_pclose rnd_pclose +#define pcb_system rnd_system +#define pcb_remove rnd_remove +#define pcb_rename rnd_rename +#define pcb_mkdir rnd_mkdir +#define pcb_unlink rnd_unlink +#define pcb_batched_ask_ovr_init rnd_batched_ask_ovr_init +#define pcb_batched_ask_ovr_uninit rnd_batched_ask_ovr_uninit +#define pcb_file_size rnd_file_size +#define pcb_file_mtime rnd_file_mtime +#define pcb_is_dir rnd_is_dir +#define pcb_fopen_check rnd_fopen_check +#define pcb_fopen_fn rnd_fopen_fn +#define pcb_fopen_at rnd_fopen_at +#define pcb_fopen_first rnd_fopen_first Index: trunk/src/main_act.c =================================================================== --- trunk/src/main_act.c (revision 31016) +++ trunk/src/main_act.c (revision 31017) @@ -281,7 +281,7 @@ rnd_snprintf(tmp, sizeof(tmp), "%mm", pcb_crosshair.Y); rnd_setenv("PCB_RND_CROSSHAIR_Y_MM", tmp, 1); rnd_setenv("PCB_RND_CURRENT_LAYER_NAME", PCB_CURRLAYER(PCB_ACT_BOARD)->name, 1); - RND_ACT_IRES(pcb_system(RND_ACT_HIDLIB, cmd)); + RND_ACT_IRES(rnd_system(RND_ACT_HIDLIB, cmd)); return 0; } Index: trunk/src/plug_io.c =================================================================== --- trunk/src/plug_io.c (revision 31016) +++ trunk/src/plug_io.c (revision 31017) @@ -91,7 +91,7 @@ else { FILE *f; reason = "none of io plugins could successfully read file"; - f = pcb_fopen(hidlib, filename, "r"); + f = rnd_fopen(hidlib, filename, "r"); if (f != NULL) { fclose(f); comment = "(unknown/invalid file format?)"; @@ -206,7 +206,7 @@ FILE *ft; long design_root_cnt = rnd_conf_main_root_replace_cnt[RND_CFR_DESIGN]; - ft = pcb_fopen(&Ptr->hidlib, Filename, "r"); + ft = rnd_fopen(&Ptr->hidlib, Filename, "r"); len = pcb_test_parse_all(ft, Filename, fmt, PCB_IOT_PCB, available, accepts, &accept_total, sizeof(available)/sizeof(available[0]), ignore_missing, load_settings); if (ft != NULL) fclose(ft); @@ -670,7 +670,7 @@ } } printf("write to pipe \"%s\"\n", command.array); - if ((fp = pcb_popen(&PCB->hidlib, command.array, "w")) == NULL) { + if ((fp = rnd_popen(&PCB->hidlib, command.array, "w")) == NULL) { rnd_popen_error_message(command.array); return (-1); } @@ -677,7 +677,7 @@ result = pcb_write_file(fp, thePcb, NULL, NULL, fmt, rnd_false, subc_only, subc_idx); - return (pcb_pclose(fp) ? (-1) : result); + return (rnd_pclose(fp) ? (-1) : result); } #if !defined(RND_HAS_ATEXIT) @@ -758,7 +758,7 @@ int accept_total = 0; FILE *ft; - ft = pcb_fopen(hidlib, fn, "r"); + ft = rnd_fopen(hidlib, fn, "r"); len = pcb_test_parse_all(ft, fn, fmt, PCB_IOT_BUFFER, available, accepts, &accept_total, sizeof(available)/sizeof(available[0]), 0, 0); if (ft != NULL) fclose(ft); @@ -908,7 +908,7 @@ fn_tmp = malloc(len+8); memcpy(fn_tmp, Filename, len); strcpy(fn_tmp+len, ".old"); - if (pcb_rename(NULL, Filename, fn_tmp) != 0) { + if (rnd_rename(NULL, Filename, fn_tmp) != 0) { if (emergency) { /* Try an alternative emergency file */ strcpy(fn_tmp+len, ".emr"); @@ -922,9 +922,9 @@ } if (askovr) - fp = pcb_fopen_askovr(&PCB->hidlib, Filename, "w", NULL); + fp = rnd_fopen_askovr(&PCB->hidlib, Filename, "w", NULL); else - fp = pcb_fopen(&PCB->hidlib, Filename, "w"); + fp = rnd_fopen(&PCB->hidlib, Filename, "w"); if (fp == NULL) { rnd_open_error_message(Filename); @@ -936,7 +936,7 @@ fclose(fp); if (fn_tmp != NULL) { if ((result == 0) && (!conf_core.rc.keep_save_backups)) - pcb_unlink(&PCB->hidlib, fn_tmp); + rnd_unlink(&PCB->hidlib, fn_tmp); free(fn_tmp); } return result; @@ -1010,7 +1010,7 @@ pcb_plug_fp_map_t *pcb_io_map_footprint_file(rnd_hidlib_t *hl, const char *fn, pcb_plug_fp_map_t *head, int need_tags) { - FILE *f = pcb_fopen(hl, fn, "r"); + FILE *f = rnd_fopen(hl, fn, "r"); pcb_plug_fp_map_t *res = NULL; pcb_plug_io_t *plug; Index: trunk/src/rats_patch.c =================================================================== --- trunk/src/rats_patch.c (revision 31016) +++ trunk/src/rats_patch.c (revision 31017) @@ -617,7 +617,7 @@ free(default_file); } - f = pcb_fopen(&PCB->hidlib, fn, "w"); + f = rnd_fopen(&PCB->hidlib, fn, "w"); if (f == NULL) { rnd_message(RND_MSG_ERROR, "Can't open netlist patch file %s for writing\n", fn); RND_ACT_IRES(-1); Index: trunk/src_plugins/ar_cpcb/ar_cpcb.c =================================================================== --- trunk/src_plugins/ar_cpcb/ar_cpcb.c (revision 31016) +++ trunk/src_plugins/ar_cpcb/ar_cpcb.c (revision 31017) @@ -294,7 +294,7 @@ RND_PCB_ACT_CONVARG(1, FGW_STR, import_cpcb, fn = argv[1].val.str); - f = pcb_fopen(&PCB->hidlib, fn, "r"); + f = rnd_fopen(&PCB->hidlib, fn, "r"); if (f == NULL) { rnd_message(RND_MSG_ERROR, "Can not open %s for read\n", fn); RND_ACT_IRES(-1); @@ -321,7 +321,7 @@ RND_PCB_ACT_CONVARG(1, FGW_STR, export_cpcb, fn = argv[1].val.str); - f = pcb_fopen(&PCB->hidlib, fn, "w"); + f = rnd_fopen(&PCB->hidlib, fn, "w"); if (f == NULL) { rnd_message(RND_MSG_ERROR, "Can not open %s for write\n", fn); RND_ACT_IRES(-1); @@ -364,7 +364,7 @@ return 0; } - f = pcb_fopen(&PCB->hidlib, tmpfn, "w"); + f = rnd_fopen(&PCB->hidlib, tmpfn, "w"); if (f == NULL) { rnd_message(RND_MSG_ERROR, "Can not open temp file %s for write\n", tmpfn); RND_ACT_IRES(-1); @@ -383,7 +383,7 @@ fclose(f); cmdline = rnd_strdup_printf("%s < %s", cmd, tmpfn); - f = pcb_popen(&PCB->hidlib, cmdline, "r"); + f = rnd_popen(&PCB->hidlib, cmdline, "r"); if (f != NULL) { cpcb_load(PCB, f, &stk, NULL); pclose(f); @@ -395,7 +395,7 @@ return 0; } -/* pcb_remove(&PCB->hidlib, tmpfn);*/ +/* rnd_remove(&PCB->hidlib, tmpfn);*/ free(cmdline); cpcb_free_nets(&nmap); return 0; Index: trunk/src_plugins/cam/cam_compile.c =================================================================== --- trunk/src_plugins/cam/cam_compile.c (revision 31016) +++ trunk/src_plugins/cam/cam_compile.c (revision 31017) @@ -59,7 +59,7 @@ next = strrchr(curr, RND_DIR_SEPARATOR_C); if (next != NULL) *next = '\0'; - pcb_mkdir(&PCB->hidlib, arg, 0755); + rnd_mkdir(&PCB->hidlib, arg, 0755); if (next != NULL) { *next = RND_DIR_SEPARATOR_C; next++; @@ -145,7 +145,7 @@ int save_l_ons[PCB_MAX_LAYER], save_g_ons[PCB_MAX_LAYERGRP]; int ovr = 0, *old_ovr; - old_ovr = pcb_batched_ask_ovr_init(&PCB->hidlib, &ovr); + old_ovr = rnd_batched_ask_ovr_init(&PCB->hidlib, &ovr); if (ctx->has_partial) pcb_data_clear_flag(PCB->Data, PCB_FLAG_EXPORTSEL, 0, 0); @@ -177,7 +177,7 @@ rnd_event(&PCB->hidlib, PCB_EVENT_LAYERVIS_CHANGED, NULL); } - pcb_batched_ask_ovr_uninit(&PCB->hidlib, old_ovr); + rnd_batched_ask_ovr_uninit(&PCB->hidlib, old_ovr); return res; } Index: trunk/src_plugins/dialogs/dlg_library.c =================================================================== --- trunk/src_plugins/dialogs/dlg_library.c (revision 31016) +++ trunk/src_plugins/dialogs/dlg_library.c (revision 31017) @@ -326,7 +326,7 @@ } } } - pcb_pclose(f); + rnd_pclose(f); } static void library_select(rnd_hid_attribute_t *attrib, void *hid_ctx, rnd_hid_row_t *row) Index: trunk/src_plugins/dialogs/dlg_library_param.c =================================================================== --- trunk/src_plugins/dialogs/dlg_library_param.c (revision 31016) +++ trunk/src_plugins/dialogs/dlg_library_param.c (revision 31017) @@ -562,7 +562,7 @@ #else cmd = rnd_strdup_printf("%s --help", l->data.fp.loc_info); #endif - f = pcb_popen(NULL, cmd, "r"); + f = rnd_popen(NULL, cmd, "r"); free(cmd); if (f == NULL) { rnd_message(RND_MSG_ERROR, "Can not execute parametric footprint %s\n", l->data.fp.loc_info); @@ -607,7 +607,7 @@ not persistent (window palcement code) */ RND_DAD_DEFSIZE(library_ctx.pdlg, 700, 500); } - pcb_pclose(f); + rnd_pclose(f); RND_DAD_NEW("lib_param", library_ctx.pdlg, "pcb-rnd parametric footprint", ctx, rnd_false, library_param_close_cb); Index: trunk/src_plugins/dialogs/dlg_view.c =================================================================== --- trunk/src_plugins/dialogs/dlg_view.c (revision 31016) +++ trunk/src_plugins/dialogs/dlg_view.c (revision 31017) @@ -445,7 +445,7 @@ if (fn == NULL) return; - f = pcb_fopen(&PCB->hidlib, fn, "w"); + f = rnd_fopen(&PCB->hidlib, fn, "w"); if (f == NULL) { rnd_message(RND_MSG_ERROR, "Can't open %s for write\n", fn); return; @@ -474,7 +474,7 @@ if (fn == NULL) return; - f = pcb_fopen(&PCB->hidlib, fn, "r"); + f = rnd_fopen(&PCB->hidlib, fn, "r"); if (f == NULL) { rnd_message(RND_MSG_ERROR, "Can't open %s for read\n", fn); return; Index: trunk/src_plugins/export_bom/bom.c =================================================================== --- trunk/src_plugins/export_bom/bom.c (revision 31016) +++ trunk/src_plugins/export_bom/bom.c (revision 31017) @@ -198,7 +198,7 @@ } PCB_END_LOOP; - fp = pcb_fopen_askovr(&PCB->hidlib, bom_filename, "w", NULL); + fp = rnd_fopen_askovr(&PCB->hidlib, bom_filename, "w", NULL); if (!fp) { rnd_message(RND_MSG_ERROR, "Cannot open file %s for writing\n", bom_filename); print_and_free(NULL, bom); Index: trunk/src_plugins/export_dsn/dsn.c =================================================================== --- trunk/src_plugins/export_dsn/dsn.c (revision 31016) +++ trunk/src_plugins/export_dsn/dsn.c (revision 31017) @@ -508,7 +508,7 @@ { FILE *fp; /* Print out the dsn .dsn file. */ - fp = pcb_fopen_askovr(&PCB->hidlib, dsn_filename, "w", NULL); + fp = rnd_fopen_askovr(&PCB->hidlib, dsn_filename, "w", NULL); if (!fp) { rnd_message(RND_MSG_WARNING, "Cannot open file %s for writing\n", dsn_filename); return 1; Index: trunk/src_plugins/export_dxf/dxf.c =================================================================== --- trunk/src_plugins/export_dxf/dxf.c (revision 31016) +++ trunk/src_plugins/export_dxf/dxf.c (revision 31017) @@ -286,7 +286,7 @@ filename = "pcb.dxf"; if (dxf_cam.fn_template == NULL) { - dxf_ctx.f = pcb_fopen_askovr(&PCB->hidlib, dxf_cam.active ? dxf_cam.fn : filename, "wb", NULL); + dxf_ctx.f = rnd_fopen_askovr(&PCB->hidlib, dxf_cam.active ? dxf_cam.fn : filename, "wb", NULL); if (!dxf_ctx.f) { perror(filename); return; @@ -303,7 +303,7 @@ else { char *real_fn; dxf_ctx.temp = NULL; - real_fn = pcb_fopen_check(&PCB->hidlib, fn, "r"); + real_fn = rnd_fopen_check(&PCB->hidlib, fn, "r"); if (real_fn != NULL) dxf_ctx.temp = lht_dom_load(real_fn, &errmsg); free(real_fn); @@ -367,7 +367,7 @@ fclose(dxf_ctx.f); } - dxf_ctx.f = pcb_fopen_askovr(&PCB->hidlib, dxf_cam.fn, "wb", NULL); + dxf_ctx.f = rnd_fopen_askovr(&PCB->hidlib, dxf_cam.fn, "wb", NULL); if (!dxf_ctx.f) { perror(dxf_cam.fn); return 0; Index: trunk/src_plugins/export_excellon/excellon.c =================================================================== --- trunk/src_plugins/export_excellon/excellon.c (revision 31016) +++ trunk/src_plugins/export_excellon/excellon.c (revision 31017) @@ -113,7 +113,7 @@ void pcb_drill_export_excellon(pcb_board_t *pcb, pcb_drill_ctx_t *ctx, int force_g85, int coord_fmt_idx, const char *fn) { - FILE *f = pcb_fopen_askovr(&PCB->hidlib, fn, "wb", NULL); /* Binary needed to force CR-LF */ + FILE *f = rnd_fopen_askovr(&PCB->hidlib, fn, "wb", NULL); /* Binary needed to force CR-LF */ coord_format_t *cfmt; if (f == NULL) { Index: trunk/src_plugins/export_fidocadj/fidocadj.c =================================================================== --- trunk/src_plugins/export_fidocadj/fidocadj.c (revision 31016) +++ trunk/src_plugins/export_fidocadj/fidocadj.c (revision 31017) @@ -98,7 +98,7 @@ { FILE *f; char line[1024]; - f = pcb_fopen(&PCB->hidlib, fn, "r"); + f = rnd_fopen(&PCB->hidlib, fn, "r"); if (f == NULL) { rnd_message(RND_MSG_ERROR, "Can't open fidocadj PCB library file '%s' for read\n", fn); return -1; @@ -189,7 +189,7 @@ if (!filename) filename = "pcb-rnd-default.fcd"; - f = pcb_fopen_askovr(&PCB->hidlib, filename, "w", NULL); + f = rnd_fopen_askovr(&PCB->hidlib, filename, "w", NULL); if (!f) { perror(filename); return; Index: trunk/src_plugins/export_gcode/gcode.c =================================================================== --- trunk/src_plugins/export_gcode/gcode.c (revision 31016) +++ trunk/src_plugins/export_gcode/gcode.c (revision 31017) @@ -286,7 +286,7 @@ pcb_layer_to_file_name_append(&fn, layer, flags, purpose, purpi, PCB_FNS_pcb_rnd); gds_append_str(&fn, ".cnc"); - gctx.f = pcb_fopen_askovr(&gctx.pcb->hidlib, fn.array, "w", NULL); + gctx.f = rnd_fopen_askovr(&gctx.pcb->hidlib, fn.array, "w", NULL); if (gctx.f != NULL) gcode_print_header(); @@ -345,7 +345,7 @@ if (gctx.cam.active) { - gctx.f = pcb_fopen_askovr(&pcb->hidlib, gctx.cam.fn, "w", NULL); + gctx.f = rnd_fopen_askovr(&pcb->hidlib, gctx.cam.fn, "w", NULL); if (gctx.f != NULL) gcode_print_header(); } Index: trunk/src_plugins/export_gerber/gerber.c =================================================================== --- trunk/src_plugins/export_gerber/gerber.c (revision 31016) +++ trunk/src_plugins/export_gerber/gerber.c (revision 31017) @@ -525,7 +525,7 @@ pagecount++; append_file_suffix(&fn_gds, group, layer, flags, purpose, purpi, 0, NULL); if (f == NULL) { /* open a new file if we closed the previous (cam mode: only one file) */ - f = pcb_fopen_askovr(&PCB->hidlib, gerber_cam.active ? gerber_cam.fn : filename, "wb", &gerber_ovr); /* Binary needed to force CR-LF */ + f = rnd_fopen_askovr(&PCB->hidlib, gerber_cam.active ? gerber_cam.fn : filename, "wb", &gerber_ovr); /* Binary needed to force CR-LF */ if (f == NULL) { rnd_message(RND_MSG_ERROR, "Error: Could not open %s for writing.\n", filename); return 1; Index: trunk/src_plugins/export_ipcd356/ipcd356.c =================================================================== --- trunk/src_plugins/export_ipcd356/ipcd356.c (revision 31016) +++ trunk/src_plugins/export_ipcd356/ipcd356.c (revision 31017) @@ -461,7 +461,7 @@ pcb_cam_begin_nolayer(PCB, &cam, NULL, options[HA_cam].str, &fn); - f = pcb_fopen_askovr(&PCB->hidlib, fn, "w", NULL); + f = rnd_fopen_askovr(&PCB->hidlib, fn, "w", NULL); if (f == NULL) { rnd_message(RND_MSG_ERROR, "Can't open %s for write\n", fn); return; Index: trunk/src_plugins/export_lpr/lpr.c =================================================================== --- trunk/src_plugins/export_lpr/lpr.c (revision 31016) +++ trunk/src_plugins/export_lpr/lpr.c (revision 31017) @@ -82,7 +82,7 @@ filename = options[HA_lprcommand].str; printf("LPR: open %s\n", filename); - f = pcb_popen(NULL, filename, "w"); + f = rnd_popen(NULL, filename, "w"); if (!f) { perror(filename); return; @@ -90,7 +90,7 @@ ps_hid_export_to_file(f, options, NULL); - pcb_pclose(f); + rnd_pclose(f); } static int lpr_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) Index: trunk/src_plugins/export_oldconn/oldconn.c =================================================================== --- trunk/src_plugins/export_oldconn/oldconn.c (revision 31016) +++ trunk/src_plugins/export_oldconn/oldconn.c (revision 31017) @@ -248,7 +248,7 @@ if (response != 1) return NULL; } - if ((fp = pcb_fopen_askovr(&PCB->hidlib, Filename, "w", NULL)) == NULL) + if ((fp = rnd_fopen_askovr(&PCB->hidlib, Filename, "w", NULL)) == NULL) rnd_open_error_message(Filename); } return fp; Index: trunk/src_plugins/export_openems/export_openems.c =================================================================== --- trunk/src_plugins/export_openems/export_openems.c (revision 31016) +++ trunk/src_plugins/export_openems/export_openems.c (revision 31017) @@ -649,7 +649,7 @@ if (!filename) filename = "pcb.m"; - f = pcb_fopen_askovr(&PCB->hidlib, filename, "wb", &openems_ovr); + f = rnd_fopen_askovr(&PCB->hidlib, filename, "wb", &openems_ovr); if (!f) { perror(filename); return; @@ -663,7 +663,7 @@ if (strcmp(end, ".m") != 0) end = runfn + len; strcpy(end, ".sim.m"); - fsim = pcb_fopen_askovr(&PCB->hidlib, runfn, "wb", &openems_ovr); + fsim = rnd_fopen_askovr(&PCB->hidlib, runfn, "wb", &openems_ovr); if (fsim == NULL) { perror(runfn); return; Index: trunk/src_plugins/export_openems/mesh.c =================================================================== --- trunk/src_plugins/export_openems/mesh.c (revision 31016) +++ trunk/src_plugins/export_openems/mesh.c (revision 31017) @@ -980,7 +980,7 @@ default_file = rnd_strdup(fname); } - f = pcb_fopen_askovr(&PCB->hidlib, fname, "w", NULL); + f = rnd_fopen_askovr(&PCB->hidlib, fname, "w", NULL); if (f == NULL) { rnd_message(RND_MSG_ERROR, "Can not open '%s' for write\n", fname); return; @@ -1010,7 +1010,7 @@ default_file = rnd_strdup(fname); } - f = pcb_fopen(&PCB->hidlib, fname, "r"); + f = rnd_fopen(&PCB->hidlib, fname, "r"); if (f == NULL) { rnd_message(RND_MSG_ERROR, "Can not open '%s' for read\n", fname); return; Index: trunk/src_plugins/export_openscad/export_openscad.c =================================================================== --- trunk/src_plugins/export_openscad/export_openscad.c (revision 31016) +++ trunk/src_plugins/export_openscad/export_openscad.c (revision 31017) @@ -311,7 +311,7 @@ pcb_cam_begin_nolayer(PCB, &cam, NULL, options[HA_cam].str, &filename); - f = pcb_fopen_askovr(&PCB->hidlib, filename, "wb", NULL); + f = rnd_fopen_askovr(&PCB->hidlib, filename, "wb", NULL); if (!f) { perror(filename); return; @@ -611,7 +611,7 @@ RND_PCB_ACT_CONVARG(1, FGW_STR, scad_export_poly, name = argv[1].val.str); - f = pcb_fopen_askovr(&PCB->hidlib, name, "w", NULL); + f = rnd_fopen_askovr(&PCB->hidlib, name, "w", NULL); if (f == NULL) { rnd_message(RND_MSG_ERROR, "Failed to open %s for writing\n", name); RND_ACT_IRES(-1); Index: trunk/src_plugins/export_openscad/scad_models.c =================================================================== --- trunk/src_plugins/export_openscad/scad_models.c (revision 31016) +++ trunk/src_plugins/export_openscad/scad_models.c (revision 31017) @@ -33,7 +33,7 @@ if (!htsp_has(models, name)) { char buff[1024], *full_path; - fin = pcb_fopen_first(&PCB->hidlib, &conf_core.rc.library_search_paths, name, "r", &full_path, rnd_true); + fin = rnd_fopen_first(&PCB->hidlib, &conf_core.rc.library_search_paths, name, "r", &full_path, rnd_true); if (fin != NULL) { char *s, *safe_name = rnd_strdup(name); Index: trunk/src_plugins/export_png/png.c =================================================================== --- trunk/src_plugins/export_png/png.c (revision 31016) +++ trunk/src_plugins/export_png/png.c (revision 31017) @@ -738,7 +738,7 @@ } if (!png_cam.fn_template) { - f = pcb_fopen_askovr(&PCB->hidlib, png_cam.active ? png_cam.fn : filename, "wb", NULL); + f = rnd_fopen_askovr(&PCB->hidlib, png_cam.active ? png_cam.fn : filename, "wb", NULL); if (!f) { perror(filename); return; @@ -811,7 +811,7 @@ png_foot(); fclose(f); } - f = pcb_fopen_askovr(&PCB->hidlib, png_cam.fn, "wb", NULL); + f = rnd_fopen_askovr(&PCB->hidlib, png_cam.fn, "wb", NULL); if (!f) { perror(filename); return 0; Index: trunk/src_plugins/export_ps/eps.c =================================================================== --- trunk/src_plugins/export_ps/eps.c (revision 31016) +++ trunk/src_plugins/export_ps/eps.c (revision 31017) @@ -328,7 +328,7 @@ filename = "pcb-out.eps"; if (eps_cam.fn_template == NULL) { - f = pcb_fopen_askovr(&PCB->hidlib, eps_cam.active ? eps_cam.fn : filename, "w", NULL); + f = rnd_fopen_askovr(&PCB->hidlib, eps_cam.active ? eps_cam.fn : filename, "w", NULL); if (!f) { perror(filename); return; @@ -382,7 +382,7 @@ eps_print_footer(f); fclose(f); } - f = pcb_fopen_askovr(&PCB->hidlib, eps_cam.fn, "w", NULL); + f = rnd_fopen_askovr(&PCB->hidlib, eps_cam.fn, "w", NULL); eps_print_header(f, eps_cam.fn); } Index: trunk/src_plugins/export_ps/ps.c =================================================================== --- trunk/src_plugins/export_ps/ps.c (revision 31016) +++ trunk/src_plugins/export_ps/ps.c (revision 31017) @@ -500,7 +500,7 @@ return NULL; if (!global.multi_file) - return pcb_fopen_askovr(&PCB->hidlib, base, "w", NULL); + return rnd_fopen_askovr(&PCB->hidlib, base, "w", NULL); buf = (char *) malloc(strlen(base) + strlen(which) + 5); @@ -513,7 +513,7 @@ else { sprintf(buf, "%s.%s.ps", base, which); } - ps_open_file = pcb_fopen_askovr(&PCB->hidlib, buf, "w", &global.ovr_all); + ps_open_file = rnd_fopen_askovr(&PCB->hidlib, buf, "w", &global.ovr_all); free(buf); return ps_open_file; } @@ -1378,11 +1378,11 @@ const char *cmd = ps_calib_attribute_list[0].val.str; while (*cmd == ' ' || *cmd == '|') cmd++; - ps_cal_file = pcb_popen(&PCB->hidlib, cmd, "w"); + ps_cal_file = rnd_popen(&PCB->hidlib, cmd, "w"); used_popen = 1; } else - ps_cal_file = pcb_fopen(&PCB->hidlib, ps_calib_attribute_list[0].val.str, "w"); + ps_cal_file = rnd_fopen(&PCB->hidlib, ps_calib_attribute_list[0].val.str, "w"); for (c = 0; calib_lines[c]; c++) fputs(calib_lines[c], ps_cal_file); @@ -1400,7 +1400,7 @@ fprintf(ps_cal_file, "%%%%EOF\n"); if (used_popen) - pcb_pclose(ps_cal_file); + rnd_pclose(ps_cal_file); else fclose(ps_cal_file); } Index: trunk/src_plugins/export_stat/stat.c =================================================================== --- trunk/src_plugins/export_stat/stat.c (revision 31016) +++ trunk/src_plugins/export_stat/stat.c (revision 31017) @@ -157,7 +157,7 @@ pcb_cam_begin_nolayer(PCB, &cam, NULL, options[HA_cam].str, &filename); - f = pcb_fopen_askovr(&PCB->hidlib, filename, "w", NULL); + f = rnd_fopen_askovr(&PCB->hidlib, filename, "w", NULL); if (!f) { perror(filename); return; Index: trunk/src_plugins/export_stl/export_stl.c =================================================================== --- trunk/src_plugins/export_stl/export_stl.c (revision 31016) +++ trunk/src_plugins/export_stl/export_stl.c (revision 31017) @@ -202,7 +202,7 @@ pcb_cam_begin_nolayer(PCB, &cam, NULL, options[HA_cam].str, &filename); - f = pcb_fopen_askovr(&PCB->hidlib, filename, "wb", NULL); + f = rnd_fopen_askovr(&PCB->hidlib, filename, "wb", NULL); if (!f) { perror(filename); return; Index: trunk/src_plugins/export_svg/svg.c =================================================================== --- trunk/src_plugins/export_svg/svg.c (revision 31016) +++ trunk/src_plugins/export_svg/svg.c (revision 31017) @@ -341,7 +341,7 @@ if (!filename) filename = "pcb.svg"; - f = pcb_fopen_askovr(&PCB->hidlib, svg_cam.active ? svg_cam.fn : filename, "wb", NULL); + f = rnd_fopen_askovr(&PCB->hidlib, svg_cam.active ? svg_cam.fn : filename, "wb", NULL); if (!f) { perror(filename); return; @@ -401,7 +401,7 @@ fclose(f); } - f = pcb_fopen_askovr(&PCB->hidlib, svg_cam.fn, "wb", NULL); + f = rnd_fopen_askovr(&PCB->hidlib, svg_cam.fn, "wb", NULL); if (f == NULL) { perror(svg_cam.fn); return 0; Index: trunk/src_plugins/export_xy/xy.c =================================================================== --- trunk/src_plugins/export_xy/xy.c (revision 31016) +++ trunk/src_plugins/export_xy/xy.c (revision 31017) @@ -668,7 +668,7 @@ FILE *fp; subst_ctx_t ctx; - fp = pcb_fopen_askovr(&PCB->hidlib, xy_filename, "w", NULL); + fp = rnd_fopen_askovr(&PCB->hidlib, xy_filename, "w", NULL); if (!fp) { rnd_message(RND_MSG_ERROR, "Cannot open file %s for writing\n", xy_filename); return 1; Index: trunk/src_plugins/extedit/extedit.c =================================================================== --- trunk/src_plugins/extedit/extedit.c (revision 31016) +++ trunk/src_plugins/extedit/extedit.c (revision 31017) @@ -117,9 +117,9 @@ subs.hidlib = &PCB->hidlib; cmd = rnd_build_argfn(mth->command, &subs); - /* Don't use pcb_system() because that blocks the current process and the + /* Don't use rnd_system() because that blocks the current process and the GUI toolkit won't have a chance to handle expose events */ - fc = pcb_popen(&PCB->hidlib, cmd, "r"); + fc = rnd_popen(&PCB->hidlib, cmd, "r"); if (rnd_gui != NULL) { int fd = rnd_fileno(fc); @@ -266,7 +266,7 @@ rnd_conf_save_file(&PCB->hidlib, NULL, NULL, RND_CFR_DESIGN, tmp_cfg_fn); - f = pcb_fopen(&PCB->hidlib, tmp_fn, "w"); + f = rnd_fopen(&PCB->hidlib, tmp_fn, "w"); if (f == NULL) { rnd_message(RND_MSG_ERROR, "Failed to open temporary file\n"); goto quit1; Index: trunk/src_plugins/fp_fs/fp_fs.c =================================================================== --- trunk/src_plugins/fp_fs/fp_fs.c (revision 31016) +++ trunk/src_plugins/fp_fs/fp_fs.c (revision 31017) @@ -241,7 +241,7 @@ rnd_path_resolve(&PCB->hidlib, working_, &working, 0, rnd_false); /* Return error if the root is not a directory, to give other fp_ plugins a chance */ - if ((is_root) && (!pcb_is_dir(&PCB->hidlib, working))) { + if ((is_root) && (!rnd_is_dir(&PCB->hidlib, working))) { free(working); return -1; } @@ -416,15 +416,15 @@ /*fprintf(stderr, " cmd=%s\n", cmd);*/ /* Make a copy of the output of the parametric so rewind() can be called on it */ fctx->field[F_TMPNAME].p = rnd_tempfile_name_new("pcb-rnd-pfp"); - f = pcb_fopen(&PCB->hidlib, (char *)fctx->field[F_TMPNAME].p, "wb+"); + f = rnd_fopen(&PCB->hidlib, (char *)fctx->field[F_TMPNAME].p, "wb+"); if (f != NULL) { char buff[4096]; int len; - fp = pcb_popen(&PCB->hidlib, cmd, "r"); + fp = rnd_popen(&PCB->hidlib, cmd, "r"); if (fp != NULL) { while((len = fread(buff, 1, sizeof(buff), fp)) > 0) fwrite(buff, 1, len, f); - pcb_pclose(fp); + rnd_pclose(fp); } else rnd_message(RND_MSG_ERROR, "Parametric footprint: failed to execute %s\n", cmd); @@ -433,7 +433,7 @@ free(cmd); } else - f = pcb_fopen(&PCB->hidlib, fullname, "rb"); + f = rnd_fopen(&PCB->hidlib, fullname, "rb"); free(fullname); } Index: trunk/src_plugins/fp_wget/edakrill.c =================================================================== --- trunk/src_plugins/fp_wget/edakrill.c (revision 31016) +++ trunk/src_plugins/fp_wget/edakrill.c (revision 31017) @@ -170,7 +170,7 @@ if (md5_new == NULL) goto err; - f = pcb_fopen(NULL, last_sum_fn, "r"); + f = rnd_fopen(NULL, last_sum_fn, "r"); md5_last = load_md5_sum(f); if (f != NULL) fclose(f); @@ -186,7 +186,7 @@ if (fp_wget_open(url_idx_list, conf_fp_wget.plugins.fp_wget.cache_dir, &f, &fctx, mode) != 0) { rnd_message(RND_MSG_ERROR, "edakrill: failed to download the new list\n"); - pcb_remove(NULL, last_sum_fn); /* make sure it is downloaded next time */ + rnd_remove(NULL, last_sum_fn); /* make sure it is downloaded next time */ goto err; } Index: trunk/src_plugins/fp_wget/gedasymbols.c =================================================================== --- trunk/src_plugins/fp_wget/gedasymbols.c (revision 31016) +++ trunk/src_plugins/fp_wget/gedasymbols.c (revision 31017) @@ -91,7 +91,7 @@ if (md5_new == NULL) goto err; - f = pcb_fopen(NULL, last_sum_fn, "r"); + f = rnd_fopen(NULL, last_sum_fn, "r"); md5_last = load_md5_sum(f); if (f != NULL) fclose(f); @@ -107,7 +107,7 @@ if (fp_wget_open(url_idx_list, conf_fp_wget.plugins.fp_wget.cache_dir, &f, &fctx, mode) != 0) { rnd_message(RND_MSG_ERROR, "gedasymbols: failed to download the new list\n"); - pcb_remove(NULL, last_sum_fn); /* make sure it is downloaded next time */ + rnd_remove(NULL, last_sum_fn); /* make sure it is downloaded next time */ goto err; } Index: trunk/src_plugins/fp_wget/wget_common.c =================================================================== --- trunk/src_plugins/fp_wget/wget_common.c (revision 31016) +++ trunk/src_plugins/fp_wget/wget_common.c (revision 31017) @@ -51,7 +51,7 @@ len = rnd_snprintf(buff, sizeof(buff), "mkdir -p '%s'", dir); if (len >= sizeof(buff)-1) return -1; - return pcb_system(NULL, buff); + return rnd_system(NULL, buff); } int fp_wget_open(const char *url, const char *cache_path, FILE **f, int *fctx, fp_get_mode mode) @@ -98,12 +98,12 @@ /* rnd_trace("------res=%d\n", res); */ if ((res != 0) && (res != 768)) { /* some versions of wget will return error on -c if the file doesn't need update; try to guess whether it's really an error */ /* when wget fails, a 0-long file might be left there - remove it so it won't block new downloads */ - pcb_remove(NULL, cmd); + rnd_remove(NULL, cmd); } } if (f != NULL) { sprintf(cmd, "%s/%s", cache_path, cdir); - *f = pcb_fopen(NULL, cmd, "rb"); + *f = rnd_fopen(NULL, cmd, "rb"); if (*f == NULL) goto error; *fctx = FCTX_FOPEN; @@ -128,7 +128,7 @@ return -1; switch(*fctx) { - case FCTX_POPEN: pcb_pclose(*f); *f = NULL; return 0; + case FCTX_POPEN: rnd_pclose(*f); *f = NULL; return 0; case FCTX_FOPEN: fclose(*f); *f = NULL; return 0; } @@ -172,7 +172,7 @@ if ((md5_last == NULL) || (strcmp(md5_last, md5_new) != 0)) { FILE *f; - f = pcb_fopen(NULL, last_fn, "w"); + f = rnd_fopen(NULL, last_fn, "w"); fputs(md5_new, f); fclose(f); changed = 1; Index: trunk/src_plugins/import_calay/calay.c =================================================================== --- trunk/src_plugins/import_calay/calay.c (revision 31016) +++ trunk/src_plugins/import_calay/calay.c (revision 31017) @@ -172,7 +172,7 @@ FILE *f; int ret = 0; - f = pcb_fopen(&PCB->hidlib, fname_net, "r"); + f = rnd_fopen(&PCB->hidlib, fname_net, "r"); if (f == NULL) { rnd_message(RND_MSG_ERROR, "can't open calay netlist file '%s' for read\n", fname_net); return -1; @@ -180,7 +180,7 @@ ret = calay_parse_net(f); fclose(f); - f = pcb_fopen(&PCB->hidlib, fname_cmp, "r"); + f = rnd_fopen(&PCB->hidlib, fname_cmp, "r"); if (f == NULL) rnd_message(RND_MSG_ERROR, "can't open calay component file '%s' for read\n(non-fatal, but footprints will not be placed)\n", fname_cmp); @@ -232,7 +232,7 @@ if (aspects != IMPORT_ASPECT_NETLIST) return 0; /* only pure netlist import is supported */ - f = pcb_fopen(&PCB->hidlib, args[0], "r"); + f = rnd_fopen(&PCB->hidlib, args[0], "r"); if (f == NULL) return 0; Index: trunk/src_plugins/import_dsn/dsn.c =================================================================== --- trunk/src_plugins/import_dsn/dsn.c (revision 31016) +++ trunk/src_plugins/import_dsn/dsn.c (revision 31017) @@ -229,7 +229,7 @@ } /* load and parse the file into a dom tree */ - f = pcb_fopen(&PCB->hidlib, fname, "r"); + f = rnd_fopen(&PCB->hidlib, fname, "r"); if (f == NULL) { rnd_message(RND_MSG_ERROR, "import_dsn: can't open %s for read\n", fname); return 1; Index: trunk/src_plugins/import_edif/edif.c =================================================================== --- trunk/src_plugins/import_edif/edif.c (revision 31016) +++ trunk/src_plugins/import_edif/edif.c (revision 31017) @@ -5873,7 +5873,7 @@ * Set up the file state to something useful. */ InFile = filename; - Input = pcb_fopen(&PCB->hidlib, filename, "r"); + Input = rnd_fopen(&PCB->hidlib, filename, "r"); Error = err; LineNumber = 1; /* Index: trunk/src_plugins/import_edif/edif.y =================================================================== --- trunk/src_plugins/import_edif/edif.y (revision 31016) +++ trunk/src_plugins/import_edif/edif.y (revision 31017) @@ -4075,7 +4075,7 @@ * Set up the file state to something useful. */ InFile = filename; - Input = pcb_fopen(&PCB->hidlib, filename, "r"); + Input = rnd_fopen(&PCB->hidlib, filename, "r"); Error = err; LineNumber = 1; /* Index: trunk/src_plugins/import_edif/import_edif.c =================================================================== --- trunk/src_plugins/import_edif/import_edif.c (revision 31016) +++ trunk/src_plugins/import_edif/import_edif.c (revision 31017) @@ -51,7 +51,7 @@ if (aspects != IMPORT_ASPECT_NETLIST) return 0; /* only pure netlist import is supported */ - fp = pcb_fopen(&PCB->hidlib, args[0], "r"); + fp = rnd_fopen(&PCB->hidlib, args[0], "r"); if (fp == NULL) return 0; /* only importing from a file is supported */ Index: trunk/src_plugins/import_fpcb_nl/fpcb_nl.c =================================================================== --- trunk/src_plugins/import_fpcb_nl/fpcb_nl.c (revision 31016) +++ trunk/src_plugins/import_fpcb_nl/fpcb_nl.c (revision 31017) @@ -65,7 +65,7 @@ enum { MODE_NONE, MODE_PART, MODE_NET, MODE_SIGNAL } mode = MODE_NONE; int anon = 0; - f = pcb_fopen(&PCB->hidlib, fn, "r"); + f = rnd_fopen(&PCB->hidlib, fn, "r"); if (f == NULL) { rnd_message(RND_MSG_ERROR, "Can't open %s for read\n", fn); return -1; @@ -194,7 +194,7 @@ if ((aspects != IMPORT_ASPECT_NETLIST) || (numargs != 1)) return 0; /* only pure netlist import is supported */ - f = pcb_fopen(&PCB->hidlib, args[0], "r"); + f = rnd_fopen(&PCB->hidlib, args[0], "r"); if (f == NULL) return 0; Index: trunk/src_plugins/import_gnetlist/import_gnetlist.c =================================================================== --- trunk/src_plugins/import_gnetlist/import_gnetlist.c (revision 31016) +++ trunk/src_plugins/import_gnetlist/import_gnetlist.c (revision 31017) @@ -60,7 +60,7 @@ if ((aspects != IMPORT_ASPECT_NETLIST) || (numargs < 1)) return 0; /* only pure netlist import is supported, only if there are files */ - f = pcb_fopen(&PCB->hidlib, args[0], "r"); + f = rnd_fopen(&PCB->hidlib, args[0], "r"); if (f == NULL) return 0; @@ -126,7 +126,7 @@ } for(n = 0; n < numfns; n++) free(cmd[n+8]); - pcb_unlink(&PCB->hidlib, tmpfn); + rnd_unlink(&PCB->hidlib, tmpfn); free(cmd); return res; } Index: trunk/src_plugins/import_hpgl/hpgl.c =================================================================== --- trunk/src_plugins/import_hpgl/hpgl.c (revision 31016) +++ trunk/src_plugins/import_hpgl/hpgl.c (revision 31017) @@ -120,7 +120,7 @@ ctx.conf.arc = load_arc; ctx.conf.poly = load_poly; - f = pcb_fopen(&PCB->hidlib, fname, "r"); + f = rnd_fopen(&PCB->hidlib, fname, "r"); if (f == NULL) { rnd_message(RND_MSG_ERROR, "Error opening HP-GL %s for read\n", fname); return 1; Index: trunk/src_plugins/import_ipcd356/ipcd356.c =================================================================== --- trunk/src_plugins/import_ipcd356/ipcd356.c (revision 31016) +++ trunk/src_plugins/import_ipcd356/ipcd356.c (revision 31017) @@ -381,7 +381,7 @@ } } - f = pcb_fopen(&PCB->hidlib, fname, "r"); + f = rnd_fopen(&PCB->hidlib, fname, "r"); if (f == NULL) { rnd_message(RND_MSG_ERROR, "Can't open %s for read\n", fname); RND_ACT_IRES(1); @@ -446,7 +446,7 @@ if ((aspects != IMPORT_ASPECT_NETLIST) || (numargs != 1)) return 0; /* only pure netlist import is supported */ - f = pcb_fopen(&PCB->hidlib, args[0], "r"); + f = rnd_fopen(&PCB->hidlib, args[0], "r"); if (f == NULL) return 0; Index: trunk/src_plugins/import_ltspice/ltspice.c =================================================================== --- trunk/src_plugins/import_ltspice/ltspice.c (revision 31016) +++ trunk/src_plugins/import_ltspice/ltspice.c (revision 31017) @@ -234,12 +234,12 @@ FILE *fn, *fa; int ret = 0; - fn = pcb_fopen(&PCB->hidlib, fname_net, "r"); + fn = rnd_fopen(&PCB->hidlib, fname_net, "r"); if (fn == NULL) { rnd_message(RND_MSG_ERROR, "can't open file '%s' for read\n", fname_net); return -1; } - fa = pcb_fopen(&PCB->hidlib, fname_asc, "r"); + fa = rnd_fopen(&PCB->hidlib, fname_asc, "r"); if (fa == NULL) { rnd_message(RND_MSG_ERROR, "can't open file '%s' for read\n", fname_asc); fclose(fn); @@ -333,7 +333,7 @@ if (!rnd_file_readable(fname_net)) goto quit; - f = pcb_fopen(&PCB->hidlib, fname_asc, "r"); + f = rnd_fopen(&PCB->hidlib, fname_asc, "r"); if (f == NULL) goto quit; Index: trunk/src_plugins/import_mentor_sch/mentor_sch.c =================================================================== --- trunk/src_plugins/import_mentor_sch/mentor_sch.c (revision 31016) +++ trunk/src_plugins/import_mentor_sch/mentor_sch.c (revision 31017) @@ -222,7 +222,7 @@ int c, ret = 0; gsx_parse_res_t res; - fn = pcb_fopen(NULL, fname_net, "r"); + fn = rnd_fopen(NULL, fname_net, "r"); if (fn == NULL) { rnd_message(RND_MSG_ERROR, "can't open file '%s' for read\n", fname_net); return -1; Index: trunk/src_plugins/import_mentor_sch/netlist_helper.c =================================================================== --- trunk/src_plugins/import_mentor_sch/netlist_helper.c (revision 31016) +++ trunk/src_plugins/import_mentor_sch/netlist_helper.c (revision 31017) @@ -163,7 +163,7 @@ int cnt, argc, lineno; char line[1024], *argv[8]; - f = pcb_fopen(NULL, fn, "r"); + f = rnd_fopen(NULL, fn, "r"); if (f == NULL) return -1; Index: trunk/src_plugins/import_mucs/mucs.c =================================================================== --- trunk/src_plugins/import_mucs/mucs.c (revision 31016) +++ trunk/src_plugins/import_mucs/mucs.c (revision 31017) @@ -90,7 +90,7 @@ default_file = rnd_strdup(fname); } - fi = pcb_fopen(&PCB->hidlib, fname, "r"); + fi = rnd_fopen(&PCB->hidlib, fname, "r"); if (!fi) { rnd_message(RND_MSG_ERROR, "Can't load mucs unixplot file %s for read\n", fname); RND_ACT_IRES(1); Index: trunk/src_plugins/import_net_action/import_net_action.c =================================================================== --- trunk/src_plugins/import_net_action/import_net_action.c (revision 31016) +++ trunk/src_plugins/import_net_action/import_net_action.c (revision 31017) @@ -53,7 +53,7 @@ if ((aspects != IMPORT_ASPECT_NETLIST) || (numargs != 1)) return 0; /* only pure netlist import is supported from a single file*/ - f = pcb_fopen(&PCB->hidlib, args[0], "r"); + f = rnd_fopen(&PCB->hidlib, args[0], "r"); if (f == NULL) return 0; Index: trunk/src_plugins/import_net_cmd/import_net_cmd.c =================================================================== --- trunk/src_plugins/import_net_cmd/import_net_cmd.c (revision 31016) +++ trunk/src_plugins/import_net_cmd/import_net_cmd.c (revision 31017) @@ -76,7 +76,7 @@ rnd_setenv("IMPORT_NET_CMD_PCB", PCB->hidlib.filename, 1); rnd_setenv("IMPORT_NET_CMD_OUT", outfn, 1); - res = pcb_system(&PCB->hidlib, cmdline); + res = rnd_system(&PCB->hidlib, cmdline); if (res == 0) { if (verbose) rnd_message(RND_MSG_DEBUG, "pcb_net_cmd: about to run pcb_act_ExecuteFile, outfn='%s'\n", outfn); Index: trunk/src_plugins/import_netlist/import_netlist.c =================================================================== --- trunk/src_plugins/import_netlist/import_netlist.c (revision 31016) +++ trunk/src_plugins/import_netlist/import_netlist.c (revision 31017) @@ -71,7 +71,7 @@ ratcmd = conf_core.rc.rat_command; if (RND_EMPTY_STRING_P(ratcmd)) { - fp = pcb_fopen(&PCB->hidlib, filename, "r"); + fp = rnd_fopen(&PCB->hidlib, filename, "r"); if (!fp) { rnd_message(RND_MSG_ERROR, "Cannot open %s for reading", filename); return 1; @@ -87,7 +87,7 @@ command = rnd_build_argfn(conf_core.rc.rat_command, &p); /* open pipe to stdout of command */ - if (*command == '\0' || (fp = pcb_popen(&PCB->hidlib, command, "r")) == NULL) { + if (*command == '\0' || (fp = rnd_popen(&PCB->hidlib, command, "r")) == NULL) { rnd_popen_error_message(command); free(command); return 1; @@ -144,11 +144,11 @@ } if (!lines) { rnd_message(RND_MSG_ERROR, "Empty netlist file!\n"); - pcb_pclose(fp); + rnd_pclose(fp); return 1; } if (used_popen) - pcb_pclose(fp); + rnd_pclose(fp); else fclose(fp); pcb_ratspatch_make_edited(PCB); Index: trunk/src_plugins/import_pxm_gd/import_pxm_gd.c =================================================================== --- trunk/src_plugins/import_pxm_gd/import_pxm_gd.c (revision 31016) +++ trunk/src_plugins/import_pxm_gd/import_pxm_gd.c (revision 31017) @@ -45,7 +45,7 @@ gdImagePtr gdi; FILE *f; - f = pcb_fopen(hidlib, fn, "rb"); + f = rnd_fopen(hidlib, fn, "rb"); if (f == NULL) return -1; gdi = loader(f); Index: trunk/src_plugins/import_pxm_pnm/import_pxm_pnm.c =================================================================== --- trunk/src_plugins/import_pxm_pnm/import_pxm_pnm.c (revision 31016) +++ trunk/src_plugins/import_pxm_pnm/import_pxm_pnm.c (revision 31017) @@ -71,7 +71,7 @@ unsigned char *o; int n, type; - f = pcb_fopen(hidlib, fn, "rb"); + f = rnd_fopen(hidlib, fn, "rb"); if (f == NULL) return -1; Index: trunk/src_plugins/import_tinycad/tinycad.c =================================================================== --- trunk/src_plugins/import_tinycad/tinycad.c (revision 31016) +++ trunk/src_plugins/import_tinycad/tinycad.c (revision 31017) @@ -159,7 +159,7 @@ FILE *fn; int ret = 0; - fn = pcb_fopen(&PCB->hidlib, fname_net, "r"); + fn = rnd_fopen(&PCB->hidlib, fname_net, "r"); if (fn == NULL) { rnd_message(RND_MSG_ERROR, "can't open file '%s' for read\n", fname_net); return -1; @@ -204,7 +204,7 @@ if ((aspects != IMPORT_ASPECT_NETLIST) || (numargs != 1)) return 0; /* only pure netlist import is supported from a single file*/ - f = pcb_fopen(&PCB->hidlib, args[0], "r"); + f = rnd_fopen(&PCB->hidlib, args[0], "r"); if (f == NULL) return 0; Index: trunk/src_plugins/io_autotrax/read.c =================================================================== --- trunk/src_plugins/io_autotrax/read.c (revision 31016) +++ trunk/src_plugins/io_autotrax/read.c (revision 31017) @@ -1085,7 +1085,7 @@ char line[1024]; char *s; - FP = pcb_fopen(&Ptr->hidlib, Filename, "r"); + FP = rnd_fopen(&Ptr->hidlib, Filename, "r"); if (FP == NULL) return -1; Index: trunk/src_plugins/io_bxl/read.c =================================================================== --- trunk/src_plugins/io_bxl/read.c (revision 31016) +++ trunk/src_plugins/io_bxl/read.c (revision 31017) @@ -586,7 +586,7 @@ pcb_bxl_ctx_t bctx; pcb_bxl_STYPE lval; - f = pcb_fopen(hl, filename, "rb"); + f = rnd_fopen(hl, filename, "rb"); if (f == NULL) return -1; @@ -647,7 +647,7 @@ hdecode_t hctx; pcb_bxl_ureglex_t lctx; - f = pcb_fopen(hl, filename, "rb"); /* need to open it again, for binary access */ + f = rnd_fopen(hl, filename, "rb"); /* need to open it again, for binary access */ if (f == NULL) return 0; Index: trunk/src_plugins/io_dsn/read.c =================================================================== --- trunk/src_plugins/io_dsn/read.c (revision 31016) +++ trunk/src_plugins/io_dsn/read.c (revision 31017) @@ -1780,7 +1780,7 @@ long q_offs = -1, offs; - f = pcb_fopen(&PCB->hidlib, fn, "r"); + f = rnd_fopen(&PCB->hidlib, fn, "r"); if (f == NULL) return -1; Index: trunk/src_plugins/io_eagle/read_dru.c =================================================================== --- trunk/src_plugins/io_eagle/read_dru.c (revision 31016) +++ trunk/src_plugins/io_eagle/read_dru.c (revision 31017) @@ -167,7 +167,7 @@ static const char prefix[] = "io_eagle::dru::"; char tmp[256]; - f = pcb_fopen_fn(&PCB->hidlib, Filename, "r", &efn); + f = rnd_fopen_fn(&PCB->hidlib, Filename, "r", &efn); if (f == NULL) return -1; Index: trunk/src_plugins/io_eagle/trparse_bin.c =================================================================== --- trunk/src_plugins/io_eagle/trparse_bin.c (revision 31016) +++ trunk/src_plugins/io_eagle/trparse_bin.c (revision 31017) @@ -45,7 +45,7 @@ FILE *f; int res; - f = pcb_fopen(NULL, fn, "rb"); + f = rnd_fopen(NULL, fn, "rb"); if (f == NULL) return -1; Index: trunk/src_plugins/io_eagle/trparse_xml.c =================================================================== --- trunk/src_plugins/io_eagle/trparse_xml.c (revision 31016) +++ trunk/src_plugins/io_eagle/trparse_xml.c (revision 31017) @@ -45,7 +45,7 @@ FILE *f; char *efn; - f = pcb_fopen_fn(NULL, fn, "r", &efn); + f = rnd_fopen_fn(NULL, fn, "r", &efn); if (f == NULL) { rnd_message(RND_MSG_ERROR, "can't open '%s'\n", fn); return -1; Index: trunk/src_plugins/io_hyp/parser.c =================================================================== --- trunk/src_plugins/io_hyp/parser.c (revision 31016) +++ trunk/src_plugins/io_hyp/parser.c (revision 31017) @@ -330,7 +330,7 @@ hyyset_lineno(1); /* parse hyperlynx file */ - hyyin = pcb_fopen(&PCB->hidlib, fname, "r"); + hyyin = rnd_fopen(&PCB->hidlib, fname, "r"); if (hyyin == NULL) return 1; retval = hyyparse(); Index: trunk/src_plugins/io_kicad/read.c =================================================================== --- trunk/src_plugins/io_kicad/read.c (revision 31016) +++ trunk/src_plugins/io_kicad/read.c (revision 31017) @@ -2726,7 +2726,7 @@ gsx_parse_res_t res; FILE *FP; - FP = pcb_fopen(&PCB->hidlib, Filename, "r"); + FP = rnd_fopen(&PCB->hidlib, Filename, "r"); if (FP == NULL) return -1; Index: trunk/src_plugins/io_kicad/read_net.c =================================================================== --- trunk/src_plugins/io_kicad/read_net.c (revision 31016) +++ trunk/src_plugins/io_kicad/read_net.c (revision 31017) @@ -184,7 +184,7 @@ int c, ret = 0; gsx_parse_res_t res; - fn = pcb_fopen(&PCB->hidlib, fname_net, "r"); + fn = rnd_fopen(&PCB->hidlib, fname_net, "r"); if (fn == NULL) { rnd_message(RND_MSG_ERROR, "can't open file '%s' for read\n", fname_net); return -1; @@ -248,7 +248,7 @@ if ((aspects != IMPORT_ASPECT_NETLIST) && (numargs == 1)) return 0; /* only pure netlist import is supported with a single input file */ - f = pcb_fopen(&PCB->hidlib, args[0], "r"); + f = rnd_fopen(&PCB->hidlib, args[0], "r"); if (f == NULL) return 0; Index: trunk/src_plugins/io_lihata/read.c =================================================================== --- trunk/src_plugins/io_lihata/read.c (revision 31016) +++ trunk/src_plugins/io_lihata/read.c (revision 31017) @@ -2348,7 +2348,7 @@ cfg_dest = settings_dest; - realfn = pcb_fopen_check(NULL, Filename, "r"); + realfn = rnd_fopen_check(NULL, Filename, "r"); if (realfn != NULL) doc = lht_dom_load(realfn, &errmsg); free(realfn); @@ -2396,7 +2396,7 @@ cfg_dest = RND_CFR_invalid; - realfn = pcb_fopen_check(NULL, filename, "r"); + realfn = rnd_fopen_check(NULL, filename, "r"); if (realfn != NULL) doc = lht_dom_load(realfn, &errmsg); free(realfn); @@ -2492,7 +2492,7 @@ char *errmsg = NULL, *realfn; lht_doc_t *doc = NULL; - realfn = pcb_fopen_check(&PCB->hidlib, Filename, "r"); + realfn = rnd_fopen_check(&PCB->hidlib, Filename, "r"); if (realfn != NULL) doc = lht_dom_load(realfn, &errmsg); free(realfn); Index: trunk/src_plugins/io_lihata/write.c =================================================================== --- trunk/src_plugins/io_lihata/write.c (revision 31016) +++ trunk/src_plugins/io_lihata/write.c (revision 31017) @@ -1552,7 +1552,7 @@ lhtpers_ev_t events; if (old_filename != NULL) - inf = pcb_fopen(&PCB->hidlib, old_filename, "r"); + inf = rnd_fopen(&PCB->hidlib, old_filename, "r"); memset(&events, 0, sizeof(events)); events.text = check_text; @@ -1569,7 +1569,7 @@ if (res != 0) { FILE *fe; char *fe_name = rnd_concat(old_filename, ".mem.lht", NULL); - fe = pcb_fopen(&PCB->hidlib, fe_name, "w"); + fe = rnd_fopen(&PCB->hidlib, fe_name, "w"); if (fe != NULL) { clean_invalid(brd->root); /* remove invalid nodes placed for persistency */ res = lht_dom_export(brd->root, fe, ""); @@ -1624,7 +1624,7 @@ lht_doc_t *doc; - f = pcb_fopen_askovr(&PCB->hidlib, Filename, "w", NULL); + f = rnd_fopen_askovr(&PCB->hidlib, Filename, "w", NULL); if (f == NULL) { rnd_message(RND_MSG_ERROR, "Failed to open font file %s for write\n", Filename); return -1; Index: trunk/src_plugins/io_mentor_cell/read.c =================================================================== --- trunk/src_plugins/io_mentor_cell/read.c (revision 31016) +++ trunk/src_plugins/io_mentor_cell/read.c (revision 31017) @@ -1408,7 +1408,7 @@ memset(&ctx, 0, sizeof(ctx)); - flay = pcb_fopen(&pcb->hidlib, fn, "r"); + flay = rnd_fopen(&pcb->hidlib, fn, "r"); if (flay == NULL) { rnd_message(RND_MSG_ERROR, "can't open layout hkp '%s' for read\n", fn); goto err; Index: trunk/src_plugins/io_mentor_cell/read_net.c =================================================================== --- trunk/src_plugins/io_mentor_cell/read_net.c (revision 31016) +++ trunk/src_plugins/io_mentor_cell/read_net.c (revision 31017) @@ -58,7 +58,7 @@ node_t *n, *ncl, *nsch, *ns, *nln, *ndefault = NULL, *ncrs = NULL; hkp_tree_t nc_tree; /* no need to keep the tree in ctx, no data is needed after the function returns */ - fnc = pcb_fopen(&ctx->pcb->hidlib, fn, "r"); + fnc = rnd_fopen(&ctx->pcb->hidlib, fn, "r"); if (fnc == NULL) { rnd_message(RND_MSG_ERROR, "can't open netclass hkp '%s' for read\n", fn); return -1; @@ -142,7 +142,7 @@ node_t *p, *nnet, *pinsect; hkp_tree_t net_tree; /* no need to keep the tree in ctx, no data is needed after the function returns */ - fnet = pcb_fopen(&ctx->pcb->hidlib, fn, "r"); + fnet = rnd_fopen(&ctx->pcb->hidlib, fn, "r"); if (fnet == NULL) { rnd_message(RND_MSG_ERROR, "can't open netprops hkp '%s' for read\n", fn); return -1; Index: trunk/src_plugins/io_mentor_cell/read_pstk.c =================================================================== --- trunk/src_plugins/io_mentor_cell/read_pstk.c (revision 31016) +++ trunk/src_plugins/io_mentor_cell/read_pstk.c (revision 31017) @@ -395,7 +395,7 @@ FILE *fpstk; node_t *n; - fpstk = pcb_fopen(&ctx->pcb->hidlib, fn, "r"); + fpstk = rnd_fopen(&ctx->pcb->hidlib, fn, "r"); if (fpstk == NULL) { rnd_message(RND_MSG_ERROR, "can't open padstack hkp '%s' for read\n", fn); return -1; Index: trunk/src_plugins/io_pcb/parse_l.c =================================================================== --- trunk/src_plugins/io_pcb/parse_l.c (revision 31016) +++ trunk/src_plugins/io_pcb/parse_l.c (revision 31017) @@ -2621,7 +2621,7 @@ else sprintf(tmps, "%s", Filename); - yyin = pcb_fopen(NULL, tmps, "r"); + yyin = rnd_fopen(NULL, tmps, "r"); if (!yyin) { free(tmps); return (1); @@ -2637,7 +2637,7 @@ p.hidlib = &PCB->hidlib; command = rnd_build_argfn(Executable, &p); /* open pipe to stdout of command */ - if (*command == '\0' || (yyin = pcb_popen(NULL, command, "r")) == NULL) { + if (*command == '\0' || (yyin = rnd_popen(NULL, command, "r")) == NULL) { rnd_popen_error_message(command); free(command); return (1); @@ -2685,7 +2685,7 @@ return returncode; if (used_popen) - return (pcb_pclose(yyin) ? 1 : returncode); + return (rnd_pclose(yyin) ? 1 : returncode); return (fclose(yyin) ? 1 : returncode); } Index: trunk/src_plugins/io_pcb/parse_l.l =================================================================== --- trunk/src_plugins/io_pcb/parse_l.l (revision 31016) +++ trunk/src_plugins/io_pcb/parse_l.l (revision 31017) @@ -238,7 +238,7 @@ else sprintf(tmps, "%s", Filename); - yyin = pcb_fopen(NULL, tmps, "r"); + yyin = rnd_fopen(NULL, tmps, "r"); if (!yyin) { free(tmps); return (1); @@ -254,7 +254,7 @@ p.hidlib = &PCB->hidlib; command = rnd_build_argfn(Executable, &p); /* open pipe to stdout of command */ - if (*command == '\0' || (yyin = pcb_popen(NULL, command, "r")) == NULL) { + if (*command == '\0' || (yyin = rnd_popen(NULL, command, "r")) == NULL) { rnd_popen_error_message(command); free(command); return (1); @@ -302,7 +302,7 @@ return returncode; if (used_popen) - return (pcb_pclose(yyin) ? 1 : returncode); + return (rnd_pclose(yyin) ? 1 : returncode); return (fclose(yyin) ? 1 : returncode); } Index: trunk/src_plugins/io_tedax/footprint.c =================================================================== --- trunk/src_plugins/io_tedax/footprint.c (revision 31016) +++ trunk/src_plugins/io_tedax/footprint.c (revision 31017) @@ -314,7 +314,7 @@ int res; FILE *f; - f = pcb_fopen_askovr(&PCB->hidlib, fn, "w", NULL); + f = rnd_fopen_askovr(&PCB->hidlib, fn, "w", NULL); if (f == NULL) { rnd_message(RND_MSG_ERROR, "tedax_fp_save(): can't open %s for writing\n", fn); return -1; @@ -645,7 +645,7 @@ FILE *f; int ret = 0; - f = pcb_fopen(&PCB->hidlib, fn, "r"); + f = rnd_fopen(&PCB->hidlib, fn, "r"); if (f == NULL) { rnd_message(RND_MSG_ERROR, "can't open file '%s' for read\n", fn); return -1; Index: trunk/src_plugins/io_tedax/stackup.c =================================================================== --- trunk/src_plugins/io_tedax/stackup.c (revision 31016) +++ trunk/src_plugins/io_tedax/stackup.c (revision 31017) @@ -333,7 +333,7 @@ FILE *f; tedax_stackup_t ctx; - f = pcb_fopen_askovr(&PCB->hidlib, fn, "w", NULL); + f = rnd_fopen_askovr(&PCB->hidlib, fn, "w", NULL); if (f == NULL) { rnd_message(RND_MSG_ERROR, "tedax_stackup_save(): can't open %s for writing\n", fn); return -1; @@ -416,7 +416,7 @@ FILE *f; tedax_stackup_t ctx; - f = pcb_fopen(&PCB->hidlib, fn, "r"); + f = rnd_fopen(&PCB->hidlib, fn, "r"); if (f == NULL) { rnd_message(RND_MSG_ERROR, "tedax_stackup_load(): can't open %s for reading\n", fn); return -1; Index: trunk/src_plugins/io_tedax/tboard.c =================================================================== --- trunk/src_plugins/io_tedax/tboard.c (revision 31016) +++ trunk/src_plugins/io_tedax/tboard.c (revision 31017) @@ -256,7 +256,7 @@ int res; FILE *f; - f = pcb_fopen_askovr(&PCB->hidlib, fn, "w", NULL); + f = rnd_fopen_askovr(&PCB->hidlib, fn, "w", NULL); if (f == NULL) { rnd_message(RND_MSG_ERROR, "tedax_board_save(): can't open %s for writing\n", fn); return -1; @@ -543,7 +543,7 @@ int res; FILE *f; - f = pcb_fopen(&PCB->hidlib, fn, "r"); + f = rnd_fopen(&PCB->hidlib, fn, "r"); if (f == NULL) { rnd_message(RND_MSG_ERROR, "tedax_board_load(): can't open %s for reading\n", fn); return -1; Index: trunk/src_plugins/io_tedax/tdrc.c =================================================================== --- trunk/src_plugins/io_tedax/tdrc.c (revision 31016) +++ trunk/src_plugins/io_tedax/tdrc.c (revision 31017) @@ -77,7 +77,7 @@ int res; FILE *f; - f = pcb_fopen_askovr(&PCB->hidlib, fn, "w", NULL); + f = rnd_fopen_askovr(&PCB->hidlib, fn, "w", NULL); if (f == NULL) { rnd_message(RND_MSG_ERROR, "tedax_drc_save(): can't open %s for writing\n", fn); return -1; @@ -133,7 +133,7 @@ int res; FILE *f; - f = pcb_fopen(&PCB->hidlib, fn, "r"); + f = rnd_fopen(&PCB->hidlib, fn, "r"); if (f == NULL) { rnd_message(RND_MSG_ERROR, "tedax_drc_load(): can't open %s for reading\n", fn); return -1; Index: trunk/src_plugins/io_tedax/tetest.c =================================================================== --- trunk/src_plugins/io_tedax/tetest.c (revision 31016) +++ trunk/src_plugins/io_tedax/tetest.c (revision 31017) @@ -159,7 +159,7 @@ int res; FILE *f; - f = pcb_fopen_askovr(&PCB->hidlib, fn, "w", NULL); + f = rnd_fopen_askovr(&PCB->hidlib, fn, "w", NULL); if (f == NULL) { rnd_message(RND_MSG_ERROR, "tedax_etest_save(): can't open %s for writing\n", fn); return -1; Index: trunk/src_plugins/io_tedax/tlayer.c =================================================================== --- trunk/src_plugins/io_tedax/tlayer.c (revision 31016) +++ trunk/src_plugins/io_tedax/tlayer.c (revision 31017) @@ -129,7 +129,7 @@ int res; FILE *f; - f = pcb_fopen_askovr(&PCB->hidlib, fn, "w", NULL); + f = rnd_fopen_askovr(&PCB->hidlib, fn, "w", NULL); if (f == NULL) { rnd_message(RND_MSG_ERROR, "tedax_layer_save(): can't open %s for writing\n", fn); return -1; @@ -365,7 +365,7 @@ int res; FILE *f; - f = pcb_fopen(&PCB->hidlib, fn, "r"); + f = rnd_fopen(&PCB->hidlib, fn, "r"); if (f == NULL) { rnd_message(RND_MSG_ERROR, "tedax_layers_load(): can't open %s for reading\n", fn); return -1; Index: trunk/src_plugins/io_tedax/tnetlist.c =================================================================== --- trunk/src_plugins/io_tedax/tnetlist.c (revision 31016) +++ trunk/src_plugins/io_tedax/tnetlist.c (revision 31017) @@ -156,7 +156,7 @@ FILE *fn; int ret = 0; - fn = pcb_fopen(&PCB->hidlib, fname_net, "r"); + fn = rnd_fopen(&PCB->hidlib, fname_net, "r"); if (fn == NULL) { rnd_message(RND_MSG_ERROR, "can't open file '%s' for read\n", fname_net); return -1; @@ -232,7 +232,7 @@ int res; FILE *f; - f = pcb_fopen_askovr(&PCB->hidlib, fn, "w", NULL); + f = rnd_fopen_askovr(&PCB->hidlib, fn, "w", NULL); if (f == NULL) { rnd_message(RND_MSG_ERROR, "tedax_net_save(): can't open %s for writing\n", fn); return -1; @@ -255,7 +255,7 @@ return 0; /* only pure netlist import is supported from a single file*/ - f = pcb_fopen(&PCB->hidlib, args[0], "r"); + f = rnd_fopen(&PCB->hidlib, args[0], "r"); if (f == NULL) return 0; Index: trunk/src_plugins/lib_gtk_common/dlg_fileselect.c =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_fileselect.c (revision 31016) +++ trunk/src_plugins/lib_gtk_common/dlg_fileselect.c (revision 31017) @@ -140,7 +140,7 @@ } if ((default_file != NULL) && (*default_file != '\0')) { - if (pcb_is_dir(gctx->hidlib, default_file)) { + if (rnd_is_dir(gctx->hidlib, default_file)) { path = g_strdup(default_file); base = NULL; } Index: trunk/src_plugins/lib_hid_common/cli_history.c =================================================================== --- trunk/src_plugins/lib_hid_common/cli_history.c (revision 31016) +++ trunk/src_plugins/lib_hid_common/cli_history.c (revision 31017) @@ -184,7 +184,7 @@ real_fn = rnd_build_fn(NULL, CFG.file); /* no hidlib: we are loading from the user dir */ if (real_fn == NULL) return; - f = pcb_fopen(NULL, real_fn, "r"); + f = rnd_fopen(NULL, real_fn, "r"); free(real_fn); if (f == NULL) return; @@ -212,7 +212,7 @@ real_fn = rnd_build_fn(NULL, CFG.file); /* no hidlib: we are saving in user dir */ if (real_fn == NULL) return; - f = pcb_fopen(NULL, real_fn, "w"); + f = rnd_fopen(NULL, real_fn, "w"); free(real_fn); if (f == NULL) return; Index: trunk/src_plugins/lib_hid_common/place.c =================================================================== --- trunk/src_plugins/lib_hid_common/place.c (revision 31016) +++ trunk/src_plugins/lib_hid_common/place.c (revision 31017) @@ -257,7 +257,7 @@ htsw_entry_t *e; FILE *f; - f = pcb_fopen(hidlib, fn, "w"); + f = rnd_fopen(hidlib, fn, "w"); if (f == NULL) return -1; Index: trunk/src_plugins/lib_hid_pcbui/infobar.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/infobar.c (revision 31016) +++ trunk/src_plugins/lib_hid_pcbui/infobar.c (revision 31017) @@ -40,7 +40,7 @@ { rnd_actionva(hidlib, "InfoBarFileChanged", "close", NULL); if ((hidlib != NULL) && (hidlib->filename != NULL)) - last_date = pcb_file_mtime(NULL, PCB->hidlib.filename); + last_date = rnd_file_mtime(NULL, PCB->hidlib.filename); else last_date = -1; } @@ -58,7 +58,7 @@ if (infobar_timer_active) { /* check for file change */ if ((PCB != NULL) && (PCB->hidlib.filename != NULL)) { - double last_chg = pcb_file_mtime(NULL, PCB->hidlib.filename); + double last_chg = rnd_file_mtime(NULL, PCB->hidlib.filename); if (last_chg > last_date) { last_date = last_chg; rnd_actionva(&PCB->hidlib, "InfoBarFileChanged", "open", NULL); @@ -90,7 +90,7 @@ static void pcb_infobar_fn_chg_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { if ((PCB != NULL) && (PCB->hidlib.filename != NULL)) { - last_date = pcb_file_mtime(NULL, PCB->hidlib.filename); + last_date = rnd_file_mtime(NULL, PCB->hidlib.filename); rnd_actionva(hidlib, "InfoBarFileChanged", "close", NULL); } } Index: trunk/src_plugins/lib_wget/lib_wget.c =================================================================== --- trunk/src_plugins/lib_wget/lib_wget.c (revision 31016) +++ trunk/src_plugins/lib_wget/lib_wget.c (revision 31017) @@ -71,7 +71,7 @@ int res; char *cmd = pcb_wget_command(url, ofn, update, opts); - res = pcb_system(NULL, cmd); + res = rnd_system(NULL, cmd); free(cmd); return res; } @@ -81,7 +81,7 @@ FILE *f; char *cmd = pcb_wget_command(url, "-", update, opts); - f = pcb_popen(NULL, cmd, "r"); + f = rnd_popen(NULL, cmd, "r"); free(cmd); return f; } Index: trunk/src_plugins/order_pcbway/pcbway.c =================================================================== --- trunk/src_plugins/order_pcbway/pcbway.c (revision 31016) +++ trunk/src_plugins/order_pcbway/pcbway.c (revision 31017) @@ -69,7 +69,7 @@ { double mt, now = rnd_dtime(); - mt = pcb_file_mtime(hidlib, path); + mt = rnd_file_mtime(hidlib, path); if (update || (mt < 0) || ((now - mt) > CFG.cache_update_sec)) { if (CFG.verbose) { if (update) @@ -103,7 +103,7 @@ cachedir = rnd_build_fn(hidlib, conf_order.plugins.order.cache); - pcb_mkdir(hidlib, cachedir, 0755); + rnd_mkdir(hidlib, cachedir, 0755); wopts.post_file = "/dev/null"; path = rnd_strdup_printf("%s%cGetCountry", cachedir, RND_DIR_SEPARATOR_C); if (pcbway_cahce_update_(hidlib, SERVER "/api/Address/GetCountry", path, 0, &wopts) != 0) { @@ -134,7 +134,7 @@ FILE *f; char *efn = NULL; - f = pcb_fopen_fn(NULL, fn, "r", &efn); + f = rnd_fopen_fn(NULL, fn, "r", &efn); if (f == NULL) { rnd_message(RND_MSG_ERROR, "pcbway: can't open '%s' (%s) for read\n", fn, efn); free(efn); @@ -464,7 +464,7 @@ return; } - fx = pcb_fopen(&PCB->hidlib, tmpfn, "w"); + fx = rnd_fopen(&PCB->hidlib, tmpfn, "w"); if (fx == NULL) { rnd_tempfile_unlink(tmpfn); rnd_message(RND_MSG_ERROR, "order_pcbway: can't open temp file\n"); Index: trunk/src_plugins/renumber/renumber.c =================================================================== --- trunk/src_plugins/renumber/renumber.c (revision 31016) +++ trunk/src_plugins/renumber/renumber.c (revision 31017) @@ -105,7 +105,7 @@ default_file = rnd_strdup(name); } - if ((out = pcb_fopen(&PCB->hidlib, name, "r"))) { + if ((out = rnd_fopen(&PCB->hidlib, name, "r"))) { fclose(out); if (rnd_hid_message_box(&PCB->hidlib, "warning", "Renumber: overwrite", "File exists! Ok to overwrite?", "cancel", 0, "overwrite", 1, NULL) != 1) { if (free_name && name) @@ -115,7 +115,7 @@ } } - if ((out = pcb_fopen_askovr(&PCB->hidlib, name, "w", NULL)) == NULL) { + if ((out = rnd_fopen_askovr(&PCB->hidlib, name, "w", NULL)) == NULL) { rnd_message(RND_MSG_ERROR, "Could not open %s\n", name); if (free_name && name) free((char*)name); Index: trunk/src_plugins/script/live_script.c =================================================================== --- trunk/src_plugins/script/live_script.c (revision 31016) +++ trunk/src_plugins/script/live_script.c (revision 31017) @@ -130,7 +130,7 @@ strcpy(fn_end, de->d_name); - f = pcb_fopen(hl, fn, "r"); + f = rnd_fopen(hl, fn, "r"); if (f == NULL) continue; while((s = fgets(line, sizeof(line), f)) != NULL) { @@ -288,7 +288,7 @@ long numu; fn = rnd_tempfile_name_new("live_script"); - f = pcb_fopen(hl, fn, "w"); + f = rnd_fopen(hl, fn, "w"); if (f == NULL) { rnd_tempfile_unlink(fn); rnd_message(RND_MSG_ERROR, "live_script: can't open temp file for write\n"); @@ -364,7 +364,7 @@ return 0; } - f = pcb_fopen(hl, fn, "r"); + f = rnd_fopen(hl, fn, "r"); if (f == NULL) { rnd_message(RND_MSG_ERROR, "live_script: failed to open '%s' for read\n", fn); return -1; @@ -410,7 +410,7 @@ return 0; } - f = pcb_fopen(hl, fn, "w"); + f = rnd_fopen(hl, fn, "w"); if (f == NULL) { rnd_message(RND_MSG_ERROR, "live_script: failed to open '%s' for write\n", fn); return -1; Index: trunk/src_plugins/script/perma.c =================================================================== --- trunk/src_plugins/script/perma.c (revision 31016) +++ trunk/src_plugins/script/perma.c (revision 31017) @@ -59,7 +59,7 @@ long succ = 0; rnd_snprintf(path, sizeof(path), "%s%c%s", dir, RND_DIR_SEPARATOR_C, "scripts.lht"); - f = pcb_fopen(NULL, path, "r"); + f = rnd_fopen(NULL, path, "r"); if (f == NULL) return; /* non-existing or unreadable file is no error */ doc = lht_dom_load_stream(f, path, &errmsg); Index: trunk/src_plugins/script/script.c =================================================================== --- trunk/src_plugins/script/script.c (revision 31016) +++ trunk/src_plugins/script/script.c (revision 31017) @@ -86,16 +86,16 @@ gds_append_str(&fn, rnd_conf.rc.path.home); gds_append(&fn, RND_DIR_SEPARATOR_C); gds_append_str(&fn, DOT_PCB_RND); - pcb_mkdir(NULL, fn.array, 0755); + rnd_mkdir(NULL, fn.array, 0755); gds_append(&fn, RND_DIR_SEPARATOR_C); gds_append_str(&fn, SCRIPT_PERS); - pcb_mkdir(NULL, fn.array, 0750); + rnd_mkdir(NULL, fn.array, 0750); gds_append(&fn, RND_DIR_SEPARATOR_C); gds_append_str(&fn, s->obj->name); - f = pcb_fopen(NULL, fn.array, "w"); + f = rnd_fopen(NULL, fn.array, "w"); if (f != NULL) { gds_uninit(&fn); fputs(data, f); @@ -175,13 +175,13 @@ fn = rnd_concat(rnd_conf.rc.path.home, RND_DIR_SEPARATOR_S, DOT_PCB_RND, RND_DIR_SEPARATOR_S, SCRIPT_PERS, RND_DIR_SEPARATOR_S, script_persistency_id, NULL); if (strcmp(cmd, "remove") == 0) { - RND_ACT_IRES(pcb_remove(NULL, fn)); + RND_ACT_IRES(rnd_remove(NULL, fn)); goto succ; } if (strcmp(cmd, "read") == 0) { FILE *f; - long fsize = pcb_file_size(NULL, fn); + long fsize = rnd_file_size(NULL, fn); char *data; if ((fsize < 0) || (fsize > PERS_MAX_SIZE)) @@ -191,7 +191,7 @@ if (data == NULL) goto err; - f = pcb_fopen(NULL, fn, "r"); + f = rnd_fopen(NULL, fn, "r"); if (f == NULL) { free(data); goto err; @@ -393,7 +393,7 @@ int res = 0; fn = rnd_tempfile_name_new("oneliner"); - f = pcb_fopen(NULL, fn, "w"); + f = rnd_fopen(NULL, fn, "w"); if (f == NULL) { rnd_tempfile_unlink(fn); rnd_message(RND_MSG_ERROR, "script oneliner: can't open temp file for write\n"); Index: trunk/util/gsch2pcb-rnd/gsch2pcb.c =================================================================== --- trunk/util/gsch2pcb-rnd/gsch2pcb.c (revision 31016) +++ trunk/util/gsch2pcb-rnd/gsch2pcb.c (revision 31017) @@ -23,7 +23,7 @@ - use getenv() instead of g_getenv(): on windows this won't do recursive variable expansion - use rnd-specific .scm - use pcb-rnd's conf system - - use pcb_popen() instead of glib's spawn (stderr is always printed to stderr) + - use rnd_popen() instead of glib's spawn (stderr is always printed to stderr) */ #include "config.h" @@ -215,7 +215,7 @@ char *s, buf[1024], config[32], arg[768]; int n; - f = pcb_fopen(NULL, path, "r"); + f = rnd_fopen(NULL, path, "r"); if (!f) return; Index: trunk/util/gsch2pcb-rnd/help.c =================================================================== --- trunk/util/gsch2pcb-rnd/help.c (revision 31016) +++ trunk/util/gsch2pcb-rnd/help.c (revision 31017) @@ -22,7 +22,7 @@ Behavior different from the original: - use getenv() instead of g_getenv(): on windows this won't do recursive variable expansion - use rnd-specific .scm - - use pcb_popen() instead of glib's spawn (stderr is always printed to stderr) + - use rnd_popen() instead of glib's spawn (stderr is always printed to stderr) */ #include "config.h" #include "method.h" Index: trunk/util/gsch2pcb-rnd/run.c =================================================================== --- trunk/util/gsch2pcb-rnd/run.c (revision 31016) +++ trunk/util/gsch2pcb-rnd/run.c (revision 31017) @@ -112,13 +112,13 @@ printf("%s", SEP_STRING); } - f = pcb_popen(NULL, cmd, "r"); + f = rnd_popen(NULL, cmd, "r"); while(fgets(line, sizeof(line), f) != NULL) { if (conf_g2pr.utils.gsch2pcb_rnd.verbose) fputs(line, stdout); } - if (pcb_pclose(f) == 0) + if (rnd_pclose(f) == 0) result = TRUE; else fprintf(stderr, "Failed to execute external program\n");