Index: trunk/doc-rnd/hacking/renames =================================================================== --- trunk/doc-rnd/hacking/renames (revision 4978) +++ trunk/doc-rnd/hacking/renames (revision 4979) @@ -611,3 +611,10 @@ resolve_path_inplace -> pcb_path_resolve_inplace resolve_paths -> pcb_paths_resolve resolve_all_paths -> pcb_paths_resolve_all +fp_fopen -> pcb_fp_fopen +fp_fclose -> pcb_fp_fclose +fp_dupname -> pcb_fp_dupname +fp_tagname -> pcb_fp_tagname +fp_uninit -> pcb_fp_uninit +fp_tag -> pcb_fp_tag +fp_init -> pcb_fp_init Index: trunk/src/main.c =================================================================== --- trunk/src/main.c (revision 4978) +++ trunk/src/main.c (revision 4979) @@ -235,7 +235,7 @@ pcb_strflg_uninit_buf(); pcb_strflg_uninit_layerlist(); - fp_uninit(); + pcb_fp_uninit(); fp_host_uninit(); pcb_funchash_uninit(); free(hid_argv_orig); @@ -349,7 +349,7 @@ setbuf(stdout, 0); InitPaths(argv[0]); - fp_init(); + pcb_fp_init(); #ifdef LOCALEDIR bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR); Index: trunk/src/plug_footprint.c =================================================================== --- trunk/src/plug_footprint.c (revision 4978) +++ trunk/src/plug_footprint.c (revision 4979) @@ -38,7 +38,7 @@ pcb_plug_fp_t *plug_fp_chain = NULL; pcb_fplibrary_t library; -int fp_dupname(const char *name, char **basename, char **params) +int pcb_fp_dupname(const char *name, char **basename, char **params) { char *newname, *s; @@ -63,7 +63,7 @@ static htsp_t *fp_tags = NULL; -const void *fp_tag(const char *tag, int alloc) +const void *pcb_fp_tag(const char *tag, int alloc) { htsp_entry_t *e; static char *counter = NULL; @@ -79,13 +79,13 @@ return e == NULL ? NULL : e->key; } -void fp_init() +void pcb_fp_init() { library.type = LIB_DIR; library.name = pcb_strdup("/"); /* All names are eventually free()'d */ } -void fp_uninit() +void pcb_fp_uninit() { htsp_entry_t *e; fp_free_children(&library); @@ -97,12 +97,12 @@ } } -const char *fp_tagname(const void *tagid) +const char *pcb_fp_tagname(const void *tagid) { return (char *) tagid; } -FILE *fp_fopen(const char *path, const char *name, pcb_fp_fopen_ctx_t *fctx) +FILE *pcb_fp_fopen(const char *path, const char *name, pcb_fp_fopen_ctx_t *fctx) { FILE *res = NULL; HOOK_CALL(pcb_plug_fp_t, plug_fp_chain, fopen, res, != NULL, (self, path, name, fctx)); @@ -109,7 +109,7 @@ return res; } -void fp_fclose(FILE * f, pcb_fp_fopen_ctx_t *fctx) +void pcb_fp_fclose(FILE * f, pcb_fp_fopen_ctx_t *fctx) { if (fctx->backend->fclose != NULL) fctx->backend->fclose(fctx->backend, f, fctx); Index: trunk/src/plug_footprint.h =================================================================== --- trunk/src/plug_footprint.h (revision 4978) +++ trunk/src/plug_footprint.h (revision 4979) @@ -15,8 +15,8 @@ } pcb_fp_fopen_ctx_t; /* hook bindings, see below */ -FILE *fp_fopen(const char *path, const char *name, pcb_fp_fopen_ctx_t *fctx); -void fp_fclose(FILE * f, pcb_fp_fopen_ctx_t *fctx); +FILE *pcb_fp_fopen(const char *path, const char *name, pcb_fp_fopen_ctx_t *fctx); +void pcb_fp_fclose(FILE * f, pcb_fp_fopen_ctx_t *fctx); /* duplicates the name and splits it into a basename and params; params is NULL if the name is not parametric (and "" if parameter list is empty) @@ -23,18 +23,18 @@ returns 1 if name is parametric, 0 if file element. The caller shall free only *basename at the end. */ -int fp_dupname(const char *name, char **basename, char **params); +int pcb_fp_dupname(const char *name, char **basename, char **params); /**** tag management ****/ /* Resolve a tag name to an unique void * ID; create unknown tag if alloc != 0 */ -const void *fp_tag(const char *tag, int alloc); +const void *pcb_fp_tag(const char *tag, int alloc); /* Resolve a tag ID to a tag name */ -const char *fp_tagname(const void *tagid); +const char *pcb_fp_tagname(const void *tagid); /* init/uninit the footprint lib, free tag key memory */ -void fp_init(); -void fp_uninit(); +void pcb_fp_init(); +void pcb_fp_uninit(); /**************************** API definition *********************************/ struct pcb_plug_fp_s { @@ -48,12 +48,12 @@ /* Open a footprint for reading; if the footprint is parametric, it's run prefixed with libshell (or executed directly, if libshell is NULL). If name is not an absolute path, search_path is searched for the first match. - The user has to supply a state integer that will be used by pcb_fp_fclose(). + The user has to supply a state integer that will be used by pcb_pcb_fp_fclose(). Must fill in fctx->backend, may use any other field of fctx as well. */ FILE *(*fopen)(pcb_plug_fp_t *ctx, const char *path, const char *name, pcb_fp_fopen_ctx_t *fctx); -/* Close the footprint file opened by pcb_fp_fopen(). */ +/* Close the footprint file opened by pcb_pcb_fp_fopen(). */ void (*fclose)(pcb_plug_fp_t *ctx, FILE * f, pcb_fp_fopen_ctx_t *fctx); }; Index: trunk/src_plugins/fp_fs/fp_fs.c =================================================================== --- trunk/src_plugins/fp_fs/fp_fs.c (revision 4978) +++ trunk/src_plugins/fp_fs/fp_fs.c (revision 4979) @@ -418,7 +418,7 @@ Talloced += 8; *tags = realloc(*tags, (Talloced + 1) * sizeof(void *)); } - (*tags)[Tused] = (void *) fp_tag(tag, 1); + (*tags)[Tused] = (void *) pcb_fp_tag(tag, 1); Tused++; (*tags)[Tused] = NULL; } @@ -452,7 +452,7 @@ FILE *f = NULL; const char *libshell = conf_core.rc.library_shell; - fctx->field[F_IS_PARAMETRIC].i = fp_dupname(name, &basename, ¶ms); + fctx->field[F_IS_PARAMETRIC].i = pcb_fp_dupname(name, &basename, ¶ms); if (basename == NULL) return NULL; Index: trunk/src_plugins/hid_gtk/gui-library-window.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-library-window.c (revision 4978) +++ trunk/src_plugins/hid_gtk/gui-library-window.c (revision 4979) @@ -281,7 +281,7 @@ while (isspace(*next)) next++; } - need = fp_tag(tag, 0); + need = pcb_fp_tag(tag, 0); fprintf(stderr, "TAG: '%s' %p\n", tag, (void *)need); if (need == NULL) { ret = FALSE; @@ -410,7 +410,7 @@ void **t; for (t = entry->data.fp.tags; *t != NULL; t++) { - const char *name = fp_tagname(*t); + const char *name = pcb_fp_tagname(*t); if (name != NULL) { g_string_append(pt, "\n "); g_string_append(pt, name); Index: trunk/src_plugins/io_pcb/parse_l.c =================================================================== --- trunk/src_plugins/io_pcb/parse_l.c (revision 4978) +++ trunk/src_plugins/io_pcb/parse_l.c (revision 4979) @@ -2467,7 +2467,7 @@ yyFont = &PCB->Font; yyElement = NULL; - f = fp_fopen(fp_default_search_path(), name, &st); + f = pcb_fp_fopen(fp_default_search_path(), name, &st); if (f == NULL) return -1; @@ -2474,7 +2474,7 @@ ret = Parse(f, NULL,NULL,NULL); - fp_fclose(f, &st); + pcb_fp_fclose(f, &st); return(ret); } Index: trunk/src_plugins/io_pcb/parse_l.l =================================================================== --- trunk/src_plugins/io_pcb/parse_l.l (revision 4978) +++ trunk/src_plugins/io_pcb/parse_l.l (revision 4979) @@ -326,7 +326,7 @@ yyFont = &PCB->Font; yyElement = NULL; - f = fp_fopen(fp_default_search_path(), name, &st); + f = pcb_fp_fopen(fp_default_search_path(), name, &st); if (f == NULL) return -1; @@ -333,7 +333,7 @@ ret = Parse(f, NULL,NULL,NULL); - fp_fclose(f, &st); + pcb_fp_fclose(f, &st); return(ret); } Index: trunk/util/gsch2pcb-rnd/gsch2pcb.c =================================================================== --- trunk/util/gsch2pcb-rnd/gsch2pcb.c (revision 4978) +++ trunk/util/gsch2pcb-rnd/gsch2pcb.c (revision 4979) @@ -797,7 +797,7 @@ if (conf_g2pr.utils.gsch2pcb_rnd.verbose) printf("%s: need new element for footprint %s (value=%s)\n", el->refdes, el->description, el->value); - fp = fp_fopen(element_search_path, el->description, &fctx); + fp = pcb_fp_fopen(element_search_path, el->description, &fctx); if (fp == NULL && conf_g2pr.utils.gsch2pcb_rnd.verbose) printf("\tNo file element found.\n"); @@ -819,7 +819,7 @@ } } if (fp != NULL) - fp_fclose(fp, &fctx); + pcb_fp_fclose(fp, &fctx); } pcb_element_free(el); @@ -1227,7 +1227,7 @@ conf_update(NULL); /* because of CLI changes */ - fp_init(); + pcb_fp_init(); element_search_path = fp_default_search_path();