Index: read.c =================================================================== --- read.c (revision 30795) +++ read.c (revision 30796) @@ -2582,7 +2582,7 @@ { int c, comment_len; int first_subc = 1; - long pos = -1; + long pos = 0; enum { ST_WS, ST_COMMENT, @@ -2592,7 +2592,6 @@ gds_t tag; gds_init(&tag); - head->type = PCB_FP_INVALID; while ((c = fgetc(f)) != EOF) { pos++; switch (state) { @@ -2628,6 +2627,12 @@ /* fall-thru for detecting @ */ case ST_COMMENT: comment_len++; + if ((c == '!') && (pos == 2)) { + /* must be a shebang -> parametric footprint */ + head->type = PCB_FP_PARAMETRIC; + goto out; + } + if ((c == '#') && (comment_len == 1)) { state = ST_TAG; break;