static inline bool is_ident_char(char s)
{
return ((s >= 'a' && s <= 'z')
|| (s >= 'A' && s <= 'Z')
|| (s >= '0' && s <= '9')
|| s == '_'
);
}
static inline bool is_space(char s)
{
return (s == ' ' || s == '\t');
}
static void qRemoveWhitespace(const char *s, char *d) { char last = 0; while (*s && is_space(*s)) s++; while (*s) { while (*s && !is_space(*s)) last = *d++ = *s++; while (*s && is_space(*s)) s++; if (*s && ((is_ident_char(*s) && is_ident_char(last)) || ((*s == ':') && (last == '<')))) { last = *d++ = ' '; } } *d = '\0'; }