10 #include "../common/common.h"
14 static int ipc_unmarshall_a
__P((IPVIWIN
*, IP_BUF
*, IPFunc
));
15 static int ipc_unmarshall_12
__P((IPVIWIN
*, IP_BUF
*, IPFunc
));
16 static int ipc_unmarshall
__P((IPVIWIN
*, IP_BUF
*, IPFunc
));
17 static int ipc_unmarshall_ab1
__P((IPVIWIN
*, IP_BUF
*, IPFunc
));
18 static int ipc_unmarshall_1a
__P((IPVIWIN
*, IP_BUF
*, IPFunc
));
19 static int ipc_unmarshall_1
__P((IPVIWIN
*, IP_BUF
*, IPFunc
));
20 static int ipc_unmarshall_123
__P((IPVIWIN
*, IP_BUF
*, IPFunc
));
22 #define OFFSET(t,m) ((size_t)&((t *)0)->m)
24 IPFUNLIST
const ipfuns
[] = {
26 {"a", ipc_unmarshall_a
, OFFSET(IPSIOPS
, addstr
)},
28 {"12", ipc_unmarshall_12
, OFFSET(IPSIOPS
, attribute
)},
30 {"", ipc_unmarshall
, OFFSET(IPSIOPS
, bell
)},
32 {"", ipc_unmarshall
, OFFSET(IPSIOPS
, busy_off
)},
34 {"a", ipc_unmarshall_a
, OFFSET(IPSIOPS
, busy_on
)},
36 {"", ipc_unmarshall
, OFFSET(IPSIOPS
, clrtoeol
)},
38 {"", ipc_unmarshall
, OFFSET(IPSIOPS
, deleteln
)},
40 {"", ipc_unmarshall
, OFFSET(IPSIOPS
, discard
)},
42 {"ab1", ipc_unmarshall_ab1
, OFFSET(IPSIOPS
, editopt
)},
44 {"", ipc_unmarshall
, OFFSET(IPSIOPS
, insertln
)},
46 {"12", ipc_unmarshall_12
, OFFSET(IPSIOPS
, move
)},
48 {"", ipc_unmarshall
, OFFSET(IPSIOPS
, quit
)},
50 {"", ipc_unmarshall
, OFFSET(IPSIOPS
, redraw
)},
52 {"", ipc_unmarshall
, OFFSET(IPSIOPS
, refresh
)},
54 {"a", ipc_unmarshall_a
, OFFSET(IPSIOPS
, rename
)},
58 {"1", ipc_unmarshall_1
, OFFSET(IPSIOPS
, rewrite
)},
60 {"123", ipc_unmarshall_123
, OFFSET(IPSIOPS
, scrollbar
)},
62 {"a", ipc_unmarshall_a
, OFFSET(IPSIOPS
, select
)},
64 {"", ipc_unmarshall
, OFFSET(IPSIOPS
, split
)},
66 {"a", ipc_unmarshall_a
, OFFSET(IPSIOPS
, waddstr
)},
71 ipc_unmarshall_a(ipvi
, ipb
, func
)
76 return ((IPFunc_a
)func
)(ipvi
, ipb
->str1
, ipb
->len1
);
80 ipc_unmarshall_12(ipvi
, ipb
, func
)
85 return ((IPFunc_12
)func
)(ipvi
, ipb
->val1
, ipb
->val2
);
89 ipc_unmarshall(ipvi
, ipb
, func
)
98 ipc_unmarshall_ab1(ipvi
, ipb
, func
)
103 return ((IPFunc_ab1
)func
)(ipvi
, ipb
->str1
, ipb
->len1
, ipb
->str2
, ipb
->len2
, ipb
->val1
);
107 ipc_unmarshall_1a(ipvi
, ipb
, func
)
112 return ((IPFunc_1a
)func
)(ipvi
, ipb
->val1
, ipb
->str1
, ipb
->len1
);
116 ipc_unmarshall_1(ipvi
, ipb
, func
)
121 return ((IPFunc_1
)func
)(ipvi
, ipb
->val1
);
125 ipc_unmarshall_123(ipvi
, ipb
, func
)
130 return ((IPFunc_123
)func
)(ipvi
, ipb
->val1
, ipb
->val2
, ipb
->val3
);