groff
[Top][All Lists]
Advanced

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

Re: Why does groff require psutils?


From: G. Branden Robinson
Subject: Re: Why does groff require psutils?
Date: Fri, 15 Mar 2024 22:13:30 -0500

Hi Alexis,

At 2023-12-01T17:35:09+0100, Alexis wrote:
> following up on my previous email I'd like to test the attached patch
> (replace_psselect.patch) with groff, but am uncertain how to trigger
> the patched code path.

I'm sorry I let this fall onto the floor.  Picking it up...

> If I read src/preproc/html/html.am correctly then pre-html.cpp is
> compiled into pre-grohtml.

Yes.

> I'm uncertain how pre-grohtml is invoked in a common groff pipeline or
> can be invoked manually for testing purposes.

groff runs it unconditionally if the output device is "html" (or "xhtml"),
because the "html" device's "DESC" file tells it to.

https://git.savannah.gnu.org/cgit/groff.git/tree/font/devhtml/DESC.proto?h=1.23.0

> Anyone willing to share some insights or ideas?

Another way to make sure your code is being exercised is to stick a
`debug()` call into it.

diff --git a/src/preproc/html/pre-html.cpp b/src/preproc/html/pre-html.cpp
index cbcc2ccda..831d0a269 100644
--- a/src/preproc/html/pre-html.cpp
+++ b/src/preproc/html/pre-html.cpp
@@ -918,6 +918,7 @@ int imageList::createPage(int pageno)
     fprintf(stderr, "creating page %d\n", pageno);
 #endif

+  debug("GBR: hello");
   s = make_string("psselect -q -p%d %s %s\n",
                   pageno, psFileName, psPageName);
   html_system(s, 1);

After doing this, running "make -C build -j" said hello to me many times
(once per document page) thanks to the rebuilds of the "webpage.html"
and "pic.html" documents prompted by the newness of the "pre-grohtml"
executable.

Regards,
Branden

Attachment: signature.asc
Description: PGP signature


reply via email to

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