Re: [PATCH 4/5] update_unicode.sh: Make the output structure visible

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

 



On 19.12.14 16:22, Jeff King wrote:
> On Fri, Dec 19, 2014 at 03:39:30PM +0100, dev+git@xxxxxxxxx wrote:
> 
>> By using printf instead of the echo/uniset sequence, the final structure
>> of the generated file becomes obvious.
> 
> This whole series looks pretty sane to me, and the result is easier to
> read.
> 
> I did wonder if a here-doc would be even easier than a PDF, like:
> 
>   cat >$UNICODEWIDTH_H <<-EOF
>   static const struct interval zero_width[] = {
>     $(uniset/uniset --32 cat:Me,Mn,Cf + U+1160..U+11FF - U+00AD | grep -v plane)
>   };
>   static const struct interval double_width[] = {
>     $(uniset/uniset --32 eaw:F,W)
>   };
>   EOF
> 
> The nice thing is that <<- will strip leading tabs, which means you can
> indent properly to match the surrounding code. I don't know if you find
> the in-line $() more readable or not, though.

I think the code looks much nicer with a here doc.

Checking in t/, it looks that there's no consensus about whether to
indent the content relative to the cat statement or not. What do you
suggest?

> I think either way it is an improvement over the current state.

Thanks!

Beat


Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]