(root)/
texinfo-7.1/
tp/
Texinfo/
XS/
parsetexi/
conf.c
       1  /* Copyright 2010-2023 Free Software Foundation, Inc.
       2  
       3     This program is free software: you can redistribute it and/or modify
       4     it under the terms of the GNU General Public License as published by
       5     the Free Software Foundation, either version 3 of the License, or
       6     (at your option) any later version.
       7  
       8     This program is distributed in the hope that it will be useful,
       9     but WITHOUT ANY WARRANTY; without even the implied warranty of
      10     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      11     GNU General Public License for more details.
      12  
      13     You should have received a copy of the GNU General Public License
      14     along with this program.  If not, see <http://www.gnu.org/licenses/>. */
      15  
      16  #include <config.h>
      17  #include <string.h>
      18  
      19  #include "tree_types.h"
      20  #include "conf.h"
      21  
      22  /* Configuration values. */
      23  CONF conf;
      24  
      25  void
      26  conf_set_show_menu (int i)
      27  {
      28    conf.show_menu = i;
      29  }
      30  
      31  void
      32  conf_set_CPP_LINE_DIRECTIVES (int i)
      33  {
      34    conf.cpp_line_directives = i;
      35  }
      36  
      37  void
      38  conf_set_IGNORE_SPACE_AFTER_BRACED_COMMAND_NAME (int i)
      39  {
      40    conf.ignore_space_after_braced_command_name = i;
      41  }
      42  
      43  void
      44  conf_set_MAX_MACRO_CALL_NESTING (int i)
      45  {
      46    conf.max_macro_call_nesting = i;
      47  }
      48  
      49  void
      50  reset_conf (void)
      51  {
      52    memset (&conf, 0, sizeof (conf));
      53    conf.show_menu = 1;
      54    conf.cpp_line_directives = 1;
      55    conf.ignore_space_after_braced_command_name = 1;
      56    conf.max_macro_call_nesting = 100000;
      57    conf.doc_encoding_for_input_file_name = 1;
      58  }