From e5b7e1a6a1a47fd2dab89deff499daa58acd7d7e Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 1 May 2010 00:32:15 +0100 Subject: [PATCH] poke => prod/next --- backends/innduct.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/backends/innduct.c b/backends/innduct.c index b08205c..c9878f2 100644 --- a/backends/innduct.c +++ b/backends/innduct.c @@ -787,14 +787,20 @@ CCMD(help) { CCMD(period) { period(); } CCMD(setintarg) { *(int*)c->xdata= atoi(arg); } CCMD(setint) { *(int*)c->xdata= c->xval; } +CCMD(setint_period) { *(int*)c->xdata= c->xval; period(); } static const ControlCommand control_commands[]= { { "h", ccmd_help }, { "p", ccmd_period }, { "pretend flush", ccmd_setintarg, &simulate_flush }, - { "poke sm", ccmd_setint, &sm_period_counter, 1 }, - { "poke conn", ccmd_setint, &until_connect, 0 }, - { "poke blscan", ccmd_setint, &until_backlog_nextscan, 0 }, + +#define POKES(cmd,func) \ + { cmd " sm", func, &sm_period_counter, 1 }, \ + { cmd " conn", func, &until_connect, 0 }, \ + { cmd " blscan", func, &until_backlog_nextscan, 0 }, +POKES("prod ", ccmd_setint_period) +POKES("next ", ccmd_setint) + { "wedge blscan", ccmd_setint, &until_backlog_nextscan, -1 }, { 0 } }; -- 2.30.2