Hi Branden,

I was going to replace some unmatched double quote as argument to a
man(7) macro, which was used as a literal double quote in the output, by
the more readable (less ambiguous in source code) \[dq].

However, I've realized that groff(1) seems to treat them slightly
differently.  Is this intentional, or a bug?

Here are the source-code diff, and the formatted diff:

        $ git diff;
        diff --git i/man/man3/cfree.3 w/man/man3/cfree.3
        index 55008e9a7..1698ab6e3 100644
        --- i/man/man3/cfree.3
        +++ w/man/man3/cfree.3
        @@ -80,7 +80,7 @@ .SS 3-arg cfree
         to free memory allocated with
         .BR calloc (3),
         or do I need
        -.BR cfree ()?"
        +.BR cfree ()?\[dq]
         Answer: use
         .BR free (3).
         .P


        $ MANWIDTH=64 diffman-git;
        --- HEAD:man/man3/cfree.3
        +++ ./man/man3/cfree.3
        @@ -58,7 +58,7 @@ DESCRIPTION
         
                A frequently asked question is "Can I use free(3) to
                free memory allocated with calloc(3), or do I need
        -       cfree()?"  Answer: use free(3).
        +       cfree()?" Answer: use free(3).
         
                An SCO manual writes: "The cfree routine is provided for
                compliance to the iBCSe2 standard and simply calls free.


I think the behavior with '"' makes more sense than with '\[dq]'.  Maybe
some conditional within groff(1) checks for '"' but forgets to check for
the synonymous '\[dq]'?


Have a lovely night!
Alex

-- 
<https://www.alejandro-colomar.es/>

Attachment: signature.asc
Description: PGP signature

Reply via email to