groff-commit
[Top][All Lists]
Advanced

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

[groff] 35/80: [grops]: Align with modern groff conventions.


From: G. Branden Robinson
Subject: [groff] 35/80: [grops]: Align with modern groff conventions.
Date: Sat, 30 Nov 2024 04:02:19 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit 174e4d2f784e296d2eb9cb02c3e4a94cc5fa2817
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Wed Nov 27 20:21:01 2024 -0600

    [grops]: Align with modern groff conventions.
    
    * src/devices/grops/ps.cpp:
    * src/devices/grops/psrm.cpp: Add Autoconf "<config.h>"-inclusion
      boilerplate to these translation units.  Include system library
      headers before local ones.
    
    Fix sloppy whitespace.
---
 ChangeLog                  |  9 +++++++++
 src/devices/grops/ps.cpp   | 30 ++++++++++++++++++++----------
 src/devices/grops/psrm.cpp | 13 ++++++++++---
 3 files changed, 39 insertions(+), 13 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5122a7ca7..2cb38d001 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2024-11-27  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       [grops]: Align with modern groff conventions.
+
+       * src/devices/grops/ps.cpp:
+       * src/devices/grops/psrm.cpp: Add Autoconf "<config.h>"-
+       inclusion boilerplate to these translation units.  Include
+       system library headers before local ones.
+
 2024-11-27  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        [grohtml]: Align with modern groff conventions.
diff --git a/src/devices/grops/ps.cpp b/src/devices/grops/ps.cpp
index ab31de08a..56abb8461 100644
--- a/src/devices/grops/ps.cpp
+++ b/src/devices/grops/ps.cpp
@@ -22,20 +22,30 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>. */
  *   http://partners.adobe.com/public/developer/en/ps/5001.DSC_Spec.pdf
  */
 
-#include "lib.h" // PI
-#include "driver.h"
-#include "stringclass.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <errno.h>
+#include <locale.h> // setlocale()
+#include <math.h> // atan2(), sqrt(), tan()
+#include <stdint.h> // uint16_t
+#include <stdio.h> // EOF, FILE, fclose(), fgets(), fseek(), getc(),
+                  // setbuf(), setderr, stdout
+#include <stdlib.h> // putenv(), strtol()
+#include <string.h> // strtok()
+#include <time.h> // asctime()
+
 #include "cset.h"
+#include "curtime.h"
+#include "driver.h"
+#include "lib.h" // PI
 #include "nonposix.h"
 #include "paper.h"
-#include "curtime.h"
+#include "stringclass.h"
 
 #include "ps.h"
 
-#include <errno.h> // errno
-#include <stdint.h> // uint16_t
-#include <time.h>
-
 #ifdef NEED_DECLARATION_PUTENV
 extern "C" {
   int putenv(const char *);
@@ -1357,7 +1367,7 @@ void ps_printer::media_set()
    *    ProcessColorModel
    *  etc.
    */
-  if (!(broken_flags & (USE_PS_ADOBE_2_0|NO_PAPERSIZE))) { 
+  if (!(broken_flags & (USE_PS_ADOBE_2_0|NO_PAPERSIZE))) {
     out.begin_comment("BeginFeature:")
        .comment_arg("*PageSize")
        .comment_arg(media_name())
@@ -1477,7 +1487,7 @@ ps_printer::~ps_printer()
   }
   out.begin_comment("Orientation:")
      .comment_arg(landscape_flag ? "Landscape" : "Portrait")
-     .end_comment(); 
+     .end_comment();
   if (ncopies != 1) {
     out.end_line();
     fprintf(out.get_file(), "%%%%Requirements: numcopies(%d)\n", ncopies);
diff --git a/src/devices/grops/psrm.cpp b/src/devices/grops/psrm.cpp
index 7e3d68e6d..3677f4580 100644
--- a/src/devices/grops/psrm.cpp
+++ b/src/devices/grops/psrm.cpp
@@ -16,14 +16,21 @@ 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 <errno.h>
+#include <stdio.h> // EOF, FILE, fclose(), fgets(), getc(), ungetc()
+#include <stdlib.h> // getenv(), putenv(), strtoul()
+#include <string.h> // strerror(), strtok()
+
+#include "cset.h"
 #include "driver.h"
 #include "stringclass.h"
-#include "cset.h"
 
 #include "ps.h"
 
-#include <errno.h> // errno
-
 #ifdef NEED_DECLARATION_PUTENV
 extern "C" {
   int putenv(const char *);



reply via email to

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