texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: Parsetexi.pm clear list of include directories


From: Gavin D. Smith
Subject: branch master updated: Parsetexi.pm clear list of include directories
Date: Sun, 19 Dec 2021 08:05:42 -0500

This is an automated email from the git hooks/post-receive script.

gavin pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new 6a729e9  Parsetexi.pm clear list of include directories
6a729e9 is described below

commit 6a729e955153734b1ec73f7219d78db3e90287ec
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Sun Dec 19 13:04:49 2021 +0000

    Parsetexi.pm clear list of include directories
    
    * tp/Texinfo/XS/parsetexi/input.c (clear_include_directories):
    New function to clear the path for finding @include files
    * tp/Texinfo/XS/parsetexi/api.c (reset_parser): Call it.
---
 ChangeLog                       |  9 +++++++++
 tp/Texinfo/XS/parsetexi/api.c   |  1 +
 tp/Texinfo/XS/parsetexi/input.c | 11 +++++++++++
 tp/Texinfo/XS/parsetexi/input.h |  1 +
 4 files changed, 22 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 2fa51d9..be17528 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2021-12-19  Gavin Smith  <gavinsmith0123@gmail.com>
+
+       Parsetexi.pm clear list of include directories
+
+       * tp/Texinfo/XS/parsetexi/input.c (clear_include_directories):
+       New function to clear the path for finding @include files
+       * tp/Texinfo/XS/parsetexi/api.c (reset_parser): Call it.
+
+
 2021-12-19  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/Common.pm (@variable_string_settables),
diff --git a/tp/Texinfo/XS/parsetexi/api.c b/tp/Texinfo/XS/parsetexi/api.c
index aa6bd67..5222053 100644
--- a/tp/Texinfo/XS/parsetexi/api.c
+++ b/tp/Texinfo/XS/parsetexi/api.c
@@ -146,6 +146,7 @@ reset_parser (void)
   reset_parser_except_conf ();
   wipe_values ();
   clear_expanded_formats ();
+  clear_include_directories ();
   reset_conf ();
 
   free (global_documentlanguage);
diff --git a/tp/Texinfo/XS/parsetexi/input.c b/tp/Texinfo/XS/parsetexi/input.c
index 307c907..990ad84 100644
--- a/tp/Texinfo/XS/parsetexi/input.c
+++ b/tp/Texinfo/XS/parsetexi/input.c
@@ -520,6 +520,17 @@ add_include_directory (char *filename)
     filename[len - 1] = '\0';
 }
 
+void
+clear_include_directories (void)
+{
+  int i;
+  for (i = 0; i < include_dirs_number; i++)
+    {
+      free (include_dirs[i]);
+    }
+  include_dirs_number = 0;
+}
+
 /* Return value to be freed by caller. */
 char *
 locate_include_file (char *filename)
diff --git a/tp/Texinfo/XS/parsetexi/input.h b/tp/Texinfo/XS/parsetexi/input.h
index 6a906c0..82dfc7a 100644
--- a/tp/Texinfo/XS/parsetexi/input.h
+++ b/tp/Texinfo/XS/parsetexi/input.h
@@ -19,6 +19,7 @@ int top_file_index (void);
 char *locate_include_file (char *filename);
 void set_input_encoding (char *encoding);
 void add_include_directory (char *filename);
+void clear_include_directories (void);
 
 char *save_string (char *string);
 void free_small_strings (void);



reply via email to

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