[devhelp/wip/devhelp-next: 31/31] Make all the dh-util-lib functions private
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devhelp/wip/devhelp-next: 31/31] Make all the dh-util-lib functions private
- Date: Thu, 8 Mar 2018 17:12:39 +0000 (UTC)
commit c8b324663be04ad54e36538b7d2631b207d262f4
Author: Sébastien Wilmet <swilmet gnome org>
Date: Fri Feb 23 11:47:32 2018 +0100
Make all the dh-util-lib functions private
devhelp/dh-assistant-view.c | 24 ++++++++++++------------
devhelp/dh-book.c | 2 +-
devhelp/dh-keyword-model.c | 20 ++++++++++----------
devhelp/dh-util-lib.c | 14 +++++++-------
devhelp/dh-util-lib.h | 24 ++++++++++++++----------
5 files changed, 44 insertions(+), 40 deletions(-)
---
diff --git a/devhelp/dh-assistant-view.c b/devhelp/dh-assistant-view.c
index 9840755..ff6ccf9 100644
--- a/devhelp/dh-assistant-view.c
+++ b/devhelp/dh-assistant-view.c
@@ -355,24 +355,24 @@ dh_assistant_view_set_link (DhAssistantView *view,
}
}
- stylesheet = dh_util_build_data_filename ("devhelp",
- "assistant",
- "assistant.css",
- NULL);
- stylesheet_uri = dh_util_create_data_uri_for_filename (stylesheet,
- "text/css");
+ stylesheet = _dh_util_build_data_filename ("devhelp",
+ "assistant",
+ "assistant.css",
+ NULL);
+ stylesheet_uri = _dh_util_create_data_uri_for_filename (stylesheet,
+ "text/css");
g_free (stylesheet);
if (stylesheet_uri)
stylesheet_html = g_strdup_printf ("<link rel=\"stylesheet\" type=\"text/css\"
href=\"%s\"/>",
stylesheet_uri);
g_free (stylesheet_uri);
- javascript = dh_util_build_data_filename ("devhelp",
- "assistant",
- "assistant.js",
- NULL);
- javascript_uri = dh_util_create_data_uri_for_filename (javascript,
- "application/javascript");
+ javascript = _dh_util_build_data_filename ("devhelp",
+ "assistant",
+ "assistant.js",
+ NULL);
+ javascript_uri = _dh_util_create_data_uri_for_filename (javascript,
+ "application/javascript");
g_free (javascript);
if (javascript_uri)
diff --git a/devhelp/dh-book.c b/devhelp/dh-book.c
index 42f17dd..83d6ac0 100644
--- a/devhelp/dh-book.c
+++ b/devhelp/dh-book.c
@@ -343,7 +343,7 @@ dh_book_new (GFile *index_file)
* FIXME: maybe instead of a string, have a DhLanguage object which
* canonicalizes the string.
*/
- dh_util_ascii_strtitle (language);
+ _dh_util_ascii_strtitle (language);
priv->language = (language != NULL ?
g_strdup_printf (_("Language: %s"), language) :
g_strdup (_("Language: Undefined")));
diff --git a/devhelp/dh-keyword-model.c b/devhelp/dh-keyword-model.c
index 2714ac5..8209b13 100644
--- a/devhelp/dh-keyword-model.c
+++ b/devhelp/dh-keyword-model.c
@@ -483,7 +483,7 @@ search_books (SearchSettings *settings,
max_hits - ret->length,
exact_link);
- dh_util_queue_concat (ret, book_result);
+ _dh_util_queue_concat (ret, book_result);
}
g_queue_sort (ret, (GCompareDataFunc) dh_link_compare, NULL);
@@ -611,16 +611,16 @@ keyword_model_search (DhKeywordModel *model,
*/
if (in_book_exact_link != NULL) {
*exact_link = in_book_exact_link;
- dh_util_queue_concat (out, in_book);
- dh_util_queue_concat (out, other_books);
+ _dh_util_queue_concat (out, in_book);
+ _dh_util_queue_concat (out, other_books);
} else if (other_books_exact_link != NULL) {
*exact_link = other_books_exact_link;
- dh_util_queue_concat (out, other_books);
- dh_util_queue_concat (out, in_book);
+ _dh_util_queue_concat (out, other_books);
+ _dh_util_queue_concat (out, in_book);
} else {
*exact_link = NULL;
- dh_util_queue_concat (out, in_book);
- dh_util_queue_concat (out, other_books);
+ _dh_util_queue_concat (out, in_book);
+ _dh_util_queue_concat (out, other_books);
}
if (out->length >= max_hits)
@@ -637,7 +637,7 @@ keyword_model_search (DhKeywordModel *model,
max_hits - out->length,
NULL);
- dh_util_queue_concat (out, in_book);
+ _dh_util_queue_concat (out, in_book);
if (out->length >= max_hits)
return out;
}
@@ -650,7 +650,7 @@ keyword_model_search (DhKeywordModel *model,
other_books = search_books (&settings,
max_hits - out->length,
NULL);
- dh_util_queue_concat (out, other_books);
+ _dh_util_queue_concat (out, other_books);
return out;
}
@@ -718,7 +718,7 @@ dh_keyword_model_filter (DhKeywordModel *model,
}
clear_links (model);
- dh_util_queue_concat (&priv->links, new_links);
+ _dh_util_queue_concat (&priv->links, new_links);
new_links = NULL;
/* The content has been modified, change the stamp so that older
diff --git a/devhelp/dh-util-lib.c b/devhelp/dh-util-lib.c
index 6c5aa42..f660f29 100644
--- a/devhelp/dh-util-lib.c
+++ b/devhelp/dh-util-lib.c
@@ -22,8 +22,8 @@
#include "dh-link.h"
gchar *
-dh_util_build_data_filename (const gchar *first_part,
- ...)
+_dh_util_build_data_filename (const gchar *first_part,
+ ...)
{
gchar *datadir = NULL;
va_list args;
@@ -65,7 +65,7 @@ dh_util_build_data_filename (const gchar *first_part,
* Note that we modify the string in place.
*/
void
-dh_util_ascii_strtitle (gchar *str)
+_dh_util_ascii_strtitle (gchar *str)
{
gboolean word_start;
@@ -87,8 +87,8 @@ dh_util_ascii_strtitle (gchar *str)
}
gchar *
-dh_util_create_data_uri_for_filename (const gchar *filename,
- const gchar *mime_type)
+_dh_util_create_data_uri_for_filename (const gchar *filename,
+ const gchar *mime_type)
{
gchar *data;
gsize data_length;
@@ -109,8 +109,8 @@ dh_util_create_data_uri_for_filename (const gchar *filename,
/* Adds q2 onto the end of q1, and frees q2. */
void
-dh_util_queue_concat (GQueue *q1,
- GQueue *q2)
+_dh_util_queue_concat (GQueue *q1,
+ GQueue *q2)
{
g_return_if_fail (q1 != NULL);
diff --git a/devhelp/dh-util-lib.h b/devhelp/dh-util-lib.h
index 908cd45..b88e952 100644
--- a/devhelp/dh-util-lib.h
+++ b/devhelp/dh-util-lib.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2001-2002 Mikael Hallendal <micke imendio com>
* Copyright (C) 2004,2008 Imendio AB
- * Copyright (C) 2015, 2017 Sébastien Wilmet <swilmet gnome org>
+ * Copyright (C) 2015, 2017, 2018 Sébastien Wilmet <swilmet gnome org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -25,22 +25,26 @@
G_BEGIN_DECLS
-gchar * dh_util_build_data_filename (const gchar *first_part,
- ...);
+G_GNUC_INTERNAL
+gchar * _dh_util_build_data_filename (const gchar *first_part,
+ ...);
-void dh_util_ascii_strtitle (gchar *str);
+G_GNUC_INTERNAL
+void _dh_util_ascii_strtitle (gchar *str);
-gchar *dh_util_create_data_uri_for_filename (const gchar *filename,
- const gchar *mime_type);
+G_GNUC_INTERNAL
+gchar * _dh_util_create_data_uri_for_filename (const gchar *filename,
+ const gchar *mime_type);
-void dh_util_queue_concat (GQueue *q1,
- GQueue *q2);
+G_GNUC_INTERNAL
+void _dh_util_queue_concat (GQueue *q1,
+ GQueue *q2);
G_GNUC_INTERNAL
-void _dh_util_free_book_tree (GNode *book_tree);
+void _dh_util_free_book_tree (GNode *book_tree);
G_GNUC_INTERNAL
-GSList * _dh_util_get_possible_index_files (GFile *book_directory);
+GSList * _dh_util_get_possible_index_files (GFile *book_directory);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]