From 86e0b0d194a2b41255d11c1197d68d3e6b2fa999 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Tue, 31 Oct 2017 02:40:56 -0400 Subject: atoi64(), parse_query_string(): Prefix function names with "mq_" And update calls. --- (limited to 'src') diff --git a/src/about.c b/src/about.c index e4499f2..6eb3a6c 100644 --- a/src/about.c +++ b/src/about.c @@ -41,7 +41,7 @@ mq_about_request(WebKitURISchemeRequest *request, MqApplication *application) query_str = strchr(webkit_uri_scheme_request_get_uri(request), '?'); if (query_str && query_str[1]) { query_str = g_strdup(query_str + 1); - query = parse_query_string(query_str); + query = mq_parse_query_string(query_str); g_free(query_str); } else { query = NULL; diff --git a/src/string-utils.c b/src/string-utils.c index 8484468..ab7186c 100644 --- a/src/string-utils.c +++ b/src/string-utils.c @@ -25,7 +25,7 @@ #include gint64 -atoi64(const gchar *a) +mq_atoi64(const gchar *a) { gint64 i64; @@ -37,7 +37,7 @@ atoi64(const gchar *a) } GHashTable * -parse_query_string(gchar *str) +mq_parse_query_string(gchar *str) { GHashTable *hash_table; gchar *key; diff --git a/src/string-utils.h b/src/string-utils.h index 6e9c31c..19e0b43 100644 --- a/src/string-utils.h +++ b/src/string-utils.h @@ -27,10 +27,10 @@ G_BEGIN_DECLS gint64 -atoi64(const gchar *a); +mq_atoi64(const gchar *a); GHashTable * -parse_query_string(gchar *str); +mq_parse_query_string(gchar *str); G_END_DECLS diff --git a/src/view-source.c b/src/view-source.c index 57b710d..271ad5a 100644 --- a/src/view-source.c +++ b/src/view-source.c @@ -97,10 +97,10 @@ mq_view_source_request(WebKitURISchemeRequest *request, DataSignalData *data_signal_data; path = g_strdup(webkit_uri_scheme_request_get_path(request)); - query = parse_query_string(path); + query = mq_parse_query_string(path); /* TODO: Handle missing tab ID ("origin-tab=0"). */ - origin_tab_id = atoi64(g_hash_table_lookup(query, "origin-tab")); + origin_tab_id = mq_atoi64(g_hash_table_lookup(query, "origin-tab")); uri = g_strdup(g_hash_table_lookup(query, "uri")); g_hash_table_unref(query); diff --git a/src/web-view-schemes/view-source.c b/src/web-view-schemes/view-source.c index d0e9b28..e87c69c 100644 --- a/src/web-view-schemes/view-source.c +++ b/src/web-view-schemes/view-source.c @@ -47,9 +47,9 @@ initialize(MqWebView G_GNUC_UNUSED *web_view, MqWebViewScheme *scheme, GHashTable *query; query_str = g_strdup(uri + strlen("view-source:")); - query = parse_query_string(query_str); + query = mq_parse_query_string(query_str); - scheme->view_source.origin_tab_id = atoi64(g_hash_table_lookup(query, + scheme->view_source.origin_tab_id = mq_atoi64(g_hash_table_lookup(query, "origin-tab")); scheme->view_source.uri = g_strdup(g_hash_table_lookup(query, "uri")); -- cgit v0.9.1