Index: conf_act.c =================================================================== --- conf_act.c (revision 5094) +++ conf_act.c (revision 5095) @@ -30,13 +30,13 @@ #include "error.h" #include "hid.h" -static const char conf_syntax[] = +static const char pcb_acts_Conf[] = "conf(set, path, value, [role], [policy]) - change a config setting\n" "conf(toggle, path, [role]) - invert boolean value of a flag; if no role given, overwrite the highest prio config\n" "conf(reset, role) - reset the in-memory lihata of a role\n" "conf(iseq, path, value) - returns whether the value of a conf item matches value (for menu checked's)\n" ; -static const char conf_help[] = "Perform various operations on the configuration tree."; +static const char pcb_acth_Conf[] = "Perform various operations on the configuration tree."; extern lht_doc_t *conf_root[]; static inline int conf_iseq_pf(void *ctx, const char *fmt, ...) @@ -49,7 +49,7 @@ return res; } -static int ActionConf(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) +static int pcb_act_Conf(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { const char *cmd = argc > 0 ? argv[0] : 0; @@ -186,7 +186,7 @@ /*------------ get/chk (check flag actions for menus) ------------------*/ static const char GetStyle_syntax[] = "GetStyle()" ; static const char GetStyle_help[] = "Return integer index (>=0) of the currently active style or -1 if no style is selected (== custom style)"; -static int ActionGetStyle(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) +static int pcb_act_GetStyle(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { return pcb_route_style_lookup(&PCB->RouteStyle, conf_core.design.line_thickness, conf_core.design.via_thickness, conf_core.design.via_drilling_hole, conf_core.design.clearance, NULL); } @@ -193,7 +193,7 @@ static const char ChkMode_syntax[] = "ChkMode(expected_mode)" ; static const char ChkMode_help[] = "Return 1 if the currently selected mode is the expected_mode"; -static int ActionChkMode(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) +static int pcb_act_ChkMode(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { #warning TODO: convert this to a compile-time hash struct { @@ -236,7 +236,7 @@ "ChkGridSize(none)\n" ; static const char ChkGridSize_help[] = "Return 1 if the currently selected grid matches the expected_size. If argument is \"none\" return 1 if there is no grid."; -static int ActionChkGridSize(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) +static int pcb_act_ChkGridSize(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { assert(argc == 1); if (strcmp(argv[0], "none") == 0) @@ -251,7 +251,7 @@ "ChkElementName(3) - expect value\n" ; static const char ChkElementName_help[] = "Return 1 if currently shown element label (name) type matches the expected"; -static int ActionChkElementName(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) +static int pcb_act_ChkElementName(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { int have, expected = argv[0][0] - '0'; @@ -265,7 +265,7 @@ static const char ChkGridUnits_syntax[] = "ChkGridUnits(expected)"; static const char ChkGridUnits_help[] = "Return 1 if currently selected grid unit matches the expected (normally mm or mil)"; -static int ActionChkGridUnits(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) +static int pcb_act_ChkGridUnits(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { assert(argc == 1); return strcmp(conf_core.editor.grid_unit->suffix, argv[0]) == 0; @@ -273,7 +273,7 @@ static const char ChkBuffer_syntax[] = "ChkBuffer(idx)"; static const char ChkBuffer_help[] = "Return 1 if currently selected buffer's index matches idx"; -static int ActionChkBuffer(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) +static int pcb_act_ChkBuffer(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y) { int expected = argv[0][0] - '0'; assert(argc == 1); @@ -282,25 +282,25 @@ } pcb_hid_action_t conf_action_list[] = { - {"conf", 0, ActionConf, - conf_help, conf_syntax} + {"conf", 0, pcb_act_Conf, + pcb_acth_Conf, pcb_acts_Conf} , - {"GetStyle", 0, ActionGetStyle, + {"GetStyle", 0, pcb_act_GetStyle, GetStyle_help, GetStyle_syntax} , - {"ChkMode", 0, ActionChkMode, + {"ChkMode", 0, pcb_act_ChkMode, ChkMode_help, ChkMode_syntax} , - {"ChkGridSize", 0, ActionChkGridSize, + {"ChkGridSize", 0, pcb_act_ChkGridSize, ChkGridSize_help, ChkGridSize_syntax} , - {"ChkElementName", 0, ActionChkElementName, + {"ChkElementName", 0, pcb_act_ChkElementName, ChkElementName_help, ChkElementName_syntax} , - {"ChkGridUnits", 0, ActionChkGridUnits, + {"ChkGridUnits", 0, pcb_act_ChkGridUnits, ChkGridUnits_help, ChkGridUnits_syntax} , - {"ChkBuffer", 0, ActionChkBuffer, + {"ChkBuffer", 0, pcb_act_ChkBuffer, ChkBuffer_help, ChkBuffer_syntax} };