[rb-general] BUILD_PATH_PREFIX_MAP format spec, draft #1
Chris Lamb
lamby at debian.org
Sun Jan 22 07:43:58 CET 2017
Ximin Luo wrote:
> case ':':
> case '=':
> return 0; // invalid, should have been escaped
> case '%':
> if (!(x[0] = *++src) || !(x[1] = *++src))
> return 0; // invalid, past end of string
> sscanf(x, "%2hhx", &c); // could be more efficient but my C-foo is low
> if (errno != 0)
> return 0; // invalid, not valid hex
> *dest = c;
> break;
> default:
> *dest = *src;
I'm afraid I'm still extremely bullish on this encoding question to the
point where it's even difficult to analyse the rest of the draft. :/
Whilst I can see the technical merit of allowing colons, requiring such
code just seems like an *awfully* bad smell for a specification we want
people to actually implement.
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby at debian.org / chris-lamb.co.uk
`-
More information about the rb-general
mailing list