groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 06/17: src/preproc/tbl/main.cpp: Trivially refactor.


From: G. Branden Robinson
Subject: [groff] 06/17: src/preproc/tbl/main.cpp: Trivially refactor.
Date: Thu, 2 Feb 2023 04:24:37 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit 7af585f7a390971eb28c69e5fe6800581e352cec
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Mon Jan 30 22:39:54 2023 -0600

    src/preproc/tbl/main.cpp: Trivially refactor.
    
    * src/preproc/tbl/main.cpp (process_table): Trivially refactor.  Rename
      `form` to `fmt` to imply "format", not "form".
---
 ChangeLog                | 5 +++++
 src/preproc/tbl/main.cpp | 8 ++++----
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 956b47b8b..7294c63f3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-01-30  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * src/preproc/tbl/main.cpp (process_table): Trivially refactor.
+       Rename `form` to `fmt` to imply "format", not "form".
+
 2023-01-30  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * src/preproc/tbl/main.cpp (process_format): Throw error
diff --git a/src/preproc/tbl/main.cpp b/src/preproc/tbl/main.cpp
index feb94b4a1..a868b4238 100644
--- a/src/preproc/tbl/main.cpp
+++ b/src/preproc/tbl/main.cpp
@@ -1580,11 +1580,11 @@ table *process_data(table_input &in, format *f, options 
*opt)
 void process_table(table_input &in)
 {
   options *opt = 0 /* nullptr */;
-  format *form = 0 /* nullptr */;
+  format *fmt = 0 /* nullptr */;
   table *tbl = 0 /* nullptr */;
   if ((opt = process_options(in)) != 0 /* nullptr */
-      && (form = process_format(in, opt)) != 0 /* nullptr */
-      && (tbl = process_data(in, form, opt)) != 0 /* nullptr */) {
+      && (fmt = process_format(in, opt)) != 0 /* nullptr */
+      && (tbl = process_data(in, fmt, opt)) != 0 /* nullptr */) {
     tbl->print();
     delete tbl;
   }
@@ -1594,7 +1594,7 @@ void process_table(table_input &in)
       ;
   }
   delete opt;
-  delete form;
+  delete fmt;
   if (!in.ended())
     error("premature end of file");
 }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]