aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2015-10-16 14:54:09 -0700
committerPaul Eggert2015-10-16 14:56:11 -0700
commit55ba8c022b493b494bea257e4f523758154e0fdd (patch)
tree3e65647197e08099f62815c99cf2bcffa4444b77 /src
parent1e1a326c0f609f403c625bd9082e1099a4d9a52a (diff)
downloademacs-55ba8c022b493b494bea257e4f523758154e0fdd.tar.gz
emacs-55ba8c022b493b494bea257e4f523758154e0fdd.zip
Make src headers idempotent and standalone
Redo src/*.h so that each include file is idempotent (that is, can be included multiple times with the latter inclusions having no effect) and standalone (that is, can be included by itself, with no include file other than config.h needed as a prerequisite). This is standard practice in GNU programs nowadays. * lwlib/lwlib-widget.h, src/buffer.h, src/category.h, src/character.h: * src/charset.h, src/coding.h, src/commands.h, src/disptab.h: * src/fontset.h, src/gnutls.h, src/indent.h, src/keymap.h, src/macros.h: * src/regex.h [emacs]: * src/syntax.h, src/systty.h, src/termhooks.h: Include lisp.h, for Lisp_Object. * src/buffer.h, src/category.h, src/cm.h, src/commands.h, src/disptab.h: * src/indent.h, src/intervals.h, src/keyboard.h, src/macros.h: * src/process.h, src/puresize.h, src/region-cache.h, src/syntax.h: * src/syssignal.h, src/sysstdio.h, src/systty.h, src/termchar.h: * src/termopts.h, src/tparam.h, src/unexec.h: Protect against multiple inclusion. * src/buffer.h: Include character.h, for STRING_CHAR. * src/emacsgtkfixed.h (struct frame): * src/fontset.h (struct face): * src/region-cache.h (struct buffer): * src/termhooks.h (struct glyph): * src/xsettings.h (struct x_display_info): Add possibly-forward decl. * src/syntax.h: Include buffer.h, for BVAR. * src/sysselect.h: Include lisp.h, for eassume. * src/termchar.h: Include <stdio.h>, for FILE. * src/widget.h: Include <X11/IntrinsicP.h>, for Widget. * src/xsettings.h: Include <X11/Xlib.h>, for XEvent.
Diffstat (limited to 'src')
-rw-r--r--src/buffer.h8
-rw-r--r--src/category.h6
-rw-r--r--src/character.h1
-rw-r--r--src/charset.h1
-rw-r--r--src/cm.h5
-rw-r--r--src/coding.h2
-rw-r--r--src/commands.h6
-rw-r--r--src/disptab.h7
-rw-r--r--src/emacsgtkfixed.h2
-rw-r--r--src/fontset.h4
-rw-r--r--src/gnutls.h2
-rw-r--r--src/indent.h7
-rw-r--r--src/intervals.h5
-rw-r--r--src/keyboard.h5
-rw-r--r--src/keymap.h2
-rw-r--r--src/macros.h6
-rw-r--r--src/process.h5
-rw-r--r--src/puresize.h7
-rw-r--r--src/regex.h1
-rw-r--r--src/region-cache.h5
-rw-r--r--src/syntax.h8
-rw-r--r--src/sysselect.h2
-rw-r--r--src/syssignal.h5
-rw-r--r--src/sysstdio.h5
-rw-r--r--src/systty.h7
-rw-r--r--src/termchar.h6
-rw-r--r--src/termhooks.h3
-rw-r--r--src/termopts.h4
-rw-r--r--src/tparam.h4
-rw-r--r--src/unexec.h3
-rw-r--r--src/widget.h2
-rw-r--r--src/xsettings.h4
32 files changed, 140 insertions, 0 deletions
diff --git a/src/buffer.h b/src/buffer.h
index a0410d454cd..f80530a0cdb 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -18,9 +18,15 @@ GNU General Public License for more details.
18You should have received a copy of the GNU General Public License 18You should have received a copy of the GNU General Public License
19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20 20
21#ifndef EMACS_BUFFER_H
22#define EMACS_BUFFER_H
23
21#include <sys/types.h> 24#include <sys/types.h>
22#include <time.h> 25#include <time.h>
23 26
27#include "character.h"
28#include "lisp.h"
29
24INLINE_HEADER_BEGIN 30INLINE_HEADER_BEGIN
25 31
26/* Accessing the parameters of the current buffer. */ 32/* Accessing the parameters of the current buffer. */
@@ -1377,3 +1383,5 @@ lowercasep (int c)
1377INLINE int upcase (int c) { return uppercasep (c) ? c : upcase1 (c); } 1383INLINE int upcase (int c) { return uppercasep (c) ? c : upcase1 (c); }
1378 1384
1379INLINE_HEADER_END 1385INLINE_HEADER_END
1386
1387#endif /* EMACS_BUFFER_H */
diff --git a/src/category.h b/src/category.h
index ef784c8cbf5..02f9a193ae8 100644
--- a/src/category.h
+++ b/src/category.h
@@ -22,6 +22,8 @@ GNU General Public License for more details.
22You should have received a copy of the GNU General Public License 22You should have received a copy of the GNU General Public License
23along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 23along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
24 24
25#ifndef EMACS_CATEGORY_H
26#define EMACS_CATEGORY_H
25 27
26/* We introduce here three types of object: category, category set, 28/* We introduce here three types of object: category, category set,
27 and category table. 29 and category table.
@@ -53,6 +55,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
53 The second extra slot is a version number of the category table. 55 The second extra slot is a version number of the category table.
54 But, for the moment, we are not using this slot. */ 56 But, for the moment, we are not using this slot. */
55 57
58#include "lisp.h"
59
56INLINE_HEADER_BEGIN 60INLINE_HEADER_BEGIN
57 61
58#define CATEGORYP(x) RANGED_INTEGERP (0x20, x, 0x7E) 62#define CATEGORYP(x) RANGED_INTEGERP (0x20, x, 0x7E)
@@ -116,3 +120,5 @@ CHAR_HAS_CATEGORY (int ch, int category)
116extern bool word_boundary_p (int, int); 120extern bool word_boundary_p (int, int);
117 121
118INLINE_HEADER_END 122INLINE_HEADER_END
123
124#endif /* EMACS_CATEGORY_H */
diff --git a/src/character.h b/src/character.h
index 67d4bca4a23..871c1c3de95 100644
--- a/src/character.h
+++ b/src/character.h
@@ -24,6 +24,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
24#define EMACS_CHARACTER_H 24#define EMACS_CHARACTER_H
25 25
26#include <verify.h> 26#include <verify.h>
27#include "lisp.h"
27 28
28INLINE_HEADER_BEGIN 29INLINE_HEADER_BEGIN
29 30
diff --git a/src/charset.h b/src/charset.h
index f6575985a47..d2daf2b7e29 100644
--- a/src/charset.h
+++ b/src/charset.h
@@ -28,6 +28,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
28#define EMACS_CHARSET_H 28#define EMACS_CHARSET_H
29 29
30#include <verify.h> 30#include <verify.h>
31#include "lisp.h"
31 32
32INLINE_HEADER_BEGIN 33INLINE_HEADER_BEGIN
33 34
diff --git a/src/cm.h b/src/cm.h
index 829abc083f7..1ade6d1782a 100644
--- a/src/cm.h
+++ b/src/cm.h
@@ -16,6 +16,9 @@ GNU General Public License for more details.
16You should have received a copy of the GNU General Public License 16You should have received a copy of the GNU General Public License
17along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 17along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
18 18
19#ifndef EMACS_CM_H
20#define EMACS_CM_H
21
19/* Holds the minimum and maximum costs for the parameterized capabilities. */ 22/* Holds the minimum and maximum costs for the parameterized capabilities. */
20struct parmcap 23struct parmcap
21 { 24 {
@@ -166,3 +169,5 @@ extern void cmcostinit (struct tty_display_info *);
166extern void cmgoto (struct tty_display_info *, int, int); 169extern void cmgoto (struct tty_display_info *, int, int);
167extern void Wcm_clear (struct tty_display_info *); 170extern void Wcm_clear (struct tty_display_info *);
168extern int Wcm_init (struct tty_display_info *); 171extern int Wcm_init (struct tty_display_info *);
172
173#endif /* EMACS_CM_H */
diff --git a/src/coding.h b/src/coding.h
index c73a9cc3263..2bf51c48883 100644
--- a/src/coding.h
+++ b/src/coding.h
@@ -26,6 +26,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
26#ifndef EMACS_CODING_H 26#ifndef EMACS_CODING_H
27#define EMACS_CODING_H 27#define EMACS_CODING_H
28 28
29#include "lisp.h"
30
29/* Index to arguments of Fdefine_coding_system_internal. */ 31/* Index to arguments of Fdefine_coding_system_internal. */
30 32
31enum define_coding_system_arg_index 33enum define_coding_system_arg_index
diff --git a/src/commands.h b/src/commands.h
index 19cd2e49890..e9383341cc9 100644
--- a/src/commands.h
+++ b/src/commands.h
@@ -16,6 +16,10 @@ GNU General Public License for more details.
16You should have received a copy of the GNU General Public License 16You should have received a copy of the GNU General Public License
17along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 17along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
18 18
19#ifndef EMACS_COMMANDS_H
20#define EMACS_COMMANDS_H
21
22#include "lisp.h"
19 23
20#define Ctl(c) ((c)&037) 24#define Ctl(c) ((c)&037)
21 25
@@ -39,3 +43,5 @@ extern Lisp_Object unread_switch_frame;
39/* Nonzero if input is coming from the keyboard. */ 43/* Nonzero if input is coming from the keyboard. */
40 44
41#define INTERACTIVE (NILP (Vexecuting_kbd_macro) && !noninteractive) 45#define INTERACTIVE (NILP (Vexecuting_kbd_macro) && !noninteractive)
46
47#endif /* EMACS_COMMANDS_H */
diff --git a/src/disptab.h b/src/disptab.h
index 7afc862312a..3a319c4d217 100644
--- a/src/disptab.h
+++ b/src/disptab.h
@@ -18,6 +18,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
18 18
19/* Access the slots of a display-table, according to their purpose. */ 19/* Access the slots of a display-table, according to their purpose. */
20 20
21#ifndef EMACS_DISPTAB_H
22#define EMACS_DISPTAB_H
23
24#include "lisp.h"
25
21#define DISP_TABLE_P(obj) \ 26#define DISP_TABLE_P(obj) \
22 (CHAR_TABLE_P (obj) \ 27 (CHAR_TABLE_P (obj) \
23 && EQ (XCHAR_TABLE (obj)->purpose, Qdisplay_table) \ 28 && EQ (XCHAR_TABLE (obj)->purpose, Qdisplay_table) \
@@ -92,3 +97,5 @@ extern struct Lisp_Char_Table *buffer_display_table (void);
92 97
93#define SET_GLYPH_FROM_CHAR(glyph, c) \ 98#define SET_GLYPH_FROM_CHAR(glyph, c) \
94 SET_GLYPH (glyph, c, DEFAULT_FACE_ID) 99 SET_GLYPH (glyph, c, DEFAULT_FACE_ID)
100
101#endif /* EMACS_DISPTAB_H */
diff --git a/src/emacsgtkfixed.h b/src/emacsgtkfixed.h
index bcf1cd9072e..a969a6d265b 100644
--- a/src/emacsgtkfixed.h
+++ b/src/emacsgtkfixed.h
@@ -23,6 +23,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
23 23
24#include <gtk/gtk.h> 24#include <gtk/gtk.h>
25 25
26struct frame;
27
26G_BEGIN_DECLS 28G_BEGIN_DECLS
27 29
28extern GtkWidget *emacs_fixed_new (struct frame *f); 30extern GtkWidget *emacs_fixed_new (struct frame *f);
diff --git a/src/fontset.h b/src/fontset.h
index 610394431e1..aa69051fc05 100644
--- a/src/fontset.h
+++ b/src/fontset.h
@@ -26,6 +26,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
26#ifndef EMACS_FONTSET_H 26#ifndef EMACS_FONTSET_H
27#define EMACS_FONTSET_H 27#define EMACS_FONTSET_H
28 28
29#include "lisp.h"
30
31struct face;
32
29extern void free_face_fontset (struct frame *, struct face *); 33extern void free_face_fontset (struct frame *, struct face *);
30extern int face_for_char (struct frame *, struct face *, int, 34extern int face_for_char (struct frame *, struct face *, int,
31 ptrdiff_t, Lisp_Object); 35 ptrdiff_t, Lisp_Object);
diff --git a/src/gnutls.h b/src/gnutls.h
index fd696820aec..9c804b8bd59 100644
--- a/src/gnutls.h
+++ b/src/gnutls.h
@@ -23,6 +23,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
23#include <gnutls/gnutls.h> 23#include <gnutls/gnutls.h>
24#include <gnutls/x509.h> 24#include <gnutls/x509.h>
25 25
26#include "lisp.h"
27
26/* This limits the attempts to handshake per process (connection). */ 28/* This limits the attempts to handshake per process (connection). */
27#define GNUTLS_EMACS_HANDSHAKES_LIMIT 100 29#define GNUTLS_EMACS_HANDSHAKES_LIMIT 100
28 30
diff --git a/src/indent.h b/src/indent.h
index cece9e4f33b..037fd744521 100644
--- a/src/indent.h
+++ b/src/indent.h
@@ -16,6 +16,11 @@ GNU General Public License for more details.
16You should have received a copy of the GNU General Public License 16You should have received a copy of the GNU General Public License
17along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 17along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
18 18
19#ifndef EMACS_INDENT_H
20#define EMACS_INDENT_H
21
22#include "lisp.h"
23
19struct position 24struct position
20 { 25 {
21 ptrdiff_t bufpos; 26 ptrdiff_t bufpos;
@@ -51,3 +56,5 @@ bool disptab_matches_widthtab (struct Lisp_Char_Table *disptab,
51/* Recompute BUF's width table, using the display table DISPTAB. */ 56/* Recompute BUF's width table, using the display table DISPTAB. */
52void recompute_width_table (struct buffer *buf, 57void recompute_width_table (struct buffer *buf,
53 struct Lisp_Char_Table *disptab); 58 struct Lisp_Char_Table *disptab);
59
60#endif /* EMACS_INDENT_H */
diff --git a/src/intervals.h b/src/intervals.h
index 30fb4b10b02..5a7829de93c 100644
--- a/src/intervals.h
+++ b/src/intervals.h
@@ -16,6 +16,9 @@ GNU General Public License for more details.
16You should have received a copy of the GNU General Public License 16You should have received a copy of the GNU General Public License
17along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 17along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
18 18
19#ifndef EMACS_INTERVALS_H
20#define EMACS_INTERVALS_H
21
19#include "dispextern.h" 22#include "dispextern.h"
20 23
21INLINE_HEADER_BEGIN 24INLINE_HEADER_BEGIN
@@ -295,3 +298,5 @@ extern void syms_of_textprop (void);
295#include "composite.h" 298#include "composite.h"
296 299
297INLINE_HEADER_END 300INLINE_HEADER_END
301
302#endif /* EMACS_INTERVALS_H */
diff --git a/src/keyboard.h b/src/keyboard.h
index 0402e0a582c..67afc3bc2be 100644
--- a/src/keyboard.h
+++ b/src/keyboard.h
@@ -17,6 +17,9 @@ GNU General Public License for more details.
17You should have received a copy of the GNU General Public License 17You should have received a copy of the GNU General Public License
18along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 18along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
19 19
20#ifndef EMACS_KEYBOARD_H
21#define EMACS_KEYBOARD_H
22
20#include "systime.h" /* for struct timespec, Time */ 23#include "systime.h" /* for struct timespec, Time */
21#include "coding.h" /* for ENCODE_UTF_8 and ENCODE_SYSTEM */ 24#include "coding.h" /* for ENCODE_UTF_8 and ENCODE_SYSTEM */
22#include "termhooks.h" 25#include "termhooks.h"
@@ -483,3 +486,5 @@ extern const char *const lispy_function_keys[];
483#endif 486#endif
484 487
485INLINE_HEADER_END 488INLINE_HEADER_END
489
490#endif /* EMACS_KEYBOARD_H */
diff --git a/src/keymap.h b/src/keymap.h
index 215dd3f289f..e7a3b0a2436 100644
--- a/src/keymap.h
+++ b/src/keymap.h
@@ -19,6 +19,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
19#ifndef KEYMAP_H 19#ifndef KEYMAP_H
20#define KEYMAP_H 20#define KEYMAP_H
21 21
22#include "lisp.h"
23
22/* The maximum byte size consumed by push_key_description. 24/* The maximum byte size consumed by push_key_description.
23 All callers should assure that at least this size of memory is 25 All callers should assure that at least this size of memory is
24 allocated at the place pointed by the second argument. 26 allocated at the place pointed by the second argument.
diff --git a/src/macros.h b/src/macros.h
index eab8041e72d..46150ad73ae 100644
--- a/src/macros.h
+++ b/src/macros.h
@@ -16,6 +16,10 @@ GNU General Public License for more details.
16You should have received a copy of the GNU General Public License 16You should have received a copy of the GNU General Public License
17along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 17along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
18 18
19#ifndef EMACS_MACROS_H
20#define EMACS_MACROS_H
21
22#include "lisp.h"
19 23
20/* Number of successful iterations so far 24/* Number of successful iterations so far
21 for innermost keyboard macro. 25 for innermost keyboard macro.
@@ -42,3 +46,5 @@ extern void finalize_kbd_macro_chars (void);
42/* Store a character into kbd macro being defined */ 46/* Store a character into kbd macro being defined */
43 47
44extern void store_kbd_macro_char (Lisp_Object); 48extern void store_kbd_macro_char (Lisp_Object);
49
50#endif /* EMACS_MACROS_H */
diff --git a/src/process.h b/src/process.h
index 24bad45a24b..9ee5a05ebd2 100644
--- a/src/process.h
+++ b/src/process.h
@@ -16,6 +16,9 @@ GNU General Public License for more details.
16You should have received a copy of the GNU General Public License 16You should have received a copy of the GNU General Public License
17along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 17along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
18 18
19#ifndef EMACS_PROCESS_H
20#define EMACS_PROCESS_H
21
19#ifdef HAVE_SYS_TYPES_H 22#ifdef HAVE_SYS_TYPES_H
20#include <sys/types.h> 23#include <sys/types.h>
21#endif 24#endif
@@ -243,3 +246,5 @@ extern Lisp_Object network_interface_info (Lisp_Object);
243extern Lisp_Object remove_slash_colon (Lisp_Object); 246extern Lisp_Object remove_slash_colon (Lisp_Object);
244 247
245INLINE_HEADER_END 248INLINE_HEADER_END
249
250#endif /* EMACS_PROCESS_H */
diff --git a/src/puresize.h b/src/puresize.h
index c61b31f2bde..f07562429d5 100644
--- a/src/puresize.h
+++ b/src/puresize.h
@@ -16,6 +16,11 @@ GNU General Public License for more details.
16You should have received a copy of the GNU General Public License 16You should have received a copy of the GNU General Public License
17along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 17along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
18 18
19#ifndef EMACS_PURESIZE_H
20#define EMACS_PURESIZE_H
21
22#include "lisp.h"
23
19INLINE_HEADER_BEGIN 24INLINE_HEADER_BEGIN
20 25
21/* Define PURESIZE, the number of bytes of pure Lisp code to leave space for. 26/* Define PURESIZE, the number of bytes of pure Lisp code to leave space for.
@@ -92,3 +97,5 @@ CHECK_IMPURE (Lisp_Object obj, void *ptr)
92} 97}
93 98
94INLINE_HEADER_END 99INLINE_HEADER_END
100
101#endif /* EMACS_PURESIZE_H */
diff --git a/src/regex.h b/src/regex.h
index c89ca46d4bd..eaa7729a5fb 100644
--- a/src/regex.h
+++ b/src/regex.h
@@ -167,6 +167,7 @@ typedef unsigned long reg_syntax_t;
167extern reg_syntax_t re_syntax_options; 167extern reg_syntax_t re_syntax_options;
168 168
169#ifdef emacs 169#ifdef emacs
170# include "lisp.h"
170/* In Emacs, this is the string or buffer in which we 171/* In Emacs, this is the string or buffer in which we
171 are matching. It is used for looking up syntax properties. */ 172 are matching. It is used for looking up syntax properties. */
172extern Lisp_Object re_match_object; 173extern Lisp_Object re_match_object;
diff --git a/src/region-cache.h b/src/region-cache.h
index 1f336cebaf7..2814df47c23 100644
--- a/src/region-cache.h
+++ b/src/region-cache.h
@@ -18,6 +18,8 @@ GNU General Public License for more details.
18You should have received a copy of the GNU General Public License 18You should have received a copy of the GNU General Public License
19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20 20
21#ifndef EMACS_REGION_CACHE_H
22#define EMACS_REGION_CACHE_H
21 23
22/* This code was written by Jim Blandy <jimb@cs.oberlin.edu> to help 24/* This code was written by Jim Blandy <jimb@cs.oberlin.edu> to help
23 GNU Emacs better support the gene editor written for the University 25 GNU Emacs better support the gene editor written for the University
@@ -60,6 +62,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
60 this region has property P" vs. "I don't know if this region has 62 this region has property P" vs. "I don't know if this region has
61 property P or not." */ 63 property P or not." */
62 64
65struct buffer;
63 66
64/* Allocate, initialize and return a new, empty region cache. */ 67/* Allocate, initialize and return a new, empty region cache. */
65struct region_cache *new_region_cache (void); 68struct region_cache *new_region_cache (void);
@@ -105,3 +108,5 @@ extern int region_cache_forward (struct buffer *buf, struct region_cache *c,
105/* Likewise, except before POS rather than after POS. */ 108/* Likewise, except before POS rather than after POS. */
106extern int region_cache_backward (struct buffer *buf, struct region_cache *c, 109extern int region_cache_backward (struct buffer *buf, struct region_cache *c,
107 ptrdiff_t pos, ptrdiff_t *next); 110 ptrdiff_t pos, ptrdiff_t *next);
111
112#endif /* EMACS_REGION_CACHE_H */
diff --git a/src/syntax.h b/src/syntax.h
index 34b652ba9c8..06ce0ec55df 100644
--- a/src/syntax.h
+++ b/src/syntax.h
@@ -18,6 +18,12 @@ GNU General Public License for more details.
18You should have received a copy of the GNU General Public License 18You should have received a copy of the GNU General Public License
19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20 20
21#ifndef EMACS_SYNTAX_H
22#define EMACS_SYNTAX_H
23
24#include "buffer.h"
25#include "lisp.h"
26
21INLINE_HEADER_BEGIN 27INLINE_HEADER_BEGIN
22 28
23extern void update_syntax_table (ptrdiff_t, EMACS_INT, bool, Lisp_Object); 29extern void update_syntax_table (ptrdiff_t, EMACS_INT, bool, Lisp_Object);
@@ -213,3 +219,5 @@ extern ptrdiff_t scan_words (ptrdiff_t, EMACS_INT);
213extern void SETUP_SYNTAX_TABLE_FOR_OBJECT (Lisp_Object, ptrdiff_t, ptrdiff_t); 219extern void SETUP_SYNTAX_TABLE_FOR_OBJECT (Lisp_Object, ptrdiff_t, ptrdiff_t);
214 220
215INLINE_HEADER_END 221INLINE_HEADER_END
222
223#endif /* EMACS_SYNTAX_H */
diff --git a/src/sysselect.h b/src/sysselect.h
index 54f90fb3965..d6c5d1c7148 100644
--- a/src/sysselect.h
+++ b/src/sysselect.h
@@ -23,6 +23,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
23#include <sys/select.h> 23#include <sys/select.h>
24#endif 24#endif
25 25
26#include "lisp.h"
27
26/* The w32 build defines select stuff in w32.h, which is included 28/* The w32 build defines select stuff in w32.h, which is included
27 where w32 needs it, but not where sysselect.h is included. The w32 29 where w32 needs it, but not where sysselect.h is included. The w32
28 definitions in w32.h are incompatible with the below. */ 30 definitions in w32.h are incompatible with the below. */
diff --git a/src/syssignal.h b/src/syssignal.h
index 5c14479ccad..ec6099408c4 100644
--- a/src/syssignal.h
+++ b/src/syssignal.h
@@ -17,6 +17,9 @@ GNU General Public License for more details.
17You should have received a copy of the GNU General Public License 17You should have received a copy of the GNU General Public License
18along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 18along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
19 19
20#ifndef EMACS_SYSSIGNAL_H
21#define EMACS_SYSSIGNAL_H
22
20#include <signal.h> 23#include <signal.h>
21 24
22extern void init_signals (bool); 25extern void init_signals (bool);
@@ -72,3 +75,5 @@ char const *safe_strsignal (int) ATTRIBUTE_CONST;
72#endif 75#endif
73 76
74void deliver_process_signal (int, signal_handler_t); 77void deliver_process_signal (int, signal_handler_t);
78
79#endif /* EMACS_SYSSIGNAL_H */
diff --git a/src/sysstdio.h b/src/sysstdio.h
index c97c4f883fc..166823049d2 100644
--- a/src/sysstdio.h
+++ b/src/sysstdio.h
@@ -17,6 +17,9 @@ GNU General Public License for more details.
17You should have received a copy of the GNU General Public License 17You should have received a copy of the GNU General Public License
18along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 18along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
19 19
20#ifndef EMACS_SYSSTDIO_H
21#define EMACS_SYSSTDIO_H
22
20#include <fcntl.h> 23#include <fcntl.h>
21#include <stdio.h> 24#include <stdio.h>
22 25
@@ -29,3 +32,5 @@ extern FILE *emacs_fopen (char const *, char const *);
29# define FOPEN_BINARY "" 32# define FOPEN_BINARY ""
30# define FOPEN_TEXT "" 33# define FOPEN_TEXT ""
31#endif 34#endif
35
36#endif /* EMACS_SYSSTDIO_H */
diff --git a/src/systty.h b/src/systty.h
index 3a461565e5d..1022455c588 100644
--- a/src/systty.h
+++ b/src/systty.h
@@ -16,6 +16,9 @@ GNU General Public License for more details.
16You should have received a copy of the GNU General Public License 16You should have received a copy of the GNU General Public License
17along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 17along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
18 18
19#ifndef EMACS_SYSTTY_H
20#define EMACS_SYSTTY_H
21
19/* Include the proper files. */ 22/* Include the proper files. */
20 23
21#ifndef DOS_NT 24#ifndef DOS_NT
@@ -37,6 +40,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
37 40
38#include <unistd.h> 41#include <unistd.h>
39 42
43#include "lisp.h"
44
40 45
41/* Try to establish the correct character to disable terminal functions 46/* Try to establish the correct character to disable terminal functions
42 in a system-independent manner. Note that USG (at least) define 47 in a system-independent manner. Note that USG (at least) define
@@ -85,3 +90,5 @@ extern int emacs_set_tty (int, struct emacs_tty *, bool) EXTERNALLY_VISIBLE;
85extern void suppress_echo_on_tty (int); 90extern void suppress_echo_on_tty (int);
86extern int serial_open (Lisp_Object); 91extern int serial_open (Lisp_Object);
87extern void serial_configure (struct Lisp_Process *, Lisp_Object); 92extern void serial_configure (struct Lisp_Process *, Lisp_Object);
93
94#endif /* EMACS_SYSTTY_H */
diff --git a/src/termchar.h b/src/termchar.h
index d8066d7b2b3..06c042797b6 100644
--- a/src/termchar.h
+++ b/src/termchar.h
@@ -16,6 +16,10 @@ GNU General Public License for more details.
16You should have received a copy of the GNU General Public License 16You should have received a copy of the GNU General Public License
17along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 17along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
18 18
19#ifndef EMACS_TERMCHAR_H
20#define EMACS_TERMCHAR_H
21
22#include <stdio.h>
19#include "dispextern.h" 23#include "dispextern.h"
20 24
21/* Each termcap frame points to its own struct tty_output object in 25/* Each termcap frame points to its own struct tty_output object in
@@ -230,3 +234,5 @@ extern struct tty_display_info *tty_list;
230 : (emacs_abort (), (struct tty_display_info *) 0)) 234 : (emacs_abort (), (struct tty_display_info *) 0))
231 235
232#define CURTTY() FRAME_TTY (SELECTED_FRAME()) 236#define CURTTY() FRAME_TTY (SELECTED_FRAME())
237
238#endif /* EMACS_TERMCHAR_H */
diff --git a/src/termhooks.h b/src/termhooks.h
index 88c62df7205..8bde9877c33 100644
--- a/src/termhooks.h
+++ b/src/termhooks.h
@@ -23,8 +23,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
23 23
24/* Miscellanea. */ 24/* Miscellanea. */
25 25
26#include "lisp.h"
26#include "systime.h" /* for Time */ 27#include "systime.h" /* for Time */
27 28
29struct glyph;
30
28INLINE_HEADER_BEGIN 31INLINE_HEADER_BEGIN
29 32
30enum scroll_bar_part { 33enum scroll_bar_part {
diff --git a/src/termopts.h b/src/termopts.h
index c54d392ddaf..c5cd56316ce 100644
--- a/src/termopts.h
+++ b/src/termopts.h
@@ -17,9 +17,13 @@ GNU General Public License for more details.
17You should have received a copy of the GNU General Public License 17You should have received a copy of the GNU General Public License
18along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 18along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
19 19
20#ifndef EMACS_TERMOPTS_H
21#define EMACS_TERMOPTS_H
20 22
21/* Nonzero means use interrupt-driven input. */ 23/* Nonzero means use interrupt-driven input. */
22extern bool interrupt_input; 24extern bool interrupt_input;
23 25
24/* Nonzero while interrupts are temporarily deferred during redisplay. */ 26/* Nonzero while interrupts are temporarily deferred during redisplay. */
25extern bool interrupts_deferred; 27extern bool interrupts_deferred;
28
29#endif /* EMACS_TERMOPTS_H */
diff --git a/src/tparam.h b/src/tparam.h
index 59fc859c4a3..b391e89094f 100644
--- a/src/tparam.h
+++ b/src/tparam.h
@@ -17,6 +17,8 @@ GNU General Public License for more details.
17You should have received a copy of the GNU General Public License 17You should have received a copy of the GNU General Public License
18along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 18along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
19 19
20#ifndef EMACS_TPARAM_H
21#define EMACS_TPARAM_H
20 22
21/* Don't try to include termcap.h. On some systems, configure finds a 23/* Don't try to include termcap.h. On some systems, configure finds a
22 non-standard termcap.h that the main build won't find. */ 24 non-standard termcap.h that the main build won't find. */
@@ -33,3 +35,5 @@ char *tparam (const char *, char *, int, int, int, int, int);
33extern char PC; 35extern char PC;
34extern char *BC; 36extern char *BC;
35extern char *UP; 37extern char *UP;
38
39#endif /* EMACS_TPARAM_H */
diff --git a/src/unexec.h b/src/unexec.h
index 343eb6d8db5..cdb2e8016ea 100644
--- a/src/unexec.h
+++ b/src/unexec.h
@@ -1 +1,4 @@
1#ifndef EMACS_UNEXEC_H
2#define EMACS_UNEXEC_H
1void unexec (const char *, const char *); 3void unexec (const char *, const char *);
4#endif /* EMACS_UNEXEC_H */
diff --git a/src/widget.h b/src/widget.h
index a782035d72d..e2e19b0d40f 100644
--- a/src/widget.h
+++ b/src/widget.h
@@ -21,6 +21,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
21#ifndef _EmacsFrame_h 21#ifndef _EmacsFrame_h
22#define _EmacsFrame_h 22#define _EmacsFrame_h
23 23
24#include <X11/IntrinsicP.h>
25
24#define XtNminibuffer "minibuffer" 26#define XtNminibuffer "minibuffer"
25#define XtCMinibuffer "Minibuffer" 27#define XtCMinibuffer "Minibuffer"
26#define XtNunsplittable "unsplittable" 28#define XtNunsplittable "unsplittable"
diff --git a/src/xsettings.h b/src/xsettings.h
index 7ef94a03a89..71b71d6e922 100644
--- a/src/xsettings.h
+++ b/src/xsettings.h
@@ -20,6 +20,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20#ifndef XSETTINGS_H 20#ifndef XSETTINGS_H
21#define XSETTINGS_H 21#define XSETTINGS_H
22 22
23#include <X11/Xlib.h>
24
25struct x_display_info;
26
23extern void xsettings_initialize (struct x_display_info *); 27extern void xsettings_initialize (struct x_display_info *);
24extern void xft_settings_event (struct x_display_info *, const XEvent *); 28extern void xft_settings_event (struct x_display_info *, const XEvent *);
25extern const char *xsettings_get_system_font (void); 29extern const char *xsettings_get_system_font (void);