Index: trunk/src/plug_footprint.c =================================================================== --- trunk/src/plug_footprint.c (revision 30804) +++ trunk/src/plug_footprint.c (revision 30805) @@ -87,7 +87,7 @@ void pcb_fp_init() { - pcb_library.type = LIB_DIR; + pcb_library.type = PCB_LIB_DIR; pcb_library.name = pcb_strdup("/"); /* All names are eventually free()'d */ } @@ -138,7 +138,7 @@ { pcb_fplibrary_t *entry; /* Pointer to individual menu entry */ - assert(parent->type == LIB_DIR); + assert(parent->type == PCB_LIB_DIR); entry = pcb_get_library_memory(parent); if (entry == NULL) return NULL; @@ -154,7 +154,7 @@ else entry->name = pcb_strdup(name); - entry->type = LIB_FOOTPRINT; + entry->type = PCB_LIB_FOOTPRINT; entry->data.fp.type = type; entry->data.fp.tags = tags; entry->data.fp.loc_info = NULL; @@ -167,7 +167,7 @@ pcb_fplibrary_t *l; int n; - if (dir->type != LIB_DIR) + if (dir->type != PCB_LIB_DIR) return NULL; for(n = 0, l = dir->data.dir.children.array; n < dir->data.dir.children.used; n++, l++) @@ -182,7 +182,7 @@ pcb_fplibrary_t *l; int n; - if (dir->type != LIB_DIR) + if (dir->type != PCB_LIB_DIR) return NULL; for(n = 0, l = dir->data.dir.children.array; n < dir->data.dir.children.used; n++, l++) @@ -202,7 +202,7 @@ else l->name = pcb_strdup(name); l->parent = parent; - l->type = LIB_DIR; + l->type = PCB_LIB_DIR; l->data.dir.backend = NULL; vtlib_init(&l->data.dir.children); return l; @@ -267,7 +267,7 @@ vtlib_t *v; int n; - if (parent->type != LIB_DIR) + if (parent->type != PCB_LIB_DIR) return; v = &parent->data.dir.children; @@ -280,23 +280,23 @@ void fp_free_entry(pcb_fplibrary_t *l) { switch(l->type) { - case LIB_DIR: + case PCB_LIB_DIR: pcb_fp_free_children(l); vtlib_uninit(&(l->data.dir.children)); break; - case LIB_FOOTPRINT: + case PCB_LIB_FOOTPRINT: if (l->data.fp.loc_info != NULL) free(l->data.fp.loc_info); if (l->data.fp.tags != NULL) free(l->data.fp.tags); break; - case LIB_INVALID: break; /* suppress compiler warning */ + case PCB_LIB_INVALID: break; /* suppress compiler warning */ } if (l->name != NULL) { free(l->name); l->name = NULL; } - l->type = LIB_INVALID; + l->type = PCB_LIB_INVALID; } void pcb_fp_free_children(pcb_fplibrary_t *parent) @@ -304,7 +304,7 @@ int n; pcb_fplibrary_t *l; - assert(parent->type == LIB_DIR); + assert(parent->type == PCB_LIB_DIR); for(n = 0, l = parent->data.dir.children.array; n < parent->data.dir.children.used; n++, l++) fp_free_entry(l); @@ -337,11 +337,11 @@ for(n = 0, l = dir->data.dir.children.array; n < dir->data.dir.children.used; n++, l++) { for(p = 0; p < level; p++) putchar(' '); - if (l->type == LIB_DIR) { + if (l->type == PCB_LIB_DIR) { printf("%s/\n", l->name); fp_dump_dir(l, level+1); } - else if (l->type == LIB_FOOTPRINT) + else if (l->type == PCB_LIB_FOOTPRINT) printf("%s\n", l->name); else printf("*INVALID*\n"); @@ -440,7 +440,7 @@ pcb_event(hidlib, PCB_EVENT_LIBRARY_CHANGED, NULL); return res; } - if (l->type != LIB_DIR) + if (l->type != PCB_LIB_DIR) return -1; be = l->data.dir.backend; Index: trunk/src/plug_footprint_act.c =================================================================== --- trunk/src/plug_footprint_act.c (revision 30804) +++ trunk/src/plug_footprint_act.c (revision 30805) @@ -54,7 +54,7 @@ return 0; } - if (l->type != LIB_DIR) { + if (l->type != PCB_LIB_DIR) { pcb_message(PCB_MSG_ERROR, "Library path %s is not a directory\n", name); PCB_ACT_IRES(1); return 0; Index: trunk/src/plug_io.c =================================================================== --- trunk/src/plug_io.c (revision 30804) +++ trunk/src/plug_io.c (revision 30805) @@ -1019,7 +1019,7 @@ rewind(f); head->type = PCB_FP_INVALID; - head->libtype = LIB_FOOTPRINT; + head->libtype = PCB_LIB_FOOTPRINT; res = plug->map_footprint(NULL, f, fn, head, need_tags); if (res == NULL) continue; if (res->type != PCB_FP_INVALID) Index: trunk/src/vtlibrary.h =================================================================== --- trunk/src/vtlibrary.h (revision 30804) +++ trunk/src/vtlibrary.h (revision 30805) @@ -4,9 +4,9 @@ #include typedef enum { - LIB_INVALID, - LIB_DIR, - LIB_FOOTPRINT + PCB_LIB_INVALID, + PCB_LIB_DIR, + PCB_LIB_FOOTPRINT } pcb_fplibrary_type_t; typedef enum { Index: trunk/src_plugins/dialogs/dlg_library.c =================================================================== --- trunk/src_plugins/dialogs/dlg_library.c (revision 30804) +++ trunk/src_plugins/dialogs/dlg_library.c (revision 30805) @@ -227,7 +227,7 @@ if (row != NULL) { pcb_fplibrary_t *l = row->user_data; - param_selected = (l != NULL) && (l->type == LIB_FOOTPRINT) && (l->data.fp.type == PCB_FP_PARAMETRIC); + param_selected = (l != NULL) && (l->type == PCB_LIB_FOOTPRINT) && (l->data.fp.type == PCB_FP_PARAMETRIC); } param_entered = !ctx->pactive && (otext != NULL) && (strchr(otext, '(') != NULL); @@ -265,7 +265,7 @@ cell[0] = pcb_strdup(l->name); row = pcb_dad_tree_append_under(attr, parent_row, cell); row->user_data = l; - if (l->type == LIB_DIR) + if (l->type == PCB_LIB_DIR) create_lib_tree_model_recurse(attr, l, row); } } @@ -344,7 +344,7 @@ library_update_preview(ctx, NULL, NULL); if (row != NULL) { pcb_fplibrary_t *l = row->user_data; - if ((l != NULL) && (l->type == LIB_FOOTPRINT)) { + if ((l != NULL) && (l->type == PCB_LIB_FOOTPRINT)) { if ((l->data.fp.type == PCB_FP_PARAMETRIC)) { if (last != l) { /* first click */ library_select_show_param_example(ctx, l); @@ -533,7 +533,7 @@ for(r = gdl_first(rowlist); r != NULL; r = gdl_next(rowlist, r)) { pcb_fplibrary_t *l = r->user_data; - if ((pcb_strncasecmp(r->cell[0], name, namelen) == 0) && (l->type == LIB_FOOTPRINT) && (l->data.fp.type == PCB_FP_PARAMETRIC)) + if ((pcb_strncasecmp(r->cell[0], name, namelen) == 0) && (l->type == PCB_LIB_FOOTPRINT) && (l->data.fp.type == PCB_FP_PARAMETRIC)) return r; pr = find_fp_prefix_(tree, &r->children, name, namelen); if (pr != NULL) Index: trunk/src_plugins/fp_fs/fp_fs.c =================================================================== --- trunk/src_plugins/fp_fs/fp_fs.c (revision 30804) +++ trunk/src_plugins/fp_fs/fp_fs.c (revision 30805) @@ -186,7 +186,7 @@ pcb_plug_fp_map_t head = {0}, *res; res = pcb_io_map_footprint_file(&PCB->hidlib, subdirentry->d_name, &head, need_tags); - if ((res->libtype == LIB_FOOTPRINT) && ((res->type == PCB_FP_FILE) || (res->type == PCB_FP_PARAMETRIC))) { + if ((res->libtype == PCB_LIB_FOOTPRINT) && ((res->type == PCB_FP_FILE) || (res->type == PCB_FP_PARAMETRIC))) { n_footprints++; if (cb(cookie, new_subdir, subdirentry->d_name, res->type, (void **)res->tags.array)) break; @@ -272,7 +272,7 @@ res = fp_fs_load_dir_(&pcb_library, ".", path, 1); if (res >= 0) { pcb_fplibrary_t *l = pcb_fp_lib_search(&pcb_library, path); - if ((l != NULL) && (l->type == LIB_DIR)) + if ((l != NULL) && (l->type == PCB_LIB_DIR)) l->data.dir.backend = ctx; } return res; Index: trunk/src_plugins/hid_lesstif/library.c =================================================================== --- trunk/src_plugins/hid_lesstif/library.c (revision 30804) +++ trunk/src_plugins/hid_lesstif/library.c (revision 30805) @@ -47,7 +47,7 @@ libnode_strings = (XmString *) malloc(menu->data.dir.children.used * sizeof(XmString)); for (found = 0, i = 0; i < menu->data.dir.children.used; i++) { - if (menu->data.dir.children.array[i].type == LIB_FOOTPRINT) { + if (menu->data.dir.children.array[i].type == PCB_LIB_FOOTPRINT) { libnode_strings[i] = XmStringCreatePCB(menu->data.dir.children.array[i].name); found++; } @@ -112,7 +112,7 @@ char *s; int n, len; - if (parent->type != LIB_DIR) + if (parent->type != PCB_LIB_DIR) return; if (parent->name != NULL) { Index: trunk/src_plugins/oldactions/oldactions.c =================================================================== --- trunk/src_plugins/oldactions/oldactions.c (revision 30804) +++ trunk/src_plugins/oldactions/oldactions.c (revision 30805) @@ -101,9 +101,9 @@ static void dump_lib_any(int level, pcb_fplibrary_t *l) { switch(l->type) { - case LIB_INVALID: printf("??\n"); break; - case LIB_DIR: dump_lib_dir(level, l); break; - case LIB_FOOTPRINT: dump_lib_fp(level, l); break; + case PCB_LIB_INVALID: printf("??\n"); break; + case PCB_LIB_DIR: dump_lib_dir(level, l); break; + case PCB_LIB_FOOTPRINT: dump_lib_fp(level, l); break; } }