Index: trunk/doc-rnd/hacking/renames =================================================================== --- trunk/doc-rnd/hacking/renames (revision 4834) +++ trunk/doc-rnd/hacking/renames (revision 4835) @@ -116,3 +116,12 @@ EventMoveCrosshair -> pcb_event_move_crosshair AdjustAttachedObjects -> pcb_adjust_attached_objects +warpNoWhere -> pcb_warp_nowhere +get_style_size -> pcb_get_style_size +NotifyLine -> pcb_notify_line +NotifyBlock -> pcb_notify_block +NotifyMode -> pcb_notify_mode +ClearWarnings -> pcb_clear_warnings +ReleaseMode -> pcb_release_mode +AFAIL -> PCB_AFAIL +ACTION_ARG -> PCB_ACTION_ARG Index: trunk/src/action_act.c =================================================================== --- trunk/src/action_act.c (revision 4834) +++ trunk/src/action_act.c (revision 4835) @@ -56,7 +56,7 @@ char *sp; if (argc != 1) - AFAIL(executefile); + PCB_AFAIL(executefile); fname = argv[0]; Index: trunk/src/action_helper.c =================================================================== --- trunk/src/action_helper.c (revision 4834) +++ trunk/src/action_helper.c (revision 4835) @@ -238,14 +238,9 @@ static pcb_cardinal_t polyIndex = 0; pcb_bool saved_mode = pcb_false; -/* --------------------------------------------------------------------------- - * some local routines - */ static void AdjustAttachedBox(void); -/* --------------------------------------------------------------------------- - * Clear warning color from pins/pads - */ -void ClearWarnings() + +void pcb_clear_warnings() { conf_core.temp.rat_warn = pcb_false; ALLPIN_LOOP(PCB->Data); @@ -354,7 +349,7 @@ /* unselect first if shift key not down */ if (!gui->shift_is_pressed() && SelectBlock(&box, pcb_false)) SetChangedFlag(pcb_true); - NotifyBlock(); + pcb_notify_block(); Crosshair.AttachedBox.Point1.X = Note.X; Crosshair.AttachedBox.Point1.Y = Note.Y; } @@ -362,7 +357,7 @@ } } -void ReleaseMode(void) +void pcb_release_mode(void) { pcb_box_t box; @@ -398,7 +393,7 @@ } else if (Note.Moving) { RestoreUndoSerialNumber(); - NotifyMode(); + pcb_notify_mode(); ClearBuffer(PASTEBUFFER); SetBufferNumber(Note.Buffer); Note.Moving = pcb_false; @@ -405,7 +400,7 @@ Note.Hit = 0; } else if (Note.Hit) { - NotifyMode(); + pcb_notify_mode(); Note.Hit = 0; } else if (conf_core.editor.mode == PCB_MODE_ARROW) { @@ -489,10 +484,7 @@ } } -/* --------------------------------------------------------------------------- - * creates points of a line - */ -void NotifyLine(void) +void pcb_notify_line(void) { int type = PCB_TYPE_NONE; void *ptr1, *ptr2, *ptr3; @@ -545,10 +537,7 @@ } } -/* --------------------------------------------------------------------------- - * create first or second corner of a marked block - */ -void NotifyBlock(void) +void pcb_notify_block(void) { notify_crosshair_change(pcb_false); switch (Crosshair.AttachedBox.State) { @@ -565,21 +554,13 @@ notify_crosshair_change(pcb_true); } - -/* --------------------------------------------------------------------------- - * - * does what's appropriate for the current mode setting. This normally - * means creation of an object at the current crosshair location. - * - * new created objects are added to the create undo list of course - */ -void NotifyMode(void) +void pcb_notify_mode(void) { void *ptr1, *ptr2, *ptr3; int type; if (conf_core.temp.rat_warn) - ClearWarnings(); + pcb_clear_warnings(); switch (conf_core.editor.mode) { case PCB_MODE_ARROW: { @@ -759,7 +740,7 @@ case PCB_MODE_LINE: /* do update of position */ - NotifyLine(); + pcb_notify_line(); if (Crosshair.AttachedLine.State != STATE_THIRD) break; @@ -890,7 +871,7 @@ case PCB_MODE_RECTANGLE: /* do update of position */ - NotifyBlock(); + pcb_notify_block(); /* create rectangle if both corners are determined * and width, height are != 0 @@ -949,7 +930,7 @@ pcb_cardinal_t n = Crosshair.AttachedPolygon.PointN; /* do update of position; use the 'PCB_MODE_LINE' mechanism */ - NotifyLine(); + pcb_notify_line(); /* check if this is the last point of a polygon */ if (n >= 3 && points[0].X == Crosshair.AttachedLine.Point2.X && points[0].Y == Crosshair.AttachedLine.Point2.Y) { @@ -1017,7 +998,7 @@ pcb_flag_t Flags; /* do update of position; use the 'PCB_MODE_LINE' mechanism */ - NotifyLine(); + pcb_notify_line(); if (conf_core.editor.orthogonal_moves) { /* set the mark to the new starting point so ortho works */ @@ -1266,10 +1247,7 @@ } } -/* --------------------------------------------------------------------------- */ -/* helper: get route style size for a function and selected object type. - size_id: 0=main size; 1=2nd size (drill); 2=clearance */ -int get_style_size(int funcid, pcb_coord_t * out, int type, int size_id) +int pcb_get_style_size(int funcid, pcb_coord_t * out, int type, int size_id) { switch (funcid) { case F_Object: @@ -1277,13 +1255,13 @@ case PCB_TYPE_ELEMENT: /* we'd set pin/pad properties, so fall thru */ case PCB_TYPE_VIA: case PCB_TYPE_PIN: - return get_style_size(F_SelectedVias, out, 0, size_id); + return pcb_get_style_size(F_SelectedVias, out, 0, size_id); case PCB_TYPE_PAD: - return get_style_size(F_SelectedPads, out, 0, size_id); + return pcb_get_style_size(F_SelectedPads, out, 0, size_id); case PCB_TYPE_LINE: - return get_style_size(F_SelectedLines, out, 0, size_id); + return pcb_get_style_size(F_SelectedLines, out, 0, size_id); case PCB_TYPE_ARC: - return get_style_size(F_SelectedArcs, out, 0, size_id); + 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); return -1; Index: trunk/src/action_helper.h =================================================================== --- trunk/src/action_helper.h (revision 4834) +++ trunk/src/action_helper.h (revision 4835) @@ -40,19 +40,29 @@ /* adjusts the objects which are to be created like attached lines... */ void pcb_adjust_attached_objects(void); -#define ACTION_ARG(n) (argc > (n) ? argv[n] : NULL) +#define PCB_ACTION_ARG(n) (argc > (n) ? argv[n] : NULL) -int get_style_size(int funcid, pcb_coord_t * out, int type, int size_id); +/* helper: get route style size for a function and selected object type. + size_id: 0=main size; 1=2nd size (drill); 2=clearance */ +int pcb_get_style_size(int funcid, pcb_coord_t * out, int type, int size_id); + extern int defer_updates; extern int defer_needs_update; extern pcb_layer_t *lastLayer; -void NotifyLine(void); -void NotifyBlock(void); -void NotifyMode(void); -void ClearWarnings(void); +void pcb_notify_line(void); /* creates points of a line (when clicked) */ +void pcb_notify_block(void); /* create first or second corner of a marked block (when clicked) */ + +/* does what's appropriate for the current mode setting (when clicked). This + normally means creation of an object at the current crosshair location. + new created objects are added to the create undo list of course */ +void pcb_notify_mode(void); + +/* Clear warning color from pins/pads */ +void pcb_clear_warnings(void); + typedef struct { pcb_coord_t X, Y; pcb_cardinal_t Buffer; @@ -67,12 +77,12 @@ extern pcb_action_note_t Note; extern pcb_bool saved_mode; -void ReleaseMode(void); +void pcb_release_mode(void); /* --------------------------------------------------------------------------- * Macros called by various action routines to show usage or to report * a syntax error and fail */ -#define AFAIL(x) { Message (PCB_MSG_ERROR, "Syntax error. Usage:\n%s\n", (x##_syntax)); return 1; } +#define PCB_AFAIL(x) { 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 4834) +++ trunk/src/buffer.c (revision 4835) @@ -151,13 +151,13 @@ int LoadFootprint(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *name = ACTION_ARG(0); - const char *refdes = ACTION_ARG(1); - const char *value = ACTION_ARG(2); + const char *name = PCB_ACTION_ARG(0); + const char *refdes = PCB_ACTION_ARG(1); + const char *value = PCB_ACTION_ARG(2); pcb_element_t *e; if (!name) - AFAIL(loadfootprint); + PCB_AFAIL(loadfootprint); if (LoadFootprintByName(PASTEBUFFER, name)) return 1; @@ -767,16 +767,16 @@ x = y = 0; } else if (argc == 3 || argc == 4) { - x = GetValue(ACTION_ARG(1), ACTION_ARG(3), &absolute, NULL); + x = GetValue(PCB_ACTION_ARG(1), PCB_ACTION_ARG(3), &absolute, NULL); if (!absolute) x += oldx; - y = GetValue(ACTION_ARG(2), ACTION_ARG(3), &absolute, NULL); + y = GetValue(PCB_ACTION_ARG(2), PCB_ACTION_ARG(3), &absolute, NULL); if (!absolute) y += oldy; } else { notify_crosshair_change(pcb_true); - AFAIL(pastebuffer); + PCB_AFAIL(pastebuffer); } oldx = x; Index: trunk/src/change_act.c =================================================================== --- trunk/src/change_act.c (revision 4834) +++ trunk/src/change_act.c (revision 4835) @@ -69,9 +69,9 @@ static int ActionChangeClearSize(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *function = ACTION_ARG(0); - const char *delta = ACTION_ARG(1); - const char *units = ACTION_ARG(2); + const char *function = PCB_ACTION_ARG(0); + const char *delta = PCB_ACTION_ARG(1); + const char *units = PCB_ACTION_ARG(2); pcb_bool absolute; pcb_coord_t value; int type = PCB_TYPE_NONE; @@ -88,7 +88,7 @@ if (strcmp(argv[1], "style") == 0) { if ((type == PCB_TYPE_NONE) || (type == PCB_TYPE_POLYGON)) /* workaround: SearchScreen(CHANGECLEARSIZE_TYPES) wouldn't return elements */ type = SearchScreen(x, y, CHANGE2NDSIZE_TYPES, &ptr1, &ptr2, &ptr3); - if (get_style_size(funcid, &value, type, 2) != 0) + if (pcb_get_style_size(funcid, &value, type, 2) != 0) return 1; absolute = 1; value *= 2; @@ -154,11 +154,11 @@ static int ActionChangeFlag(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *function = ACTION_ARG(0); - const char *flag = ACTION_ARG(1); + const char *function = PCB_ACTION_ARG(0); + const char *flag = PCB_ACTION_ARG(1); int value = argc > 2 ? atoi(argv[2]) : -1; if (value != 0 && value != 1) - AFAIL(changeflag); + PCB_AFAIL(changeflag); ChangeFlag(function, flag, value, "ChangeFlag"); return 0; @@ -262,7 +262,7 @@ static int ActionChangeHole(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *function = ACTION_ARG(0); + const char *function = PCB_ACTION_ARG(0); if (function) { switch (funchash_get(function, NULL)) { case F_ToggleObject: @@ -304,7 +304,7 @@ static int ActionChangePaste(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *function = ACTION_ARG(0); + const char *function = PCB_ACTION_ARG(0); if (function) { switch (funchash_get(function, NULL)) { case F_ToggleObject: @@ -382,9 +382,9 @@ static int ActionChangeSize(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *function = ACTION_ARG(0); - const char *delta = ACTION_ARG(1); - const char *units = ACTION_ARG(2); + const char *function = PCB_ACTION_ARG(0); + const char *delta = PCB_ACTION_ARG(1); + const char *units = PCB_ACTION_ARG(2); pcb_bool absolute; /* indicates if absolute size is given */ pcb_coord_t value; int type = PCB_TYPE_NONE, tostyle = 0; @@ -398,7 +398,7 @@ type = SearchScreen(Crosshair.X, Crosshair.Y, CHANGESIZE_TYPES, &ptr1, &ptr2, &ptr3); if (strcmp(argv[1], "style") == 0) { - if (get_style_size(funcid, &value, type, 0) != 0) + if (pcb_get_style_size(funcid, &value, type, 0) != 0) return 1; absolute = 1; tostyle = 1; @@ -484,9 +484,9 @@ static int ActionChange2ndSize(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *function = ACTION_ARG(0); - const char *delta = ACTION_ARG(1); - const char *units = ACTION_ARG(2); + const char *function = PCB_ACTION_ARG(0); + const char *delta = PCB_ACTION_ARG(1); + const char *units = PCB_ACTION_ARG(2); int type = PCB_TYPE_NONE; void *ptr1, *ptr2, *ptr3; @@ -502,7 +502,7 @@ } if (strcmp(argv[1], "style") == 0) { - if (get_style_size(funcid, &value, type, 1) != 0) + if (pcb_get_style_size(funcid, &value, type, 1) != 0) return 1; absolute = 1; } @@ -562,7 +562,7 @@ const char *refdes, *pinnum, *pinname; if (argc != 3) { - AFAIL(changepinname); + PCB_AFAIL(changepinname); } refdes = argv[0]; @@ -645,8 +645,8 @@ int ActionChangeName(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *function = ACTION_ARG(0); - const char *pinnums = ACTION_ARG(1); + const char *function = PCB_ACTION_ARG(0); + const char *pinnums = PCB_ACTION_ARG(1); char *name; int pinnum; @@ -726,7 +726,7 @@ static int ActionChangeJoin(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *function = ACTION_ARG(0); + const char *function = PCB_ACTION_ARG(0); if (function) { switch (funchash_get(function, NULL)) { case F_ToggleObject: @@ -779,7 +779,7 @@ static int ActionChangeNonetlist(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *function = ACTION_ARG(0); + const char *function = PCB_ACTION_ARG(0); if (function) { switch (funchash_get(function, NULL)) { case F_ToggleObject: @@ -825,7 +825,7 @@ static int ActionChangeSquare(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *function = ACTION_ARG(0); + const char *function = PCB_ACTION_ARG(0); if (function) { switch (funchash_get(function, NULL)) { case F_ToggleObject: @@ -887,7 +887,7 @@ static int ActionSetSquare(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *function = ACTION_ARG(0); + const char *function = PCB_ACTION_ARG(0); if (function && *function) { switch (funchash_get(function, NULL)) { case F_ToggleObject: @@ -939,7 +939,7 @@ static int ActionClearSquare(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *function = ACTION_ARG(0); + const char *function = PCB_ACTION_ARG(0); if (function && *function) { switch (funchash_get(function, NULL)) { case F_ToggleObject: @@ -990,7 +990,7 @@ static int ActionChangeOctagon(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *function = ACTION_ARG(0); + const char *function = PCB_ACTION_ARG(0); if (function) { switch (funchash_get(function, NULL)) { case F_ToggleObject: @@ -1045,7 +1045,7 @@ static int ActionSetOctagon(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *function = ACTION_ARG(0); + const char *function = PCB_ACTION_ARG(0); if (function) { switch (funchash_get(function, NULL)) { case F_ToggleObject: @@ -1101,7 +1101,7 @@ static int ActionClearOctagon(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *function = ACTION_ARG(0); + const char *function = PCB_ACTION_ARG(0); if (function) { switch (funchash_get(function, NULL)) { case F_ToggleObject: @@ -1174,8 +1174,8 @@ static int ActionSetThermal(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *function = ACTION_ARG(0); - const char *style = ACTION_ARG(1); + const char *function = PCB_ACTION_ARG(0); + const char *style = PCB_ACTION_ARG(1); void *ptr1, *ptr2, *ptr3; int type, kind; int err = 0; @@ -1213,7 +1213,7 @@ return 0; } - AFAIL(setthermal); + PCB_AFAIL(setthermal); } @@ -1240,8 +1240,8 @@ static int ActionSetFlag(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *function = ACTION_ARG(0); - const char *flag = ACTION_ARG(1); + const char *function = PCB_ACTION_ARG(0); + const char *flag = PCB_ACTION_ARG(1); ChangeFlag(function, flag, 1, "SetFlag"); return 0; } @@ -1269,8 +1269,8 @@ static int ActionClrFlag(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *function = ACTION_ARG(0); - const char *flag = ACTION_ARG(1); + const char *function = PCB_ACTION_ARG(0); + const char *flag = PCB_ACTION_ARG(1); ChangeFlag(function, flag, 0, "ClrFlag"); return 0; } @@ -1309,9 +1309,9 @@ static int ActionSetValue(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *function = ACTION_ARG(0); - const char *val = ACTION_ARG(1); - const char *units = ACTION_ARG(2); + const char *function = PCB_ACTION_ARG(0); + const char *val = PCB_ACTION_ARG(1); + const char *units = PCB_ACTION_ARG(2); pcb_bool absolute; /* flag for 'absolute' value */ double value; int err = 0; @@ -1364,7 +1364,7 @@ return 0; } - AFAIL(setvalue); + PCB_AFAIL(setvalue); } /* --------------------------------------------------------------------------- */ @@ -1376,9 +1376,9 @@ static const char changeangle_help[] = "Changes the start angle, delta angle or both angles of an arc."; static int ActionChangeAngle(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *function = ACTION_ARG(0); - const char *prim = ACTION_ARG(1); - const char *delta = ACTION_ARG(2); + const char *function = PCB_ACTION_ARG(0); + const char *prim = PCB_ACTION_ARG(1); + const char *delta = PCB_ACTION_ARG(2); pcb_bool absolute; /* indicates if absolute size is given */ double value; int type = PCB_TYPE_NONE, which; @@ -1447,10 +1447,10 @@ static const char changeradius_help[] = "Changes the width or height (radius) of an arc."; static int ActionChangeRadius(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *function = ACTION_ARG(0); - const char *prim = ACTION_ARG(1); - const char *delta = ACTION_ARG(2); - const char *units = ACTION_ARG(3); + const char *function = PCB_ACTION_ARG(0); + const char *prim = PCB_ACTION_ARG(1); + const char *delta = PCB_ACTION_ARG(2); + const char *units = PCB_ACTION_ARG(3); pcb_bool absolute; /* indicates if absolute size is given */ double value; int type = PCB_TYPE_NONE, which; Index: trunk/src/file_act.c =================================================================== --- trunk/src/file_act.c (revision 4834) +++ trunk/src/file_act.c (revision 4835) @@ -58,10 +58,10 @@ const char *command; if (argc < 1) { - AFAIL(execcommand); + PCB_AFAIL(execcommand); } - command = ACTION_ARG(0); + command = PCB_ACTION_ARG(0); if (system(command)) return 1; @@ -110,7 +110,7 @@ const char *function, *name, *format = NULL; if (argc < 2) - AFAIL(loadfrom); + PCB_AFAIL(loadfrom); function = argv[0]; name = argv[1]; @@ -170,7 +170,7 @@ static int ActionNew(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *argument_name = ACTION_ARG(0); + const char *argument_name = PCB_ACTION_ARG(0); char *name = NULL; if (!PCB->Changed || gui->confirm_dialog(_("OK to clear layout data?"), 0)) { @@ -261,7 +261,7 @@ } if ((argc != 2) && (argc != 3)) - AFAIL(saveto); + PCB_AFAIL(saveto); if (argc >= 3) fmt = argv[2]; @@ -320,7 +320,7 @@ return SaveBufferElements(name, fmt); } - AFAIL(saveto); + PCB_AFAIL(saveto); } /* --------------------------------------------------------------------------- */ @@ -338,7 +338,7 @@ static int ActionQuit(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *force = ACTION_ARG(0); + const char *force = PCB_ACTION_ARG(0); if (force && strcasecmp(force, "force") == 0) { PCB->Changed = 0; exit(0); Index: trunk/src/gui_act.c =================================================================== --- trunk/src/gui_act.c (revision 4834) +++ trunk/src/gui_act.c (revision 4835) @@ -217,8 +217,8 @@ int id; int err = 0; - function = ACTION_ARG(0); - str_dir = ACTION_ARG(1); + function = PCB_ACTION_ARG(0); + str_dir = PCB_ACTION_ARG(1); if (function && (!str_dir || !*str_dir)) { switch (id = funchash_get(function, NULL)) { @@ -545,7 +545,7 @@ if (!err) return 0; - AFAIL(display); + PCB_AFAIL(display); } /* --------------------------------------------------------------------------- */ @@ -609,7 +609,7 @@ static int ActionMode(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *function = ACTION_ARG(0); + const char *function = PCB_ACTION_ARG(0); if (function) { Note.X = Crosshair.X; @@ -720,7 +720,7 @@ break; case F_Notify: - NotifyMode(); + pcb_notify_mode(); break; case F_PasteBuffer: SetMode(PCB_MODE_PASTE_BUFFER); @@ -735,7 +735,7 @@ if ((mid_stroke) && (conf_core.editor.enable_stroke)) stub_stroke_finish(); else - ReleaseMode(); + pcb_release_mode(); break; case F_Remove: SetMode(PCB_MODE_REMOVE); @@ -767,7 +767,7 @@ SaveMode(); saved_mode = pcb_true; SetMode(PCB_MODE_ARROW); - NotifyMode(); + pcb_notify_mode(); } break; case F_Text: @@ -792,7 +792,7 @@ return 0; } - AFAIL(mode); + PCB_AFAIL(mode); } /* ---------------------------------------------------------------- */ @@ -883,7 +883,7 @@ int i; if (argc < 1) - AFAIL(message); + PCB_AFAIL(message); for (i = 0; i < argc; i++) { Message(PCB_MSG_DEFAULT, argv[i]); @@ -908,7 +908,7 @@ static int ActionToggleHideName(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *function = ACTION_ARG(0); + const char *function = PCB_ACTION_ARG(0); if (function && PCB->ElementOn) { switch (funchash_get(function, NULL)) { case F_Object: @@ -975,7 +975,7 @@ static int ActionMarkCrosshair(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *function = ACTION_ARG(0); + const char *function = PCB_ACTION_ARG(0); if (!function || !*function) { if (Marked.status) { notify_mark_change(pcb_false); @@ -1013,7 +1013,7 @@ static int ActionRouteStyle(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *str = ACTION_ARG(0); + const char *str = PCB_ACTION_ARG(0); pcb_route_style_t *rts; int number; @@ -1068,7 +1068,7 @@ return 0; } - AFAIL(message); + PCB_AFAIL(message); } /* --------------------------------------------------------------------------- */ @@ -1098,7 +1098,7 @@ return 0; } - AFAIL(message); + PCB_AFAIL(message); } /* --------------------------------------------------------------------------- */ Index: trunk/src/netlist_act.c =================================================================== --- trunk/src/netlist_act.c (revision 4834) +++ trunk/src/netlist_act.c (revision 4835) @@ -240,7 +240,7 @@ return pcb_netlist_swap(); else if (strcasecmp(argv[0], "add") == 0) { /* Add is different, because the net/pin won't already exist. */ - return pcb_netlist_add(ACTION_ARG(1), ACTION_ARG(2)); + return pcb_netlist_add(PCB_ACTION_ARG(1), PCB_ACTION_ARG(2)); } else if (strcasecmp(argv[0], "sort") == 0) { pcb_sort_netlist(); @@ -303,7 +303,7 @@ pin = 0; if (func == (NFunc) pcb_netlist_style) { - pcb_netlist_style(net, ACTION_ARG(2)); + pcb_netlist_style(net, PCB_ACTION_ARG(2)); } else if (argc > 2) { int l = strlen(argv[2]); Index: trunk/src/object_act.c =================================================================== --- trunk/src/object_act.c (revision 4834) +++ trunk/src/object_act.c (revision 4835) @@ -101,12 +101,12 @@ static int ActionAttributes(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *function = ACTION_ARG(0); - const char *layername = ACTION_ARG(1); + const char *function = PCB_ACTION_ARG(0); + const char *layername = PCB_ACTION_ARG(1); char *buf; if (!function) - AFAIL(attributes); + PCB_AFAIL(attributes); if (!gui->edit_attributes) { Message(PCB_MSG_DEFAULT, _("This GUI doesn't support Attribute Editing\n")); @@ -183,7 +183,7 @@ } default: - AFAIL(attributes); + PCB_AFAIL(attributes); } return 0; @@ -209,7 +209,7 @@ static int ActionDisperseElements(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *function = ACTION_ARG(0); + const char *function = PCB_ACTION_ARG(0); pcb_coord_t minx = GAP, miny = GAP, maxy = GAP, dx, dy; int all = 0, bad = 0; @@ -232,7 +232,7 @@ } if (bad) { - AFAIL(disperseelements); + PCB_AFAIL(disperseelements); } @@ -320,7 +320,7 @@ static int ActionFlip(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *function = ACTION_ARG(0); + const char *function = PCB_ACTION_ARG(0); pcb_element_t *element; void *ptrtmp; int err = 0; @@ -347,7 +347,7 @@ return 0; } - AFAIL(flip); + PCB_AFAIL(flip); } /* --------------------------------------------------------------------------- */ @@ -367,9 +367,9 @@ static int ActionMoveObject(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *x_str = ACTION_ARG(0); - const char *y_str = ACTION_ARG(1); - const char *units = ACTION_ARG(2); + const char *x_str = PCB_ACTION_ARG(0); + const char *y_str = PCB_ACTION_ARG(1); + const char *units = PCB_ACTION_ARG(2); pcb_coord_t nx, ny; pcb_bool absolute1, absolute2; void *ptr1, *ptr2, *ptr3; @@ -413,7 +413,7 @@ static int ActionMoveToCurrentLayer(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *function = ACTION_ARG(0); + const char *function = PCB_ACTION_ARG(0); if (function) { switch (funchash_get(function, NULL)) { case F_Object: @@ -519,17 +519,17 @@ } if (strcasecmp(function, "need") != 0) - AFAIL(elementlist); + PCB_AFAIL(elementlist); if (argc != 4) - AFAIL(elementlist); + PCB_AFAIL(elementlist); argc--; argv++; - refdes = ACTION_ARG(0); - footprint = ACTION_ARG(1); - value = ACTION_ARG(2); + refdes = PCB_ACTION_ARG(0); + footprint = PCB_ACTION_ARG(1); + value = PCB_ACTION_ARG(2); args[0] = footprint; args[1] = refdes; @@ -661,12 +661,12 @@ pcb_attribute_t *attr; if (argc < 2) { - AFAIL(elementsetattr); + PCB_AFAIL(elementsetattr); } refdes = argv[0]; name = argv[1]; - value = ACTION_ARG(2); + value = PCB_ACTION_ARG(2); ELEMENT_LOOP(PCB->Data); { @@ -725,7 +725,7 @@ static int ActionRipUp(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *function = ACTION_ARG(0); + const char *function = PCB_ACTION_ARG(0); pcb_bool changed = pcb_false; if (function) { @@ -829,9 +829,9 @@ static int ActionMinMaskGap(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *function = ACTION_ARG(0); - const char *delta = ACTION_ARG(1); - const char *units = ACTION_ARG(2); + const char *function = PCB_ACTION_ARG(0); + const char *delta = PCB_ACTION_ARG(1); + const char *units = PCB_ACTION_ARG(2); pcb_bool absolute; pcb_coord_t value; int flags; @@ -903,9 +903,9 @@ static int ActionMinClearGap(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *function = ACTION_ARG(0); - const char *delta = ACTION_ARG(1); - const char *units = ACTION_ARG(2); + const char *function = PCB_ACTION_ARG(0); + const char *delta = PCB_ACTION_ARG(1); + const char *units = PCB_ACTION_ARG(2); pcb_bool absolute; pcb_coord_t value; int flags; Index: trunk/src/polygon_act.c =================================================================== --- trunk/src/polygon_act.c (revision 4834) +++ trunk/src/polygon_act.c (revision 4835) @@ -59,7 +59,7 @@ static int ActionMorphPolygon(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *function = ACTION_ARG(0); + const char *function = PCB_ACTION_ARG(0); if (function) { switch (funchash_get(function, NULL)) { case F_Object: @@ -117,7 +117,7 @@ static int ActionPolygon(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *function = ACTION_ARG(0); + const char *function = PCB_ACTION_ARG(0); if (function && conf_core.editor.mode == PCB_MODE_POLYGON) { notify_crosshair_change(pcb_false); switch (funchash_get(function, NULL)) { Index: trunk/src/rats_act.c =================================================================== --- trunk/src/rats_act.c (revision 4834) +++ trunk/src/rats_act.c (revision 4835) @@ -71,13 +71,13 @@ static int ActionAddRats(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *function = ACTION_ARG(0); + const char *function = PCB_ACTION_ARG(0); pcb_rat_t *shorty; float len, small; if (function) { if (conf_core.temp.rat_warn) - ClearWarnings(); + pcb_clear_warnings(); switch (funchash_get(function, NULL)) { case F_AllRats: if (AddAllRats(pcb_false, NULL)) @@ -146,7 +146,7 @@ static int ActionConnection(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *function = ACTION_ARG(0); + const char *function = PCB_ACTION_ARG(0); if (function) { switch (funchash_get(function, NULL)) { case F_Find: @@ -180,7 +180,7 @@ return 0; } - AFAIL(connection); + PCB_AFAIL(connection); } /* --------------------------------------------------------------------------- */ @@ -195,10 +195,10 @@ static int ActionDeleteRats(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *function = ACTION_ARG(0); + const char *function = PCB_ACTION_ARG(0); if (function) { if (conf_core.temp.rat_warn) - ClearWarnings(); + pcb_clear_warnings(); switch (funchash_get(function, NULL)) { case F_AllRats: if (DeleteRats(pcb_false)) Index: trunk/src/remove_act.c =================================================================== --- trunk/src/remove_act.c (revision 4834) +++ trunk/src/remove_act.c (revision 4835) @@ -44,7 +44,7 @@ static int ActionDelete(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *function = ACTION_ARG(0); + const char *function = PCB_ACTION_ARG(0); int id = funchash_get(function, NULL); Note.X = Crosshair.X; @@ -59,7 +59,7 @@ case F_Object: SaveMode(); SetMode(PCB_MODE_REMOVE); - NotifyMode(); + pcb_notify_mode(); RestoreMode(); break; case F_Selected: Index: trunk/src/select_act.c =================================================================== --- trunk/src/select_act.c (revision 4834) +++ trunk/src/select_act.c (revision 4835) @@ -126,7 +126,7 @@ static int ActionSelect(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *function = ACTION_ARG(0); + const char *function = PCB_ACTION_ARG(0); if (function) { int type; @@ -155,13 +155,13 @@ commonByName: { - const char *pattern = ACTION_ARG(1); + const char *pattern = PCB_ACTION_ARG(1); pcb_search_method_t method = SM_REGEX; if (pattern || (pattern = gui_get_pat(&method)) != NULL) { if (SelectObjectByName(type, pattern, pcb_true, method)) SetChangedFlag(pcb_true); - if (ACTION_ARG(1) == NULL) + if (PCB_ACTION_ARG(1) == NULL) free((char*)pattern); } break; @@ -184,7 +184,7 @@ box.X2 = MAX(Crosshair.AttachedBox.Point1.X, Crosshair.AttachedBox.Point2.X); box.Y2 = MAX(Crosshair.AttachedBox.Point1.Y, Crosshair.AttachedBox.Point2.Y); notify_crosshair_change(pcb_false); - NotifyBlock(); + pcb_notify_block(); if (Crosshair.AttachedBox.State == STATE_THIRD && SelectBlock(&box, pcb_true)) { SetChangedFlag(pcb_true); Crosshair.AttachedBox.State = STATE_FIRST; @@ -236,7 +236,7 @@ break; default: - AFAIL(select); + PCB_AFAIL(select); break; } } @@ -285,7 +285,7 @@ static int ActionUnselect(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *function = ACTION_ARG(0); + const char *function = PCB_ACTION_ARG(0); if (function) { int type; switch (funchash_get(function, NULL)) { @@ -314,13 +314,13 @@ commonByName: { - const char *pattern = ACTION_ARG(1); + const char *pattern = PCB_ACTION_ARG(1); pcb_search_method_t method = SM_REGEX; if (pattern || (pattern = gui_get_pat(&method)) != NULL) { if (SelectObjectByName(type, pattern, pcb_false, method)) SetChangedFlag(pcb_true); - if (ACTION_ARG(1) == NULL) + if (PCB_ACTION_ARG(1) == NULL) free((char*)pattern); } break; @@ -336,7 +336,7 @@ box.X2 = MAX(Crosshair.AttachedBox.Point1.X, Crosshair.AttachedBox.Point2.X); box.Y2 = MAX(Crosshair.AttachedBox.Point1.Y, Crosshair.AttachedBox.Point2.Y); notify_crosshair_change(pcb_false); - NotifyBlock(); + pcb_notify_block(); if (Crosshair.AttachedBox.State == STATE_THIRD && SelectBlock(&box, pcb_false)) { SetChangedFlag(pcb_true); Crosshair.AttachedBox.State = STATE_FIRST; @@ -369,7 +369,7 @@ break; default: - AFAIL(unselect); + PCB_AFAIL(unselect); break; } Index: trunk/src/undo_act.c =================================================================== --- trunk/src/undo_act.c (revision 4834) +++ trunk/src/undo_act.c (revision 4835) @@ -81,7 +81,7 @@ int ActionAtomic(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { if (argc != 1) - AFAIL(atomic); + PCB_AFAIL(atomic); switch (funchash_get(argv[0], NULL)) { case F_Save: @@ -126,7 +126,7 @@ int ActionUndo(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *function = ACTION_ARG(0); + const char *function = PCB_ACTION_ARG(0); if (!function || !*function) { /* don't allow undo in the middle of an operation */ if (conf_core.editor.mode != PCB_MODE_POLYGON_HOLE && Crosshair.AttachedObject.State != STATE_FIRST) Index: trunk/src_plugins/autoroute/action.c =================================================================== --- trunk/src_plugins/autoroute/action.c (revision 4834) +++ trunk/src_plugins/autoroute/action.c (revision 4835) @@ -64,7 +64,7 @@ static int ActionAutoRoute(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { - const char *function = ACTION_ARG(0); + const char *function = PCB_ACTION_ARG(0); hid_action("Busy"); if (function) { /* one parameter */ if (strcmp(function, "AllRats") == 0) { Index: trunk/src_plugins/distalign/distalign.c =================================================================== --- trunk/src_plugins/distalign/distalign.c (revision 4834) +++ trunk/src_plugins/distalign/distalign.c (revision 4835) @@ -351,7 +351,7 @@ int changed = 0; if (argc < 1 || argc > 4) { - AFAIL(align); + PCB_AFAIL(align); } /* parse direction arg */ switch ((dir = keyword(ARG(0)))) { @@ -359,7 +359,7 @@ case K_Y: break; default: - AFAIL(align); + PCB_AFAIL(align); } /* parse point (within each element) which will be aligned */ switch ((point = keyword(ARG(1)))) { @@ -369,13 +369,13 @@ case K_Lefts: case K_Rights: if (dir == K_Y) { - AFAIL(align); + PCB_AFAIL(align); } break; case K_Tops: case K_Bottoms: if (dir == K_X) { - AFAIL(align); + PCB_AFAIL(align); } break; case K_none: @@ -382,7 +382,7 @@ point = K_Marks; /* default value */ break; default: - AFAIL(align); + PCB_AFAIL(align); } /* parse reference which will determine alignment coordinates */ switch ((reference = keyword(ARG(2)))) { @@ -395,7 +395,7 @@ reference = K_First; /* default value */ break; default: - AFAIL(align); + PCB_AFAIL(align); } /* optionally work off the grid (solar cells!) */ switch (keyword(ARG(3))) { @@ -406,7 +406,7 @@ gridless = 0; break; default: - AFAIL(align); + PCB_AFAIL(align); } /* find the final alignment coordinate using the above options */ q = reference_coord(K_align, Crosshair.X, Crosshair.Y, dir, point, reference); @@ -474,7 +474,7 @@ int i; if (argc < 1 || argc == 3 || argc > 4) { - AFAIL(distribute); + PCB_AFAIL(distribute); } /* parse direction arg */ switch ((dir = keyword(ARG(0)))) { @@ -482,7 +482,7 @@ case K_Y: break; default: - AFAIL(distribute); + PCB_AFAIL(distribute); } /* parse point (within each element) which will be distributed */ switch ((point = keyword(ARG(1)))) { @@ -493,13 +493,13 @@ case K_Lefts: case K_Rights: if (dir == K_Y) { - AFAIL(distribute); + PCB_AFAIL(distribute); } break; case K_Tops: case K_Bottoms: if (dir == K_X) { - AFAIL(distribute); + PCB_AFAIL(distribute); } break; case K_none: @@ -506,7 +506,7 @@ point = K_Marks; /* default value */ break; default: - AFAIL(distribute); + PCB_AFAIL(distribute); } /* parse reference which will determine first distribution coordinate */ switch ((refa = keyword(ARG(2)))) { @@ -519,7 +519,7 @@ refa = K_First; /* default value */ break; default: - AFAIL(distribute); + PCB_AFAIL(distribute); } /* parse reference which will determine final distribution coordinate */ switch ((refb = keyword(ARG(3)))) { @@ -532,10 +532,10 @@ refb = K_Last; /* default value */ break; default: - AFAIL(distribute); + PCB_AFAIL(distribute); } if (refa == refb) { - AFAIL(distribute); + PCB_AFAIL(distribute); } /* optionally work off the grid (solar cells!) */ switch (keyword(ARG(4))) { @@ -546,7 +546,7 @@ gridless = 0; break; default: - AFAIL(distribute); + PCB_AFAIL(distribute); } /* build list of elements in orthogonal axis order */ sort_elements_by_pos(K_distribute, dir, point); Index: trunk/src_plugins/distaligntext/distaligntext.c =================================================================== --- trunk/src_plugins/distaligntext/distaligntext.c (revision 4834) +++ trunk/src_plugins/distaligntext/distaligntext.c (revision 4835) @@ -293,7 +293,7 @@ int changed = 0; if (argc < 1 || argc > 4) { - AFAIL(aligntext); + PCB_AFAIL(aligntext); } /* parse direction arg */ switch ((dir = keyword(ARG(0)))) { @@ -301,7 +301,7 @@ case K_Y: break; default: - AFAIL(aligntext); + PCB_AFAIL(aligntext); } /* parse point (within each element) which will be aligned */ switch ((point = keyword(ARG(1)))) { @@ -310,13 +310,13 @@ case K_Lefts: case K_Rights: if (dir == K_Y) { - AFAIL(aligntext); + PCB_AFAIL(aligntext); } break; case K_Tops: case K_Bottoms: if (dir == K_X) { - AFAIL(aligntext); + PCB_AFAIL(aligntext); } break; case K_none: /* default value */ @@ -328,7 +328,7 @@ } break; default: - AFAIL(aligntext); + PCB_AFAIL(aligntext); } /* parse reference which will determine alignment coordinates */ switch ((reference = keyword(ARG(2)))) { @@ -341,7 +341,7 @@ reference = K_First; /* default value */ break; default: - AFAIL(aligntext); + PCB_AFAIL(aligntext); } /* optionally work off the grid (solar cells!) */ switch (keyword(ARG(3))) { @@ -352,7 +352,7 @@ gridless = 0; break; default: - AFAIL(aligntext); + PCB_AFAIL(aligntext); } SaveUndoSerialNumber(); /* find the final alignment coordinate using the above options */ @@ -452,7 +452,7 @@ int i; if (argc < 1 || argc == 3 || argc > 4) { - AFAIL(distributetext); + PCB_AFAIL(distributetext); } /* parse direction arg */ switch ((dir = keyword(ARG(0)))) { @@ -460,7 +460,7 @@ case K_Y: break; default: - AFAIL(distributetext); + PCB_AFAIL(distributetext); } /* parse point (within each element) which will be distributed */ switch ((point = keyword(ARG(1)))) { @@ -470,13 +470,13 @@ case K_Lefts: case K_Rights: if (dir == K_Y) { - AFAIL(distributetext); + PCB_AFAIL(distributetext); } break; case K_Tops: case K_Bottoms: if (dir == K_X) { - AFAIL(distributetext); + PCB_AFAIL(distributetext); } break; case K_none: /* default value */ @@ -488,7 +488,7 @@ } break; default: - AFAIL(distributetext); + PCB_AFAIL(distributetext); } /* parse reference which will determine first distribution coordinate */ switch ((refa = keyword(ARG(2)))) { @@ -501,7 +501,7 @@ refa = K_First; /* default value */ break; default: - AFAIL(distributetext); + PCB_AFAIL(distributetext); } /* parse reference which will determine final distribution coordinate */ switch ((refb = keyword(ARG(3)))) { @@ -514,10 +514,10 @@ refb = K_Last; /* default value */ break; default: - AFAIL(distributetext); + PCB_AFAIL(distributetext); } if (refa == refb) { - AFAIL(distributetext); + PCB_AFAIL(distributetext); } /* optionally work off the grid (solar cells!) */ switch (keyword(ARG(4))) { @@ -528,7 +528,7 @@ gridless = 0; break; default: - AFAIL(distributetext); + PCB_AFAIL(distributetext); } SaveUndoSerialNumber(); /* build list of texts in orthogonal axis order */ Index: trunk/src_plugins/hid_gtk/gtkhid-main.c =================================================================== --- trunk/src_plugins/hid_gtk/gtkhid-main.c (revision 4834) +++ trunk/src_plugins/hid_gtk/gtkhid-main.c (revision 4835) @@ -206,7 +206,7 @@ double v; if (argc > 1) - AFAIL(zoom); + PCB_AFAIL(zoom); if (argc < 1) { ghid_zoom_view_fit(); @@ -1500,7 +1500,7 @@ int pointer_x, pointer_y; if (argc != 0) - AFAIL(center); + PCB_AFAIL(center); /* Aim to put the given x, y PCB coordinates in the center of the widget */ widget_x = gport->width / 2; @@ -1585,7 +1585,7 @@ double dx, dy; if (argc != 4) - AFAIL(cursor); + PCB_AFAIL(cursor); if (strcasecmp(argv[0], "pan") == 0) pan_warp = HID_SC_PAN_VIEWPORT; @@ -1592,7 +1592,7 @@ else if (strcasecmp(argv[0], "warp") == 0) pan_warp = HID_SC_WARP_POINTER; else - AFAIL(cursor); + PCB_AFAIL(cursor); dx = GetValueEx(argv[1], argv[3], NULL, extra_units_x, "", NULL); if (conf_core.editor.view.flip_x) @@ -1682,7 +1682,7 @@ ghid_search_window_show(raise); } else { - AFAIL(dowindows); + PCB_AFAIL(dowindows); } return 0; @@ -1756,7 +1756,7 @@ return 0; if (argc != 1 && argc != 2) - AFAIL(scroll); + PCB_AFAIL(scroll); if (argc == 2) div = atoi(argv[1]); @@ -1770,7 +1770,7 @@ else if (strcasecmp(argv[0], "left") == 0) dx = -gport->view.width / div; else - AFAIL(scroll); + PCB_AFAIL(scroll); ghid_pan_view_rel(dx, dy); @@ -1798,7 +1798,7 @@ return 0; if (argc != 1 && argc != 2) - AFAIL(pan); + PCB_AFAIL(pan); if (argc == 1) mode = atoi(argv[0]); @@ -1832,7 +1832,7 @@ char name[256]; if (argc != 1 && argc != 2) - AFAIL(popup); + PCB_AFAIL(popup); if (strlen(argv[0]) < sizeof(name)-32) { lht_node_t *menu_node; Index: trunk/src_plugins/hid_gtk/gui-top-window.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-top-window.c (revision 4834) +++ trunk/src_plugins/hid_gtk/gui-top-window.c (revision 4835) @@ -1579,7 +1579,7 @@ #endif if (argc == 0) { - AFAIL(toggleview); + PCB_AFAIL(toggleview); } if (isdigit((int) argv[0][0])) { l = atoi(argv[0]) - 1; @@ -1604,7 +1604,7 @@ break; } if (l == -1) { - AFAIL(toggleview); + PCB_AFAIL(toggleview); } } @@ -1631,7 +1631,7 @@ { int newl; if (argc == 0) - AFAIL(selectlayer); + PCB_AFAIL(selectlayer); if (strcasecmp(argv[0], "silk") == 0) newl = LAYER_BUTTON_SILK; @@ -1721,7 +1721,7 @@ static int AdjustStyle(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { if (argc > 1) - AFAIL(adjuststyle); + PCB_AFAIL(adjuststyle); ghid_route_style_selector_edit_dialog(GHID_ROUTE_STYLE_SELECTOR(ghidgui->route_style_selector)); return 0; @@ -1745,7 +1745,7 @@ { if (argc != 0) - AFAIL(editlayergroups); + PCB_AFAIL(editlayergroups); hid_actionl("DoWindows", "Preferences", NULL); Index: trunk/src_plugins/hid_lesstif/main.c =================================================================== --- trunk/src_plugins/hid_lesstif/main.c (revision 4834) +++ trunk/src_plugins/hid_lesstif/main.c (revision 4835) @@ -847,7 +847,7 @@ extra_units_y[2].scale = PCB->MaxHeight; if (argc != 4) - AFAIL(cursor); + PCB_AFAIL(cursor); if (strcasecmp(argv[0], "pan") == 0) pan_warp = HID_SC_PAN_VIEWPORT; @@ -854,7 +854,7 @@ else if (strcasecmp(argv[0], "warp") == 0) pan_warp = HID_SC_WARP_POINTER; else - AFAIL(cursor); + PCB_AFAIL(cursor); dx = GetValueEx(argv[1], argv[3], NULL, extra_units_x, "mil", NULL); if (conf_core.editor.view.flip_x) Index: trunk/src_plugins/import_dsn/dsn.c =================================================================== --- trunk/src_plugins/import_dsn/dsn.c (revision 4834) +++ trunk/src_plugins/import_dsn/dsn.c (revision 4835) @@ -105,7 +105,7 @@ "This file could be generated by freeroute.net\n"), default_file, ".ses", "ses", HID_FILESELECT_READ); if (fname == NULL) - AFAIL(load_dsn); + PCB_AFAIL(load_dsn); if (default_file != NULL) { free(default_file); default_file = NULL; Index: trunk/src_plugins/import_hyp/import_hyp.c =================================================================== --- trunk/src_plugins/import_hyp/import_hyp.c (revision 4834) +++ trunk/src_plugins/import_hyp/import_hyp.c (revision 4835) @@ -61,11 +61,11 @@ } if (fname == NULL) - AFAIL(load_hyp); + PCB_AFAIL(load_hyp); hyp_in = fopen(fname, "r"); if (hyp_in == NULL) - AFAIL(load_hyp); + PCB_AFAIL(load_hyp); hyp_parse(); Index: trunk/src_plugins/import_sch/import_sch.c =================================================================== --- trunk/src_plugins/import_sch/import_sch.c (revision 4834) +++ trunk/src_plugins/import_sch/import_sch.c (revision 4835) @@ -179,14 +179,14 @@ printf("ActionImport: =========== Entering ActionImport ============\n"); #endif - mode = ACTION_ARG(0); + mode = PCB_ACTION_ARG(0); if (mode && strcasecmp(mode, "setdisperse") == 0) { const char *ds, *units; char buf[50]; - ds = ACTION_ARG(1); - units = ACTION_ARG(2); + ds = PCB_ACTION_ARG(1); + units = PCB_ACTION_ARG(2); if (!ds) { const char *as = AttributeGet(PCB, "import::disperse"); ds = gui->prompt_for(_("Enter dispersion:"), as ? as : "0"); @@ -197,7 +197,7 @@ } else AttributePut(PCB, "import::disperse", ds); - if (ACTION_ARG(1) == NULL) + if (PCB_ACTION_ARG(1) == NULL) free((char*)ds); return 0; } @@ -207,9 +207,9 @@ pcb_coord_t x, y; char buf[50]; - xs = ACTION_ARG(1); - ys = ACTION_ARG(2); - units = ACTION_ARG(3); + xs = PCB_ACTION_ARG(1); + ys = PCB_ACTION_ARG(2); + units = PCB_ACTION_ARG(3); if (!xs) { gui->get_coords(_("Click on a location"), &x, &y); Index: trunk/src_plugins/report/report.c =================================================================== --- trunk/src_plugins/report/report.c (revision 4834) +++ trunk/src_plugins/report/report.c (revision 4835) @@ -887,7 +887,7 @@ else if (argc == 2) AUSAGE(report); else - AFAIL(report); + PCB_AFAIL(report); return 1; } Index: trunk/src_plugins/smartdisperse/smartdisperse.c =================================================================== --- trunk/src_plugins/smartdisperse/smartdisperse.c (revision 4834) +++ trunk/src_plugins/smartdisperse/smartdisperse.c (revision 4835) @@ -156,7 +156,7 @@ all = 0; } else { - AFAIL(smartdisperse); + PCB_AFAIL(smartdisperse); } Nets = ProcNetlist(&PCB->NetlistLib[0]); Index: trunk/src_plugins/vendordrill/vendor.c =================================================================== --- trunk/src_plugins/vendordrill/vendor.c (revision 4834) +++ trunk/src_plugins/vendordrill/vendor.c (revision 4835) @@ -173,7 +173,7 @@ "particular vendor as well as a list of\n" "predefined drills which are allowed."), default_file, ".res", "vendor", HID_FILESELECT_READ); if (fname == NULL) - AFAIL(load_vendor); + PCB_AFAIL(load_vendor); free_fname = pcb_true;