version 1.43, 2008/02/20 13:55:50
|
version 1.44, 2008/04/11 18:02:26
|
|
|
} | } |
} | } |
| |
// We encountered a the end_char or a zero-terminator. |
|
|
|
*q = *p; |
|
|
|
// Remove single trailing whitespace (consecutive whitespaces already | // Remove single trailing whitespace (consecutive whitespaces already |
// compressed above). Since p >= q, we can tell if we need to strip a | // compressed above). Since p >= q, we can tell if we need to strip a |
// trailing space from q by looking at the end of p. We must not look at | // trailing space from q by looking at the end of p. We must not look at |
// the last character of p, though, if p is an empty string. | // the last character of p, though, if p is an empty string. |
|
Boolean adjust_q = (p != start) && _isspace(p[-1]); |
|
|
|
// We encountered a the end_char or a zero-terminator. |
|
|
|
*q = *p; |
| |
if ((p != start) && _isspace(p[-1])) |
if (adjust_q) |
{ | { |
q--; | q--; |
} | } |