| 57 | } |
| 58 | |
| 59 | static void strip(char *str) |
| 60 | { |
| 61 | char *p = str; |
| 62 | int l; |
| 63 | |
| 64 | while ((isspace(*p))) |
| 65 | p++; |
| 66 | l = strlen(p); |
| 67 | if (p != str) |
| 68 | memmove(str, p, l + 1); |
| 69 | if (!l) |
| 70 | return; |
| 71 | p = str + l - 1; |
| 72 | while ((isspace(*p))) |
| 73 | *p-- = 0; |
| 74 | } |
| 75 | |
| 76 | /* Helper function to facilitate fgets() by Jean Sacren. */ |
| 77 | static void xfgets(char *str, int size, FILE *in) |
no test coverage detected