/* Parse a octal encoded character starting at index i in string s. The resulting character will be returned and the index i will be updated to point at the character directly after the end of the encoding, this may be the '\0' terminator of the string.  */
static char get_oct_char(const char *s, int *i)
/* Parse a octal encoded character starting at index i in string s. The resulting character will be returned and the index i will be updated to point at the character directly after the end of the encoding, this may be the '\0' terminator of the string.  */
static char get_oct_char(const char *s, int *i)
{
	char x[4];
	char *endx;
	long val;
	x[3] = '\0';
	strncpy(x, s + *i, 3);
	val = strtol(x, &endx, 8);
	assert(endx > x);
	(*i) += endx - x;
	return val;
}