Replaces the gchar -> char and gint -> int.
authorDaniel Carl <danielcarl@gmx.de>
Sat, 16 Feb 2013 00:41:04 +0000 (01:41 +0100)
committerDaniel Carl <danielcarl@gmx.de>
Sat, 16 Feb 2013 10:51:55 +0000 (11:51 +0100)
17 files changed:
src/command.c
src/command.h
src/completion.c
src/dom.c
src/dom.h
src/hints.c
src/hints.h
src/keybind.c
src/keybind.h
src/main.c
src/main.h
src/searchengine.c
src/searchengine.h
src/setting.c
src/setting.h
src/util.c
src/util.h

index 11240b7..f9c35ac 100644 (file)
@@ -89,7 +89,7 @@ static CommandInfo cmd_list[] = {
     {"searchengine-remove", command_searchengine,{0}},
 };
 
-static void command_write_input(const gchar* str);
+static void command_write_input(const char* str);
 
 
 void command_init(void)
@@ -109,12 +109,12 @@ void command_cleanup(void)
     }
 }
 
-gboolean command_exists(const gchar* name)
+gboolean command_exists(const char* name)
 {
     return g_hash_table_contains(vp.behave.commands, name);
 }
 
-gboolean command_run(const gchar* name, const gchar* param)
+gboolean command_run(const char* name, const char* param)
 {
     CommandInfo* c = NULL;
     gboolean result;
@@ -134,7 +134,7 @@ gboolean command_run(const gchar* name, const gchar* param)
 
 gboolean command_open(const Arg* arg)
 {
-    gchar* uri = NULL;
+    char* uri = NULL;
     gboolean result;
     /* check for searchengine handles */
     /* split into handle and searchterms */
@@ -142,7 +142,7 @@ gboolean command_open(const Arg* arg)
     if (g_strv_length(string) == 2
         && (uri = searchengine_get_uri(string[0]))
     ) {
-        gchar* term = soup_uri_encode(string[1], "&");
+        char* term = soup_uri_encode(string[1], "&");
         Arg a  = {arg->i, g_strdup_printf(uri, term)};
         result = vp_load_uri(&a);
         g_free(term);
@@ -178,14 +178,14 @@ gboolean command_open_closed(const Arg* arg)
 
 gboolean command_input(const Arg* arg)
 {
-    const gchar* url;
+    const char* url;
 
     /* add current url if requested */
     if (VP_INPUT_CURRENT_URI == arg->i
         && (url = CURRENT_URL())
     ) {
         /* append the current url to the input message */
-        gchar* input = g_strconcat(arg->s, url, NULL);
+        char* input = g_strconcat(arg->s, url, NULL);
         command_write_input(input);
         g_free(input);
     } else {
@@ -219,7 +219,7 @@ gboolean command_view_source(const Arg* arg)
 gboolean command_navigate(const Arg* arg)
 {
     if (arg->i <= VP_NAVIG_FORWARD) {
-        gint count = vp.state.count ? vp.state.count : 1;
+        int count = vp.state.count ? vp.state.count : 1;
         webkit_web_view_go_back_or_forward(
             vp.gui.webview, (arg->i == VP_NAVIG_BACK ? -count : count)
         );
@@ -240,12 +240,12 @@ gboolean command_scroll(const Arg* arg)
 {
     GtkAdjustment *adjust = (arg->i & VP_SCROLL_AXIS_H) ? vp.gui.adjust_h : vp.gui.adjust_v;
 
-    gint direction  = (arg->i & (1 << 2)) ? 1 : -1;
+    int direction  = (arg->i & (1 << 2)) ? 1 : -1;
 
     /* type scroll */
     if (arg->i & VP_SCROLL_TYPE_SCROLL) {
         gdouble value;
-        gint count = vp.state.count ? vp.state.count : 1;
+        int count = vp.state.count ? vp.state.count : 1;
         if (arg->i & VP_SCROLL_UNIT_LINE) {
             value = vp.config.scrollstep;
         } else if (arg->i & VP_SCROLL_UNIT_HALFPAGE) {
@@ -276,7 +276,7 @@ gboolean command_map(const Arg* arg)
     gboolean result;
     vp_set_mode(VP_MODE_NORMAL, FALSE);
 
-    gchar **string = g_strsplit(arg->s, "=", 2);
+    char **string = g_strsplit(arg->s, "=", 2);
     if (g_strv_length(string) != 2) {
         return FALSE;
     }
@@ -296,8 +296,8 @@ gboolean command_unmap(const Arg* arg)
 gboolean command_set(const Arg* arg)
 {
     gboolean success;
-    gchar* line = NULL;
-    gchar** token;
+    char* line = NULL;
+    char** token;
 
     if (!arg->s || !strlen(arg->s)) {
         return FALSE;
@@ -374,7 +374,7 @@ gboolean command_yank(const Arg* arg)
     vp_set_mode(VP_MODE_NORMAL, TRUE);
 
     if (arg->i & COMMAND_YANK_SELECTION) {
-        gchar* text = NULL;
+        char* text = NULL;
         /* copy current selection to clipboard */
         webkit_web_view_copy_clipboard(vp.gui.webview);
         text = gtk_clipboard_wait_for_text(PRIMARY_CLIPBOARD());
@@ -475,7 +475,7 @@ gboolean command_searchengine(const Arg* arg)
     gboolean result;
     if (arg->i) {
         /* add the searchengine */
-        gchar **string = g_strsplit(arg->s, "=", 2);
+        char **string = g_strsplit(arg->s, "=", 2);
         if (g_strv_length(string) != 2) {
             return FALSE;
         }
@@ -491,9 +491,9 @@ gboolean command_searchengine(const Arg* arg)
     return result;
 }
 
-static void command_write_input(const gchar* str)
+static void command_write_input(const char* str)
 {
-    gint pos = 0;
+    int pos = 0;
     /* reset the colors and fonts to defalts */
     vp_set_widget_font(
         vp.gui.inputbox,
index 4b52e2b..0492bd6 100644 (file)
@@ -30,7 +30,7 @@ enum {
 typedef gboolean (*Command)(const Arg* arg);
 
 typedef struct {
-    const gchar* name;
+    const char* name;
     Command      function;
     const Arg    arg;       /* arguments to call the command with */
 } CommandInfo;
@@ -38,8 +38,8 @@ typedef struct {
 
 void command_init(void);
 void command_cleanup(void);
-gboolean command_exists(const gchar* name);
-gboolean command_run(const gchar* name, const gchar* param);
+gboolean command_exists(const char* name);
+gboolean command_run(const char* name, const char* param);
 
 gboolean command_open(const Arg* arg);
 gboolean command_open_home(const Arg* arg);
index a12778d..62ea0f0 100644 (file)
 typedef struct {
     GtkWidget* label;
     GtkWidget* event;
-    gchar*     prefix;
+    char*     prefix;
 } Completion;
 
-static GList* completion_init_completion(GList* target, GList* source, const gchar* prefix);
+static GList* completion_init_completion(GList* target, GList* source, const char* prefix);
 static GList* completion_update(GList* completion, GList* active, gboolean back);
 static void completion_show(gboolean back);
 static void completion_set_color(Completion* completion, const VpColor* fg, const VpColor* bg, PangoFontDescription* font);
 static void completion_set_entry_text(Completion* completion);
-static Completion* completion_get_new(const gchar* label, const gchar* prefix);
+static Completion* completion_get_new(const char* label, const char* prefix);
 
 gboolean completion_complete(gboolean back)
 {
-    const gchar* input = NULL;
+    const char* input = NULL;
     GList* source = NULL;
 
     if (vp.comps.completions
@@ -95,13 +95,13 @@ void completion_clean(void)
     vp.state.mode &= ~VP_MODE_COMPLETE;
 }
 
-static GList* completion_init_completion(GList* target, GList* source, const gchar* prefix)
+static GList* completion_init_completion(GList* target, GList* source, const char* prefix)
 {
-    const gchar* input = GET_TEXT();
-    gchar* command = NULL;
-    gchar* data = NULL;
+    const char* input = GET_TEXT();
+    char* command = NULL;
+    char* data = NULL;
     gboolean match;
-    gchar **token = NULL;
+    char **token = NULL;
 
     /* skip prefix for completion */
     if (g_str_has_prefix(input, prefix)) {
@@ -119,7 +119,7 @@ static GList* completion_init_completion(GList* target, GList* source, const gch
         if (*command == 0) {
             match = TRUE;
         } else {
-            for (gint i = 0; token[i]; i++) {
+            for (int i = 0; token[i]; i++) {
                 if (g_str_has_prefix(data, token[i])) {
                     match = TRUE;
                 } else {
@@ -147,11 +147,11 @@ static GList* completion_update(GList* completion, GList* active, gboolean back)
     GList *old, *new;
     Completion *c;
 
-    gint length = g_list_length(completion);
-    gint max    = vp.config.max_completion_items;
-    gint items  = MAX(length, max);
-    gint r      = (max) % 2;
-    gint offset = max / 2 - 1 + r;
+    int length = g_list_length(completion);
+    int max    = vp.config.max_completion_items;
+    int items  = MAX(length, max);
+    int r      = (max) % 2;
+    int offset = max / 2 - 1 + r;
 
     old = active;
     int position = g_list_position(completion, active) + 1;
@@ -220,7 +220,7 @@ static GList* completion_update(GList* completion, GList* active, gboolean back)
 static void completion_show(gboolean back)
 {
     guint max = vp.config.max_completion_items;
-    gint i = 0;
+    int i = 0;
     if (back) {
         vp.comps.active = g_list_last(vp.comps.completions);
         for (GList *l = vp.comps.active; l && i < max; l = l->prev, i++) {
@@ -255,7 +255,7 @@ static void completion_set_color(Completion* completion, const VpColor* fg, cons
 static void completion_set_entry_text(Completion* completion)
 {
     GString* string = g_string_new(completion->prefix);
-    const gchar* text;
+    const char* text;
 
     text = gtk_label_get_text(GTK_LABEL(completion->label));
 
@@ -270,9 +270,9 @@ static void completion_set_entry_text(Completion* completion)
     g_string_free(string, TRUE);
 }
 
-static Completion* completion_get_new(const gchar* label, const gchar* prefix)
+static Completion* completion_get_new(const char* label, const char* prefix)
 {
-    const gint padding = 2;
+    const int padding = 2;
     Completion* c = g_new0(Completion, 1);
 
     c->label  = gtk_label_new(label);
index 43cf59e..f805e91 100644 (file)
--- a/src/dom.c
+++ b/src/dom.c
@@ -40,11 +40,11 @@ void dom_check_auto_insert(void)
     }
 }
 
-void dom_element_set_style(Element* element, const gchar* format, ...)
+void dom_element_set_style(Element* element, const char* format, ...)
 {
     va_list args;
     va_start(args, format);
-    gchar* value = g_strdup_vprintf(format, args);
+    char* value = g_strdup_vprintf(format, args);
     CssDeclaration* css = webkit_dom_element_get_style(element);
     if (css) {
         webkit_dom_css_style_declaration_set_css_text(css, value, NULL);
@@ -52,7 +52,7 @@ void dom_element_set_style(Element* element, const gchar* format, ...)
     g_free(value);
 }
 
-void dom_element_style_set_property(Element* element, const gchar* property, const gchar* style)
+void dom_element_style_set_property(Element* element, const char* property, const char* style)
 {
     CssDeclaration* css = webkit_dom_element_get_style(element);
     if (css) {
@@ -92,7 +92,7 @@ DomBoundingRect dom_elemen_get_bounding_rect(Element* element)
     return rect;
 }
 
-void dom_dispatch_mouse_event(Document* doc, Element* element, gchar* type, gushort button)
+void dom_dispatch_mouse_event(Document* doc, Element* element, char* type, gushort button)
 {
     Event* event = webkit_dom_document_create_event(doc, "MouseEvents", NULL);
     webkit_dom_mouse_event_init_mouse_event(
@@ -120,11 +120,11 @@ gboolean dom_is_editable(Element* element)
         return FALSE;
     }
 
-    gchar* tagname = webkit_dom_element_get_tag_name(element);
+    char* tagname = webkit_dom_element_get_tag_name(element);
     if (!g_ascii_strcasecmp(tagname, "textarea")) {
         return TRUE;
     }
-    gchar *type = webkit_dom_element_get_attribute(element, "type");
+    char *type = webkit_dom_element_get_attribute(element, "type");
     if (!g_ascii_strcasecmp(tagname, "input")
         || !g_ascii_strcasecmp(type, "text")
         || !g_ascii_strcasecmp(type, "password")
@@ -137,9 +137,9 @@ gboolean dom_is_editable(Element* element)
 /**
  * Retrieves the src or href attribute of the given element.
  */
-gchar* dom_element_get_source(Element* elem)
+char* dom_element_get_source(Element* elem)
 {
-    gchar* url = NULL;
+    char* url = NULL;
 
     url = webkit_dom_html_anchor_element_get_href(WEBKIT_DOM_HTML_ANCHOR_ELEMENT(elem));
     if (!url) {
@@ -174,7 +174,7 @@ static Element* dom_get_active_element(Document* doc)
 {
     Document* d     = NULL;
     Element* active = webkit_dom_html_document_get_active_element((void*)doc);
-    gchar* tagname  = webkit_dom_element_get_tag_name(active);
+    char* tagname  = webkit_dom_element_get_tag_name(active);
 
     if (!g_strcmp0(tagname, "FRAME")) {
         d = webkit_dom_html_frame_element_get_content_document(WEBKIT_DOM_HTML_FRAME_ELEMENT(active));
index e2b82bb..e08f462 100644 (file)
--- a/src/dom.h
+++ b/src/dom.h
@@ -49,12 +49,12 @@ typedef struct {
 } DomBoundingRect;
 
 void dom_check_auto_insert(void);
-void dom_element_set_style(Element* element, const gchar* format, ...);
-void dom_element_style_set_property(Element* element, const gchar* property, const gchar* style);
+void dom_element_set_style(Element* element, const char* format, ...);
+void dom_element_style_set_property(Element* element, const char* property, const char* style);
 gboolean dom_element_is_visible(Window* win, Element* element);
 DomBoundingRect dom_elemen_get_bounding_rect(Element* element);
-void dom_dispatch_mouse_event(Document* doc, Element* element, gchar* type, gushort button);
+void dom_dispatch_mouse_event(Document* doc, Element* element, char* type, gushort button);
 gboolean dom_is_editable(Element* element);
-gchar* dom_element_get_source(Element* elem);
+char* dom_element_get_source(Element* elem);
 
 #endif /* end of include guard: _DOM_H */
index 112bef6..704ec19 100644 (file)
 typedef struct {
     gulong num;
     Element*  elem;                 /* hinted element */
-    gchar*    elemColor;            /* element color */
-    gchar*    elemBackgroundColor;  /* element background color */
+    char*    elemColor;            /* element color */
+    char*    elemBackgroundColor;  /* element background color */
     Element*  hint;                 /* numbered hint element */
     Element*  container;
 } Hint;
 
 static Element* hints_get_hint_container(Document* doc);
-static void hints_create_for_window(const gchar* input, Window* win, gulong hintCount);
+static void hints_create_for_window(const char* input, Window* win, gulong hintCount);
 static void hints_focus(const gulong num);
 static void hints_fire(const gulong num);
 static void hints_click_fired_hint(guint mode, Element* elem);
-static void hints_process_fired_hint(guint mode, const gchar* uri);
+static void hints_process_fired_hint(guint mode, const char* uri);
 static Hint* hints_get_hint_by_number(const gulong num);
 static GList* hints_get_hint_list_by_number(const gulong num);
-static gchar* hints_get_xpath(const gchar* input);
+static char* hints_get_xpath(const char* input);
 static void hints_observe_input(gboolean observe);
 static gboolean hints_changed_callback(GtkEditable *entry, gpointer data);
 static gboolean hints_keypress_callback(WebKitWebView* webview, GdkEventKey* event);
@@ -96,7 +96,7 @@ void hints_clear(void)
     g_signal_emit_by_name(vp.gui.webview, "hovering-over-link", NULL, NULL);
 }
 
-void hints_create(const gchar* input, guint mode, const guint prefixLength)
+void hints_create(const char* input, guint mode, const guint prefixLength)
 {
     Hints* hints = &vp.hints;
     Document* doc;
@@ -200,7 +200,7 @@ static Element* hints_get_hint_container(Document* doc)
     return container;
 }
 
-static void hints_create_for_window(const gchar* input, Window* win, gulong hintCount)
+static void hints_create_for_window(const char* input, Window* win, gulong hintCount)
 {
     Hints* hints       = &vp.hints;
     Element* container = NULL;
@@ -220,7 +220,7 @@ static void hints_create_for_window(const gchar* input, Window* win, gulong hint
         return;
     }
 
-    gchar* xpath = hints_get_xpath(input);
+    char* xpath = hints_get_xpath(input);
     WebKitDOMXPathResult* result = webkit_dom_document_evaluate(
         doc, xpath, WEBKIT_DOM_NODE(doc), ns_resolver, 7, NULL, NULL
     );
@@ -275,7 +275,7 @@ static void hints_create_for_window(const gchar* input, Window* win, gulong hint
         gulong top  = rect.top - 3;
         dom_element_set_style(hint, HINT_STYLE, left, top, vp.style.hint_style);
 
-        gchar* num = g_strdup_printf("%li", newHint->num);
+        char* num = g_strdup_printf("%li", newHint->num);
         webkit_dom_html_element_set_inner_text(WEBKIT_DOM_HTML_ELEMENT(hint), num, NULL);
         webkit_dom_html_element_set_class_name(WEBKIT_DOM_HTML_ELEMENT(hint), HINT_CLASS);
         g_free(num);
@@ -325,7 +325,7 @@ static void hints_focus(const gulong num)
         dom_dispatch_mouse_event(doc, hint->elem, "mouseover", 0);
         webkit_dom_element_blur(hint->elem);
 
-        const gchar* tag = webkit_dom_element_get_tag_name(hint->elem);
+        const char* tag = webkit_dom_element_get_tag_name(hint->elem);
         if (!g_ascii_strcasecmp(tag, "a")) {
             /* simulate the hovering over the hinted element this is done to show
              * the hinted elements url in the url bar */
@@ -372,7 +372,7 @@ static void hints_fire(const gulong num)
  */
 static void hints_click_fired_hint(guint mode, Element* elem)
 {
-    gchar* target = webkit_dom_element_get_attribute(elem, "target");
+    char* target = webkit_dom_element_get_attribute(elem, "target");
     if (mode & HINTS_TARGET_BLANK) {                /* open in new window */
         webkit_dom_element_set_attribute(elem, "target", "_blank", NULL);
     } else if (g_strcmp0(target, "_blank") == 0) {  /* remove possible target attribute */
@@ -394,7 +394,7 @@ static void hints_click_fired_hint(guint mode, Element* elem)
 /**
  * Handle fired hints that are not opened via simulated mouse click.
  */
-static void hints_process_fired_hint(guint mode, const gchar* uri)
+static void hints_process_fired_hint(guint mode, const char* uri)
 {
     HintsProcess type = HINTS_GET_PROCESSING(mode);
     Arg a = {0};
@@ -448,9 +448,9 @@ static GList* hints_get_hint_list_by_number(const gulong num)
  *
  * The returned string have to be freed.
  */
-static gchar* hints_get_xpath(const gchar* input)
+static char* hints_get_xpath(const char* input)
 {
-    gchar* xpath = NULL;
+    char* xpath = NULL;
 
     switch (HINTS_GET_TYPE(vp.hints.mode)) {
         case HINTS_TYPE_LINK:
@@ -512,7 +512,7 @@ static void hints_observe_input(gboolean observe)
 
 static gboolean hints_changed_callback(GtkEditable *entry, gpointer data)
 {
-    const gchar* text = GET_TEXT();
+    const char* text = GET_TEXT();
 
     /* skip hinting prefixes like '.', ',', ';y' ... */
     hints_create(text + vp.hints.prefixLength, vp.hints.mode, vp.hints.prefixLength);
@@ -523,7 +523,7 @@ static gboolean hints_changed_callback(GtkEditable *entry, gpointer data)
 static gboolean hints_keypress_callback(WebKitWebView* webview, GdkEventKey* event)
 {
     Hints* hints = &vp.hints;
-    gint numval;
+    int numval;
     guint keyval = event->keyval;
     guint state  = CLEAN_STATE_WITH_SHIFT(event);
 
index a55e291..9264765 100644 (file)
@@ -55,7 +55,7 @@ typedef enum {
 } HintsProcess;
 
 void hints_init(void);
-void hints_create(const gchar* input, guint mode, const guint prefixLength);
+void hints_create(const char* input, guint mode, const guint prefixLength);
 void hints_update(const gulong num);
 void hints_clear(void);
 void hints_focus_next(const gboolean back);
index 90d077b..c4fa3c7 100644 (file)
@@ -24,9 +24,9 @@
 
 static void keybind_rebuild_modkeys(void);
 static GSList* keybind_find(int mode, guint modkey, guint modmask, guint keyval);
-static void keybind_str_to_keybind(gchar* str, Keybind* key);
-static guint keybind_str_to_modmask(const gchar* str);
-static guint keybind_str_to_value(const gchar* str);
+static void keybind_str_to_keybind(char* str, Keybind* key);
+static guint keybind_str_to_modmask(const char* str);
+static guint keybind_str_to_value(const char* str);
 static gboolean keybind_keypress_callback(WebKitWebView* webview, GdkEventKey* event);
 
 
@@ -46,14 +46,14 @@ void keybind_cleanup(void)
     }
 }
 
-gboolean keybind_add_from_string(gchar* keys, const gchar* command, const Mode mode)
+gboolean keybind_add_from_string(char* keys, const char* command, const Mode mode)
 {
     if (keys == NULL || *keys == '\0') {
         return FALSE;
     }
 
     /* split the input string into command and parameter part */
-    gchar** token = g_strsplit(command, " ", 2);
+    char** token = g_strsplit(command, " ", 2);
     if (!token[0] || !command_exists(token[0])) {
         g_strfreev(token);
         return FALSE;
@@ -78,7 +78,7 @@ gboolean keybind_add_from_string(gchar* keys, const gchar* command, const Mode m
     return TRUE;
 }
 
-gboolean keybind_remove_from_string(gchar* str, const Mode mode)
+gboolean keybind_remove_from_string(char* str, const Mode mode)
 {
     Keybind keybind = {.mode = mode};
 
@@ -145,9 +145,9 @@ static GSList* keybind_find(int mode, guint modkey, guint modmask, guint keyval)
 /**
  * Configures the given keybind by also given string.
  */
-static void keybind_str_to_keybind(gchar* str, Keybind* keybind)
+static void keybind_str_to_keybind(char* str, Keybind* keybind)
 {
-    gchar** string = NULL;
+    char** string = NULL;
     guint len = 0;
 
     g_strstrip(str);
@@ -200,7 +200,7 @@ static void keybind_str_to_keybind(gchar* str, Keybind* keybind)
     }
 }
 
-static guint keybind_str_to_modmask(const gchar* str)
+static guint keybind_str_to_modmask(const char* str)
 {
     if (g_ascii_strcasecmp(str, "ctrl") == 0) {
         return GDK_CONTROL_MASK;
@@ -212,7 +212,7 @@ static guint keybind_str_to_modmask(const gchar* str)
     return 0;
 }
 
-static guint keybind_str_to_value(const gchar* str)
+static guint keybind_str_to_value(const char* str)
 {
     if (g_ascii_strcasecmp(str, "tab") == 0) {
         return GDK_Tab;
@@ -244,7 +244,7 @@ static gboolean keybind_keypress_callback(WebKitWebView* webview, GdkEventKey* e
             return TRUE;
         }
         if (strchr(vp.behave.modkeys->str, keyval) && vp.state.modkey != keyval) {
-            vp.state.modkey = (gchar)keyval;
+            vp.state.modkey = (char)keyval;
             vp_update_statusbar();
 
             return TRUE;
index 79ba6aa..84c2b0c 100644 (file)
@@ -28,13 +28,13 @@ typedef struct {
     guint  modkey;
     guint  modmask;     /* modemask for the kayval */
     guint  keyval;
-    gchar* command;     /* command to run */
-    gchar* param;
+    char* command;     /* command to run */
+    char* param;
 } Keybind;
 
 void keybind_init(void);
 void keybind_cleanup(void);
-gboolean keybind_add_from_string(gchar* keys, const gchar* command, const Mode mode);
-gboolean keybind_remove_from_string(gchar* str, const Mode mode);
+gboolean keybind_add_from_string(char* keys, const char* command, const Mode mode);
+gboolean keybind_remove_from_string(char* str, const Mode mode);
 
 #endif /* end of include guard: _KEYBIND_H */
index 81cb675..8b91bce 100644 (file)
@@ -29,7 +29,7 @@
 #include "searchengine.h"
 
 /* variables */
-static gchar **args;
+static char **args;
 VpCore vp;
 
 /* callbacks */
@@ -51,10 +51,10 @@ static gboolean vp_new_window_policy_cb(
     WebKitWebNavigationAction* navig, WebKitWebPolicyDecision* policy, gpointer data);
 static WebKitWebView* vp_create_new_webview_cb(WebKitWebView* webview, WebKitWebFrame* frame, gpointer data);
 static void vp_create_new_webview_uri_cb(WebKitWebView* view, GParamSpec param_spec);
-static void vp_hover_link_cb(WebKitWebView* webview, const gchar* title, const char* link, gpointer data);
-static void vp_title_changed_cb(WebKitWebView* webview, WebKitWebFrame* frame, const gchar* title, gpointer data);
+static void vp_hover_link_cb(WebKitWebView* webview, const char* title, const char* link, gpointer data);
+static void vp_title_changed_cb(WebKitWebView* webview, WebKitWebFrame* frame, const char* title, gpointer data);
 static gboolean vp_mimetype_decision_cb(WebKitWebView* webview,
-    WebKitWebFrame* frame, WebKitNetworkRequest* request, gchar*
+    WebKitWebFrame* frame, WebKitNetworkRequest* request, char*
     mime_type, WebKitWebPolicyDecision* decision, gpointer data);
 static gboolean vp_download_requested_cb(WebKitWebView* view, WebKitDownload* download, gpointer data);
 static void vp_download_progress_cp(WebKitDownload* download, GParamSpec* pspec);
@@ -72,7 +72,7 @@ static void vp_init_files(void);
 static void vp_setup_signals(void);
 static void vp_setup_settings(void);
 static void vp_set_cookie(SoupCookie* cookie);
-static const gchar* vp_get_cookies(SoupURI *uri);
+static const char* vp_get_cookies(SoupURI *uri);
 static gboolean vp_hide_message(void);
 static void vp_set_status(const StatusType status);
 
@@ -152,7 +152,7 @@ static void vp_destroy_window_cb(GtkWidget* widget, GtkWidget* window, gpointer
 static void vp_inputbox_activate_cb(GtkEntry *entry, gpointer user_data)
 {
     gboolean success = FALSE;
-    const gchar *text;
+    const char *text;
     guint16 length = gtk_entry_get_text_length(entry);
     Gui* gui = &vp.gui;
 
@@ -206,7 +206,7 @@ static void vp_new_request_cb(SoupSession* session, SoupMessage *message, gpoint
 {
     SoupMessageHeaders* header = message->request_headers;
     SoupURI* uri;
-    const gchar* cookie;
+    const char* cookie;
 
     soup_message_headers_remove(header, "Cookie");
     uri = soup_message_get_uri(message);
@@ -235,7 +235,7 @@ static WebKitWebView* vp_inspector_new(WebKitWebInspector* inspector, WebKitWebV
 static gboolean vp_inspector_show(WebKitWebInspector* inspector)
 {
     WebKitWebView* webview;
-    gint height;
+    int height;
 
     if (vp.state.is_inspecting) {
         return FALSE;
@@ -283,9 +283,9 @@ static void vp_inspector_finished(WebKitWebInspector* inspector)
 static gboolean vp_process_input(const char* input)
 {
     gboolean success;
-    gchar* line = NULL;
-    gchar* command = NULL;
-    gchar** token;
+    char* line = NULL;
+    char* command = NULL;
+    char** token;
 
     if (!input || !strlen(input)) {
         return FALSE;
@@ -327,12 +327,12 @@ gboolean vp_load_uri(const Arg* arg)
 
     uri = g_strrstr(line, "://") ? g_strdup(line) : g_strdup_printf("http://%s", line);
     if (arg->i == VP_TARGET_NEW) {
-        gchar *argv[64];
+        char *argv[64];
 
         argv[0] = *args;
         if (vp.state.embed) {
-            gchar tmp[64];
-            snprintf(tmp, LENGTH(tmp), "%u", (gint)vp.state.embed);
+            char tmp[64];
+            snprintf(tmp, LENGTH(tmp), "%u", (int)vp.state.embed);
             argv[1] = "-e";
             argv[2] = tmp;
             argv[3] = uri;
@@ -371,9 +371,9 @@ static void vp_set_cookie(SoupCookie* cookie)
     g_object_unref(jar);
 }
 
-static const gchar* vp_get_cookies(SoupURI *uri)
+static const char* vp_get_cookies(SoupURI *uri)
 {
-    const gchar* cookie;
+    const char* cookie;
 
     SoupCookieJar* jar = soup_cookie_jar_text_new(vp.files[FILES_COOKIE], TRUE);
     cookie = soup_cookie_jar_get_cookies(jar, uri, TRUE);
@@ -385,7 +385,7 @@ static const gchar* vp_get_cookies(SoupURI *uri)
 
 void vp_clean_up(void)
 {
-    const gchar* uri = CURRENT_URL();
+    const char* uri = CURRENT_URL();
     /* write last URL into file for recreation */
     if (uri) {
         g_file_set_contents(vp.files[FILES_CLOSED], uri, -1, NULL);
@@ -501,7 +501,7 @@ gboolean vp_set_mode(Mode mode, gboolean clean)
     return TRUE;
 }
 
-void vp_update_urlbar(const gchar* uri)
+void vp_update_urlbar(const char* uri)
 {
     gtk_label_set_text(GTK_LABEL(vp.gui.statusbar.left), uri);
 }
@@ -519,7 +519,7 @@ void vp_update_statusbar(void)
 
     /* show the active downloads */
     if (vp.net.downloads) {
-        gint num = g_list_length(vp.net.downloads);
+        int num = g_list_length(vp.net.downloads);
         g_string_append_printf(status, " %d %s", num, num == 1 ? "download" : "downloads");
     }
 
@@ -529,8 +529,8 @@ void vp_update_statusbar(void)
     }
 
     /* show the scroll status */
-    gint max = gtk_adjustment_get_upper(vp.gui.adjust_v) - gtk_adjustment_get_page_size(vp.gui.adjust_v);
-    gint val = (int)(gtk_adjustment_get_value(vp.gui.adjust_v) / max * 100);
+    int max = gtk_adjustment_get_upper(vp.gui.adjust_v) - gtk_adjustment_get_page_size(vp.gui.adjust_v);
+    int val = (int)(gtk_adjustment_get_value(vp.gui.adjust_v) / max * 100);
 
     if (max == 0) {
         g_string_append(status, " All");
@@ -623,12 +623,12 @@ static void vp_read_config(void)
     }
 
     /* read config from config files */
-    gchar **lines = util_get_lines(vp.files[FILES_CONFIG]);
-    gchar *line;
+    char **lines = util_get_lines(vp.files[FILES_CONFIG]);
+    char *line;
 
     if (lines) {
-        gint length = g_strv_length(lines) - 1;
-        for (gint i = 0; i < length; i++) {
+        int length = g_strv_length(lines) - 1;
+        for (int i = 0; i < length; i++) {
             line = lines[i];
             g_strstrip(line);
 
@@ -723,7 +723,7 @@ static void vp_init_gui(void)
 
 static void vp_init_files(void)
 {
-    gchar* path = util_get_config_dir();
+    char* path = util_get_config_dir();
 
     vp.files[FILES_CONFIG] = g_build_filename(path, "config", NULL);
     util_create_file_if_not_exists(vp.files[FILES_CONFIG]);
@@ -829,7 +829,7 @@ static gboolean vp_new_window_policy_cb(
 {
     if (webkit_web_navigation_action_get_reason(navig) == WEBKIT_WEB_NAVIGATION_REASON_LINK_CLICKED) {
         /* open in a new window */
-        Arg a = {VP_TARGET_NEW, (gchar*)webkit_network_request_get_uri(request)};
+        Arg a = {VP_TARGET_NEW, (char*)webkit_network_request_get_uri(request)};
         vp_load_uri(&a);
         webkit_web_policy_decision_ignore(policy);
         return TRUE;
@@ -849,7 +849,7 @@ static WebKitWebView* vp_create_new_webview_cb(WebKitWebView* webview, WebKitWeb
 
 static void vp_create_new_webview_uri_cb(WebKitWebView* view, GParamSpec param_spec)
 {
-    Arg a = {VP_TARGET_NEW, (gchar*)webkit_web_view_get_uri(view)};
+    Arg a = {VP_TARGET_NEW, (char*)webkit_web_view_get_uri(view)};
     /* clean up */
     webkit_web_view_stop_loading(view);
     gtk_widget_destroy(GTK_WIDGET(view));
@@ -857,10 +857,10 @@ static void vp_create_new_webview_uri_cb(WebKitWebView* view, GParamSpec param_s
     vp_load_uri(&a);
 }
 
-static void vp_hover_link_cb(WebKitWebView* webview, const gchar* title, const char* link, gpointer data)
+static void vp_hover_link_cb(WebKitWebView* webview, const char* title, const char* link, gpointer data)
 {
     if (link) {
-        gchar* message = g_strdup_printf("Link: %s", link);
+        char* message = g_strdup_printf("Link: %s", link);
         gtk_label_set_text(GTK_LABEL(vp.gui.statusbar.left), message);
         g_free(message);
     } else {
@@ -868,13 +868,13 @@ static void vp_hover_link_cb(WebKitWebView* webview, const gchar* title, const c
     }
 }
 
-static void vp_title_changed_cb(WebKitWebView* webview, WebKitWebFrame* frame, const gchar* title, gpointer data)
+static void vp_title_changed_cb(WebKitWebView* webview, WebKitWebFrame* frame, const char* title, gpointer data)
 {
     gtk_window_set_title(GTK_WINDOW(vp.gui.window), title);
 }
 
 static gboolean vp_mimetype_decision_cb(WebKitWebView* webview,
-    WebKitWebFrame* frame, WebKitNetworkRequest* request, gchar*
+    WebKitWebFrame* frame, WebKitNetworkRequest* request, char*
     mime_type, WebKitWebPolicyDecision* decision, gpointer data)
 {
     if (webkit_web_view_can_show_mime_type(webview, mime_type) == FALSE) {
@@ -888,9 +888,9 @@ static gboolean vp_mimetype_decision_cb(WebKitWebView* webview,
 static gboolean vp_download_requested_cb(WebKitWebView* view, WebKitDownload* download, gpointer data)
 {
     WebKitDownloadStatus status;
-    gchar* uri = NULL;
+    char* uri = NULL;
 
-    const gchar* filename = webkit_download_get_suggested_filename(download);
+    const char* filename = webkit_download_get_suggested_filename(download);
     if (!filename) {
         filename = "vimp_donwload";
     }
@@ -931,7 +931,7 @@ static void vp_request_start_cb(WebKitWebView* webview, WebKitWebFrame* frame,
     WebKitWebResource* resource, WebKitNetworkRequest* request,
     WebKitNetworkResponse* response, gpointer data)
 {
-    const gchar* uri = webkit_network_request_get_uri(request);
+    const char* uri = webkit_network_request_get_uri(request);
     if (g_str_has_suffix(uri, "/favicon.ico")) {
         webkit_network_request_set_uri(request, "about:blank");
     }
@@ -945,7 +945,7 @@ static void vp_download_progress_cp(WebKitDownload* download, GParamSpec* pspec)
         return;
     }
 
-    gchar* file = g_path_get_basename(webkit_download_get_destination_uri(download));
+    char* file = g_path_get_basename(webkit_download_get_destination_uri(download));
     if (status != WEBKIT_DOWNLOAD_STATUS_FINISHED) {
         vp_echo(VP_MSG_ERROR, FALSE, "Error downloading %s", file);
     } else {
@@ -962,7 +962,7 @@ static void vp_download_progress_cp(WebKitDownload* download, GParamSpec* pspec)
 
 int main(int argc, char* argv[])
 {
-    static gchar* winid = NULL;
+    static char* winid = NULL;
     static gboolean ver = false;
     static GError* err;
     static GOptionEntry opts[] = {
index 7a2298f..020f956 100644 (file)
@@ -182,8 +182,8 @@ enum {
 
 /* structs */
 typedef struct {
-    gint     i;
-    gchar*   s;
+    int     i;
+    char*   s;
 } Arg;
 
 /* statusbar */
@@ -214,7 +214,7 @@ typedef struct {
 /* state */
 typedef struct {
     Mode            mode;
-    gchar           modkey;
+    char           modkey;
     guint           count;
 #ifdef HAS_GTK3
     Window          embed;
@@ -225,7 +225,7 @@ typedef struct {
     StatusType      status;
     gboolean        is_inspecting;
     SearchDirection search_dir;
-    gchar*          search_query;
+    char*          search_query;
 } State;
 
 /* behaviour */
@@ -243,16 +243,16 @@ typedef struct {
 
 typedef struct {
     time_t cookie_timeout;
-    gint   scrollstep;
+    int   scrollstep;
     guint  max_completion_items;
-    gchar* home_page;
-    gchar* download_dir;
+    char* home_page;
+    char* download_dir;
 } Config;
 
 typedef struct {
     GList* completions;
     GList* active;
-    gint   count;
+    int   count;
 } Completions;
 
 typedef struct {
@@ -264,10 +264,10 @@ typedef struct {
     VpColor               comp_bg[VP_COMP_LAST];
     PangoFontDescription* comp_font[VP_COMP_LAST];
     /* hint style */
-    gchar*                hint_bg;
-    gchar*                hint_bg_focus;
-    gchar*                hint_fg;
-    gchar*                hint_style;
+    char*                hint_bg;
+    char*                hint_bg_focus;
+    char*                hint_fg;
+    char*                hint_style;
     /* status bar */
     VpColor               status_bg[VP_STATUS_LAST];
     VpColor               status_fg[VP_STATUS_LAST];
@@ -287,7 +287,7 @@ typedef struct {
     Gui           gui;
     State         state;
     Behaviour     behave;
-    gchar*        files[FILES_LAST];
+    char*        files[FILES_LAST];
     Network       net;
     Config        config;
     Completions   comps;
@@ -301,7 +301,7 @@ extern VpCore vp;
 
 /* functions */
 void vp_update_statusbar(void);
-void vp_update_urlbar(const gchar* uri);
+void vp_update_urlbar(const char* uri);
 void vp_update_status_style(void);
 void vp_echo(const MessageType type, gboolean hide, const char *error, ...);
 gboolean vp_set_mode(Mode mode, gboolean clean);
index f05748f..a0d73f8 100644 (file)
@@ -20,8 +20,8 @@
 #include "main.h"
 #include "searchengine.h"
 
-static GSList* searchengine_find(const gchar* handle);
-static gboolean searchengine_is_valid_uri(const gchar* uri);
+static GSList* searchengine_find(const char* handle);
+static gboolean searchengine_is_valid_uri(const char* uri);
 
 
 void searchengine_cleanup(void)
@@ -31,7 +31,7 @@ void searchengine_cleanup(void)
     }
 }
 
-gboolean searchengine_add(const gchar* handle, const gchar* uri)
+gboolean searchengine_add(const char* handle, const char* uri)
 {
     /* validate if the uri contains only one %s sequence */
     if (!searchengine_is_valid_uri(uri)) {
@@ -47,7 +47,7 @@ gboolean searchengine_add(const gchar* handle, const gchar* uri)
     return TRUE;
 }
 
-gboolean searchengine_remove(const gchar* handle)
+gboolean searchengine_remove(const char* handle)
 {
     GSList* list = searchengine_find(handle);
 
@@ -64,7 +64,7 @@ gboolean searchengine_remove(const gchar* handle)
     return FALSE;
 }
 
-gchar* searchengine_get_uri(const gchar* handle)
+char* searchengine_get_uri(const char* handle)
 {
     GSList* list = searchengine_find(handle);
 
@@ -75,7 +75,7 @@ gchar* searchengine_get_uri(const gchar* handle)
     return NULL;
 }
 
-static GSList* searchengine_find(const gchar* handle)
+static GSList* searchengine_find(const char* handle)
 {
     GSList* s;
     for (s = vp.behave.searchengines; s != NULL; s = s->next) {
@@ -87,9 +87,9 @@ static GSList* searchengine_find(const gchar* handle)
     return NULL;
 }
 
-static gboolean searchengine_is_valid_uri(const gchar* uri)
+static gboolean searchengine_is_valid_uri(const char* uri)
 {
-    gint count = 0;
+    int count = 0;
 
     for (; *uri; uri++) {
         if (*uri == '%') {
index 80df294..c50b4be 100644 (file)
 #define _SEARCHENGINE_H
 
 typedef struct {
-    gchar* handle;
-    gchar* uri;
+    char* handle;
+    char* uri;
 } Searchengine;
 
 void searchengine_cleanup(void);
-gboolean searchengine_add(const gchar* handle, const gchar* uri);
-gboolean searchengine_remove(const gchar* handle);
-gchar* searchengine_get_uri(const gchar* handle);
+gboolean searchengine_add(const char* handle, const char* uri);
+gboolean searchengine_remove(const char* handle);
+char* searchengine_get_uri(const char* handle);
 
 #endif /* end of include guard: _SEARCHENGINE_H */
index 59c6206..ef7ab13 100644 (file)
@@ -20,7 +20,7 @@
 #include "setting.h"
 #include "util.h"
 
-static Arg* setting_char_to_arg(const gchar* str, const Type type);
+static Arg* setting_char_to_arg(const char* str, const Type type);
 static void setting_print_value(const Setting* s, void* value);
 static gboolean setting_webkit(const Setting* s, const gboolean get);
 static gboolean setting_cookie_timeout(const Setting* s, const gboolean get);
@@ -144,14 +144,14 @@ void setting_cleanup(void)
     }
 }
 
-gboolean setting_run(gchar* name, const gchar* param)
+gboolean setting_run(char* name, const char* param)
 {
     Arg* a          = NULL;
     gboolean result = FALSE;
     gboolean get    = FALSE;
 
     /* check if we should display current value */
-    gint len = strlen(name);
+    int len = strlen(name);
     if (name[len - 1] == '?') {
         /* remove the last ? char from setting name */
         name[len - 1] = '\0';
@@ -196,7 +196,7 @@ gboolean setting_run(gchar* name, const gchar* param)
 /**
  * Converts string representing also given data type into and Arg.
  */
-static Arg* setting_char_to_arg(const gchar* str, const Type type)
+static Arg* setting_char_to_arg(const char* str, const Type type)
 {
     if (!str) {
         return NULL;
@@ -210,11 +210,11 @@ static Arg* setting_char_to_arg(const gchar* str, const Type type)
             break;
 
         case TYPE_INTEGER:
-            arg->i = g_ascii_strtoull(str, (gchar**)NULL, 10);
+            arg->i = g_ascii_strtoull(str, (char**)NULL, 10);
             break;
 
         case TYPE_FLOAT:
-            arg->i = (1000000 * g_ascii_strtod(str, (gchar**)NULL));
+            arg->i = (1000000 * g_ascii_strtod(str, (char**)NULL));
             break;
 
         case TYPE_CHAR:
@@ -232,8 +232,8 @@ static Arg* setting_char_to_arg(const gchar* str, const Type type)
  */
 static void setting_print_value(const Setting* s, void* value)
 {
-    const gchar* name = s->alias ? s->alias : s->name;
-    gchar* string = NULL;
+    const char* name = s->alias ? s->alias : s->name;
+    char* string = NULL;
 
     switch (s->type) {
         case TYPE_BOOLEAN:
@@ -241,7 +241,7 @@ static void setting_print_value(const Setting* s, void* value)
             break;
 
         case TYPE_INTEGER:
-            vp_echo(VP_MSG_NORMAL, FALSE, "  %s=%d", name, *(gint*)value);
+            vp_echo(VP_MSG_NORMAL, FALSE, "  %s=%d", name, *(int*)value);
             break;
 
         case TYPE_FLOAT:
@@ -249,7 +249,7 @@ static void setting_print_value(const Setting* s, void* value)
             break;
 
         case TYPE_CHAR:
-            vp_echo(VP_MSG_NORMAL, FALSE, "  %s=%s", name, (gchar*)value);
+            vp_echo(VP_MSG_NORMAL, FALSE, "  %s=%s", name, (char*)value);
             break;
 
         case TYPE_COLOR:
@@ -283,7 +283,7 @@ static gboolean setting_webkit(const Setting* s, const gboolean get)
 
         case TYPE_INTEGER:
             if (get) {
-                gint value;
+                int value;
                 g_object_get(G_OBJECT(web_setting), s->name, &value, NULL);
                 setting_print_value(s, &value);
             } else {
@@ -305,7 +305,7 @@ static gboolean setting_webkit(const Setting* s, const gboolean get)
         case TYPE_COLOR:
         case TYPE_FONT:
             if (get) {
-                gchar* value = NULL;
+                char* value = NULL;
                 g_object_get(G_OBJECT(web_setting), s->name, value, NULL);
                 setting_print_value(s, value);
             } else {
@@ -536,7 +536,7 @@ static gboolean setting_strict_ssl(const Setting* s, const gboolean get)
 static gboolean setting_ca_bundle(const Setting* s, const gboolean get)
 {
     if (get) {
-        gchar* value = NULL;
+        char* value = NULL;
         g_object_get(vp.net.soup_session, "ssl-ca-file", &value, NULL);
         setting_print_value(s, value);
         g_free(value);
@@ -588,9 +588,9 @@ static gboolean setting_proxy(const Setting* s, const gboolean get)
         gboolean value = (proxy_uri != NULL);
         setting_print_value(s, &value);
     } else if (s->arg.i) {
-        gchar* proxy = (gchar *)g_getenv("http_proxy");
+        char* proxy = (char *)g_getenv("http_proxy");
         if (proxy != NULL && strlen(proxy)) {
-            gchar* proxy_new = g_strrstr(proxy, "http://")
+            char* proxy_new = g_strrstr(proxy, "http://")
                 ? g_strdup(proxy)
                 : g_strdup_printf("http://%s", proxy);
             proxy_uri = soup_uri_new(proxy_new);
index 635a2ef..42834d6 100644 (file)
@@ -26,8 +26,8 @@ typedef struct _Setting Setting;
 typedef gboolean (*SettingFunc)(const Setting*, const gboolean get);
 
 struct _Setting {
-    gchar*      alias;
-    gchar*      name;
+    char*      alias;
+    char*      name;
     Type        type;
     SettingFunc func;
     Arg         arg;
@@ -35,6 +35,6 @@ struct _Setting {
 
 void setting_init(void);
 void setting_cleanup(void);
-gboolean setting_run(gchar* name, const gchar* param);
+gboolean setting_run(char* name, const char* param);
 
 #endif /* end of include guard: _SETTING_H */
index dbc8fd5..748ea9d 100644 (file)
 #include "util.h"
 #include <stdio.h>
 
-gchar* util_get_config_dir(void)
+char* util_get_config_dir(void)
 {
-    gchar *path = g_build_filename(g_get_user_config_dir(), "vimp", NULL);
+    char *path = g_build_filename(g_get_user_config_dir(), "vimp", NULL);
     util_create_dir_if_not_exists(path);
 
     return path;
 }
 
-gchar* util_get_cache_dir(void)
+char* util_get_cache_dir(void)
 {
-    gchar *path = g_build_filename(g_get_user_cache_dir(), "vimp", NULL);
+    char *path = g_build_filename(g_get_user_cache_dir(), "vimp", NULL);
     util_create_dir_if_not_exists(path);
 
     return path;
 }
 
-const gchar* util_get_home_dir(void)
+const char* util_get_home_dir(void)
 {
-    const gchar* dir = g_getenv("HOME");
+    const char* dir = g_getenv("HOME");
 
     if (!dir) {
         dir = g_get_home_dir();
@@ -47,7 +47,7 @@ const gchar* util_get_home_dir(void)
     return dir;
 }
 
-void util_create_dir_if_not_exists(const gchar* dirpath)
+void util_create_dir_if_not_exists(const char* dirpath)
 {
     if (!g_file_test(dirpath, G_FILE_TEST_IS_DIR)) {
         g_mkdir_with_parents(dirpath, 0755);
@@ -67,10 +67,10 @@ void util_create_file_if_not_exists(const char* filename)
  *
  * The memory of returned string have to be freed!
  */
-gchar* util_get_file_contents(const gchar* filename, gsize* length)
+char* util_get_file_contents(const char* filename, gsize* length)
 {
     GError* error  = NULL;
-    gchar* content = NULL;
+    char* content = NULL;
     if (!(g_file_test(filename, G_FILE_TEST_IS_REGULAR)
         && g_file_get_contents(filename, &content, length, &error))
     ) {
@@ -85,10 +85,10 @@ gchar* util_get_file_contents(const gchar* filename, gsize* length)
  *
  * The result have to be freed by g_strfreev().
  */
-gchar** util_get_lines(const gchar* filename)
+char** util_get_lines(const char* filename)
 {
-    gchar* content = util_get_file_contents(filename, NULL);
-    gchar** lines  = NULL;
+    char* content = util_get_file_contents(filename, NULL);
+    char** lines  = NULL;
     if (content) {
         /* split the file content into lines */
         lines = g_strsplit(content, "\n", -1);
index fe7577a..ba77d53 100644 (file)
 
 #include "main.h"
 
-gchar* util_get_config_dir(void);
-gchar* util_get_cache_dir(void);
-const gchar* util_get_home_dir(void);
-void util_create_dir_if_not_exists(const gchar* dirpath);
-void util_create_file_if_not_exists(const gchar* filename);
-gchar* util_get_file_contents(const gchar* filename, gsize* length);
-gchar** util_get_lines(const gchar* filename);
+char* util_get_config_dir(void);
+char* util_get_cache_dir(void);
+const char* util_get_home_dir(void);
+void util_create_dir_if_not_exists(const char* dirpath);
+void util_create_file_if_not_exists(const char* filename);
+char* util_get_file_contents(const char* filename, gsize* length);
+char** util_get_lines(const char* filename);
 
 #endif /* end of include guard: _UTIL_H */