Index: eagle_bin.c =================================================================== --- eagle_bin.c (revision 30954) +++ eagle_bin.c (revision 30955) @@ -1104,7 +1104,7 @@ egb_ctx->free_text_cursor = NULL; if (fread(block, 1, 8, f) != 8) { - rnd_message(PCB_MSG_ERROR, "Short attempted free text section read. Text section not found.\n"); + rnd_message(RND_MSG_ERROR, "Short attempted free text section read. Text section not found.\n"); return -1; } @@ -1111,7 +1111,7 @@ if (load_long(block, 0, 1) == 0x13 && load_long(block, 1, 1) == 0x12) { } else { - rnd_message(PCB_MSG_ERROR, "Failed to find 0x1312 start of pre-DRC free text section.\n"); + rnd_message(RND_MSG_ERROR, "Failed to find 0x1312 start of pre-DRC free text section.\n"); return -1; } @@ -1121,13 +1121,13 @@ TODO("TODO instead of skipping the text, we need to load it completely with drc_ctx->free_text pointing to it") while (text_remaining > 400) { if (fread(free_text, 1, 400, f) != 400) { - rnd_message(PCB_MSG_ERROR, "Short attempted free text block read. Truncated file?\n"); + rnd_message(RND_MSG_ERROR, "Short attempted free text block read. Truncated file?\n"); return -1; } text_remaining -= 400; } if (fread(free_text, 1, text_remaining, f) != text_remaining) { - rnd_message(PCB_MSG_ERROR, "Short attempted free text block read. Truncated file?\n"); + rnd_message(RND_MSG_ERROR, "Short attempted free text block read. Truncated file?\n"); return -1; } return 0; @@ -1150,7 +1150,7 @@ if (fread(block, 1, 4, f) != 4) { TODO(": convert this to proper error reporting") - pcb_trace("E: short attempted DRC preamble read; preamble not found. Truncated file?\n"); + rnd_trace("E: short attempted DRC preamble read; preamble not found. Truncated file?\n"); return -1; } @@ -1160,11 +1160,11 @@ && load_long(block, 2, 1) == 0x00 && load_long(block, 3, 1) == 0x20)) { TODO(": convert this to proper error reporting") - pcb_trace("E: start of DRC preamble not found where it was expected.\n"); - pcb_trace("E: drc byte 0 : %d\n", (int)load_long(block, 0, 1) ); - pcb_trace("E: drc byte 1 : %d\n", (int)load_long(block, 1, 1) ); - pcb_trace("E: drc byte 2 : %d\n", (int)load_long(block, 2, 1) ); - pcb_trace("E: drc byte 3 : %d\n", (int)load_long(block, 3, 1) ); + rnd_trace("E: start of DRC preamble not found where it was expected.\n"); + rnd_trace("E: drc byte 0 : %d\n", (int)load_long(block, 0, 1) ); + rnd_trace("E: drc byte 1 : %d\n", (int)load_long(block, 1, 1) ); + rnd_trace("E: drc byte 2 : %d\n", (int)load_long(block, 2, 1) ); + rnd_trace("E: drc byte 3 : %d\n", (int)load_long(block, 3, 1) ); return -1; } @@ -1171,13 +1171,13 @@ while (!DRC_preamble_end_found) { if (fread(&c, 1, 1, f) != 1) { /* the text preamble is not necessarily n * 4 bytes */ TODO(": convert this to proper error reporting") - pcb_trace("E: short attempted DRC preamble read. Truncated file?\n"); + rnd_trace("E: short attempted DRC preamble read. Truncated file?\n"); return -1; } else { if (c == '\0') { /* so we step through, looking for each 0x00 */ if (fread(block, 1, 4, f) != 4) { /* the text preamble seems to n * 24 bytes */ TODO(": convert this to proper error reporting") - pcb_trace("E: short attempted DRC preamble read. Truncated file?\n"); + rnd_trace("E: short attempted DRC preamble read. Truncated file?\n"); return -1; } if (load_long(block, 0, 1) == 0x78 @@ -1192,7 +1192,7 @@ if (fread(DRC_block, 1, DRC_length_used, f) != DRC_length_used) { TODO(": convert this to proper error reporting") - pcb_trace("E: short DRC value block read. DRC section incomplete. Truncated file?\n"); + rnd_trace("E: short DRC value block read. DRC section incomplete. Truncated file?\n"); return -1; } @@ -1280,7 +1280,7 @@ /* load the current block */ if (fread(block, 1, 24, f) != 24) { TODO(": convert this to proper error reporting") - pcb_trace("E: short read\n"); + rnd_trace("E: short read\n"); return -1; } processed++; @@ -1311,7 +1311,7 @@ } TODO(": convert this to proper error reporting") - pcb_trace("E: unknown block ID 0x%02x%02x at offset %ld\n", block[0], block[1], ftell(f)); + rnd_trace("E: unknown block ID 0x%02x%02x at offset %ld\n", block[0], block[1], ftell(f)); return -1; found:; @@ -1607,10 +1607,10 @@ } if (!cxy_ok) { - rnd_message(PCB_MSG_ERROR, "cx and cy not set in arc/linetype: %d/%d\n", linetype, arctype); + rnd_message(RND_MSG_ERROR, "cx and cy not set in arc/linetype: %d/%d\n", linetype, arctype); cx = cy = 0; } else if (!(x1_ok && x2_ok && y1_ok && y2_ok)) { - rnd_message(PCB_MSG_ERROR, "x1/2 or y1/2 not set in binary arc\n"); + rnd_message(RND_MSG_ERROR, "x1/2 or y1/2 not set in binary arc\n"); } radius = (long)(rnd_distance((double)cx, (double)cy, (double)x2, (double)y2)); sprintf(itoa_buffer, "%ld", radius); @@ -1633,7 +1633,7 @@ /* count children of libraries */ for(n = libraries->first_child; (n != NULL) && (idx > 1); n = n->next, idx--) ; if (n == NULL) - rnd_message(PCB_MSG_ERROR, "io_eagle bin: eagle_library_ref_by_idx() can't find library index %ld\n", idx); + rnd_message(RND_MSG_ERROR, "io_eagle bin: eagle_library_ref_by_idx() can't find library index %ld\n", idx); return n; } @@ -1645,11 +1645,11 @@ /* find library/0x1500->packages/0x1900 node */ for(pkgs = library->first_child; (pkgs != NULL) && ((pkgs->id & 0xFF00) != 0x1900); pkgs = pkgs->next); if (pkgs == NULL) - rnd_message(PCB_MSG_ERROR, "io_eagle bin: eagle_pkg_ref_by_idx() can't find packages node in library tree\n", idx); + rnd_message(RND_MSG_ERROR, "io_eagle bin: eagle_pkg_ref_by_idx() can't find packages node in library tree\n", idx); /* count children of library */ for(n = pkgs->first_child; (n != NULL) && (idx > 1); n = n->next, idx--); if (n == NULL) - rnd_message(PCB_MSG_ERROR, "io_eagle bin: eagle_pkg_ref_by_idx() can't find package index %ld\n", idx); + rnd_message(RND_MSG_ERROR, "io_eagle bin: eagle_pkg_ref_by_idx() can't find package index %ld\n", idx); return n; } @@ -1661,7 +1661,7 @@ /* count children of elelements */ for(n = elements->first_child; (n != NULL) && (idx > 1); n = n->next, idx--) ; if (n == NULL) - rnd_message(PCB_MSG_ERROR, "io_eagle bin: eagle_elem_ref_by_idx() can't find element placement index %ld\n", idx); + rnd_message(RND_MSG_ERROR, "io_eagle bin: eagle_elem_ref_by_idx() can't find element placement index %ld\n", idx); return n; } @@ -2014,7 +2014,7 @@ if (strcmp(e->key, "name") == 0) { if (e->value != NULL && e->value[0] == '-' && e->value[1] == '\0') { egb_node_prop_set(n, "name", "HYPHEN"); - rnd_message(PCB_MSG_WARNING, "Substituted invalid name %s in PCB_EKGW_SECT_ELEMENT with 'HYPHEN'\n", e->value); + rnd_message(RND_MSG_WARNING, "Substituted invalid name %s in PCB_EKGW_SECT_ELEMENT with 'HYPHEN'\n", e->value); } else { egb_node_prop_set(n, "name", e->value); } @@ -2139,7 +2139,7 @@ break; if (n->id != PCB_EGKW_SECT_PACKAGES) { - rnd_message(PCB_MSG_ERROR, "postproc_libs(): unexpected node under libraries (must be packages)\n"); + rnd_message(RND_MSG_ERROR, "postproc_libs(): unexpected node under libraries (must be packages)\n"); return -1; } @@ -2178,7 +2178,7 @@ eagle_bin_ctx.board = find_node(eagle_bin_ctx.drawing->first_child, PCB_EGKW_SECT_BOARD); if (eagle_bin_ctx.board == NULL) { TODO(": convert this to proper error reporting") - pcb_trace("No board node found, this may be a library file.\n"); + rnd_trace("No board node found, this may be a library file.\n"); } else { /* the following code relies on the board node being present, i.e. a layout */ /* create a drc node, since DRC block if present in binary file comes after the tree */ @@ -2186,7 +2186,7 @@ eagle_bin_ctx.libraries = find_node_name(eagle_bin_ctx.board->first_child, "libraries"); if (eagle_bin_ctx.libraries == NULL) { /* layouts have a libraries node it seems */ TODO(": convert this to proper error reporting") - pcb_trace("Eagle binary layout is missing a board/libraries node.\n"); + rnd_trace("Eagle binary layout is missing a board/libraries node.\n"); return -1; } @@ -2238,7 +2238,7 @@ egb_ctx_t eagle_bin_ctx; -/* pcb_trace("blocks remaining prior to function call = %ld\n", *numblocks);*/ +/* rnd_trace("blocks remaining prior to function call = %ld\n", *numblocks);*/ *root = egb_node_alloc(0, "eagle"); @@ -2245,10 +2245,10 @@ res = read_block(numblocks, 1, ctx, f, fn, *root); if (res < 0) { TODO(": convert this to proper error reporting") - pcb_trace("Problem with remaining blocks... is this a library file?\n"); + rnd_trace("Problem with remaining blocks... is this a library file?\n"); return res; } -/* pcb_trace("blocks remaining after outer function call = %ld (after reading %d blocks)\n\n", *numblocks, res);*/ +/* rnd_trace("blocks remaining after outer function call = %ld (after reading %d blocks)\n\n", *numblocks, res);*/ /* could test if < v4 as v3.xx seems to have no DRC or Netclass or Free Text end blocks */ read_notes(ctx, f, fn, &eagle_bin_ctx); @@ -2255,7 +2255,7 @@ /* read_drc will determine sane defaults if no DRC block found */ if (read_drc(ctx, f, fn, &eagle_bin_ctx) != 0) { TODO(": convert this to proper error reporting") - pcb_trace("No DRC section found, either a v3 binary file or a binary library file.\n"); + rnd_trace("No DRC section found, either a v3 binary file or a binary library file.\n"); } /* we now use the eagle_bin_ctx results for post_proc */ return postproc(ctx, *root, &eagle_bin_ctx); Index: read.c =================================================================== --- read.c (revision 30954) +++ read.c (revision 30955) @@ -159,7 +159,7 @@ if (STRCMP(d->node_name, name) == 0) return d->parser(st, subtree, obj, type); - rnd_message(PCB_MSG_ERROR, "eagle: unknown node: '%s'\n", name); + rnd_message(RND_MSG_ERROR, "eagle: unknown node: '%s'\n", name); /* node name not found in the dispatcher table */ return -1; } @@ -315,7 +315,7 @@ ly->lid = -1; tmp_id = eagle_get_attrl(st, n, "number", -1); if (tmp_id < 1 || tmp_id > 254) { - rnd_message(PCB_MSG_ERROR, "invalid layer definition layer number found: '%d', skipping\n", tmp_id); + rnd_message(RND_MSG_ERROR, "invalid layer definition layer number found: '%d', skipping\n", tmp_id); return -1; } id = tmp_id; @@ -422,7 +422,7 @@ return &subc->data->Layer[lid]; if (ly->lid < 0) { - rnd_message(PCB_MSG_ERROR, "\tfp_* layer '%s' not found for module object, using unbound subc layer instead.\n", ly->name); + rnd_message(RND_MSG_ERROR, "\tfp_* layer '%s' not found for module object, using unbound subc layer instead.\n", ly->name); lyt = PCB_LYT_VIRTUAL; comb = 0; return pcb_subc_get_layer(subc, lyt, comb, 1, ly->name, pcb_true); @@ -451,18 +451,18 @@ /* count children of libs so n ends up at the libith library */ for(n = CHILDREN(libs); (n != NULL) && (libi > 1); n = NEXT(n), libi--) ; if (n == NULL) { - rnd_message(PCB_MSG_ERROR, "io_eagle bin: eagle_libelem_by_idx() can't find lib by idx:\n"); + rnd_message(RND_MSG_ERROR, "io_eagle bin: eagle_libelem_by_idx() can't find lib by idx:\n"); return NULL; } if (STRCMP(NODENAME(n), "library") != 0) { - rnd_message(PCB_MSG_ERROR, "io_eagle bin: eagle_libelem_by_idx() expected library node:\n"); + rnd_message(RND_MSG_ERROR, "io_eagle bin: eagle_libelem_by_idx() expected library node:\n"); return NULL; } n = CHILDREN(n); if (STRCMP(NODENAME(n), "packages") != 0) { - rnd_message(PCB_MSG_ERROR, "io_eagle bin: eagle_libelem_by_idx() expected packages node:\n"); + rnd_message(RND_MSG_ERROR, "io_eagle bin: eagle_libelem_by_idx() expected packages node:\n"); return NULL; } @@ -469,13 +469,13 @@ /* count children of that library so n ends up at the pkgth package */ for(n = CHILDREN(n); (n != NULL) && (pkgi > 1); n = NEXT(n), pkgi--) ; if (n == NULL) { - rnd_message(PCB_MSG_ERROR, "io_eagle bin: eagle_libelem_by_idx() can't find pkg by idx:\n"); + rnd_message(RND_MSG_ERROR, "io_eagle bin: eagle_libelem_by_idx() can't find pkg by idx:\n"); return NULL; } res = st->parser.calls->get_user_data(n); if (res == NULL) - rnd_message(PCB_MSG_ERROR, "io_eagle bin: eagle_libelem_by_idx() found the element node in the tree but there's no element instance associated with it:\n"); + rnd_message(RND_MSG_ERROR, "io_eagle bin: eagle_libelem_by_idx() found the element node in the tree but there's no element instance associated with it:\n"); return res; } @@ -517,7 +517,7 @@ case 180: return 2; case 270: return 1; } - rnd_message(PCB_MSG_WARNING, "Unexpected non n*90 degree rotation value '%s' ignored\n", rot); + rnd_message(RND_MSG_WARNING, "Unexpected non n*90 degree rotation value '%s' ignored\n", rot); return -1; } @@ -534,15 +534,15 @@ pcb_layer_t *ly; ly = eagle_layer_get(st, ln, type, obj); if (ly == NULL) { - rnd_message(PCB_MSG_ERROR, "Failed to allocate text layer 'ly' to 'ln:%d' in eagle_read_text()\n", ln); + rnd_message(RND_MSG_ERROR, "Failed to allocate text layer 'ly' to 'ln:%d' in eagle_read_text()\n", ln); return 0; } if (!(text_val = eagle_get_attrs(st, subtree, "textfield", NULL)) && CHILDREN(subtree) == NULL) { - rnd_message(PCB_MSG_WARNING, "Ignoring empty text field\n"); + rnd_message(RND_MSG_WARNING, "Ignoring empty text field\n"); return 0; } if (text_val == NULL && !IS_TEXT(CHILDREN(subtree))) { - rnd_message(PCB_MSG_WARNING, "Ignoring text field (invalid child node)\n"); + rnd_message(RND_MSG_WARNING, "Ignoring text field (invalid child node)\n"); return 0; } @@ -560,7 +560,7 @@ char *end; rotdeg = strtol(rot+1, &end, 10); if (*end != '\0') - rnd_message(PCB_MSG_WARNING, "Ignoring invalid text rotation '%s' (requires integer)\n", rot); + rnd_message(RND_MSG_WARNING, "Ignoring invalid text rotation '%s' (requires integer)\n", rot); TODO("but: alignment changed, see {text_rot}"); /* @@ -569,7 +569,7 @@ */ } else - rnd_message(PCB_MSG_WARNING, "Ignoring invalid text rotation '%s' (missing R prefix)\n", rot); + rnd_message(RND_MSG_WARNING, "Ignoring invalid text rotation '%s' (missing R prefix)\n", rot); } TODO("{text_size} calculate bounding box, requires size_bump(st, X, Y)") pcb_text_new(ly, pcb_font(st->pcb, 0, 1), X, Y, rotdeg, text_scaling, 0, text_val, text_flags); @@ -596,7 +596,7 @@ ly = eagle_layer_get(st, ln, loc, obj); if (ly == NULL) { - rnd_message(PCB_MSG_ERROR, "Failed to allocate circle layer 'ly' to 'ln:%d' in eagle_read_circle()\n", ln); + rnd_message(RND_MSG_ERROR, "Failed to allocate circle layer 'ly' to 'ln:%d' in eagle_read_circle()\n", ln); return 0; } @@ -632,7 +632,7 @@ ly = eagle_layer_get(st, ln, loc, obj); if (ly == NULL) { - rnd_message(PCB_MSG_ERROR, "Failed to allocate rect layer 'ly' to 'ln:%d' in eagle_read_rect()\n", ln); + rnd_message(RND_MSG_ERROR, "Failed to allocate rect layer 'ly' to 'ln:%d' in eagle_read_rect()\n", ln); return 0; } @@ -678,7 +678,7 @@ r = (sidelen / 2) / tan(curvang / PCB_RAD_TO_DEG / 2.0); cx = rnd_round(midx + nx * r); cy = rnd_round(midy + ny * r); -/* pcb_trace("curve mid: %mm;%mm center: %mm;%mm\n", midx, midy, cx, cy);*/ +/* rnd_trace("curve mid: %mm;%mm center: %mm;%mm\n", midx, midy, cx, cy);*/ dx = x1 - cx; dy = y1 - cy; @@ -686,7 +686,7 @@ sa = 180.0 - atan2(y1 - cy, x1 - cx) * PCB_RAD_TO_DEG; ea = 180.0 - atan2(y2 - cy, x2 - cx) * PCB_RAD_TO_DEG; da = ea - sa; -/* pcb_trace(" r=%mm %f %f -> %f\n", (rnd_coord_t)r, sa, ea, da);*/ +/* rnd_trace(" r=%mm %f %f -> %f\n", (rnd_coord_t)r, sa, ea, da);*/ arc = pcb_arc_new(ly, cx, cy, r, r, sa, da, th, st->md_wire_wire*2, pcb_flag_make(PCB_FLAG_CLEARLINE), 0); switch (loc) { @@ -739,7 +739,7 @@ ly = eagle_layer_get(st, ln, loc, obj); if (ly == NULL) { - rnd_message(PCB_MSG_ERROR, "Failed to allocate wire layer 'ly' to ln:%d in eagle_read_wire()\n"); + rnd_message(RND_MSG_ERROR, "Failed to allocate wire layer 'ly' to ln:%d in eagle_read_wire()\n"); return 0; } @@ -911,10 +911,10 @@ if (ln != -1) { /* can't go by layer type because there's no layer stack yet (we are in lib) */ if (ln == 16) onbottom = 1; else if (ln== 1) onbottom = 0; - else rnd_message(PCB_MSG_ERROR, "Failed to determine smd pad side, assuming top (invalid layer %d)\n", ln); + else rnd_message(RND_MSG_ERROR, "Failed to determine smd pad side, assuming top (invalid layer %d)\n", ln); } else - rnd_message(PCB_MSG_ERROR, "Failed to determine smd pad side, assuming top (missing layer)\n"); + rnd_message(RND_MSG_ERROR, "Failed to determine smd pad side, assuming top (missing layer)\n"); name = eagle_get_attrs(st, subtree, "name", NULL); x = eagle_get_attrc(st, subtree, "x", 0); @@ -933,7 +933,7 @@ ps = eagle_create_pstk(st, subc->data, x, y, EAGLE_PSH_SMD, dx, dy, clr, 0, roundness, rot, onbottom, 0); if (ps == NULL) - rnd_message(PCB_MSG_ERROR, "Failed to load smd pad\n"); + rnd_message(RND_MSG_ERROR, "Failed to load smd pad\n"); if (name != NULL) rnd_attribute_put(&ps->Attributes, "term", name); @@ -994,7 +994,7 @@ diay *= 2; } else { - rnd_message(PCB_MSG_ERROR, "Invalid padstack shape: '%s' - omitting padstack\n", shape); + rnd_message(RND_MSG_ERROR, "Invalid padstack shape: '%s' - omitting padstack\n", shape); return -1; } } @@ -1097,7 +1097,7 @@ ly = eagle_layer_get(st, ln, loc, obj); if (ly == NULL) { - rnd_message(PCB_MSG_ERROR, "Failed to allocate polygon layer 'ly' to 'ln:%d' in eagle_read_poly()\n", ln); + rnd_message(RND_MSG_ERROR, "Failed to allocate polygon layer 'ly' to 'ln:%d' in eagle_read_poly()\n", ln); return 0; } @@ -1159,7 +1159,7 @@ trnode_t *n; for(n = CHILDREN(subtree); n != NULL; n = NEXT(n)) { - pcb_trace("looking at child %s of packages node\n", NODENAME(n)); + rnd_trace("looking at child %s of packages node\n", NODENAME(n)); if (STRCMP(NODENAME(n), "package") == 0) { pcb_subc_t *subc; @@ -1170,7 +1170,7 @@ eagle_read_pkg(st, n, subc); if (pcb_data_is_empty(subc->data)) { pcb_subc_free(subc); - rnd_message(PCB_MSG_WARNING, "Ignoring empty package in library\n"); + rnd_message(RND_MSG_WARNING, "Ignoring empty package in library\n"); continue; } @@ -1215,7 +1215,7 @@ const char *name = eagle_get_attrs(st, n, "name", NULL); if ((st->elem_by_name) && (name == NULL)) { - rnd_message(PCB_MSG_WARNING, "Ignoring package with no name\n"); + rnd_message(RND_MSG_WARNING, "Ignoring package with no name\n"); continue; } @@ -1222,7 +1222,7 @@ subc = pcb_subc_alloc(); eagle_read_pkg(st, n, subc); if (pcb_subc_is_empty(subc)) { - rnd_message(PCB_MSG_WARNING, "Ignoring empty package %s\n", name); + rnd_message(RND_MSG_WARNING, "Ignoring empty package %s\n", name); free(subc); continue; } @@ -1264,7 +1264,7 @@ const char *name = eagle_get_attrs(st, n, "name", NULL); eagle_library_t *lib; if ((st->elem_by_name) && (name == NULL)) { - rnd_message(PCB_MSG_WARNING, "Ignoring library with no name\n"); + rnd_message(RND_MSG_WARNING, "Ignoring library with no name\n"); continue; } lib = calloc(sizeof(eagle_library_t), 1); @@ -1291,13 +1291,13 @@ if ((elem == NULL) || (pad == NULL)) { - rnd_message(PCB_MSG_WARNING, "Failed to parse contactref node: missing \"element\" or \"pad\" netlist attributes\n"); + rnd_message(RND_MSG_WARNING, "Failed to parse contactref node: missing \"element\" or \"pad\" netlist attributes\n"); return -1; } if (elem != NULL && elem[0] == '-' && elem[1] == '\0') { pcb_snprintf(conn, sizeof(conn), "%s-%s", "HYPHEN", pad); - rnd_message(PCB_MSG_WARNING, "Substituted invalid element name '-' with 'HYPHEN'\n"); + rnd_message(RND_MSG_WARNING, "Substituted invalid element name '-' with 'HYPHEN'\n"); } else { pcb_snprintf(conn, sizeof(conn), "%s-%s", elem, pad); } @@ -1306,7 +1306,7 @@ if (net != NULL && net[0] == '-' && net[1] == '\0') { /* pcb-rnd doesn't like it when Eagle uses '-' for GND*/ rnd_actionva(&st->pcb->hidlib, "Netlist", "Add", "GND", conn, NULL); - rnd_message(PCB_MSG_WARNING, "Substituted contactref net \"GND\" instead of original invalid '-'\n"); + rnd_message(RND_MSG_WARNING, "Substituted contactref net \"GND\" instead of original invalid '-'\n"); } else { rnd_actionva(&st->pcb->hidlib, "Netlist", "Add", net, conn, NULL); } @@ -1334,7 +1334,7 @@ if (STRCMP(NODENAME(n), "signal") == 0) { const char *name = eagle_get_attrs(st, n, "name", NULL); if (name == NULL) { - rnd_message(PCB_MSG_WARNING, "Ignoring signal with no name\n"); + rnd_message(RND_MSG_WARNING, "Ignoring signal with no name\n"); continue; } eagle_foreach_dispatch(st, CHILDREN(n), disp, (char *)name, ON_BOARD); @@ -1391,7 +1391,7 @@ val = eagle_get_attrs(st, n, "value", NULL); if (name == NULL) { - rnd_message(PCB_MSG_ERROR, "Element name not found in tree\n"); + rnd_message(RND_MSG_ERROR, "Element name not found in tree\n"); name = "refdes_not_found"; val = "parse_error"; } @@ -1402,7 +1402,7 @@ if (st->elem_by_name) { /* xml: library and package are named */ if ((lib == NULL) || (pkg == NULL)) { - rnd_message(PCB_MSG_WARNING, "Ignoring element with incomplete library reference\n"); + rnd_message(RND_MSG_WARNING, "Ignoring element with incomplete library reference\n"); continue; } subc = eagle_libelem_by_name(st, lib, pkg); @@ -1411,7 +1411,7 @@ long libi = eagle_get_attrl(st, n, "library", -1); long pkgi = eagle_get_attrl(st, n, "package", -1); if ((libi < 0) || (pkgi < 0)) { - rnd_message(PCB_MSG_WARNING, "Ignoring element with broken library reference: %s/%s\n", lib, pkg); + rnd_message(RND_MSG_WARNING, "Ignoring element with broken library reference: %s/%s\n", lib, pkg); continue; } subc = eagle_libelem_by_idx(st, nlib, libi, pkgi); @@ -1419,11 +1419,11 @@ /* sanity checks: the element exists and is non-empty */ if (subc == NULL) { - rnd_message(PCB_MSG_ERROR, "Library element not found: %s/%s\n", lib, pkg); + rnd_message(RND_MSG_ERROR, "Library element not found: %s/%s\n", lib, pkg); continue; } if (pcb_subc_is_empty(subc)) { - rnd_message(PCB_MSG_ERROR, "Not placing empty element: %s/%s\n", lib, pkg); + rnd_message(RND_MSG_ERROR, "Not placing empty element: %s/%s\n", lib, pkg); continue; } @@ -1460,7 +1460,7 @@ if (steps > 0) pcb_subc_rotate90(new_subc, x, y, steps); else - rnd_message(PCB_MSG_WARNING, "0 degree element rotation/steps used for '%s'/'%d': %s/%s/%s\n", rot, steps, name, pkg, lib); + rnd_message(RND_MSG_WARNING, "0 degree element rotation/steps used for '%s'/'%d': %s/%s/%s\n", rot, steps, name, pkg, lib); } else { double sina, cosa; @@ -1471,7 +1471,7 @@ } } else - rnd_message(PCB_MSG_ERROR, "syntax error in element rotation '%s': %s/%s/%s\n", rot, name, pkg, lib); + rnd_message(RND_MSG_ERROR, "syntax error in element rotation '%s': %s/%s/%s\n", rot, name, pkg, lib); } if (back) @@ -1569,7 +1569,7 @@ dr = eagle_trpath(st, st->parser.root, "drawing", "board", "designrules", NULL); if (dr == NULL) { - rnd_message(PCB_MSG_WARNING, "can't find design rules, using sane defaults\n"); + rnd_message(RND_MSG_WARNING, "can't find design rules, using sane defaults\n"); } else { for(n = CHILDREN(dr); n != NULL; n = NEXT(n)) { if (STRCMP(NODENAME(n), "param") != 0) @@ -1582,7 +1582,7 @@ else if (strcmp(name, "rvPadBottom") == 0) st->rv_pad_bottom = eagle_get_attrd(st, n, "value", 0); } if ((st->rv_pad_top != st->rv_pad_inner) || (st->rv_pad_top != st->rv_pad_inner)) - rnd_message(PCB_MSG_WARNING, "top/inner/bottom default pad sizes differ - using top size only\n"); + rnd_message(RND_MSG_WARNING, "top/inner/bottom default pad sizes differ - using top size only\n"); } return 0; } @@ -1595,22 +1595,22 @@ v3 = 0; if (ver == NULL) { - rnd_message(PCB_MSG_ERROR, "no version attribute in \n"); + rnd_message(RND_MSG_ERROR, "no version attribute in \n"); return -1; } v1 = strtol(ver, &end, 10); if (*end != '.') { - rnd_message(PCB_MSG_ERROR, "malformed version string [1] in \n"); + rnd_message(RND_MSG_ERROR, "malformed version string [1] in \n"); return -1; } v2 = strtol(end+1, &end, 10); if (*end != '.' && *end != '\0') { - rnd_message(PCB_MSG_ERROR, "malformed version string [2] in \n"); + rnd_message(RND_MSG_ERROR, "malformed version string [2] in \n"); return -1; } else if (*end == '.') { v3 = strtol(end+1, &end, 10); if (*end != '\0') { - rnd_message(PCB_MSG_ERROR, "malformed version string [3] in \n"); + rnd_message(RND_MSG_ERROR, "malformed version string [3] in \n"); return -1; } } @@ -1617,14 +1617,14 @@ /* version check */ if (v1 < 6) { - rnd_message(PCB_MSG_ERROR, "file version too old\n"); + rnd_message(RND_MSG_ERROR, "file version too old\n"); return -1; } if (v1 > 8) { - rnd_message(PCB_MSG_ERROR, "file version too new\n"); + rnd_message(RND_MSG_ERROR, "file version too new\n"); return -1; } - rnd_message(PCB_MSG_DEBUG, "Loading eagle board version %d.%d.%d\n", v1, v2, v3); + rnd_message(RND_MSG_DEBUG, "Loading eagle board version %d.%d.%d\n", v1, v2, v3); return 0; } @@ -1722,7 +1722,7 @@ st_init(&st); if (eagle_read_ver(GET_PROP_(&st, st.parser.root, "version")) < 0) { - rnd_message(PCB_MSG_ERROR, "Eagle XML version parse error\n"); + rnd_message(RND_MSG_ERROR, "Eagle XML version parse error\n"); goto err; } @@ -1755,7 +1755,7 @@ err:; st_uninit(&st); - rnd_message(PCB_MSG_ERROR, "Eagle XML parsing error.\n"); + rnd_message(RND_MSG_ERROR, "Eagle XML parsing error.\n"); return -1; } Index: read_dru.c =================================================================== --- read_dru.c (revision 30954) +++ read_dru.c (revision 30955) @@ -150,7 +150,7 @@ d = pcb_get_value(val, NULL, NULL, &succ); if (!succ) { - rnd_message(PCB_MSG_ERROR, "Invalid coord value for key %s: '%s'\n", key, val); + rnd_message(RND_MSG_ERROR, "Invalid coord value for key %s: '%s'\n", key, val); return; } if (d > curr_val) Index: trparse_xml.c =================================================================== --- trparse_xml.c (revision 30954) +++ trparse_xml.c (revision 30955) @@ -47,7 +47,7 @@ f = pcb_fopen_fn(NULL, fn, "r", &efn); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "can't open '%s'\n", fn); + rnd_message(RND_MSG_ERROR, "can't open '%s'\n", fn); return -1; } fclose(f); @@ -54,7 +54,7 @@ doc = xmlReadFile(efn, NULL, 0); if (doc == NULL) { - rnd_message(PCB_MSG_ERROR, "xml parsing error on file %s (%s)\n", fn, efn); + rnd_message(RND_MSG_ERROR, "xml parsing error on file %s (%s)\n", fn, efn); free(efn); return -1; } @@ -62,7 +62,7 @@ root = xmlDocGetRootElement(doc); if (xmlStrcmp(root->name, (xmlChar *)"eagle") != 0) { - rnd_message(PCB_MSG_ERROR, "xml error: root is not \n"); + rnd_message(RND_MSG_ERROR, "xml error: root is not \n"); xmlFreeDoc(doc); return -1; }