[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [groff] hyphenation issues
From: |
Werner LEMBERG |
Subject: |
Re: [groff] hyphenation issues |
Date: |
Sat, 05 May 2018 15:43:35 +0200 (CEST) |
>> > + static int n_max = (HYPHEN_NOT_LAST_LINE | HYPHEN_NOT_LAST_CHARS
>> > + | HYPHEN_NOT_FIRST_CHARS | HYPHEN_LAST_CHAR
>> > + | HYPHEN_FIRST_CHAR);
>>
>> s/static int/int const/?
Please use `const int' – there is no single instance of `int const' in
the groff code.
>> Given the enum,
>>
>> enum {
>> HYPHEN_NOT_LAST_LINE = 2,
>> HYPHEN_NOT_LAST_CHARS = 4,
>> HYPHEN_NOT_FIRST_CHARS = 8,
>> HYPHEN_LAST_CHAR = 16,
>> HYPHEN_FIRST_CHAR = 32
>> };
>>
>> I'd suggest adding
>>
>> HYPHEN_NONE = 0,
>> HYPHEN_DEFAULT = 1,
>> HYPHEN_MAX = 63 // Or whatever the local naming convention is.
Yes.
>> Then test for
>>
>> n > HYPHEN_MAX
>> n & HYPHEN_DEFAULT && n & ~HYPHEN_DEFAULT
>>
>> in addition to the existing
>>
>> n & HYPHEN_FIRST_CHAR && n & HYPHEN_NOT_FIRST_CHARS
>> n & HYPHEN_LAST_CHAR && n & HYPHEN_NOT_LAST_CHARS
>
> Werner, what do you think?
I prefer that. It's always a bit problematic ORing enumeration values
(I know how to circumvent that limitation, but...)
Werner
- Re: [groff] hyphenation issues, (continued)
- Re: [groff] hyphenation issues, Ralph Corderoy, 2018/05/05
- Re: [groff] hyphenation issues, Ingo Schwarze, 2018/05/05
- Re: [groff] hyphenation issues, Ralph Corderoy, 2018/05/06
- Re: [groff] hyphenation issues, Carsten Kunze, 2018/05/06
- Re: [groff] hyphenation issues, Ralph Corderoy, 2018/05/06
- Re: [groff] hyphenation issues, G. Branden Robinson, 2018/05/06
- Re: [groff] hyphenation issues, Ralph Corderoy, 2018/05/06
- Re: [groff] hyphenation issues, Steffen Nurpmeso, 2018/05/05
- Re: [groff] hyphenation issues,
Werner LEMBERG <=
- Re: [groff] hyphenation issues, G. Branden Robinson, 2018/05/05
- Re: [groff] hyphenation issues, G. Branden Robinson, 2018/05/06
- Re: [groff] hyphenation issues, Ralph Corderoy, 2018/05/06
- Re: [groff] hyphenation issues, G. Branden Robinson, 2018/05/07
- Re: [groff] hyphenation issues (PATCH), G. Branden Robinson, 2018/05/07
- Re: [groff] hyphenation issues (PATCH), Werner LEMBERG, 2018/05/07
Re: [groff] hyphenation issues, Dave Kemper, 2018/05/06