MCPcopy Create free account
hub / github.com/NetHack/NetHack / cmdq_add_userinput

Function cmdq_add_userinput

src/cmd.c:315–331  ·  view source on GitHub ↗

add placeholder to the command queue, allows user input there */

Source from the content-addressed store, hash-verified

313
314/* add placeholder to the command queue, allows user input there */
315void
316cmdq_add_userinput(int q)
317{
318 struct _cmd_queue *tmp = (struct _cmd_queue *) alloc(sizeof *tmp);
319 struct _cmd_queue *cq = gc.command_queue[q];
320
321 tmp->typ = CMDQ_USER_INPUT;
322 tmp->next = NULL;
323
324 while (cq && cq->next)
325 cq = cq->next;
326
327 if (cq)
328 cq->next = tmp;
329 else
330 gc.command_queue[q] = tmp;
331}
332
333/* add integer to the command queue */
334void

Callers 1

act_on_actFunction · 0.85

Calls 1

allocFunction · 0.70

Tested by

no test coverage detected