[patch] Let indent(1) handle widecharacter literals correctly

Peter Jeremy peterjeremy at acm.org
Fri Jan 22 10:45:06 UTC 2010


On 2010-Jan-21 22:05:23 +0100, Tobias Rehbein <tobias.rehbein at web.de> wrote:
>I am not subscribed to this list, so please answer me off-list or cc me.
>
>I noticed that indent(1) handles widecharacter literals (e.g. L'c' or L"string")
>incorrectly. indent(1)s parser treats the L-prefix and the quoted part as
>seperate tokens. The result is:
>
>        L'c'            ->      L 'c'
>        L"string"       ->      L "string"

Thank you for noticing that.  Can you please submit your patch as a PR
so it doesn't get lost (send-pr(1)).

>Of course this breaks any code using widecharacters. As I use indent(1) quite
>extensively I decided to fix this issue. As this is my first patch against the
>FreeBSD user land feel free to comment!

I don't know indent(1) well enough to comment on the functional
aspects but there are some style issues with the patch.  Two lines are
longer than 80 characters and the indenting doesn't align - see
style(9).

-- 
Peter Jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20100122/e30a90ea/attachment.pgp


More information about the freebsd-current mailing list