On 09/10/2012 08:11 PM, Jim Meyering wrote:
Subject: [PATCH] maint: add more control flags to mbsalign
* gl/lib/mbsalign.h: Add MBA_UNIBYTE_ONLY (to allow
faster processing), and MBA_NO_{LEFT,RIGHT}_PAD
It's slightly better to spell out those symbol names,
to ease log searching.
+ /* Ensure no trailing whitepsace */
+ MBA_RSTRIP
More periods?
Cool, I'll expand the constants in the commit message
and make the code comments consistent.
+ /* Test left alignment, with no trailing padding. (truncate only). */
+ width = 4;
+ n = mbsalign ("es", dest, sizeof dest,&width, MBS_ALIGN_LEFT,
+ MBA_NO_RIGHT_PAD);
Is it worth inserting this?
ASSERT (n == 2);
I was thinking it was redundant unless we were adding
spaces between 'e' and 's' somehow. I support that's possible :)
So I'll adjust.
thanks for the review!
Pádraig.