chiark
/
gitweb
/
~ian
/
innduct.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5a29e8b
)
poke => prod/next
author
Ian Jackson
<ian@davenant.greenend.org.uk>
Fri, 30 Apr 2010 23:32:15 +0000
(
00:32
+0100)
committer
Ian Jackson
<ian@davenant.greenend.org.uk>
Fri, 30 Apr 2010 23:32:15 +0000
(
00:32
+0100)
backends/innduct.c
patch
|
blob
|
history
diff --git
a/backends/innduct.c
b/backends/innduct.c
index b08205ca4156681b9404caa0590f8579bf946138..c9878f2da72fac59665304b2ebb4b7de3b0fbfd2 100644
(file)
--- 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(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 },
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 }
};
{ "wedge blscan", ccmd_setint, &until_backlog_nextscan, -1 },
{ 0 }
};