Index: trunk/src/conf.c =================================================================== --- trunk/src/conf.c (revision 26978) +++ trunk/src/conf.c (revision 26979) @@ -664,7 +664,7 @@ { lht_node_t *s, *prev; int res = 0; - conf_listitem_t *i; + pcb_conf_listitem_t *i; switch(pol) { case POL_DISABLE: @@ -679,7 +679,7 @@ else prev = NULL; if (s->type == LHT_TEXT) { - i = calloc(sizeof(conf_listitem_t), 1); + i = calloc(sizeof(pcb_conf_listitem_t), 1); i->name = s->name; i->val.string = &i->payload; i->prop.prio = prio; @@ -688,7 +688,7 @@ free(i); continue; } - conflist_insert(dest->val.list, i); + pcb_conflist_insert(dest->val.list, i); dest->used |= 1; } else { @@ -699,8 +699,8 @@ break; case POL_OVERWRITE: /* overwrite the whole list: make it empty then append new elements */ - while((i = conflist_first(dest->val.list)) != NULL) { - conflist_remove(i); + while((i = pcb_conflist_first(dest->val.list)) != NULL) { + pcb_conflist_remove(i); free(i); } /* fall through */ @@ -707,7 +707,7 @@ case POL_APPEND: for(s = src_lst->data.list.first; s != NULL; s = s->next) { if (s->type == LHT_TEXT) { - i = calloc(sizeof(conf_listitem_t), 1); + i = calloc(sizeof(pcb_conf_listitem_t), 1); i->name = s->name; i->val.string = &i->payload; i->prop.prio = prio; @@ -716,7 +716,7 @@ free(i); continue; } - conflist_append(dest->val.list, i); + pcb_conflist_append(dest->val.list, i); dest->used |= 1; } else { @@ -996,9 +996,9 @@ case CFN_UNIT: clr(unit); break; case CFN_COLOR: clr(color); break; case CFN_LIST: - while(conflist_first(f->val.list)) { /* need to free all items of a list before clearing the main struct */ - conf_listitem_t *i = conflist_first(f->val.list); - conflist_remove(i); + while(pcb_conflist_first(f->val.list)) { /* need to free all items of a list before clearing the main struct */ + pcb_conf_listitem_t *i = pcb_conflist_first(f->val.list); + pcb_conflist_remove(i); free(i); } clr(list); @@ -1249,9 +1249,9 @@ void pcb_conf_free_native(conf_native_t *node) { if (node->type == CFN_LIST) { - while(conflist_first(node->val.list) != NULL) { - conf_listitem_t *first = conflist_first(node->val.list); - conflist_remove(first); + while(pcb_conflist_first(node->val.list) != NULL) { + pcb_conf_listitem_t *first = pcb_conflist_first(node->val.list); + pcb_conflist_remove(first); free(first); } } @@ -1702,9 +1702,9 @@ gds_init(&s); if (n->type == CFN_LIST) { - conf_listitem_t *it; + pcb_conf_listitem_t *it; ch = lht_dom_node_alloc(LHT_LIST, name+1); - for(it = conflist_first(n->val.list); it != NULL; it = conflist_next(it)) { + for(it = pcb_conflist_first(n->val.list); it != NULL; it = pcb_conflist_next(it)) { lht_node_t *txt; txt = lht_dom_node_alloc(LHT_TEXT, ""); txt->data.text.value = pcb_strdup(it->payload); @@ -1853,10 +1853,10 @@ } -conf_listitem_t *pcb_conf_list_first_str(conflist_t *list, const char **item_str, int *idx) +pcb_conf_listitem_t *pcb_conf_list_first_str(pcb_conflist_t *list, const char **item_str, int *idx) { - conf_listitem_t *item_li; - item_li = conflist_first(list); + pcb_conf_listitem_t *item_li; + item_li = pcb_conflist_first(list); if (item_li == NULL) return NULL; if (item_li->type == CFN_STRING) { @@ -1866,9 +1866,9 @@ return pcb_conf_list_next_str(item_li, item_str, idx); } -conf_listitem_t *pcb_conf_list_next_str(conf_listitem_t *item_li, const char **item_str, int *idx) +pcb_conf_listitem_t *pcb_conf_list_next_str(pcb_conf_listitem_t *item_li, const char **item_str, int *idx) { - while((item_li = conflist_next(item_li)) != NULL) { + while((item_li = pcb_conflist_next(item_li)) != NULL) { (*idx)++; if (item_li->type != CFN_STRING) continue; @@ -1882,10 +1882,10 @@ return item_li; } -const char *pcb_conf_concat_strlist(const conflist_t *lst, gds_t *buff, int *inited, char sep) +const char *pcb_conf_concat_strlist(const pcb_conflist_t *lst, gds_t *buff, int *inited, char sep) { int n; - conf_listitem_t *ci; + pcb_conf_listitem_t *ci; if ((inited == NULL) || (!*inited)) { gds_init(buff); @@ -1895,7 +1895,7 @@ else gds_truncate(buff, 0); - for (n = 0, ci = conflist_first((conflist_t *)lst); ci != NULL; ci = conflist_next(ci), n++) { + for (n = 0, ci = pcb_conflist_first((pcb_conflist_t *)lst); ci != NULL; ci = pcb_conflist_next(ci), n++) { const char *p = ci->val.string[0]; if (ci->type != CFN_STRING) continue; @@ -1993,10 +1993,10 @@ case CFN_COLOR: print_str_or_null(pfn, ctx, verbose, val->color[idx].str, val->color[idx].str); break; case CFN_LIST: { - conf_listitem_t *n; - if (conflist_length(val->list) > 0) { + pcb_conf_listitem_t *n; + if (pcb_conflist_length(val->list) > 0) { ret += pfn(ctx, "{"); - for(n = conflist_first(val->list); n != NULL; n = conflist_next(n)) { + for(n = pcb_conflist_first(val->list); n != NULL; n = pcb_conflist_next(n)) { pcb_conf_print_native_field(pfn, ctx, verbose, &n->val, n->type, &n->prop, 0); ret += pfn(ctx, ";"); } Index: trunk/src/conf.h =================================================================== --- trunk/src/conf.h (revision 26978) +++ trunk/src/conf.h (revision 26979) @@ -35,7 +35,7 @@ #include "unit.h" typedef union confitem_u confitem_t ; -typedef struct conf_listitem_s conf_listitem_t; +typedef struct conf_listitem_s pcb_conf_listitem_t; #include "list_conf.h" @@ -61,7 +61,7 @@ typedef pcb_coord_t CFT_COORD; typedef pcb_unit_t * CFT_UNIT; typedef pcb_color_t CFT_COLOR; -typedef conflist_t CFT_LIST; +typedef pcb_conflist_t CFT_LIST; typedef enum { CFN_STRING, @@ -83,7 +83,7 @@ pcb_coord_t *coord; const pcb_unit_t **unit; pcb_color_t *color; - conflist_t *list; + pcb_conflist_t *list; void *any; }; @@ -289,11 +289,11 @@ #define conf_list_foreach_path_first(hidlib, res, conf_list, call) \ do { \ - conf_listitem_t *__n__; \ - const conflist_t *__lst1__ = (conf_list); \ - conflist_t *__lst__ = (conflist_t *)(__lst1__); \ + pcb_conf_listitem_t *__n__; \ + const pcb_conflist_t *__lst1__ = (conf_list); \ + pcb_conflist_t *__lst__ = (pcb_conflist_t *)(__lst1__); \ if (__lst__ != NULL) { \ - for(__n__ = conflist_first(__lst__); __n__ != NULL; __n__ = conflist_next(__n__)) { \ + for(__n__ = pcb_conflist_first(__lst__); __n__ != NULL; __n__ = pcb_conflist_next(__n__)) { \ char *__path__; \ const char **__in__ = __n__->val.string; \ if (__in__ == NULL) \ @@ -345,20 +345,20 @@ lht_node_t *pcb_conf_lht_get_first(conf_role_t target, int create); /* loop helper */ -conf_listitem_t *pcb_conf_list_first_str(conflist_t *list, const char **item_str, int *idx); -conf_listitem_t *pcb_conf_list_next_str(conf_listitem_t *item_li, const char **item_str, int *idx); +pcb_conf_listitem_t *pcb_conf_list_first_str(pcb_conflist_t *list, const char **item_str, int *idx); +pcb_conf_listitem_t *pcb_conf_list_next_str(pcb_conf_listitem_t *item_li, const char **item_str, int *idx); -/*conf_listitem_t *item;*/ +/*pcb_conf_listitem_t *item;*/ #define conf_loop_list(list, item, idx) \ - for (idx = 0, item = conflist_first((conflist_t *)list); item != NULL; item = conflist_next(item), idx++) + for (idx = 0, item = pcb_conflist_first((pcb_conflist_t *)list); item != NULL; item = pcb_conflist_next(item), idx++) -/*conf_listitem_t *item; const char *item_str; */ +/*pcb_conf_listitem_t *item; const char *item_str; */ #define conf_loop_list_str(list, item_li, item_str, idx) \ - for (idx = 0, item_li = pcb_conf_list_first_str((conflist_t *)list, &item_str, &idx); \ + for (idx = 0, item_li = pcb_conf_list_first_str((pcb_conflist_t *)list, &item_str, &idx); \ item_li != NULL;\ item_li = pcb_conf_list_next_str(item_li, &item_str, &idx)) -const char *pcb_conf_concat_strlist(const conflist_t *lst, gds_t *buff, int *inited, char sep); +const char *pcb_conf_concat_strlist(const pcb_conflist_t *lst, gds_t *buff, int *inited, char sep); /* Print usage help for all nodes that have the CFF_USAGE flag and whose path starts with prefix (if prefix != NULL) */ Index: trunk/src/grid.c =================================================================== --- trunk/src/grid.c (revision 26978) +++ trunk/src/grid.c (revision 26979) @@ -181,9 +181,9 @@ pcb_bool_t pcb_grid_list_jump(pcb_hidlib_t *hidlib, int dst) { - const conf_listitem_t *li; + const pcb_conf_listitem_t *li; pcb_grid_t g; - int max = conflist_length((conflist_t *)&pcbhl_conf.editor.grids); + int max = pcb_conflist_length((pcb_conflist_t *)&pcbhl_conf.editor.grids); if (dst < 0) dst = 0; @@ -194,7 +194,7 @@ pcb_conf_setf(CFR_DESIGN, "editor/grids_idx", -1, "%d", dst); - li = conflist_nth((conflist_t *)&pcbhl_conf.editor.grids, dst); + li = pcb_conflist_nth((pcb_conflist_t *)&pcbhl_conf.editor.grids, dst); /* clamp */ if (li == NULL) return pcb_false; Index: trunk/src/hid_init.c =================================================================== --- trunk/src/hid_init.c (revision 26978) +++ trunk/src/hid_init.c (revision 26979) @@ -340,7 +340,7 @@ /* parse arguments using the gui; if fails and fallback is enabled, try the next gui */ int pcb_gui_parse_arguments(int autopick_gui, int *hid_argc, char **hid_argv[]) { - conf_listitem_t *apg = NULL; + pcb_conf_listitem_t *apg = NULL; if ((autopick_gui >= 0) && (pcbhl_conf.rc.hid_fallback)) { /* start from the GUI we are initializing first */ int n; @@ -515,7 +515,7 @@ break; default: { const char *g; - conf_listitem_t *i; + pcb_conf_listitem_t *i; pcb_gui = NULL; conf_loop_list_str(&pcbhl_conf.rc.preferred_gui, i, g, ga->autopick_gui) { Index: trunk/src/list_conf.h =================================================================== --- trunk/src/list_conf.h (revision 26978) +++ trunk/src/list_conf.h (revision 26979) @@ -35,15 +35,15 @@ #define TDL_DONT_UNDEF #endif -#define TDL(x) conflist_ ## x -#define TDL_LIST_T conflist_t -#define TDL_LIST_U conflist_u -#define TDL_ITEM_T conf_listitem_t +#define TDL(x) pcb_conflist_ ## x +#define TDL_LIST_T pcb_conflist_t +#define TDL_LIST_U pcb_conflist_u +#define TDL_ITEM_T pcb_conf_listitem_t #define TDL_FIELD link #define TDL_SIZE_T size_t #define TDL_FUNC -#define conflist_foreach(list, iterator, loop_elem) \ +#define pcb_conflist_foreach(list, iterator, loop_elem) \ gdl_foreach_((&((list)->lst)), (iterator), (loop_elem)) Index: trunk/src/main_act.c =================================================================== --- trunk/src/main_act.c (revision 26978) +++ trunk/src/main_act.c (revision 26979) @@ -235,10 +235,10 @@ static const char pcb_acts_PrintPaths[] = "PrintPaths()"; static const char pcb_acth_PrintPaths[] = "Print full paths and search paths."; -static void print_list(const conflist_t *cl) +static void print_list(const pcb_conflist_t *cl) { int n; - conf_listitem_t *ci; + pcb_conf_listitem_t *ci; const char *p; printf(" "); Index: trunk/src/safe_fs.c =================================================================== --- trunk/src/safe_fs.c (revision 26978) +++ trunk/src/safe_fs.c (revision 26979) @@ -270,11 +270,11 @@ return pcb_fopen_at_(hidlib, dir, fn, mode, full_path, recursive); } -FILE *pcb_fopen_first(pcb_hidlib_t *hidlib, const conflist_t *paths, const char *fn, const char *mode, char **full_path, int recursive) +FILE *pcb_fopen_first(pcb_hidlib_t *hidlib, const pcb_conflist_t *paths, const char *fn, const char *mode, char **full_path, int recursive) { FILE *res; char *real_fn = pcb_build_fn(hidlib, fn); - conf_listitem_t *ci; + pcb_conf_listitem_t *ci; if (full_path != NULL) *full_path = NULL; @@ -293,7 +293,7 @@ /* have to search paths */ { - for (ci = conflist_first((conflist_t *)paths); ci != NULL; ci = conflist_next(ci)) { + for (ci = pcb_conflist_first((pcb_conflist_t *)paths); ci != NULL; ci = pcb_conflist_next(ci)) { const char *p = ci->val.string[0]; char *real_p; size_t pl; Index: trunk/src/safe_fs.h =================================================================== --- trunk/src/safe_fs.h (revision 26978) +++ trunk/src/safe_fs.h (revision 26979) @@ -80,6 +80,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(pcb_hidlib_t *hidlib, const conflist_t *paths, const char *fn, const char *mode, char **full_path, int recursive); +FILE *pcb_fopen_first(pcb_hidlib_t *hidlib, const pcb_conflist_t *paths, const char *fn, const char *mode, char **full_path, int recursive); #endif Index: trunk/src_plugins/cam/cam.c =================================================================== --- trunk/src_plugins/cam/cam.c (revision 26978) +++ trunk/src_plugins/cam/cam.c (revision 26979) @@ -85,7 +85,7 @@ /* look up a job by name in the config */ static const char *cam_find_job(const char *job) { - conf_listitem_t *j; + pcb_conf_listitem_t *j; int idx; conf_loop_list(&conf_cam.plugins.cam.jobs, j, idx) Index: trunk/src_plugins/cam/cam_gui.c =================================================================== --- trunk/src_plugins/cam/cam_gui.c (revision 26978) +++ trunk/src_plugins/cam/cam_gui.c (revision 26979) @@ -61,7 +61,7 @@ /* add all new items */ cn = pcb_conf_get_field("plugins/cam/jobs"); if (cn != NULL) { - conf_listitem_t *item; + pcb_conf_listitem_t *item; int idx; cell[1] = NULL; Index: trunk/src_plugins/dialogs/dlg_pref_conf.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_conf.c (revision 26978) +++ trunk/src_plugins/dialogs/dlg_pref_conf.c (revision 26979) @@ -233,11 +233,11 @@ /* non-default: lists are manually loaded */ pcb_hid_attribute_t *attr = &ctx->dlg[ctx->conf.wnatval[CFN_LIST]]; pcb_hid_tree_t *tree = attr->wdata; - conf_listitem_t *n; + pcb_conf_listitem_t *n; char *cell[4]; pcb_dad_tree_clear(tree); - for (n = conflist_first(&nat->val.list[idx]); n != NULL; n = conflist_next(n)) { + for (n = pcb_conflist_first(&nat->val.list[idx]); n != NULL; n = pcb_conflist_next(n)) { rolename = pcb_conf_role_name(pcb_conf_lookup_role(n->prop.src)); cell[0] = rolename == NULL ? pcb_strdup("") : pcb_strdup(rolename); cell[1] = pcb_strdup_printf("%ld", n->prop.prio); Index: trunk/src_plugins/dialogs/dlg_pref_lib.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_lib.c (revision 26978) +++ trunk/src_plugins/dialogs/dlg_pref_lib.c (revision 26979) @@ -81,7 +81,7 @@ in all widget rows from the conf */ static void pref_lib_conf2dlg_post(conf_native_t *cfg, int arr_idx) { - conf_listitem_t *i; + pcb_conf_listitem_t *i; int idx; const char *s; char *cell[4]; Index: trunk/src_plugins/export_xy/xy.c =================================================================== --- trunk/src_plugins/export_xy/xy.c (revision 26978) +++ trunk/src_plugins/export_xy/xy.c (revision 26979) @@ -96,7 +96,7 @@ static pcb_export_opt_t *xy_get_export_options(pcb_hid_t *hid, int *n) { static int last_unit_value = -1; - conf_listitem_t *li; + pcb_conf_listitem_t *li; int idx; /* load all formats from the config */ @@ -748,7 +748,7 @@ static void gather_templates(void) { - conf_listitem_t *i; + pcb_conf_listitem_t *i; int n; conf_loop_list(&conf_xy.plugins.export_xy.templates, i, n) { @@ -773,7 +773,7 @@ static const char *get_templ(const char *tid, const char *type) { char path[MAX_TEMP_NAME_LEN + 16]; - conf_listitem_t *li; + pcb_conf_listitem_t *li; int idx; sprintf(path, "%s.%s", tid, type); /* safe: tid's length is checked before it was put in the vector, type is hardwired in code and is never longer than a few chars */ Index: trunk/src_plugins/import_mentor_sch/mentor_sch.c =================================================================== --- trunk/src_plugins/import_mentor_sch/mentor_sch.c (revision 26978) +++ trunk/src_plugins/import_mentor_sch/mentor_sch.c (revision 26979) @@ -134,7 +134,7 @@ gsxl_node_t *contents, *n; nethlp_ctx_t nhctx; int idx, res = 0, cnt = 0; - conf_listitem_t *item; + pcb_conf_listitem_t *item; const char *item_str; nethlp_new(&nhctx); Index: trunk/src_plugins/lib_hid_common/grid_menu.c =================================================================== --- trunk/src_plugins/lib_hid_common/grid_menu.c (revision 26978) +++ trunk/src_plugins/lib_hid_common/grid_menu.c (revision 26979) @@ -42,8 +42,8 @@ static void grid_install_menu(void *ctx, pcb_hid_cfg_t *cfg, lht_node_t *node, char *path) { conf_native_t *nat; - conflist_t *lst; - conf_listitem_t *li; + pcb_conflist_t *lst; + pcb_conf_listitem_t *li; char *end = path + strlen(path); pcb_menu_prop_t props; char act[256], chk[256]; @@ -75,8 +75,8 @@ end++; /* have to go reverse to keep order because this will insert items */ - idx = conflist_length(lst)-1; - for(li = conflist_last(lst); li != NULL; li = conflist_prev(li),idx--) { + idx = pcb_conflist_length(lst)-1; + for(li = pcb_conflist_last(lst); li != NULL; li = pcb_conflist_prev(li),idx--) { sprintf(act, "grid(#%d)", idx); sprintf(chk, "conf(iseq, editor/grids_idx, %d)", idx); strcpy(end, li->val.string[0]); Index: trunk/src_plugins/stroke/stroke.c =================================================================== --- trunk/src_plugins/stroke/stroke.c (revision 26978) +++ trunk/src_plugins/stroke/stroke.c (revision 26979) @@ -57,7 +57,7 @@ static int pcb_stroke_exec(const char *seq) { - conf_listitem_t *item; + pcb_conf_listitem_t *item; int idx; conf_loop_list(&conf_stroke.plugins.stroke.gestures, item, idx) { Index: trunk/util/gsch2pcb-rnd/gsch2pcb.c =================================================================== --- trunk/util/gsch2pcb-rnd/gsch2pcb.c (revision 26978) +++ trunk/util/gsch2pcb-rnd/gsch2pcb.c (revision 26979) @@ -424,8 +424,8 @@ if (!have_cli_schematics) { /* load all schematics from the project file unless we have schematics from the cli */ conf_native_t *nat = pcb_conf_get_field("utils/gsch2pcb_rnd/schematics"); if (nat != NULL) { - conf_listitem_t *ci; - for (ci = conflist_first(nat->val.list); ci != NULL; ci = conflist_next(ci)) { + pcb_conf_listitem_t *ci; + for (ci = pcb_conflist_first(nat->val.list); ci != NULL; ci = pcb_conflist_next(ci)) { const char *p = ci->val.string[0]; if (ci->type != CFN_STRING) continue;