Index: read.c =================================================================== --- read.c (revision 30954) +++ read.c (revision 30955) @@ -93,7 +93,7 @@ pcb_safe_append_vprintf(&str, 0, fmt, ap); va_end(ap); - rnd_message(PCB_MSG_ERROR, "%s", str.array); + rnd_message(RND_MSG_ERROR, "%s", str.array); gds_uninit(&str); return -1; @@ -122,7 +122,7 @@ pcb_safe_append_vprintf(&str, 0, fmt, ap); va_end(ap); - rnd_message(PCB_MSG_WARNING, "%s", str.array); + rnd_message(RND_MSG_WARNING, "%s", str.array); gds_uninit(&str); } @@ -1000,7 +1000,7 @@ int grp_id; parse_int(&grp_id, hash_get(grp, "group", 0)); dt->Layer[layer_id].meta.real.grp = grp_id; - /* pcb_trace("parse_data_layer name: %d,%d '%s' grp=%d\n", layer_id, dt->LayerN-1, ly->name, grp_id);*/ + /* rnd_trace("parse_data_layer name: %d,%d '%s' grp=%d\n", layer_id, dt->LayerN-1, ly->name, grp_id);*/ } } @@ -1400,12 +1400,12 @@ pcb->Data->Layer[pcb->Data->LayerN-2].meta.real.grp = -1; pcb->Data->Layer[pcb->Data->LayerN-1].meta.real.grp = -1; -/* pcb_trace("NAME: '%s' '%s'\n", pcb->Data->Layer[pcb->Data->LayerN-1].Name,pcb->Data->Layer[pcb->Data->LayerN-2].Name);*/ +/* rnd_trace("NAME: '%s' '%s'\n", pcb->Data->Layer[pcb->Data->LayerN-1].Name,pcb->Data->Layer[pcb->Data->LayerN-2].Name);*/ for(n = 0; n < pcb->Data->LayerN - 2; n++) { pcb_layer_t *l = &pcb->Data->Layer[n]; pcb_layergrp_id_t grp = l->meta.real.grp; - /*pcb_trace("********* l=%d %s g=%ld (top=%ld bottom=%ld)\n", n, l->name, grp, top_silk, bottom_silk);*/ + /*rnd_trace("********* l=%d %s g=%ld (top=%ld bottom=%ld)\n", n, l->name, grp, top_silk, bottom_silk);*/ l->meta.real.grp = -1; if (grp == bottom_silk) @@ -1414,7 +1414,7 @@ g = pcb_get_grp(&pcb->LayerGroups, PCB_LYT_TOP, PCB_LYT_COPPER); else g = pcb_get_grp_new_intern(pcb, grp); -/* pcb_trace(" add %ld\n", g - pcb->LayerGroups.meta.real.grp);*/ +/* rnd_trace(" add %ld\n", g - pcb->LayerGroups.meta.real.grp);*/ if (g != NULL) { pcb_layer_add_in_group_(pcb, g, g - pcb->LayerGroups.grp, n); if (strcmp(l->name, "outline") == 0) @@ -1421,7 +1421,7 @@ pcb_layergrp_fix_turn_to_outline(g); } else - rnd_message(PCB_MSG_ERROR, "failed to create layer %s\n", l->name); + rnd_message(RND_MSG_ERROR, "failed to create layer %s\n", l->name); } pcb_layergrp_fix_old_outline(pcb); @@ -2218,7 +2218,7 @@ if (cfg_dest == RND_CFR_invalid) return; if (rnd_conf_insert_tree_as(cfg_dest, sub) != 0) - rnd_message(PCB_MSG_ERROR, "Failed to insert the config subtree '%s' found in %s\n", sub->name, pcb->hidlib.filename); + rnd_message(RND_MSG_ERROR, "Failed to insert the config subtree '%s' found in %s\n", sub->name, pcb->hidlib.filename); else rnd_conf_update(NULL, -1); } @@ -2354,7 +2354,7 @@ free(realfn); if (doc == NULL) { - rnd_message(PCB_MSG_ERROR, "Error loading '%s': %s\n", Filename, errmsg); + rnd_message(RND_MSG_ERROR, "Error loading '%s': %s\n", Filename, errmsg); free(errmsg); return -1; } @@ -2402,7 +2402,7 @@ free(realfn); if (doc == NULL) { - rnd_message(PCB_MSG_ERROR, "Error loading '%s': %s\n", filename, errmsg); + rnd_message(RND_MSG_ERROR, "Error loading '%s': %s\n", filename, errmsg); free(errmsg); return -1; } @@ -2499,7 +2499,7 @@ if (doc == NULL) { if (!pcb_io_err_inhibit) - rnd_message(PCB_MSG_ERROR, "Error loading '%s': %s\n", Filename, errmsg); + rnd_message(RND_MSG_ERROR, "Error loading '%s': %s\n", Filename, errmsg); free(errmsg); return -1; } @@ -2506,7 +2506,7 @@ if ((doc->root->type != LHT_LIST) || (strcmp(doc->root->name, "pcb-rnd-font-v1"))) { if (!pcb_io_err_inhibit) - rnd_message(PCB_MSG_ERROR, "Not a font lihata.\n"); + rnd_message(RND_MSG_ERROR, "Not a font lihata.\n"); res = -1; } else @@ -2537,7 +2537,7 @@ if (doc == NULL) { if (!pcb_io_err_inhibit) - rnd_message(PCB_MSG_ERROR, "Error loading '%s': %s\n", name, errmsg); + rnd_message(RND_MSG_ERROR, "Error loading '%s': %s\n", name, errmsg); free(errmsg); return -1; } @@ -2544,7 +2544,7 @@ if ((doc->root->type != LHT_LIST) || (strncmp(doc->root->name, "pcb-rnd-subcircuit-v", 20))) { if (!pcb_io_err_inhibit) - rnd_message(PCB_MSG_ERROR, "Not a subcircuit lihata.\n"); + rnd_message(RND_MSG_ERROR, "Not a subcircuit lihata.\n"); free(errmsg); lht_dom_uninit(doc); return -1; @@ -2555,7 +2555,7 @@ rdver = atoi(doc->root->name+20); if (rdver < 3) { if (!pcb_io_err_inhibit) - rnd_message(PCB_MSG_ERROR, "io_lihata: invalid subc file version: %s (expected 3 or higher)\n", doc->root->name+20); + rnd_message(RND_MSG_ERROR, "io_lihata: invalid subc file version: %s (expected 3 or higher)\n", doc->root->name+20); free(errmsg); lht_dom_uninit(doc); return -1; Index: write.c =================================================================== --- write.c (revision 30954) +++ write.c (revision 30955) @@ -264,18 +264,18 @@ if (wrver < 5) { if (rnd_attribute_get(&obj->Attributes, "intnoconn") != NULL) { warned = 1; - rnd_message(PCB_MSG_WARNING, "pcb-rnd versions only reading file older than lihata v5 may ignore the intnoconn flag\n"); + rnd_message(RND_MSG_WARNING, "pcb-rnd versions only reading file older than lihata v5 may ignore the intnoconn flag\n"); } } if (wrver < 3) { if (rnd_attribute_get(&obj->Attributes, "intconn") != NULL) { warned = 1; - rnd_message(PCB_MSG_WARNING, "pcb-rnd versions only reading file older than lihata v3 may ignore the intconn flag\n"); + rnd_message(RND_MSG_WARNING, "pcb-rnd versions only reading file older than lihata v3 may ignore the intconn flag\n"); } } if (warned) - rnd_message(PCB_MSG_WARNING, "^^^ in %s #%ld\n", pcb_obj_type_name(obj->type), obj->ID); + rnd_message(RND_MSG_WARNING, "^^^ in %s #%ld\n", pcb_obj_type_name(obj->type), obj->ID); } /* Write the thermal list of heavy terminals; put the resulting "thermal" @@ -809,7 +809,7 @@ nshapeo = build_text("ps_hshadow", ""); break; default: - rnd_message(PCB_MSG_ERROR, "Internal error: unimplemented pad stack shape %d\n", shape->shape); + rnd_message(RND_MSG_ERROR, "Internal error: unimplemented pad stack shape %d\n", shape->shape); abort(); } lht_dom_hash_put(nshape, nshapeo); @@ -954,10 +954,10 @@ lht_dom_hash_put(obj, dummy_node("purpose")); } else if (layer->meta.bound.purpose != NULL) - rnd_message(PCB_MSG_WARNING, "io_lihata: attempting to save bound layer with a purpose string - not supported in lihata board below v6. Layer binding might be broken after load.\n"); + rnd_message(RND_MSG_WARNING, "io_lihata: attempting to save bound layer with a purpose string - not supported in lihata board below v6. Layer binding might be broken after load.\n"); } else - rnd_message(PCB_MSG_WARNING, "io_lihata: attempting to save bound layers in lihata version lower than 3; feature not supported by the format.\n"); + rnd_message(RND_MSG_WARNING, "io_lihata: attempting to save bound layers in lihata version lower than 3; feature not supported by the format.\n"); } if (!layer->is_bound) @@ -1029,7 +1029,7 @@ if (gflg & PCB_LYT_BOTTOM) gbottom = gm; grp[n] = gm; -/* pcb_trace("build data layers: %d -> %ld {%ld %ld}\n", n, gm, gtop, gbottom); */ +/* rnd_trace("build data layers: %d -> %ld {%ld %ld}\n", n, gm, gtop, gbottom); */ gm++; } else @@ -1506,7 +1506,7 @@ brd = build_board(PCB); if (brd == NULL) { - rnd_message(PCB_MSG_ERROR, "Failed to build the board at that version - nothing is written\n"); + rnd_message(RND_MSG_ERROR, "Failed to build the board at that version - nothing is written\n"); return -1; } @@ -1575,8 +1575,8 @@ res = lht_dom_export(brd->root, fe, ""); fclose(fe); } - rnd_message(PCB_MSG_ERROR, "lhtpers_fsave_as() failed. Please include files %s and %s and %s in your bugreport\n", inf, old_filename, fe_name); - rnd_message(PCB_MSG_ERROR, "in case this broke your file %s, please use the emergency save %s instead.\n", old_filename, fe_name); + rnd_message(RND_MSG_ERROR, "lhtpers_fsave_as() failed. Please include files %s and %s and %s in your bugreport\n", inf, old_filename, fe_name); + rnd_message(RND_MSG_ERROR, "in case this broke your file %s, please use the emergency save %s instead.\n", old_filename, fe_name); } fflush(FP); if (inf != NULL) @@ -1626,7 +1626,7 @@ f = pcb_fopen_askovr(&PCB->hidlib, Filename, "w", NULL); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "Failed to open font file %s for write\n", Filename); + rnd_message(RND_MSG_ERROR, "Failed to open font file %s for write\n", Filename); return -1; } @@ -1674,7 +1674,7 @@ TODO("subc: for subc-in-subc this should be recursive") if (padstacklist_first(&sc->data->padstack) != NULL) { if (wrver < 4) { - rnd_message(PCB_MSG_WARNING, "Had to bump lihata subc version to 4 because the subcircuit contains padstacks.\n"); + rnd_message(RND_MSG_WARNING, "Had to bump lihata subc version to 4 because the subcircuit contains padstacks.\n"); wrver = 4; } } @@ -1686,7 +1686,7 @@ else if (wrver >= 6) doc->root = lht_dom_node_alloc(LHT_LIST, "pcb-rnd-subcircuit-v6"); else { - rnd_message(PCB_MSG_ERROR, "Invalid lihata subc version to write: %d\n", wrver); + rnd_message(RND_MSG_ERROR, "Invalid lihata subc version to write: %d\n", wrver); return -1; } @@ -1703,7 +1703,7 @@ int io_lihata_write_subcs_head(pcb_plug_io_t *ctx, void **udata, FILE *f, int lib, long num_subcs) { if ((lib) || (num_subcs != 1)) { - rnd_message(PCB_MSG_ERROR, "Only one subcircuit per footprint file can be written in lihata\n"); + rnd_message(RND_MSG_ERROR, "Only one subcircuit per footprint file can be written in lihata\n"); return -1; } return 0;