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

Function reverse

win/tty/wintty.c:2626–2638  ·  view source on GitHub ↗

Invert the given list, can handle NULL as an input. */

Source from the content-addressed store, hash-verified

2624
2625/* Invert the given list, can handle NULL as an input. */
2626static tty_menu_item *
2627reverse(tty_menu_item *curr)
2628{
2629 tty_menu_item *next, *head = 0;
2630
2631 while (curr) {
2632 next = curr->next;
2633 curr->next = head;
2634 head = curr;
2635 curr = next;
2636 }
2637 return head;
2638}
2639
2640static color_attr tty_menu_promptstyle = { NO_COLOR, ATR_NONE };
2641

Callers 1

tty_end_menuFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected