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

Function cmdq_pop

src/cmd.c:409–420  ·  view source on GitHub ↗

pop off the topmost command from the command queue. * caller is responsible for freeing the returned _cmd_queue. */

Source from the content-addressed store, hash-verified

407 * caller is responsible for freeing the returned _cmd_queue.
408 */
409struct _cmd_queue *
410cmdq_pop(void)
411{
412 int q = (gi.in_doagain) ? CQ_REPEAT : CQ_CANNED;
413 struct _cmd_queue *tmp = gc.command_queue[q];
414
415 if (tmp) {
416 gc.command_queue[q] = tmp->next;
417 tmp->next = NULL;
418 }
419 return tmp;
420}
421
422/* get the top entry without popping it */
423struct _cmd_queue *

Callers 11

docallcmdFunction · 0.85
remarm_swapwepFunction · 0.85
getobjFunction · 0.85
display_inventoryFunction · 0.85
getlinFunction · 0.85
getspellFunction · 0.85
do_lookFunction · 0.85
rhackFunction · 0.85
getdirFunction · 0.85
yn_functionFunction · 0.85
getposFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected