Invert the given list, can handle NULL as an input. */
| 2624 | |
| 2625 | /* Invert the given list, can handle NULL as an input. */ |
| 2626 | static tty_menu_item * |
| 2627 | reverse(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 | |
| 2640 | static color_attr tty_menu_promptstyle = { NO_COLOR, ATR_NONE }; |
| 2641 |