groff-commit
[Top][All Lists]
Advanced

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

[Groff-commit] groff ChangeLog doc/Makefile.in doc/Makefile.su...


From: Werner LEMBERG
Subject: [Groff-commit] groff ChangeLog doc/Makefile.in doc/Makefile.su...
Date: Tue, 25 Sep 2007 15:16:25 +0000

CVSROOT:        /cvsroot/groff
Module name:    groff
Changes by:     Werner LEMBERG <wl>     07/09/25 15:16:25

Modified files:
        .              : ChangeLog 
        doc            : Makefile.in Makefile.sub 
        src/devices/grohtml: grohtml.man html-text.cpp post-html.cpp 

Log message:
        * doc/Makefile.in, doc/Makefile.sub (.ms.html): Add -P-V switch to
        the production of html files.
        (pic.html): Ditto.
        Remove background colour switch.
        (.SUFFIXES, clean): Handle *.xhtml files.
        
        * src/devices/grohtml/grohtml.man: Document that -V option now
        generates an HTML-4.01 validator or XHTML validator.
        
        * src/devices/grohtml/html-text.cpp (html_text::end_tag,
        html_text::start_tag): Suppress <small>, <big>, and <color> tags if
        we are inside a <pre> block.
        
        * src/devices/grohtml/post-html.cpp
        (html_printer::handle_valid_flag): Add a parameter to indicate
        whether it needs to generate a paragraph block.
        (html_printer::write_navigation): Updated.
        (html_printer::do_file_components): Generate an HTML-4.01 blue
        validator button also.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/ChangeLog?cvsroot=groff&r1=1.1103&r2=1.1104
http://cvs.savannah.gnu.org/viewcvs/groff/doc/Makefile.in?cvsroot=groff&r1=1.21&r2=1.22
http://cvs.savannah.gnu.org/viewcvs/groff/doc/Makefile.sub?cvsroot=groff&r1=1.30&r2=1.31
http://cvs.savannah.gnu.org/viewcvs/groff/src/devices/grohtml/grohtml.man?cvsroot=groff&r1=1.24&r2=1.25
http://cvs.savannah.gnu.org/viewcvs/groff/src/devices/grohtml/html-text.cpp?cvsroot=groff&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/groff/src/devices/grohtml/post-html.cpp?cvsroot=groff&r1=1.39&r2=1.40

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/groff/groff/ChangeLog,v
retrieving revision 1.1103
retrieving revision 1.1104
diff -u -b -r1.1103 -r1.1104
--- ChangeLog   23 Sep 2007 07:38:53 -0000      1.1103
+++ ChangeLog   25 Sep 2007 15:16:23 -0000      1.1104
@@ -1,3 +1,25 @@
+2007-09-25  Gaius Mulley  <address@hidden>
+
+       * doc/Makefile.in, doc/Makefile.sub (.ms.html): Add -P-V switch to
+       the production of html files.
+       (pic.html): Ditto.
+       Remove background colour switch.
+       (.SUFFIXES, clean): Handle *.xhtml files.
+
+       * src/devices/grohtml/grohtml.man: Document that -V option now
+       generates an HTML-4.01 validator or XHTML validator.
+
+       * src/devices/grohtml/html-text.cpp (html_text::end_tag,
+       html_text::start_tag): Suppress <small>, <big>, and <color> tags if
+       we are inside a <pre> block.
+
+       * src/devices/grohtml/post-html.cpp
+       (html_printer::handle_valid_flag): Add a parameter to indicate
+       whether it needs to generate a paragraph block.
+       (html_printer::write_navigation): Updated.
+       (html_printer::do_file_components): Generate an HTML-4.01 blue
+       validator button also.
+
 2007-09-23  Axel Kielhorn  <address@hidden>
 
        * man/groff.man: Fix URL of CSTR 54.

Index: doc/Makefile.in
===================================================================
RCS file: /cvsroot/groff/groff/doc/Makefile.in,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- doc/Makefile.in     3 Jan 2006 23:57:03 -0000       1.21
+++ doc/Makefile.in     25 Sep 2007 15:16:24 -0000      1.22
@@ -1,4 +1,5 @@
-# Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007
+#   Free Software Foundation, Inc.
 #      Written by Werner Lemberg <address@hidden>
 # 
 # This file is part of groff.
@@ -81,7 +82,7 @@
 
 imagedir=img
 
-.SUFFIXES: .me .ms .ps .html .txt .texinfo .dvi .pdf
+.SUFFIXES: .me .ms .ps .html .txt .texinfo .dvi .pdf .xhtml
 .PHONY: all prepare_examples clean distclean realclean extraclean
 
 # For simplicity, we always call grn and eqn.
@@ -92,7 +93,7 @@
 
 .ms.html:
        $(GROFF) -P-p -P-b -P-I`basename $< | sed -e 's|.ms$$||'` \
-                -P-D$(imagedir) -Thtml -ms >$@
+                -P-D$(imagedir) -P-V -Thtml -ms >$@
 .ms.txt:
        $(GROFF) -Tascii -ms -mwww >$@
 .ms.ps:
@@ -122,9 +123,9 @@
        xpmtoppm $(srcdir)/gnu.xpm | pnmdepth 15 | pnmtopng >$@
 
 pic.html: pic.ms
-       $(GROFF) -P-p -P-b -P-I`basename $< | sed -e 's|.ms$$||'` \
+       $(GROFF) -P-p -P-I`basename $< | sed -e 's|.ms$$||'` \
                  -P-D$(imagedir) -P-j`basename $< | sed -e 's|.ms$$||'` \
-                 -Thtml -ms >$@
+                 -Thtml -P-V -ms >$@
 
 webpage.html: webpage.ms gnu.png gnu.eps groff.css
        $(GROFF) -P-j`basename $< | sed -e 's|.ms$$||'` \
@@ -141,7 +142,7 @@
        -rm -f *.aux *.dvi *.pdf *.log *.toc texput.log
        -rm -f *.cp *.cps *.cv *.cn *.es *.ess *.fn *.fns *.ky *.kys \
                *.ma *.mas *.op *.ops *.pg *.pgs *.rq *.rqs *.st *.sts \
-               *.tp *.tps *.tr *.vr *.vrs
+               *.tp *.tps *.tr *.vr *.vrs *.xhtml
        -rm -rf img
 
 distclean: clean

Index: doc/Makefile.sub
===================================================================
RCS file: /cvsroot/groff/groff/doc/Makefile.sub,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- doc/Makefile.sub    21 Nov 2006 14:30:49 -0000      1.30
+++ doc/Makefile.sub    25 Sep 2007 15:16:24 -0000      1.31
@@ -1,4 +1,5 @@
-# Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007
+#   Free Software Foundation, Inc.
 #      Written by Werner Lemberg <address@hidden>
 # 
 # This file is part of groff.
@@ -117,7 +118,7 @@
 
 .ms.html:
        $(GROFF) -P-p -P-b -P-I`basename $< | sed -e 's|.ms$$||'` \
-                -P-D$(imagedir) -Thtml -ms >$@
+                -P-D$(imagedir) -P-V -Thtml -ms >$@
 .ms.ps:
        $(GROFF) -Tps -ms -mwww >$@
 
@@ -152,9 +153,9 @@
        xpmtoppm $(srcdir)/gnu.xpm | pnmdepth 15 | pnmtopng >$@
 
 pic.html: pic.ms
-       $(GROFF) -P-p -P-b -P-I`basename $< | sed -e 's|.ms$$||'` \
+       $(GROFF) -P-p -P-I`basename $< | sed -e 's|.ms$$||'` \
                  -P-D$(imagedir) -P-j`basename $< | sed -e 's|.ms$$||'` \
-                 -Thtml -ms >$@
+                 -Thtml -P-V -ms >$@
 
 webpage.html: webpage.ms gnu.png groff.css
        $(GROFF) -P-j`basename $< | sed -e 's|.ms$$||'` \

Index: src/devices/grohtml/grohtml.man
===================================================================
RCS file: /cvsroot/groff/groff/src/devices/grohtml/grohtml.man,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- src/devices/grohtml/grohtml.man     19 Sep 2007 14:55:55 -0000      1.24
+++ src/devices/grohtml/grohtml.man     25 Sep 2007 15:16:24 -0000      1.25
@@ -262,7 +262,7 @@
 .
 .TP
 .B \-V
-Create an XHTML validator button at the bottom of each page of
+Create an XHTML or HTML validator button at the bottom of each page of
 the document.
 .
 .TP

Index: src/devices/grohtml/html-text.cpp
===================================================================
RCS file: /cvsroot/groff/groff/src/devices/grohtml/html-text.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- src/devices/grohtml/html-text.cpp   19 Sep 2007 14:55:55 -0000      1.10
+++ src/devices/grohtml/html-text.cpp   25 Sep 2007 15:16:24 -0000      1.11
@@ -166,13 +166,15 @@
                     delete t->indent;
                   t->indent = NULL;
                    break;
-  case SMALL_TAG:  if (dialect != xhtml || (! is_in_pre ()))
+  case SMALL_TAG:  if (! is_in_pre ())
                      out->put_string("</small>");
                    break;
-  case BIG_TAG:    if (dialect != xhtml || (! is_in_pre ()))
+  case BIG_TAG:    if (! is_in_pre ())
                      out->put_string("</big>");
                    break;
-  case COLOR_TAG:  out->put_string("</font>"); break;
+  case COLOR_TAG:  if (! is_in_pre ())
+                     out->put_string("</font>");
+                   break;
 
   default:
     error("unrecognised tag");
@@ -265,14 +267,16 @@
                     issue_tag("", (char *)t->arg1);
                   }
                    out->enable_newlines(FALSE); break;
-  case SMALL_TAG:  if (dialect != xhtml || (! is_in_pre ()))
+  case SMALL_TAG:  if (! is_in_pre ())
                      issue_tag("<small", (char *)t->arg1);
                    break;
-  case BIG_TAG:    if (dialect != xhtml || (! is_in_pre ()))
+  case BIG_TAG:    if (! is_in_pre ())
                      issue_tag("<big", (char *)t->arg1);
                    break;
   case BREAK_TAG:  break;
-  case COLOR_TAG:  issue_color_begin(&t->col); break;
+  case COLOR_TAG:  if (! is_in_pre ())
+                     issue_color_begin(&t->col);
+                   break;
 
   default:
     error("unrecognised tag");

Index: src/devices/grohtml/post-html.cpp
===================================================================
RCS file: /cvsroot/groff/groff/src/devices/grohtml/post-html.cpp,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -b -r1.39 -r1.40
--- src/devices/grohtml/post-html.cpp   19 Sep 2007 14:55:55 -0000      1.39
+++ src/devices/grohtml/post-html.cpp   25 Sep 2007 15:16:24 -0000      1.40
@@ -2103,7 +2103,7 @@
   int  round_width                    (int x);
   void handle_tag_within_title        (text_glob *g);
   void writeHeadMetaStyle             (void);
-  void handle_valid_flag              (void);
+  void handle_valid_flag              (int needs_para);
   void do_math                        (text_glob *g);
   void write_html_anchor              (text_glob *h);
   void write_xhtml_anchor             (text_glob *h);
@@ -4930,6 +4930,7 @@
            "frame=\"void\" cellspacing=\"1\" cellpadding=\"0\">\n"
            "<colgroup><col class=\"left\"></col><col 
class=\"right\"></col></colgroup>\n"
            "<tr><td class=\"left\">", stdout);
+    handle_valid_flag(FALSE);
     fputs("[ ", stdout);
     if ((strcmp(prev.contents(), "") != 0) && prev != top && prev != current) {
       emit_link(prev, "prev");
@@ -4947,7 +4948,6 @@
       emit_link(top, "top");
     }
     fputs(" ]\n", stdout);
-    handle_valid_flag();
 
     if (groff_sig) {
       fputs("</td><td class=\"right\"><i><small>"
@@ -5047,13 +5047,13 @@
   else {
     current_paragraph->done_para();
     write_rule();
-    if (valid_flag && dialect == xhtml) {
+    if (valid_flag) {
       if (groff_sig)
        fputs("\n\n<table width=\"100%\" border=\"0\" rules=\"none\"\n"
              "frame=\"void\" cellspacing=\"1\" cellpadding=\"0\">\n"
              "<colgroup><col class=\"left\"></col><col 
class=\"right\"></col></colgroup>\n"
              "<tr><td class=\"left\">", stdout);
-      handle_valid_flag();
+      handle_valid_flag(TRUE);
       if (groff_sig) {
        fputs("</td><td class=\"right\"><i><small>"
              "This document was produced using "
@@ -5426,18 +5426,28 @@
 }
 
 /*
- *  handle_valid_flag - emits a valid xhtml 1.1 button, provided -V and -x
- *                      were supplied on the command line.
+ *  handle_valid_flag - emits a valid xhtml 1.1 or html-4.01 button, provided 
-V
+ *                      was supplied on the command line.
  */
 
-void html_printer::handle_valid_flag (void)
+void html_printer::handle_valid_flag (int needs_para)
 {
-  if (valid_flag && dialect == xhtml)
-    fputs("<p>"
-         "<a href=\"http://validator.w3.org/check?uri=referer\";><img "
-         "src=\"http://www.w3.org/Icons/valid-xhtml11\"; "
-         "alt=\"Valid XHTML 1.1 Transitional\" height=\"31\" width=\"88\" 
/></a>\n"
-         "</p>\n", stdout);
+  if (valid_flag) {
+    if (needs_para)
+      fputs("<p>", stdout);
+    if (dialect == xhtml)
+      fputs("<a href=\"http://validator.w3.org/check?uri=referer\";><img "
+           "src=\"http://www.w3.org/Icons/valid-xhtml11-blue\"; "
+           "alt=\"Valid XHTML 1.1 Transitional\" height=\"31\" width=\"88\" 
/></a>\n",
+           stdout);
+    else
+      fputs("<a href=\"http://validator.w3.org/check?uri=referer\";><img "
+           "src=\"http://www.w3.org/Icons/valid-html401-blue\"; "
+           "alt=\"Valid HTML 4.01 Transitional\" height=\"31\" 
width=\"88\"></a>\n",
+           stdout);
+    if (needs_para)
+      fputs("</p>", stdout);
+  }
 }
 
 int main(int argc, char **argv)




reply via email to

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