[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[5823] remove extra header file includes from info.h
From: |
Gavin D. Smith |
Subject: |
[5823] remove extra header file includes from info.h |
Date: |
Fri, 12 Sep 2014 17:22:45 +0000 |
Revision: 5823
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5823
Author: gavin
Date: 2014-09-12 17:22:40 +0000 (Fri, 12 Sep 2014)
Log Message:
-----------
remove extra header file includes from info.h
Modified Paths:
--------------
trunk/ChangeLog
trunk/info/display.c
trunk/info/echo-area.c
trunk/info/filesys.c
trunk/info/footnotes.c
trunk/info/indices.c
trunk/info/info-utils.c
trunk/info/info.c
trunk/info/info.h
trunk/info/infodoc.c
trunk/info/infokey.c
trunk/info/infomap.c
trunk/info/infopath.c
trunk/info/m-x.c
trunk/info/makedoc.c
trunk/info/man.c
trunk/info/nodemenu.c
trunk/info/search.c
trunk/info/session.c
trunk/info/session.h
trunk/info/signals.c
trunk/info/tag.h
trunk/info/terminal.c
trunk/info/variables.c
trunk/info/variables.h
trunk/info/window.c
trunk/info/window.h
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2014-09-12 13:22:43 UTC (rev 5822)
+++ trunk/ChangeLog 2014-09-12 17:22:40 UTC (rev 5823)
@@ -1,5 +1,23 @@
2014-09-12 Gavin Smith <address@hidden>
+ * info/info.h: Don't include other header files.
+ * info: All *.c and *.h files: Include necessary header files.
+ Include "doc.h" instead of "infomap.h" to avoid problem with
+ header file include cycle.
+ * info/footnotes.c (info_get_or_remove_footnotes): Call info_error
+ instead of inform_in_echo_area.
+ * info/info.h, info/session.h (DECLARE_INFO_COMMAND): Macro moved
+ between files.
+ * info/info.h, info/session.h: Declarations of read_function_name,
+ show_error_node moved.
+ * info/makedoc.c (doc_header_1, main): Add include of "window.h" to
+ generated files.
+ * info/session.c, info/variables.c (info_scroll_choices)
+ (scroll_last_node_choices): Moved between files and declared static.
+ * info/variables.h: Declare 'mouse_protocol'.
+
+2014-09-12 Gavin Smith <address@hidden>
+
* info/session.c: Move "Garbage Collection" and "Navigation of
document structure" sections to reduce need for forward function
declarations.
Modified: trunk/info/display.c
===================================================================
--- trunk/info/display.c 2014-09-12 13:22:43 UTC (rev 5822)
+++ trunk/info/display.c 2014-09-12 17:22:40 UTC (rev 5823)
@@ -21,11 +21,10 @@
#include "info.h"
#include "display.h"
+#include "session.h"
#include "tag.h"
-#include "signal.h"
+#include "signals.h"
-extern int info_any_buffered_input_p (void); /* Found in session.c. */
-
static void free_display (DISPLAY_LINE **display);
static DISPLAY_LINE **make_display (int width, int height);
Modified: trunk/info/echo-area.c
===================================================================
--- trunk/info/echo-area.c 2014-09-12 13:22:43 UTC (rev 5822)
+++ trunk/info/echo-area.c 2014-09-12 17:22:40 UTC (rev 5823)
@@ -20,6 +20,10 @@
Originally written by Brian Fox. */
#include "info.h"
+#include "session.h"
+#include "display.h"
+#include "info-utils.h"
+#include "echo-area.h"
#if defined (FD_SET)
# if defined (hpux)
Modified: trunk/info/filesys.c
===================================================================
--- trunk/info/filesys.c 2014-09-12 13:22:43 UTC (rev 5822)
+++ trunk/info/filesys.c 2014-09-12 17:22:40 UTC (rev 5823)
@@ -20,10 +20,10 @@
Originally written by Brian Fox. */
#include "info.h"
-
#include "tilde.h"
#include "filesys.h"
#include "tag.h"
+#include "session.h"
/* Local to this file. */
static char *info_file_in_path (char *filename, struct stat *finfo);
Modified: trunk/info/footnotes.c
===================================================================
--- trunk/info/footnotes.c 2014-09-12 13:22:43 UTC (rev 5822)
+++ trunk/info/footnotes.c 2014-09-12 17:22:40 UTC (rev 5823)
@@ -20,6 +20,9 @@
Originally written by Brian Fox. */
#include "info.h"
+#include "session.h"
+#include "info-utils.h"
+#include "footnotes.h"
/* Nonzero means attempt to show footnotes when displaying a new window. */
int auto_footnotes_p = 0;
@@ -226,7 +229,7 @@
if (!fn_win)
{
if (auto_footnotes_p)
- inform_in_echo_area (_("Footnotes could not be displayed"));
+ info_error (_("Footnotes could not be displayed"));
return FN_UNABLE;
}
}
Modified: trunk/info/indices.c
===================================================================
--- trunk/info/indices.c 2014-09-12 13:22:43 UTC (rev 5822)
+++ trunk/info/indices.c 2014-09-12 17:22:40 UTC (rev 5823)
@@ -20,6 +20,9 @@
Originally written by Brian Fox. */
#include "info.h"
+#include "info-utils.h"
+#include "session.h"
+#include "echo-area.h"
#include "indices.h"
#include "variables.h"
Modified: trunk/info/info-utils.c
===================================================================
--- trunk/info/info-utils.c 2014-09-12 13:22:43 UTC (rev 5822)
+++ trunk/info/info-utils.c 2014-09-12 17:22:40 UTC (rev 5823)
@@ -20,6 +20,7 @@
Originally written by Brian Fox. */
#include "info.h"
+#include "session.h"
#include "info-utils.h"
#include "tag.h"
Modified: trunk/info/info.c
===================================================================
--- trunk/info/info.c 2014-09-12 13:22:43 UTC (rev 5822)
+++ trunk/info/info.c 2014-09-12 17:22:40 UTC (rev 5823)
@@ -21,6 +21,9 @@
Originally written by Brian Fox. */
#include "info.h"
+#include "filesys.h"
+#include "info-utils.h"
+#include "session.h"
#include "indices.h"
#include "dribble.h"
#include "getopt.h"
Modified: trunk/info/info.h
===================================================================
--- trunk/info/info.h 2014-09-12 13:22:43 UTC (rev 5822)
+++ trunk/info/info.h 2014-09-12 17:22:40 UTC (rev 5823)
@@ -30,13 +30,6 @@
typedef void VFunction ();
typedef char *CFunction ();
-#include "filesys.h"
-#include "doc.h"
-#include "display.h"
-#include "session.h"
-#include "echo-area.h"
-#include "footnotes.h"
-
#include "string.h"
#include "mbiter.h"
#include "mbchar.h"
@@ -71,6 +64,16 @@
#define add_element_to_array add_pointer_to_array
+/* All commands that can be invoked from within info_session () receive
+ arguments in the same way. This simple define declares the header
+ of a function named NAME, with associated documentation DOC. The
+ documentation string is groveled out of the source files by the
+ utility program `makedoc', which is also responsible for making
+ the documentation/function-pointer maps. */
+#define DECLARE_INFO_COMMAND(name, doc) \
+void name (WINDOW *window, int count, int key)
+
+
/* For handling errors. If you initialize the window system, you should
also set info_windows_initialized_p to non-zero. It is used by the
@@ -104,11 +107,6 @@
extern const char *msg_cant_make_help;
-/* Found in m-x.c. */
-extern char *read_function_name (char *prompt, WINDOW *window);
-
-extern void show_error_node (char *error_msg);
-
/* In infopath.c, but also used in man.c. */
/* Given a string containing units of information separated by colons,
Modified: trunk/info/infodoc.c
===================================================================
--- trunk/info/infodoc.c 2014-09-12 13:22:43 UTC (rev 5822)
+++ trunk/info/infodoc.c 2014-09-12 17:22:40 UTC (rev 5823)
@@ -20,6 +20,10 @@
Originally written by Brian Fox. */
#include "info.h"
+#include "info-utils.h"
+#include "filesys.h"
+#include "session.h"
+#include "doc.h"
#include "funs.h"
/* HELP_NODE_GETS_REGENERATED is always defined now that keys may get
Modified: trunk/info/infokey.c
===================================================================
--- trunk/info/infokey.c 2014-09-12 13:22:43 UTC (rev 5822)
+++ trunk/info/infokey.c 2014-09-12 17:22:40 UTC (rev 5823)
@@ -20,8 +20,8 @@
Originally written by Andrew Bettison. */
#include "info.h"
-#include "infomap.h"
#include "doc.h"
+#include "session.h"
#include "funs.h"
#include "getopt.h"
#include "variables.h"
Modified: trunk/info/infomap.c
===================================================================
--- trunk/info/infomap.c 2014-09-12 13:22:43 UTC (rev 5822)
+++ trunk/info/infomap.c 2014-09-12 17:22:40 UTC (rev 5823)
@@ -20,8 +20,9 @@
Originally written by Brian Fox. */
#include "info.h"
-#include "infomap.h"
+#include "doc.h"
#include "funs.h"
+#include "session.h"
#include "terminal.h"
#include "variables.h"
Modified: trunk/info/infopath.c
===================================================================
--- trunk/info/infopath.c 2014-09-12 13:22:43 UTC (rev 5822)
+++ trunk/info/infopath.c 2014-09-12 17:22:40 UTC (rev 5823)
@@ -19,6 +19,8 @@
*/
#include "info.h"
+#include "info-utils.h"
+#include "session.h"
#include "filesys.h"
typedef struct {
Modified: trunk/info/m-x.c
===================================================================
--- trunk/info/m-x.c 2014-09-12 13:22:43 UTC (rev 5822)
+++ trunk/info/m-x.c 2014-09-12 17:22:40 UTC (rev 5823)
@@ -20,6 +20,9 @@
Originally written by Brian Fox. */
#include "info.h"
+#include "display.h"
+#include "session.h"
+#include "echo-area.h"
#include "funs.h"
/* **************************************************************** */
Modified: trunk/info/makedoc.c
===================================================================
--- trunk/info/makedoc.c 2014-09-12 13:22:43 UTC (rev 5822)
+++ trunk/info/makedoc.c 2014-09-12 17:22:40 UTC (rev 5823)
@@ -25,7 +25,7 @@
declared with DECLARE_INFO_COMMAND. */
#include "info.h"
-#include "infomap.h"
+#include "doc.h"
char *program_name = "makedoc";
@@ -53,6 +53,7 @@
" and a string which documents its purpose. */",
"",
"#include \"info.h\"",
+ "#include \"window.h\"",
"#include \"funs.h\"",
"",
"FUNCTION_DOC function_doc_array[] = {",
@@ -125,8 +126,9 @@
doc_stream = must_fopen (doc_filename, "w");
fprintf (funs_stream,
- "/* %s -- Generated declarations for Info commands. */\n\n\
-#include \"info.h\"\n",
+ "/* %s -- Generated declarations for Info commands. */\n\n"
+ "#include \"info.h\"\n"
+ "#include \"window.h\"\n",
funs_filename);
for (i = 0; doc_header[i]; i++)
Modified: trunk/info/man.c
===================================================================
--- trunk/info/man.c 2014-09-12 13:22:43 UTC (rev 5822)
+++ trunk/info/man.c 2014-09-12 17:22:40 UTC (rev 5823)
@@ -32,6 +32,7 @@
#endif
#include "tilde.h"
+#include "nodes.h"
#include "man.h"
#include "variables.h"
Modified: trunk/info/nodemenu.c
===================================================================
--- trunk/info/nodemenu.c 2014-09-12 13:22:43 UTC (rev 5822)
+++ trunk/info/nodemenu.c 2014-09-12 17:22:40 UTC (rev 5823)
@@ -20,6 +20,8 @@
Originally written by Brian Fox. */
#include "info.h"
+#include "session.h"
+#include "echo-area.h"
#include "variables.h"
static NODE *get_visited_nodes (void);
Modified: trunk/info/search.c
===================================================================
--- trunk/info/search.c 2014-09-12 13:22:43 UTC (rev 5822)
+++ trunk/info/search.c 2014-09-12 17:22:40 UTC (rev 5823)
@@ -22,8 +22,9 @@
#include "info.h"
#include <regex.h>
+#include "session.h"
+#include "info-utils.h"
#include "search.h"
-#include "nodes.h"
/* The search functions take two arguments:
Modified: trunk/info/session.c
===================================================================
--- trunk/info/session.c 2014-09-12 13:22:43 UTC (rev 5822)
+++ trunk/info/session.c 2014-09-12 17:22:40 UTC (rev 5823)
@@ -21,7 +21,11 @@
Originally written by Brian Fox. */
#include "info.h"
+#include "display.h"
+#include "session.h"
+#include "echo-area.h"
#include "search.h"
+#include "footnotes.h"
#include "man.h"
#ifndef __MINGW32__
@@ -1431,12 +1435,6 @@
int info_scroll_behaviour = IS_Continuous;
-/* Choices used by the completer when reading a value for the user-visible
- variable "scroll-behaviour". */
-char *info_scroll_choices[] = {
- "Continuous", "Next Only", "Page Only", NULL
-};
-
static void _scroll_forward (WINDOW *window, int count, int nodeonly);
static void _scroll_backward (WINDOW *window, int count, int nodeonly);
@@ -2967,11 +2965,6 @@
info_set_node_of_window (window, node);
}
-/* Choices for the scroll-last-node variable */
-char *scroll_last_node_choices[] = {
- "Stop", "Top", NULL
-};
-
/* Controls what to do when a scrolling command is issued at the end of the
last node. */
int scroll_last_node = SLN_Stop;
Modified: trunk/info/session.h
===================================================================
--- trunk/info/session.h 2014-09-12 13:22:43 UTC (rev 5822)
+++ trunk/info/session.h 2014-09-12 17:22:40 UTC (rev 5823)
@@ -23,17 +23,9 @@
#define SESSION_H
#include "info.h"
+#include "window.h"
#include "dribble.h"
-/* All commands that can be invoked from within info_session () receive
- arguments in the same way. This simple define declares the header
- of a function named NAME, with associated documentation DOC. The
- documentation string is groveled out of the source files by the
- utility program `makedoc', which is also responsible for making
- the documentation/function-pointer maps. */
-#define DECLARE_INFO_COMMAND(name, doc) \
-void name (WINDOW *window, int count, int key)
-
/* Variable controlling the garbage collection of files briefly visited
during searches. Such files are normally gc'ed, unless they were
compressed to begin with. If this variable is non-zero, it says
@@ -52,7 +44,6 @@
/* Variable controlling the behaviour of default scrolling when you are
already at the bottom of a node. */
extern int info_scroll_behaviour;
-extern char *info_scroll_choices[];
/* Values for info_scroll_behaviour. */
#define IS_Continuous 0 /* Try to get first menu item, or failing that, the
@@ -67,14 +58,13 @@
#define SLN_Stop 0 /* Stop at the last node */
#define SLN_Top 1 /* Go to the top node */
-int get_input_key (void);
-int get_another_input_key (void);
-
-extern char *scroll_last_node_choices[];
/* Controls what to do when a scrolling command is issued at the end of the
last node. */
extern int scroll_last_node;
+int get_input_key (void);
+int get_another_input_key (void);
+
/* Utility functions found in session.c */
extern void info_dispatch_on_key (int key, Keymap map);
extern unsigned char info_input_pending_p (void);
@@ -120,9 +110,6 @@
output to stderr. */
extern void info_error (const char *format, ...) TEXINFO_PRINTFLIKE(1,2);
-/* The names of the functions that run an info session. */
-
-/* Starting an info session. */
void initialize_info_session (void);
void info_read_and_dispatch (void);
void close_info_session (void);
@@ -140,5 +127,10 @@
extern int info_explicit_arg, info_numeric_arg, info_numeric_arg_sign;
extern int ea_explicit_arg, ea_numeric_arg, ea_numeric_arg_sign;
extern void info_initialize_numeric_arg (void);
+
+/* Found in m-x.c. */
+extern char *read_function_name (char *prompt, WINDOW *window);
+extern void show_error_node (char *error_msg);
+
#endif /* not SESSION_H */
Modified: trunk/info/signals.c
===================================================================
--- trunk/info/signals.c 2014-09-12 13:22:43 UTC (rev 5822)
+++ trunk/info/signals.c 2014-09-12 17:22:40 UTC (rev 5823)
@@ -20,6 +20,9 @@
Originally written by Brian Fox. */
#include "info.h"
+#include "display.h"
+#include "footnotes.h"
+#include "window.h"
#include "signals.h"
void initialize_info_signal_handler (void);
@@ -181,7 +184,7 @@
}
/* Number of times we were told to ignore SIGWINCH. */
-static sigwinch_block_count = 0;
+static int sigwinch_block_count = 0;
void
signal_block_winch (void)
Modified: trunk/info/tag.h
===================================================================
--- trunk/info/tag.h 2014-09-12 13:22:43 UTC (rev 5822)
+++ trunk/info/tag.h 2014-09-12 17:22:40 UTC (rev 5823)
@@ -19,6 +19,8 @@
#ifndef TAG_H
#define TAG_H
+#include "info-utils.h"
+
int tag_expand (char **input, struct text_buffer *outbuf, int *is_index);
#endif
Modified: trunk/info/terminal.c
===================================================================
--- trunk/info/terminal.c 2014-09-12 13:22:43 UTC (rev 5822)
+++ trunk/info/terminal.c 2014-09-12 17:22:40 UTC (rev 5823)
@@ -23,7 +23,7 @@
#include "info.h"
#include "terminal.h"
#include "termdep.h"
-#include "infomap.h"
+#include "doc.h"
#include <sys/types.h>
#include <signal.h>
Modified: trunk/info/variables.c
===================================================================
--- trunk/info/variables.c 2014-09-12 13:22:43 UTC (rev 5822)
+++ trunk/info/variables.c 2014-09-12 17:22:40 UTC (rev 5823)
@@ -20,6 +20,8 @@
Originally written by Brian Fox. */
#include "info.h"
+#include "session.h"
+#include "echo-area.h"
#include "variables.h"
/* **************************************************************** */
@@ -34,6 +36,14 @@
static char *mouse_choices[] = { "Off", "normal-tracking", NULL };
+/* Choices used by the completer when reading a value for the user-visible
+ variable "scroll-behaviour". */
+static char *info_scroll_choices[] = { "Continuous", "Next Only",
+ "Page Only", NULL };
+
+/* Choices for the scroll-last-node variable */
+static char *scroll_last_node_choices[] = { "Stop", "Top", NULL };
+
/* Note that the 'where_set' field of each element in the array is
not given and defaults to 0. */
VARIABLE_ALIST info_variables[] = {
Modified: trunk/info/variables.h
===================================================================
--- trunk/info/variables.h 2014-09-12 13:22:43 UTC (rev 5822)
+++ trunk/info/variables.h 2014-09-12 17:22:40 UTC (rev 5823)
@@ -22,6 +22,9 @@
#ifndef INFO_VARIABLES_H
#define INFO_VARIABLES_H
+#include "window.h"
+#include "info-utils.h"
+
/* A variable (in the Info sense) is an integer value with a user-visible
name. You may supply an array of strings to complete over when the
variable is set; in that case, the variable is set to the index of the
@@ -78,5 +81,7 @@
extern int preprocess_nodes_p;
extern int key_time;
extern int highlight_searches_p;
+extern int mouse_protocol;
+
#endif /* not INFO_VARIABLES_H */
Modified: trunk/info/window.c
===================================================================
--- trunk/info/window.c 2014-09-12 13:22:43 UTC (rev 5822)
+++ trunk/info/window.c 2014-09-12 17:22:40 UTC (rev 5823)
@@ -20,11 +20,10 @@
Originally written by Brian Fox. */
#include "info.h"
-#include "nodes.h"
-#include "window.h"
+#include "session.h"
#include "display.h"
#include "info-utils.h"
-#include "infomap.h"
+#include "doc.h"
#include "tag.h"
#include "variables.h"
Modified: trunk/info/window.h
===================================================================
--- trunk/info/window.h 2014-09-12 13:22:43 UTC (rev 5822)
+++ trunk/info/window.h 2014-09-12 17:22:40 UTC (rev 5823)
@@ -22,7 +22,7 @@
#ifndef INFO_WINDOW_H
#define INFO_WINDOW_H
-#include "infomap.h"
+#include "doc.h"
#include "nodes.h"
#include <regex.h>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [5823] remove extra header file includes from info.h,
Gavin D. Smith <=