[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 45/80: [tbl]: Align with modern groff conventions.
From: |
G. Branden Robinson |
Subject: |
[groff] 45/80: [tbl]: Align with modern groff conventions. |
Date: |
Sat, 30 Nov 2024 04:02:21 -0500 (EST) |
gbranden pushed a commit to branch master
in repository groff.
commit 5de447377496e5e3820bc7686bf86ca0e98a54d2
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Wed Nov 27 21:54:04 2024 -0600
[tbl]: Align with modern groff conventions.
* src/preproc/tbl/main.cpp:
* src/preproc/tbl/table.cpp: Add Autoconf "<config.h>"-inclusion
boilerplate to these translation units.
Fix sloppy whitespace.
---
ChangeLog | 8 ++++++++
src/preproc/tbl/main.cpp | 14 +++++++++-----
src/preproc/tbl/table.cpp | 4 ++++
3 files changed, 21 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 38b3a6454..e605dd862 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-11-27 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ [tbl]: Align with modern groff conventions.
+
+ * src/preproc/tbl/main.cpp:
+ * src/preproc/tbl/table.cpp: Add Autoconf "<config.h>"-inclusion
+ boilerplate to these translation units.
+
2024-11-27 G. Branden Robinson <g.branden.robinson@gmail.com>
[soelim]: Align with modern groff conventions.
diff --git a/src/preproc/tbl/main.cpp b/src/preproc/tbl/main.cpp
index b7b9aa6b1..e67ba9243 100644
--- a/src/preproc/tbl/main.cpp
+++ b/src/preproc/tbl/main.cpp
@@ -16,6 +16,10 @@ for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include "table.h"
#define MAX_POINT_SIZE 99
@@ -229,7 +233,7 @@ void process_input_file(FILE *fp)
putchar('T');
putchar(c);
if (c == '\n') {
- current_lineno++;
+ current_lineno++;
state = START;
}
else
@@ -284,7 +288,7 @@ void process_input_file(FILE *fp)
putchar('l');
putchar(c);
if (c == '\n') {
- current_lineno++;
+ current_lineno++;
state = START;
}
else
@@ -760,7 +764,7 @@ void input_entry_format::debug_print()
if (expand)
putc('x', stderr);
if (separation >= 0)
- fprintf(stderr, "%d", separation);
+ fprintf(stderr, "%d", separation);
for (i = 0; i < vrule; i++)
putc('|', stderr);
if (is_last_column)
@@ -1553,7 +1557,7 @@ table *process_data(table_input &in, format *f, options
*opt)
}
}
tbl->add_text_line(current_row, line, current_filename, ln);
- if (line.length() >= 4
+ if (line.length() >= 4
&& line[0] == '.' && line[1] == 'T' && line[2] == '&') {
format *newf = process_format(in, opt, f);
if (newf == 0)
@@ -1678,7 +1682,7 @@ int main(int argc, char **argv)
".do if !dT& .ds T&\n"
".do if !dTE .ds TE\n");
if (argc > optind) {
- for (int i = optind; i < argc; i++)
+ for (int i = optind; i < argc; i++)
if (argv[i][0] == '-' && argv[i][1] == '\0') {
current_filename = "-";
current_lineno = 1;
diff --git a/src/preproc/tbl/table.cpp b/src/preproc/tbl/table.cpp
index 612c93666..f891db881 100644
--- a/src/preproc/tbl/table.cpp
+++ b/src/preproc/tbl/table.cpp
@@ -16,6 +16,10 @@ for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include "table.h"
#define BAR_HEIGHT ".25m"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 45/80: [tbl]: Align with modern groff conventions.,
G. Branden Robinson <=