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

Function cmdq_reverse

src/cmd.c:372–384  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

370}
371
372struct _cmd_queue *
373cmdq_reverse(struct _cmd_queue *head)
374{
375 struct _cmd_queue *prev = NULL, *curr = head, *next;
376
377 while (curr) {
378 next = curr->next;
379 curr->next = prev;
380 prev = curr;
381 curr = next;
382 }
383 return prev;
384}
385
386struct _cmd_queue *
387cmdq_copy(int q)

Callers 1

cmdq_copyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected