Index: footprint.c =================================================================== --- footprint.c (revision 30954) +++ footprint.c (revision 30955) @@ -117,7 +117,7 @@ int n, i; if (proto == NULL) { - rnd_message(PCB_MSG_ERROR, "tEDAx footprint export: omitting subc padstack with invalid prototype\n"); + rnd_message(RND_MSG_ERROR, "tEDAx footprint export: omitting subc padstack with invalid prototype\n"); return 1; } if (proto->hdia > 0) @@ -225,7 +225,7 @@ pcb_poly_iterate_polyarea(polygon->Clipped, &it); if (pcb_poly_contour(&it) == NULL) { - rnd_message(PCB_MSG_ERROR, "tEDAx footprint export: omitting subc polygon with no clipped contour\n"); + rnd_message(RND_MSG_ERROR, "tEDAx footprint export: omitting subc polygon with no clipped contour\n"); continue; } @@ -234,10 +234,10 @@ numpt++; if (pcb_poly_hole_first(&it) != NULL) - rnd_message(PCB_MSG_ERROR, "tEDAx footprint export: omitting subc polygon holes\n"); + rnd_message(RND_MSG_ERROR, "tEDAx footprint export: omitting subc polygon holes\n"); if (numpt == 0) { - rnd_message(PCB_MSG_ERROR, "tEDAx footprint export: omitting subc polygon with no points\n"); + rnd_message(RND_MSG_ERROR, "tEDAx footprint export: omitting subc polygon with no points\n"); continue; } @@ -316,7 +316,7 @@ f = pcb_fopen_askovr(&PCB->hidlib, fn, "w", NULL); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "tedax_fp_save(): can't open %s for writing\n", fn); + rnd_message(RND_MSG_ERROR, "tedax_fp_save(): can't open %s for writing\n", fn); return -1; } res = tedax_fp_fsave(data, f, subc_idx); @@ -357,7 +357,7 @@ char *end; \ dst = strtol(src, &end, 10); \ if (*end != '\0') { \ - rnd_message(PCB_MSG_ERROR, msg, src); \ + rnd_message(RND_MSG_ERROR, msg, src); \ return -1; \ } \ } while(0) @@ -367,7 +367,7 @@ char *end; \ dst = strtod(src, &end); \ if (*end != '\0') { \ - rnd_message(PCB_MSG_ERROR, msg, src); \ + rnd_message(RND_MSG_ERROR, msg, src); \ return -1; \ } \ } while(0) @@ -377,7 +377,7 @@ rnd_bool succ; \ dst = pcb_get_value_ex(src, NULL, NULL, NULL, "mm", &succ); \ if (!succ) { \ - rnd_message(PCB_MSG_ERROR, msg, src); \ + rnd_message(RND_MSG_ERROR, msg, src); \ return -1; \ } \ } while(0) @@ -390,7 +390,7 @@ load_int(termid, src, msg); \ term = htip_get(&terms, termid); \ if (term == NULL) { \ - rnd_message(PCB_MSG_ERROR, "undefined terminal %s - skipping footprint\n", src); \ + rnd_message(RND_MSG_ERROR, "undefined terminal %s - skipping footprint\n", src); \ return -1; \ } \ rnd_attribute_put(&obj->Attributes, "term", term->name); \ @@ -404,7 +404,7 @@ else if (strcmp(src, "primary") == 0) \ dst = 0; \ else { \ - rnd_message(PCB_MSG_ERROR, msg, lloc); \ + rnd_message(RND_MSG_ERROR, msg, lloc); \ return -1; \ } \ } while(0) @@ -417,7 +417,7 @@ argc--; argv++; if (max*2 != argc) { - rnd_message(PCB_MSG_ERROR, "invalid number of polygon points: expected %d coords got %d skipping footprint\n", max*2, argc); + rnd_message(RND_MSG_ERROR, "invalid number of polygon points: expected %d coords got %d skipping footprint\n", max*2, argc); return -1; } for(n = 0; n < max; n++) { @@ -442,7 +442,7 @@ else if (strcmp(ltyp, "mask") == 0) lyt |= PCB_LYT_MASK; else if (strcmp(ltyp, "paste") == 0) lyt |= PCB_LYT_PASTE; else { - rnd_message(PCB_MSG_ERROR, "tEDAx footprint load: invalid layer type %s\n", ltyp); + rnd_message(RND_MSG_ERROR, "tEDAx footprint load: invalid layer type %s\n", ltyp); return NULL; } @@ -462,7 +462,7 @@ else if (strcmp(lloc, "secondary") == 0) lyt |= PCB_LYT_BOTTOM; else if (strcmp(lloc, "inner") == 0) lyt |= PCB_LYT_INTERN; else { - rnd_message(PCB_MSG_ERROR, "tEDAx footprint load: invalid layer location %s\n", lloc); + rnd_message(RND_MSG_ERROR, "tEDAx footprint load: invalid layer location %s\n", lloc); return NULL; } @@ -495,7 +495,7 @@ numpt = load_poly(px, py, (sizeof(px) / sizeof(px[0])), argc-5, argv+5); if (numpt < 0) { - rnd_message(PCB_MSG_ERROR, "tEDAx footprint load: failed to load polygon\n"); + rnd_message(RND_MSG_ERROR, "tEDAx footprint load: failed to load polygon\n"); return -1; } load_val(clr, argv[4], "invalid clearance"); @@ -504,7 +504,7 @@ int n; p = pcb_poly_new(*ly, clr, pcb_no_flags()); if (p == NULL) { - rnd_message(PCB_MSG_ERROR, "tEDAx footprint load: failed to create poly, skipping footprint\n"); + rnd_message(RND_MSG_ERROR, "tEDAx footprint load: failed to create poly, skipping footprint\n"); return -1; } for(n = 0; n < numpt; n++) @@ -647,7 +647,7 @@ f = pcb_fopen(&PCB->hidlib, fn, "r"); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "can't open file '%s' for read\n", fn); + rnd_message(RND_MSG_ERROR, "can't open file '%s' for read\n", fn); return -1; } Index: parse.c =================================================================== --- parse.c (revision 30954) +++ parse.c (revision 30955) @@ -94,12 +94,12 @@ /* look for the header */ if ((argc = tedax_getline(f, buff, buff_size, argv, argv_size)) < 2) { - rnd_message(PCB_MSG_ERROR, "Can't find tEDAx header (no line)\n"); + rnd_message(RND_MSG_ERROR, "Can't find tEDAx header (no line)\n"); return -1; } if ((argv[1] == NULL) || (rnd_strcasecmp(argv[0], "tEDAx") != 0) || (rnd_strcasecmp(argv[1], "v1") != 0)) { - rnd_message(PCB_MSG_ERROR, "Can't find tEDAx header (wrong line)\n"); + rnd_message(RND_MSG_ERROR, "Can't find tEDAx header (wrong line)\n"); return -1; } @@ -118,7 +118,7 @@ if (argc < 2) { if (!silent) - rnd_message(PCB_MSG_ERROR, "Can't find %s %s block in tEDAx\n", blk_ver, blk_name); + rnd_message(RND_MSG_ERROR, "Can't find %s %s block in tEDAx\n", blk_ver, blk_name); return -1; } Index: stackup.c =================================================================== --- stackup.c (revision 30954) +++ stackup.c (revision 30955) @@ -257,7 +257,7 @@ else if (strcmp(lloc, "virtual") == 0) grp->ltype |= PCB_LYT_VIRTUAL; else if (strcmp(lloc, "all") == 0) {} else - rnd_message(PCB_MSG_ERROR, "invalid layer location: %s\n", lloc); + rnd_message(RND_MSG_ERROR, "invalid layer location: %s\n", lloc); for(t = layertab; t->typename != NULL; t++) { if (strcmp(typename, t->typename) == 0) { @@ -269,7 +269,7 @@ } } - rnd_message(PCB_MSG_ERROR, "invalid layer type: %s\n", typename); + rnd_message(RND_MSG_ERROR, "invalid layer type: %s\n", typename); return -1; } @@ -335,7 +335,7 @@ f = pcb_fopen_askovr(&PCB->hidlib, fn, "w", NULL); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "tedax_stackup_save(): can't open %s for writing\n", fn); + rnd_message(RND_MSG_ERROR, "tedax_stackup_save(): can't open %s for writing\n", fn); return -1; } tedax_stackup_init(&ctx); @@ -418,7 +418,7 @@ f = pcb_fopen(&PCB->hidlib, fn, "r"); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "tedax_stackup_load(): can't open %s for reading\n", fn); + rnd_message(RND_MSG_ERROR, "tedax_stackup_load(): can't open %s for reading\n", fn); return -1; } tedax_stackup_init(&ctx); Index: tboard.c =================================================================== --- tboard.c (revision 30954) +++ tboard.c (revision 30955) @@ -130,7 +130,7 @@ fputc('\n', f); if (tedax_stackup_fsave(&ctx, pcb, stackupid, f) != 0) { - rnd_message(PCB_MSG_ERROR, "internal error: failed to save the stackup\n"); + rnd_message(RND_MSG_ERROR, "internal error: failed to save the stackup\n"); goto error; } @@ -258,7 +258,7 @@ f = pcb_fopen_askovr(&PCB->hidlib, fn, "w", NULL); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "tedax_board_save(): can't open %s for writing\n", fn); + rnd_message(RND_MSG_ERROR, "tedax_board_save(): can't open %s for writing\n", fn); return -1; } fprintf(f, "tEDAx v1\n"); @@ -270,7 +270,7 @@ #define errexit(msg) \ do { \ if (!silent) \ - rnd_message(PCB_MSG_ERROR, msg); \ + rnd_message(RND_MSG_ERROR, msg); \ res = -1; \ goto error; \ } while(0) @@ -378,7 +378,7 @@ y2 = pcb_get_value(argv[4], "mm", NULL, &succ); if (!succ) errexit("Invalid y2 coord in drawing_area\n"); if ((x1 >= x2) || (y1 >= y2)) errexit("Invalid (unordered, negative box) drawing area\n"); - if ((x1 < 0) || (y1 < 0)) rnd_message(PCB_MSG_WARNING, "drawing_area starts at negative coords; some objects may not display;\nyou may want to run autocrop()\n"); + if ((x1 < 0) || (y1 < 0)) rnd_message(RND_MSG_WARNING, "drawing_area starts at negative coords; some objects may not display;\nyou may want to run autocrop()\n"); PCB->hidlib.size_x = x2 - x1; PCB->hidlib.size_y = y2 - y1; } @@ -506,7 +506,7 @@ { /* placement */ htsp_entry_t *e; for(e = htsp_first(&plc); e != NULL; e = htsp_next(&plc, e)) { -pcb_trace("placing '%s'\n", e->key); +rnd_trace("placing '%s'\n", e->key); } } @@ -545,7 +545,7 @@ f = pcb_fopen(&PCB->hidlib, fn, "r"); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "tedax_board_load(): can't open %s for reading\n", fn); + rnd_message(RND_MSG_ERROR, "tedax_board_load(): can't open %s for reading\n", fn); return -1; } res = tedax_board_fload(pcb, f, blk_id, silent); Index: tdrc.c =================================================================== --- tdrc.c (revision 30954) +++ tdrc.c (revision 30955) @@ -79,7 +79,7 @@ f = pcb_fopen_askovr(&PCB->hidlib, fn, "w", NULL); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "tedax_drc_save(): can't open %s for writing\n", fn); + rnd_message(RND_MSG_ERROR, "tedax_drc_save(): can't open %s for writing\n", fn); return -1; } fprintf(f, "tEDAx v1\n"); @@ -114,13 +114,13 @@ val[n] = d; } else - rnd_message(PCB_MSG_ERROR, "ignoring invalid numeric value '%s'\n", argv[4]); + rnd_message(RND_MSG_ERROR, "ignoring invalid numeric value '%s'\n", argv[4]); } } else if ((argc == 2) && (strcmp(argv[0], "end") == 0) && (strcmp(argv[1], "drc") == 0)) break; else - rnd_message(PCB_MSG_ERROR, "ignoring invalid command in drc %s\n", argv[0]); + rnd_message(RND_MSG_ERROR, "ignoring invalid command in drc %s\n", argv[0]); } for(n = 0, r = rules; n < NUM_RULES; r++,n++) @@ -135,7 +135,7 @@ f = pcb_fopen(&PCB->hidlib, fn, "r"); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "tedax_drc_load(): can't open %s for reading\n", fn); + rnd_message(RND_MSG_ERROR, "tedax_drc_load(): can't open %s for reading\n", fn); return -1; } res = tedax_drc_fload(pcb, f, blk_id, silent); Index: tetest.c =================================================================== --- tetest.c (revision 30954) +++ tetest.c (revision 30955) @@ -161,7 +161,7 @@ f = pcb_fopen_askovr(&PCB->hidlib, fn, "w", NULL); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "tedax_etest_save(): can't open %s for writing\n", fn); + rnd_message(RND_MSG_ERROR, "tedax_etest_save(): can't open %s for writing\n", fn); return -1; } fprintf(f, "tEDAx v1\n"); Index: tlayer.c =================================================================== --- tlayer.c (revision 30954) +++ tlayer.c (revision 30955) @@ -131,7 +131,7 @@ f = pcb_fopen_askovr(&PCB->hidlib, fn, "w", NULL); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "tedax_layer_save(): can't open %s for writing\n", fn); + rnd_message(RND_MSG_ERROR, "tedax_layer_save(): can't open %s for writing\n", fn); return -1; } fprintf(f, "tEDAx v1\n"); @@ -159,7 +159,7 @@ while((argc = tedax_seek_block(f, "polyline", "v1", NULL, 1, line, sizeof(line), argv, sizeof(argv)/sizeof(argv[0]))) > 1) { char *pname; if (htsp_has(&plines, argv[3])) { - rnd_message(PCB_MSG_ERROR, "duplicate polyline: %s\n", argv[3]); + rnd_message(RND_MSG_ERROR, "duplicate polyline: %s\n", argv[3]); res = -1; goto error; } @@ -174,7 +174,7 @@ vtc0_append(coords, pcb_get_value(argv[1], "mm", NULL, &s1)); vtc0_append(coords, pcb_get_value(argv[2], "mm", NULL, &s2)); if (!s1 || !s2) { - rnd_message(PCB_MSG_ERROR, "invalid coords in polyline %s: %s;%s\n", pname, argv[1], argv[2]); + rnd_message(RND_MSG_ERROR, "invalid coords in polyline %s: %s;%s\n", pname, argv[1], argv[2]); res = -1; free(pname); goto error; @@ -184,7 +184,7 @@ break; } else { - rnd_message(PCB_MSG_ERROR, "invalid command in polyline %s: %s\n", pname, argv[0]); + rnd_message(RND_MSG_ERROR, "invalid command in polyline %s: %s\n", pname, argv[0]); res = -1; free(pname); goto error; @@ -199,7 +199,7 @@ while((argc = tedax_seek_block(f, "layer", "v1", blk_id, silent, line, sizeof(line), argv, sizeof(argv)/sizeof(argv[0]))) > 1) { pcb_layer_t *ly; if (data->LayerN >= PCB_MAX_LAYER) { - rnd_message(PCB_MSG_ERROR, "too many layers\n"); + rnd_message(RND_MSG_ERROR, "too many layers\n"); res = -1; goto error; } @@ -226,7 +226,7 @@ x2 = pcb_get_value(argv[3], "mm", NULL, &s3); y2 = pcb_get_value(argv[4], "mm", NULL, &s4); if (!s1 || !s2 || !s3 || !s4) { - rnd_message(PCB_MSG_ERROR, "invalid line coords in line: %s;%s %s;%s\n", argv[1], argv[2], argv[3], argv[4]); + rnd_message(RND_MSG_ERROR, "invalid line coords in line: %s;%s %s;%s\n", argv[1], argv[2], argv[3], argv[4]); res = -1; goto error; } @@ -233,7 +233,7 @@ th = pcb_get_value(argv[5], "mm", NULL, &s1); cl = pcb_get_value(argv[6], "mm", NULL, &s2); if (!s1 || !s2) { - rnd_message(PCB_MSG_ERROR, "invalid thickness or clearance in line: %s;%s\n", argv[5], argv[6]); + rnd_message(RND_MSG_ERROR, "invalid thickness or clearance in line: %s;%s\n", argv[5], argv[6]); res = -1; goto error; } @@ -248,19 +248,19 @@ cy = pcb_get_value(argv[2], "mm", NULL, &s2); r = pcb_get_value(argv[3], "mm", NULL, &s3); if (!s1 || !s2 || !s3) { - rnd_message(PCB_MSG_ERROR, "invalid arc coords or radius in line: %s;%s %s\n", argv[1], argv[2], argv[3]); + rnd_message(RND_MSG_ERROR, "invalid arc coords or radius in line: %s;%s %s\n", argv[1], argv[2], argv[3]); res = -1; goto error; } sa = strtod(argv[4], &end); if ((*end != '\0') || (sa < 0) || (sa >= 360.0)) { - rnd_message(PCB_MSG_ERROR, "invalid arc start angle %s\n", argv[4]); + rnd_message(RND_MSG_ERROR, "invalid arc start angle %s\n", argv[4]); res = -1; goto error; } da = strtod(argv[5], &end); if ((*end != '\0') || (da < -360.0) || (da > 360.0)) { - rnd_message(PCB_MSG_ERROR, "invalid arc delta angle %s\n", argv[5]); + rnd_message(RND_MSG_ERROR, "invalid arc delta angle %s\n", argv[5]); res = -1; goto error; } @@ -267,7 +267,7 @@ th = pcb_get_value(argv[6], "mm", NULL, &s1); cl = pcb_get_value(argv[7], "mm", NULL, &s2); if (!s1 || !s2) { - rnd_message(PCB_MSG_ERROR, "invalid thickness or clearance in arc: %s;%s\n", argv[6], argv[7]); + rnd_message(RND_MSG_ERROR, "invalid thickness or clearance in arc: %s;%s\n", argv[6], argv[7]); res = -1; goto error; } @@ -284,13 +284,13 @@ bx2 = pcb_get_value(argv[3], "mm", NULL, &s3); by2 = pcb_get_value(argv[4], "mm", NULL, &s4); if (!s1 || !s2 || !s3 || !s4) { - rnd_message(PCB_MSG_ERROR, "invalid bbox coords in text %s;%s %s;%s \n", argv[1], argv[2], argv[3], argv[4]); + rnd_message(RND_MSG_ERROR, "invalid bbox coords in text %s;%s %s;%s \n", argv[1], argv[2], argv[3], argv[4]); res = -1; goto error; } rot = strtod(argv[6], &end); if (*end != '\0') { - rnd_message(PCB_MSG_ERROR, "invalid text rotation %s \n", argv[6]); + rnd_message(RND_MSG_ERROR, "invalid text rotation %s \n", argv[6]); res = -1; goto error; } @@ -323,17 +323,17 @@ ox = pcb_get_value(argv[2], "mm", NULL, &s1); oy = pcb_get_value(argv[3], "mm", NULL, &s2); if (!s1 || !s2) { - rnd_message(PCB_MSG_ERROR, "invalid coords in poly %s;%s\n", argv[2], argv[3]); + rnd_message(RND_MSG_ERROR, "invalid coords in poly %s;%s\n", argv[2], argv[3]); res = -1; goto error; } coords = htsp_get(&plines, argv[1]); if (coords == NULL) { - rnd_message(PCB_MSG_ERROR, "invalid polyline referecnce %s\n", argv[1]); + rnd_message(RND_MSG_ERROR, "invalid polyline referecnce %s\n", argv[1]); res = -1; goto error; } - pcb_trace("POLY: %mm %mm %s\n", ox, oy, argv[1]); + rnd_trace("POLY: %mm %mm %s\n", ox, oy, argv[1]); poly = pcb_poly_new(ly, 0, pcb_no_flags()); for(n = 0; n < coords->used; n+=2) pcb_poly_point_new(poly, ox+coords->array[n], oy+coords->array[n+1]); @@ -342,7 +342,7 @@ else if ((argc == 2) && (strcmp(argv[0], "end") == 0) && (strcmp(argv[1], "layer") == 0)) break; else { - rnd_message(PCB_MSG_ERROR, "invalid layer object %s\n", argv[0]); + rnd_message(RND_MSG_ERROR, "invalid layer object %s\n", argv[0]); res = -1; goto error; } @@ -367,7 +367,7 @@ f = pcb_fopen(&PCB->hidlib, fn, "r"); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "tedax_layers_load(): can't open %s for reading\n", fn); + rnd_message(RND_MSG_ERROR, "tedax_layers_load(): can't open %s for reading\n", fn); return -1; } res = tedax_layers_fload(data, f, blk_id, silent); Index: tnetlist.c =================================================================== --- tnetlist.c (revision 30954) +++ tnetlist.c (revision 30955) @@ -118,9 +118,9 @@ for (e = htsp_first(&fps); e; e = htsp_next(&fps, e)) { fp_t *fp = e->value; -/* pcb_trace("tedax fp: refdes=%s val=%s fp=%s\n", e->key, fp->value, fp->footprint);*/ +/* rnd_trace("tedax fp: refdes=%s val=%s fp=%s\n", e->key, fp->value, fp->footprint);*/ if (fp->footprint == NULL) - rnd_message(PCB_MSG_ERROR, "tedax: not importing refdes=%s: no footprint specified\n", e->key); + rnd_message(RND_MSG_ERROR, "tedax: not importing refdes=%s: no footprint specified\n", e->key); else rnd_actionva(&PCB->hidlib, "ElementList", "Need", null_empty(e->key), null_empty(fp->footprint), null_empty(fp->value), NULL); @@ -158,7 +158,7 @@ fn = pcb_fopen(&PCB->hidlib, fname_net, "r"); if (fn == NULL) { - rnd_message(PCB_MSG_ERROR, "can't open file '%s' for read\n", fname_net); + rnd_message(RND_MSG_ERROR, "can't open file '%s' for read\n", fname_net); return -1; } @@ -234,7 +234,7 @@ f = pcb_fopen_askovr(&PCB->hidlib, fn, "w", NULL); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "tedax_net_save(): can't open %s for writing\n", fn); + rnd_message(RND_MSG_ERROR, "tedax_net_save(): can't open %s for writing\n", fn); return -1; } fprintf(f, "tEDAx v1\n"); @@ -268,7 +268,7 @@ static int tedaxnet_import(pcb_plug_import_t *ctx, unsigned int aspects, const char **args, int numargs) { if (numargs != 1) { - rnd_message(PCB_MSG_ERROR, "import_tedaxnet: requires exactly 1 input file name\n"); + rnd_message(RND_MSG_ERROR, "import_tedaxnet: requires exactly 1 input file name\n"); return -1; } return tedax_net_load(args[0], 1, NULL, 0);