[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 37/80: src/include/*: Fix code style nits.
From: |
G. Branden Robinson |
Subject: |
[groff] 37/80: src/include/*: Fix code style nits. |
Date: |
Sat, 30 Nov 2024 04:02:19 -0500 (EST) |
gbranden pushed a commit to branch master
in repository groff.
commit df4e5e9da73b5ad8eed983c1e7844ee08e720ea1
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Wed Nov 27 20:55:39 2024 -0600
src/include/*: Fix code style nits.
Replace old-style Emacs local variable declaration. Add editor aid
comments. Reflow long comment lines. Fix sloppy whitespace.
---
src/include/DviChar.h | 7 ++++++-
src/include/cmap.h | 7 ++++++-
src/include/cset.h | 9 +++++++--
src/include/curtime.h | 22 ++++++++++++++--------
src/include/errarg.h | 7 ++++++-
src/include/geometry.h | 7 ++++++-
src/include/html-strings.h | 7 ++++++-
src/include/htmlhint.h | 7 ++++++-
src/include/index.h | 7 ++++++-
src/include/localcharset.h | 23 ++++++++++++++++-------
src/include/macropath.h | 7 ++++++-
src/include/nonposix.h | 7 ++++++-
src/include/paper.h | 7 ++++++-
src/include/printer.h | 24 +++++++++++++-----------
src/include/ptable.h | 6 +++---
src/include/refid.h | 7 ++++++-
src/include/relocate.h | 21 ++++++++++++++-------
src/include/searchpath.h | 7 ++++++-
18 files changed, 139 insertions(+), 50 deletions(-)
diff --git a/src/include/DviChar.h b/src/include/DviChar.h
index 1100d819f..3f16736fb 100644
--- a/src/include/DviChar.h
+++ b/src/include/DviChar.h
@@ -1,4 +1,3 @@
-/* -*- C -*- */
/* Copyright (C) 2014-2020 Free Software Foundation, Inc.
This file is part of groff.
@@ -53,3 +52,9 @@ char *DviCharName (DviCharNameMap *, int,
int);
#define DviCharName(map,index,synonym) ((map)->dvi_names[index][synonym])
#endif
int DviCharIndex (DviCharNameMap *, const char *);
+
+// Local Variables:
+// fill-column: 72
+// mode: C
+// End:
+// vim: set cindent noexpandtab shiftwidth=2 textwidth=72:
diff --git a/src/include/cmap.h b/src/include/cmap.h
index 3a62da189..8aab7311c 100644
--- a/src/include/cmap.h
+++ b/src/include/cmap.h
@@ -1,4 +1,3 @@
-// -*- C++ -*-
/* Copyright (C) 1989-2020 Free Software Foundation, Inc.
Written by James Clark (jjc@jclark.com)
@@ -53,3 +52,9 @@ static class cmap_init {
public:
cmap_init();
} _cmap_init;
+
+// Local Variables:
+// fill-column: 72
+// mode: C++
+// End:
+// vim: set cindent noexpandtab shiftwidth=2 textwidth=72:
diff --git a/src/include/cset.h b/src/include/cset.h
index 996e9a8c8..790695010 100644
--- a/src/include/cset.h
+++ b/src/include/cset.h
@@ -1,4 +1,3 @@
-// -*- C++ -*-
/* Copyright (C) 1989-2020 Free Software Foundation, Inc.
Written by James Clark (jjc@jclark.com)
@@ -23,7 +22,7 @@ along with this program. If not, see
<http://www.gnu.org/licenses/>. */
#ifndef UCHAR_MAX
#define UCHAR_MAX 255
#endif
-#endif /* not HAVE_CC_LIMITS_H */
+#endif /* not HAVE_CC_LIMITS_H */
enum cset_builtin { CSET_BUILTIN };
@@ -72,3 +71,9 @@ static class cset_init {
public:
cset_init();
} _cset_init;
+
+// Local Variables:
+// fill-column: 72
+// mode: C++
+// End:
+// vim: set cindent noexpandtab shiftwidth=2 textwidth=72:
diff --git a/src/include/curtime.h b/src/include/curtime.h
index ebd2efb80..97005f282 100644
--- a/src/include/curtime.h
+++ b/src/include/curtime.h
@@ -18,13 +18,19 @@ internet at <http://www.gnu.org/licenses/gpl-2.0.txt>. */
#include <time.h>
// Get the current time in broken-down time representation. If the
-// SOURCE_DATE_EPOCH environment variable is set, then it is used instead of
-// the real time from the system clock; in this case, the user is clearly
-// trying to arrange for some kind of reproducible build, so express the
-// time in UTC. Otherwise, use the real time from the system clock, and
-// express it relative to the user's time zone.
+// SOURCE_DATE_EPOCH environment variable is set, then it is used
+// instead of the real time from the system clock; in this case, the
+// user is clearly trying to arrange for some kind of reproducible
+// build, so express the time in UTC. Otherwise, use the real time from
+// the system clock, and express it relative to the user's time zone.
//
-// In either case, as with gmtime() and localtime(), the return value points
-// to a statically-allocated struct which might be overwritten by later
-// calls.
+// In either case, as with gmtime() and localtime(), the return value
+// points to a statically-allocated struct which might be overwritten by
+// later calls.
struct tm *current_time();
+
+// Local Variables:
+// fill-column: 72
+// mode: C++
+// End:
+// vim: set cindent noexpandtab shiftwidth=2 textwidth=72:
diff --git a/src/include/errarg.h b/src/include/errarg.h
index 67a585245..5531bab5d 100644
--- a/src/include/errarg.h
+++ b/src/include/errarg.h
@@ -1,4 +1,3 @@
-// -*- C++ -*-
/* Copyright (C) 1989-2020 Free Software Foundation, Inc.
Written by James Clark (jjc@jclark.com)
@@ -44,3 +43,9 @@ extern void errprint(const char *,
const errarg &arg1 = empty_errarg,
const errarg &arg2 = empty_errarg,
const errarg &arg3 = empty_errarg);
+
+// Local Variables:
+// fill-column: 72
+// mode: C++
+// End:
+// vim: set cindent noexpandtab shiftwidth=2 textwidth=72:
diff --git a/src/include/geometry.h b/src/include/geometry.h
index 9f87f1b69..5f631fb5d 100644
--- a/src/include/geometry.h
+++ b/src/include/geometry.h
@@ -1,4 +1,3 @@
-// -*- C++ -*-
/* Copyright (C) 2001-2020 Free Software Foundation, Inc.
Written by Gaius Mulley <gaius@glam.ac.uk>
@@ -24,3 +23,9 @@ void check_output_arc_limits(int x, int y,
double c0, double c1,
int *minx, int *maxx,
int *miny, int *maxy);
+
+// Local Variables:
+// fill-column: 72
+// mode: C++
+// End:
+// vim: set cindent noexpandtab shiftwidth=2 textwidth=72:
diff --git a/src/include/html-strings.h b/src/include/html-strings.h
index eaf551be9..db76c1345 100644
--- a/src/include/html-strings.h
+++ b/src/include/html-strings.h
@@ -1,4 +1,3 @@
-// -*- C++ -*-
/* Copyright (C) 2001-2020 Free Software Foundation, Inc.
Written by Gaius Mulley (gaius@glam.ac.uk).
@@ -24,3 +23,9 @@ along with this program. If not, see
<http://www.gnu.org/licenses/>. */
#define HTML_IMAGE_INLINE_BEGIN "\\O[HTML-IMAGE-INLINE-BEGIN]"
#define HTML_IMAGE_INLINE_END "\\O[HTML-IMAGE-INLINE-END]"
+
+// Local Variables:
+// fill-column: 72
+// mode: C
+// End:
+// vim: set cindent noexpandtab shiftwidth=2 textwidth=72:
diff --git a/src/include/htmlhint.h b/src/include/htmlhint.h
index c12a8b95b..1b06b3d4d 100644
--- a/src/include/htmlhint.h
+++ b/src/include/htmlhint.h
@@ -1,4 +1,3 @@
-// -*- C++ -*-
/* Copyright (C) 2000-2020 Free Software Foundation, Inc.
Written by Gaius Mulley <gaius@glam.ac.uk>
@@ -34,3 +33,9 @@ extern void html_begin_suppress();
extern void html_end_suppress();
#endif
+
+// Local Variables:
+// fill-column: 72
+// mode: C++
+// End:
+// vim: set cindent noexpandtab shiftwidth=2 textwidth=72:
diff --git a/src/include/index.h b/src/include/index.h
index a7d320102..f7d33e3a2 100644
--- a/src/include/index.h
+++ b/src/include/index.h
@@ -1,4 +1,3 @@
-// -*- C++ -*-
/* Copyright (C) 1989-2020 Free Software Foundation, Inc.
Written by James Clark (jjc@jclark.com)
@@ -39,3 +38,9 @@ struct tag {
};
unsigned hash(const char *s, int len);
+
+// Local Variables:
+// fill-column: 72
+// mode: C++
+// End:
+// vim: set cindent noexpandtab shiftwidth=2 textwidth=72:
diff --git a/src/include/localcharset.h b/src/include/localcharset.h
index bbf694e63..dc2af1ccc 100644
--- a/src/include/localcharset.h
+++ b/src/include/localcharset.h
@@ -1,4 +1,6 @@
-/* Determine a canonical name for the current locale's character encoding.
+/* Determine a canonical name for the current locale's character
+ encoding.
+
Copyright (C) 2000-2020 Free Software Foundation, Inc.
This file is part of the GNU CHARSET Library.
@@ -12,8 +14,9 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License 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/>. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, see <http://www.gnu.org/licenses/>.
+*/
#ifndef _LOCALCHARSET_H
#define _LOCALCHARSET_H
@@ -24,10 +27,10 @@ extern "C" {
#endif
-/* Determine the current locale's character encoding, and canonicalize it
- into one of the canonical names listed in config.charset.
- The result must not be freed; it is statically allocated.
- If the canonical name cannot be determined, the result is a non-canonical
+/* Determine the current locale's character encoding, and canonicalize
+ it into one of the canonical names listed in config.charset. The
+ result must not be freed; it is statically allocated. If the
+ canonical name cannot be determined, the result is a non-canonical
name. */
extern const char * locale_charset (void);
@@ -38,3 +41,9 @@ extern const char * locale_charset (void);
#endif /* _LOCALCHARSET_H */
+
+// Local Variables:
+// fill-column: 72
+// mode: C++
+// End:
+// vim: set cindent noexpandtab shiftwidth=2 textwidth=72:
diff --git a/src/include/macropath.h b/src/include/macropath.h
index 26c1baf67..1e14a7046 100644
--- a/src/include/macropath.h
+++ b/src/include/macropath.h
@@ -1,4 +1,3 @@
-// -*- C++ -*-
/* Copyright (C) 1989-2020 Free Software Foundation, Inc.
Written by James Clark (jjc@jclark.com)
@@ -20,3 +19,9 @@ along with this program. If not, see
<http://www.gnu.org/licenses/>. */
extern search_path macro_path;
extern search_path safer_macro_path;
extern search_path config_macro_path;
+
+// Local Variables:
+// fill-column: 72
+// mode: C++
+// End:
+// vim: set cindent noexpandtab shiftwidth=2 textwidth=72:
diff --git a/src/include/nonposix.h b/src/include/nonposix.h
index 6a6100915..3d96d81ce 100644
--- a/src/include/nonposix.h
+++ b/src/include/nonposix.h
@@ -1,4 +1,3 @@
-/* -*- C -*- */
/* Copyright (C) 2000-2020 Free Software Foundation, Inc.
Written by Eli Zaretskii (eliz@is.elta.co.il)
@@ -228,3 +227,9 @@ along with this program. If not, see
<http://www.gnu.org/licenses/>. */
#ifndef _WAIT_CHILD
# define _WAIT_CHILD 0
#endif
+
+// Local Variables:
+// fill-column: 72
+// mode: C++
+// End:
+// vim: set cindent noexpandtab shiftwidth=2 textwidth=72:
diff --git a/src/include/paper.h b/src/include/paper.h
index ed789c4b6..14665ff01 100644
--- a/src/include/paper.h
+++ b/src/include/paper.h
@@ -1,4 +1,3 @@
-// -*- C++ -*-
/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
Written by Werner Lemberg (wl@gnu.org)
@@ -34,3 +33,9 @@ public:
#define NUM_PAPERSIZES 4*8 + 8 + 1
extern paper papersizes[];
+
+// Local Variables:
+// fill-column: 72
+// mode: C++
+// End:
+// vim: set cindent noexpandtab shiftwidth=2 textwidth=72:
diff --git a/src/include/printer.h b/src/include/printer.h
index 7b6a7ba5a..95172a82c 100644
--- a/src/include/printer.h
+++ b/src/include/printer.h
@@ -1,7 +1,3 @@
-// -*- C++ -*-
-
-// <groff_src_dir>/src/include/printer.h
-
/* Copyright (C) 1989-2020 Free Software Foundation, Inc.
Written by James Clark (jjc@jclark.com)
@@ -24,11 +20,11 @@
/* Description
- The class 'printer' performs the postprocessing. Each
- postprocessor only needs to implement a derived class of 'printer' and
- a suitable function 'make_printer' for the device-dependent tasks.
- Then the methods of class 'printer' are called automatically by
- 'do_file()' in 'input.cpp'.
+ The class 'printer' performs the postprocessing. Each postprocessor
+ only needs to implement a derived class of 'printer' and a suitable
+ function 'make_printer' for the device-dependent tasks. Then the
+ methods of class 'printer' are called automatically by 'do_file()' in
+ 'input.cpp'.
*/
#include "color.h"
@@ -65,9 +61,9 @@ public:
int *, font **);
font *get_font_from_index(int);
virtual void draw(int, int *, int, const environment *);
- // perform change of line color (text, outline) in the print-out
+ // perform change of line color (text, outline) in the print-out
virtual void change_color(const environment * const);
- // perform change of fill color in the print-out
+ // perform change of fill color in the print-out
virtual void change_fill_color(const environment * const);
virtual void begin_page(int) = 0;
virtual void end_page(int) = 0;
@@ -95,3 +91,9 @@ private:
};
printer *make_printer();
+
+// Local Variables:
+// fill-column: 72
+// mode: C++
+// End:
+// vim: set cindent noexpandtab shiftwidth=2 textwidth=72:
diff --git a/src/include/ptable.h b/src/include/ptable.h
index 9cd951c9a..24e0caa7d 100644
--- a/src/include/ptable.h
+++ b/src/include/ptable.h
@@ -59,7 +59,7 @@ extern unsigned long hash_string(const char *); //
Return a hash code of the
#define declare_ptable(T) \
\
struct PASSOC(T) { \
- char *key; \
+ char *key; \
T *val; \
PASSOC(T)(); \
}; \
@@ -145,7 +145,7 @@ const char *PTABLE(T)::define(const char *key, T *val)
\
assert(key != 0); \
unsigned long h = hash_string(key); \
unsigned n; \
- for (n = unsigned(h % size); \
+ for (n = unsigned(h % size); \
v[n].key != 0; \
n = (n == 0 ? size - 1 : n - 1))
\
if (strcmp(v[n].key, key) == 0) { \
@@ -168,7 +168,7 @@ const char *PTABLE(T)::define(const char *key, T *val)
\
free(oldv[i].key); \
else { \
unsigned j; \
- for (j = unsigned(hash_string(oldv[i].key) % size); \
+ for (j = unsigned(hash_string(oldv[i].key) % size); \
v[j].key != 0; \
j = (j == 0 ? size - 1 : j - 1)) \
; \
diff --git a/src/include/refid.h b/src/include/refid.h
index 9bf3a40fd..0ebb013e2 100644
--- a/src/include/refid.h
+++ b/src/include/refid.h
@@ -1,4 +1,3 @@
-// -*- C++ -*-
/* Copyright (C) 1989-2020 Free Software Foundation, Inc.
Written by James Clark (jjc@jclark.com)
@@ -32,3 +31,9 @@ inline int operator==(const reference_id &r1, const
reference_id &r2)
{
return r1.filename_id == r2.filename_id && r1.pos == r2.pos;
}
+
+// Local Variables:
+// fill-column: 72
+// mode: C++
+// End:
+// vim: set cindent noexpandtab shiftwidth=2 textwidth=72:
diff --git a/src/include/relocate.h b/src/include/relocate.h
index 851e2ccff..d6d1cec0c 100644
--- a/src/include/relocate.h
+++ b/src/include/relocate.h
@@ -1,20 +1,21 @@
-/* -*- C -*- */
/* Provide relocation for macro and font files.
Copyright (C) 2005-2020 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
- You should have received a copy of the GNU Library General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
+ You should have received a copy of the GNU Library General Public
+ License along with this program. If not, see
+ <http://www.gnu.org/licenses/>.
+*/
#ifdef __cplusplus
extern char *curr_prefix;
@@ -35,3 +36,9 @@ char *relocatep (const char *path);
#ifdef __cplusplus
char *relocate (const char *path);
#endif
+
+// Local Variables:
+// fill-column: 72
+// mode: C
+// End:
+// vim: set cindent noexpandtab shiftwidth=2 textwidth=72:
diff --git a/src/include/searchpath.h b/src/include/searchpath.h
index 2dda4e81e..88829c68b 100644
--- a/src/include/searchpath.h
+++ b/src/include/searchpath.h
@@ -1,4 +1,3 @@
-// -*- C++ -*-
/* Copyright (C) 1989-2020 Free Software Foundation, Inc.
Written by James Clark (jjc@jclark.com)
@@ -28,3 +27,9 @@ public:
FILE *open_file(const char *, char **);
FILE *open_file_cautious(const char *, char ** = 0, const char * = 0);
};
+
+// Local Variables:
+// fill-column: 72
+// mode: C++
+// End:
+// vim: set cindent noexpandtab shiftwidth=2 textwidth=72:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 37/80: src/include/*: Fix code style nits.,
G. Branden Robinson <=