Index: trunk/src/libcschem/abstract.h =================================================================== --- trunk/src/libcschem/abstract.h (revision 3201) +++ trunk/src/libcschem/abstract.h (revision 3202) @@ -36,7 +36,7 @@ #include "libcschem/attrib.h" #include "TODO.h" -typedef struct csch_abstract_s { +struct csch_abstract_s { htip_t id2obj; /* id -> object pointer (primary storage) */ htul_t uid2id; /* UID -> object id (cache) */ htsp_t nets; /* netname -> csch_anet_t */ @@ -48,7 +48,7 @@ struct { long wirenet, comp, port; } ucnt; -} csch_abstract_t; +}; typedef enum csch_atype_e { CSCH_ATYPE_INVALID = 0, Index: trunk/src/libcschem/common_types.h =================================================================== --- trunk/src/libcschem/common_types.h (revision 3201) +++ trunk/src/libcschem/common_types.h (revision 3202) @@ -18,6 +18,9 @@ typedef struct csch_sheet_s csch_sheet_t; typedef struct csch_cgrp_s csch_cgrp_t; +/* from abstract.h */ +typedef struct csch_abstract_s csch_abstract_t; + /* project/view */ typedef struct csch_project_s csch_project_t; typedef struct csch_view_s csch_view_t; Index: trunk/src/libcschem/project.c =================================================================== --- trunk/src/libcschem/project.c (revision 3201) +++ trunk/src/libcschem/project.c (revision 3202) @@ -51,6 +51,11 @@ { int n; + if (prj->abst != NULL) { + csch_abstract_uninit(prj->abst); + free(prj->abst); + } + for(n = 0; n < vtp0_len(&prj->sheets); n++) csch_sheet_free(prj->sheets.array[n]); for(n = 0; n < vts0_len(&prj->symlibs); n++) Index: trunk/src/libcschem/project.h =================================================================== --- trunk/src/libcschem/project.h (revision 3201) +++ trunk/src/libcschem/project.h (revision 3202) @@ -49,8 +49,12 @@ vtp0_t sheets; vts0_t symlibs; vtp0_t views; /* of (csch_view_t *) */ - int curr; /* index of currently active view */ - unsigned dummy:1; /* 1 when there's no real project but a dummy one is allocated */ + + + /* cached */ + csch_abstract_t *abst; /* compiled for display attributes */ + int curr; /* index of currently active view */ + unsigned dummy:1; /* 1 when there's no real project but a dummy one is allocated */ }; csch_project_t *csch_project_alloc(void);