+
+ if (!iswalnum(prev)) {
+ /* special characters, like separators and decimal marks
+ * and signs, must be followed by a hexdigit, and the
+ * space and signs must be followed by a decimal digit.
+ */
+ if (!iswxdigit(ch) ||
+ ((prev == '-' || prev == '+') && !iswdigit(ch)) ||
+ (prev == ' ' && !iswdigit(ch))) {
+ /* don't want the new char or the special */
+ restore_unget_state(state);
+ break;
+ }
+ }
+ if (iswalnum(ch))