[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff-commit] groff ./ChangeLog src/devices/grohtml/html-text...
From: |
Werner LEMBERG |
Subject: |
[Groff-commit] groff ./ChangeLog src/devices/grohtml/html-text... |
Date: |
Fri, 15 Oct 2004 01:15:47 -0400 |
CVSROOT: /cvsroot/groff
Module name: groff
Branch:
Changes by: Werner LEMBERG <address@hidden> 04/10/15 05:08:36
Modified files:
. : ChangeLog
src/devices/grohtml: html-text.cpp post-html.cpp
src/roff/troff : div.cpp div.h env.cpp input.cpp mtsm.cpp mtsm.h
node.cpp node.h number.cpp
Log message:
* src/devices/grohtml/html-text.cpp (html_text_get_alignment),
src/devices/grohtml/post-html.cpp (make_val,
html_printer::handle_state_assertion): Fix compiler warnings.
* src/roff/troff/div.cpp: Include `stringclass.h' and `mtsm.h'.
(diversion::diversion): Fix order of initializers.
* src/roff/troff/div.h: Don't include `mtsm.h'.
* src/roff/troff/env.cpp: Include `stringclass.h' and `mtsm.h'.
(environment::environment): Fix order of initializers.
(environment::make_tag, environment::construct_format_state): Fix
compiler warnings.
* src/roff/troff/input.cpp: Include `stringclass.h' and `mtsm.h'.
(input_iterator::input_iterator, macro::macro): Fix order of
initializers.
* src/roff/troff/mtsm.cpp: Include only necessary header files.
(state_set::add, state_set::val): Fix compiler warnings.
* src/roff/troff/mtsm.h: Don't include `stringclass.h'.
(bool_value_state, int_value_state, units_value_state,
string_value_state): Remove comma after last element which causes
an error with g++ 3.3.3.
* src/roff/troff/node.cpp: Include `stringclass.h'.
(hline_node::hline_node, vline_node::vline_node,
space_char_hmotion_node, left_italic_corrected_node): Fix compiler
warnings.
(zero_width_node::zero_width_node): Fix order of initializers.
* src/roff/troff/node.h: Don't include `mtsm.h'.
(hmotion_node): Fix compiler warnings.
* src/roff/troff/number.cpp: Include `stringclass.h' and `mtsm.h'.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/ChangeLog.diff?tr1=1.751&tr2=1.752&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/src/devices/grohtml/html-text.cpp.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/src/devices/grohtml/post-html.cpp.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/src/roff/troff/div.cpp.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/src/roff/troff/div.h.diff?tr1=1.12&tr2=1.13&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/src/roff/troff/env.cpp.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/src/roff/troff/input.cpp.diff?tr1=1.20&tr2=1.21&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/src/roff/troff/mtsm.cpp.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/src/roff/troff/mtsm.h.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/src/roff/troff/node.cpp.diff?tr1=1.13&tr2=1.14&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/src/roff/troff/node.h.diff?tr1=1.28&tr2=1.29&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/src/roff/troff/number.cpp.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
Patches:
Index: groff/ChangeLog
diff -u groff/ChangeLog:1.751 groff/ChangeLog:1.752
--- groff/ChangeLog:1.751 Wed Oct 13 07:24:45 2004
+++ groff/ChangeLog Fri Oct 15 05:08:35 2004
@@ -1,3 +1,42 @@
+2004-10-13 Werner LEMBERG <address@hidden>
+
+ * src/devices/grohtml/html-text.cpp (html_text_get_alignment),
+ src/devices/grohtml/post-html.cpp (make_val,
+ html_printer::handle_state_assertion): Fix compiler warnings.
+
+ * src/roff/troff/div.cpp: Include `stringclass.h' and `mtsm.h'.
+ (diversion::diversion): Fix order of initializers.
+
+ * src/roff/troff/div.h: Don't include `mtsm.h'.
+
+ * src/roff/troff/env.cpp: Include `stringclass.h' and `mtsm.h'.
+ (environment::environment): Fix order of initializers.
+ (environment::make_tag, environment::construct_format_state): Fix
+ compiler warnings.
+
+ * src/roff/troff/input.cpp: Include `stringclass.h' and `mtsm.h'.
+ (input_iterator::input_iterator, macro::macro): Fix order of
+ initializers.
+
+ * src/roff/troff/mtsm.cpp: Include only necessary header files.
+ (state_set::add, state_set::val): Fix compiler warnings.
+
+ * src/roff/troff/mtsm.h: Don't include `stringclass.h'.
+ (bool_value_state, int_value_state, units_value_state,
+ string_value_state): Remove comma after last element which causes
+ an error with g++ 3.3.3.
+
+ * src/roff/troff/node.cpp: Include `stringclass.h'.
+ (hline_node::hline_node, vline_node::vline_node,
+ space_char_hmotion_node, left_italic_corrected_node): Fix compiler
+ warnings.
+ (zero_width_node::zero_width_node): Fix order of initializers.
+
+ * src/roff/troff/node.h: Don't include `mtsm.h'.
+ (hmotion_node): Fix compiler warnings.
+
+ * src/roff/troff/number.cpp: Include `stringclass.h' and `mtsm.h'.
+
2004-10-12 Gaius Mulley <address@hidden>
* doc/groff.css: New file.
Index: groff/src/devices/grohtml/html-text.cpp
diff -u groff/src/devices/grohtml/html-text.cpp:1.4
groff/src/devices/grohtml/html-text.cpp:1.5
--- groff/src/devices/grohtml/html-text.cpp:1.4 Tue Oct 12 21:39:31 2004
+++ groff/src/devices/grohtml/html-text.cpp Fri Oct 15 05:08:35 2004
@@ -975,7 +975,7 @@
p = p->next;
}
}
- return "";
+ return (char *)"";
}
/*
Index: groff/src/devices/grohtml/post-html.cpp
diff -u groff/src/devices/grohtml/post-html.cpp:1.10
groff/src/devices/grohtml/post-html.cpp:1.11
--- groff/src/devices/grohtml/post-html.cpp:1.10 Tue Oct 12 21:39:31 2004
+++ groff/src/devices/grohtml/post-html.cpp Fri Oct 15 05:08:35 2004
@@ -4637,9 +4637,9 @@
t++;
if (atoi(t) != v) {
if (f == NULL)
- f = "stdin";
+ f = (char *)"stdin";
if (l == NULL)
- l = "<none>";
+ l = (char *)"<none>";
fprintf(stderr, "%s:%s: grohtml assertion failed at id%s expecting %d
and was given %s\n",
f, l, id, v, s);
}
@@ -4687,7 +4687,7 @@
char *n = (char *)&g->text_string[11];
char *cmd = get_str(n, &n);
char *val = get_str(n, &n);
- char *id = get_str(n, &n); // unused
+ (void)get_str(n, &n); // unused
char *file= get_str(n, &n);
char *line= get_str(n, &n);
Index: groff/src/roff/troff/div.cpp
diff -u groff/src/roff/troff/div.cpp:1.7 groff/src/roff/troff/div.cpp:1.8
--- groff/src/roff/troff/div.cpp:1.7 Sun Oct 10 19:08:03 2004
+++ groff/src/roff/troff/div.cpp Fri Oct 15 05:08:35 2004
@@ -25,6 +25,8 @@
#include "troff.h"
#include "dictionary.h"
#include "hvunits.h"
+#include "stringclass.h"
+#include "mtsm.h"
#include "env.h"
#include "request.h"
#include "node.h"
@@ -51,9 +53,9 @@
diversion::diversion(symbol s)
: prev(0), nm(s), vertical_position(V0), high_water_mark(V0),
- no_space_mode(0), needs_push(0), marked_place(V0),
- any_chars_added(0), saved_seen_break(0), saved_seen_space(0),
- saved_seen_eol(0), saved_suppress_next_eol(0)
+ any_chars_added(0), no_space_mode(0), needs_push(0), saved_seen_break(0),
+ saved_seen_space(0), saved_seen_eol(0), saved_suppress_next_eol(0),
+ marked_place(V0)
{
}
Index: groff/src/roff/troff/div.h
diff -u groff/src/roff/troff/div.h:1.12 groff/src/roff/troff/div.h:1.13
--- groff/src/roff/troff/div.h:1.12 Sun Oct 10 19:08:03 2004
+++ groff/src/roff/troff/div.h Fri Oct 15 05:08:35 2004
@@ -21,8 +21,6 @@
void end_diversions();
-#include "mtsm.h"
-
class diversion {
friend void do_divert(int append, int boxing);
friend void end_diversions();
@@ -48,7 +46,6 @@
state_set modified_tag;
vunits marked_place;
diversion(symbol s = NULL_SYMBOL);
-
virtual ~diversion();
virtual void output(node *nd, int retain_size, vunits vs, vunits post_vs,
hunits width) = 0;
Index: groff/src/roff/troff/env.cpp
diff -u groff/src/roff/troff/env.cpp:1.9 groff/src/roff/troff/env.cpp:1.10
--- groff/src/roff/troff/env.cpp:1.9 Sun Oct 10 19:08:03 2004
+++ groff/src/roff/troff/env.cpp Fri Oct 15 05:08:35 2004
@@ -22,6 +22,8 @@
#include "troff.h"
#include "dictionary.h"
#include "hvunits.h"
+#include "stringclass.h"
+#include "mtsm.h"
#include "env.h"
#include "request.h"
#include "node.h"
@@ -622,10 +624,6 @@
prev_requested_size(sizescale*10),
char_height(0),
char_slant(0),
- seen_space(0),
- seen_eol(0),
- suppress_next_eol(0),
- seen_break(0),
space_size(12),
sentence_space_size(12),
adjust_mode(ADJUST_BOTH),
@@ -653,7 +651,6 @@
width_total(0),
space_total(0),
input_line_start(0),
- tabs(units_per_inch/2, TAB_LEFT),
line_tabs(0),
current_tab(TAB_NONE),
leader_node(0),
@@ -684,6 +681,11 @@
prev_glyph_color(&default_color),
fill_color(&default_color),
prev_fill_color(&default_color),
+ seen_space(0),
+ seen_eol(0),
+ suppress_next_eol(0),
+ seen_break(0),
+ tabs(units_per_inch/2, TAB_LEFT),
name(nm),
control_char('.'),
no_break_control_char('\''),
@@ -714,10 +716,6 @@
fontno(e->fontno),
prev_family(e->prev_family),
family(e->family),
- seen_space(e->seen_space),
- seen_eol(e->seen_eol),
- suppress_next_eol(e->suppress_next_eol),
- seen_break(e->seen_break),
space_size(e->space_size),
sentence_space_size(e->sentence_space_size),
adjust_mode(e->adjust_mode),
@@ -745,7 +743,6 @@
width_total(0),
space_total(0),
input_line_start(0),
- tabs(e->tabs),
line_tabs(e->line_tabs),
current_tab(TAB_NONE),
leader_node(0),
@@ -776,6 +773,11 @@
prev_glyph_color(e->prev_glyph_color),
fill_color(e->fill_color),
prev_fill_color(e->prev_fill_color),
+ seen_space(e->seen_space),
+ seen_eol(e->seen_eol),
+ suppress_next_eol(e->suppress_next_eol),
+ seen_break(e->seen_break),
+ tabs(e->tabs),
name(e->name), // so that eg `.if "\n[.ev]"0"' works
control_char(e->control_char),
no_break_control_char(e->no_break_control_char),
@@ -2194,7 +2196,7 @@
do_break();
}
-node *environment::make_tag(const char *name, int i)
+node *environment::make_tag(const char *nm, int i)
{
if (is_html) {
/*
@@ -2205,7 +2207,7 @@
topdiv->begin_page();
macro *m = new macro;
m->append_str("html-tag:");
- for (const char *p = name; *p; p++)
+ for (const char *p = nm; *p; p++)
if (!invalid_input_char((unsigned char)*p))
m->append(*p);
m->append(' ');
@@ -2264,7 +2266,8 @@
return NULL;
}
-void environment::construct_format_state(node *n, int was_centered, int fill)
+void environment::construct_format_state(node *n, int was_centered,
+ int filling)
{
if (is_html) {
// find first glyph node which has a state.
@@ -2282,12 +2285,12 @@
n->state->add_tag(MTSM_CE, center_lines+1);
else
n->state->add_tag_if_unknown(MTSM_CE, 0);
- n->state->add_tag_if_unknown(MTSM_FI, fill);
+ n->state->add_tag_if_unknown(MTSM_FI, filling);
n = n->next;
while (n != 0) {
if (n->state != 0) {
n->state->sub_tag_ce();
- n->state->add_tag_if_unknown(MTSM_FI, fill);
+ n->state->add_tag_if_unknown(MTSM_FI, filling);
}
n = n->next;
}
Index: groff/src/roff/troff/input.cpp
diff -u groff/src/roff/troff/input.cpp:1.20 groff/src/roff/troff/input.cpp:1.21
--- groff/src/roff/troff/input.cpp:1.20 Sun Oct 10 19:08:03 2004
+++ groff/src/roff/troff/input.cpp Fri Oct 15 05:08:35 2004
@@ -24,17 +24,19 @@
#include "troff.h"
#include "dictionary.h"
#include "hvunits.h"
+#include "stringclass.h"
+#include "mtsm.h"
#include "env.h"
#include "request.h"
#include "node.h"
-#include "reg.h"
#include "token.h"
#include "div.h"
+#include "reg.h"
#include "charinfo.h"
-#include "font.h"
#include "macropath.h"
-#include "defs.h"
#include "input.h"
+#include "defs.h"
+#include "font.h"
#include "unicode.h"
// Needed for getpid() and isatty()
@@ -226,12 +228,12 @@
};
input_iterator::input_iterator()
-: ptr(0), eptr(0), is_diversion(0)
+: is_diversion(0), ptr(0), eptr(0)
{
}
input_iterator::input_iterator(int is_div)
-: ptr(0), eptr(0), is_diversion(is_div)
+: is_diversion(is_div), ptr(0), eptr(0)
{
}
@@ -3158,8 +3160,8 @@
}
macro::macro(const macro &m)
-: p(m.p), filename(m.filename), lineno(m.lineno), len(m.len),
- empty_macro(m.empty_macro), is_a_diversion(m.is_a_diversion)
+: filename(m.filename), lineno(m.lineno), len(m.len),
+ empty_macro(m.empty_macro), is_a_diversion(m.is_a_diversion), p(m.p)
{
if (p != 0)
p->count++;
Index: groff/src/roff/troff/mtsm.cpp
diff -u groff/src/roff/troff/mtsm.cpp:1.1 groff/src/roff/troff/mtsm.cpp:1.2
--- groff/src/roff/troff/mtsm.cpp:1.1 Sun Oct 10 19:57:22 2004
+++ groff/src/roff/troff/mtsm.cpp Fri Oct 15 05:08:35 2004
@@ -23,26 +23,10 @@
extern int debug_state;
#include "troff.h"
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#include "dictionary.h"
#include "hvunits.h"
-#include "env.h"
-#include "request.h"
-#include "node.h"
-#include "token.h"
-#include "charinfo.h"
-#include "font.h"
-#include "reg.h"
-#include "input.h"
-#include "div.h"
-#include "geometry.h"
+#include "stringclass.h"
#include "mtsm.h"
-
-#include "nonposix.h"
+#include "env.h"
static int no_of_statems = 0; // debugging aid
@@ -637,12 +621,12 @@
return (stringset & (1 << (int)s) != 0);
}
-void state_set::add(units_value_state i, int n)
+void state_set::add(units_value_state, int n)
{
unitsset += n;
}
-units state_set::val(units_value_state i)
+units state_set::val(units_value_state)
{
return unitsset;
}
Index: groff/src/roff/troff/mtsm.h
diff -u groff/src/roff/troff/mtsm.h:1.1 groff/src/roff/troff/mtsm.h:1.2
--- groff/src/roff/troff/mtsm.h:1.1 Sun Oct 10 19:57:22 2004
+++ groff/src/roff/troff/mtsm.h Fri Oct 15 05:08:35 2004
@@ -26,8 +26,6 @@
with groff; see the file COPYING. If not, write to the Free Software
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-#include "stringclass.h"
-
struct int_value {
int value;
int is_known;
@@ -68,25 +66,25 @@
enum bool_value_state {
MTSM_EOL,
MTSM_BR,
- LAST_BOOL,
+ LAST_BOOL
};
enum int_value_state {
MTSM_FI,
MTSM_RJ,
MTSM_CE,
MTSM_SP,
- LAST_INT,
+ LAST_INT
};
enum units_value_state {
MTSM_IN,
MTSM_LL,
MTSM_PO,
MTSM_TI,
- LAST_UNITS,
+ LAST_UNITS
};
enum string_value_state {
MTSM_TA,
- LAST_STRING,
+ LAST_STRING
};
struct statem {
Index: groff/src/roff/troff/node.cpp
diff -u groff/src/roff/troff/node.cpp:1.13 groff/src/roff/troff/node.cpp:1.14
--- groff/src/roff/troff/node.cpp:1.13 Tue Oct 12 05:44:51 2004
+++ groff/src/roff/troff/node.cpp Fri Oct 15 05:08:35 2004
@@ -29,17 +29,18 @@
#include "dictionary.h"
#include "hvunits.h"
+#include "stringclass.h"
+#include "mtsm.h"
#include "env.h"
#include "request.h"
#include "node.h"
#include "token.h"
+#include "div.h"
+#include "reg.h"
#include "charinfo.h"
#include "font.h"
-#include "reg.h"
#include "input.h"
-#include "div.h"
#include "geometry.h"
-#include "mtsm.h"
#include "nonposix.h"
@@ -2916,13 +2917,13 @@
delete n;
}
-hline_node::hline_node(hunits i, node *c, node *next)
-: node(next), x(i), n(c)
+hline_node::hline_node(hunits i, node *c, node *nxt)
+: node(nxt), x(i), n(c)
{
}
-hline_node::hline_node(hunits i, node *c, statem *s, int pop, node *next)
-: node(next, s, pop), x(i), n(c)
+hline_node::hline_node(hunits i, node *c, statem *s, int pop, node *nxt)
+: node(nxt, s, pop), x(i), n(c)
{
}
@@ -2936,13 +2937,13 @@
return x < H0 ? H0 : x;
}
-vline_node::vline_node(vunits i, node *c, node *next)
-: node(next), x(i), n(c)
+vline_node::vline_node(vunits i, node *c, node *nxt)
+: node(nxt), x(i), n(c)
{
}
-vline_node::vline_node(vunits i, node *c, statem *s, int pop, node *next)
-: node(next, s, pop), x(i), n(c)
+vline_node::vline_node(vunits i, node *c, statem *s, int pop, node *nxt)
+: node(nxt, s, pop), x(i), n(c)
{
}
@@ -2963,7 +2964,7 @@
}
zero_width_node::zero_width_node(node *nd, statem *s, int pop)
-: n(nd), node(0, s, pop)
+: node(0, s, pop), n(nd)
{
}
@@ -3559,14 +3560,14 @@
space_char_hmotion_node::space_char_hmotion_node(hunits i, color *c,
statem *s, int pop,
- node *next)
-: hmotion_node(i, c, s, pop, next)
+ node *nxt)
+: hmotion_node(i, c, s, pop, nxt)
{
}
space_char_hmotion_node::space_char_hmotion_node(hunits i, color *c,
- node *next)
-: hmotion_node(i, c, 0, 0, next)
+ node *nxt)
+: hmotion_node(i, c, 0, 0, nxt)
{
}
@@ -5327,14 +5328,14 @@
return 0;
}
-left_italic_corrected_node::left_italic_corrected_node(node *x)
-: node(x), n(0)
+left_italic_corrected_node::left_italic_corrected_node(node *xx)
+: node(xx), n(0)
{
}
left_italic_corrected_node::left_italic_corrected_node(statem *s, int pop,
- node *x)
-: node(x, s, pop), n(0)
+ node *xx)
+: node(xx, s, pop), n(0)
{
}
Index: groff/src/roff/troff/node.h
diff -u groff/src/roff/troff/node.h:1.28 groff/src/roff/troff/node.h:1.29
--- groff/src/roff/troff/node.h:1.28 Tue Oct 12 05:44:51 2004
+++ groff/src/roff/troff/node.h Fri Oct 15 05:08:35 2004
@@ -19,8 +19,6 @@
with groff; see the file COPYING. If not, write to the Free Software
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-#include "mtsm.h"
-
struct hyphen_list {
unsigned char hyphen;
unsigned char breakable;
@@ -317,11 +315,11 @@
public:
hmotion_node(hunits i, color *c, node *nxt = 0)
: node(nxt), n(i), was_tab(0), unformat(0), col(c) {}
- hmotion_node(hunits i, color *c, statem *s, int divlevel, node *next = 0)
- : node(next, s, divlevel), n(i), was_tab(0), unformat(0), col(c) {}
+ hmotion_node(hunits i, color *c, statem *s, int divlevel, node *nxt = 0)
+ : node(nxt, s, divlevel), n(i), was_tab(0), unformat(0), col(c) {}
hmotion_node(hunits i, int flag1, int flag2, color *c, statem *s,
- int divlevel, node *next = 0)
- : node(next, s, divlevel), n(i), was_tab(flag1), unformat(flag2),
+ int divlevel, node *nxt = 0)
+ : node(nxt, s, divlevel), n(i), was_tab(flag1), unformat(flag2),
col(c) {}
hmotion_node(hunits i, int flag1, int flag2, color *c, node *nxt = 0)
: node(nxt), n(i), was_tab(flag1), unformat(flag2), col(c) {}
Index: groff/src/roff/troff/number.cpp
diff -u groff/src/roff/troff/number.cpp:1.2 groff/src/roff/troff/number.cpp:1.3
--- groff/src/roff/troff/number.cpp:1.2 Wed Jan 7 08:28:56 2004
+++ groff/src/roff/troff/number.cpp Fri Oct 15 05:08:35 2004
@@ -22,6 +22,8 @@
#include "troff.h"
#include "hvunits.h"
+#include "stringclass.h"
+#include "mtsm.h"
#include "env.h"
#include "token.h"
#include "div.h"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Groff-commit] groff ./ChangeLog src/devices/grohtml/html-text...,
Werner LEMBERG <=