MCPcopy Index your code
hub / github.com/NetHack/NetHack / cmdq_add_ec

Function cmdq_add_ec

src/cmd.c:253–270  ·  view source on GitHub ↗

add extended command function to the command queue */

Source from the content-addressed store, hash-verified

251
252/* add extended command function to the command queue */
253void
254cmdq_add_ec(int q, int (*fn)(void))
255{
256 struct _cmd_queue *tmp = (struct _cmd_queue *) alloc(sizeof *tmp);
257 struct _cmd_queue *cq = gc.command_queue[q];
258
259 tmp->typ = CMDQ_EXTCMD;
260 tmp->ec_entry = ext_func_tab_from_func(fn);
261 tmp->next = NULL;
262
263 while (cq && cq->next)
264 cq = cq->next;
265
266 if (cq)
267 cq->next = tmp;
268 else
269 gc.command_queue[q] = tmp;
270}
271
272/* add a key to the command queue */
273void

Callers 15

fuzzer_savelifeFunction · 0.85
itemactions_pushkeysFunction · 0.85
use_pick_axeFunction · 0.85
doprayFunction · 0.85
dofireFunction · 0.85
doopen_indirFunction · 0.85
do_loot_contFunction · 0.85
dorubFunction · 0.85
use_whipFunction · 0.85
use_poleFunction · 0.85
use_grappleFunction · 0.85
rhackFunction · 0.85

Calls 2

ext_func_tab_from_funcFunction · 0.85
allocFunction · 0.70

Tested by

no test coverage detected