summaryrefslogtreecommitdiff
path: root/src/roff/troff
diff options
context:
space:
mode:
Diffstat (limited to 'src/roff/troff')
-rw-r--r--src/roff/troff/input.cc5
-rw-r--r--src/roff/troff/node.h4
-rw-r--r--src/roff/troff/token.h2
3 files changed, 8 insertions, 3 deletions
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();