[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff-commit] groff ./ChangeLog src/devices/grohtml/post-html...
From: |
Werner LEMBERG |
Subject: |
[Groff-commit] groff ./ChangeLog src/devices/grohtml/post-html... |
Date: |
Tue, 07 Dec 2004 16:34:25 -0500 |
CVSROOT: /cvsroot/groff
Module name: groff
Branch:
Changes by: Werner LEMBERG <address@hidden> 04/12/07 21:23:55
Modified files:
. : ChangeLog
src/devices/grohtml: post-html.cpp
tmac : s.tmac
Log message:
Fix a bug with title handling in HTML.
* src/devices/grohtml/post-html.cpp (text_glob::is_nf,
text_glob::is_fi, text_glob::is_ce): Use strlen to compute string
length.
(html_printer::handle_tag_within_title): New function.
(html_printer::do_title): Use it.
* tmac/s.tmac (TL): Don't set `need_eo_tl'.
(cov*tl-au-print): Emit `.eo.tl' tag.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/ChangeLog.diff?tr1=1.768&tr2=1.769&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/src/devices/grohtml/post-html.cpp.diff?tr1=1.15&tr2=1.16&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/tmac/s.tmac.diff?tr1=1.21&tr2=1.22&r1=text&r2=text
Patches:
Index: groff/ChangeLog
diff -u groff/ChangeLog:1.768 groff/ChangeLog:1.769
--- groff/ChangeLog:1.768 Mon Dec 6 01:08:10 2004
+++ groff/ChangeLog Tue Dec 7 21:23:55 2004
@@ -1,3 +1,16 @@
+2004-12-07 Gaius Mulley <address@hidden>
+
+ Fix a bug with title handling in HTML.
+
+ * src/devices/grohtml/post-html.cpp (text_glob::is_nf,
+ text_glob::is_fi, text_glob::is_ce): Use strlen to compute string
+ length.
+ (html_printer::handle_tag_within_title): New function.
+ (html_printer::do_title): Use it.
+
+ * tmac/s.tmac (TL): Don't set `need_eo_tl'.
+ (cov*tl-au-print): Emit `.eo.tl' tag.
+
2004-12-05 Alejandro López-Valencia <address@hidden>
* man/groff_char.man: Minor imrovements.
Index: groff/src/devices/grohtml/post-html.cpp
diff -u groff/src/devices/grohtml/post-html.cpp:1.15
groff/src/devices/grohtml/post-html.cpp:1.16
--- groff/src/devices/grohtml/post-html.cpp:1.15 Wed Nov 24 14:18:21 2004
+++ groff/src/devices/grohtml/post-html.cpp Tue Dec 7 21:23:55 2004
@@ -694,7 +694,8 @@
int text_glob::is_nf (void)
{
- return is_tag && (strncmp(text_string, "html-tag:.fi", 12) == 0) &&
+ return is_tag && (strncmp(text_string, "html-tag:.fi",
+ strlen("html-tag:.fi")) == 0) &&
(get_arg() == 0);
}
@@ -704,7 +705,8 @@
int text_glob::is_fi (void)
{
- return( is_tag && (strncmp(text_string, "html-tag:.fi", 12) == 0) &&
+ return( is_tag && (strncmp(text_string, "html-tag:.fi",
+ strlen("html-tag:.fi")) == 0) &&
(get_arg() == 1) );
}
@@ -723,7 +725,8 @@
int text_glob::is_ce (void)
{
- return is_tag && (strcmp(text_string, "html-tag:.ce") == 0);
+ return is_tag && (strncmp(text_string, "html-tag:.ce",
+ strlen("html-tag:.ce")) == 0);
}
/*
@@ -732,7 +735,8 @@
int text_glob::is_in (void)
{
- return is_tag && (strncmp(text_string, "html-tag:.in ", strlen("html-tag:.in
")) == 0);
+ return is_tag && (strncmp(text_string, "html-tag:.in ",
+ strlen("html-tag:.in ")) == 0);
}
/*
@@ -741,7 +745,8 @@
int text_glob::is_po (void)
{
- return is_tag && (strncmp(text_string, "html-tag:.po ", strlen("html-tag:.po
")) == 0);
+ return is_tag && (strncmp(text_string, "html-tag:.po ",
+ strlen("html-tag:.po ")) == 0);
}
/*
@@ -750,7 +755,8 @@
int text_glob::is_ti (void)
{
- return is_tag && (strncmp(text_string, "html-tag:.ti ", strlen("html-tag:.ti
")) == 0);
+ return is_tag && (strncmp(text_string, "html-tag:.ti ",
+ strlen("html-tag:.ti ")) == 0);
}
/*
@@ -2076,6 +2082,8 @@
void handle_state_assertion (text_glob *g);
void do_end_para (text_glob *g);
int round_width (int x);
+ void handle_tag_within_title (text_glob *g);
+
// ADD HERE
public:
@@ -2208,6 +2216,20 @@
}
/*
+ * handle_tag_within_title - handle a limited number of tags within
+ * the context of a table. Those tags which
+ * set values rather than generate spaces
+ * and paragraphs.
+ */
+
+void html_printer::handle_tag_within_title (text_glob *g)
+{
+ if (g->is_in() || g->is_ti() || g->is_po() || g->is_ce() || g->is_ll()
+ || g->is_fi() || g->is_nf())
+ troff_tag(g);
+}
+
+/*
* do_center - handle the .ce commands from troff.
*/
@@ -2353,6 +2375,7 @@
title.has_been_found = TRUE;
return;
} else if (t->is_a_tag()) {
+ handle_tag_within_title(t);
page_contents->glyphs.sub_move_right(); /* move onto next
word */
removed_from_head = ((!page_contents->glyphs.is_empty()) &&
(page_contents->glyphs.is_equal_to_head()));
@@ -2369,7 +2392,8 @@
removed_from_head = ((!page_contents->glyphs.is_empty()) &&
(page_contents->glyphs.is_equal_to_head()));
}
- } while ((! page_contents->glyphs.is_equal_to_head()) ||
(removed_from_head));
+ } while ((! page_contents->glyphs.is_equal_to_head()) ||
+ (removed_from_head));
}
}
}
Index: groff/tmac/s.tmac
diff -u groff/tmac/s.tmac:1.21 groff/tmac/s.tmac:1.22
--- groff/tmac/s.tmac:1.21 Tue Nov 23 22:22:07 2004
+++ groff/tmac/s.tmac Tue Dec 7 21:23:55 2004
@@ -179,7 +179,6 @@
.ll (u;\\n[LL]*5/6)
.nr cov*n-au 0
.HTML-TAG-NS ".tl"
-.nr need_eo_tl 1
..
.de @AU
address@hidden
@@ -381,7 +380,10 @@
.rs
.sp 3
.ce 9999
-.if d cov*tl-div .cov*tl-div
+.if d cov*tl-div \{\
+. cov*tl-div
+. HTML-TAG-NS ".eo.tl"
+.\}
.nr cov*i 1
.nr cov*sp 1v
.while \\n[cov*i]<=\\n[cov*n-au] \{\
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Groff-commit] groff ./ChangeLog src/devices/grohtml/post-html...,
Werner LEMBERG <=