| 691 | |
| 692 | |
| 693 | void |
| 694 | curses_rtrim(char *str) |
| 695 | { |
| 696 | char *s; |
| 697 | |
| 698 | for (s = str; *s != '\0'; ++s); |
| 699 | if (s > str) |
| 700 | for (--s; isspace(*s) && s > str; --s); |
| 701 | if (s == str) |
| 702 | *s = '\0'; |
| 703 | else |
| 704 | *(++s) = '\0'; |
| 705 | } |
| 706 | |
| 707 | |
| 708 | /* Read numbers until non-digit is encountered, and return number |
no test coverage detected