Index: trunk/src/plug_footprint.h =================================================================== --- trunk/src/plug_footprint.h (revision 33259) +++ trunk/src/plug_footprint.h (revision 33260) @@ -2,10 +2,51 @@ #define PCB_PLUG_FOOTPRINT_H #include -#include "vtlibrary.h" +#include #include "data.h" #include +typedef enum { + PCB_LIB_INVALID, + PCB_LIB_DIR, + PCB_LIB_FOOTPRINT +} pcb_fplibrary_type_t; + +typedef enum { + PCB_FP_INVALID, + PCB_FP_DIR, /* used temporarily during the mapping - a finalized tree wouldn't have this */ + PCB_FP_FILEDIR, /* used temporarily during the mapping - a finalized tree wouldn't have this */ + PCB_FP_FILE, + PCB_FP_PARAMETRIC +} pcb_fptype_t; + + +typedef struct pcb_fplibrary_s pcb_fplibrary_t; + +/* An element of a library: either a directory or a footprint */ +struct pcb_fplibrary_s { + char *name; /* visible name */ + pcb_fplibrary_type_t type; + pcb_fplibrary_t *parent; + + union { + struct { /* type == LIB_DIR */ + vtp0_t children; /* of (pcb_fplibrary_t *) */ + void *backend; /* pcb_plug_fp_t* */ + } dir; + struct { /* type == LIB_FOOTPRINT */ + char *loc_info; + void *backend_data; + pcb_fptype_t type; + + /* an array of void * tag IDs; last tag ID is NULL; the array is + locally allocated but values are stored in a central hash and + must be allocated by pcb_fp_tag() and never free'd manually */ + void **tags; + } fp; + } data; +} ; + typedef struct pcb_plug_fp_s pcb_plug_fp_t; typedef struct { Index: trunk/src/plug_io.h =================================================================== --- trunk/src/plug_io.h (revision 33259) +++ trunk/src/plug_io.h (revision 33260) @@ -31,9 +31,9 @@ #define PCB_PLUG_IO_H #include "global_typedefs.h" -#include "vtlibrary.h" #include #include +#include "plug_footprint.h" typedef enum { /* I/O type bitmask; each bit is one thing to save or load, not all formats support all things */ PCB_IOT_PCB = 1, Index: trunk/src/vtlibrary.h =================================================================== --- trunk/src/vtlibrary.h (revision 33259) +++ trunk/src/vtlibrary.h (revision 33260) @@ -2,47 +2,5 @@ #define PCB_VTLIBRARY_H #include #include -#include -typedef enum { - PCB_LIB_INVALID, - PCB_LIB_DIR, - PCB_LIB_FOOTPRINT -} pcb_fplibrary_type_t; - -typedef enum { - PCB_FP_INVALID, - PCB_FP_DIR, /* used temporarily during the mapping - a finalized tree wouldn't have this */ - PCB_FP_FILEDIR, /* used temporarily during the mapping - a finalized tree wouldn't have this */ - PCB_FP_FILE, - PCB_FP_PARAMETRIC -} pcb_fptype_t; - - -typedef struct pcb_fplibrary_s pcb_fplibrary_t; - -/* An element of a library: either a directory or a footprint */ -struct pcb_fplibrary_s { - char *name; /* visible name */ - pcb_fplibrary_type_t type; - pcb_fplibrary_t *parent; - - union { - struct { /* type == LIB_DIR */ - vtp0_t children; /* of (pcb_fplibrary_t *) */ - void *backend; /* pcb_plug_fp_t* */ - } dir; - struct { /* type == LIB_FOOTPRINT */ - char *loc_info; - void *backend_data; - pcb_fptype_t type; - - /* an array of void * tag IDs; last tag ID is NULL; the array is - locally allocated but values are stored in a central hash and - must be allocated by pcb_fp_tag() and never free'd manually */ - void **tags; - } fp; - } data; -} ; - #endif