[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 31/80: [grn]: Align with modern groff conventions.
From: |
G. Branden Robinson |
Subject: |
[groff] 31/80: [grn]: Align with modern groff conventions. |
Date: |
Sat, 30 Nov 2024 04:02:18 -0500 (EST) |
gbranden pushed a commit to branch master
in repository groff.
commit 2ccd9b4d9b8095c3017d15941b33513119c6f9ce
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Wed Nov 27 15:28:40 2024 -0600
[grn]: Align with modern groff conventions.
* src/preproc/grn/hdb.cpp:
* src/preproc/grn/main.cpp: Include system library headers before local
ones.
* src/preproc/grn/hgraph.cpp:
* src/preproc/grn/main.cpp: Add Autoconf "<config.h>"-inclusion
boilerplate to these translation units.
* src/preproc/grn/hpoint.cpp: Drop unnecessary inclusion of
"<stdlib.h>".
Also clarify authorship history and public domain status in comment
headers.
---
ChangeLog | 15 +++++++++++++++
src/preproc/grn/hdb.cpp | 14 +++++++++-----
src/preproc/grn/hgraph.cpp | 10 ++++++++++
src/preproc/grn/hpoint.cpp | 12 ++++++++----
src/preproc/grn/main.cpp | 20 +++++++++++++++-----
5 files changed, 57 insertions(+), 14 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index b511044d0..427fc5d3f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2024-11-27 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ [grn]: Align with modern groff conventions.
+
+ * src/preproc/grn/hdb.cpp:
+ * src/preproc/grn/main.cpp: Include system library headers
+ before local ones.
+
+ * src/preproc/grn/hgraph.cpp:
+ * src/preproc/grn/main.cpp: Add Autoconf "<config.h>"-inclusion
+ boilerplate to these translation units.
+
+ * src/preproc/grn/hpoint.cpp: Drop unnecessary inclusion of
+ "<stdlib.h>".
+
2024-11-27 G. Branden Robinson <g.branden.robinson@gmail.com>
* src/preproc/eqn/lex.cpp:
diff --git a/src/preproc/grn/hdb.cpp b/src/preproc/grn/hdb.cpp
index f253874f6..4d292865b 100644
--- a/src/preproc/grn/hdb.cpp
+++ b/src/preproc/grn/hdb.cpp
@@ -1,6 +1,10 @@
/* Last non-groff version: hdb.c 1.8 (Berkeley) 84/10/20
*
- * Copyright -C- 1982 Barry S. Roitblat
+ * Originally written by Barry Roitblat, 1982.
+ * Adapted to GNU troff by Daniel Senderowicz 99/12/29.
+ * Modified 2000-2024 by the Free Software Foundation, Inc.
+ *
+ * This file contains no AT&T code and is in the public domain.
*
* This file contains database routines for the hard copy programs of
* the gremlin picture editor.
@@ -10,13 +14,13 @@
#include <config.h>
#endif
-#include <stdlib.h>
-#include "gprint.h"
-#include <string.h>
-#include <ctype.h>
+#include <ctype.h> // isdigit()
+#include <stdio.h> // FILE, feof(), fgets(), getc()
+#include <string.h> // strcmp()
#include "errarg.h"
#include "error.h"
+#include "gprint.h"
#define MAXSTRING 128
#define MAXSTRING_S "127"
diff --git a/src/preproc/grn/hgraph.cpp b/src/preproc/grn/hgraph.cpp
index 9ed81a449..2d785955a 100644
--- a/src/preproc/grn/hgraph.cpp
+++ b/src/preproc/grn/hgraph.cpp
@@ -1,9 +1,19 @@
/* Last non-groff version: hgraph.c 1.14 (Berkeley) 84/11/27
+ *
+ * Originally written by Barry Roitblat, 1982.
+ * Adapted to GNU troff by Daniel Senderowicz 99/12/29.
+ * Modified 2000-2024 by the Free Software Foundation, Inc.
+ *
+ * This file contains no AT&T code and is in the public domain.
*
* This file contains the graphics routines for converting gremlin
* pictures to troff input.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include "lib.h"
#include "gprint.h"
diff --git a/src/preproc/grn/hpoint.cpp b/src/preproc/grn/hpoint.cpp
index 8c4e5d4b4..69613c32b 100644
--- a/src/preproc/grn/hpoint.cpp
+++ b/src/preproc/grn/hpoint.cpp
@@ -1,6 +1,11 @@
-/* Last non-groff version: hpoint.c 1.1 84/10/08 */
-
-/*
+/* Last non-groff version: hpoint.c 1.1 84/10/08
+ *
+ * Originally written by Barry Roitblat, 1982.
+ * Adapted to GNU troff by Daniel Senderowicz 99/12/29.
+ * Modified 2000-2024 by the Free Software Foundation, Inc.
+ *
+ * This file contains no AT&T code and is in the public domain.
+ *
* This file contains routines for manipulating the point data
* structures for the gremlin picture editor.
*/
@@ -9,7 +14,6 @@
#include <config.h>
#endif
-#include <stdlib.h>
#include "gprint.h"
/* imports from main.cpp */
diff --git a/src/preproc/grn/main.cpp b/src/preproc/grn/main.cpp
index ffd6edd64..0545c7248 100644
--- a/src/preproc/grn/main.cpp
+++ b/src/preproc/grn/main.cpp
@@ -1,9 +1,11 @@
/* Last non-groff version: main.c 1.23 (Berkeley) 85/08/05
*
+ * Originally written by Barry Roitblat, 1982.
* Adapted to GNU troff by Daniel Senderowicz 99/12/29.
- *
* Further refinements by Werner Lemberg 00/02/20.
+ * Modified 2000-2024 by the Free Software Foundation, Inc.
*
+ * This file contains no AT&T code and is in the public domain.
*
* This file contains the main and file system dependent routines for
* processing gremlin files into troff input. The program watches input
@@ -72,16 +74,24 @@
* g9 are used for text processing and g5-g7 are reserved.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#include "lib.h"
-#include <ctype.h>
-#include <stdlib.h>
-#include <errno.h> // errno
-#include "gprint.h"
+#include <ctype.h> // isdigit(), isupper(), tolower()
+#include <errno.h>
+#include <locale.h> // setlocale()
+#include <stdio.h> // FILE, fclose(), fgets(), fopen(), stderr, stdin,
+ // stdout
+#include <stdlib.h> // free(), malloc()
+#include <string.h> // strchr(), strcmp(), strcpy(), strerror(),
+ // strlen()
#include "device.h"
#include "font.h"
+#include "gprint.h"
#include "searchpath.h"
#include "macropath.h"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 31/80: [grn]: Align with modern groff conventions.,
G. Branden Robinson <=