Eric Blake <[EMAIL PROTECTED]> writes:

> So am I allowed to assume 8-bit chars, or should I add code that checks
> for char overflow, one hex digit at a time?  And with 8-bit chars, should
> "\x100" parse as "\x10" "0", or should it raise a parse error?

Nevermind....  I see now that printf.c bypasses all this gorp and says
only that \x takes 1 or 2 hex digits.  Let's just do that.  The
C rule is weird.

> Also, should I try to attempt fixes where ls assumes ASCII?

I wouldn't bother, unless you have an EBCDIC host to test your results
on.  I suppose it wouldn't hurt to add a comment that the current code
assumes something like ASCII.

> -           state = ST_OCTAL; /* Octal sequence */
> +           state = ST_OCTAL2;        /* Octal sequence, max 2 chars */

This doesn't look right; surely "\400" should be an error, not '\40'
followed by '0'.


_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to