[devhelp] parser: rename variables path -> index_file_path
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devhelp] parser: rename variables path -> index_file_path
- Date: Wed, 10 May 2017 16:09:51 +0000 (UTC)
commit 9b436643600dd76b1e5a96337ca3a0d5c5fd82ab
Author: Sébastien Wilmet <swilmet gnome org>
Date: Wed May 10 17:44:55 2017 +0200
parser: rename variables path -> index_file_path
src/dh-parser.c | 18 +++++++++---------
src/dh-parser.h | 2 +-
2 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/src/dh-parser.c b/src/dh-parser.c
index 73be4db..505c725 100644
--- a/src/dh-parser.c
+++ b/src/dh-parser.c
@@ -36,7 +36,7 @@ typedef struct {
GMarkupParser *m_parser;
GMarkupParseContext *context;
- const gchar *path;
+ const gchar *index_file_path;
/* Primary metadata of the book */
gchar **book_title;
@@ -155,7 +155,7 @@ parser_start_node_book (DhParser *parser,
*(parser->book_language) = language ? g_strdup (language) : NULL;
if (!base) {
- base = g_path_get_dirname (parser->path);
+ base = g_path_get_dirname (parser->index_file_path);
}
link = dh_link_new (DH_LINK_TYPE_BOOK,
@@ -534,7 +534,7 @@ parser_read_gz_file (DhParser *parser,
}
gboolean
-dh_parser_read_file (const gchar *path,
+dh_parser_read_file (const gchar *index_file_path,
gchar **book_title,
gchar **book_name,
gchar **book_language,
@@ -550,15 +550,15 @@ dh_parser_read_file (const gchar *path,
parser = g_new0 (DhParser, 1);
- if (g_str_has_suffix (path, ".devhelp2")) {
+ if (g_str_has_suffix (index_file_path, ".devhelp2")) {
parser->version = 2;
gz = FALSE;
}
- else if (g_str_has_suffix (path, ".devhelp")) {
+ else if (g_str_has_suffix (index_file_path, ".devhelp")) {
parser->version = 1;
gz = FALSE;
}
- else if (g_str_has_suffix (path, ".devhelp2.gz")) {
+ else if (g_str_has_suffix (index_file_path, ".devhelp2.gz")) {
parser->version = 2;
gz = TRUE;
} else {
@@ -574,7 +574,7 @@ dh_parser_read_file (const gchar *path,
parser->context = g_markup_parse_context_new (parser->m_parser, 0,
parser, NULL);
- parser->path = path;
+ parser->index_file_path = index_file_path;
parser->book_tree = book_tree;
parser->keywords = keywords;
parser->book_title = book_title;
@@ -583,13 +583,13 @@ dh_parser_read_file (const gchar *path,
if (gz) {
if (!parser_read_gz_file (parser,
- path,
+ index_file_path,
error)) {
result = FALSE;
}
goto exit;
} else {
- io = g_io_channel_new_file (path, "r", error);
+ io = g_io_channel_new_file (index_file_path, "r", error);
if (!io) {
result = FALSE;
goto exit;
diff --git a/src/dh-parser.h b/src/dh-parser.h
index 34f8480..4a90483 100644
--- a/src/dh-parser.h
+++ b/src/dh-parser.h
@@ -24,7 +24,7 @@
G_BEGIN_DECLS
-gboolean dh_parser_read_file (const gchar *path,
+gboolean dh_parser_read_file (const gchar *index_file_path,
gchar **book_title,
gchar **book_name,
gchar **book_language,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]