groff
[Top][All Lists]
Advanced

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

Re: [groff] hyphenation issues


From: G. Branden Robinson
Subject: Re: [groff] hyphenation issues
Date: Sat, 5 May 2018 05:48:47 -0400
User-agent: NeoMutt/20170113 (1.7.2)

At 2018-05-05T10:31:48+0100, Ralph Corderoy wrote:
> Hi Branden,
> 
> > +  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/?

Yes, of course.  Thanks!  (Incidentally, I share your preference for
putting type qualifiers [as opposed to storage classes] _after_ the type
name itself.  It makes complex declarations easier to understand.)

> 19 of the 64 six-bit values for `.hy' seem valid.
> 
> 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.
> 
> 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?

-- 
Regards,
Branden

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]