Index: parser.c =================================================================== --- parser.c (revision 31006) +++ parser.c (revision 31007) @@ -400,7 +400,7 @@ rnd_message(RND_MSG_DEBUG, "netlist net: '%s' device: '%s' pin: '%s'\n", net_name, device_name, pin_name); if ((net_name != NULL) && (device_name != NULL) && (pin_name != NULL)) { - pcb_snprintf(conn, sizeof(conn), "%s-%s", device_name, pin_name); + rnd_snprintf(conn, sizeof(conn), "%s-%s", device_name, pin_name); rnd_actionva(&PCB->hidlib, "Netlist", "Add", net_name, conn, NULL); } return; @@ -869,7 +869,7 @@ else { /* no layer name given. find unused layer name in range 1..PCB_MAX_LAYER */ for (n = 1; n < PCB_MAX_LAYER; n++) { - pcb_sprintf(new_layer_name, "%i", n); + rnd_sprintf(new_layer_name, "%i", n); if (pcb_layer_by_name(PCB->Data, new_layer_name) < 0) { lname = new_layer_name; break; @@ -1633,7 +1633,7 @@ new_device->value = rnd_strdup(h->value_string); else if (h->value_float_set) { /* convert double to string */ - pcb_snprintf(value, sizeof(value), "%f", h->value_float); + rnd_snprintf(value, sizeof(value), "%f", h->value_float); new_device->value = rnd_strdup(value); } @@ -1903,12 +1903,12 @@ /* make sure device and pin name have valid values, even if reference has wrong format */ if ((device_name == NULL) || (strcmp(device_name, "") == 0)) { device_name = malloc(MAX_STRING); - pcb_sprintf(device_name, "NONAME%0d", unknown_device_number++); + rnd_sprintf(device_name, "NONAME%0d", unknown_device_number++); } if ((pin_name == NULL) || (strcmp(pin_name, "") == 0)) { pin_name = malloc(MAX_STRING); - pcb_sprintf(pin_name, "NONUMBER%0d", unknown_pin_number++); + rnd_sprintf(pin_name, "NONUMBER%0d", unknown_pin_number++); } /* find device by name */ Index: write.c =================================================================== --- write.c (revision 31006) +++ write.c (revision 31007) @@ -92,7 +92,7 @@ } } if (dup) - name = pcb_strdup_printf("%s___%d", name, n); + name = rnd_strdup_printf("%s___%d", name, n); else name = rnd_strdup(name); htpp_set(&wr->grp_names, grp, (char *)name); @@ -163,7 +163,7 @@ static void write_pr_line(hyp_wr_t * wr, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { - pcb_fprintf(wr->f, " (PERIMETER_SEGMENT X1=%me Y1=%me X2=%me Y2=%me)\n", x1, flip(y1), x2, flip(y2)); + rnd_fprintf(wr->f, " (PERIMETER_SEGMENT X1=%me Y1=%me X2=%me Y2=%me)\n", x1, flip(y1), x2, flip(y2)); } static void hyp_pstk_init(hyp_wr_t *wr) @@ -215,7 +215,7 @@ shnum = 2; break; } - pcb_fprintf(wr->f, " (%s, %d, %me, %me, 0)\n", lynam, shnum, sx, sy); + rnd_fprintf(wr->f, " (%s, %d, %me, %me, 0)\n", lynam, shnum, sx, sy); } /* WARNING: not reentrant! */ @@ -240,7 +240,7 @@ int n; if (proto->hdia > 0) - pcb_fprintf(wr->f, "{PADSTACK=%s,%me\n", name, proto->hdia); + rnd_fprintf(wr->f, "{PADSTACK=%s,%me\n", name, proto->hdia); else fprintf(wr->f, "{PADSTACK=%s\n", name); @@ -272,9 +272,9 @@ pcb_pstk_proto_t *proto = pcb_pstk_get_proto(ps); if ((subc != NULL) && (ps->term != NULL)) - pcb_fprintf(wr->f, " (PIN X=%me Y=%me R=\"%s.%s\" P=%[4])\n", ps->x, flip(ps->y), safe_subc_name(wr, subc), ps->term, hyp_pstk_cache(wr, proto, 0)); + rnd_fprintf(wr->f, " (PIN X=%me Y=%me R=\"%s.%s\" P=%[4])\n", ps->x, flip(ps->y), safe_subc_name(wr, subc), ps->term, hyp_pstk_cache(wr, proto, 0)); else - pcb_fprintf(wr->f, " (VIA X=%me Y=%me P=%[4])\n", ps->x, flip(ps->y), hyp_pstk_cache(wr, proto, 0)); + rnd_fprintf(wr->f, " (VIA X=%me Y=%me P=%[4])\n", ps->x, flip(ps->y), hyp_pstk_cache(wr, proto, 0)); } static void write_poly(hyp_wr_t * wr, pcb_poly_t * poly) @@ -295,17 +295,17 @@ v = pl->head->next; if (pl == poly->Clipped->contours) - pcb_fprintf(wr->f, " {POLYGON L=%[4] T=POUR W=0.0 ID=%d X=%me Y=%me\n", + rnd_fprintf(wr->f, " {POLYGON L=%[4] T=POUR W=0.0 ID=%d X=%me Y=%me\n", get_layer_name(wr, poly->parent_type, poly->parent.layer), ++wr->poly_id, v->point[0], flip(v->point[1])); else /* hole. Use same ID as polygon. */ - pcb_fprintf(wr->f, " {POLYVOID ID=%d X=%me Y=%me\n", wr->poly_id, v->point[0], flip(v->point[1])); + rnd_fprintf(wr->f, " {POLYVOID ID=%d X=%me Y=%me\n", wr->poly_id, v->point[0], flip(v->point[1])); for (v = v->next; v != pl->head->next; v = v->next) - pcb_fprintf(wr->f, " (LINE X=%me Y=%me)\n", v->point[0], flip(v->point[1])); + rnd_fprintf(wr->f, " (LINE X=%me Y=%me)\n", v->point[0], flip(v->point[1])); v = pl->head->next; /* repeat first point */ - pcb_fprintf(wr->f, " (LINE X=%me Y=%me)\n", v->point[0], flip(v->point[1])); + rnd_fprintf(wr->f, " (LINE X=%me Y=%me)\n", v->point[0], flip(v->point[1])); fprintf(wr->f, " }\n"); } while ((pl = pl->next) != NULL); @@ -314,7 +314,7 @@ static void write_line(hyp_wr_t * wr, pcb_line_t * line) { - pcb_fprintf(wr->f, " (SEG X1=%me Y1=%me X2=%me Y2=%me W=%me L=%[4])\n", + rnd_fprintf(wr->f, " (SEG X1=%me Y1=%me X2=%me Y2=%me W=%me L=%[4])\n", line->Point1.X, flip(line->Point1.Y), line->Point2.X, flip(line->Point2.Y), line->Thickness, get_layer_name(wr, line->parent_type, line->parent.layer)); } @@ -340,10 +340,10 @@ pcb_arc_get_end(arc, 0, &x2, &y2); } - pcb_fprintf(wr->f, "(%s X1=%me Y1=%me X2=%me Y2=%me XC=%me YC=%me R=%me", cmd, x1, flip(y1), x2, flip(y2), arc->X, + rnd_fprintf(wr->f, "(%s X1=%me Y1=%me X2=%me Y2=%me XC=%me YC=%me R=%me", cmd, x1, flip(y1), x2, flip(y2), arc->X, flip(arc->Y), arc->Width); if (layer != NULL) - pcb_fprintf(wr->f, " W=%me L=%[4]", arc->Thickness, layer); + rnd_fprintf(wr->f, " W=%me L=%[4]", arc->Thickness, layer); fprintf(wr->f, ")\n"); } @@ -417,7 +417,7 @@ const char *name = grp->name; if (grp->ltype & PCB_LYT_COPPER) { - pcb_fprintf(wr->f, " (SIGNAL T=0.003500 L=%[4])\n", hyp_grp_name(wr, grp, name)); + rnd_fprintf(wr->f, " (SIGNAL T=0.003500 L=%[4])\n", hyp_grp_name(wr, grp, name)); if (grp->ltype & PCB_LYT_TOP) wr->ln_top = name; else if (grp->ltype & PCB_LYT_BOTTOM) @@ -429,7 +429,7 @@ sprintf(tmp, "dielectric layer %d", n); name = tmp; } - pcb_fprintf(wr->f, " (DIELECTRIC T=0.160000 L=%[4])\n", hyp_grp_name(wr, grp, name)); + rnd_fprintf(wr->f, " (DIELECTRIC T=0.160000 L=%[4])\n", hyp_grp_name(wr, grp, name)); } } @@ -460,7 +460,7 @@ if (descr == NULL) descr = "?"; - pcb_fprintf(wr->f, " (? REF=%[4] NAME=%[4] L=%[4])\n", safe_subc_name(wr, subc), descr, layer); + rnd_fprintf(wr->f, " (? REF=%[4] NAME=%[4] L=%[4])\n", safe_subc_name(wr, subc), descr, layer); cnt++; } @@ -499,7 +499,7 @@ for (e = htpp_first(&map.n2o); e != NULL; e = htpp_next(&map.n2o, e)) { dyn_obj_t *o; pcb_net_t *net = e->key; - pcb_fprintf(wr->f, "{NET=%[4]\n", net->name); + rnd_fprintf(wr->f, "{NET=%[4]\n", net->name); for (o = e->value; o != NULL; o = o->next) { switch (o->obj->type) { case PCB_OBJ_LINE: @@ -549,7 +549,7 @@ hyp_pstk_init(&wr); hyp_grp_init(&wr); - pcb_printf_slot[4] = "%{{\\}\\()\t\r\n \"=}mq"; + rnd_printf_slot[4] = "%{{\\}\\()\t\r\n \"=}mq"; if (write_hdr(&wr) != 0) goto err;