Index: trunk/doc-rnd/hacking/renames =================================================================== --- trunk/doc-rnd/hacking/renames (revision 4861) +++ trunk/doc-rnd/hacking/renames (revision 4862) @@ -256,3 +256,4 @@ DrawLayer -> pcb_draw_layer EraseObject -> pcb_erase_obj LightenColor -> pcb_lighten_color +Message -> pcb_message Index: trunk/src/action_act.c =================================================================== --- trunk/src/action_act.c (revision 4861) +++ trunk/src/action_act.c (revision 4862) @@ -87,7 +87,7 @@ */ if (*sp && *sp != '#') { - /*Message ("%s : line %-3d : \"%s\"\n", fname, n, sp); */ + /*pcb_message("%s : line %-3d : \"%s\"\n", fname, n, sp); */ hid_parse_actions(sp); } } Index: trunk/src/action_helper.c =================================================================== --- trunk/src/action_helper.c (revision 4861) +++ trunk/src/action_helper.c (revision 4862) @@ -596,7 +596,7 @@ pcb_pin_t *via; if (!PCB->ViaOn) { - Message(PCB_MSG_DEFAULT, _("You must turn via visibility on before\n" "you can place vias\n")); + pcb_message(PCB_MSG_DEFAULT, _("You must turn via visibility on before\n" "you can place vias\n")); break; } if ((via = CreateNewVia(PCB->Data, Note.X, Note.Y, @@ -975,13 +975,13 @@ &Crosshair.AttachedObject.Ptr1, &Crosshair.AttachedObject.Ptr2, &Crosshair.AttachedObject.Ptr3); if (Crosshair.AttachedObject.Type == PCB_TYPE_NONE) { - Message(PCB_MSG_DEFAULT, "The first point of a polygon hole must be on a polygon.\n"); + pcb_message(PCB_MSG_DEFAULT, "The first point of a polygon hole must be on a polygon.\n"); break; /* don't start doing anything if clicket out of polys */ } if (TEST_FLAG(PCB_FLAG_LOCK, (pcb_polygon_t *) Crosshair.AttachedObject.Ptr2)) { - Message(PCB_MSG_DEFAULT, _("Sorry, the object is locked\n")); + pcb_message(PCB_MSG_DEFAULT, _("Sorry, the object is locked\n")); Crosshair.AttachedObject.Type = PCB_TYPE_NONE; break; } @@ -1104,7 +1104,7 @@ case PCB_MODE_REMOVE: if ((type = SearchScreen(Note.X, Note.Y, REMOVE_TYPES, &ptr1, &ptr2, &ptr3)) != PCB_TYPE_NONE) { if (TEST_FLAG(PCB_FLAG_LOCK, (pcb_line_t *) ptr2)) { - Message(PCB_MSG_DEFAULT, _("Sorry, the object is locked\n")); + pcb_message(PCB_MSG_DEFAULT, _("Sorry, the object is locked\n")); break; } if (type == PCB_TYPE_ELEMENT) { @@ -1150,7 +1150,7 @@ if (Crosshair.AttachedObject.Type != PCB_TYPE_NONE) { if (conf_core.editor.mode == PCB_MODE_MOVE && TEST_FLAG(PCB_FLAG_LOCK, (pcb_pin_t *) Crosshair.AttachedObject.Ptr2)) { - Message(PCB_MSG_DEFAULT, _("Sorry, the object is locked\n")); + pcb_message(PCB_MSG_DEFAULT, _("Sorry, the object is locked\n")); Crosshair.AttachedObject.Type = PCB_TYPE_NONE; } else @@ -1195,7 +1195,7 @@ if (Crosshair.AttachedObject.Type != PCB_TYPE_NONE) { if (TEST_FLAG(PCB_FLAG_LOCK, (pcb_polygon_t *) Crosshair.AttachedObject.Ptr2)) { - Message(PCB_MSG_DEFAULT, _("Sorry, the object is locked\n")); + pcb_message(PCB_MSG_DEFAULT, _("Sorry, the object is locked\n")); Crosshair.AttachedObject.Type = PCB_TYPE_NONE; break; } @@ -1263,7 +1263,7 @@ case PCB_TYPE_ARC: return pcb_get_style_size(F_SelectedArcs, out, 0, size_id); } - Message(PCB_MSG_DEFAULT, _("Sorry, can't fetch the style of that object type (%x)\n"), type); + pcb_message(PCB_MSG_DEFAULT, _("Sorry, can't fetch the style of that object type (%x)\n"), type); return -1; case F_SelectedPads: if (size_id != 2) /* don't mess with pad size */ @@ -1289,7 +1289,7 @@ return 0; case F_SelectedTexts: case F_SelectedNames: - Message(PCB_MSG_DEFAULT, _("Sorry, can't change style of every selected object\n")); + pcb_message(PCB_MSG_DEFAULT, _("Sorry, can't change style of every selected object\n")); return -1; } return 0; Index: trunk/src/action_helper.h =================================================================== --- trunk/src/action_helper.h (revision 4861) +++ trunk/src/action_helper.h (revision 4862) @@ -83,6 +83,6 @@ * Macros called by various action routines to show usage or to report * a syntax error and fail */ -#define PCB_AFAIL(x) { Message (PCB_MSG_ERROR, "Syntax error. Usage:\n%s\n", (x##_syntax)); return 1; } +#define PCB_AFAIL(x) { pcb_message(PCB_MSG_ERROR, "Syntax error. Usage:\n%s\n", (x##_syntax)); return 1; } #endif Index: trunk/src/buffer.c =================================================================== --- trunk/src/buffer.c (revision 4861) +++ trunk/src/buffer.c (revision 4862) @@ -165,11 +165,11 @@ return 1; if (elementlist_length(&PCB_PASTEBUFFER->Data->Element) == 0) { - Message(PCB_MSG_DEFAULT, "Footprint %s contains no elements", name); + pcb_message(PCB_MSG_DEFAULT, "Footprint %s contains no elements", name); return 1; } if (elementlist_length(&PCB_PASTEBUFFER->Data->Element) > 1) { - Message(PCB_MSG_DEFAULT, "Footprint %s contains multiple elements", name); + pcb_message(PCB_MSG_DEFAULT, "Footprint %s contains multiple elements", name); return 1; } @@ -404,13 +404,13 @@ int i; if (elementlist_length(&Buffer->Data->Element)) { - Message(PCB_MSG_DEFAULT, _("You can't mirror a buffer that has elements!\n")); + pcb_message(PCB_MSG_DEFAULT, _("You can't mirror a buffer that has elements!\n")); return; } for (i = 0; i < max_copper_layer + 2; i++) { pcb_layer_t *layer = Buffer->Data->Layer + i; if (textlist_length(&layer->Text)) { - Message(PCB_MSG_DEFAULT, _("You can't mirror a buffer that has text!\n")); + pcb_message(PCB_MSG_DEFAULT, _("You can't mirror a buffer that has text!\n")); return; } } @@ -807,7 +807,7 @@ case F_Save: if (elementlist_length(&PCB_PASTEBUFFER->Data->Element) == 0) { - Message(PCB_MSG_DEFAULT, _("Buffer has no elements!\n")); + pcb_message(PCB_MSG_DEFAULT, _("Buffer has no elements!\n")); break; } free_name = pcb_false; Index: trunk/src/change_act.c =================================================================== --- trunk/src/change_act.c (revision 4861) +++ trunk/src/change_act.c (revision 4862) @@ -186,7 +186,7 @@ set_selected = value ? pcb_clr_selected_join : pcb_set_selected_join; } else { - Message(PCB_MSG_DEFAULT, _("%s(): Flag \"%s\" is not valid\n"), cmd_name, flag_name); + pcb_message(PCB_MSG_DEFAULT, _("%s(): Flag \"%s\" is not valid\n"), cmd_name, flag_name); return; } @@ -198,7 +198,7 @@ if ((type = SearchScreen(Crosshair.X, Crosshair.Y, CHANGESIZE_TYPES, &ptr1, &ptr2, &ptr3)) != PCB_TYPE_NONE) if (TEST_FLAG(PCB_FLAG_LOCK, (pcb_pin_t *) ptr2)) - Message(PCB_MSG_DEFAULT, _("Sorry, the object is locked\n")); + pcb_message(PCB_MSG_DEFAULT, _("Sorry, the object is locked\n")); if (set_object(type, ptr1, ptr2, ptr3)) SetChangedFlag(pcb_true); break; @@ -410,7 +410,7 @@ { if (type != PCB_TYPE_NONE) if (TEST_FLAG(PCB_FLAG_LOCK, (pcb_pin_t *) ptr2)) - Message(PCB_MSG_DEFAULT, _("Sorry, the object is locked\n")); + pcb_message(PCB_MSG_DEFAULT, _("Sorry, the object is locked\n")); if (tostyle) { if (pcb_chg_obj_1st_size(type, ptr1, ptr2, ptr3, value, absolute)) SetChangedFlag(pcb_true); @@ -1388,7 +1388,7 @@ else if (strcasecmp(prim, "delta") == 0) which = 1; else if (strcasecmp(prim, "both") == 0) which = 2; else { - Message(PCB_MSG_ERROR, "Second argument of ChangeAngle must be start, delta or both\n"); + pcb_message(PCB_MSG_ERROR, "Second argument of ChangeAngle must be start, delta or both\n"); return -1; } @@ -1403,7 +1403,7 @@ while(isspace(*delta)) delta++; value = strtod(delta, &end); if (*end != '\0') { - Message(PCB_MSG_ERROR, "Invalid numeric (in angle)\n"); + pcb_message(PCB_MSG_ERROR, "Invalid numeric (in angle)\n"); return -1; } absolute = ((*delta != '-') && (*delta != '+')); @@ -1414,7 +1414,7 @@ { if (type != PCB_TYPE_NONE) { if (TEST_FLAG(PCB_FLAG_LOCK, (pcb_pin_t *) ptr2)) - Message(PCB_MSG_DEFAULT, _("Sorry, the object is locked\n")); + pcb_message(PCB_MSG_DEFAULT, _("Sorry, the object is locked\n")); else { if (pcb_chg_obj_angle(type, ptr1, ptr2, ptr3, which, value, absolute)) SetChangedFlag(pcb_true); @@ -1460,7 +1460,7 @@ else if ((strcasecmp(prim, "height") == 0) || (strcasecmp(prim, "y") == 0)) which = 1; else if (strcasecmp(prim, "both") == 0) which = 2; else { - Message(PCB_MSG_ERROR, "Second argument of ChangeRadius must be width, x, height, y or both\n"); + pcb_message(PCB_MSG_ERROR, "Second argument of ChangeRadius must be width, x, height, y or both\n"); return -1; } @@ -1477,7 +1477,7 @@ { if (type != PCB_TYPE_NONE) { if (TEST_FLAG(PCB_FLAG_LOCK, (pcb_pin_t *) ptr2)) - Message(PCB_MSG_DEFAULT, _("Sorry, the object is locked\n")); + pcb_message(PCB_MSG_DEFAULT, _("Sorry, the object is locked\n")); else { if (pcb_chg_obj_radius(type, ptr1, ptr2, ptr3, which, value, absolute)) SetChangedFlag(pcb_true); Index: trunk/src/compat_dl.c =================================================================== --- trunk/src/compat_dl.c (revision 4861) +++ trunk/src/compat_dl.c (revision 4862) @@ -50,7 +50,7 @@ dw = GetLastError(); /* get the corresponding error message */ - FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | + Formatpcb_message(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, dw, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) & lpMsgBuf, 0, NULL); Index: trunk/src/compat_fs.c =================================================================== --- trunk/src/compat_fs.c (revision 4861) +++ trunk/src/compat_fs.c (revision 4862) @@ -111,7 +111,7 @@ pid = fork(); if (pid < 0) { /* error */ - Message(PCB_MSG_DEFAULT, _("Cannot fork!")); + pcb_message(PCB_MSG_DEFAULT, _("Cannot fork!")); return 1; } else if (pid == 0) { Index: trunk/src/conf.c =================================================================== --- trunk/src/conf.c (revision 4861) +++ trunk/src/conf.c (revision 4862) @@ -99,7 +99,7 @@ resolve_path(fn, &efn, 0); f = fopen(efn, "r"); if (f != NULL) { /* warn only if the file is there - missing file is normal */ - Message(PCB_MSG_DEFAULT, "error: failed to load lht config: %s\n", efn); + pcb_message(PCB_MSG_DEFAULT, "error: failed to load lht config: %s\n", efn); fclose(f); } free(efn); @@ -1061,7 +1061,7 @@ } if (idx >= nat->array_size) { - Message(PCB_MSG_DEFAULT, "Error: can't conf_set() %s[%d]: %d is beyond the end of the array (%d)\n", path, idx, idx, nat->array_size); + pcb_message(PCB_MSG_DEFAULT, "Error: can't conf_set() %s[%d]: %d is beyond the end of the array (%d)\n", path, idx, idx, nat->array_size); free(path); return -1; } @@ -1088,7 +1088,7 @@ return 0; } if (conf_root_lock[target]) { - Message(PCB_MSG_DEFAULT, "WARNING: can't set config item %s because target in-memory lihata does not have the node and is tree-locked\n", path_); + pcb_message(PCB_MSG_DEFAULT, "WARNING: can't set config item %s because target in-memory lihata does not have the node and is tree-locked\n", path_); free(path); return -1; } @@ -1490,7 +1490,7 @@ case CFR_PROJECT: fn = conf_get_project_conf_name(project_fn, pcb_fn, &try); if (fn == NULL) { - Message(PCB_MSG_DEFAULT, "Error: can not save config to project file: %s does not exist - please create an empty file there first\n", try); + pcb_message(PCB_MSG_DEFAULT, "Error: can not save config to project file: %s does not exist - please create an empty file there first\n", try); return -1; } break; @@ -1511,11 +1511,11 @@ if (end != NULL) { *end = '\0'; if (pcb_mkdir(path, 0755) == 0) { - Message(PCB_MSG_DEFAULT, "Created directory %s for saving %s\n", path, fn); + pcb_message(PCB_MSG_DEFAULT, "Created directory %s for saving %s\n", path, fn); f = fopen(efn, "w"); } else - Message(PCB_MSG_DEFAULT, "Error: failed to create directory %s for saving %s\n", path, efn); + pcb_message(PCB_MSG_DEFAULT, "Error: failed to create directory %s for saving %s\n", path, efn); } free(path); } @@ -1528,7 +1528,7 @@ fclose(f); } else - Message(PCB_MSG_DEFAULT, "Error: can't save config to %s - can't open the file for write\n", fn); + pcb_message(PCB_MSG_DEFAULT, "Error: can't save config to %s - can't open the file for write\n", fn); } free(efn); Index: trunk/src/conf_act.c =================================================================== --- trunk/src/conf_act.c (revision 4861) +++ trunk/src/conf_act.c (revision 4862) @@ -60,13 +60,13 @@ int res; if (argc < 3) { - Message(PCB_MSG_DEFAULT, "conf(set) needs at least two arguments"); + pcb_message(PCB_MSG_DEFAULT, "conf(set) needs at least two arguments"); return 1; } if (argc > 3) { role = conf_role_parse(argv[3]); if (role == CFR_invalid) { - Message(PCB_MSG_DEFAULT, "Invalid role: '%s'", argv[3]); + pcb_message(PCB_MSG_DEFAULT, "Invalid role: '%s'", argv[3]); return 1; } } @@ -73,7 +73,7 @@ if (argc > 4) { pol = conf_policy_parse(argv[4]); if (pol == POL_invalid) { - Message(PCB_MSG_DEFAULT, "Invalid policy: '%s'", argv[4]); + pcb_message(PCB_MSG_DEFAULT, "Invalid policy: '%s'", argv[4]); return 1; } } @@ -83,7 +83,7 @@ if (role == CFR_invalid) { conf_native_t *n = conf_get_field(argv[1]); if (n == NULL) { - Message(PCB_MSG_DEFAULT, "Invalid conf field '%s': no such path\n", argv[1]); + pcb_message(PCB_MSG_DEFAULT, "Invalid conf field '%s': no such path\n", argv[1]); return 1; } res = conf_set_native(n, 0, val); @@ -91,7 +91,7 @@ else res = conf_set(role, path, -1, val, pol); if (res != 0) { - Message(PCB_MSG_DEFAULT, "conf(set) failed.\n"); + pcb_message(PCB_MSG_DEFAULT, "conf(set) failed.\n"); return 1; } } @@ -103,7 +103,7 @@ conf_native_t *n; if (argc != 3) { - Message(PCB_MSG_ERROR, "conf(iseq) needs two arguments"); + pcb_message(PCB_MSG_ERROR, "conf(iseq) needs two arguments"); return -1; } path = argv[1]; @@ -111,7 +111,7 @@ n = conf_get_field(argv[1]); if (n == NULL) { - Message(PCB_MSG_ERROR, "Invalid conf field '%s' in iseq: no such path\n", path); + pcb_message(PCB_MSG_ERROR, "Invalid conf field '%s' in iseq: no such path\n", path); return -1; } @@ -131,21 +131,21 @@ int res; if (n == NULL) { - Message(PCB_MSG_DEFAULT, "Invalid conf field '%s': no such path\n", argv[1]); + pcb_message(PCB_MSG_DEFAULT, "Invalid conf field '%s': no such path\n", argv[1]); return 1; } if (n->type != CFN_BOOLEAN) { - Message(PCB_MSG_DEFAULT, "Can not toggle '%s': not a boolean\n", argv[1]); + pcb_message(PCB_MSG_DEFAULT, "Can not toggle '%s': not a boolean\n", argv[1]); return 1; } if (n->used != 1) { - Message(PCB_MSG_DEFAULT, "Can not toggle '%s': array size should be 1, not %d\n", argv[1], n->used); + pcb_message(PCB_MSG_DEFAULT, "Can not toggle '%s': array size should be 1, not %d\n", argv[1], n->used); return 1; } if (argc > 2) { role = conf_role_parse(argv[2]); if (role == CFR_invalid) { - Message(PCB_MSG_DEFAULT, "Invalid role: '%s'", argv[2]); + pcb_message(PCB_MSG_DEFAULT, "Invalid role: '%s'", argv[2]); return 1; } } @@ -159,7 +159,7 @@ res = conf_set(role, argv[1], -1, new_value, POL_OVERWRITE); if (res != 0) { - Message(PCB_MSG_DEFAULT, "Can not toggle '%s': failed to set new value\n", argv[1]); + pcb_message(PCB_MSG_DEFAULT, "Can not toggle '%s': failed to set new value\n", argv[1]); return 1; } conf_update(argv[1]); @@ -169,7 +169,7 @@ conf_role_t role; role = conf_role_parse(argv[1]); if (role == CFR_invalid) { - Message(PCB_MSG_DEFAULT, "Invalid role: '%s'", argv[1]); + pcb_message(PCB_MSG_DEFAULT, "Invalid role: '%s'", argv[1]); return 1; } conf_reset(role, ""); @@ -177,7 +177,7 @@ } else { - Message(PCB_MSG_DEFAULT, "Invalid conf command '%s'\n", argv[0]); + pcb_message(PCB_MSG_DEFAULT, "Invalid conf command '%s'\n", argv[0]); return 1; } return 0; @@ -225,7 +225,7 @@ if (strcmp(m->name, argv[0]) == 0) return conf_core.editor.mode == m->mode; } - Message(PCB_MSG_DEFAULT, "Unknown mode in ChkMode(): %s\n", argv[1]); + pcb_message(PCB_MSG_DEFAULT, "Unknown mode in ChkMode(): %s\n", argv[1]); abort(); return -1; } Index: trunk/src/crosshair.c =================================================================== --- trunk/src/crosshair.c (revision 4861) +++ trunk/src/crosshair.c (revision 4862) @@ -678,7 +678,7 @@ { static pcb_bool warned_old_api = pcb_false; if (!warned_old_api) { - Message(PCB_MSG_DEFAULT, _("WARNING: A plugin is using the deprecated API pcb_crosshair_hide().\n" + pcb_message(PCB_MSG_DEFAULT, _("WARNING: A plugin is using the deprecated API pcb_crosshair_hide().\n" " This API may be removed in a future release of PCB.\n")); warned_old_api = pcb_true; } @@ -691,7 +691,7 @@ { static pcb_bool warned_old_api = pcb_false; if (!warned_old_api) { - Message(PCB_MSG_DEFAULT, _("WARNING: A plugin is using the deprecated API pcb_crosshair_restore().\n" + pcb_message(PCB_MSG_DEFAULT, _("WARNING: A plugin is using the deprecated API pcb_crosshair_restore().\n" " This API may be removed in a future release of PCB.\n")); warned_old_api = pcb_true; } Index: trunk/src/draw.c =================================================================== --- trunk/src/draw.c (revision 4861) +++ trunk/src/draw.c (revision 4862) @@ -521,7 +521,7 @@ EraseArc((pcb_arc_t *) ptr); break; default: - Message(PCB_MSG_DEFAULT, "hace: Internal ERROR, trying to erase an unknown type\n"); + pcb_message(PCB_MSG_DEFAULT, "hace: Internal ERROR, trying to erase an unknown type\n"); } } Index: trunk/src/error.c =================================================================== --- trunk/src/error.c (revision 4861) +++ trunk/src/error.c (revision 4862) @@ -56,7 +56,7 @@ /* --------------------------------------------------------------------------- * output of message in a dialog window or log window */ -void Message(enum pcb_message_level level, const char *Format, ...) +void pcb_message(enum pcb_message_level level, const char *Format, ...) { va_list args; @@ -87,12 +87,12 @@ /* --------------------------------------------------------------------------- * print standard 'open error' */ -void OpenErrorMessage(const char *Filename) +void OpenErrorpcb_message(const char *Filename) { char *utf8 = NULL; utf8_dup_string(&utf8, Filename); - Message(PCB_MSG_DEFAULT, _("Can't open file\n" " '%s'\nfopen() returned: '%s'\n"), utf8, strerror(errno)); + pcb_message(PCB_MSG_DEFAULT, _("Can't open file\n" " '%s'\nfopen() returned: '%s'\n"), utf8, strerror(errno)); free(utf8); } @@ -99,12 +99,12 @@ /* --------------------------------------------------------------------------- * print standard 'popen error' */ -void PopenErrorMessage(const char *Filename) +void PopenErrorpcb_message(const char *Filename) { char *utf8 = NULL; utf8_dup_string(&utf8, Filename); - Message(PCB_MSG_DEFAULT, _("Can't execute command\n" " '%s'\npopen() returned: '%s'\n"), utf8, strerror(errno)); + pcb_message(PCB_MSG_DEFAULT, _("Can't execute command\n" " '%s'\npopen() returned: '%s'\n"), utf8, strerror(errno)); free(utf8); } @@ -111,12 +111,12 @@ /* --------------------------------------------------------------------------- * print standard 'opendir' */ -void OpendirErrorMessage(const char *DirName) +void OpendirErrorpcb_message(const char *DirName) { char *utf8 = NULL; utf8_dup_string(&utf8, DirName); - Message(PCB_MSG_DEFAULT, _("Can't scan directory\n" " '%s'\nopendir() returned: '%s'\n"), utf8, strerror(errno)); + pcb_message(PCB_MSG_DEFAULT, _("Can't scan directory\n" " '%s'\nopendir() returned: '%s'\n"), utf8, strerror(errno)); free(utf8); } @@ -123,12 +123,12 @@ /* --------------------------------------------------------------------------- * print standard 'chdir error' */ -void ChdirErrorMessage(const char *DirName) +void ChdirErrorpcb_message(const char *DirName) { char *utf8 = NULL; utf8_dup_string(&utf8, DirName); - Message(PCB_MSG_DEFAULT, _("Can't change working directory to\n" " '%s'\nchdir() returned: '%s'\n"), utf8, strerror(errno)); + pcb_message(PCB_MSG_DEFAULT, _("Can't change working directory to\n" " '%s'\nchdir() returned: '%s'\n"), utf8, strerror(errno)); free(utf8); } Index: trunk/src/error.h =================================================================== --- trunk/src/error.h (revision 4861) +++ trunk/src/error.h (revision 4862) @@ -47,12 +47,12 @@ PCB_MSG_ERROR /* Couldn't finish an action, needs user attention. */ } pcb_message_level_t; -void Message(enum pcb_message_level level, const char *Format, ...); +void pcb_message(enum pcb_message_level level, const char *Format, ...); void MyFatal(const char *Format, ...); -void OpenErrorMessage(const char *); -void PopenErrorMessage(const char *); -void OpendirErrorMessage(const char *); -void ChdirErrorMessage(const char *); +void OpenErrorpcb_message(const char *); +void PopenErrorpcb_message(const char *); +void OpendirErrorpcb_message(const char *); +void ChdirErrorpcb_message(const char *); void CatchSignal(int); void pcb_trace(const char *Format, ...); Index: trunk/src/event.c =================================================================== --- trunk/src/event.c (revision 4861) +++ trunk/src/event.c (revision 4862) @@ -125,7 +125,7 @@ va_start(ap, fmt); for (a++; *fmt != '\0'; fmt++, a++, argc++) { if (argc >= EVENT_MAX_ARG) { - Message(PCB_MSG_DEFAULT, "event(): too many arguments\n"); + pcb_message(PCB_MSG_DEFAULT, "event(): too many arguments\n"); break; } switch (*fmt) { @@ -144,7 +144,7 @@ default: a->type = ARG_INT; a->d.i = 0; - Message(PCB_MSG_DEFAULT, "event(): invalid argument type '%c'\n", *fmt); + pcb_message(PCB_MSG_DEFAULT, "event(): invalid argument type '%c'\n", *fmt); break; } } Index: trunk/src/find_act.c =================================================================== --- trunk/src/find_act.c (revision 4861) +++ trunk/src/find_act.c (revision 4862) @@ -50,7 +50,7 @@ int count; if (gui->drc_gui == NULL || gui->drc_gui->log_drc_overview) { - Message(PCB_MSG_DEFAULT, _("%m+Rules are minspace %$mS, minoverlap %$mS " + pcb_message(PCB_MSG_DEFAULT, _("%m+Rules are minspace %$mS, minoverlap %$mS " "minwidth %$mS, minsilk %$mS\n" "min drill %$mS, min annular ring %$mS\n"), conf_core.editor.grid_unit->allow, PCB->Bloat, PCB->Shrink, PCB->minWid, PCB->minSlk, PCB->minDrill, PCB->minRing); @@ -58,11 +58,11 @@ count = DRCAll(); if (gui->drc_gui == NULL || gui->drc_gui->log_drc_overview) { if (count == 0) - Message(PCB_MSG_DEFAULT, _("No DRC problems found.\n")); + pcb_message(PCB_MSG_DEFAULT, _("No DRC problems found.\n")); else if (count > 0) - Message(PCB_MSG_DEFAULT, _("Found %d design rule errors.\n"), count); + pcb_message(PCB_MSG_DEFAULT, _("Found %d design rule errors.\n"), count); else - Message(PCB_MSG_DEFAULT, _("Aborted DRC after %d design rule errors.\n"), -count); + pcb_message(PCB_MSG_DEFAULT, _("Aborted DRC after %d design rule errors.\n"), -count); } return 0; } Index: trunk/src/find_drc.c =================================================================== --- trunk/src/find_drc.c (revision 4861) +++ trunk/src/find_drc.c (revision 4862) @@ -192,8 +192,8 @@ } if (gui->drc_gui == NULL || gui->drc_gui->log_drc_violations) { - Message(PCB_MSG_DEFAULT, _("WARNING! Design Rule error - %s\n"), violation->title); - Message(PCB_MSG_DEFAULT, _("%m+near location %$mD\n"), conf_core.editor.grid_unit->allow, violation->x, violation->y); + pcb_message(PCB_MSG_DEFAULT, _("WARNING! Design Rule error - %s\n"), violation->title); + pcb_message(PCB_MSG_DEFAULT, _("%m+near location %$mD\n"), conf_core.editor.grid_unit->allow, violation->x, violation->y); } } @@ -284,7 +284,7 @@ } break; default: - Message(PCB_MSG_DEFAULT, "hace: Bad Plow object in callback\n"); + pcb_message(PCB_MSG_DEFAULT, "hace: Bad Plow object in callback\n"); } return R_DIR_NOT_FOUND; @@ -694,7 +694,7 @@ gui->invalidate_all(); if (nopastecnt > 0) { - Message(PCB_MSG_DEFAULT, _("Warning: %d pad%s the nopaste flag set.\n"), nopastecnt, nopastecnt > 1 ? "s have" : " has"); + pcb_message(PCB_MSG_DEFAULT, _("Warning: %d pad%s the nopaste flag set.\n"), nopastecnt, nopastecnt > 1 ? "s have" : " has"); } return IsBad ? -drcerr_count : drcerr_count; } Index: trunk/src/find_lookup.c =================================================================== --- trunk/src/find_lookup.c (revision 4861) +++ trunk/src/find_lookup.c (revision 4862) @@ -501,7 +501,7 @@ /* try all new pads */ layer -= max_copper_layer; if (layer > 1) { - Message(PCB_MSG_DEFAULT, _("bad layer number %d max_copper_layer=%d in find.c\n"), layer, max_copper_layer); + pcb_message(PCB_MSG_DEFAULT, _("bad layer number %d max_copper_layer=%d in find.c\n"), layer, max_copper_layer); return pcb_false; } position = &padposition[layer]; @@ -539,9 +539,9 @@ SET_FLAG(PCB_FLAG_WARN, pin); conf_core.temp.rat_warn = pcb_true; if (pin->Element) - Message(PCB_MSG_DEFAULT, _("WARNING: Hole too close to pin.\n")); + pcb_message(PCB_MSG_DEFAULT, _("WARNING: Hole too close to pin.\n")); else - Message(PCB_MSG_DEFAULT, _("WARNING: Hole too close to via.\n")); + pcb_message(PCB_MSG_DEFAULT, _("WARNING: Hole too close to via.\n")); } else if (ADD_PV_TO_LIST(pin, PCB_TYPE_PIN, &i->pv, FCT_COPPER)) longjmp(i->env, 1); @@ -617,7 +617,7 @@ if (TEST_FLAG(PCB_FLAG_HOLE, pv)) { SET_FLAG(PCB_FLAG_WARN, pv); conf_core.temp.rat_warn = pcb_true; - Message(PCB_MSG_DEFAULT, _("WARNING: Hole too close to line.\n")); + pcb_message(PCB_MSG_DEFAULT, _("WARNING: Hole too close to line.\n")); } else if (ADD_PV_TO_LIST(pv, PCB_TYPE_LINE, &i->line, FCT_COPPER)) longjmp(i->env, 1); @@ -634,7 +634,7 @@ if (TEST_FLAG(PCB_FLAG_HOLE, pv)) { SET_FLAG(PCB_FLAG_WARN, pv); conf_core.temp.rat_warn = pcb_true; - Message(PCB_MSG_DEFAULT, _("WARNING: Hole too close to pad.\n")); + pcb_message(PCB_MSG_DEFAULT, _("WARNING: Hole too close to pad.\n")); } else if (ADD_PV_TO_LIST(pv, PCB_TYPE_PAD, &i->pad, FCT_COPPER)) longjmp(i->env, 1); @@ -651,7 +651,7 @@ if (TEST_FLAG(PCB_FLAG_HOLE, pv)) { SET_FLAG(PCB_FLAG_WARN, pv); conf_core.temp.rat_warn = pcb_true; - Message(PCB_MSG_DEFAULT, _("WARNING: Hole touches arc.\n")); + pcb_message(PCB_MSG_DEFAULT, _("WARNING: Hole touches arc.\n")); } else if (ADD_PV_TO_LIST(pv, PCB_TYPE_ARC, &i->arc, FCT_COPPER)) longjmp(i->env, 1); Index: trunk/src/font.c =================================================================== --- trunk/src/font.c (revision 4861) +++ trunk/src/font.c (revision 4862) @@ -54,7 +54,7 @@ const char *s; gds_t buff; s = conf_concat_strlist(&conf_core.rc.default_font_file, &buff, NULL, ':'); - Message(PCB_MSG_ERROR, _("Can't find font-symbol-file - there won't be font in this design. Searched: '%s'\n"), s); + pcb_message(PCB_MSG_ERROR, _("Can't find font-symbol-file - there won't be font in this design. Searched: '%s'\n"), s); gds_uninit(&buff); } } Index: trunk/src/gui_act.c =================================================================== --- trunk/src/gui_act.c (revision 4861) +++ trunk/src/gui_act.c (revision 4862) @@ -865,7 +865,7 @@ /* -------------------------------------------------------------------------- */ -static const char message_syntax[] = "Message(message)"; +static const char message_syntax[] = "pcb_message(message)"; static const char message_help[] = "Writes a message to the log window."; @@ -886,8 +886,8 @@ PCB_AFAIL(message); for (i = 0; i < argc; i++) { - Message(PCB_MSG_DEFAULT, argv[i]); - Message(PCB_MSG_DEFAULT, "\n"); + pcb_message(PCB_MSG_DEFAULT, argv[i]); + pcb_message(PCB_MSG_DEFAULT, "\n"); } return 0; @@ -1042,7 +1042,7 @@ hid_action("RouteStylesChanged"); } else - Message(PCB_MSG_DEFAULT, "Error: invalid route style name or index\n"); + pcb_message(PCB_MSG_DEFAULT, "Error: invalid route style name or index\n"); } return 0; } @@ -1059,7 +1059,7 @@ static int ActionCreateMenu(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { if (gui == NULL) { - Message(PCB_MSG_DEFAULT, "Error: can't create menu, there's no GUI hid loaded\n"); + pcb_message(PCB_MSG_DEFAULT, "Error: can't create menu, there's no GUI hid loaded\n"); return 1; } @@ -1083,18 +1083,18 @@ static int ActionRemoveMenu(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { if (gui == NULL) { - Message(PCB_MSG_ERROR, "can't remove menu, there's no GUI hid loaded\n"); + pcb_message(PCB_MSG_ERROR, "can't remove menu, there's no GUI hid loaded\n"); return 1; } if (gui->remove_menu == NULL) { - Message(PCB_MSG_ERROR, "can't remove menu, the GUI doesn't support it\n"); + pcb_message(PCB_MSG_ERROR, "can't remove menu, the GUI doesn't support it\n"); return 1; } if (argc > 0) { if (gui->remove_menu(argv[0]) != 0) - Message(PCB_MSG_ERROR, "failed to remove some of the menu items\n"); + pcb_message(PCB_MSG_ERROR, "failed to remove some of the menu items\n"); return 0; } @@ -1199,7 +1199,7 @@ int chg; if (ng == NULL) { - Message(PCB_MSG_DEFAULT, "No such HID."); + pcb_message(PCB_MSG_DEFAULT, "No such HID."); return 1; } Index: trunk/src/hid_actions.c =================================================================== --- trunk/src/hid_actions.c (revision 4861) +++ trunk/src/hid_actions.c (revision 4862) @@ -54,11 +54,11 @@ for (i = 0; i < n; i++) { if (check_action_name(a[i].name)) { - Message(PCB_MSG_DEFAULT, _("ERROR! Invalid action name, " "action \"%s\" not registered.\n"), a[i].name); + pcb_message(PCB_MSG_DEFAULT, _("ERROR! Invalid action name, " "action \"%s\" not registered.\n"), a[i].name); continue; } if (htsp_get(all_actions, a[i].name) != NULL) { - Message(PCB_MSG_DEFAULT, _("ERROR! Invalid action name, " "action \"%s\" is already registered.\n"), a[i].name); + pcb_message(PCB_MSG_DEFAULT, _("ERROR! Invalid action name, " "action \"%s\" is already registered.\n"), a[i].name); continue; } ca = malloc(sizeof(hid_cookie_action_t)); @@ -133,7 +133,7 @@ return ca->action; if (!action_legal_unknown(name)) - Message(PCB_MSG_DEFAULT, "unknown action `%s'\n", name); + pcb_message(PCB_MSG_DEFAULT, "unknown action `%s'\n", name); return 0; } @@ -255,10 +255,10 @@ int i; if (action_legal_unknown(name)) return 1; - Message(PCB_MSG_DEFAULT, "no action %s(", name); + pcb_message(PCB_MSG_DEFAULT, "no action %s(", name); for (i = 0; i < argc; i++) - Message(PCB_MSG_DEFAULT, "%s%s", i ? ", " : "", argv[i]); - Message(PCB_MSG_DEFAULT, ")\n"); + pcb_message(PCB_MSG_DEFAULT, "%s%s", i ? ", " : "", argv[i]); + pcb_message(PCB_MSG_DEFAULT, ")\n"); return 1; } return hid_actionv_(a, argc, argv); @@ -322,8 +322,8 @@ sp++; } else if (require_parens) { - Message(PCB_MSG_DEFAULT, _("Syntax error: %s\n"), rstr); - Message(PCB_MSG_DEFAULT, _(" expected: Action(arg1, arg2)")); + pcb_message(PCB_MSG_DEFAULT, _("Syntax error: %s\n"), rstr); + pcb_message(PCB_MSG_DEFAULT, _(" expected: Action(arg1, arg2)")); retcode = 1; goto cleanup; } Index: trunk/src/hid_cfg.c =================================================================== --- trunk/src/hid_cfg.c (revision 4861) +++ trunk/src/hid_cfg.c (revision 4862) @@ -189,7 +189,7 @@ const char *fn; int line, col; lht_dom_loc_active(doc, &fn, &line, &col); - Message(PCB_MSG_DEFAULT, "Resource error: %s (%s:%d.%d)*\n", lht_err_str(err), filename, line+1, col+1); + pcb_message(PCB_MSG_DEFAULT, "Resource error: %s (%s:%d.%d)*\n", lht_err_str(err), filename, line+1, col+1); return 1; } @@ -293,7 +293,7 @@ sprintf(end, "pcb-menu-%s.lht", fn); doc = hid_cfg_load_lht(*p); if (doc != NULL) - Message(PCB_MSG_DEFAULT, "Loaded menu file '%s'\n", *p); + pcb_message(PCB_MSG_DEFAULT, "Loaded menu file '%s'\n", *p); } free(*p); } @@ -513,5 +513,5 @@ va_start(ap, fmt); end += vsprintf(end, fmt, ap); va_end(ap); - Message(PCB_MSG_DEFAULT, hid_cfg_error_shared); + pcb_message(PCB_MSG_DEFAULT, hid_cfg_error_shared); } Index: trunk/src/hid_cfg.h =================================================================== --- trunk/src/hid_cfg.h (revision 4861) +++ trunk/src/hid_cfg.h (revision 4862) @@ -85,11 +85,11 @@ just a wrapper around lht_tree_path_ */ lht_node_t *hid_cfg_menu_field_path(const lht_node_t *parent, const char *path); -/* Return a text field of a submenu; return NULL and generate a Message(PCB_MSG_DEFAULT, ) if +/* Return a text field of a submenu; return NULL and generate a pcb_message(PCB_MSG_DEFAULT, ) if the given field is not text */ const char *hid_cfg_menu_field_str(const lht_node_t *submenu, pcb_hid_cfg_menufield_t field); -/* Return non-zero if submenu has further submenus; generate Message(PCB_MSG_DEFAULT, ) if +/* Return non-zero if submenu has further submenus; generate pcb_message(PCB_MSG_DEFAULT, ) if there is a submenu field with the wrong lihata type */ int hid_cfg_has_submenus(const lht_node_t *submenu); Index: trunk/src/hid_cfg_input.c =================================================================== --- trunk/src/hid_cfg_input.c (revision 4861) +++ trunk/src/hid_cfg_input.c (revision 4862) @@ -53,7 +53,7 @@ else if ((vlen >= 7) && (strncasecmp(value, "release", 7) == 0)) m |= M_Release; else if ((vlen >= 5) && (strncasecmp(value, "press", 5) == 0)) press = 1; else - Message(PCB_MSG_DEFAULT, "Unknown modifier: %s\n", value); + pcb_message(PCB_MSG_DEFAULT, "Unknown modifier: %s\n", value); /* skip to next word */ next = strpbrk(value, "<- \t"); if (next == NULL) @@ -69,7 +69,7 @@ *last = value; if (press && (m & M_Release)) - Message(PCB_MSG_DEFAULT, "Bogus modifier: both press and release\n"); + pcb_message(PCB_MSG_DEFAULT, "Bogus modifier: both press and release\n"); return m; } @@ -89,7 +89,7 @@ else if (strcasecmp(name, "scroll-left") == 0) return MB_SCROLL_UP; else if (strcasecmp(name, "scroll-right") == 0) return MB_SCROLL_DOWN; else { - Message(PCB_MSG_DEFAULT, "Error: unknown mouse button: %s\n", name); + pcb_message(PCB_MSG_DEFAULT, "Error: unknown mouse button: %s\n", name); return 0; } } @@ -105,7 +105,7 @@ mouse->mouse = hid_cfg_get_menu(hr, "/mouse"); if (mouse->mouse == NULL) { - Message(PCB_MSG_DEFAULT, "Warning: no /mouse section in the resource file - mouse is disabled\n"); + pcb_message(PCB_MSG_DEFAULT, "Warning: no /mouse section in the resource file - mouse is disabled\n"); return -1; } @@ -223,7 +223,7 @@ return *desc; if (len > sizeof(tmp)-1) { - Message(PCB_MSG_DEFAULT, "key sym name too long\n"); + pcb_message(PCB_MSG_DEFAULT, "key sym name too long\n"); return 0; } strncpy(tmp, desc, len); @@ -269,13 +269,13 @@ k = strchr(last, '<'); if (k == NULL) { - Message(PCB_MSG_DEFAULT, "Missing in the key description: '%s'\n", keydesc); + pcb_message(PCB_MSG_DEFAULT, "Missing in the key description: '%s'\n", keydesc); return -1; } len -= k-last; k++; len--; if ((strncmp(k, "key>", 4) != 0) && (strncmp(k, "Key>", 4) != 0)) { - Message(PCB_MSG_DEFAULT, "Missing in the key description\n"); + pcb_message(PCB_MSG_DEFAULT, "Missing in the key description\n"); return -1; } k+=4; len-=4; @@ -286,7 +286,7 @@ s = malloc(len+1); memcpy(s, k, len); s[len] = '\0'; - Message(PCB_MSG_DEFAULT, "Unrecognised key symbol in key description: %s\n", s); + pcb_message(PCB_MSG_DEFAULT, "Unrecognised key symbol in key description: %s\n", s); free(s); return -1; } Index: trunk/src/hid_flags.c =================================================================== --- trunk/src/hid_flags.c (revision 4861) +++ trunk/src/hid_flags.c (revision 4862) @@ -34,7 +34,7 @@ int len, multiarg; len = cp - name; if (len > sizeof(buff)-1) { - Message(PCB_MSG_DEFAULT, "hid_get_flag: action name too long: %s()\n", name); + pcb_message(PCB_MSG_DEFAULT, "hid_get_flag: action name too long: %s()\n", name); return -1; } memcpy(buff, name, len); @@ -41,7 +41,7 @@ buff[len] = '\0'; a = hid_find_action(buff); if (!a) { - Message(PCB_MSG_DEFAULT, "hid_get_flag: no action %s\n", name); + pcb_message(PCB_MSG_DEFAULT, "hid_get_flag: no action %s\n", name); return -1; } cp++; @@ -59,7 +59,7 @@ if (!multiarg) { /* faster but limited way for a single arg */ if ((len > sizeof(buff)-1) || (end == NULL)) { - Message(PCB_MSG_DEFAULT, "hid_get_flag: action arg too long or unterminated: %s\n", name); + pcb_message(PCB_MSG_DEFAULT, "hid_get_flag: action arg too long or unterminated: %s\n", name); return -1; } len = end - cp; Index: trunk/src/hid_init.c =================================================================== --- trunk/src/hid_init.c (revision 4861) +++ trunk/src/hid_init.c (revision 4862) @@ -82,7 +82,7 @@ free(symname); } else - Message(PCB_MSG_ERROR, "Can't load %s because it'd provide plugin %s that is already loaded from %s\n", path, basename, (*inf->path == '<' ? "" : inf->path)); + pcb_message(PCB_MSG_ERROR, "Can't load %s because it'd provide plugin %s that is already loaded from %s\n", path, basename, (*inf->path == '<' ? "" : inf->path)); } } free(basename); Index: trunk/src/main.c =================================================================== --- trunk/src/main.c (revision 4861) +++ trunk/src/main.c (revision 4862) @@ -392,7 +392,7 @@ case DO_GUI: gui = hid_find_gui(argv[2]); if (gui == NULL) { - Message(PCB_MSG_DEFAULT, "Can't find the gui requested.\n"); + pcb_message(PCB_MSG_DEFAULT, "Can't find the gui requested.\n"); exit(1); } break; @@ -410,7 +410,7 @@ /* try anything */ if (gui == NULL) { - Message(PCB_MSG_DEFAULT, "Warning: can't find any of the preferred GUIs, falling back to anything available...\n"); + pcb_message(PCB_MSG_DEFAULT, "Warning: can't find any of the preferred GUIs, falling back to anything available...\n"); gui = hid_find_gui(NULL); } } @@ -439,7 +439,7 @@ PCB = pcb_board_new(); if (PCB == NULL) { - Message(PCB_MSG_ERROR, "Can't load the default pcb for creating an empty layout\n"); + pcb_message(PCB_MSG_ERROR, "Can't load the default pcb for creating an empty layout\n"); exit(1); } @@ -475,11 +475,11 @@ hid_action("LibraryChanged"); if (conf_core.rc.script_filename) { - Message(PCB_MSG_DEFAULT, _("Executing startup script file %s\n"), conf_core.rc.script_filename); + pcb_message(PCB_MSG_DEFAULT, _("Executing startup script file %s\n"), conf_core.rc.script_filename); hid_actionl("ExecuteFile", conf_core.rc.script_filename, NULL); } if (conf_core.rc.action_string) { - Message(PCB_MSG_DEFAULT, _("Executing startup action %s\n"), conf_core.rc.action_string); + pcb_message(PCB_MSG_DEFAULT, _("Executing startup action %s\n"), conf_core.rc.action_string); hid_parse_actions(conf_core.rc.action_string); } Index: trunk/src/move.c =================================================================== --- trunk/src/move.c (revision 4861) +++ trunk/src/move.c (revision 4862) @@ -238,11 +238,11 @@ IncrementUndoSerialNumber(); if (old_index < -1 || old_index >= max_copper_layer) { - Message(PCB_MSG_DEFAULT, "Invalid old layer %d for move: must be -1..%d\n", old_index, max_copper_layer - 1); + pcb_message(PCB_MSG_DEFAULT, "Invalid old layer %d for move: must be -1..%d\n", old_index, max_copper_layer - 1); return 1; } if (new_index < -1 || new_index > max_copper_layer || new_index >= MAX_LAYER) { - Message(PCB_MSG_DEFAULT, "Invalid new layer %d for move: must be -1..%d\n", new_index, max_copper_layer); + pcb_message(PCB_MSG_DEFAULT, "Invalid new layer %d for move: must be -1..%d\n", new_index, max_copper_layer); return 1; } if (old_index == new_index) @@ -268,7 +268,7 @@ if (old_index == -1) { pcb_layer_t *lp; if (max_copper_layer == MAX_LAYER) { - Message(PCB_MSG_DEFAULT, "No room for new layers\n"); + pcb_message(PCB_MSG_DEFAULT, "No room for new layers\n"); return 1; } /* Create a new layer at new_index. */ @@ -397,7 +397,7 @@ int new_top = -1; if (argc != 2) { - Message(PCB_MSG_DEFAULT, "Usage; MoveLayer(old,new)"); + pcb_message(PCB_MSG_DEFAULT, "Usage; MoveLayer(old,new)"); return 1; } Index: trunk/src/netlist_act.c =================================================================== --- trunk/src/netlist_act.c (revision 4861) +++ trunk/src/netlist_act.c (revision 4862) @@ -58,7 +58,7 @@ int le, lp; if (next > 2) { - Message(PCB_MSG_DEFAULT, "Exactly two pins should be selected for swap (more than 2 selected at the moment)\n"); + pcb_message(PCB_MSG_DEFAULT, "Exactly two pins should be selected for swap (more than 2 selected at the moment)\n"); goto quit; } @@ -74,7 +74,7 @@ END_LOOP; if (next < 2) { - Message(PCB_MSG_DEFAULT, "Exactly two pins should be selected for swap (less than 2 selected at the moment)\n"); + pcb_message(PCB_MSG_DEFAULT, "Exactly two pins should be selected for swap (less than 2 selected at the moment)\n"); goto quit; } @@ -82,11 +82,11 @@ nets[0] = pcb_netlist_find_net4pinname(PCB, pins[0]); nets[1] = pcb_netlist_find_net4pinname(PCB, pins[1]); if ((nets[0] == NULL) || (nets[1] == NULL)) { - Message(PCB_MSG_DEFAULT, "That pin is not on a net.\n"); + pcb_message(PCB_MSG_DEFAULT, "That pin is not on a net.\n"); goto quit; } if (nets[0] == nets[1]) { - Message(PCB_MSG_DEFAULT, "Those two pins are on the same net, can't swap them.\n"); + pcb_message(PCB_MSG_DEFAULT, "Those two pins are on the same net, can't swap them.\n"); goto quit; } @@ -216,7 +216,7 @@ if (!PCB) return 1; if (argc == 0) { - Message(PCB_MSG_DEFAULT, netlist_syntax); + pcb_message(PCB_MSG_DEFAULT, netlist_syntax); return 1; } if (strcasecmp(argv[0], "find") == 0) @@ -265,7 +265,7 @@ return 0; } else { - Message(PCB_MSG_DEFAULT, netlist_syntax); + pcb_message(PCB_MSG_DEFAULT, netlist_syntax); return 1; } @@ -279,7 +279,7 @@ if (use_re) { regex = re_sei_comp(argv[1]); if (re_sei_errno(regex) != 0) { - Message(PCB_MSG_DEFAULT, _("regexp error: %s\n"), re_error_str(re_sei_errno(regex))); + pcb_message(PCB_MSG_DEFAULT, _("regexp error: %s\n"), re_error_str(re_sei_errno(regex))); re_sei_free(regex); return (1); } Index: trunk/src/obj_arc.c =================================================================== --- trunk/src/obj_arc.c (revision 4861) +++ trunk/src/obj_arc.c (revision 4862) @@ -467,7 +467,7 @@ pcb_arc_t *newone; if (TEST_FLAG(PCB_FLAG_LOCK, Arc)) { - Message(PCB_MSG_DEFAULT, _("Sorry, the object is locked\n")); + pcb_message(PCB_MSG_DEFAULT, _("Sorry, the object is locked\n")); return NULL; } if (ctx->move.dst_layer == Layer && Layer->On) { Index: trunk/src/obj_common.c =================================================================== --- trunk/src/obj_common.c (revision 4861) +++ trunk/src/obj_common.c (revision 4862) @@ -55,7 +55,7 @@ case PCB_TYPE_LINE_POINT: return (pcb_box_t *) Ptr3; default: - Message(PCB_MSG_DEFAULT, "Request for bounding box of unsupported type %d\n", Type); + pcb_message(PCB_MSG_DEFAULT, "Request for bounding box of unsupported type %d\n", Type); return (pcb_box_t *) Ptr2; } } Index: trunk/src/obj_elem.c =================================================================== --- trunk/src/obj_elem.c (revision 4861) +++ trunk/src/obj_elem.c (revision 4862) @@ -165,7 +165,7 @@ pcb_layer_t *clayer, *slayer; if (elementlist_length(&Buffer->Data->Element) != 1) { - Message(PCB_MSG_DEFAULT, _("Error! Buffer doesn't contain a single element\n")); + pcb_message(PCB_MSG_DEFAULT, _("Error! Buffer doesn't contain a single element\n")); return (pcb_false); } /* @@ -306,7 +306,7 @@ if (onsolder && !hasParts && !warned) \ { \ warned = pcb_true; \ - Message \ + pcb_message \ (PCB_MSG_WARNING, _("Warning: All of the pads are on the opposite\n" \ "side from the component - that's probably not what\n" \ "you wanted\n")); \ @@ -375,11 +375,11 @@ END_LOOP; if (!hasParts) { DestroyObject(PCB->Data, PCB_TYPE_ELEMENT, Element, Element, Element); - Message(PCB_MSG_DEFAULT, _("There was nothing to convert!\n" "Elements must have some silk, pads or pins.\n")); + pcb_message(PCB_MSG_DEFAULT, _("There was nothing to convert!\n" "Elements must have some silk, pads or pins.\n")); return (pcb_false); } if (crooked) - Message(PCB_MSG_DEFAULT, _("There were polygons that can't be made into pins!\n" "So they were not included in the element\n")); + pcb_message(PCB_MSG_DEFAULT, _("There were polygons that can't be made into pins!\n" "So they were not included in the element\n")); Element->MarkX = Buffer->X; Element->MarkY = Buffer->Y; if (SWAP_IDENT) @@ -1374,7 +1374,7 @@ return (NULL); if (NAME_INDEX() == NAMEONPCB_INDEX) { if (conf_core.editor.unique_names && UniqueElementName(PCB->Data, ctx->chgname.new_name) != ctx->chgname.new_name) { - Message(PCB_MSG_DEFAULT, _("Error: The name \"%s\" is not unique!\n"), ctx->chgname.new_name); + pcb_message(PCB_MSG_DEFAULT, _("Error: The name \"%s\" is not unique!\n"), ctx->chgname.new_name); return ((char *) -1); } } Index: trunk/src/obj_line.c =================================================================== --- trunk/src/obj_line.c (revision 4861) +++ trunk/src/obj_line.c (revision 4862) @@ -485,7 +485,7 @@ void *ptr1, *ptr2, *ptr3; if (TEST_FLAG(PCB_FLAG_LOCK, Line)) { - Message(PCB_MSG_DEFAULT, _("Sorry, the object is locked\n")); + pcb_message(PCB_MSG_DEFAULT, _("Sorry, the object is locked\n")); return NULL; } if (ctx->move.dst_layer == Layer && Layer->On) { Index: trunk/src/obj_pinvia.c =================================================================== --- trunk/src/obj_pinvia.c (revision 4861) +++ trunk/src/obj_pinvia.c (revision 4862) @@ -93,7 +93,7 @@ VIA_LOOP(Data); { if (Distance(X, Y, via->X, via->Y) <= via->DrillingHole / 2 + DrillingHole / 2) { - Message(PCB_MSG_DEFAULT, _("%m+Dropping via at %$mD because it's hole would overlap with the via " + pcb_message(PCB_MSG_DEFAULT, _("%m+Dropping via at %$mD because it's hole would overlap with the via " "at %$mD\n"), conf_core.editor.grid_unit->allow, X, Y, via->X, via->Y); return (NULL); /* don't allow via stacking */ } @@ -113,7 +113,7 @@ Via->Mask = Mask; Via->DrillingHole = stub_vendorDrillMap(DrillingHole); if (Via->DrillingHole != DrillingHole) { - Message(PCB_MSG_DEFAULT, _("%m+Mapped via drill hole to %$mS from %$mS per vendor table\n"), + pcb_message(PCB_MSG_DEFAULT, _("%m+Mapped via drill hole to %$mS from %$mS per vendor table\n"), conf_core.editor.grid_unit->allow, Via->DrillingHole, DrillingHole); } @@ -129,7 +129,7 @@ */ if (!TEST_FLAG(PCB_FLAG_HOLE, Via) && (Via->Thickness < Via->DrillingHole + MIN_PINORVIACOPPER)) { Via->Thickness = Via->DrillingHole + MIN_PINORVIACOPPER; - Message(PCB_MSG_DEFAULT, _("%m+Increased via thickness to %$mS to allow enough copper" + pcb_message(PCB_MSG_DEFAULT, _("%m+Increased via thickness to %$mS to allow enough copper" " at %$mD.\n"), conf_core.editor.grid_unit->allow, Via->Thickness, Via->X, Via->Y); } @@ -165,18 +165,18 @@ /* Unless we should not map drills on this element, map them! */ if (stub_vendorIsElementMappable(Element)) { if (pin->DrillingHole < MIN_PINORVIASIZE) { - Message(PCB_MSG_DEFAULT, _("%m+Did not map pin #%s (%s) drill hole because %$mS is below the minimum allowed size\n"), + pcb_message(PCB_MSG_DEFAULT, _("%m+Did not map pin #%s (%s) drill hole because %$mS is below the minimum allowed size\n"), conf_core.editor.grid_unit->allow, UNKNOWN(Number), UNKNOWN(Name), pin->DrillingHole); pin->DrillingHole = DrillingHole; } else if (pin->DrillingHole > MAX_PINORVIASIZE) { - Message(PCB_MSG_DEFAULT, _("%m+Did not map pin #%s (%s) drill hole because %$mS is above the maximum allowed size\n"), + pcb_message(PCB_MSG_DEFAULT, _("%m+Did not map pin #%s (%s) drill hole because %$mS is above the maximum allowed size\n"), conf_core.editor.grid_unit->allow, UNKNOWN(Number), UNKNOWN(Name), pin->DrillingHole); pin->DrillingHole = DrillingHole; } else if (!TEST_FLAG(PCB_FLAG_HOLE, pin) && (pin->DrillingHole > pin->Thickness - MIN_PINORVIACOPPER)) { - Message(PCB_MSG_DEFAULT, _("%m+Did not map pin #%s (%s) drill hole because %$mS does not leave enough copper\n"), + pcb_message(PCB_MSG_DEFAULT, _("%m+Did not map pin #%s (%s) drill hole because %$mS does not leave enough copper\n"), conf_core.editor.grid_unit->allow, UNKNOWN(Number), UNKNOWN(Name), pin->DrillingHole); pin->DrillingHole = DrillingHole; } @@ -186,7 +186,7 @@ } if (pin->DrillingHole != DrillingHole) { - Message(PCB_MSG_DEFAULT, _("%m+Mapped pin drill hole to %$mS from %$mS per vendor table\n"), + pcb_message(PCB_MSG_DEFAULT, _("%m+Mapped pin drill hole to %$mS from %$mS per vendor table\n"), conf_core.editor.grid_unit->allow, pin->DrillingHole, DrillingHole); } Index: trunk/src/obj_poly.c =================================================================== --- trunk/src/obj_poly.c (revision 4861) +++ trunk/src/obj_poly.c (revision 4862) @@ -429,7 +429,7 @@ struct mptlc d; if (TEST_FLAG(PCB_FLAG_LOCK, Polygon)) { - Message(PCB_MSG_DEFAULT, _("Sorry, the object is locked\n")); + pcb_message(PCB_MSG_DEFAULT, _("Sorry, the object is locked\n")); return NULL; } if (((long int) ctx->move.dst_layer == -1) || (Layer == ctx->move.dst_layer)) Index: trunk/src/obj_text.c =================================================================== --- trunk/src/obj_text.c (revision 4861) +++ trunk/src/obj_text.c (revision 4862) @@ -380,7 +380,7 @@ void *MoveTextToLayer(pcb_opctx_t *ctx, pcb_layer_t * layer, pcb_text_t * text) { if (TEST_FLAG(PCB_FLAG_LOCK, text)) { - Message(PCB_MSG_DEFAULT, _("Sorry, the object is locked\n")); + pcb_message(PCB_MSG_DEFAULT, _("Sorry, the object is locked\n")); return NULL; } if (ctx->move.dst_layer != layer) { Index: trunk/src/object_act.c =================================================================== --- trunk/src/object_act.c (revision 4861) +++ trunk/src/object_act.c (revision 4862) @@ -109,7 +109,7 @@ PCB_AFAIL(attributes); if (!gui->edit_attributes) { - Message(PCB_MSG_DEFAULT, _("This GUI doesn't support Attribute Editing\n")); + pcb_message(PCB_MSG_DEFAULT, _("This GUI doesn't support Attribute Editing\n")); return 1; } @@ -132,7 +132,7 @@ break; } if (layer == NULL) { - Message(PCB_MSG_DEFAULT, _("No layer named %s\n"), layername); + pcb_message(PCB_MSG_DEFAULT, _("No layer named %s\n"), layername); return 1; } } @@ -156,7 +156,7 @@ } END_LOOP; if (n_found > 1) { - Message(PCB_MSG_DEFAULT, _("Too many elements selected\n")); + pcb_message(PCB_MSG_DEFAULT, _("Too many elements selected\n")); return 1; } if (n_found == 0) { @@ -165,7 +165,7 @@ if ((SearchScreen(x, y, PCB_TYPE_ELEMENT, &ptrtmp, &ptrtmp, &ptrtmp)) != PCB_TYPE_NONE) e = (pcb_element_t *) ptrtmp; else { - Message(PCB_MSG_DEFAULT, _("No element found there\n")); + pcb_message(PCB_MSG_DEFAULT, _("No element found there\n")); return 1; } } @@ -380,7 +380,7 @@ type = SearchScreen(x, y, MOVE_TYPES, &ptr1, &ptr2, &ptr3); if (type == PCB_TYPE_NONE) { - Message(PCB_MSG_DEFAULT, _("Nothing found under crosshair\n")); + pcb_message(PCB_MSG_DEFAULT, _("Nothing found under crosshair\n")); return 1; } if (absolute1) @@ -678,7 +678,7 @@ END_LOOP; if (!e) { - Message(PCB_MSG_DEFAULT, _("Cannot change attribute of %s - element not found\n"), refdes); + pcb_message(PCB_MSG_DEFAULT, _("Cannot change attribute of %s - element not found\n"), refdes); return 1; } Index: trunk/src/paths.c =================================================================== --- trunk/src/paths.c (revision 4861) +++ trunk/src/paths.c (revision 4862) @@ -47,7 +47,7 @@ if (**in == '~') { int l1, l2; if (conf_core.rc.path.home == NULL) { - Message(PCB_MSG_DEFAULT, "can't resolve home dir required for path %s\n", *in); + pcb_message(PCB_MSG_DEFAULT, "can't resolve home dir required for path %s\n", *in); exit(1); } subst_to = conf_core.rc.path.home; @@ -88,7 +88,7 @@ } } } - Message(PCB_MSG_DEFAULT, "can't resolve conf-hash dir required for path %s\n", *in); + pcb_message(PCB_MSG_DEFAULT, "can't resolve conf-hash dir required for path %s\n", *in); *out = NULL; } else Index: trunk/src/plug_footprint.c =================================================================== --- trunk/src/plug_footprint.c (revision 4861) +++ trunk/src/plug_footprint.c (revision 4862) @@ -356,7 +356,7 @@ if (res >= 0) n_footprints += res; else - Message(PCB_MSG_DEFAULT, "Warning: footprint library list error on %s\n", toppath); + pcb_message(PCB_MSG_DEFAULT, "Warning: footprint library list error on %s\n", toppath); } #ifdef DEBUG Index: trunk/src/plug_import.c =================================================================== --- trunk/src/plug_import.c (revision 4861) +++ trunk/src/plug_import.c (revision 4862) @@ -89,7 +89,7 @@ FILE *fp; if (!filename) { - Message(PCB_MSG_DEFAULT, "Error: need a file name for ImportNetlist()\n"); + pcb_message(PCB_MSG_DEFAULT, "Error: need a file name for ImportNetlist()\n"); return (1); /* nothing to do */ } fp = fopen(filename, "r"); @@ -97,11 +97,11 @@ plug = find_importer(aspect, fp, filename); if (plug == NULL) { if (fp != NULL) { - Message(PCB_MSG_DEFAULT, "Error: can't find a suitable netlist parser for %s\n", filename); + pcb_message(PCB_MSG_DEFAULT, "Error: can't find a suitable netlist parser for %s\n", filename); fclose(fp); } else - Message(PCB_MSG_DEFAULT, "Error: can't find a suitable netlist parser for %s - might be related: can't open %s for reading\n", filename, filename); + pcb_message(PCB_MSG_DEFAULT, "Error: can't find a suitable netlist parser for %s - might be related: can't open %s for reading\n", filename, filename); return 1; } Index: trunk/src/plug_io.c =================================================================== --- trunk/src/plug_io.c (revision 4861) +++ trunk/src/plug_io.c (revision 4862) @@ -99,7 +99,7 @@ if (filename == NULL) filename = ""; } - Message(PCB_MSG_DEFAULT, "IO error during %s: %s %s %s\n", what, reason, filename, comment); + pcb_message(PCB_MSG_DEFAULT, "IO error during %s: %s %s %s\n", what, reason, filename, comment); } } @@ -117,7 +117,7 @@ int len, n; len = pcb_find_io(available, sizeof(available)/sizeof(available[0]), PCB_IOT_PCB, 0, fmt); if (len <= 0) { - Message(PCB_MSG_DEFAULT, "Error: can't find a IO_ plugin to load a PCB using format %s\n", fmt); + pcb_message(PCB_MSG_DEFAULT, "Error: can't find a IO_ plugin to load a PCB using format %s\n", fmt); return -1; } for(n = 0; n < len; n++) { @@ -333,7 +333,7 @@ /* enable default font if necessary */ if (!PCB->Font.Valid) { if (require_font) - Message(PCB_MSG_DEFAULT, _("File '%s' has no font information, using default font\n"), new_filename); + pcb_message(PCB_MSG_DEFAULT, _("File '%s' has no font information, using default font\n"), new_filename); PCB->Font.Valid = pcb_true; } @@ -380,7 +380,7 @@ /* bozo: we are trying to revert back to a non-existing pcb... create one to avoid a segfault */ PCB = pcb_board_new_(pcb_false); if (PCB == NULL) { - Message(PCB_MSG_DEFAULT, "FATAL: can't create a new empty pcb!"); + pcb_message(PCB_MSG_DEFAULT, "FATAL: can't create a new empty pcb!"); exit(1); } } @@ -507,7 +507,7 @@ } } if ((fp = fopen(Filename, "w")) == NULL) - OpenErrorMessage(Filename); + OpenErrorpcb_message(Filename); } return (fp); } @@ -627,7 +627,7 @@ /* memory might have been released before this function is called */ if (PCB && PCB->Changed && (conf_core.rc.emergency_name != NULL) && (*conf_core.rc.emergency_name != '\0')) { sprintf(filename, conf_core.rc.emergency_name, (long int)pcb_getpid()); - Message(PCB_MSG_DEFAULT, _("Trying to save your layout in '%s'\n"), filename); + pcb_message(PCB_MSG_DEFAULT, _("Trying to save your layout in '%s'\n"), filename); WritePCBFile(filename, pcb_true, DEFAULT_FMT, pcb_true); } } @@ -775,7 +775,7 @@ Filename = fn_tmp; } else { - Message(PCB_MSG_ERROR, "Can't rename %s to %s before save\n", Filename, fn_tmp); + pcb_message(PCB_MSG_ERROR, "Can't rename %s to %s before save\n", Filename, fn_tmp); return -1; } } @@ -782,7 +782,7 @@ } if ((fp = fopen(Filename, "w")) == NULL) { - OpenErrorMessage(Filename); + OpenErrorpcb_message(Filename); return (STATUS_ERROR); } @@ -827,7 +827,7 @@ } printf("write to pipe \"%s\"\n", command.array); if ((fp = popen(command.array, "w")) == NULL) { - PopenErrorMessage(command.array); + PopenErrorpcb_message(command.array); return (STATUS_ERROR); } Index: trunk/src/polygon.c =================================================================== --- trunk/src/polygon.c (revision 4861) +++ trunk/src/polygon.c (revision 4862) @@ -727,7 +727,7 @@ p->Clipped = biggest(merged); assert(!p->Clipped || poly_Valid(p->Clipped)); if (!p->Clipped) - Message(PCB_MSG_DEFAULT, "Polygon cleared out of existence near (%d, %d)\n", + pcb_message(PCB_MSG_DEFAULT, "Polygon cleared out of existence near (%d, %d)\n", (p->BoundingBox.X1 + p->BoundingBox.X2) / 2, (p->BoundingBox.Y1 + p->BoundingBox.Y2) / 2); return 1; } @@ -1316,7 +1316,7 @@ dx = coord_abs(Crosshair.AttachedPolygon.Points[n - 1].X - Crosshair.AttachedPolygon.Points[0].X); dy = coord_abs(Crosshair.AttachedPolygon.Points[n - 1].Y - Crosshair.AttachedPolygon.Points[0].Y); if (!(dx == 0 || dy == 0 || dx == dy)) { - Message(PCB_MSG_ERROR, _("Cannot close polygon because 45 degree lines are requested.\n")); + pcb_message(PCB_MSG_ERROR, _("Cannot close polygon because 45 degree lines are requested.\n")); return; } } @@ -1324,7 +1324,7 @@ pcb_draw(); } else - Message(PCB_MSG_DEFAULT, _("A polygon has to have at least 3 points\n")); + pcb_message(PCB_MSG_DEFAULT, _("A polygon has to have at least 3 points\n")); } /* --------------------------------------------------------------------------- Index: trunk/src/rats.c =================================================================== --- trunk/src/rats.c (revision 4861) +++ trunk/src/rats.c (revision 4862) @@ -97,7 +97,7 @@ } else { ElementName[j] = '\0'; - Message(PCB_MSG_DEFAULT, _("Bad net-list format encountered near: \"%s\"\n"), ElementName); + pcb_message(PCB_MSG_DEFAULT, _("Bad net-list format encountered near: \"%s\"\n"), ElementName); return (pcb_true); } } @@ -163,7 +163,7 @@ return (pcb_false); for (j = 0; PinNum[j] != '\0'; j++); if (j == 0) { - Message(PCB_MSG_DEFAULT, _("Error! Netlist file is missing pin!\n" "white space after \"%s-\"\n"), ElementName); + pcb_message(PCB_MSG_DEFAULT, _("Error! Netlist file is missing pin!\n" "white space after \"%s-\"\n"), ElementName); badnet = pcb_true; } else { @@ -172,11 +172,11 @@ if (Same) return (pcb_false); if (PinNum[j - 1] < '0' || PinNum[j - 1] > '9') { - Message(PCB_MSG_DEFAULT, "WARNING! Pin number ending with '%c'" + pcb_message(PCB_MSG_DEFAULT, "WARNING! Pin number ending with '%c'" " encountered in netlist file\n" "Probably a bad netlist file format\n", PinNum[j - 1]); } } - Message(PCB_MSG_DEFAULT, _("Can't find %s pin %s called for in netlist.\n"), ElementName, PinNum); + pcb_message(PCB_MSG_DEFAULT, _("Can't find %s pin %s called for in netlist.\n"), ElementName, PinNum); return (pcb_false); } @@ -233,7 +233,7 @@ { if (SeekPad(entry, &LastPoint, pcb_false)) { if (TEST_FLAG(PCB_FLAG_DRC, (pcb_pin_t *) LastPoint.ptr2)) - Message(PCB_MSG_DEFAULT, _ + pcb_message(PCB_MSG_DEFAULT, _ ("Error! Element %s pin %s appears multiple times in the netlist file.\n"), NAMEONPCB_NAME((pcb_element_t *) LastPoint.ptr1), (LastPoint.type == @@ -326,7 +326,7 @@ if ((TEST_FLAG(PCB_FLAG_DRC, pin)) && (!(e->Flags.f & PCB_FLAG_NONETLIST))) { warn = pcb_true; if (!pin->Spare) { - Message(PCB_MSG_DEFAULT, _("Warning! Net \"%s\" is shorted to %s pin %s\n"), + pcb_message(PCB_MSG_DEFAULT, _("Warning! Net \"%s\" is shorted to %s pin %s\n"), &theNet->Name[2], UNKNOWN(NAMEONPCB_NAME(element)), UNKNOWN(pin->Number)); stub_rat_found_short(pin, NULL, &theNet->Name[2]); continue; @@ -343,7 +343,7 @@ if (newone) { menu = GetPointerMemory(generic); *menu = pin->Spare; - Message(PCB_MSG_DEFAULT, _("Warning! Net \"%s\" is shorted to net \"%s\"\n"), + pcb_message(PCB_MSG_DEFAULT, _("Warning! Net \"%s\" is shorted to net \"%s\"\n"), &theNet->Name[2], &((pcb_lib_menu_t *) (pin->Spare))->Name[2]); stub_rat_found_short(pin, NULL, &theNet->Name[2]); } @@ -357,7 +357,7 @@ if ((TEST_FLAG(PCB_FLAG_DRC, pad)) && (!(e->Flags.f & PCB_FLAG_NONETLIST)) && (!(e->Name->Flags.f & PCB_FLAG_NONETLIST))) { warn = pcb_true; if (!pad->Spare) { - Message(PCB_MSG_DEFAULT, _("Warning! Net \"%s\" is shorted to %s pad %s\n"), + pcb_message(PCB_MSG_DEFAULT, _("Warning! Net \"%s\" is shorted to %s pad %s\n"), &theNet->Name[2], UNKNOWN(NAMEONPCB_NAME(element)), UNKNOWN(pad->Number)); stub_rat_found_short(NULL, pad, &theNet->Name[2]); continue; @@ -374,7 +374,7 @@ if (newone) { menu = GetPointerMemory(generic); *menu = pad->Spare; - Message(PCB_MSG_DEFAULT, _("Warning! Net \"%s\" is shorted to net \"%s\"\n"), + pcb_message(PCB_MSG_DEFAULT, _("Warning! Net \"%s\" is shorted to net \"%s\"\n"), &theNet->Name[2], &((pcb_lib_menu_t *) (pad->Spare))->Name[2]); stub_rat_found_short(NULL, pad, &theNet->Name[2]); } @@ -659,7 +659,7 @@ */ Wantlist = ProcNetlist(&(PCB->NetlistLib[NETLIST_EDITED])); if (!Wantlist) { - Message(PCB_MSG_DEFAULT, _("Can't add rat lines because no netlist is loaded.\n")); + pcb_message(PCB_MSG_DEFAULT, _("Can't add rat lines because no netlist is loaded.\n")); return (pcb_false); } changed = pcb_false; @@ -714,15 +714,15 @@ if (changed) { IncrementUndoSerialNumber(); if (ratlist_length(&PCB->Data->Rat) > 0) { - Message(PCB_MSG_DEFAULT, "%d rat line%s remaining\n", ratlist_length(&PCB->Data->Rat), ratlist_length(&PCB->Data->Rat) > 1 ? "s" : ""); + pcb_message(PCB_MSG_DEFAULT, "%d rat line%s remaining\n", ratlist_length(&PCB->Data->Rat), ratlist_length(&PCB->Data->Rat) > 1 ? "s" : ""); } return (pcb_true); } if (!SelectedOnly && !Warned) { if (!ratlist_length(&PCB->Data->Rat) && !badnet) - Message(PCB_MSG_DEFAULT, _("Congratulations!!\n" "The layout is complete and has no shorted nets.\n")); + pcb_message(PCB_MSG_DEFAULT, _("Congratulations!!\n" "The layout is complete and has no shorted nets.\n")); else - Message(PCB_MSG_DEFAULT, _("Nothing more to add, but there are\n" + pcb_message(PCB_MSG_DEFAULT, _("Nothing more to add, but there are\n" "either rat-lines in the layout, disabled nets\n" "in the net-list, or missing components\n")); } return (pcb_false); @@ -745,7 +745,7 @@ */ Wantlist = ProcNetlist(&(PCB->NetlistLib[NETLIST_EDITED])); if (!Wantlist) { - Message(PCB_MSG_DEFAULT, _("Can't add rat lines because no netlist is loaded.\n")); + pcb_message(PCB_MSG_DEFAULT, _("Can't add rat lines because no netlist is loaded.\n")); return result; } /* initialize finding engine */ @@ -825,11 +825,11 @@ found = SearchObjectByLocation(PCB_TYPE_PAD | PCB_TYPE_PIN, &ptr1, &ptr2, &ptr3, Crosshair.AttachedLine.Point1.X, Crosshair.AttachedLine.Point1.Y, 5); if (found == PCB_TYPE_NONE) { - Message(PCB_MSG_DEFAULT, _("No pad/pin under rat line\n")); + pcb_message(PCB_MSG_DEFAULT, _("No pad/pin under rat line\n")); return (NULL); } if (NAMEONPCB_NAME((pcb_element_t *) ptr1) == NULL || *NAMEONPCB_NAME((pcb_element_t *) ptr1) == 0) { - Message(PCB_MSG_DEFAULT, _("You must name the starting element first\n")); + pcb_message(PCB_MSG_DEFAULT, _("You must name the starting element first\n")); return (NULL); } @@ -840,11 +840,11 @@ found = SearchObjectByLocation(PCB_TYPE_PAD | PCB_TYPE_PIN, &ptr1, &ptr2, &ptr3, Crosshair.AttachedLine.Point2.X, Crosshair.AttachedLine.Point2.Y, 5); if (found == PCB_TYPE_NONE) { - Message(PCB_MSG_DEFAULT, _("No pad/pin under rat line\n")); + pcb_message(PCB_MSG_DEFAULT, _("No pad/pin under rat line\n")); return (NULL); } if (NAMEONPCB_NAME((pcb_element_t *) ptr1) == NULL || *NAMEONPCB_NAME((pcb_element_t *) ptr1) == 0) { - Message(PCB_MSG_DEFAULT, _("You must name the ending element first\n")); + pcb_message(PCB_MSG_DEFAULT, _("You must name the ending element first\n")); return (NULL); } group2 = (TEST_FLAG(PCB_FLAG_ONSOLDER, (pcb_pad_t *) ptr2) ? @@ -854,7 +854,7 @@ menu = pcb_netnode_to_netname(name1); if (menu) { if (pcb_netnode_to_netname(name2)) { - Message(PCB_MSG_DEFAULT, _("Both connections already in netlist - cannot merge nets\n")); + pcb_message(PCB_MSG_DEFAULT, _("Both connections already in netlist - cannot merge nets\n")); return (NULL); } entry = GetLibraryEntryMemory(menu); Index: trunk/src/rats_patch.c =================================================================== --- trunk/src/rats_patch.c (revision 4861) +++ trunk/src/rats_patch.c (revision 4862) @@ -398,7 +398,7 @@ END_LOOP; if (!(found)) { - Message(PCB_MSG_DEFAULT, "ReplaceFootprint works on selected elements, please select elements first!\n"); + pcb_message(PCB_MSG_DEFAULT, "ReplaceFootprint works on selected elements, please select elements first!\n"); return 1; } @@ -406,7 +406,7 @@ if (argc == 0) { fpname = gui->prompt_for("Footprint name", ""); if (fpname == NULL) { - Message(PCB_MSG_DEFAULT, "No footprint name supplied\n"); + pcb_message(PCB_MSG_DEFAULT, "No footprint name supplied\n"); return 1; } } @@ -417,7 +417,7 @@ a[0] = fpname; a[1] = NULL; if (pcb_load_footprint(1, a, x, y) != 0) { - Message(PCB_MSG_DEFAULT, "Can't load footprint %s\n", fpname); + pcb_message(PCB_MSG_DEFAULT, "Can't load footprint %s\n", fpname); return 1; } @@ -479,7 +479,7 @@ fn = argv[0]; f = fopen(fn, "w"); if (f == NULL) { - Message(PCB_MSG_DEFAULT, "Can't open netlist patch file %s for writing\n", fn); + pcb_message(PCB_MSG_DEFAULT, "Can't open netlist patch file %s for writing\n", fn); return 1; } rats_patch_fexport(PCB, f, 0); Index: trunk/src/rotate.c =================================================================== --- trunk/src/rotate.c (revision 4861) +++ trunk/src/rotate.c (revision 4862) @@ -150,7 +150,7 @@ void *ptr1, *ptr2, *ptr3; if ((type = SearchScreen(X, Y, ROTATE_TYPES, &ptr1, &ptr2, &ptr3)) != PCB_TYPE_NONE) { if (TEST_FLAG(PCB_FLAG_LOCK, (pcb_arc_t *) ptr2)) { - Message(PCB_MSG_DEFAULT, _("Sorry, the object is locked\n")); + pcb_message(PCB_MSG_DEFAULT, _("Sorry, the object is locked\n")); return; } Crosshair.AttachedObject.RubberbandN = 0; Index: trunk/src/route_style.c =================================================================== --- trunk/src/route_style.c (revision 4861) +++ trunk/src/route_style.c (revision 4862) @@ -77,7 +77,7 @@ if (len > sizeof(routeStyle->name)-1) { memcpy(routeStyle->name, Name, sizeof(routeStyle->name)-1); routeStyle->name[sizeof(routeStyle->name)-1] = '\0'; - Message(PCB_MSG_DEFAULT, "Route style name '%s' too long, truncated to '%s'\n", Name, routeStyle->name); + pcb_message(PCB_MSG_DEFAULT, "Route style name '%s' too long, truncated to '%s'\n", Name, routeStyle->name); } else strcpy(routeStyle->name, Name); Index: trunk/src/rubberband.c =================================================================== --- trunk/src/rubberband.c (revision 4861) +++ trunk/src/rubberband.c (revision 4862) @@ -247,7 +247,7 @@ CreateNewRubberbandEntry(NULL, (pcb_line_t *) rat, &rat->Point2); break; default: - Message(PCB_MSG_DEFAULT, "hace: bad rubber-rat lookup callback\n"); + pcb_message(PCB_MSG_DEFAULT, "hace: bad rubber-rat lookup callback\n"); } return R_DIR_NOT_FOUND; } Index: trunk/src/search.c =================================================================== --- trunk/src/search.c (revision 4861) +++ trunk/src/search.c (revision 4862) @@ -1295,7 +1295,7 @@ } END_LOOP; - Message(PCB_MSG_DEFAULT, "hace: Internal error, search for ID %d failed\n", ID); + pcb_message(PCB_MSG_DEFAULT, "hace: Internal error, search for ID %d failed\n", ID); return (PCB_TYPE_NONE); } Index: trunk/src/select.c =================================================================== --- trunk/src/select.c (revision 4861) +++ trunk/src/select.c (revision 4862) @@ -842,7 +842,7 @@ /* compile the regular expression */ regex = re_sei_comp(name_pattern); if (re_sei_errno(regex) != 0) { - Message(PCB_MSG_DEFAULT, _("regexp error: %s\n"), re_error_str(re_sei_errno(regex))); + pcb_message(PCB_MSG_DEFAULT, _("regexp error: %s\n"), re_error_str(re_sei_errno(regex))); re_sei_free(regex); return (pcb_false); } Index: trunk/src/set.c =================================================================== --- trunk/src/set.c (revision 4861) +++ trunk/src/set.c (revision 4862) @@ -170,7 +170,7 @@ void RestoreMode(void) { if (mode_position == 0) { - Message(PCB_MSG_DEFAULT, "hace: underflow of restore mode\n"); + pcb_message(PCB_MSG_DEFAULT, "hace: underflow of restore mode\n"); return; } SetMode(mode_stack[--mode_position]); @@ -200,7 +200,7 @@ if (Mode == PCB_MODE_ARC || Mode == PCB_MODE_RECTANGLE || Mode == PCB_MODE_VIA || Mode == PCB_MODE_POLYGON || Mode == PCB_MODE_POLYGON_HOLE || Mode == PCB_MODE_TEXT || Mode == PCB_MODE_INSERT_POINT || Mode == PCB_MODE_THERMAL) { - Message(PCB_MSG_DEFAULT, _("That mode is NOT allowed when drawing ratlines!\n")); + pcb_message(PCB_MSG_DEFAULT, _("That mode is NOT allowed when drawing ratlines!\n")); Mode = PCB_MODE_NO; } } Index: trunk/src/stub_stroke.c =================================================================== --- trunk/src/stub_stroke.c (revision 4861) +++ trunk/src/stub_stroke.c (revision 4862) @@ -31,7 +31,7 @@ static void stub_stroke_start_dummy(void) { - Message(PCB_MSG_DEFAULT, "Can not use libstroke: not compiled as a buildin and not loaded as a plugin\n"); + pcb_message(PCB_MSG_DEFAULT, "Can not use libstroke: not compiled as a buildin and not loaded as a plugin\n"); } void (*stub_stroke_record)(int ev_x, int ev_y) = stub_stroke_record_dummy; Index: trunk/src/undo.c =================================================================== --- trunk/src/undo.c (revision 4861) +++ trunk/src/undo.c (revision 4862) @@ -190,7 +190,7 @@ #ifdef DEBUG_ID if (SearchObjectByID(PCB->Data, &ptr1, &ptr2, &ptr3, ID, Kind) == PCB_TYPE_NONE) - Message(PCB_MSG_DEFAULT, "hace: ID (%d) and Type (%x) mismatch in AddObject...\n", ID, Kind); + pcb_message(PCB_MSG_DEFAULT, "hace: ID (%d) and Type (%x) mismatch in AddObject...\n", ID, Kind); #endif /* allocate memory */ @@ -206,7 +206,7 @@ if (size > limit) { size_t l2; l2 = (size / limit + 1) * limit; - Message(PCB_MSG_DEFAULT, _("Size of 'undo-list' exceeds %li kb\n"), (long) (l2 >> 10)); + pcb_message(PCB_MSG_DEFAULT, _("Size of 'undo-list' exceeds %li kb\n"), (long) (l2 >> 10)); } } @@ -545,8 +545,8 @@ pcb_draw_obj(type, ptr1, ptr2); return (pcb_true); } - Message(PCB_MSG_DEFAULT, "hace Internal error: Can't find ID %d type %08x\n", Entry->ID, Entry->Kind); - Message(PCB_MSG_DEFAULT, "for UndoFlag Operation. Previous flags: %s\n", flags_to_string(Entry->Data.Flags, 0)); + pcb_message(PCB_MSG_DEFAULT, "hace Internal error: Can't find ID %d type %08x\n", Entry->ID, Entry->Kind); + pcb_message(PCB_MSG_DEFAULT, "for UndoFlag Operation. Previous flags: %s\n", flags_to_string(Entry->Data.Flags, 0)); return (pcb_false); } @@ -570,7 +570,7 @@ DrawElement(element); return (pcb_true); } - Message(PCB_MSG_DEFAULT, "hace Internal error: UndoMirror on object type %d\n", type); + pcb_message(PCB_MSG_DEFAULT, "hace Internal error: UndoMirror on object type %d\n", type); return (pcb_false); } @@ -881,12 +881,12 @@ andDraw = draw; if (Serial == 0) { - Message(PCB_MSG_DEFAULT, _("ERROR: Attempt to Undo() with Serial == 0\n" " Please save your work and report this bug.\n")); + pcb_message(PCB_MSG_DEFAULT, _("ERROR: Attempt to Undo() with Serial == 0\n" " Please save your work and report this bug.\n")); return 0; } if (UndoN == 0) { - Message(PCB_MSG_DEFAULT, _("Nothing to undo - buffer is empty\n")); + pcb_message(PCB_MSG_DEFAULT, _("Nothing to undo - buffer is empty\n")); return 0; } @@ -895,7 +895,7 @@ ptr = &UndoList[UndoN - 1]; if (ptr->Serial > Serial) { - Message(PCB_MSG_DEFAULT, _("ERROR: Bad undo serial number %d in undo stack - expecting %d or lower\n" + pcb_message(PCB_MSG_DEFAULT, _("ERROR: Bad undo serial number %d in undo stack - expecting %d or lower\n" " Please save your work and report this bug.\n"), ptr->Serial, Serial); /* It is likely that the serial number got corrupted through some bad @@ -922,7 +922,7 @@ UnlockUndo(); if (error_undoing) - Message(PCB_MSG_DEFAULT, _("ERROR: Failed to undo some operations\n")); + pcb_message(PCB_MSG_DEFAULT, _("ERROR: Failed to undo some operations\n")); if (Types && andDraw) pcb_draw(); @@ -1063,7 +1063,7 @@ andDraw = draw; if (RedoN == 0) { - Message(PCB_MSG_DEFAULT, _("Nothing to redo. Perhaps changes have been made since last undo\n")); + pcb_message(PCB_MSG_DEFAULT, _("Nothing to redo. Perhaps changes have been made since last undo\n")); return 0; } @@ -1070,7 +1070,7 @@ ptr = &UndoList[UndoN]; if (ptr->Serial < Serial) { - Message(PCB_MSG_DEFAULT, _("ERROR: Bad undo serial number %d in redo stack - expecting %d or higher\n" + pcb_message(PCB_MSG_DEFAULT, _("ERROR: Bad undo serial number %d in redo stack - expecting %d or higher\n" " Please save your work and report this bug.\n"), ptr->Serial, Serial); /* It is likely that the serial number got corrupted through some bad @@ -1100,7 +1100,7 @@ UnlockUndo(); if (error_undoing) - Message(PCB_MSG_DEFAULT, _("ERROR: Failed to redo some operations\n")); + pcb_message(PCB_MSG_DEFAULT, _("ERROR: Failed to redo some operations\n")); if (Types && andDraw) pcb_draw(); @@ -1114,7 +1114,7 @@ void RestoreUndoSerialNumber(void) { if (added_undo_between_increment_and_restore) - Message(PCB_MSG_DEFAULT, _("ERROR: Operations were added to the Undo stack with an incorrect serial number\n")); + pcb_message(PCB_MSG_DEFAULT, _("ERROR: Operations were added to the Undo stack with an incorrect serial number\n")); between_increment_and_restore = pcb_false; added_undo_between_increment_and_restore = pcb_false; Serial = SavedSerial; Index: trunk/src_plugins/autoplace/autoplace.c =================================================================== --- trunk/src_plugins/autoplace/autoplace.c (revision 4861) +++ trunk/src_plugins/autoplace/autoplace.c (revision 4862) @@ -164,7 +164,7 @@ c->Y = ((pcb_pin_t *) c->ptr2)->Y; break; default: - Message(PCB_MSG_DEFAULT, "Odd connection type encountered in " "UpdateXY"); + pcb_message(PCB_MSG_DEFAULT, "Odd connection type encountered in " "UpdateXY"); break; } } @@ -686,13 +686,13 @@ */ Nets = ProcNetlist(&(PCB->NetlistLib[NETLIST_EDITED])); if (!Nets) { - Message(PCB_MSG_DEFAULT, _("Can't add rat lines because no netlist is loaded.\n")); + pcb_message(PCB_MSG_DEFAULT, _("Can't add rat lines because no netlist is loaded.\n")); goto done; } Selected = collectSelectedElements(); if (Selected.PtrN == 0) { - Message(PCB_MSG_DEFAULT, _("No elements selected to autoplace.\n")); + pcb_message(PCB_MSG_DEFAULT, _("No elements selected to autoplace.\n")); goto done; } Index: trunk/src_plugins/autoroute/autoroute.c =================================================================== --- trunk/src_plugins/autoroute/autoroute.c (revision 4861) +++ trunk/src_plugins/autoroute/autoroute.c (revision 4862) @@ -2423,7 +2423,7 @@ db.X2 = last; break; default: - Message(PCB_MSG_DEFAULT, "previous edge bogus direction!"); + pcb_message(PCB_MSG_DEFAULT, "previous edge bogus direction!"); assert(0); } return db; @@ -4318,7 +4318,7 @@ if (request_cancel) { ras.total_nets_routed = 0; ras.conflict_subnets = 0; - Message(PCB_MSG_DEFAULT, "Autorouting cancelled\n"); + pcb_message(PCB_MSG_DEFAULT, "Autorouting cancelled\n"); goto out; } } @@ -4370,7 +4370,7 @@ this_cost = 0; } - Message(PCB_MSG_DEFAULT, "%d of %d nets successfully routed.\n", ras.routed_subnets, ras.total_subnets); + pcb_message(PCB_MSG_DEFAULT, "%d of %d nets successfully routed.\n", ras.routed_subnets, ras.total_subnets); out: heap_destroy(&this_pass); @@ -4555,7 +4555,7 @@ for (i = 0; i < vtroutestyle_len(&PCB->RouteStyle); i++) { if (PCB->RouteStyle.array[i].Thick == 0 || PCB->RouteStyle.array[i].Diameter == 0 || PCB->RouteStyle.array[i].Hole == 0 || PCB->RouteStyle.array[i].Clearance == 0) { - Message(PCB_MSG_DEFAULT, "You must define proper routing styles\n" "before auto-routing.\n"); + pcb_message(PCB_MSG_DEFAULT, "You must define proper routing styles\n" "before auto-routing.\n"); return (pcb_false); } } @@ -4650,7 +4650,7 @@ ASSIGN_FLAG(PCB_FLAG_SELECTED, pcb_true, line); DrawRat(line, 0); #endif /* DEBUG_STALE_RATS */ - Message(PCB_MSG_DEFAULT, "The rats nest is stale! Aborting autoroute...\n"); + pcb_message(PCB_MSG_DEFAULT, "The rats nest is stale! Aborting autoroute...\n"); goto donerouting; } /* merge subnets into a net! */ @@ -4700,7 +4700,7 @@ if (changed) changed = IronDownAllUnfixedPaths(rd); - Message(PCB_MSG_DEFAULT, "Total added wire length = %$mS, %d vias added\n", (pcb_coord_t) total_wire_length, total_via_count); + pcb_message(PCB_MSG_DEFAULT, "Total added wire length = %$mS, %d vias added\n", (pcb_coord_t) total_wire_length, total_via_count); DestroyRouteData(&rd); if (changed) { SaveUndoSerialNumber(); Index: trunk/src_plugins/diag/diag.c =================================================================== --- trunk/src_plugins/diag/diag.c (revision 4861) +++ trunk/src_plugins/diag/diag.c (revision 4862) @@ -61,12 +61,12 @@ conf_role_t role; const char *prefix = ""; if (argc <= 1) { - Message(PCB_MSG_DEFAULT, "conf(dumplht) needs a role"); + pcb_message(PCB_MSG_DEFAULT, "conf(dumplht) needs a role"); return 1; } role = conf_role_parse(argv[1]); if (role == CFR_invalid) { - Message(PCB_MSG_DEFAULT, "Invalid role: '%s'", argv[1]); + pcb_message(PCB_MSG_DEFAULT, "Invalid role: '%s'", argv[1]); return 1; } if (argc > 2) @@ -78,7 +78,7 @@ } else { - Message(PCB_MSG_ERROR, "Invalid conf command '%s'\n", argv[0]); + pcb_message(PCB_MSG_ERROR, "Invalid conf command '%s'\n", argv[0]); return 1; } return 0; @@ -97,13 +97,13 @@ int role; if (path == NULL) { - Message(PCB_MSG_ERROR, "EvalConf needs a path\n"); + pcb_message(PCB_MSG_ERROR, "EvalConf needs a path\n"); return 1; } nat = conf_get_field(path); if (nat == NULL) { - Message(PCB_MSG_ERROR, "EvalConf: invalid path %s - no such config setting\n", path); + pcb_message(PCB_MSG_ERROR, "EvalConf: invalid path %s - no such config setting\n", path); return 1; } Index: trunk/src_plugins/export_bboard/bboard.c =================================================================== --- trunk/src_plugins/export_bboard/bboard.c (revision 4861) +++ trunk/src_plugins/export_bboard/bboard.c (revision 4862) @@ -294,7 +294,7 @@ else { if ((color[0] != '#') || sscanf(&(color[1]), "%02x%02x%02x", &r, &g, &b) != 3) { - Message(PCB_MSG_ERROR, "BBExport: Invalid background color \"%s\"", color); + pcb_message(PCB_MSG_ERROR, "BBExport: Invalid background color \"%s\"", color); r = g = b = 0xff; } Index: trunk/src_plugins/export_dxf/dxf.c =================================================================== --- trunk/src_plugins/export_dxf/dxf.c (revision 4861) +++ trunk/src_plugins/export_dxf/dxf.c (revision 4862) @@ -786,7 +786,7 @@ theta = 270.0; else { theta = 0.0; - Message(PCB_MSG_WARNING, "DXF: in dxf_xy_to_angle ():\n" + pcb_message(PCB_MSG_WARNING, "DXF: in dxf_xy_to_angle ():\n" " unable to figure out angle of element\n" " because the pin is at the centroid of the part.\n" " This is a BUG!!!\n" " Setting to %g degrees\n", theta); @@ -812,7 +812,7 @@ fprintf(stderr, "[File: %s: line: %d] Entering dxf_clean_string () function.\n", __FILE__, __LINE__); #endif if ((out = malloc((strlen(in) + 1) * sizeof(char))) == NULL) { - Message(PCB_MSG_ERROR, "DXF: in dxf_clean_string (): malloc () failed.\n"); + pcb_message(PCB_MSG_ERROR, "DXF: in dxf_clean_string (): malloc () failed.\n"); exit(1); } for (i = 0; i <= strlen(in); i++) { @@ -846,7 +846,7 @@ fprintf(stderr, "[File: %s: line: %d] Entering dxf_string_insert () function.\n", __FILE__, __LINE__); #endif if ((new = (StringList *) malloc(sizeof(StringList))) == NULL) { - Message(PCB_MSG_ERROR, "DXF: in dxf_string_insert (): malloc () failed.\n"); + pcb_message(PCB_MSG_ERROR, "DXF: in dxf_string_insert (): malloc () failed.\n"); exit(1); } new->next = NULL; @@ -4087,7 +4087,7 @@ if (found_pin2) theta = dxf_xy_to_angle(pin2x, pin2y); else { - Message(PCB_MSG_WARNING, "dxf.c|dxf_export_xref_file ():\n" + pcb_message(PCB_MSG_WARNING, "dxf.c|dxf_export_xref_file ():\n" " unable to figure out angle of element\n" " %s because pin #1 is at the centroid of the part\n" " and I could not find pin #2's location.\n" @@ -4101,7 +4101,7 @@ /* we did not find pin #1 */ else { theta = 0.0; - Message(PCB_MSG_WARNING, "dxf.c|dxf_export_xref_file ():\n" + pcb_message(PCB_MSG_WARNING, "dxf.c|dxf_export_xref_file ():\n" " unable to figure out angle because I could\n" " not find pin #1 of element %s.\n" " Setting to %g degrees.\n", UNKNOWN(NAMEONPCB_NAME(element)), theta); @@ -4145,7 +4145,7 @@ dxf_rot_angle = 180.0; else { dxf_rot_angle = 0.0; - Message(PCB_MSG_WARNING, "dxf.c|dxf_export_xref_file ():\n" + pcb_message(PCB_MSG_WARNING, "dxf.c|dxf_export_xref_file ():\n" " unable to figure out angle of dxf block\n" " %s because pcb angle theta is not Cardinal [0.0, 90.0, 180.0, 270.0].\n" " Setting dxf_rot_angle to %g degrees\n", UNKNOWN(NAMEONPCB_NAME(element)), dxf_rot_angle); @@ -4514,7 +4514,7 @@ strcat(dxf_filesuffix, sext); fp = fopen(dxf_filename, "w"); if (fp == NULL) { - Message(PCB_MSG_ERROR, "DXF: could not open %s for writing.\n", dxf_filename); + pcb_message(PCB_MSG_ERROR, "DXF: could not open %s for writing.\n", dxf_filename); return 1; } /* write version info as a dxf comment */ Index: trunk/src_plugins/export_gcode/gcode.c =================================================================== --- trunk/src_plugins/export_gcode/gcode.c (revision 4861) +++ trunk/src_plugins/export_gcode/gcode.c (revision 4862) @@ -319,7 +319,7 @@ #ifdef HAVE_GDIMAGEPNG gdImagePng(gcode_im, gcode_f); #else - Message(PCB_MSG_DEFAULT, "GCODE: PNG not supported by gd. Can't write layer mask.\n"); + pcb_message(PCB_MSG_DEFAULT, "GCODE: PNG not supported by gd. Can't write layer mask.\n"); #endif gdImageDestroy(gcode_im); fclose(gcode_f); Index: trunk/src_plugins/export_gerber/gerber.c =================================================================== --- trunk/src_plugins/export_gerber/gerber.c (revision 4861) +++ trunk/src_plugins/export_gerber/gerber.c (revision 4862) @@ -682,7 +682,7 @@ assign_file_suffix(filesuff, idx); f = fopen(filename, "wb"); /* Binary needed to force CR-LF */ if (f == NULL) { - Message(PCB_MSG_DEFAULT, "Error: Could not open %s for writing.\n", filename); + pcb_message(PCB_MSG_DEFAULT, "Error: Could not open %s for writing.\n", filename); return 1; } Index: trunk/src_plugins/export_ipcd356/ipcd356.c =================================================================== --- trunk/src_plugins/export_ipcd356/ipcd356.c (revision 4861) +++ trunk/src_plugins/export_ipcd356/ipcd356.c (revision 4862) @@ -395,7 +395,7 @@ IPCD356_AliasList *aliaslist; if (IPCD356_SanityCheck()) { /* Check for invalid names + numbers. */ - Message(PCB_MSG_ERROR, "IPCD356: aborting on the sanity check.\n"); + pcb_message(PCB_MSG_ERROR, "IPCD356: aborting on the sanity check.\n"); return (1); } @@ -405,7 +405,7 @@ fp = fopen(IPCD356_filename, "w+"); if (fp == NULL) { - Message(PCB_MSG_ERROR, "error opening %s\n", IPCD356_filename); + pcb_message(PCB_MSG_ERROR, "error opening %s\n", IPCD356_filename); return 1; } /* free (IPCD356_filename); */ @@ -415,12 +415,12 @@ aliaslist = CreateAliasList(); if (aliaslist == NULL) { - Message(PCB_MSG_ERROR, "Error Aloccating memory for IPC-D-356 AliasList\n"); + pcb_message(PCB_MSG_ERROR, "Error Aloccating memory for IPC-D-356 AliasList\n"); return 1; } if (IPCD356_WriteAliases(fp, aliaslist)) { - Message(PCB_MSG_ERROR, "Error Writing IPC-D-356 AliasList\n"); + pcb_message(PCB_MSG_ERROR, "Error Writing IPC-D-356 AliasList\n"); return 1; } @@ -433,7 +433,7 @@ LookupConnectionByPin(PCB_TYPE_PIN, pin); sprintf(nodename, "%s-%s", element->Name[1].TextString, pin->Number); netname = pcb_netnode_to_netname(nodename); -/* Message(PCB_MSG_INFO, "Netname: %s\n", netname->Name +2); */ +/* pcb_message(PCB_MSG_INFO, "Netname: %s\n", netname->Name +2); */ if (netname) { strcpy(net, &netname->Name[2]); CheckNetLength(net, aliaslist); @@ -451,7 +451,7 @@ LookupConnectionByPin(PCB_TYPE_PAD, pad); sprintf(nodename, "%s-%s", element->Name[1].TextString, pad->Number); netname = pcb_netnode_to_netname(nodename); -/* Message(PCB_MSG_INFO, "Netname: %s\n", netname->Name +2); */ +/* pcb_message(PCB_MSG_INFO, "Netname: %s\n", netname->Name +2); */ if (netname) { strcpy(net, &netname->Name[2]); CheckNetLength(net, aliaslist); @@ -569,7 +569,7 @@ { ELEMENT_LOOP(PCB->Data); if (element->Name[1].TextString == '\0') { - Message(PCB_MSG_ERROR, "Error: Found unnamed element. All elements need to be named to create an IPC-D-356 netlist.\n"); + pcb_message(PCB_MSG_ERROR, "Error: Found unnamed element. All elements need to be named to create an IPC-D-356 netlist.\n"); return (1); } END_LOOP; /* Element. */ Index: trunk/src_plugins/export_nelma/nelma.c =================================================================== --- trunk/src_plugins/export_nelma/nelma.c (revision 4861) +++ trunk/src_plugins/export_nelma/nelma.c (revision 4862) @@ -566,7 +566,7 @@ #ifdef HAVE_GDIMAGEPNG gdImagePng(nelma_im, nelma_f); #else - Message(PCB_MSG_DEFAULT, "NELMA: PNG not supported by gd. Can't write layer mask.\n"); + pcb_message(PCB_MSG_DEFAULT, "NELMA: PNG not supported by gd. Can't write layer mask.\n"); #endif gdImageDestroy(nelma_im); fclose(nelma_f); Index: trunk/src_plugins/export_openscad/scad.c =================================================================== --- trunk/src_plugins/export_openscad/scad.c (revision 4861) +++ trunk/src_plugins/export_openscad/scad.c (revision 4862) @@ -371,7 +371,7 @@ outline_segments = (t_outline_segment *) malloc(sizeof(t_outline_segment) * 50); n_alloc_outline_segments = 50; if (!outline_segments) { - Message(PCB_MSG_ERROR, "openscad: cannot allocate memory for board outline. Board outline cannot be created.\n"); + pcb_message(PCB_MSG_ERROR, "openscad: cannot allocate memory for board outline. Board outline cannot be created.\n"); return; } } @@ -385,7 +385,7 @@ n_alloc_outline_segments = n_alloc_outline_segments + 50; } else { - Message(PCB_MSG_ERROR, "openscad: cannot allocate more memory for board outline. Board outline will be incomplete.\n"); + pcb_message(PCB_MSG_ERROR, "openscad: cannot allocate more memory for board outline. Board outline will be incomplete.\n"); return; } } @@ -488,7 +488,7 @@ fprintf(scad_output, "}\n\n"); } else { - Message(PCB_MSG_ERROR, "openscad: cannot allocate more memory for board outline. Board outline will be incomplete.\n"); + pcb_message(PCB_MSG_ERROR, "openscad: cannot allocate more memory for board outline. Board outline will be incomplete.\n"); } if (op) free(op); @@ -529,7 +529,7 @@ scad_output = fopen(scad_filename, "w"); if (scad_output == NULL) { - Message(PCB_MSG_ERROR, "openscad: could not open %s for writing.\n", scad_filename); + pcb_message(PCB_MSG_ERROR, "openscad: could not open %s for writing.\n", scad_filename); goto quit; } @@ -872,7 +872,7 @@ if (name[0] == '#') { unsigned int r, g, b; if (sscanf(name + 1, "%02x%02x%02x", &r, &g, &b) != 3) - Message(PCB_MSG_ERROR, "Invalid color format: %s\n", name); + pcb_message(PCB_MSG_ERROR, "Invalid color format: %s\n", name); gc->r = r; gc->g = g; gc->b = b; Index: trunk/src_plugins/export_openscad/scadcomp.c =================================================================== --- trunk/src_plugins/export_openscad/scadcomp.c (revision 4861) +++ trunk/src_plugins/export_openscad/scadcomp.c (revision 4862) @@ -90,7 +90,7 @@ include_files_bufsize = 2048; } else { - Message(PCB_MSG_ERROR, "openscad: cannot allocate memory for component included files.\n"); + pcb_message(PCB_MSG_ERROR, "openscad: cannot allocate memory for component included files.\n"); } } @@ -124,7 +124,7 @@ l = strlen(pcblibdir) + 1 + strlen(MODELBASE) + 1 + strlen(SCADBASE) + 1 + include_file_maxlength + 1; if ((fullname = (char *) malloc(l * sizeof(char))) == NULL) { - Message(PCB_MSG_ERROR, "openscad: cannot allocate memory for component included files.\n"); + pcb_message(PCB_MSG_ERROR, "openscad: cannot allocate memory for component included files.\n"); return; } sprintf(fullname, "%s%s%s%s%s%s", pcblibdir, PCB_DIR_SEPARATOR_S, Index: trunk/src_plugins/export_png/png.c =================================================================== --- trunk/src_plugins/export_png/png.c (revision 4861) +++ trunk/src_plugins/export_png/png.c (revision 4862) @@ -725,7 +725,7 @@ im = gdImageCreate(w, h); if (im == NULL) { - Message(PCB_MSG_DEFAULT, "png_do_export(): gdImageCreate(%d, %d) returned NULL. Aborting export.\n", w, h); + pcb_message(PCB_MSG_DEFAULT, "png_do_export(): gdImageCreate(%d, %d) returned NULL. Aborting export.\n", w, h); return; } @@ -746,7 +746,7 @@ white->a = 0; white->c = gdImageColorAllocateAlpha(im, white->r, white->g, white->b, white->a); if (white->c == BADC) { - Message(PCB_MSG_DEFAULT, "png_do_export(): gdImageColorAllocateAlpha() returned NULL. Aborting export.\n"); + pcb_message(PCB_MSG_DEFAULT, "png_do_export(): gdImageColorAllocateAlpha() returned NULL. Aborting export.\n"); return; } @@ -756,7 +756,7 @@ black->r = black->g = black->b = black->a = 0; black->c = gdImageColorAllocate(im, black->r, black->g, black->b); if (black->c == BADC) { - Message(PCB_MSG_DEFAULT, "png_do_export(): gdImageColorAllocateAlpha() returned NULL. Aborting export.\n"); + pcb_message(PCB_MSG_DEFAULT, "png_do_export(): gdImageColorAllocateAlpha() returned NULL. Aborting export.\n"); return; } @@ -1014,7 +1014,7 @@ static color_struct *black = NULL, *white = NULL; *photo_im = gdImageCreate(gdImageSX(im), gdImageSY(im)); if (photo_im == NULL) { - Message(PCB_MSG_DEFAULT, "png_set_layer(): gdImageCreate(%d, %d) returned NULL. Aborting export.\n", gdImageSX(im), gdImageSY(im)); + pcb_message(PCB_MSG_DEFAULT, "png_set_layer(): gdImageCreate(%d, %d) returned NULL. Aborting export.\n", gdImageSX(im), gdImageSY(im)); return 0; } @@ -1024,7 +1024,7 @@ white->a = 0; white->c = gdImageColorAllocate(*photo_im, white->r, white->g, white->b); if (white->c == BADC) { - Message(PCB_MSG_DEFAULT, "png_set_layer(): gdImageColorAllocate() returned NULL. Aborting export.\n"); + pcb_message(PCB_MSG_DEFAULT, "png_set_layer(): gdImageColorAllocate() returned NULL. Aborting export.\n"); return 0; } @@ -1032,7 +1032,7 @@ black->r = black->g = black->b = black->a = 0; black->c = gdImageColorAllocate(*photo_im, black->r, black->g, black->b); if (black->c == BADC) { - Message(PCB_MSG_DEFAULT, "png_set_layer(): gdImageColorAllocate() returned NULL. Aborting export.\n"); + pcb_message(PCB_MSG_DEFAULT, "png_set_layer(): gdImageColorAllocate() returned NULL. Aborting export.\n"); return 0; } @@ -1103,7 +1103,7 @@ if (mask_im == NULL) { mask_im = gdImageCreate(gdImageSX(im), gdImageSY(im)); if (!mask_im) { - Message(PCB_MSG_DEFAULT, "png_use_mask(): gdImageCreate(%d, %d) returned NULL. Corrupt export!\n", gdImageSY(im), gdImageSY(im)); + pcb_message(PCB_MSG_DEFAULT, "png_use_mask(): gdImageCreate(%d, %d) returned NULL. Corrupt export!\n", gdImageSY(im), gdImageSY(im)); return; } gdImagePaletteCopy(mask_im, im); @@ -1155,7 +1155,7 @@ sscanf(name + 1, "%2x%2x%2x", &(gc->color->r), &(gc->color->g), &(gc->color->b)); gc->color->c = gdImageColorAllocate(master_im, gc->color->r, gc->color->g, gc->color->b); if (gc->color->c == BADC) { - Message(PCB_MSG_DEFAULT, "png_set_color(): gdImageColorAllocate() returned NULL. Aborting export.\n"); + pcb_message(PCB_MSG_DEFAULT, "png_set_color(): gdImageColorAllocate() returned NULL. Aborting export.\n"); return; } cval.ptr = gc->color; @@ -1237,18 +1237,18 @@ int bg, fg; gc->brush = gdImageCreate(r, r); if (gc->brush == NULL) { - Message(PCB_MSG_DEFAULT, "use_gc(): gdImageCreate(%d, %d) returned NULL. Aborting export.\n", r, r); + pcb_message(PCB_MSG_DEFAULT, "use_gc(): gdImageCreate(%d, %d) returned NULL. Aborting export.\n", r, r); return; } bg = gdImageColorAllocate(gc->brush, 255, 255, 255); if (bg == BADC) { - Message(PCB_MSG_DEFAULT, "use_gc(): gdImageColorAllocate() returned NULL. Aborting export.\n"); + pcb_message(PCB_MSG_DEFAULT, "use_gc(): gdImageColorAllocate() returned NULL. Aborting export.\n"); return; } fg = gdImageColorAllocateAlpha(gc->brush, gc->color->r, gc->color->g, gc->color->b, 0); if (fg == BADC) { - Message(PCB_MSG_DEFAULT, "use_gc(): gdImageColorAllocate() returned NULL. Aborting export.\n"); + pcb_message(PCB_MSG_DEFAULT, "use_gc(): gdImageColorAllocate() returned NULL. Aborting export.\n"); return; } gdImageColorTransparent(gc->brush, bg); Index: trunk/src_plugins/export_ps/ps.c =================================================================== --- trunk/src_plugins/export_ps/ps.c (revision 4861) +++ trunk/src_plugins/export_ps/ps.c (revision 4862) @@ -1482,7 +1482,7 @@ if (xval < 2) ps_attribute_list[HA_xcalib].default_val.real_value = global.calibration_x = xval; else - Message(PCB_MSG_DEFAULT, "X value of %g is too far off.\n" "Expecting it near: 1.0, 4.0, 15.0, 7.5\n", xval); + pcb_message(PCB_MSG_DEFAULT, "X value of %g is too far off.\n" "Expecting it near: 1.0, 4.0, 15.0, 7.5\n", xval); } if (guess(yval, 4, &global.calibration_y)) if (guess(yval, 20, &global.calibration_y)) @@ -1490,7 +1490,7 @@ if (yval < 2) ps_attribute_list[HA_ycalib].default_val.real_value = global.calibration_y = yval; else - Message(PCB_MSG_DEFAULT, "Y value of %g is too far off.\n" "Expecting it near: 1.0, 4.0, 20.0, 10.0\n", yval); + pcb_message(PCB_MSG_DEFAULT, "Y value of %g is too far off.\n" "Expecting it near: 1.0, 4.0, 20.0, 10.0\n", yval); } return; } Index: trunk/src_plugins/export_svg/svg.c =================================================================== --- trunk/src_plugins/export_svg/svg.c (revision 4861) +++ trunk/src_plugins/export_svg/svg.c (revision 4862) @@ -675,7 +675,7 @@ static void svg_calibrate(double xval, double yval) { - Message(PCB_MSG_ERROR, "svg_calibrate() not implemented"); + pcb_message(PCB_MSG_ERROR, "svg_calibrate() not implemented"); return; } Index: trunk/src_plugins/export_xy/xy.c =================================================================== --- trunk/src_plugins/export_xy/xy.c (revision 4861) +++ trunk/src_plugins/export_xy/xy.c (revision 4862) @@ -292,13 +292,13 @@ } if (!found_any) { - Message + pcb_message (PCB_MSG_WARNING, "PrintBOM(): unable to figure out angle because I could\n" " not find a suitable reference pin of element %s\n" " Setting to %g degrees\n", UNKNOWN(NAMEONPCB_NAME(element)), theta); } else if (!found_any_not_at_centroid) { - Message + pcb_message (PCB_MSG_WARNING, "PrintBOM(): unable to figure out angle of element\n" " %s because the reference pin(s) are at the centroid of the part.\n" " Setting to %g degrees\n", UNKNOWN(NAMEONPCB_NAME(element)), theta); Index: trunk/src_plugins/fp_fs/fp_fs.c =================================================================== --- trunk/src_plugins/fp_fs/fp_fs.c (revision 4861) +++ trunk/src_plugins/fp_fs/fp_fs.c (revision 4862) @@ -124,7 +124,7 @@ /* Cache old dir, then cd into subdir because stat is given relative file names. */ memset(olddir, 0, sizeof olddir); if (pcb_get_wd(olddir) == NULL) { - Message(PCB_MSG_DEFAULT, _("fp_fs_list(): Could not determine initial working directory\n")); + pcb_message(PCB_MSG_DEFAULT, _("fp_fs_list(): Could not determine initial working directory\n")); return 0; } @@ -133,7 +133,7 @@ if (chdir(subdir)) { if (!subdir_may_not_exist) - ChdirErrorMessage(subdir); + ChdirErrorpcb_message(subdir); return 0; } @@ -140,9 +140,9 @@ /* Determine subdir's abs path */ if (pcb_get_wd(new_subdir) == NULL) { - Message(PCB_MSG_DEFAULT, _("fp_fs_list(): Could not determine new working directory\n")); + pcb_message(PCB_MSG_DEFAULT, _("fp_fs_list(): Could not determine new working directory\n")); if (chdir(olddir)) - ChdirErrorMessage(olddir); + ChdirErrorpcb_message(olddir); return 0; } @@ -153,9 +153,9 @@ /* First try opening the directory specified by path */ if ((subdirobj = opendir(new_subdir)) == NULL) { - OpendirErrorMessage(new_subdir); + OpendirErrorpcb_message(new_subdir); if (chdir(olddir)) - ChdirErrorMessage(olddir); + ChdirErrorpcb_message(olddir); return 0; } @@ -214,7 +214,7 @@ /* Done. Clean up, cd back into old dir, and return */ closedir(subdirobj); if (chdir(olddir)) - ChdirErrorMessage(olddir); + ChdirErrorpcb_message(olddir); return n_footprints; } Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/dialogs/dialogs.c =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/dialogs/dialogs.c (revision 4861) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/dialogs/dialogs.c (revision 4862) @@ -9,7 +9,7 @@ if (gui == NULL) fprintf(stderr, "couldn't find gui for log: \"%s\"\n", msg); else - Message(PCB_MSG_DEFAULT, "%s", msg); + pcb_message(PCB_MSG_DEFAULT, "%s", msg); } #define empty(s) (((s) == NULL) || ((*s) == '\0')) Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid.c =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid.c (revision 4861) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid.c (revision 4862) @@ -165,7 +165,7 @@ const pcb_unit_t *u; u = get_unit_struct(end); if (u == NULL) { - Message(PCB_MSG_DEFAULT, "Invalid unit for HIDA_Coord in the script: '%s'\n", end); + pcb_message(PCB_MSG_DEFAULT, "Invalid unit for HIDA_Coord in the script: '%s'\n", end); v.coord_value = 0; } else Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/debug_draw.c =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/debug_draw.c (revision 4861) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/debug_draw.c (revision 4862) @@ -39,7 +39,7 @@ need_ddh(NULL); gc = ddh->make_gc(); if (gc == NULL) { - Message(PCB_MSG_DEFAULT, "debug_draw_dctx(): failed to make a new gc on ddh %p\n", (void *)ddh); + pcb_message(PCB_MSG_DEFAULT, "debug_draw_dctx(): failed to make a new gc on ddh %p\n", (void *)ddh); return NULL; } Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/draw.c =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/draw.c (revision 4861) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/draw.c (revision 4862) @@ -7,7 +7,7 @@ #define setup(func) \ pcb_hid_gc_t gc = ctx->gc; \ pcb_hid_t *hid = ctx->hid; \ - if ((hid == NULL) && (gc == NULL)) Message(PCB_MSG_DEFAULT, "%s failed because of invalid hid or gc\n", func); \ + if ((hid == NULL) && (gc == NULL)) pcb_message(PCB_MSG_DEFAULT, "%s failed because of invalid hid or gc\n", func); \ if ((hid == NULL) && (gc == NULL)) return Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_plugin.c =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_plugin.c (revision 4861) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_plugin.c (revision 4862) @@ -19,7 +19,7 @@ /* This function is used to print a detailed GPMI error message */ void gpmi_hid_print_error(gpmi_err_stack_t *entry, char *string) { - Message(PCB_MSG_DEFAULT, "[GPMI] %s\n", string); + pcb_message(PCB_MSG_DEFAULT, "[GPMI] %s\n", string); } @@ -50,7 +50,7 @@ if (i != NULL) hid_gpmi_reload_module(i); else - Message(PCB_MSG_DEFAULT, "Script %s not found\n", name); + pcb_message(PCB_MSG_DEFAULT, "Script %s not found\n", name); } else { for(i = hid_gpmi_script_info; i != NULL; i = i->next) @@ -73,10 +73,10 @@ else if (strcasecmp(argv[0], "load") == 0) { if (argc == 3) { if (hid_gpmi_load_module(NULL, argv[1], argv[2], NULL) == NULL) - Message(PCB_MSG_DEFAULT, "Failed to load %s %s\n", argv[1], argv[2]); + pcb_message(PCB_MSG_DEFAULT, "Failed to load %s %s\n", argv[1], argv[2]); } else - Message(PCB_MSG_DEFAULT, "Invalid number of arguments for load\n"); + pcb_message(PCB_MSG_DEFAULT, "Invalid number of arguments for load\n"); } else if (strcasecmp(argv[0], "unload") == 0) { if (argc == 2) { @@ -83,22 +83,22 @@ hid_gpmi_script_info_t *i = hid_gpmi_lookup(argv[1]); if (i != NULL) { if (gpmi_hid_script_unload(i) != 0) { - Message(PCB_MSG_DEFAULT, "Failed to unload %s\n", argv[1]); + pcb_message(PCB_MSG_DEFAULT, "Failed to unload %s\n", argv[1]); return 1; } } else { - Message(PCB_MSG_DEFAULT, "Failed to unload %s: not loaded\n", argv[1]); + pcb_message(PCB_MSG_DEFAULT, "Failed to unload %s: not loaded\n", argv[1]); return 1; } } else { - Message(PCB_MSG_DEFAULT, "Invalid number of arguments for unload\n"); + pcb_message(PCB_MSG_DEFAULT, "Invalid number of arguments for unload\n"); return 1; } } else { - Message(PCB_MSG_DEFAULT, "Invalid arguments in gpmi_scripts()\n"); + pcb_message(PCB_MSG_DEFAULT, "Invalid arguments in gpmi_scripts()\n"); return 1; } return 0; Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/scripts.c =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/scripts.c (revision 4861) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/scripts.c (revision 4862) @@ -121,10 +121,10 @@ { gpmi_module *module; - Message(PCB_MSG_DEFAULT, "Loading GPMI module %s with params %s...\n", module_name, params); + pcb_message(PCB_MSG_DEFAULT, "Loading GPMI module %s with params %s...\n", module_name, params); module = gpmi_mod_load(module_name, params); if (module == NULL) { - Message(PCB_MSG_DEFAULT, " Failed loading the script. Details:\n"); + pcb_message(PCB_MSG_DEFAULT, " Failed loading the script. Details:\n"); gpmi_err_stack_process_str(gpmi_hid_print_error); } gpmi_err_stack_destroy(NULL); @@ -309,19 +309,19 @@ int res; if (i->conffile_name == NULL) { - Message(PCB_MSG_DEFAULT, "gpmi_hid_script_remove(): can't remove script from configs, the script is not loaded from a config.\n"); + pcb_message(PCB_MSG_DEFAULT, "gpmi_hid_script_remove(): can't remove script from configs, the script is not loaded from a config.\n"); return -1; } fin = fopen(i->conffile_name, "r"); if (fin == NULL) { - Message(PCB_MSG_DEFAULT, "gpmi_hid_script_remove(): can't remove script from configs, can't open %s for read.\n", i->conffile_name); + pcb_message(PCB_MSG_DEFAULT, "gpmi_hid_script_remove(): can't remove script from configs, can't open %s for read.\n", i->conffile_name); return -1; } tmpfn = Concat(i->conffile_name, ".tmp", NULL); fout = fopen(tmpfn, "w"); if (fout == NULL) { - Message(PCB_MSG_DEFAULT, "gpmi_hid_script_remove(): can't remove script from configs, can't create %s.\n", tmpfn); + pcb_message(PCB_MSG_DEFAULT, "gpmi_hid_script_remove(): can't remove script from configs, can't create %s.\n", tmpfn); fclose(fin); free(tmpfn); return -1; @@ -333,13 +333,13 @@ fclose(fout); if (res < 1) { - Message(PCB_MSG_DEFAULT, "gpmi_hid_script_remove(): can't remove script from configs, can't find the correspondign config line in %s\n", i->conffile_name); + pcb_message(PCB_MSG_DEFAULT, "gpmi_hid_script_remove(): can't remove script from configs, can't find the correspondign config line in %s\n", i->conffile_name); free(tmpfn); return -1; } if (rename(tmpfn, i->conffile_name) != 0) { - Message(PCB_MSG_DEFAULT, "gpmi_hid_script_remove(): can't remove script from configs, can't move %s to %s.\n", tmpfn, i->conffile_name); + pcb_message(PCB_MSG_DEFAULT, "gpmi_hid_script_remove(): can't remove script from configs, can't move %s to %s.\n", tmpfn, i->conffile_name); free(tmpfn); return -1; } @@ -374,7 +374,7 @@ f = fopen(fn, "a"); if (f == NULL) { - Message(PCB_MSG_DEFAULT, "gpmi_hid_script_addcfg: can't open %s for write\n", fn); + pcb_message(PCB_MSG_DEFAULT, "gpmi_hid_script_addcfg: can't open %s for write\n", fn); return -1; } Index: trunk/src_plugins/hid_gtk/ghid-main-menu.c =================================================================== --- trunk/src_plugins/hid_gtk/ghid-main-menu.c (revision 4861) +++ trunk/src_plugins/hid_gtk/ghid-main-menu.c (revision 4862) @@ -171,7 +171,7 @@ } else { if ((update_on == NULL) || (*update_on != '\0')) /* warn if update_on is not explicitly empty */ - Message(PCB_MSG_WARNING, "Checkbox menu item not %s updated on any conf change - try to use the update_on field\n", checked); + pcb_message(PCB_MSG_WARNING, "Checkbox menu item not %s updated on any conf change - try to use the update_on field\n", checked); } } else if (label && strcmp(label, "false") == 0) { @@ -459,7 +459,7 @@ GtkAccelGroup *ghid_main_menu_get_accel_group(GHidMainMenu * menu) { if (menu == NULL) { - Message(PCB_MSG_DEFAULT, "ghid: can't initialize the menu - is your menu .lht valid?\n"); + pcb_message(PCB_MSG_DEFAULT, "ghid: can't initialize the menu - is your menu .lht valid?\n"); exit(1); } return menu->accel_group; Index: trunk/src_plugins/hid_gtk/ghid-propedit.c =================================================================== --- trunk/src_plugins/hid_gtk/ghid-propedit.c (revision 4861) +++ trunk/src_plugins/hid_gtk/ghid-propedit.c (revision 4862) @@ -270,10 +270,10 @@ gtk_entry_set_text(GTK_ENTRY(dlg->entry_val), val); /* keep relative values intact for a reapply */ } else - Message(PCB_MSG_WARNING, "Failed to change any object - %s is possibly invalid value for %s\n", val, prop); + pcb_message(PCB_MSG_WARNING, "Failed to change any object - %s is possibly invalid value for %s\n", val, prop); } else - Message(PCB_MSG_ERROR, "Internal error: no type for proeprty %s\n", prop); + pcb_message(PCB_MSG_ERROR, "Internal error: no type for proeprty %s\n", prop); free(val); g_free(prop); Index: trunk/src_plugins/hid_gtk/ghid-search.c =================================================================== --- trunk/src_plugins/hid_gtk/ghid-search.c (revision 4861) +++ trunk/src_plugins/hid_gtk/ghid-search.c (revision 4862) @@ -778,7 +778,7 @@ ver = hid_actionl("query", "version", NULL); if (ver < 0100) { sdlg.window = NULL; - Message(PCB_MSG_ERROR, "The query plugin is not avaialble, can not do advanced search.\n"); + pcb_message(PCB_MSG_ERROR, "The query plugin is not avaialble, can not do advanced search.\n"); return; } Index: trunk/src_plugins/hid_gtk/gtkhid-main.c =================================================================== --- trunk/src_plugins/hid_gtk/gtkhid-main.c (revision 4861) +++ trunk/src_plugins/hid_gtk/gtkhid-main.c (revision 4862) @@ -1230,7 +1230,7 @@ fmt = 0; } else { - Message(PCB_MSG_DEFAULT, "Error: no IO plugin avaialble for saving a buffer."); + pcb_message(PCB_MSG_DEFAULT, "Error: no IO plugin avaialble for saving a buffer."); return -1; } } @@ -1242,7 +1242,7 @@ fmt = 0; } else { - Message(PCB_MSG_DEFAULT, "Error: no IO plugin avaialble for saving a buffer."); + pcb_message(PCB_MSG_DEFAULT, "Error: no IO plugin avaialble for saving a buffer."); return -1; } } @@ -1804,7 +1804,7 @@ mode = atoi(argv[0]); else { mode = atoi(argv[1]); - Message(PCB_MSG_DEFAULT, _("The gtk gui currently ignores the optional first argument " + pcb_message(PCB_MSG_DEFAULT, _("The gtk gui currently ignores the optional first argument " "to the Pan action.\nFeel free to provide patches.\n")); } @@ -1843,7 +1843,7 @@ } if (!GTK_IS_MENU(menu)) { - Message(PCB_MSG_DEFAULT, _("The specified popup menu \"%s\" has not been defined.\n"), argv[0]); + pcb_message(PCB_MSG_DEFAULT, _("The specified popup menu \"%s\" has not been defined.\n"), argv[0]); return 1; } else { Index: trunk/src_plugins/hid_gtk/gui-config.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-config.c (revision 4861) +++ trunk/src_plugins/hid_gtk/gui-config.c (revision 4862) @@ -252,7 +252,7 @@ conf_fields_foreach(e) { if (strncmp(e->key, wildp, pl) == 0) { if (conf_replace_subtree(ctx->dst_role, e->key, ctx->src_role, e->key) != 0) - Message(PCB_MSG_DEFAULT, "Error: failed to save config item %s\n", *p); + pcb_message(PCB_MSG_DEFAULT, "Error: failed to save config item %s\n", *p); if (ctx->dst_role < CFR_max_real) { conf_update(e->key); need_update++; @@ -263,7 +263,7 @@ else { /* plain node */ if (conf_replace_subtree(ctx->dst_role, *p, ctx->src_role, *p) != 0) - Message(PCB_MSG_DEFAULT, "Error: failed to save config item %s\n", *p); + pcb_message(PCB_MSG_DEFAULT, "Error: failed to save config item %s\n", *p); if (ctx->dst_role < CFR_max_real) { conf_update(*p); need_update++; @@ -1334,11 +1334,11 @@ | solder-side and component-side must not be the only one in the group */ if (layer_groups.Number[soldergroup] <= 1 || layer_groups.Number[componentgroup] <= 1) { - Message(PCB_MSG_DEFAULT, _("Both 'solder side' or 'component side' layers must have at least\n" "\tone other layer in their group.\n")); + pcb_message(PCB_MSG_DEFAULT, _("Both 'solder side' or 'component side' layers must have at least\n" "\tone other layer in their group.\n")); return; } else if (soldergroup == componentgroup) { - Message(PCB_MSG_DEFAULT, _("The 'solder side' and 'component side' layers are not allowed\n" "\tto be in the same layer group #\n")); + pcb_message(PCB_MSG_DEFAULT, _("The 'solder side' and 'component side' layers are not allowed\n" "\tto be in the same layer group #\n")); return; } PCB->LayerGroups = layer_groups; @@ -2427,7 +2427,7 @@ FILE *f; f = fopen(try, "w"); if (f == NULL) { - Message(PCB_MSG_ERROR, "can not create config to project file: %s\n", try); + pcb_message(PCB_MSG_ERROR, "can not create config to project file: %s\n", try); return; } fclose(f); @@ -2533,7 +2533,7 @@ conf_role_t role = config_auto_get_edited_role(); if (nat->array_size > 1) { - Message(PCB_MSG_ERROR, "Can't create remove array %s\n", nat->hash_path); + pcb_message(PCB_MSG_ERROR, "Can't create remove array %s\n", nat->hash_path); return; } @@ -2718,13 +2718,13 @@ char *basename; e = sorted[n]; if (strlen(e->key) > sizeof(path)-1) { - Message(PCB_MSG_DEFAULT, "Warning: can't create config item for %s: path too long\n", e->key); + pcb_message(PCB_MSG_DEFAULT, "Warning: can't create config item for %s: path too long\n", e->key); continue; } strcpy(path, e->key); basename = strrchr(path, '/'); if ((basename == NULL) || (basename == path)) { - Message(PCB_MSG_DEFAULT, "Warning: can't create config item for %s: invalid path\n", e->key); + pcb_message(PCB_MSG_DEFAULT, "Warning: can't create config item for %s: invalid path\n", e->key); continue; } *basename = '\0'; Index: trunk/src_plugins/hid_gtk/gui-drc-window.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-drc-window.c (revision 4861) +++ trunk/src_plugins/hid_gtk/gui-drc-window.c (revision 4862) @@ -206,7 +206,7 @@ found_type = SearchObjectByID(PCB->Data, &ptr1, &ptr2, &ptr3, object_id, object_type); if (found_type == PCB_TYPE_NONE) { - Message(PCB_MSG_DEFAULT, _("Object ID %i identified during DRC was not found. Stale DRC window?\n"), object_id); + pcb_message(PCB_MSG_DEFAULT, _("Object ID %i identified during DRC was not found. Stale DRC window?\n"), object_id); continue; } AddObjectToFlagUndoList(object_type, ptr1, ptr2, ptr3); Index: trunk/src_plugins/hid_gtk/gui-netlist-window.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-netlist-window.c (revision 4861) +++ trunk/src_plugins/hid_gtk/gui-netlist-window.c (revision 4862) @@ -178,7 +178,7 @@ GtkTreeModel *model; if (menu == NULL) { - Message(PCB_MSG_DEFAULT, "Error: can't update netlist window: there is no netlist loaded.\n"); + pcb_message(PCB_MSG_DEFAULT, "Error: can't update netlist window: there is no netlist loaded.\n"); return; } Index: trunk/src_plugins/hid_gtk/gui-top-window.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-top-window.c (revision 4861) +++ trunk/src_plugins/hid_gtk/gui-top-window.c (revision 4862) @@ -1460,7 +1460,7 @@ key = gdk_keyval_from_name(desc); if (key > 0xffff) { - Message(PCB_MSG_DEFAULT, "Ignoring invalid/exotic key sym: '%s'\n", desc); + pcb_message(PCB_MSG_DEFAULT, "Ignoring invalid/exotic key sym: '%s'\n", desc); return 0; } return key; @@ -1674,7 +1674,7 @@ ghid_cfg = hid_cfg_load("gtk", 0, hid_gtk_menu_default); if (ghid_cfg == NULL) { - Message(PCB_MSG_DEFAULT, "FATAL: can't load the gtk menu res either from file or from hardwired default."); + pcb_message(PCB_MSG_DEFAULT, "FATAL: can't load the gtk menu res either from file or from hardwired default."); abort(); } @@ -1701,7 +1701,7 @@ mr = hid_cfg_get_menu(ghid_cfg, "/mouse"); if (hid_cfg_mouse_init(ghid_cfg, &ghid_mouse) != 0) - Message(PCB_MSG_DEFAULT, "Error: failed to load mouse actions from the hid config lihata - mouse input will not work."); + pcb_message(PCB_MSG_DEFAULT, "Error: failed to load mouse actions from the hid config lihata - mouse input will not work."); return menu_bar; } Index: trunk/src_plugins/hid_lesstif/main.c =================================================================== --- trunk/src_plugins/hid_lesstif/main.c (revision 4861) +++ trunk/src_plugins/hid_lesstif/main.c (revision 4862) @@ -1679,7 +1679,7 @@ key = XStringToKeysym(desc); if (key == NoSymbol && len > 1) { - Message(PCB_MSG_DEFAULT, "no symbol for %s\n", desc); + pcb_message(PCB_MSG_DEFAULT, "no symbol for %s\n", desc); return 0; } return key; Index: trunk/src_plugins/hid_lesstif/menu.c =================================================================== --- trunk/src_plugins/hid_lesstif/menu.c (revision 4861) +++ trunk/src_plugins/hid_lesstif/menu.c (revision 4862) @@ -930,7 +930,7 @@ lesstif_cfg = hid_cfg_load("lesstif", 0, lesstif_menu_default); if (lesstif_cfg == NULL) { - Message(PCB_MSG_DEFAULT, "FATAL: can't load the lesstif menu res either from file or from hardwired default."); + pcb_message(PCB_MSG_DEFAULT, "FATAL: can't load the lesstif menu res either from file or from hardwired default."); abort(); } Index: trunk/src_plugins/hid_remote/remote.c =================================================================== --- trunk/src_plugins/hid_remote/remote.c (revision 4861) +++ trunk/src_plugins/hid_remote/remote.c (revision 4862) @@ -140,7 +140,7 @@ int gci = proto_send_make_gc(); int max = sizeof(remote_gc) / sizeof(remote_gc[0]); if (gci >= max) { - Message(PCB_MSG_ERROR, "remote_make_gc(): GC index too high: %d >= %d\n", gci, max); + pcb_message(PCB_MSG_ERROR, "remote_make_gc(): GC index too high: %d >= %d\n", gci, max); proto_send_del_gc(gci); return NULL; } @@ -154,7 +154,7 @@ int max = sizeof(remote_gc) / sizeof(remote_gc[0]); if ((idx < 0) || (idx >= max)) { - Message(PCB_MSG_ERROR, "GC index too high: %d >= %d\n", idx, max); + pcb_message(PCB_MSG_ERROR, "GC index too high: %d >= %d\n", idx, max); return -1; } return idx; @@ -173,7 +173,7 @@ if ((mask >= 0) && (mask < sizeof(mask_names) / sizeof(mask_names[0]))) proto_send_use_mask(mask_names[mask]); else - Message(PCB_MSG_ERROR, "Invalid use_mask %d\n", mask); + pcb_message(PCB_MSG_ERROR, "Invalid use_mask %d\n", mask); } static void remote_set_color(pcb_hid_gc_t gc, const char *name) @@ -196,7 +196,7 @@ if (style >= max) { - Message(PCB_MSG_ERROR, "can't set invalid cap style: %d >= %d\n", style, max); + pcb_message(PCB_MSG_ERROR, "can't set invalid cap style: %d >= %d\n", style, max); return; } if (idx >= 0) { Index: trunk/src_plugins/import_dsn/dsn.c =================================================================== --- trunk/src_plugins/import_dsn/dsn.c (revision 4861) +++ trunk/src_plugins/import_dsn/dsn.c (revision 4862) @@ -118,7 +118,7 @@ lineclear = PCB->RouteStyle.array[0].Clearance * 2; fp = fopen(fname, "r"); if (!fp) { - Message(PCB_MSG_ERROR, "Can't load dsn file %s for read\n", fname); + pcb_message(PCB_MSG_ERROR, "Can't load dsn file %s for read\n", fname); return 1; } while (fgets(str, sizeof(str), fp) != NULL) { Index: trunk/src_plugins/import_edif/edif.c =================================================================== --- trunk/src_plugins/import_edif/edif.c (revision 4861) +++ trunk/src_plugins/import_edif/edif.c (revision 4862) @@ -6241,7 +6241,7 @@ int ReadEdifNetlist(char *filename) { - Message(PCB_MSG_INFO, _("Importing edif netlist %s\n"), filename); + pcb_message(PCB_MSG_INFO, _("Importing edif netlist %s\n"), filename); ParseEDIF(filename, NULL); return 0; Index: trunk/src_plugins/import_edif/edif.y =================================================================== --- trunk/src_plugins/import_edif/edif.y (revision 4861) +++ trunk/src_plugins/import_edif/edif.y (revision 4862) @@ -4451,7 +4451,7 @@ int ReadEdifNetlist(char *filename) { - Message(PCB_MSG_INFO, _("Importing edif netlist %s\n"), filename); + pcb_message(PCB_MSG_INFO, _("Importing edif netlist %s\n"), filename); ParseEDIF(filename, NULL); return 0; Index: trunk/src_plugins/import_netlist/import_netlist.c =================================================================== --- trunk/src_plugins/import_netlist/import_netlist.c (revision 4861) +++ trunk/src_plugins/import_netlist/import_netlist.c (revision 4862) @@ -62,12 +62,12 @@ if (!filename) return (1); /* nothing to do */ - Message(PCB_MSG_DEFAULT, _("Importing PCB netlist %s\n"), filename); + pcb_message(PCB_MSG_DEFAULT, _("Importing PCB netlist %s\n"), filename); if (EMPTY_STRING_P(conf_core.rc.rat_command)) { fp = fopen(filename, "r"); if (!fp) { - Message(PCB_MSG_DEFAULT, "Cannot open %s for reading", filename); + pcb_message(PCB_MSG_DEFAULT, "Cannot open %s for reading", filename); return 1; } } @@ -81,7 +81,7 @@ /* open pipe to stdout of command */ if (*command == '\0' || (fp = popen(command, "r")) == NULL) { - PopenErrorMessage(command); + PopenErrorpcb_message(command); free(command); return (1); } @@ -98,7 +98,7 @@ /* check for maximum length line */ if (len) { if (inputline[--len] != '\n') - Message(PCB_MSG_DEFAULT, _("Line length (%i) exceeded in netlist file.\n" + pcb_message(PCB_MSG_DEFAULT, _("Line length (%i) exceeded in netlist file.\n" "additional characters will be ignored.\n"), MAX_NETLIST_LINE_LENGTH); else inputline[len] = '\0'; @@ -145,7 +145,7 @@ kind = 0; } if (!lines) { - Message(PCB_MSG_DEFAULT, _("Empty netlist file!\n")); + pcb_message(PCB_MSG_DEFAULT, _("Empty netlist file!\n")); pclose(fp); return (1); } Index: trunk/src_plugins/import_sch/import_sch.c =================================================================== --- trunk/src_plugins/import_sch/import_sch.c (revision 4861) +++ trunk/src_plugins/import_sch/import_sch.c (revision 4862) @@ -230,7 +230,7 @@ y = GetValue(ys, units, NULL, NULL); } else { - Message(PCB_MSG_DEFAULT, _("Bad syntax for Import(setnewpoint)")); + pcb_message(PCB_MSG_DEFAULT, _("Bad syntax for Import(setnewpoint)")); return 1; } @@ -311,12 +311,12 @@ int i; if (tmpfile == NULL) { - Message(PCB_MSG_ERROR, _("Could not create temp file")); + pcb_message(PCB_MSG_ERROR, _("Could not create temp file")); return 1; } if ((conf_import_sch.plugins.import_sch.gnetlist_program == NULL) || (*conf_import_sch.plugins.import_sch.gnetlist_program == '\0')) { - Message(PCB_MSG_ERROR, _("No gnetlist program configured, can not import. Please fill in configuration setting plugins/import_sch/gnetlist_program\n")); + pcb_message(PCB_MSG_ERROR, _("No gnetlist program configured, can not import. Please fill in configuration setting plugins/import_sch/gnetlist_program\n")); return 1; } @@ -371,7 +371,7 @@ user_target = user_outfile; if ((conf_import_sch.plugins.import_sch.make_program == NULL) || (*conf_import_sch.plugins.import_sch.make_program == '\0')) { - Message(PCB_MSG_ERROR, _("No make program configured, can not import. Please fill in configuration setting plugins/import_sch/make_program\n")); + pcb_message(PCB_MSG_ERROR, _("No make program configured, can not import. Please fill in configuration setting plugins/import_sch/make_program\n")); return 1; } @@ -380,7 +380,7 @@ else { tmpfile = pcb_tempfile_name_new("gnetlist_output"); if (tmpfile == NULL) { - Message(PCB_MSG_ERROR, _("Could not create temp file")); + pcb_message(PCB_MSG_ERROR, _("Could not create temp file")); return 1; } must_free_tmpfile = 1; @@ -430,7 +430,7 @@ pcb_tempfile_unlink(tmpfile); } else { - Message(PCB_MSG_DEFAULT, _("Unknown import mode: %s\n"), mode); + pcb_message(PCB_MSG_DEFAULT, _("Unknown import mode: %s\n"), mode); return 1; } Index: trunk/src_plugins/io_kicad/read.c =================================================================== --- trunk/src_plugins/io_kicad/read.c (revision 4861) +++ trunk/src_plugins/io_kicad/read.c (revision 4862) @@ -925,7 +925,7 @@ pcb_printf("\tlayer #%d layer label found:\t%s\n", i, lname); pcb_printf("\tlayer #%d layer description/type found:\t%s\n", i, ltype); if (kicad_create_layer(st, lnum, lname, ltype) < 0) { - Message(PCB_MSG_ERROR, "Unrecognized layer: %d, %s, %s\n", lnum, lname, ltype); + pcb_message(PCB_MSG_ERROR, "Unrecognized layer: %d, %s, %s\n", lnum, lname, ltype); return -1; } } else { @@ -947,7 +947,7 @@ */ if (res != 0) { - Message(PCB_MSG_ERROR, "Internal error: can't find a silk or mask layer\n"); + pcb_message(PCB_MSG_ERROR, "Internal error: can't find a silk or mask layer\n"); return -1; } Index: trunk/src_plugins/io_lihata/read.c =================================================================== --- trunk/src_plugins/io_lihata/read.c (revision 4861) +++ trunk/src_plugins/io_lihata/read.c (revision 4862) @@ -93,7 +93,7 @@ tmp = GetValueEx(nd->data.text.value, NULL, NULL, NULL, NULL, &success); if (!success) { - Message(PCB_MSG_ERROR, "#LHT1 Invalid coord value: '%s'\n", nd->data.text.value); + pcb_message(PCB_MSG_ERROR, "#LHT1 Invalid coord value: '%s'\n", nd->data.text.value); return -1; } @@ -108,13 +108,13 @@ pcb_bool success; if ((nd == NULL) || (nd->type != LHT_TEXT)) { - Message(PCB_MSG_ERROR, "#LHT2 Invalid angle type: '%d'\n", nd->type); + pcb_message(PCB_MSG_ERROR, "#LHT2 Invalid angle type: '%d'\n", nd->type); return -1; } tmp = GetValueEx(nd->data.text.value, NULL, NULL, NULL, NULL, &success); if (!success) { - Message(PCB_MSG_ERROR, "#LHT3 Invalid angle value: '%s'\n", nd->data.text.value); + pcb_message(PCB_MSG_ERROR, "#LHT3 Invalid angle value: '%s'\n", nd->data.text.value); return -1; } @@ -133,7 +133,7 @@ return -1; if (nd->type != LHT_TEXT) { - Message(PCB_MSG_ERROR, "#LHT4 Invalid int type: '%d'\n", nd->type); + pcb_message(PCB_MSG_ERROR, "#LHT4 Invalid int type: '%d'\n", nd->type); return -1; } @@ -141,7 +141,7 @@ base = 16; tmp = strtol(nd->data.text.value, &end, base); if (*end != '\0') { - Message(PCB_MSG_ERROR, "#LHT5 Invalid int value: '%s'\n", nd->data.text.value); + pcb_message(PCB_MSG_ERROR, "#LHT5 Invalid int value: '%s'\n", nd->data.text.value); return -1; } @@ -159,7 +159,7 @@ return -1; if (nd->type != LHT_TEXT) { - Message(PCB_MSG_ERROR, "#LHT8 Invalid double type: '%d'\n", nd->type); + pcb_message(PCB_MSG_ERROR, "#LHT8 Invalid double type: '%d'\n", nd->type); return -1; } @@ -166,7 +166,7 @@ tmp = strtod(nd->data.text.value, &end); if (*end != '\0') { - Message(PCB_MSG_ERROR, "#LHT9 Invalid double value: '%s'\n", nd->data.text.value); + pcb_message(PCB_MSG_ERROR, "#LHT9 Invalid double value: '%s'\n", nd->data.text.value); return -1; } @@ -186,7 +186,7 @@ tmp = strtol(nd->name + prefix_len, &end, 10); if (*end != '\0') { - Message(PCB_MSG_ERROR, "#LHT6 Invalid id value: '%s' in line %d\n", nd->data.text.value, nd->line); + pcb_message(PCB_MSG_ERROR, "#LHT6 Invalid id value: '%s' in line %d\n", nd->data.text.value, nd->line); return -1; } @@ -215,7 +215,7 @@ return 0; } - Message(PCB_MSG_ERROR, "#LHT7 Invalid bool value: '%s'\n", nd->data.text.value); + pcb_message(PCB_MSG_ERROR, "#LHT7 Invalid bool value: '%s'\n", nd->data.text.value); return -1; } @@ -286,7 +286,7 @@ if (n->type == LHT_TEXT) { int layer = pcb_layer_by_name(n->name); if (layer < 0) { - Message(PCB_MSG_ERROR, "#LHT10 Invalid layer name in thermal: '%s'\n", n->name); + pcb_message(PCB_MSG_ERROR, "#LHT10 Invalid layer name in thermal: '%s'\n", n->name); return -1; } ASSIGN_THERM(layer, io_lihata_resolve_thermal_style(n->data.text.value), &fh); @@ -791,7 +791,7 @@ char *end; chr = strtol(sym->name+1, &end, 16); if (*end != '\0') { - Message(PCB_MSG_ERROR, "Ignoring invalid symbol name '%s'.\n", sym->name); + pcb_message(PCB_MSG_ERROR, "Ignoring invalid symbol name '%s'.\n", sym->name); continue; } } @@ -830,7 +830,7 @@ /* safe copy the name */ if (name_len > sizeof(s->name)-1) { - Message(PCB_MSG_WARNING, "Route style name too long: '%s' (should be less than %d characters)\n", stn->name, sizeof(s->name)-1); + pcb_message(PCB_MSG_WARNING, "Route style name too long: '%s' (should be less than %d characters)\n", stn->name, sizeof(s->name)-1); memcpy(s->name, stn->name, sizeof(s->name)-2); s->name[sizeof(s->name)-1] = '\0'; } @@ -945,7 +945,7 @@ lht_node_t *sub; if ((nd->type != LHT_HASH) || (strcmp(nd->name, "pcb-rnd-board-v1"))) { - Message(PCB_MSG_DEFAULT, "Not a board lihata.\n"); + pcb_message(PCB_MSG_DEFAULT, "Not a board lihata.\n"); return -1; } @@ -999,7 +999,7 @@ lht_doc_t *doc = lht_dom_load(Filename, &errmsg); if (doc == NULL) { -/* Message(PCB_MSG_DEFAULT, "Error loading '%s': %s\n", Filename, errmsg);*/ +/* pcb_message(PCB_MSG_DEFAULT, "Error loading '%s': %s\n", Filename, errmsg);*/ return -1; } Index: trunk/src_plugins/io_pcb/parse_l.c =================================================================== --- trunk/src_plugins/io_pcb/parse_l.c (revision 4861) +++ trunk/src_plugins/io_pcb/parse_l.c (revision 4862) @@ -2401,7 +2401,7 @@ /* open pipe to stdout of command */ if (*command == '\0' || (pcb_in = popen(command, "r")) == NULL) { - PopenErrorMessage(command); + PopenErrorpcb_message(command); free(command); return(1); } @@ -2586,7 +2586,7 @@ r = Parse(NULL, conf_core.rc.font_command, NULL, Filename); if (r == 0) { #ifdef DEBUG - Message (PCB_MSG_DEBUG, "Found %s in %s\n", Filename, conf_core.rc.font_command); + pcb_message(PCB_MSG_DEBUG, "Found %s in %s\n", Filename, conf_core.rc.font_command); #endif } return r; Index: trunk/src_plugins/io_pcb/parse_l.l =================================================================== --- trunk/src_plugins/io_pcb/parse_l.l (revision 4861) +++ trunk/src_plugins/io_pcb/parse_l.l (revision 4862) @@ -260,7 +260,7 @@ /* open pipe to stdout of command */ if (*command == '\0' || (yyin = popen(command, "r")) == NULL) { - PopenErrorMessage(command); + PopenErrorpcb_message(command); free(command); return(1); } @@ -445,7 +445,7 @@ r = Parse(NULL, conf_core.rc.font_command, NULL, Filename); if (r == 0) { #ifdef DEBUG - Message (PCB_MSG_DEBUG, "Found %s in %s\n", Filename, conf_core.rc.font_command); + pcb_message(PCB_MSG_DEBUG, "Found %s in %s\n", Filename, conf_core.rc.font_command); #endif } return r; Index: trunk/src_plugins/io_pcb/parse_y.c =================================================================== --- trunk/src_plugins/io_pcb/parse_y.c (revision 4861) +++ trunk/src_plugins/io_pcb/parse_y.c (revision 4862) @@ -1795,7 +1795,7 @@ if (!yyPCB) { - Message(PCB_MSG_ERROR, "illegal fileformat\n"); + pcb_message(PCB_MSG_ERROR, "illegal fileformat\n"); YYABORT; } for (i = 0; i < MAX_LAYER + 2; i++) @@ -1819,7 +1819,7 @@ pcb_board_new_postproc(yyPCB, 0); if (ParseGroupString(layer_group_string, &yyPCB->LayerGroups, yyData->LayerN)) { - Message(PCB_MSG_ERROR, "illegal layer-group string\n"); + pcb_message(PCB_MSG_ERROR, "illegal layer-group string\n"); YYABORT; } /* initialize the polygon clipping now since @@ -1864,7 +1864,7 @@ if (!yyData || !yyFont) { - Message(PCB_MSG_ERROR, "illegal fileformat\n"); + pcb_message(PCB_MSG_ERROR, "illegal fileformat\n"); YYABORT; } for (i = 0; i < MAX_LAYER + 2; i++) @@ -1882,7 +1882,7 @@ if (!yyFont) { - Message(PCB_MSG_ERROR, "illegal fileformat\n"); + pcb_message(PCB_MSG_ERROR, "illegal fileformat\n"); YYABORT; } yyFont->Valid = pcb_false; @@ -2088,7 +2088,7 @@ { if (ParseRouteString((yyvsp[-1].string), &yyPCB->RouteStyle, "mil")) { - Message(PCB_MSG_ERROR, "illegal route-style string\n"); + pcb_message(PCB_MSG_ERROR, "illegal route-style string\n"); YYABORT; } free((yyvsp[-1].string)); @@ -2101,7 +2101,7 @@ { if (ParseRouteString(((yyvsp[-1].string) == NULL ? "" : (yyvsp[-1].string)), &yyPCB->RouteStyle, "cmil")) { - Message(PCB_MSG_ERROR, "illegal route-style string\n"); + pcb_message(PCB_MSG_ERROR, "illegal route-style string\n"); YYABORT; } free((yyvsp[-1].string)); @@ -2386,7 +2386,7 @@ if (bad_contour_found) { - Message(PCB_MSG_WARNING, "WARNING parsing file '%s'\n" + pcb_message(PCB_MSG_WARNING, "WARNING parsing file '%s'\n" " line: %i\n" " description: 'ignored polygon (< 3 points in a contour)'\n", yyfilename, pcb_lineno); @@ -3189,7 +3189,7 @@ */ int yyerror(const char * s) { - Message(PCB_MSG_ERROR, "ERROR parsing file '%s'\n" + pcb_message(PCB_MSG_ERROR, "ERROR parsing file '%s'\n" " line: %i\n" " description: '%s'\n", yyfilename, pcb_lineno, s); @@ -3205,7 +3205,7 @@ check_file_version (int ver) { if ( ver > PCB_FILE_VERSION ) { - Message (PCB_MSG_DEFAULT, "ERROR: The file you are attempting to load is in a format\n" + pcb_message(PCB_MSG_DEFAULT, "ERROR: The file you are attempting to load is in a format\n" "which is too new for this version of pcb. To load this file\n" "you need a version of pcb which is >= %d. If you are\n" "using a version built from git source, the source date\n" Index: trunk/src_plugins/io_pcb/parse_y.y =================================================================== --- trunk/src_plugins/io_pcb/parse_y.y (revision 4861) +++ trunk/src_plugins/io_pcb/parse_y.y (revision 4862) @@ -169,7 +169,7 @@ if (!yyPCB) { - Message(PCB_MSG_ERROR, "illegal fileformat\n"); + pcb_message(PCB_MSG_ERROR, "illegal fileformat\n"); YYABORT; } for (i = 0; i < MAX_LAYER + 2; i++) @@ -202,7 +202,7 @@ pcb_board_new_postproc(yyPCB, 0); if (ParseGroupString(layer_group_string, &yyPCB->LayerGroups, yyData->LayerN)) { - Message(PCB_MSG_ERROR, "illegal layer-group string\n"); + pcb_message(PCB_MSG_ERROR, "illegal layer-group string\n"); YYABORT; } /* initialize the polygon clipping now since @@ -237,7 +237,7 @@ if (!yyData || !yyFont) { - Message(PCB_MSG_ERROR, "illegal fileformat\n"); + pcb_message(PCB_MSG_ERROR, "illegal fileformat\n"); YYABORT; } for (i = 0; i < MAX_LAYER + 2; i++) @@ -260,7 +260,7 @@ if (!yyFont) { - Message(PCB_MSG_ERROR, "illegal fileformat\n"); + pcb_message(PCB_MSG_ERROR, "illegal fileformat\n"); YYABORT; } yyFont->Valid = pcb_false; @@ -662,7 +662,7 @@ { if (ParseRouteString($3, &yyPCB->RouteStyle, "mil")) { - Message(PCB_MSG_ERROR, "illegal route-style string\n"); + pcb_message(PCB_MSG_ERROR, "illegal route-style string\n"); YYABORT; } free($3); @@ -671,7 +671,7 @@ { if (ParseRouteString(($3 == NULL ? "" : $3), &yyPCB->RouteStyle, "cmil")) { - Message(PCB_MSG_ERROR, "illegal route-style string\n"); + pcb_message(PCB_MSG_ERROR, "illegal route-style string\n"); YYABORT; } free($3); @@ -1164,7 +1164,7 @@ if (bad_contour_found) { - Message(PCB_MSG_WARNING, "WARNING parsing file '%s'\n" + pcb_message(PCB_MSG_WARNING, "WARNING parsing file '%s'\n" " line: %i\n" " description: 'ignored polygon (< 3 points in a contour)'\n", yyfilename, pcb_lineno); @@ -2011,7 +2011,7 @@ */ int yyerror(const char * s) { - Message(PCB_MSG_ERROR, "ERROR parsing file '%s'\n" + pcb_message(PCB_MSG_ERROR, "ERROR parsing file '%s'\n" " line: %i\n" " description: '%s'\n", yyfilename, pcb_lineno, s); @@ -2027,7 +2027,7 @@ check_file_version (int ver) { if ( ver > PCB_FILE_VERSION ) { - Message (PCB_MSG_DEFAULT, "ERROR: The file you are attempting to load is in a format\n" + pcb_message(PCB_MSG_DEFAULT, "ERROR: The file you are attempting to load is in a format\n" "which is too new for this version of pcb. To load this file\n" "you need a version of pcb which is >= %d. If you are\n" "using a version built from git source, the source date\n" Index: trunk/src_plugins/jostle/jostle.c =================================================================== --- trunk/src_plugins/jostle/jostle.c (revision 4861) +++ trunk/src_plugins/jostle/jostle.c (revision 4862) @@ -226,7 +226,7 @@ minmax = 1; break; default: - Message(PCB_MSG_ERROR, "jostle: aiee, what side?"); + pcb_message(PCB_MSG_ERROR, "jostle: aiee, what side?"); return; } v = &a->contours->head; @@ -505,7 +505,7 @@ pcb_bool succ; value = GetValue(ARG(0), ARG(1), &rel, &succ); if (!succ) { - Message(PCB_MSG_ERROR, "Failed to convert size\n"); + pcb_message(PCB_MSG_ERROR, "Failed to convert size\n"); return -1; } } Index: trunk/src_plugins/lib_legacy_func/lib_legacy_func.c =================================================================== --- trunk/src_plugins/lib_legacy_func/lib_legacy_func.c (revision 4861) +++ trunk/src_plugins/lib_legacy_func/lib_legacy_func.c (revision 4862) @@ -77,7 +77,7 @@ } /* couldn't be expanded by the shell */ - PopenErrorMessage(command); + PopenErrorpcb_message(command); free(command); gds_uninit(&answer); return NULL; Index: trunk/src_plugins/oldactions/oldactions.c =================================================================== --- trunk/src_plugins/oldactions/oldactions.c (revision 4861) +++ trunk/src_plugins/oldactions/oldactions.c (revision 4862) @@ -40,11 +40,11 @@ { conf_native_t *n = conf_get_field(path); if (n == NULL) { - Message(PCB_MSG_DEFAULT, "Error: can't find config node %s to toggle\n", path); + pcb_message(PCB_MSG_DEFAULT, "Error: can't find config node %s to toggle\n", path); return; } if (n->type != CFN_BOOLEAN) { - Message(PCB_MSG_DEFAULT, "Error: config node %s is not a boolean, can't toggle\n", path); + pcb_message(PCB_MSG_DEFAULT, "Error: config node %s is not a boolean, can't toggle\n", path); return; } Index: trunk/src_plugins/polystitch/polystitch.c =================================================================== --- trunk/src_plugins/polystitch/polystitch.c (revision 4861) +++ trunk/src_plugins/polystitch/polystitch.c (revision 4862) @@ -102,7 +102,7 @@ } ENDALL_LOOP; if (!inner_poly) { - Message(PCB_MSG_ERROR, "Cannot find any polygons"); + pcb_message(PCB_MSG_ERROR, "Cannot find any polygons"); return; } } @@ -127,7 +127,7 @@ } } END_LOOP; - Message(PCB_MSG_ERROR, "Cannot find a polygon enclosing the one you selected"); + pcb_message(PCB_MSG_ERROR, "Cannot find a polygon enclosing the one you selected"); } static void check_windings() Index: trunk/src_plugins/propedit/propedit.c =================================================================== --- trunk/src_plugins/propedit/propedit.c (revision 4861) +++ trunk/src_plugins/propedit/propedit.c (revision 4862) @@ -40,7 +40,7 @@ htsp_entry_t *pe; if ((gui == NULL) || (gui->propedit_start == NULL)) { - Message(PCB_MSG_DEFAULT, "Error: there's no GUI or the active GUI can't edit properties.\n"); + pcb_message(PCB_MSG_DEFAULT, "Error: there's no GUI or the active GUI can't edit properties.\n"); return 1; } Index: trunk/src_plugins/query/query_act.c =================================================================== --- trunk/src_plugins/query/query_act.c (revision 4861) +++ trunk/src_plugins/query/query_act.c (revision 4862) @@ -96,7 +96,7 @@ qry_parse(&prg); if (prg == NULL) { - Message(PCB_MSG_ERROR, "Compilation error.\n"); + pcb_message(PCB_MSG_ERROR, "Compilation error.\n"); return -1; } Index: trunk/src_plugins/query/query_exec.c =================================================================== --- trunk/src_plugins/query/query_exec.c (revision 4861) +++ trunk/src_plugins/query/query_exec.c (revision 4862) @@ -440,7 +440,7 @@ return -1; if (farg != NULL) { - Message(PCB_MSG_ERROR, "too many function arguments\n"); + pcb_message(PCB_MSG_ERROR, "too many function arguments\n"); return -1; } printf("CALL n=%d\n", n); Index: trunk/src_plugins/renumber/renumber.c =================================================================== --- trunk/src_plugins/renumber/renumber.c (revision 4861) +++ trunk/src_plugins/renumber/renumber.c (revision 4862) @@ -110,7 +110,7 @@ } if ((out = fopen(name, "w")) == NULL) { - Message(PCB_MSG_DEFAULT, _("Could not open %s\n"), name); + pcb_message(PCB_MSG_DEFAULT, _("Could not open %s\n"), name); if (free_name && name) free((char*)name); return 1; Index: trunk/src_plugins/renumber/renumberblock.c =================================================================== --- trunk/src_plugins/renumber/renumberblock.c (revision 4861) +++ trunk/src_plugins/renumber/renumberblock.c (revision 4862) @@ -40,7 +40,7 @@ int old_base, new_base; if (argc < 2) { - Message(PCB_MSG_ERROR, "Usage: RenumberBlock oldnum newnum"); + pcb_message(PCB_MSG_ERROR, "Usage: RenumberBlock oldnum newnum"); return 1; } @@ -85,7 +85,7 @@ int old_base, new_base; if (argc < 2) { - Message(PCB_MSG_ERROR, "Usage: RenumberBuffer oldnum newnum"); + pcb_message(PCB_MSG_ERROR, "Usage: RenumberBuffer oldnum newnum"); return 1; } Index: trunk/src_plugins/report/report.c =================================================================== --- trunk/src_plugins/report/report.c (revision 4861) +++ trunk/src_plugins/report/report.c (revision 4862) @@ -62,7 +62,7 @@ conf_report_t conf_report; -#define AUSAGE(x) Message (PCB_MSG_INFO, "Usage:\n%s\n", (x##_syntax)) +#define AUSAGE(x) pcb_message(PCB_MSG_INFO, "Usage:\n%s\n", (x##_syntax)) #define USER_UNITMASK (conf_core.editor.grid_unit->allow) static int ReportDrills(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) @@ -460,7 +460,7 @@ } if ((report == NULL) || (report == '\0')) { - Message(PCB_MSG_DEFAULT, _("Nothing found to report on\n")); + pcb_message(PCB_MSG_DEFAULT, _("Nothing found to report on\n")); return 1; } @@ -746,7 +746,7 @@ if (use_re) { regex = re_sei_comp(tofind); if (re_sei_errno(regex) != 0) { - Message(PCB_MSG_DEFAULT, _("regexp error: %s\n"), re_error_str(re_sei_errno(regex))); + pcb_message(PCB_MSG_DEFAULT, _("regexp error: %s\n"), re_error_str(re_sei_errno(regex))); re_sei_free(regex); return (1); } Index: trunk/src_plugins/shand_cmd/command.c =================================================================== --- trunk/src_plugins/shand_cmd/command.c (revision 4861) +++ trunk/src_plugins/shand_cmd/command.c (revision 4862) @@ -78,7 +78,7 @@ static int CommandHelp(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - Message(PCB_MSG_DEFAULT, "following commands are supported:\n" + pcb_message(PCB_MSG_DEFAULT, "following commands are supported:\n" " Command() execute an action command (too numerous to list)\n" " see the manual for the list of action commands\n" " h display this help message\n" @@ -122,7 +122,7 @@ break; default: /* usage */ - Message(PCB_MSG_DEFAULT, "Usage: l [name]\n loads layout data\n"); + pcb_message(PCB_MSG_DEFAULT, "Usage: l [name]\n loads layout data\n"); return (1); } @@ -158,7 +158,7 @@ break; default: /* usage */ - Message(PCB_MSG_DEFAULT, pcb_false, "Usage: le [name]\n loads element data to buffer\n"); + pcb_message(PCB_MSG_DEFAULT, pcb_false, "Usage: le [name]\n loads element data to buffer\n"); return (1); } return (0); @@ -194,7 +194,7 @@ break; default: /* usage */ - Message(PCB_MSG_DEFAULT, "Usage: m [name]\n loads layout data to buffer\n"); + pcb_message(PCB_MSG_DEFAULT, "Usage: m [name]\n loads layout data to buffer\n"); return (1); } return (0); @@ -271,7 +271,7 @@ break; default: /* usage */ - Message(PCB_MSG_DEFAULT, "Usage: rn [name]\n reads in a netlist file\n"); + pcb_message(PCB_MSG_DEFAULT, "Usage: rn [name]\n reads in a netlist file\n"); return (1); } if (PCB->Netlistname) @@ -320,7 +320,7 @@ SetChangedFlag(pcb_false); } else - Message(PCB_MSG_DEFAULT, "No filename to save to yet\n"); + pcb_message(PCB_MSG_DEFAULT, "No filename to save to yet\n"); break; case 1: @@ -334,7 +334,7 @@ break; default: - Message(PCB_MSG_DEFAULT, "Usage: s [name] | w [name]\n saves layout data\n"); + pcb_message(PCB_MSG_DEFAULT, "Usage: s [name] | w [name]\n saves layout data\n"); return (1); } return (0); Index: trunk/src_plugins/smartdisperse/smartdisperse.c =================================================================== --- trunk/src_plugins/smartdisperse/smartdisperse.c (revision 4861) +++ trunk/src_plugins/smartdisperse/smartdisperse.c (revision 4862) @@ -161,7 +161,7 @@ Nets = ProcNetlist(&PCB->NetlistLib[0]); if (!Nets) { - Message(PCB_MSG_ERROR, _("Can't use SmartDisperse because no netlist is loaded.\n")); + pcb_message(PCB_MSG_ERROR, _("Can't use SmartDisperse because no netlist is loaded.\n")); return 0; } Index: trunk/src_plugins/stroke/stroke.c =================================================================== --- trunk/src_plugins/stroke/stroke.c (revision 4861) +++ trunk/src_plugins/stroke/stroke.c (revision 4862) @@ -132,7 +132,7 @@ } default: - Message(PCB_MSG_DEFAULT, _("Unknown stroke %s\n"), msg); + pcb_message(PCB_MSG_DEFAULT, _("Unknown stroke %s\n"), msg); break; } } Index: trunk/src_plugins/toporouter/toporouter.c =================================================================== --- trunk/src_plugins/toporouter/toporouter.c (revision 4861) +++ trunk/src_plugins/toporouter/toporouter.c (revision 4862) @@ -1207,7 +1207,7 @@ usecs += 1000; } - Message(PCB_MSG_DEFAULT, _("Elapsed time: %d.%02d seconds\n"), secs, usecs); + pcb_message(PCB_MSG_DEFAULT, _("Elapsed time: %d.%02d seconds\n"), secs, usecs); free(r->layers); free(r); @@ -6967,8 +6967,8 @@ i = i->next; } - Message(PCB_MSG_DEFAULT, _("Reticulating splines... successful\n\n")); - Message(PCB_MSG_DEFAULT, _("Wiring cost: %f inches\n"), r->wiring_score / 1000.); + pcb_message(PCB_MSG_DEFAULT, _("Reticulating splines... successful\n\n")); + pcb_message(PCB_MSG_DEFAULT, _("Wiring cost: %f inches\n"), r->wiring_score / 1000.); printf("Wiring cost: %f inches\n", r->wiring_score / 1000.); g_list_free(oproutes); @@ -7769,7 +7769,7 @@ guint j; gint pfailcount = failcount + 1; - Message(PCB_MSG_DEFAULT, _("ROAR router: ")); + pcb_message(PCB_MSG_DEFAULT, _("ROAR router: ")); for (j = 0; j < 6; j++) { GList *failed = g_list_copy(r->failednets), *k = failed; @@ -7783,10 +7783,10 @@ printf("\tROAR pass %d - %d routed - %d failed\n", j, g_list_length(r->routednets), g_list_length(r->failednets)); if (!failcount || failcount >= pfailcount) { - Message(PCB_MSG_DEFAULT, _("%d nets remaining\n"), failcount); + pcb_message(PCB_MSG_DEFAULT, _("%d nets remaining\n"), failcount); break; } - Message(PCB_MSG_DEFAULT, _("%d -> "), failcount); + pcb_message(PCB_MSG_DEFAULT, _("%d -> "), failcount); pfailcount = failcount; } @@ -7967,7 +7967,7 @@ r->flags |= TOPOROUTER_FLAG_AFTERRUBIX; failcount = rubix_router(r, failcount); - Message(PCB_MSG_DEFAULT, _("RUBIX router: %d nets remaining\n"), failcount); + pcb_message(PCB_MSG_DEFAULT, _("RUBIX router: %d nets remaining\n"), failcount); printf("RUBIX router: %d nets remaining\n", failcount); r->flags |= TOPOROUTER_FLAG_GOFAR; @@ -8055,10 +8055,10 @@ gts_predicates_init(); - Message(PCB_MSG_DEFAULT, _("Topological Autorouter\n")); - Message(PCB_MSG_DEFAULT, _("Started %s"), asctime(localtime(<ime))); - Message(PCB_MSG_DEFAULT, _("-------------------------------------\n")); - Message(PCB_MSG_DEFAULT, _("Copyright 2009 Anthony Blake (tonyb33@gmail.com)\n\n")); + pcb_message(PCB_MSG_DEFAULT, _("Topological Autorouter\n")); + pcb_message(PCB_MSG_DEFAULT, _("Started %s"), asctime(localtime(<ime))); + pcb_message(PCB_MSG_DEFAULT, _("-------------------------------------\n")); + pcb_message(PCB_MSG_DEFAULT, _("Copyright 2009 Anthony Blake (tonyb33@gmail.com)\n\n")); return r; } Index: trunk/src_plugins/vendordrill/vendor.c =================================================================== --- trunk/src_plugins/vendordrill/vendor.c (revision 4861) +++ trunk/src_plugins/vendordrill/vendor.c (revision 4862) @@ -189,7 +189,7 @@ /* load the resource file */ doc = hid_cfg_load_lht(fname); if (doc == NULL) { - Message(PCB_MSG_DEFAULT, _("Could not load vendor resource file \"%s\"\n"), fname); + pcb_message(PCB_MSG_DEFAULT, _("Could not load vendor resource file \"%s\"\n"), fname); return 1; } @@ -211,7 +211,7 @@ sf = PCB_MM_TO_COORD(1); } else { - Message(PCB_MSG_DEFAULT, "\"%s\" is not a supported units. Defaulting to inch\n", sval); + pcb_message(PCB_MSG_DEFAULT, "\"%s\" is not a supported units. Defaulting to inch\n", sval); sf = PCB_INCH_TO_COORD(1); } @@ -226,7 +226,7 @@ rounding_method = CLOSEST; } else { - Message(PCB_MSG_DEFAULT, _("\"%s\" is not a valid rounding type. Defaulting to up\n"), sval); + pcb_message(PCB_MSG_DEFAULT, _("\"%s\" is not a valid rounding type. Defaulting to up\n"), sval); rounding_method = ROUND_UP; } } @@ -245,49 +245,49 @@ add_to_drills(n->data.text.value); } } - Message(PCB_MSG_DEFAULT, _("Broken drillmap: /drillmap should be a list\n")); + pcb_message(PCB_MSG_DEFAULT, _("Broken drillmap: /drillmap should be a list\n")); } else - Message(PCB_MSG_DEFAULT, _("No drillmap resource found\n")); + pcb_message(PCB_MSG_DEFAULT, _("No drillmap resource found\n")); sval = pcb_hid_cfg_text_value(doc, "/drc/copper_space"); if (sval != NULL) { PCB->Bloat = floor(sf * atof(sval) + 0.5); - Message(PCB_MSG_DEFAULT, _("Set DRC minimum copper spacing to %.2f mils\n"), 0.01 * PCB->Bloat); + pcb_message(PCB_MSG_DEFAULT, _("Set DRC minimum copper spacing to %.2f mils\n"), 0.01 * PCB->Bloat); } sval = pcb_hid_cfg_text_value(doc, "/drc/copper_overlap"); if (sval != NULL) { PCB->Shrink = floor(sf * atof(sval) + 0.5); - Message(PCB_MSG_DEFAULT, _("Set DRC minimum copper overlap to %.2f mils\n"), 0.01 * PCB->Shrink); + pcb_message(PCB_MSG_DEFAULT, _("Set DRC minimum copper overlap to %.2f mils\n"), 0.01 * PCB->Shrink); } sval = pcb_hid_cfg_text_value(doc, "/drc/copper_width"); if (sval != NULL) { PCB->minWid = floor(sf * atof(sval) + 0.5); - Message(PCB_MSG_DEFAULT, _("Set DRC minimum copper spacing to %.2f mils\n"), 0.01 * PCB->minWid); + pcb_message(PCB_MSG_DEFAULT, _("Set DRC minimum copper spacing to %.2f mils\n"), 0.01 * PCB->minWid); } sval = pcb_hid_cfg_text_value(doc, "/drc/silk_width"); if (sval != NULL) { PCB->minSlk = floor(sf * atof(sval) + 0.5); - Message(PCB_MSG_DEFAULT, _("Set DRC minimum silk width to %.2f mils\n"), 0.01 * PCB->minSlk); + pcb_message(PCB_MSG_DEFAULT, _("Set DRC minimum silk width to %.2f mils\n"), 0.01 * PCB->minSlk); } sval = pcb_hid_cfg_text_value(doc, "/drc/min_drill"); if (sval != NULL) { PCB->minDrill = floor(sf * atof(sval) + 0.5); - Message(PCB_MSG_DEFAULT, _("Set DRC minimum drill diameter to %.2f mils\n"), 0.01 * PCB->minDrill); + pcb_message(PCB_MSG_DEFAULT, _("Set DRC minimum drill diameter to %.2f mils\n"), 0.01 * PCB->minDrill); } sval = pcb_hid_cfg_text_value(doc, "/drc/min_ring"); if (sval != NULL) { PCB->minRing = floor(sf * atof(sval) + 0.5); - Message(PCB_MSG_DEFAULT, _("Set DRC minimum annular ring to %.2f mils\n"), 0.01 * PCB->minRing); + pcb_message(PCB_MSG_DEFAULT, _("Set DRC minimum annular ring to %.2f mils\n"), 0.01 * PCB->minRing); } - Message(PCB_MSG_DEFAULT, _("Loaded %d vendor drills from %s\n"), n_vendor_drills, fname); - Message(PCB_MSG_DEFAULT, _("Loaded %d RefDes skips, %d Value skips, %d Descr skips\n"), n_refdes, n_value, n_descr); + pcb_message(PCB_MSG_DEFAULT, _("Loaded %d vendor drills from %s\n"), n_vendor_drills, fname); + pcb_message(PCB_MSG_DEFAULT, _("Loaded %d RefDes skips, %d Value skips, %d Descr skips\n"), n_refdes, n_value, n_descr); conf_set(CFR_DESIGN, "plugins/vendor/enable", -1, "0", POL_OVERWRITE); @@ -325,7 +325,7 @@ if (pcb_chg_obj_2nd_size(PCB_TYPE_VIA, via, NULL, NULL, vendorDrillMap(via->DrillingHole), pcb_true, pcb_false)) changed++; else { - Message(PCB_MSG_DEFAULT, _ + pcb_message(PCB_MSG_DEFAULT, _ ("Via at %.2f, %.2f not changed. Possible reasons:\n" "\t- pad size too small\n" "\t- new size would be too large or too small\n"), 0.01 * via->X, 0.01 * via->Y); @@ -332,7 +332,7 @@ } } else { - Message(PCB_MSG_DEFAULT, _("Locked via at %.2f, %.2f not changed.\n"), 0.01 * via->X, 0.01 * via->Y); + pcb_message(PCB_MSG_DEFAULT, _("Locked via at %.2f, %.2f not changed.\n"), 0.01 * via->X, 0.01 * via->Y); } } } @@ -355,7 +355,7 @@ if (pcb_chg_obj_2nd_size(PCB_TYPE_PIN, element, pin, NULL, vendorDrillMap(pin->DrillingHole), pcb_true, pcb_false)) changed++; else { - Message(PCB_MSG_DEFAULT, _ + pcb_message(PCB_MSG_DEFAULT, _ ("Pin %s (%s) at %.2f, %.2f (element %s, %s, %s) not changed.\n" "\tPossible reasons:\n" "\t- pad size too small\n" @@ -366,7 +366,7 @@ } } else { - Message(PCB_MSG_DEFAULT, _("Locked pin at %-6.2f, %-6.2f not changed.\n"), 0.01 * pin->X, 0.01 * pin->Y); + pcb_message(PCB_MSG_DEFAULT, _("Locked pin at %-6.2f, %-6.2f not changed.\n"), 0.01 * pin->X, 0.01 * pin->Y); } } } @@ -375,7 +375,7 @@ } END_LOOP; - Message(PCB_MSG_DEFAULT, _("Updated %d drill sizes out of %d total\n"), changed, tot); + pcb_message(PCB_MSG_DEFAULT, _("Updated %d drill sizes out of %d total\n"), changed, tot); #warning TODO: this should not happen; modify some local setting? #if 0 @@ -383,7 +383,7 @@ if (conf_core.design.via_drilling_hole != vendorDrillMap(Settings.ViaDrillingHole)) { changed++; Settings.ViaDrillingHole = vendorDrillMap(Settings.ViaDrillingHole); - Message(PCB_MSG_DEFAULT, _("Adjusted active via hole size to be %6.2f mils\n"), 0.01 * Settings.ViaDrillingHole); + pcb_message(PCB_MSG_DEFAULT, _("Adjusted active via hole size to be %6.2f mils\n"), 0.01 * Settings.ViaDrillingHole); } /* and update the vias for the various routing styles */ @@ -391,12 +391,12 @@ if (PCB->RouteStyle[i].Hole != vendorDrillMap(PCB->RouteStyle[i].Hole)) { changed++; PCB->RouteStyle[i].Hole = vendorDrillMap(PCB->RouteStyle[i].Hole); - Message(PCB_MSG_DEFAULT, _ + pcb_message(PCB_MSG_DEFAULT, _ ("Adjusted %s routing style via hole size to be %6.2f mils\n"), PCB->RouteStyle[i].Name, 0.01 * PCB->RouteStyle[i].Hole); if (PCB->RouteStyle[i].Diameter < PCB->RouteStyle[i].Hole + MIN_PINORVIACOPPER) { PCB->RouteStyle[i].Diameter = PCB->RouteStyle[i].Hole + MIN_PINORVIACOPPER; - Message(PCB_MSG_DEFAULT, _ + pcb_message(PCB_MSG_DEFAULT, _ ("Increased %s routing style via diameter to %6.2f mils\n"), PCB->RouteStyle[i].Name, 0.01 * PCB->RouteStyle[i].Diameter); } @@ -442,7 +442,7 @@ /* are we larger than the largest drill? */ if (in > vendor_drills[n_vendor_drills - 1]) { - Message(PCB_MSG_DEFAULT, _("Vendor drill list does not contain a drill >= %6.2f mil\n" + pcb_message(PCB_MSG_DEFAULT, _("Vendor drill list does not contain a drill >= %6.2f mil\n" "Using %6.2f mil instead.\n"), 0.01 * in, 0.01 * vendor_drills[n_vendor_drills - 1]); cached_map = vendor_drills[n_vendor_drills - 1]; return vendor_drills[n_vendor_drills - 1]; @@ -580,7 +580,7 @@ for (i = 0; i < n_refdes; i++) { if ((NSTRCMP(UNKNOWN(NAMEONPCB_NAME(element)), ignore_refdes[i]) == 0) || rematch(ignore_refdes[i], UNKNOWN(NAMEONPCB_NAME(element)))) { - Message(PCB_MSG_DEFAULT, _("Vendor mapping skipped because refdes = %s matches %s\n"), UNKNOWN(NAMEONPCB_NAME(element)), ignore_refdes[i]); + pcb_message(PCB_MSG_DEFAULT, _("Vendor mapping skipped because refdes = %s matches %s\n"), UNKNOWN(NAMEONPCB_NAME(element)), ignore_refdes[i]); noskip = 0; } } @@ -588,7 +588,7 @@ for (i = 0; i < n_value; i++) { if ((NSTRCMP(UNKNOWN(VALUE_NAME(element)), ignore_value[i]) == 0) || rematch(ignore_value[i], UNKNOWN(VALUE_NAME(element)))) { - Message(PCB_MSG_DEFAULT, _("Vendor mapping skipped because value = %s matches %s\n"), UNKNOWN(VALUE_NAME(element)), ignore_value[i]); + pcb_message(PCB_MSG_DEFAULT, _("Vendor mapping skipped because value = %s matches %s\n"), UNKNOWN(VALUE_NAME(element)), ignore_value[i]); noskip = 0; } } @@ -598,7 +598,7 @@ if ((NSTRCMP(UNKNOWN(DESCRIPTION_NAME(element)), ignore_descr[i]) == 0) || rematch(ignore_descr[i], UNKNOWN(DESCRIPTION_NAME(element)))) { - Message(PCB_MSG_DEFAULT, _ + pcb_message(PCB_MSG_DEFAULT, _ ("Vendor mapping skipped because descr = %s matches %s\n"), UNKNOWN(DESCRIPTION_NAME(element)), ignore_descr[i]); noskip = 0; @@ -606,7 +606,7 @@ } if (noskip && TEST_FLAG(PCB_FLAG_LOCK, element)) { - Message(PCB_MSG_DEFAULT, _("Vendor mapping skipped because element %s is locked\n"), UNKNOWN(NAMEONPCB_NAME(element))); + pcb_message(PCB_MSG_DEFAULT, _("Vendor mapping skipped because element %s is locked\n"), UNKNOWN(NAMEONPCB_NAME(element))); noskip = 0; } @@ -624,7 +624,7 @@ /* compile the regular expression */ regex = re_sei_comp(re); if (re_sei_errno(regex) != 0) { - Message(PCB_MSG_DEFAULT, _("regexp error: %s\n"), re_error_str(re_sei_errno(regex))); + pcb_message(PCB_MSG_DEFAULT, _("regexp error: %s\n"), re_error_str(re_sei_errno(regex))); re_sei_free(regex); return pcb_false; } Index: trunk/tests/conf/conftest.c =================================================================== --- trunk/tests/conf/conftest.c (revision 4861) +++ trunk/tests/conf/conftest.c (revision 4862) @@ -12,7 +12,7 @@ conf_hid_id_t hid_id; const char *hid_cookie = "conftest cookie"; -void Message(const char *Format, ...) +void pcb_message(const char *Format, ...) { va_list args; @@ -55,7 +55,7 @@ void cmd_dump(char *arg) { if (arg == NULL) { - Message("Need an arg: native or lihata"); + pcb_message("Need an arg: native or lihata"); return; } if (strncmp(arg, "native", 6) == 0) { @@ -68,7 +68,7 @@ while(isspace(*arg)) arg++; conf_role_t role = conf_role_parse(arg); if (role == CFR_invalid) { - Message("Invalid role: '%s'", arg); + pcb_message("Invalid role: '%s'", arg); return; } if (conf_root[role] != NULL) @@ -77,7 +77,7 @@ printf("\n"); } else - Message("Invalid dump mode: '%s'", arg); + pcb_message("Invalid dump mode: '%s'", arg); } void cmd_print(char *arg) @@ -86,12 +86,12 @@ gds_t s; if (arg == NULL) { - Message("Need an arg: a native path"); + pcb_message("Need an arg: a native path"); return; } node = conf_get_field(arg); if (node == NULL) { - Message("No such path: '%s'", arg); + pcb_message("No such path: '%s'", arg); return; } gds_init(&s); @@ -107,7 +107,7 @@ if (arg == NULL) { help:; - Message("Need 2 args: role and %s", (is_text ? "lihata text" : "file name")); + pcb_message("Need 2 args: role and %s", (is_text ? "lihata text" : "file name")); return; } @@ -125,7 +125,7 @@ role = conf_role_parse(arg); if (role == CFR_invalid) { - Message("Invalid role: '%s'", arg); + pcb_message("Invalid role: '%s'", arg); return; } printf("Result: %d\n", conf_load_as(role, fn, is_text)); @@ -139,7 +139,7 @@ { conf_policy_t np = conf_policy_parse(arg); if (np == POL_invalid) - Message("Invalid/unknown policy: '%s'", arg); + pcb_message("Invalid/unknown policy: '%s'", arg); else current_policy = np; } @@ -148,7 +148,7 @@ { conf_role_t nr = conf_role_parse(arg); if (nr == CFR_invalid) - Message("Invalid/unknown role: '%s'", arg); + pcb_message("Invalid/unknown role: '%s'", arg); else current_role = nr; } @@ -160,7 +160,7 @@ lht_node_t *first; if ((*end != '\0') || (np < 0)) { - Message("Invalid integer prio: '%s'", arg); + pcb_message("Invalid integer prio: '%s'", arg); return; } first = conf_lht_get_first(current_role); @@ -183,12 +183,12 @@ lht_node_t *first; if (arg == NULL) { - Message("need a policy", arg); + pcb_message("need a policy", arg); return; } np = conf_policy_parse(arg); if (np == POL_invalid) { - Message("Invalid integer policy: '%s'", arg); + pcb_message("Invalid integer policy: '%s'", arg); return; } @@ -218,7 +218,7 @@ path = arg; val = strpbrk(path, " \t="); if (val == NULL) { - Message("set needs a value"); + pcb_message("set needs a value"); return; } *val = '\0'; @@ -234,7 +234,7 @@ { conf_native_t *n = conf_get_field(arg); if (n == NULL) { - Message("unknown path"); + pcb_message("unknown path"); return; } conf_hid_set_cb(n, hid_id, (add ? &watch_cbs : NULL)); @@ -270,7 +270,7 @@ else { conf_role_t role = conf_role_parse(arg); if (role == CFR_invalid) { - Message("Invalid role: '%s'", arg); + pcb_message("Invalid role: '%s'", arg); return; } conf_reset(role, ""); @@ -373,7 +373,7 @@ else if (strcmp(cmd, "help") == 0) cmd_help(arg); else - Message("unknown command '%s'", cmd); + pcb_message("unknown command '%s'", cmd); } conf_hid_unreg(hid_cookie); Index: trunk/util/gsch2pcb-rnd/gsch2pcb.c =================================================================== --- trunk/util/gsch2pcb-rnd/gsch2pcb.c (revision 4861) +++ trunk/util/gsch2pcb-rnd/gsch2pcb.c (revision 4862) @@ -138,22 +138,22 @@ return 1; } -void ChdirErrorMessage(const char *DirName) +void ChdirErrorpcb_message(const char *DirName) { fprintf(stderr, "gsch2pcb-rnd: warning: can't cd to %s\n", DirName); } -void OpendirErrorMessage(const char *DirName) +void OpendirErrorpcb_message(const char *DirName) { fprintf(stderr, "gsch2pcb-rnd: warning: can't opendir %s\n", DirName); } -void PopenErrorMessage(const char *cmd) +void PopenErrorpcb_message(const char *cmd) { fprintf(stderr, "gsch2pcb-rnd: warning: can't popen %s\n", cmd); } -void Message(enum pcb_message_level level, const char *fmt, ...) +void pcb_message(enum pcb_message_level level, const char *fmt, ...) { va_list args; fprintf(stderr, "gsch2pcb-rnd: ");