| 6736 | } |
| 6737 | |
| 6738 | staticfn int |
| 6739 | length_without_val(const char *user_string, int len) |
| 6740 | { |
| 6741 | const char *p = strchr(user_string, ':'), |
| 6742 | *q = strchr(user_string, '='); |
| 6743 | |
| 6744 | if (!p || (q && q < p)) |
| 6745 | p = q; |
| 6746 | if (p) { |
| 6747 | /* 'user_string' hasn't necessarily been through mungspaces() |
| 6748 | so might have tabs or consecutive spaces */ |
| 6749 | while (p > user_string && isspace((uchar) *(p - 1))) |
| 6750 | p--; |
| 6751 | len = (int) (p - user_string); |
| 6752 | } |
| 6753 | return len; |
| 6754 | } |
| 6755 | |
| 6756 | /* check whether a user-supplied option string is a proper leading |
| 6757 | substring of a particular option name; option string might have |
no test coverage detected