summaryrefslogtreecommitdiffstats
path: root/contrib/groff/tbl
diff options
context:
space:
mode:
authorasmodai <asmodai@FreeBSD.org>2000-01-12 09:51:43 +0000
committerasmodai <asmodai@FreeBSD.org>2000-01-12 09:51:43 +0000
commit2e2c9047c3a8b5b6fdcdcd4585d5b114f31cd386 (patch)
tree723c5fa18b7084a4da09e4e42000ef10cbc884fa /contrib/groff/tbl
parent35cdaa022af3f495aa21a1292d85ee40b28f86fb (diff)
downloadFreeBSD-src-2e2c9047c3a8b5b6fdcdcd4585d5b114f31cd386.zip
FreeBSD-src-2e2c9047c3a8b5b6fdcdcd4585d5b114f31cd386.tar.gz
Virgin import of FSF groff v1.15
Diffstat (limited to 'contrib/groff/tbl')
-rw-r--r--contrib/groff/tbl/main.cc6
-rw-r--r--contrib/groff/tbl/table.cc14
2 files changed, 11 insertions, 9 deletions
diff --git a/contrib/groff/tbl/main.cc b/contrib/groff/tbl/main.cc
index 0b79bc8..3956a49 100644
--- a/contrib/groff/tbl/main.cc
+++ b/contrib/groff/tbl/main.cc
@@ -229,12 +229,14 @@ void process_input_file(FILE *fp)
c = getc(fp);
}
putchar('\n');
+ printf(".if '\\*(.T'html' \\X(graphic-start(\n");
current_lineno++;
{
table_input input(fp);
process_table(input);
set_troff_location(current_filename, current_lineno);
if (input.ended()) {
+ printf(".if '\\*(.T'html' \\X(graphic-end(\n");
fputs(".TE", stdout);
while ((c = getc(fp)) != '\n') {
if (c == EOF) {
@@ -383,12 +385,12 @@ options *process_options(table_input &in)
return opt;
char *p = &line[0];
for (;;) {
- while (csspace(*p) || *p == ',')
+ while (!csalpha(*p) && *p != '\0')
p++;
if (*p == '\0')
break;
char *q = p;
- while (*q != ' ' && *q != '\0' && *q != '\t' && *q != ',' && *q != '(')
+ while (csalpha(*q))
q++;
char *arg = 0;
if (*q != '(' && *q != '\0')
diff --git a/contrib/groff/tbl/table.cc b/contrib/groff/tbl/table.cc
index 160ff90..893e1b3 100644
--- a/contrib/groff/tbl/table.cc
+++ b/contrib/groff/tbl/table.cc
@@ -669,13 +669,13 @@ void block_entry::do_divert(int alphabetic, int ncols, const string *mw,
break;
if (i > end_col) {
// Every column spanned by this entry has a minimum width.
- for (int i = start_col; i <= end_col; i++) {
- if (i > start_col) {
+ for (int j = start_col; j <= end_col; j++) {
+ if (j > start_col) {
if (sep)
- printfs("+%1n", as_string(sep[i - 1]));
+ printfs("+%1n", as_string(sep[j - 1]));
prints('+');
}
- printfs("(n;%1)", mw[i]);
+ printfs("(n;%1)", mw[j]);
}
printfs(">?\\n[%1]u", span_width_reg(start_col, end_col));
}
@@ -2651,13 +2651,13 @@ void table::do_row(int r)
" 0\n");
}
int printed_one = 0;
- for (vertical_rule *p = vrule_list; p; p = p->next)
- if (p->end_row == r) {
+ for (vertical_rule *vr = vrule_list; vr; vr = vr->next)
+ if (vr->end_row == r) {
if (!printed_one) {
prints("." REPEATED_VPT_MACRO " 0\n");
printed_one = 1;
}
- p->print();
+ vr->print();
}
if (printed_one)
prints("." REPEATED_VPT_MACRO " 1\n");
OpenPOWER on IntegriCloud