[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff-commit] groff ./ChangeLog ./INSTALL ./test-groff.in src...
From: |
Werner LEMBERG |
Subject: |
[Groff-commit] groff ./ChangeLog ./INSTALL ./test-groff.in src... |
Date: |
Thu, 16 Dec 2004 08:33:51 -0500 |
CVSROOT: /cvsroot/groff
Module name: groff
Branch:
Changes by: Werner LEMBERG <address@hidden> 04/12/16 13:09:54
Modified files:
. : ChangeLog INSTALL test-groff.in
src/devices/grohtml: post-html.cpp
src/include : printer.h
src/libs/libdriver: input.cpp printer.cpp
src/roff/troff : env.cpp input.cpp mtsm.cpp node.cpp
tmac : Makefile.sub an-old.tmac s.tmac troffrc-end
www.tmac
Added files:
tmac : devtag.tmac
Log message:
Make `test-groff' work again -- previously, wrong paths have been
used. Additionally, it can now be called from anywhere.
* test-groff.in: Don't test for groff binary. This is no longer
necessary since the proper paths are determined by `configure'.
(EXEEXT): Removed. No longer used.
(srcdir, builddir): Use values provided by the configure script.
(XENVIRONMENT): Updated.
* INSTALL: Updated.
Make .tag and .taga work for all devices (but only grohtml actually
handles them).
* src/devices/grohtml/post-html.cpp: s/html-tag/devtag/.
(text_glob::is_br, page::add_tag, html_printer::troff_tag,
html_printer::handle_assertion): Don't use hard-coded string
lengths.
(html_printer::lookahead_for_table): Reset `tbl' properly if
necessary.
(html_printer::devtag): New function, handling `devtag'.
(html_printer::special): Don't handle `html-tag'.
* src/include/printer.h, src/libs/libdriver/printer.cpp
(printer::devtag): New virtual function.
* src/libs/libdriver/input.cpp (parse_x_command) <'X'>: Handle
`devtag'.
* src/roff/troff/env.cpp, src/roff/troff/mtsm.cpp,
src/roff/troff/node.cpp: s/html-tag/devtag/.
* src/roff/troff/input.cpp (tag, taga): Always call
curenv->add_node.
* tmac/an-old.tmac, tmac/s.tmac, tmac/troffrc-end: Use DEVTAG*
macros instead of HTML-TAG*.
* tmac/devtag.tmac: New file, defining the DEVTAG-* macros.
* tmac/www.tmac: Load devtag.tmac.
Replace HTML-TAG* macros with DEVTAG* macros.
(HTML, HTML-NS): Changed definitions.
(URL): Use HTML-NS.
(HTML-TAG, HTML-TAG-NS, HTML-TAG-NEXT): Removed.
* tmac/Makefile.sub (NORMALFILES): Add devtag.tmac.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/ChangeLog.diff?tr1=1.771&tr2=1.772&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/INSTALL.diff?tr1=1.12&tr2=1.13&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/test-groff.in.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/src/devices/grohtml/post-html.cpp.diff?tr1=1.16&tr2=1.17&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/src/include/printer.h.diff?tr1=1.12&tr2=1.13&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/src/libs/libdriver/input.cpp.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/src/libs/libdriver/printer.cpp.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/src/roff/troff/env.cpp.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/src/roff/troff/input.cpp.diff?tr1=1.22&tr2=1.23&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/src/roff/troff/mtsm.cpp.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/src/roff/troff/node.cpp.diff?tr1=1.14&tr2=1.15&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/tmac/devtag.tmac?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/tmac/Makefile.sub.diff?tr1=1.33&tr2=1.34&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/tmac/an-old.tmac.diff?tr1=1.48&tr2=1.49&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/tmac/s.tmac.diff?tr1=1.22&tr2=1.23&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/tmac/troffrc-end.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/tmac/www.tmac.diff?tr1=1.36&tr2=1.37&r1=text&r2=text
Patches:
Index: groff/ChangeLog
diff -u groff/ChangeLog:1.771 groff/ChangeLog:1.772
--- groff/ChangeLog:1.771 Sat Dec 11 17:02:50 2004
+++ groff/ChangeLog Thu Dec 16 13:09:54 2004
@@ -1,3 +1,55 @@
+2004-12-15 Werner LEMBERG <address@hidden>
+
+ Make `test-groff' work again -- previously, wrong paths have been
+ used. Additionally, it can now be called from anywhere.
+
+ * test-groff.in: Don't test for groff binary. This is no longer
+ necessary since the proper paths are determined by `configure'.
+ (EXEEXT): Removed. No longer used.
+ (srcdir, builddir): Use values provided by the configure script.
+ (XENVIRONMENT): Updated.
+
+ * INSTALL: Updated.
+
+2004-12-14 Gaius Mulley <address@hidden>
+
+ Make .tag and .taga work for all devices (but only grohtml actually
+ handles them).
+
+ * src/devices/grohtml/post-html.cpp: s/html-tag/devtag/.
+ (text_glob::is_br, page::add_tag, html_printer::troff_tag,
+ html_printer::handle_assertion): Don't use hard-coded string
+ lengths.
+ (html_printer::lookahead_for_table): Reset `tbl' properly if
+ necessary.
+ (html_printer::devtag): New function, handling `devtag'.
+ (html_printer::special): Don't handle `html-tag'.
+
+ * src/include/printer.h, src/libs/libdriver/printer.cpp
+ (printer::devtag): New virtual function.
+
+ * src/libs/libdriver/input.cpp (parse_x_command) <'X'>: Handle
+ `devtag'.
+
+ * src/roff/troff/env.cpp, src/roff/troff/mtsm.cpp,
+ src/roff/troff/node.cpp: s/html-tag/devtag/.
+
+ * src/roff/troff/input.cpp (tag, taga): Always call
+ curenv->add_node.
+
+ * tmac/an-old.tmac, tmac/s.tmac, tmac/troffrc-end: Use DEVTAG*
+ macros instead of HTML-TAG*.
+
+ * tmac/devtag.tmac: New file, defining the DEVTAG-* macros.
+
+ * tmac/www.tmac: Load devtag.tmac.
+ Replace HTML-TAG* macros with DEVTAG* macros.
+ (HTML, HTML-NS): Changed definitions.
+ (URL): Use HTML-NS.
+ (HTML-TAG, HTML-TAG-NS, HTML-TAG-NEXT): Removed.
+
+ * tmac/Makefile.sub (NORMALFILES): Add devtag.tmac.
+
2004-12-10 Werner LEMBERG <address@hidden>
Import Mike's `gdiffmk' package.
Index: groff/INSTALL
diff -u groff/INSTALL:1.12 groff/INSTALL:1.13
--- groff/INSTALL:1.12 Thu Jun 3 06:24:23 2004
+++ groff/INSTALL Thu Dec 16 13:09:54 2004
@@ -36,8 +36,7 @@
When you have built groff, you can use the test-groff script to try
groff out on one of the man pages. (Use the .n files not the .man
files.) The test-groff script sets up environment variables to allow
-groff to run without being installed. The current directory must be
-the build directory when the script is run. For example, you could do
+groff to run without being installed. For example, you could do
./test-groff -man -Tascii src/roff/groff/groff.n | less
Index: groff/src/devices/grohtml/post-html.cpp
diff -u groff/src/devices/grohtml/post-html.cpp:1.16
groff/src/devices/grohtml/post-html.cpp:1.17
--- groff/src/devices/grohtml/post-html.cpp:1.16 Tue Dec 7 21:23:55 2004
+++ groff/src/devices/grohtml/post-html.cpp Thu Dec 16 13:09:54 2004
@@ -430,7 +430,7 @@
// and return start of new string
- return( &tail->buffer[old_used] );
+ return &tail->buffer[old_used];
}
char *char_buffer::add_string (const string &s)
@@ -658,7 +658,7 @@
int text_glob::is_eol (void)
{
- return is_tag && (strcmp(text_string, "html-tag:.eol") == 0);
+ return is_tag && (strcmp(text_string, "devtag:.eol") == 0);
}
/*
@@ -667,7 +667,7 @@
int text_glob::is_eol_ce (void)
{
- return is_tag && (strcmp(text_string, "html-tag:eol.ce") == 0);
+ return is_tag && (strcmp(text_string, "devtag:eol.ce") == 0);
}
/*
@@ -676,7 +676,7 @@
int text_glob::is_tl (void)
{
- return is_tag && (strcmp(text_string, "html-tag:.tl") == 0);
+ return is_tag && (strcmp(text_string, "devtag:.tl") == 0);
}
/*
@@ -685,7 +685,7 @@
int text_glob::is_eo_tl (void)
{
- return is_tag && (strcmp(text_string, "html-tag:.eo.tl") == 0);
+ return is_tag && (strcmp(text_string, "devtag:.eo.tl") == 0);
}
/*
@@ -694,8 +694,8 @@
int text_glob::is_nf (void)
{
- return is_tag && (strncmp(text_string, "html-tag:.fi",
- strlen("html-tag:.fi")) == 0) &&
+ return is_tag && (strncmp(text_string, "devtag:.fi",
+ strlen("devtag:.fi")) == 0) &&
(get_arg() == 0);
}
@@ -705,8 +705,8 @@
int text_glob::is_fi (void)
{
- return( is_tag && (strncmp(text_string, "html-tag:.fi",
- strlen("html-tag:.fi")) == 0) &&
+ return( is_tag && (strncmp(text_string, "devtag:.fi",
+ strlen("devtag:.fi")) == 0) &&
(get_arg() == 1) );
}
@@ -716,7 +716,7 @@
int text_glob::is_eo_h (void)
{
- return is_tag && (strcmp(text_string, "html-tag:.eo.h") == 0);
+ return is_tag && (strcmp(text_string, "devtag:.eo.h") == 0);
}
/*
@@ -725,8 +725,8 @@
int text_glob::is_ce (void)
{
- return is_tag && (strncmp(text_string, "html-tag:.ce",
- strlen("html-tag:.ce")) == 0);
+ return is_tag && (strncmp(text_string, "devtag:.ce",
+ strlen("devtag:.ce")) == 0);
}
/*
@@ -735,8 +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, "devtag:.in ",
+ strlen("devtag:.in ")) == 0);
}
/*
@@ -745,8 +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, "devtag:.po ",
+ strlen("devtag:.po ")) == 0);
}
/*
@@ -755,8 +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, "devtag:.ti ",
+ strlen("devtag:.ti ")) == 0);
}
/*
@@ -765,7 +765,8 @@
int text_glob::is_ll (void)
{
- return is_tag && (strncmp(text_string, "html-tag:.ll ", strlen("html-tag:.ll
")) == 0);
+ return is_tag && (strncmp(text_string, "devtag:.ll ",
+ strlen("devtag:.ll ")) == 0);
}
/*
@@ -774,7 +775,8 @@
int text_glob::is_col (void)
{
- return is_tag && (strncmp(text_string, "html-tag:.col",
strlen("html-tag:.col")) == 0);
+ return is_tag && (strncmp(text_string, "devtag:.col",
+ strlen("devtag:.col")) == 0);
}
/*
@@ -783,7 +785,7 @@
int text_glob::is_tab_ts (void)
{
- return is_tag && (strcmp(text_string, "html-tag:.tab-ts") == 0);
+ return is_tag && (strcmp(text_string, "devtag:.tab-ts") == 0);
}
/*
@@ -792,7 +794,7 @@
int text_glob::is_tab_te (void)
{
- return is_tag && (strcmp(text_string, "html-tag:.tab-te") == 0);
+ return is_tag && (strcmp(text_string, "devtag:.tab-te") == 0);
}
/*
@@ -801,7 +803,8 @@
int text_glob::is_ta (void)
{
- return is_tag && (strncmp(text_string, "html-tag:.ta ", strlen("html-tag:.ta
")) == 0);
+ return is_tag && (strncmp(text_string, "devtag:.ta ",
+ strlen("devtag:.ta ")) == 0);
}
/*
@@ -810,7 +813,8 @@
int text_glob::is_tab (void)
{
- return is_tag && (strncmp(text_string, "html-tag:tab ", strlen("html-tag:tab
")) == 0);
+ return is_tag && (strncmp(text_string, "devtag:tab ",
+ strlen("devtag:tab ")) == 0);
}
/*
@@ -819,7 +823,8 @@
int text_glob::is_tab0 (void)
{
- return is_tag && (strncmp(text_string, "html-tag:tab0",
strlen("html-tag:tab0")) == 0);
+ return is_tag && (strncmp(text_string, "devtag:tab0",
+ strlen("devtag:tab0")) == 0);
}
/*
@@ -841,13 +846,14 @@
int text_glob::is_br (void)
{
- return is_a_tag() && ((strcmp ("html-tag:.br", text_string) == 0) ||
- (strncmp("html-tag:.sp", text_string, 11) == 0));
+ return is_a_tag() && ((strcmp ("devtag:.br", text_string) == 0) ||
+ (strncmp("devtag:.sp", text_string,
+ strlen("devtag:.sp")) == 0));
}
int text_glob::get_arg (void)
{
- if (strncmp("html-tag:", text_string, strlen("html-tag:")) == 0) {
+ if (strncmp("devtag:", text_string, strlen("devtag:")) == 0) {
const char *p = text_string;
while ((*p != (char)0) && (!isspace(*p)))
@@ -867,7 +873,7 @@
int text_glob::get_tab_args (char *align)
{
- if (strncmp("html-tag:", text_string, strlen("html-tag:")) == 0) {
+ if (strncmp("devtag:", text_string, strlen("devtag:")) == 0) {
const char *p = text_string;
// firstly the alignment C|R|L
@@ -1320,7 +1326,8 @@
if (str.length() > 0) {
text_glob *g;
- if (strncmp((str+'\0').contents(), "html-tag:.auto-image", 20) == 0) {
+ if (strncmp((str+'\0').contents(), "devtag:.auto-image",
+ strlen("devtag:.auto-image")) == 0) {
g = new text_glob();
g->text_glob_auto_image(s, buffer.add_string(str), str.length(),
min_vertical, min_horizontal, max_vertical,
max_horizontal);
@@ -2097,6 +2104,7 @@
void begin_page (int);
void end_page (int);
void special (char *arg, const environment *env, char type);
+ void devtag (char *arg, const environment *env, char type);
font *make_font (const char *);
void end_of_line ();
};
@@ -2240,7 +2248,7 @@
}
/*
- * do_centered_image - set a flag such that the next html-tag is
+ * do_centered_image - set a flag such that the next devtag is
* placed inside a centered paragraph.
*/
@@ -2250,7 +2258,7 @@
}
/*
- * do_right_image - set a flag such that the next html-tag is
+ * do_right_image - set a flag such that the next devtag is
* placed inside a right aligned paragraph.
*/
@@ -2260,7 +2268,7 @@
}
/*
- * do_left_image - set a flag such that the next html-tag is
+ * do_left_image - set a flag such that the next devtag is
* placed inside a left aligned paragraph.
*/
@@ -2996,7 +3004,7 @@
}
/*
- * do_tab - handle the "html-tag:tab" tag
+ * do_tab - handle the "devtag:tab" tag
*/
void html_printer::do_tab (char *s)
@@ -3014,7 +3022,7 @@
}
/*
- * do_tab0 - handle the "html-tag:tab0" tag
+ * do_tab0 - handle the "devtag:tab0" tag
*/
void html_printer::do_tab0 (void)
@@ -3048,11 +3056,11 @@
void html_printer::troff_tag (text_glob *g)
{
/*
- * firstly skip over html-tag:
+ * firstly skip over devtag:
*/
- char *t=(char *)g->text_string+9;
+ char *t=(char *)g->text_string+strlen("devtag:");
- if (strncmp(g->text_string, "html</p>:", 9) == 0) {
+ if (strncmp(g->text_string, "html</p>:", strlen("html</p>:")) == 0) {
do_end_para(g);
} else if (g->is_eol()) {
do_eol();
@@ -3141,7 +3149,8 @@
int html_printer::is_in_middle (int left, int right)
{
- return( abs(abs(left-pageoffset) - abs(pageoffset+linelength-right)) <=
CENTER_TOLERANCE );
+ return( abs(abs(left-pageoffset) - abs(pageoffset+linelength-right))
+ <= CENTER_TOLERANCE );
}
/*
@@ -3269,7 +3278,7 @@
page_contents->glyphs.move_to(where);
page_contents->glyphs.move_left();
- page_contents->insert_tag(string("html-tag:.tab-ts")); // tab table start
+ page_contents->insert_tag(string("devtag:.tab-ts")); // tab table start
page_contents->glyphs.move_right();
start_of_table = page_contents->glyphs.get_data();
page_contents->glyphs.move_to(old_pos);
@@ -3289,7 +3298,7 @@
while (page_contents->glyphs.get_data()->is_a_tag())
page_contents->glyphs.move_left();
- page_contents->insert_tag(string("html-tag:.tab-te")); // tab table end
+ page_contents->insert_tag(string("devtag:.tab-te")); // tab table end
while (g != page_contents->glyphs.get_data())
page_contents->glyphs.move_right();
page_contents->dump_page();
@@ -3305,7 +3314,7 @@
page_contents->glyphs.move_to(where);
page_contents->glyphs.move_left();
- page_contents->insert_tag(string("html-tag:tab0")); // tab0 start of line
+ page_contents->insert_tag(string("devtag:tab0")); // tab0 start of line
page_contents->glyphs.move_right();
page_contents->glyphs.move_to(old_pos);
}
@@ -3498,8 +3507,10 @@
g = page_contents->glyphs.move_right_get_data();
handle_state_assertion(g);
if (page_contents->glyphs.is_equal_to_head()) {
- if (tbl != NULL)
+ if (tbl != NULL) {
delete tbl;
+ tbl = NULL;
+ }
return;
}
@@ -3664,8 +3675,10 @@
page_contents->insert_tag(string("*** LAST ***"));
}
}
- if (tbl != NULL)
+ if (tbl != NULL) {
delete tbl;
+ tbl = NULL;
+ }
// and reset the registers
pageoffset = old_pageoffset;
@@ -3728,7 +3741,7 @@
return( (fontname != 0) && (fontname[0] == 'C') );
}
- return( FALSE );
+ return FALSE;
}
/*
@@ -4698,7 +4711,7 @@
else if (strcmp(cmd, "assertion:[y") == 0)
as.addy(cmd, id, make_val(val, minv, id, file, line), file, line);
else
- if (strncmp(cmd, "assertion:[", 11) == 0)
+ if (strncmp(cmd, "assertion:[", strlen("assertion:[")) == 0)
page_contents->add_tag(&sbuf_style, string(s),
line_number, minv, minh, maxv, maxh);
}
@@ -4725,8 +4738,7 @@
/*
* special - handle all x X requests from troff. For post-html they
* allow users to pass raw html commands, turn auto linked
- * headings off/on and also allow troff to emit tags to
- * indicate when a: .br, .sp etc occurs.
+ * headings off/on etc.
*/
void html_printer::special(char *s, const environment *env, char type)
@@ -4793,22 +4805,48 @@
*/
} else if (strncmp(s, "index:", 6) == 0) {
cutoff_heading = atoi(&s[6]);
- } else if (strncmp(s, "html-tag:", 9) == 0) {
+ } else if (strncmp(s, "assertion:[", 11) == 0) {
+ int r=font::res; /* resolution of the device */
+
+ handle_assertion(env->vpos-env->size*r/72, env->hpos,
+ env->vpos, env->hpos, s);
+ }
+ }
+}
+
+/*
+ * devtag - handles device troff tags sent from the `troff'.
+ * These include the troff state machine tags:
+ * .br, .sp, .in, .tl, .ll etc
+ *
+ * (see man 5 grohtml_tags).
+ */
+
+void html_printer::devtag (char *s, const environment *env, char type)
+{
+ if (type != 'p')
+ return;
+
+ if (s != 0) {
+ flush_sbuf();
+ if (env->fontno >= 0) {
+ style sty(get_font_from_index(env->fontno), env->size, env->height,
+ env->slant, env->fontno, *env->col);
+ sbuf_style = sty;
+ }
+
+ if (strncmp(s, "devtag:", strlen("devtag:")) == 0) {
int r=font::res; /* resolution of the device */
page_contents->add_tag(&sbuf_style, string(s),
line_number,
env->vpos-env->size*r/72, env->hpos,
env->vpos , env->hpos);
- } else if (strncmp(s, "assertion:[", 11) == 0) {
- int r=font::res; /* resolution of the device */
-
- handle_assertion(env->vpos-env->size*r/72, env->hpos,
- env->vpos, env->hpos, s);
}
}
}
+
/*
* taken from number.cpp in src/roff/troff, [hunits::hunits(units x)]
*/
Index: groff/src/include/printer.h
diff -u groff/src/include/printer.h:1.12 groff/src/include/printer.h:1.13
--- groff/src/include/printer.h:1.12 Sat Oct 30 11:11:00 2004
+++ groff/src/include/printer.h Thu Dec 16 13:09:54 2004
@@ -7,7 +7,7 @@
Written by James Clark (address@hidden)
- Last update: 12 Apr 2002
+ Last update: 15 Dec 2004
This file is part of groff.
@@ -83,6 +83,8 @@
virtual void end_of_line();
virtual void special(char *arg, const environment *env,
char type = 'p');
+ virtual void devtag(char *arg, const environment *env,
+ char type = 'p');
protected:
font_pointer_list *font_list;
Index: groff/src/libs/libdriver/input.cpp
diff -u groff/src/libs/libdriver/input.cpp:1.2
groff/src/libs/libdriver/input.cpp:1.3
--- groff/src/libs/libdriver/input.cpp:1.2 Thu Apr 8 20:43:22 2004
+++ groff/src/libs/libdriver/input.cpp Thu Dec 16 13:09:54 2004
@@ -8,7 +8,7 @@
Written by James Clark (address@hidden)
Major rewrite 2001 by Bernd Warken (address@hidden)
- Last update: 04 Apr 2003
+ Last update: 15 Dec 2004
This file is part of groff, the GNU roff text processing system.
@@ -1520,6 +1520,9 @@
char *str_arg = get_extended_arg(); // includes line skip
if (npages <= 0)
error("`x X' command invalid before first `p' command");
+ else if (str_arg != NULL && (strncmp(str_arg, "devtag:",
+ strlen("devtag:")) == 0))
+ pr->devtag(str_arg, current_env);
else
pr->special(str_arg, current_env);
a_delete str_arg;
Index: groff/src/libs/libdriver/printer.cpp
diff -u groff/src/libs/libdriver/printer.cpp:1.1
groff/src/libs/libdriver/printer.cpp:1.2
--- groff/src/libs/libdriver/printer.cpp:1.1 Tue Apr 15 15:13:35 2003
+++ groff/src/libs/libdriver/printer.cpp Thu Dec 16 13:09:54 2004
@@ -2,11 +2,11 @@
// <groff_src_dir>/src/libs/libdriver/printer.cpp
-/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003
+/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Written by James Clark (address@hidden)
- Last update: 04 Apr 2003
+ Last update: 15 Dec 2004
This file is part of groff.
@@ -107,6 +107,10 @@
{
}
+void printer::devtag(char *, const environment *, char)
+{
+}
+
void printer::draw(int, int *, int, const environment *)
{
}
Index: groff/src/roff/troff/env.cpp
diff -u groff/src/roff/troff/env.cpp:1.10 groff/src/roff/troff/env.cpp:1.11
--- groff/src/roff/troff/env.cpp:1.10 Fri Oct 15 05:08:35 2004
+++ groff/src/roff/troff/env.cpp Thu Dec 16 13:09:54 2004
@@ -2206,7 +2206,7 @@
if (curdiv == topdiv && topdiv->before_first_page)
topdiv->begin_page();
macro *m = new macro;
- m->append_str("html-tag:");
+ m->append_str("devtag:");
for (const char *p = nm; *p; p++)
if (!invalid_input_char((unsigned char)*p))
m->append(*p);
Index: groff/src/roff/troff/input.cpp
diff -u groff/src/roff/troff/input.cpp:1.22 groff/src/roff/troff/input.cpp:1.23
--- groff/src/roff/troff/input.cpp:1.22 Mon Nov 22 08:36:29 2004
+++ groff/src/roff/troff/input.cpp Thu Dec 16 13:09:54 2004
@@ -6075,8 +6075,7 @@
for (; c != '\n' && c != EOF; c = get_copy(0))
s += (char)c;
s += '\n';
- if (is_html)
- curenv->add_node(new tag_node(s, 0));
+ curenv->add_node(new tag_node(s, 0));
}
tok.next();
}
@@ -6099,8 +6098,7 @@
for (; c != '\n' && c != EOF; c = get_copy(0))
s += (char)c;
s += '\n';
- if (is_html)
- curenv->add_node(new tag_node(s, 1));
+ curenv->add_node(new tag_node(s, 1));
}
tok.next();
}
Index: groff/src/roff/troff/mtsm.cpp
diff -u groff/src/roff/troff/mtsm.cpp:1.2 groff/src/roff/troff/mtsm.cpp:1.3
--- groff/src/roff/troff/mtsm.cpp:1.2 Fri Oct 15 05:08:35 2004
+++ groff/src/roff/troff/mtsm.cpp Thu Dec 16 13:09:54 2004
@@ -198,27 +198,27 @@
void statem::flush(FILE *fp, statem *compare)
{
- int_values[MTSM_FI].diff(fp, "html-tag:.fi",
+ int_values[MTSM_FI].diff(fp, "devtag:.fi",
compare->int_values[MTSM_FI]);
- int_values[MTSM_RJ].diff(fp, "html-tag:.rj",
+ int_values[MTSM_RJ].diff(fp, "devtag:.rj",
compare->int_values[MTSM_RJ]);
- int_values[MTSM_SP].diff(fp, "html-tag:.sp",
+ int_values[MTSM_SP].diff(fp, "devtag:.sp",
compare->int_values[MTSM_SP]);
- units_values[MTSM_IN].diff(fp, "html-tag:.in",
+ units_values[MTSM_IN].diff(fp, "devtag:.in",
compare->units_values[MTSM_IN]);
- units_values[MTSM_LL].diff(fp, "html-tag:.ll",
+ units_values[MTSM_LL].diff(fp, "devtag:.ll",
compare->units_values[MTSM_LL]);
- units_values[MTSM_PO].diff(fp, "html-tag:.po",
+ units_values[MTSM_PO].diff(fp, "devtag:.po",
compare->units_values[MTSM_PO]);
- string_values[MTSM_TA].diff(fp, "html-tag:.ta",
+ string_values[MTSM_TA].diff(fp, "devtag:.ta",
compare->string_values[MTSM_TA]);
- units_values[MTSM_TI].diff(fp, "html-tag:.ti",
+ units_values[MTSM_TI].diff(fp, "devtag:.ti",
compare->units_values[MTSM_TI]);
- int_values[MTSM_CE].diff(fp, "html-tag:.ce",
+ int_values[MTSM_CE].diff(fp, "devtag:.ce",
compare->int_values[MTSM_CE]);
- bool_values[MTSM_EOL].diff(fp, "html-tag:.eol",
+ bool_values[MTSM_EOL].diff(fp, "devtag:.eol",
compare->bool_values[MTSM_EOL]);
- bool_values[MTSM_BR].diff(fp, "html-tag:.br",
+ bool_values[MTSM_BR].diff(fp, "devtag:.br",
compare->bool_values[MTSM_BR]);
if (debug_state) {
fprintf(stderr, "compared state %d\n", compare->issue_no);
Index: groff/src/roff/troff/node.cpp
diff -u groff/src/roff/troff/node.cpp:1.14 groff/src/roff/troff/node.cpp:1.15
--- groff/src/roff/troff/node.cpp:1.14 Fri Oct 15 05:08:35 2004
+++ groff/src/roff/troff/node.cpp Thu Dec 16 13:09:54 2004
@@ -4081,15 +4081,15 @@
switch (last_position) {
case 'c':
out->start_special();
- put(out, "html-tag:.centered-image");
+ put(out, "devtag:.centered-image");
break;
case 'r':
out->start_special();
- put(out, "html-tag:.right-image");
+ put(out, "devtag:.right-image");
break;
case 'l':
out->start_special();
- put(out, "html-tag:.left-image");
+ put(out, "devtag:.left-image");
break;
case 'i':
;
@@ -4098,7 +4098,7 @@
}
out->end_special();
out->start_special();
- put(out, "html-tag:.auto-image ");
+ put(out, "devtag:.auto-image ");
put(out, name);
out->end_special();
}
Index: groff/test-groff.in
diff -u groff/test-groff.in:1.3 groff/test-groff.in:1.4
--- groff/test-groff.in:1.3 Tue Jun 1 10:46:52 2004
+++ groff/test-groff.in Thu Dec 16 13:09:54 2004
@@ -1,17 +1,9 @@
#! /bin/sh
# This script runs groff without requiring that it be installed.
-# The current directory must be the top build directory.
SEP='@PATH_SEPARATOR@'
address@hidden@
-builddir=./src
-srcdir=`echo $0 | sed -e 's;/[^/]*$;;'`
-
-if test ! -d $builddir/roff/groff || \
- test ! -r $builddir/roff/groff/groff$EXEEXT; then
- echo $0 must be run with the top build directory as the current directory
2>&1
- exit 1
-fi
address@hidden@/src
address@hidden@
GROFF_BIN_PATH=\
$builddir/roff/groff$SEP\
@@ -31,9 +23,7 @@
$builddir/devices/grohtml$SEP\
$builddir/devices/xditview
-test -n "$srcdir" || srcdir=.
-
-XENVIRONMENT=`cd $srcdir; pwd`/src/devices/xditview/GXditview.ad
+XENVIRONMENT=$srcdir/src/devices/xditview/GXditview.ad
export XENVIRONMENT
GROFF_COMMAND_PREFIX=
Index: groff/tmac/Makefile.sub
diff -u groff/tmac/Makefile.sub:1.33 groff/tmac/Makefile.sub:1.34
--- groff/tmac/Makefile.sub:1.33 Thu Apr 10 18:07:35 2003
+++ groff/tmac/Makefile.sub Thu Dec 16 13:09:54 2004
@@ -23,6 +23,7 @@
lj4.tmac \
lbp.tmac \
html.tmac html-end.tmac \
+ devtag.tmac \
europs.tmac \
composite.tmac \
eqnrc \
Index: groff/tmac/an-old.tmac
diff -u groff/tmac/an-old.tmac:1.48 groff/tmac/an-old.tmac:1.49
--- groff/tmac/an-old.tmac:1.48 Wed Oct 13 07:24:46 2004
+++ groff/tmac/an-old.tmac Thu Dec 16 13:09:54 2004
@@ -109,9 +109,9 @@
.\" .TH title section extra1 extra2 extra3
.de1 TH
. if \\n[an-html] \{\
-. HTML-TAG-NS ".tl"
+. DEVTAG-TL
\\$1
-. HTML-TAG-NS ".eo.tl"
+. DEVTAG-EO-TL
. \}
.
. de an-init \" We have to do it like this to get multiple man pages right.
@@ -314,7 +314,7 @@
. in \\n[an-margin]u
. ti 0
. nr need_eo_h 1
-. HTML-TAG-NS ".NH \\n[an-level]"
+. DEVTAG-NH \\n[an-level]
. it 1 an-trap
. nr an-no-space-flag 1
. nr an-break-flag 1
@@ -377,7 +377,7 @@
..
.
.de1 an-trap
-. if \\n[need_eo_h]>0 .HTML-TAG-NS ".eo.h"
+. if \\n[need_eo_h]>0 .DEVTAG-EO-H
. nr need_eo_h 0
. ft R
. ps \\n[PS]u
@@ -413,9 +413,9 @@
. ti -\\n[an-prevailing-indent]u
. chop an-div
. ne (1v + 1u)
-. HTML-TAG-NS ".col 1"
+. DEVTAG-COL 1
\\*[an-div]\\h'|\\n[an-prevailing-indent]u'\c
-. HTML-TAG-NEXT ".col 2"
+. DEVTAG-COL-NEXT 2
. \}
..
.
Index: groff/tmac/s.tmac
diff -u groff/tmac/s.tmac:1.22 groff/tmac/s.tmac:1.23
--- groff/tmac/s.tmac:1.22 Tue Dec 7 21:23:55 2004
+++ groff/tmac/s.tmac Thu Dec 16 13:09:54 2004
@@ -178,7 +178,7 @@
.vs +3p
.ll (u;\\n[LL]*5/6)
.nr cov*n-au 0
-.HTML-TAG-NS ".tl"
+.DEVTAG-TL
..
.de @AU
address@hidden
@@ -382,7 +382,7 @@
.ce 9999
.if d cov*tl-div \{\
. cov*tl-div
-. HTML-TAG-NS ".eo.tl"
+. DEVTAG-EO-TL
.\}
.nr cov*i 1
.nr cov*sp 1v
@@ -500,7 +500,7 @@
. nr pg*gutw \\n[LL]-(address@hidden@colw])/(address@hidden)
. el .nr pg*gutw 0
.\}
-.HTML-TAG ".mc address@hidden address@hidden \\n[pg*gutw]"
+.DEVTAG ".mc address@hidden address@hidden \\n[pg*gutw]"
.mk pg*col-top
.ns
.nr pg*col-num 0
@@ -1137,9 +1137,9 @@
.\" address@hidden
.de address@hidden
.br
-.if \\n[need_eo_tl]>0 .HTML-TAG ".eo.tl"
+.if \\n[need_eo_tl]>0 .DEVTAG-EO-TL
.nr need_eo_tl 0
-.if \\n[need_eo_h]>0 .HTML-TAG ".eo.h"
+.if \\n[need_eo_h]>0 .DEVTAG-EO-H
.nr need_eo_h 0
.ce 0
.rj 0
@@ -1226,14 +1226,14 @@
. chop par*label
. ti -\\n[\\n[.ev]:ai]u
. ie \\n[dl]+1n<=\\n[\\n[.ev]:ai] \{\
-. HTML-TAG-NS ".col 1"
+. DEVTAG-COL 1
\\*[par*label]\h'|\\n[\\n[.ev]:ai]u'\c
-. HTML-TAG-NS ".col 2"
+. DEVTAG-COL 2
. \}
. el \{\
-. HTML-TAG-NS ".col 1"
+. DEVTAG-COL 1
\\*[par*label]
-. HTML-TAG-NEXT ".col 2"
+. DEVTAG-COL-NEXT 2
. br
. \}
. rm par*label
@@ -1403,7 +1403,7 @@
. nr sh*psincr 0
. if 0\\$1>0 .nr sh*psincr (\\n[GROWPS]-0\\$1)*\\n[PSINCR]
. SH-NO-TAG
-. HTML-TAG ".SH 1"
+. DEVTAG-SH 1
. if '\*(.T'html' .nr need_eo_h 1
..
.\" TL, AU, and AI are aliased to these in cov*ab-init.
@@ -1414,7 +1414,7 @@
.ps +2
.vs +3p
.ce 9999
-.HTML-TAG-NS ".tl"
+.DEVTAG-TL
.nr need_eo_tl 1
..
.de address@hidden
@@ -1575,7 +1575,7 @@
.if !dSN .als SN SN-DOT
.nr sh*psincr (\\n[GROWPS]-\\n[nh*hl])*\\n[PSINCR]
.SH-NO-TAG
-.HTML-TAG-NS ".NH \\$1"
+.DEVTAG-NH "\\$1"
. if '\*(.T'html' .nr need_eo_h 1
\\*[SN-DOT]
..
Index: groff/tmac/troffrc-end
diff -u groff/tmac/troffrc-end:1.10 groff/tmac/troffrc-end:1.11
--- groff/tmac/troffrc-end:1.10 Thu Apr 10 18:07:36 2003
+++ groff/tmac/troffrc-end Thu Dec 16 13:09:54 2004
@@ -13,8 +13,7 @@
.do if !d HTML-IMAGE-RIGHT .do ds HTML-IMAGE-RIGHT
.do if !d HTML-IMAGE-LEFT .do ds HTML-IMAGE-LEFT
.do if !d HTML-IMAGE-END .do ds HTML-IMAGE-END
-.do if !d HTML-TAG .do ds HTML-TAG
-.do if !d HTML-TAG-NS .do ds HTML-TAG-NS
+.do if !d DEVTAG .do ds DEVTAG
.do if !d HTML-DO-IMAGE .do ds HTML-DO-IMAGE
.
.\" Don't let blank lines creep in here.
Index: groff/tmac/www.tmac
diff -u groff/tmac/www.tmac:1.36 groff/tmac/www.tmac:1.37
--- groff/tmac/www.tmac:1.36 Wed Nov 24 15:42:10 2004
+++ groff/tmac/www.tmac Thu Dec 16 13:09:54 2004
@@ -45,6 +45,8 @@
.nr _C \n(.C
.cp 0
.
+.mso devtag.tmac
+.
.nr www-html 0
.if '\*[.T]'html' .nr www-html 1
.
@@ -262,15 +264,21 @@
.\"
.de HTML
. if \\n[www-html] \{\
+. \" was implemented via .nop \&\X^html:\\$*^ but
+. \" is now implemented using HTML-NS to utilize code factoring.
+. \"
. \" the `\&' makes the vertical mode leave, so to say
-. nop \&\X^html:\\$*^
+. \"
+. nop \&\c
+. HTML-NS \\$*
+. nop \&
. \}
..
.\"
.\" an auxiliary macro for HTML (without following space)
.\"
.de HTML-NS
-. tag "html:\\$*
+. nop \X^html:\\$*^\c
..
.\"
.\" emit a HTML tag after shutting down a (possibly open) paragraph
@@ -314,10 +322,16 @@
. ds \\$0:adr \\$1\"
. www:url_breaks \\$0:adr
. ie \\n[www-html] \{\
+. ie '\\$3'' \
+. ds \\$0:after \&
+. el \
+. ds \\$0:after \&\\$3
. ie '\\$2'' \
-. HTML <a href="\\$1">\\$1</a>\\$3
+. HTML-NS <a href="\\$1">\\$1</a>
. el \
-. HTML <a href="\\$1">\\$2</a>\\$3
+. HTML-NS <a href="\\$1">\\$2</a>
+. nop \\*[\\$0:after]
+. rm \\$0:after
. \}
. el \{\
. if !r ps4html .ad l
@@ -385,12 +399,12 @@
.de IMG
. ie \\n[www-html] \{\
. ie '\\$2'-R' \
-. HTML-TAG ".right-image"
+. DEVTAG ".right-image"
. el \{\
. ie '\\$2'-L' \
-. HTML-TAG ".left-image"
+. DEVTAG ".left-image"
. el \
-. HTML-TAG ".centered-image"
+. DEVTAG ".centered-image"
. \}
. nr www-width 100
. if !'\\$3'' \
@@ -405,35 +419,6 @@
. nop \[la]\f[C]\\$1\f[]\[ra]
..
.\" --------------------------------------------------------------------
-.\" HTML-TAG
-.\"
-.\" Emit a tag for grohtml. This is an internal macro.
-.\"
-.de HTML-TAG
-. if \\n[www-html] \{\
-. \" the `\&' makes the vertical mode leave, so to say
-. nop \&\X^html-tag:\\$*^
-. \}
-..
-.\" --------------------------------------------------------------------
-.\" HTML-TAG-NS
-.\"
-.\" Emit a tag for grohtml (without a space). This is an internal macro.
-.\"
-.de HTML-TAG-NS
-. tag html-tag:\\$*
-..
-.\" --------------------------------------------------------------------
-.\" HTML-TAG-NEXT
-.\"
-.\" When the troff state changes, emit a tag for grohtml (without a space)
-.\" This is an internal macro.
-.\"
-.de HTML-TAG-NEXT
-. taga html-tag:\\$*
-..
-.
-.\" --------------------------------------------------------------------
.\" PIMG [-R|-L|-C] filename [width] [height]
.\"
.\" Include a png image. It will work for -Tps and -Thtml.
@@ -447,12 +432,12 @@
.de PIMG
. ie \\n[www-html] \{\
. ie '\\$1'-R' \
-. HTML-TAG ".right-image"
+. DEVTAG ".right-image"
. el \{\
. ie '\\$1'-L' \
-. HTML-TAG ".left-image"
+. DEVTAG ".left-image"
. el \
-. HTML-TAG ".centered-image"
+. DEVTAG ".centered-image"
. \}
. nr www-width 0
. nr www-height 0
@@ -657,13 +642,13 @@
. nr www-heading-no 1
. el \
. nr www-heading-no \\$1
-. HTML-TAG ".NH \\n[www-heading-no]"
+. DEVTAG-NH \\n[www-heading-no]
..
.
.de HnE
. if (\\n[www-heading-no] == -1) \
. www-error "HnE found without a corresponding HnS"
-. HTML-TAG ".eo.h"
+. DEVTAG-EO-H
..
.\" --------------------------------------------------------------------
.\" LK
@@ -672,7 +657,7 @@
.\" section/numbered headings at this position.
.\"
.de LK
-. HTML-TAG-NS ".links"
+. DEVTAG ".links"
..
.\" --------------------------------------------------------------------
.\" HR
@@ -689,7 +674,7 @@
.\" emits by default.
.\"
.de NHR
-. HTML-TAG ".no-auto-rule"
+. DEVTAG ".no-auto-rule"
..
.\"
.\" www-end-nowhere - end of input trap called to finish diversion.
@@ -697,7 +682,7 @@
.de www-end-nowhere
. if !\\n[www-html] \
. di
-. HTML-TAG ".eo.tl"
+. DEVTAG-EO-TL
..
.\" --------------------------------------------------------------------
.\" HTL
@@ -711,7 +696,7 @@
.\" The macro terminates when a space or break is seen (.sp, .br).
.\"
.de HTL
-. HTML-TAG ".html-tl"
+. DEVTAG ".html-tl"
. if !\\n[www-html] \
. di www-nowhere
. it 2 www-end-nowhere
@@ -913,7 +898,7 @@
.\" The argument to JOBNAME is the file stem for future output files.
.\"
.de JOBNAME
-. HTML-TAG .job-name \\$1
+. DEVTAG .job-name \\$1
..
.\" --------------------------------------------------------------------
.\" HEAD
@@ -922,7 +907,7 @@
.\" document
.\" --------------------------------------------------------------------
.de HEAD
-. HTML-TAG .head "\\$*"
+. DEVTAG .head "\\$*"
..
.\" --------------------------------------------------------------------
.\" Final Setup
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Groff-commit] groff ./ChangeLog ./INSTALL ./test-groff.in src...,
Werner LEMBERG <=