groff
[Top][All Lists]
Advanced

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

[Groff] Re: BUG REPORT on grohtml


From: Gaius Mulley
Subject: [Groff] Re: BUG REPORT on grohtml
Date: Thu, 18 Jan 2001 22:50:04 +0000

Hi Werner,

Werner writes:
> > > Please double-check it against your version.
> > 
> > will do.
> 
> It is now in the CVS.

I've double checked it against my copy and I believe (diff says) all
the patches are in the master repository. 

I've also found a couple of bugs, highlighted from Lester's bug report.
[ Thanks for the report .. ]

Here are a few patches which directly address two problems Lester found:

  +  eqn gave a unwarranted warning
  +  pre-html was trying to invoke troff, it should honour the
     HOST_PREFIX

I haven't forgotten about all the other items on the do list :-)

many thanks for all your tidying up w.r.t the code and patches -
you've been very busy! It looks better..

Gaius


--- groff-cvs/ChangeLog Wed Jan 17 14:17:18 2001
+++ groff-html/ChangeLog        Thu Jan 18 22:22:14 2001
@@ -1,5 +1,12 @@
 2000-01-15  Gaius Mulley  <address@hidden>
 
+       * tmac/mwww.tmac: calls www.tmac not arkup.tmac
+       * src/preproc/html/pre-html.cc: new function findPrefix
+         which generates the troff executable name via the system prefix.
+       * src/preproc/eqn/main.cc: modified the warning message.
+       
+2000-01-15  Gaius Mulley  <address@hidden>
+
        First cut of the new html device driver.  Changes to pre-html and
        the new grohtml are too numerous to be documented here.
 
--- groff-cvs/tmac/mwww.tmac    Wed Jan 17 14:17:26 2001
+++ groff-html/tmac/mwww.tmac   Thu Jan 18 18:03:21 2001
@@ -1,3 +1,3 @@
-.\" markup.tmac
+.\" mwww.tmac
 .\"
-.do mso arkup.tmac
+.do mso www.tmac
--- groff-cvs/src/preproc/html/pre-html.cc      Wed Jan 17 14:58:06 2001
+++ groff-html/src/preproc/html/pre-html.cc     Thu Jan 18 20:36:55 2001
@@ -32,6 +32,7 @@
 #include "error.h"
 #include "stringclass.h"
 #include "posix.h"
+#include "defs.h"
 
 #include <errno.h>
 #include <sys/types.h>
@@ -85,6 +86,8 @@
 static int   vertical_offset= DEFAULT_VERTICAL_OFFSET;
 static char *image_template = 0;                // image template filename
 static int   troff_arg      = 0;                // troff arg index
+static char *command_prefix = 0;                // optional prefix for some 
installations.
+static char *troff_command  = 0;
 #if defined(DEBUGGING)
 static int   debug          = FALSE;
 static char *troffFileName  = 0;                // output of pre-html output 
which is sent to troff -Tps
@@ -837,7 +840,7 @@
       }
       i++;
     }
-    argv[troff_arg] = "troff";  /* use troff */
+    argv[troff_arg] = troff_command;  /* use troff */
   }
 }
 
@@ -1046,6 +1049,22 @@
 #endif
 }
 
+/*
+ *  findPrefix - finds the optional prefix to the groff utilities.
+ *               It also builds the 'troff' executable name.
+ */
+
+static void findPrefix (void)
+{
+  command_prefix = getenv("GROFF_COMMAND_PREFIX");
+  if (!command_prefix)
+    command_prefix = PROG_PREFIX;
+  troff_command = (char *)malloc(strlen("troff")+strlen(command_prefix)+1);
+  strcpy(troff_command, command_prefix);
+  strcat(troff_command, "troff");
+}
+
+
 int main(int argc, char **argv)
 {
   program_name = argv[0];
@@ -1053,6 +1072,7 @@
   int found=0;
   int ok=1;
 
+  findPrefix();
   makeFileName();
   i = scanArguments(argc, argv);
   while (i < argc) {
--- groff-cvs/src/preproc/eqn/main.cc   Wed Jan 17 14:17:24 2001
+++ groff-html/src/preproc/eqn/main.cc  Thu Jan 18 18:40:05 2001
@@ -332,9 +332,12 @@
         device, program_name);
   printf(".if '\\*(.T'html' "
         ".if !'%s'ps' "
-        ".tm1 \"warning: %s should have been given a `-Tps' option\n"
-        ".tm1 \"         (it is advisable to invoke groff via: groff -Thtml 
-e)\n",
+        ".tm1 warning: %s should have been given a `-Tps' option\n",
         device, program_name);
+  printf(".if '\\*(.T'html' "
+        ".if !'%s'ps' "
+         ".tm1 warning: (it is advisable to invoke groff via: groff -Thtml 
-e)\n",
+        device);
   if (load_startup_file) {
     char *path;
     FILE *fp = config_macro_path.open_file(STARTUP_FILE, &path);

reply via email to

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