Re: [PATCH 4/5] update_unicode.sh: Make the output structure visible
- From
Jeff King <peff@peff.net>
- Date
- Dec 19, 2014, 15:22 UTC
- Message-ID
- <20141219152211.GA16967@peff.net>
- In-Reply-To
- <1418999971-21548-4-git-send-email-dev+git@drbeat.li>
On Fri, Dec 19, 2014 at 03:39:30PM +0100, dev+git@drbeat.li 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)
};
EOFThe 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 either way it is an improvement over the current state.
-Peff