Index: src_plugins/io_mentor_cell/read.c =================================================================== --- src_plugins/io_mentor_cell/read.c (revision 8901) +++ src_plugins/io_mentor_cell/read.c (revision 8902) @@ -214,7 +214,7 @@ node_t *nd; nd = calloc(sizeof(node_t), 1); - nd->argc = qparse2(vline, &nd->argv, QPARSE_DOUBLE_QUOTE | QPARSE_MULTISEP); + nd->argc = qparse2(vline, &nd->argv, QPARSE_DOUBLE_QUOTE | QPARSE_PAREN | QPARSE_MULTISEP); nd->level = level; if (level == ctx->curr->level) { /* sibling */ @@ -234,6 +234,13 @@ ctx->curr = nd; } +static void rtrim(gds_t *s) +{ + int n; + for(n = gds_len(s)-1; (n >= 0) && isspace(s->array[n]); n--) + s->array[n] = '\0'; +} + int io_mentor_cell_read_pcb(pcb_plug_io_t *pctx, pcb_board_t *pcb, const char *fn, conf_role_t settings_dest) { hkp_ctx_t ctx; @@ -262,6 +269,7 @@ /* first char is '.' means it's a new virtual line */ if (*s == '.') { if (gds_len(&vline) > 0) { + rtrim(&vline); save_vline(&ctx, vline.array, level); gds_truncate(&vline, 0); } @@ -275,8 +283,10 @@ } /* the last virtual line before eof */ - if (gds_len(&vline) > 0) + if (gds_len(&vline) > 0) { + rtrim(&vline); save_vline(&ctx, vline.array, level); + } gds_uninit(&vline); /* we are loading the cells into a board, make a default layer stack for that */