/* parses and copies one argument enclosed in del from *sp to *dp, recognising the \x special. returns pointer to the copied argument or NULL in case of an error (and sets err) or null argument length.  */
static char* scanarg(char *s, char del)
/* parses and copies one argument enclosed in del from *sp to *dp, recognising the \x special. returns pointer to the copied argument or NULL in case of an error (and sets err) or null argument length.  */
static char* scanarg(char *s, char del)
{
	char c;
	while ((c = *s++) != del) {
		if (c == '\\' && *s == 'x') {
			s++;
			if (!isxdigit(*s++))
				return NULL;
			if (!isxdigit(*s++))
				return NULL;
		}
	}
	return s;
}