Index: trunk/src/obj_common.c =================================================================== --- trunk/src/obj_common.c (revision 28835) +++ trunk/src/obj_common.c (revision 28836) @@ -235,6 +235,11 @@ obj->noexport = 1; obj->noexport_named = (name[8] == ':'); } + else if (strncmp(name, "extobj::", 8) == 0) { + const char *arg = name+8; + if (strcmp(arg, "role") == 0) + obj->extobj_role = value; + } } const char *pcb_obj_id_invalid(const char *id) Index: trunk/src/obj_common.h =================================================================== --- trunk/src/obj_common.h (revision 28835) +++ trunk/src/obj_common.h (revision 28836) @@ -191,7 +191,7 @@ #define PCB_ANY_PRIMITIVE_FIELDS \ PCB_ANY_OBJ_FIELDS; \ - const char *term; \ + const char *term, *extobj_role; \ void *ratconn; \ unsigned char thermal; \ unsigned char intconn, intnoconn; \ Index: trunk/src/obj_subc.c =================================================================== --- trunk/src/obj_subc.c (revision 28835) +++ trunk/src/obj_subc.c (revision 28836) @@ -99,18 +99,8 @@ if (inv != NULL) pcb_message(PCB_MSG_ERROR, "Invalid character '%c' in subc refdes '%s'\n", *inv, sc->refdes); } - else if (strncmp(name, "extobj", 6) == 0) { - const char *arg = name+6; - if (*arg != '\0') { - if ((arg[0] == ':') && (arg[1] == ':')) { - arg += 2; - if (strcmp(arg, "role") == 0) - sc->extobj_role = value; - } - } - else - sc->extobj = value; - } + else if (strcmp(name, "extobj") == 0) + sc->extobj = value; pcb_text_dyn_bbox_update(sc->data); } Index: trunk/src/obj_subc.h =================================================================== --- trunk/src/obj_subc.h (revision 28835) +++ trunk/src/obj_subc.h (revision 28836) @@ -45,7 +45,7 @@ struct pcb_subc_s { PCB_ANY_PRIMITIVE_FIELDS; - const char *extobj, *extobj_role; + const char *extobj; int extobj_idx; void *extobj_data; /* the extobj implementation may store decoded data here */ minuid_bin_t uid;