(root)/
texinfo-7.1/
info/
scan.h
       1  /* scan.h -- Exported functions and variables from scan.c.
       2  
       3     Copyright 1993-2023 Free Software Foundation, Inc.
       4  
       5     This program is free software: you can redistribute it and/or modify
       6     it under the terms of the GNU General Public License as published by
       7     the Free Software Foundation, either version 3 of the License, or
       8     (at your option) any later version.
       9  
      10     This program is distributed in the hope that it will be useful,
      11     but WITHOUT ANY WARRANTY; without even the implied warranty of
      12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      13     GNU General Public License for more details.
      14  
      15     You should have received a copy of the GNU General Public License
      16     along with this program.  If not, see <http://www.gnu.org/licenses/>.
      17  
      18     Originally written by Brian Fox. */
      19  
      20  #ifndef SCAN_H
      21  #define SCAN_H
      22  
      23  #include "nodes.h"
      24  #include "window.h"
      25  #include "search.h"
      26  
      27  /* Variable which holds the most recent filename parsed as a result of
      28     calling info_parse_xxx (). */
      29  extern char *info_parsed_filename;
      30  
      31  /* Variable which holds the most recent nodename parsed as a result of
      32     calling info_parse_xxx (). */
      33  extern char *info_parsed_nodename;
      34  
      35  /* Parse the filename and nodename out of STRING. */ 
      36  void info_parse_node (char *string);
      37  
      38  long read_quoted_string (char *start, char *terminator, int lines,
      39                           char **output);
      40  
      41  void scan_node_contents (NODE *node, FILE_BUFFER *fb, TAG **tag_ptr);
      42  
      43  /* Get the menu entry associated with LABEL in NODE.  Return a
      44     pointer to the reference if found, or NULL.  If SLOPPY, accept
      45     initial substrings and check insensitively to case. */
      46  REFERENCE *info_get_menu_entry_by_label (NODE *node, char *label,
      47                                                  int sloppy);
      48  
      49  /* A utility function for concatenating REFERENCE **.  Returns a new
      50     REFERENCE ** which is the concatenation of REF1 and REF2.  The REF1
      51     and REF2 arrays are freed, but their contents are not. */
      52  REFERENCE **info_concatenate_references (REFERENCE **ref1, REFERENCE **ref2);
      53  
      54  /* Copy an existing reference into new memory.  */
      55  REFERENCE *info_copy_reference (REFERENCE *src);
      56  
      57  /* Copy a list of existing references into new memory.  */
      58  REFERENCE **info_copy_references (REFERENCE **ref1);
      59  
      60  /* Free the data associated with a single REF */
      61  void info_reference_free (REFERENCE *ref);
      62  
      63  /* Free the data associated with REFERENCES. */
      64  void info_free_references (REFERENCE **references);
      65  
      66  /* Create new REFERENCE structure. */
      67  REFERENCE *info_new_reference (char *filename, char *nodename);
      68  
      69  /* Search for sequences of whitespace or newlines in STRING, replacing
      70     all such sequences with just a single space.  Remove whitespace from
      71     start and end of string. */
      72  void canonicalize_whitespace (char *string);
      73  
      74  
      75  
      76  #endif /* not SCAN_H */