Hi Ken,

> > This is true.  To correct that, I note mh-format(5) too has no
> > function to produce the ordinal suffix.  :-)
>
> Fixed.

Impressively quick work.

    +               int digit = value % 10;
    +               const char *suffix;
    +
    +               switch (digit) {
    +               case 1:
    +                   suffix = "st";
    +                   break;
    +               case 2:
    +                   suffix = "nd";
    +                   break;
    +               case 3:
    +                   suffix = "rd";
    +                   break;
    +               default:
    +                   suffix = "th";
    +               }

Were you paying attention to kre's sh and my sed?  :-)

-- 
Cheers, Ralph.

-- 
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers

Reply via email to