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