Index: file.c =================================================================== --- file.c (revision 30792) +++ file.c (revision 30793) @@ -1206,14 +1206,11 @@ #endif -TODO("subc: should be split up to multiple plugins") /* Decide about the type of a footprint file: - it is a file element if the first non-comment is "Element(" or "Element[" - - else it is a parametric element (footprint generator) if it contains - "@@" "purpose" - else it's not an element. - if a line of a file element starts with ## and doesn't contain @, it's a tag - - if tags is not NULL, it's a pointer to a void *tags[] - an array of tag IDs + - if need_tags is set, tags are saved */ pcb_plug_fp_map_t *io_pcb_map_footprint(pcb_plug_io_t *ctx, FILE *f, const char *fn, pcb_plug_fp_map_t *head, int need_tags) { @@ -1246,17 +1243,6 @@ state = ST_COMMENT; break; } - else if ((first_element) && (c == 'l')) { -TODO("fp: rather call plug_io if it is not parametric") - char s[23]; - /* li:pcb-rnd-subcircuit */ - fgets(s, 21, f); - s[20] = '\0'; - if (strcmp(s, "i:pcb-rnd-subcircuit") == 0) { - head->type = PCB_FP_FILE; - goto out; - } - } else if ((first_element) && (c == 'E')) { char s[8]; /* Element */ @@ -1287,20 +1273,9 @@ } if ((c == '\r') || (c == '\n')) state = ST_WS; - if (c == '@') { - char s[10]; - maybe_purpose:; - /* "@@" "purpose" */ - fgets(s, 9, f); - s[8] = '\0'; - if (strcmp(s, "@purpose") == 0) { - head->type = PCB_FP_PARAMETRIC; - goto out; - } - } break; case ST_TAG: - if ((c == '\r') || (c == '\n')) { /* end of a tag */ + if ((c == '\r') || (c == '\n')) { /* end of a tag */ if (need_tags && (tag.used != 0)) vts0_append(&head->tags, (char *)pcb_fp_tag(tag.array, 1)); @@ -1308,8 +1283,6 @@ state = ST_WS; break; } - if (c == '@') - goto maybe_purpose; gds_append(&tag, c); } }