Index: src/rats_patch.c =================================================================== --- src/rats_patch.c (revision 936) +++ src/rats_patch.c (revision 937) @@ -246,11 +246,21 @@ int rats_patch_fexport(PCBTypePtr pcb, FILE *f, int fmt_pcb) { rats_patch_line_t *n; - const char *q = "\""; - const char *po = '('; - const char *pc = ')'; - const char *line_prefix = "\t"; + const char *q, *po, *pc, *line_prefix; + if (fmt_pcb) { + q = "\""; + po = '('; + pc = ')'; + line_prefix = "\t"; + } + else { + q = ""; + po = ' '; + pc = ' '; + line_prefix = ""; + } + for(n = pcb->NetlistPatches; n != NULL; n = n->next) { switch(n->op) { case RATP_ADD_CONN: fprintf(f, "%sadd_conn%c%s%s%s %s%s%s%c\n", line_prefix, po, q, n->id, q, q, n->arg1.net_name, q, pc); break;