aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
Diffstat (limited to 'e-util')
-rw-r--r--e-util/e-util.c12
-rw-r--r--e-util/e-util.h115
2 files changed, 61 insertions, 66 deletions
diff --git a/e-util/e-util.c b/e-util/e-util.c
index e24903bc71..5bffc9e4a9 100644
--- a/e-util/e-util.c
+++ b/e-util/e-util.c
@@ -52,16 +52,16 @@ g_int_compare(const void *x, const void *y)
}
char *
-e_strdup_strip(char *string)
+e_strdup_strip(const char *string)
{
int i;
int length = 0;
int initial = 0;
for ( i = 0; string[i]; i++ ) {
- if (initial == i && isspace(string[i])) {
+ if (initial == i && isspace((unsigned char) string[i])) {
initial ++;
}
- if (!isspace(string[i])) {
+ if (!isspace((unsigned char) string[i])) {
length = i - initial + 1;
}
}
@@ -500,7 +500,7 @@ e_strsplit (const gchar *string,
return str_array;
}
-const gchar *
+gchar *
e_strstrcase (const gchar *haystack, const gchar *needle)
{
/* find the needle in the haystack neglecting case */
@@ -515,11 +515,11 @@ e_strstrcase (const gchar *haystack, const gchar *needle)
return NULL;
if (len == 0)
- return haystack;
+ return (gchar *) haystack;
for (ptr = haystack; *(ptr + len - 1) != '\0'; ptr++)
if (!g_strncasecmp (ptr, needle, len))
- return ptr;
+ return (gchar *) ptr;
return NULL;
}
diff --git a/e-util/e-util.h b/e-util/e-util.h
index 5bff2d64b4..1e1f4b322d 100644
--- a/e-util/e-util.h
+++ b/e-util/e-util.h
@@ -31,74 +31,69 @@ typedef enum {
E_FOCUS_START,
E_FOCUS_END
} EFocus;
-int g_str_compare (const void *x,
- const void *y);
-int g_int_compare (const void *x,
- const void *y);
+int g_str_compare (const void *x,
+ const void *y);
+int g_int_compare (const void *x,
+ const void *y);
+char *e_strdup_strip (const char *string);
+void e_free_object_list (GList *list);
+void e_free_string_list (GList *list);
+char *e_read_file (const char *filename);
+int e_write_file (const char *filename,
+ const char *data,
+ int flags);
+int e_mkdir_hier (const char *path,
+ mode_t mode);
-char *e_strdup_strip (char *string);
-
-void e_free_object_list (GList *list);
-void e_free_string_list (GList *list);
-
-char *e_read_file (const char *filename);
-int e_write_file (const char *filename,
- const char *data,
- int flags);
-
-int e_mkdir_hier (const char *path,
- mode_t mode);
-
-gchar **e_strsplit (const gchar *string,
- const gchar *delimiter,
- gint max_tokens);
-
-const gchar *e_strstrcase (const gchar *haystack,
- const gchar *needle);
-void e_filename_make_safe (gchar *string);
-void e_marshal_INT__INT_INT_POINTER (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-void e_marshal_NONE__OBJECT_DOUBLE_DOUBLE_BOOL (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-void e_marshal_DOUBLE__OBJECT_DOUBLE_DOUBLE_BOOL (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-void e_marshal_BOOL__OBJECT_DOUBLE_DOUBLE_BOOL (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
+gchar **e_strsplit (const gchar *string,
+ const gchar *delimiter,
+ gint max_tokens);
+gchar *e_strstrcase (const gchar *haystack,
+ const gchar *needle);
+void e_filename_make_safe (gchar *string);
+void e_marshal_INT__INT_INT_POINTER (GtkObject *object,
+ GtkSignalFunc func,
+ gpointer func_data,
+ GtkArg *args);
+void e_marshal_NONE__OBJECT_DOUBLE_DOUBLE_BOOL (GtkObject *object,
+ GtkSignalFunc func,
+ gpointer func_data,
+ GtkArg *args);
+void e_marshal_DOUBLE__OBJECT_DOUBLE_DOUBLE_BOOL (GtkObject *object,
+ GtkSignalFunc func,
+ gpointer func_data,
+ GtkArg *args);
+void e_marshal_BOOL__OBJECT_DOUBLE_DOUBLE_BOOL (GtkObject *object,
+ GtkSignalFunc func,
+ gpointer func_data,
+ GtkArg *args);
#define e_marshal_NONE__INT_INT_POINTER_POINTER_UINT_UINT e_marshal_NONE__INT_INT_POINTER_POINTER_INT_INT
-void e_marshal_NONE__INT_INT_POINTER_POINTER_INT_INT (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
+void e_marshal_NONE__INT_INT_POINTER_POINTER_INT_INT (GtkObject *object,
+ GtkSignalFunc func,
+ gpointer func_data,
+ GtkArg *args);
#define e_marshal_NONE__INT_INT_POINTER_UINT e_marshal_NONE__INT_INT_POINTER_INT
-void e_marshal_NONE__INT_INT_POINTER_INT (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
+void e_marshal_NONE__INT_INT_POINTER_INT (GtkObject *object,
+ GtkSignalFunc func,
+ gpointer func_data,
+ GtkArg *args);
#define e_marshal_BOOL__INT_INT_POINTER_INT_INT_UINT e_marshal_BOOL__INT_INT_POINTER_INT_INT_INT
-void e_marshal_BOOL__INT_INT_POINTER_INT_INT_INT (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
+void e_marshal_BOOL__INT_INT_POINTER_INT_INT_INT (GtkObject *object,
+ GtkSignalFunc func,
+ gpointer func_data,
+ GtkArg *args);
#define e_marshal_NONE__INT_INT_POINTER_INT_INT_POINTER_UINT_UINT e_marshal_NONE__INT_INT_POINTER_INT_INT_POINTER_INT_INT
-void e_marshal_NONE__INT_INT_POINTER_INT_INT_POINTER_INT_INT (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-void e_marshal_NONE__POINTER_POINTER_INT (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
+void e_marshal_NONE__INT_INT_POINTER_INT_INT_POINTER_INT_INT (GtkObject *object,
+ GtkSignalFunc func,
+ gpointer func_data,
+ GtkArg *args);
+void e_marshal_NONE__POINTER_POINTER_INT (GtkObject *object,
+ GtkSignalFunc func,
+ gpointer func_data,
+ GtkArg *args);
#endif /* _E_UTIL_H_ */