At 2025-02-19T23:46:30+0000, Neil Johnson wrote:
> That's actually where I started from as well! Except file names after
> the ".so" can have spaces in them on some platforms, and I don't
> believe there is a requirement to escape them, so something like this
> would be valid:
> 
>         .SO /my/source/file with spaces in the name.c
> 
> So the idea of putting the range specifier at the front gets around
> that.  Also easy enough to be compatible with the older AT&T syntax
> (no space after the ".so[S-E]").

This may be a good time to mention some changes in the forthcoming groff
1.24.0 release.  I'll quote the "NEWS" file.

---snip---

Noteworthy incompatible changes
-------------------------------
* If your roff(7) documents follow any of the requests `cf`, `hpf`,
  `hpfa`, `mso`, `msoquiet`, `nx`, `open`, `opena`, `so`, `soquiet`, or
  `trf` with a comment after their file name argument, and did not place
  that comment immediately after the file name, you are likely to get a
  diagnostic message.

    warning: cannot open macro file 'e.tmac ': No such file or directory

  Or, less likely, the formatter will open the wrong file, one with
  spaces at the end of its name.  That is because these requests are now
  able to process file names containing space characters.  (This change
  also makes the request syntax consistent with that of `ds`, `as`, and
  others.)  A quick fix is to place the comment escape sequence as early
  as possible.  For example, we would change:

    .mso e.tmac \" Load Eric Allman's package.

  to:

    .mso e.tmac\" Load Eric Allman's package.

  to tell the formatter to load the "e.tmac" file rather than "e.tmac ".
  See the items below for further details.

...

*  GNU troff now strips a leading neutral double quote from the argument
   to the `cf`, `hpf`, `hpfa`, `mso`, `msoquiet`, `nx`, `pi`, `pso`,
   `so`, `soquiet`, `sy`, and `trf` requests, and the second argument to
   the `open` and `opena` requests, allowing it to contain embedded
   leading spaces.

*  GNU troff now accepts space characters in the argument to the `cf`,
   `hpf`, `hpfa`, `mso`, `msoquiet`, `nx`, `so`, `soquiet`, and `trf`
   requests, and the second argument to the `open` and `opena` requests.
   See "soelim" below.

...

*  soelim no longer requires embedded space characters in `so` arguments
   to be backslash-escaped.  (It continues to support that syntax, even
   though neither AT&T nor GNU troff ever has.)  If the argument to a
   `so` request must contain leading spaces, any such sequence of spaces
   must now be prefixed with a double quote character ("), which the
   program then discards.  These changes are to better align this
   program's parsing rules with the language of the formatter; consider
   the `ds` and `as` requests.
---end snip---

Regards,
Branden

Attachment: signature.asc
Description: PGP signature

Reply via email to