texinfo-commits
[Top][All Lists]
Advanced

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

[5540] info_load_file static


From: Gavin D. Smith
Subject: [5540] info_load_file static
Date: Fri, 09 May 2014 14:46:50 +0000

Revision: 5540
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5540
Author:   gavin
Date:     2014-05-09 14:46:50 +0000 (Fri, 09 May 2014)
Log Message:
-----------
info_load_file static

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/info/info.c
    trunk/info/nodes.c
    trunk/info/nodes.h

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2014-05-09 14:24:12 UTC (rev 5539)
+++ trunk/ChangeLog     2014-05-09 14:46:50 UTC (rev 5540)
@@ -1,5 +1,10 @@
 2014-05-09  Gavin Smith  <address@hidden>
 
+       * info/nodes.c (info_load_file): Function declared static.
+       * info/info.c (main): Call info_find_file instead.
+
+2014-05-09  Gavin Smith  <address@hidden>
+
        * info/info.c (all_files, main): all_files merged into main.
        (add_initial_nodes): Store full path of initial
        nodes instead of plain file name.

Modified: trunk/info/info.c
===================================================================
--- trunk/info/info.c   2014-05-09 14:24:12 UTC (rev 5539)
+++ trunk/info/info.c   2014-05-09 14:46:50 UTC (rev 5540)
@@ -764,7 +764,7 @@
         {
           NODE *initial_node;
           
-          initial_fb = info_load_file (initial_file, 1);
+          initial_fb = info_find_file (initial_file);
           if (initial_fb && index_entry_exists (initial_fb,
                                                 index_search_string))
             {
@@ -787,7 +787,7 @@
       /* Add nodes to start with (unless we fell back to the man page). */
       if (initial_file && strcmp (MANPAGE_FILE_BUFFER_NAME, initial_file))
         {
-          initial_fb = info_load_file (initial_file, 1);
+          initial_fb = info_find_file (initial_file);
           add_initial_nodes (initial_fb, argc, argv, &error);
         }
     }

Modified: trunk/info/nodes.c
===================================================================
--- trunk/info/nodes.c  2014-05-09 14:24:12 UTC (rev 5539)
+++ trunk/info/nodes.c  2014-05-09 14:46:50 UTC (rev 5540)
@@ -565,12 +565,12 @@
 
 /* Functions for retrieving files. */
 
-/* Passed to info_load_file.  INFO_GET_TAGS
-   says to do what is neccessary to fill in the nodes or tags arrays in
-   FILE_BUFFER. */
+/* Passed to info_load_file.  INFO_GET_TAGS says to do what is necessary
+   to fill in the nodes or tags arrays in FILE_BUFFER. */
 #define INFO_NO_TAGS  0
 #define INFO_GET_TAGS 1
 
+static FILE_BUFFER *info_load_file (char *fullpath, int get_tags);
 static FILE_BUFFER *info_find_subfile (char *filename);
 static void get_file_character_encoding (FILE_BUFFER *fb);
 static void remember_info_file (FILE_BUFFER *file_buffer);
@@ -581,12 +581,6 @@
    already, or it may not.  If it does not already appear, find the file,
    and add it to the list of loaded files.  If the file cannot be found,
    return a NULL FILE_BUFFER *. */
-
-/* The workhorse for info_find_file ().  Non-zero 2nd argument says to
-   try to build a tags table (or otherwise glean the nodes) for this
-   file once found.  By default, we build the tags table, but when this
-   function is called by info_get_node () when we already have a valid
-   tags table describing the nodes, it is unnecessary. */
 FILE_BUFFER *
 info_find_file (char *filename)
 {
@@ -724,7 +718,7 @@
    second argument says to build a list of tags (or nodes) for this file.
    This is not necessary when loading a subfile for which we already have
    tags. */
-FILE_BUFFER *
+static FILE_BUFFER *
 info_load_file (char *fullpath, int get_tags)
 {
   char *contents;

Modified: trunk/info/nodes.h
===================================================================
--- trunk/info/nodes.h  2014-05-09 14:24:12 UTC (rev 5539)
+++ trunk/info/nodes.h  2014-05-09 14:46:50 UTC (rev 5540)
@@ -28,8 +28,7 @@
 /* User code interface.  */
 
 /* Structure which describes a node reference, such as a menu entry or
-   cross reference.  Arrays of such references can be built by calling
-   info_menus_of_node () or info_xrefs_of_node (). */
+   cross reference. */
 typedef struct {
   char *label;          /* User Label. */
   char *filename;       /* File where this node can be found. */
@@ -149,10 +148,6 @@
    return a NULL FILE_BUFFER *. */
 extern FILE_BUFFER *info_find_file (char *filename);
 
-/* Load the file with path FULLPATH, and return pointer to FILE_BUFFER
-   structure.  If GET_TAGS == 0, don't fill in the tag table. */
-extern FILE_BUFFER *info_load_file (char *fullpath, int get_tags);
-
 /* Return a pointer to a new NODE structure. */
 extern NODE *info_create_node (void);
 




reply via email to

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