summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwlemb <wlemb>2001-05-16 11:07:51 +0000
committerwlemb <wlemb>2001-05-16 11:07:51 +0000
commit59b5860e276a37567b7c0b1f6a6acadb8b9ab4c6 (patch)
tree08c4ce5ae83c1adf952e58ed745bf32d889b6af8
parent73b696c337bcaaf324fba6d02ff4081adeab0a10 (diff)
downloadgroff-59b5860e276a37567b7c0b1f6a6acadb8b9ab4c6.tar.gz
* contrib/mm/m.tmac (TH): Fix incorrect error message.
* src/roff/troff/input.cc (read_size): Emit warning if value becomes less than or equal zero; set it to 1 then. * src/roff/troff/node.h (node::node): Initialize `last'.
-rw-r--r--ChangeLog10
-rw-r--r--contrib/mm/m.tmac5
-rw-r--r--src/roff/troff/input.cc5
-rw-r--r--src/roff/troff/node.h4
-rw-r--r--src/roff/troff/token.h2
5 files changed, 20 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 0baf537c..19c21601 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2001-05-16 Bruce Lilly <blilly@erols.com>
+
+ * contrib/mm/m.tmac (TH): Fix incorrect error message.
+
+2001-05-16 Werner LEMBERG <wl@gnu.org>
+
+ * src/roff/troff/input.cc (read_size): Emit warning if value becomes
+ less than or equal zero; set it to 1 then.
+ * src/roff/troff/node.h (node::node): Initialize `last'.
+
2001-05-08 Werner LEMBERG <wl@gnu.org>
* tmac/an-old.tmac: Make predefined strings work in compatibility
diff --git a/contrib/mm/m.tmac b/contrib/mm/m.tmac
index af60f769..41cff7c6 100644
--- a/contrib/mm/m.tmac
+++ b/contrib/mm/m.tmac
@@ -3,8 +3,8 @@
.ds RE \\$2
..
.\"
-.\" $Id: m.tmac,v 2.3 2001/03/05 09:56:29 jhaegg Exp $
-.@revision $Revision: 2.3 $
+.\" $Id: m.tmac,v 2.4 2001/05/16 11:07:52 wlemb Exp $
+.@revision $Revision: 2.4 $
.ig
Copyright (C) 1991-2000 Free Software Foundation, Inc.
@@ -2258,7 +2258,6 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%]
.nr tbl*header-written 1
..
.de TH
-.if '\\$1'N' @error TH: N not implemented yet. Sorry.
.ie '\\n[.z]'tbl*header-div' \{\
. nr T. 0
. T#
diff --git a/src/roff/troff/input.cc b/src/roff/troff/input.cc
index ee7833b4..366d77fd 100644
--- a/src/roff/troff/input.cc
+++ b/src/roff/troff/input.cc
@@ -4006,6 +4006,11 @@ static int read_size(int *x)
default:
assert(0);
}
+ if (*x <= 0) {
+ warning(WARN_RANGE,
+ "\\s request results in non-positive point size; set to 1");
+ *x = 1;
+ }
return 1;
}
else {
diff --git a/src/roff/troff/node.h b/src/roff/troff/node.h
index 48140c74..a58afed1 100644
--- a/src/roff/troff/node.h
+++ b/src/roff/troff/node.h
@@ -106,11 +106,11 @@ struct node {
virtual const char *type() = 0;
};
-inline node::node() : next(0)
+inline node::node() : next(0), last(0)
{
}
-inline node::node(node *n) : next(n)
+inline node::node(node *n) : next(n), last(0)
{
}
diff --git a/src/roff/troff/token.h b/src/roff/troff/token.h
index 40283adb..b87a0b18 100644
--- a/src/roff/troff/token.h
+++ b/src/roff/troff/token.h
@@ -72,7 +72,7 @@ public:
int space(); // is the current token a space?
int stretchable_space(); // is the current token a stretchable space?
int white_space(); // is the current token space or tab?
- int special(); // is the current token a special character?
+ int special(); // is the current token a special character?
int newline(); // is the current token a newline?
int tab(); // is the current token a tab?
int leader();