[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Patrice Dumas |
Date: |
Mon, 20 May 2024 10:16:59 -0400 (EDT) |
branch: master
commit 6456219f7c1ff4132c9d028f05e5b8c8ffed8510
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Mon May 20 15:35:48 2024 +0200
* tp/Texinfo/XS/parsetexi/api.c (parser_conf_reset_values)
(parser_conf_add_value): rename parser_reset_values_conf as
parser_conf_reset_values and parser_store_value as
parser_conf_add_value. Update users.
---
ChangeLog | 7 +++++++
tp/Texinfo/XS/parsetexi/Parsetexi.xs | 5 ++---
tp/Texinfo/XS/parsetexi/api.c | 4 ++--
tp/Texinfo/XS/parsetexi/api.h | 4 ++--
tp/Texinfo/XS/parsetexi/conf.c | 1 -
tp/Texinfo/XS/parsetexi/conf.h | 7 +++++--
6 files changed, 18 insertions(+), 10 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index b80d437dc1..b70ba0bccb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-05-20 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/parsetexi/api.c (parser_conf_reset_values)
+ (parser_conf_add_value): rename parser_reset_values_conf as
+ parser_conf_reset_values and parser_store_value as
+ parser_conf_add_value. Update users.
+
2024-05-20 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/XS/parsetexi/conf.c: add parser_ in the name of all the
diff --git a/tp/Texinfo/XS/parsetexi/Parsetexi.xs
b/tp/Texinfo/XS/parsetexi/Parsetexi.xs
index 175b91e041..1e02c37708 100644
--- a/tp/Texinfo/XS/parsetexi/Parsetexi.xs
+++ b/tp/Texinfo/XS/parsetexi/Parsetexi.xs
@@ -32,7 +32,6 @@
#include "api.h"
#include "conf.h"
#include "build_perl_info.h"
-#include "input.h"
/* See the NOTE in build_perl_info.c on use of functions related to
memory allocation */
@@ -106,7 +105,7 @@ pass_document_parser_errors_to_registrar (int
document_descriptor, SV *parser_sv
void
parser_store_values (SV *values)
CODE:
- parser_reset_values_conf ();
+ parser_conf_reset_values ();
if (SvOK (values))
{
I32 i;
@@ -122,7 +121,7 @@ parser_store_values (SV *values)
if (value_sv && SvOK (value_sv))
{
char *value_text = SvPVutf8_nolen (value_sv);
- parser_store_value (key, value_text);
+ parser_conf_add_value (key, value_text);
}
}
}
diff --git a/tp/Texinfo/XS/parsetexi/api.c b/tp/Texinfo/XS/parsetexi/api.c
index 7515c1c06d..9fa9e60a4f 100644
--- a/tp/Texinfo/XS/parsetexi/api.c
+++ b/tp/Texinfo/XS/parsetexi/api.c
@@ -209,13 +209,13 @@ parse_piece (const char *string, int line_nr)
}
void
-parser_reset_values_conf (void)
+parser_conf_reset_values (void)
{
wipe_values (&parser_conf.values);
}
void
-parser_store_value (const char *name, const char *value)
+parser_conf_add_value (const char *name, const char *value)
{
store_value (&parser_conf.values, name, value);
}
diff --git a/tp/Texinfo/XS/parsetexi/api.h b/tp/Texinfo/XS/parsetexi/api.h
index d9d65d2fe2..6f72e76e85 100644
--- a/tp/Texinfo/XS/parsetexi/api.h
+++ b/tp/Texinfo/XS/parsetexi/api.h
@@ -11,7 +11,7 @@ int parse_string (const char *, int line_nr);
int parse_text (const char *, int line_nr);
void reset_parser (int debug_output);
-void parser_reset_values_conf (void);
-void parser_store_value (const char *name, const char *value);
+void parser_conf_reset_values (void);
+void parser_conf_add_value (const char *name, const char *value);
#endif
diff --git a/tp/Texinfo/XS/parsetexi/conf.c b/tp/Texinfo/XS/parsetexi/conf.c
index 5722d818b4..7c4d946713 100644
--- a/tp/Texinfo/XS/parsetexi/conf.c
+++ b/tp/Texinfo/XS/parsetexi/conf.c
@@ -16,7 +16,6 @@
#include <config.h>
#include <string.h>
-#include "tree_types.h"
#include "utils.h"
#include "macro.h"
#include "conf.h"
diff --git a/tp/Texinfo/XS/parsetexi/conf.h b/tp/Texinfo/XS/parsetexi/conf.h
index dc12ced08c..345e247558 100644
--- a/tp/Texinfo/XS/parsetexi/conf.h
+++ b/tp/Texinfo/XS/parsetexi/conf.h
@@ -18,7 +18,10 @@
#include "document_types.h"
-typedef struct CONF {
+/* TODO there is no reason to have the structure and extern included in
+ codes only interested by the parser API, which only need the functions */
+
+typedef struct PARSER_CONF {
int accept_internalvalue;
int cpp_line_directives;
int doc_encoding_for_input_file_name;
@@ -41,7 +44,7 @@ typedef struct CONF {
extern PARSER_CONF parser_conf;
-/* part of public API */
+/* part of parser public API */
void parser_conf_set_show_menu (int i);
void parser_conf_set_CPP_LINE_DIRECTIVES (int i);
int parser_conf_set_DEBUG (int i);