bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dircolors database documentation


From: Paul Eggert
Subject: Re: dircolors database documentation
Date: Thu, 20 Oct 2005 12:33:27 -0700
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

Eric Blake <address@hidden> 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'.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]