[evolution-data-server] e-data-server-util cleanups.



commit cb6b56b1df6363929041913d9dce10569a863d76
Author: Matthew Barnes <mbarnes redhat com>
Date:   Mon Jun 7 07:38:44 2010 -0400

    e-data-server-util cleanups.

 libedataserver/e-data-server-util.c |  449 ++++++++++++++++++++---------------
 libedataserver/e-data-server-util.h |   47 +++--
 2 files changed, 282 insertions(+), 214 deletions(-)
---
diff --git a/libedataserver/e-data-server-util.c b/libedataserver/e-data-server-util.c
index f4a95f1..5104f91 100644
--- a/libedataserver/e-data-server-util.c
+++ b/libedataserver/e-data-server-util.c
@@ -46,27 +46,28 @@
  *          @needle is not found.
  **/
 gchar *
-e_util_strstrcase (const gchar *haystack, const gchar *needle)
+e_util_strstrcase (const gchar *haystack,
+                   const gchar *needle)
 {
-        /* find the needle in the haystack neglecting case */
-        const gchar *ptr;
-        guint len;
+	/* find the needle in the haystack neglecting case */
+	const gchar *ptr;
+	guint len;
 
-        g_return_val_if_fail (haystack != NULL, NULL);
-        g_return_val_if_fail (needle != NULL, NULL);
+	g_return_val_if_fail (haystack != NULL, NULL);
+	g_return_val_if_fail (needle != NULL, NULL);
 
-        len = strlen(needle);
-        if (len > strlen(haystack))
-                return NULL;
+	len = strlen (needle);
+	if (len > strlen (haystack))
+		return NULL;
 
-        if (len == 0)
-                return (gchar *) haystack;
+	if (len == 0)
+		return (gchar *) haystack;
 
-        for (ptr = haystack; *(ptr + len - 1) != '\0'; ptr++)
-                if (!g_ascii_strncasecmp (ptr, needle, len))
-                        return (gchar *) ptr;
+	for (ptr = haystack; *(ptr + len - 1) != '\0'; ptr++)
+		if (!g_ascii_strncasecmp (ptr, needle, len))
+			return (gchar *) ptr;
 
-        return NULL;
+	return NULL;
 }
 
 /**
@@ -79,10 +80,14 @@ e_util_strstrcase (const gchar *haystack, const gchar *needle)
  * Returns: A pointer to the next character in @text after @out.
  **/
 gchar *
-e_util_unicode_get_utf8 (const gchar *text, gunichar *out)
+e_util_unicode_get_utf8 (const gchar *text,
+                         gunichar *out)
 {
-        *out = g_utf8_get_char (text);
-        return (*out == (gunichar)-1) ? NULL : g_utf8_next_char (text);
+	g_return_val_if_fail (text != NULL, NULL);
+	g_return_val_if_fail (out != NULL, NULL);
+
+	*out = g_utf8_get_char (text);
+	return (*out == (gunichar) -1) ? NULL : g_utf8_next_char (text);
 }
 
 /**
@@ -99,81 +104,92 @@ e_util_unicode_get_utf8 (const gchar *text, gunichar *out)
  *          not legal UTF-8 strings.
  **/
 const gchar *
-e_util_utf8_strstrcase (const gchar *haystack, const gchar *needle)
+e_util_utf8_strstrcase (const gchar *haystack,
+                        const gchar *needle)
 {
-        gunichar *nuni, unival;
-        gint nlen;
-        const gchar *o, *p;
+	gunichar *nuni, unival;
+	gint nlen;
+	const gchar *o, *p;
+
+	if (haystack == NULL)
+		return NULL;
+
+	if (needle == NULL)
+		return NULL;
 
-        if (haystack == NULL) return NULL;
-        if (needle == NULL) return NULL;
-        if (strlen (needle) == 0) return haystack;
-        if (strlen (haystack) == 0) return NULL;
+	if (strlen (needle) == 0)
+		return haystack;
 
-        nuni = g_alloca (sizeof (gunichar) * strlen (needle));
+	if (strlen (haystack) == 0)
+		return NULL;
+
+	nuni = g_alloca (sizeof (gunichar) * strlen (needle));
 
-        nlen = 0;
-        for (p = e_util_unicode_get_utf8 (needle, &unival); p && unival; p = e_util_unicode_get_utf8 (p, &unival)) {
-                nuni[nlen++] = g_unichar_tolower (unival);
-        }
-        /* NULL means there was illegal utf-8 sequence */
-        if (!p) return NULL;
+	nlen = 0;
+	for (p = e_util_unicode_get_utf8 (needle, &unival);
+	     p && unival;
+	     p = e_util_unicode_get_utf8 (p, &unival)) {
+		nuni[nlen++] = g_unichar_tolower (unival);
+	}
+	/* NULL means there was illegal utf-8 sequence */
+	if (!p) return NULL;
 
 	o = haystack;
-        for (p = e_util_unicode_get_utf8 (o, &unival); p && unival; p = e_util_unicode_get_utf8 (p, &unival)) {
-                gunichar sc;
-                sc = g_unichar_tolower (unival);
-                /* We have valid stripped gchar */
-                if (sc == nuni[0]) {
-                        const gchar *q = p;
-                        gint npos = 1;
-                        while (npos < nlen) {
-                                q = e_util_unicode_get_utf8 (q, &unival);
-                                if (!q || !unival) return NULL;
-                                sc = g_unichar_tolower (unival);
-                                if (sc != nuni[npos]) break;
-                                npos++;
-                        }
-                        if (npos == nlen) {
-                                return o;
-                        }
-                }
-                o = p;
-        }
-
-        return NULL;
+	for (p = e_util_unicode_get_utf8 (o, &unival);
+	     p && unival;
+	     p = e_util_unicode_get_utf8 (p, &unival)) {
+		gunichar sc;
+		sc = g_unichar_tolower (unival);
+		/* We have valid stripped gchar */
+		if (sc == nuni[0]) {
+			const gchar *q = p;
+			gint npos = 1;
+			while (npos < nlen) {
+				q = e_util_unicode_get_utf8 (q, &unival);
+				if (!q || !unival) return NULL;
+				sc = g_unichar_tolower (unival);
+				if (sc != nuni[npos]) break;
+				npos++;
+			}
+			if (npos == nlen) {
+				return o;
+			}
+		}
+		o = p;
+	}
+
+	return NULL;
 }
 
 static gunichar
 stripped_char (gunichar ch)
 {
-        gunichar *decomp, retval;
-        GUnicodeType utype;
-        gsize dlen;
-
-        utype = g_unichar_type (ch);
-
-        switch (utype) {
-        case G_UNICODE_CONTROL:
-        case G_UNICODE_FORMAT:
-        case G_UNICODE_UNASSIGNED:
-        case G_UNICODE_COMBINING_MARK:
-                /* Ignore those */
-                return 0;
-               break;
-        default:
-                /* Convert to lowercase, fall through */
-                ch = g_unichar_tolower (ch);
-        case G_UNICODE_LOWERCASE_LETTER:
-                if ((decomp = g_unicode_canonical_decomposition (ch, &dlen))) {
-                        retval = decomp[0];
-                        g_free (decomp);
-                        return retval;
-                }
-                break;
-        }
-
-        return 0;
+	gunichar *decomp, retval;
+	GUnicodeType utype;
+	gsize dlen;
+
+	utype = g_unichar_type (ch);
+
+	switch (utype) {
+	case G_UNICODE_CONTROL:
+	case G_UNICODE_FORMAT:
+	case G_UNICODE_UNASSIGNED:
+	case G_UNICODE_COMBINING_MARK:
+		/* Ignore those */
+		return 0;
+	default:
+		/* Convert to lowercase, fall through */
+		ch = g_unichar_tolower (ch);
+	case G_UNICODE_LOWERCASE_LETTER:
+		if ((decomp = g_unicode_canonical_decomposition (ch, &dlen))) {
+			retval = decomp[0];
+			g_free (decomp);
+			return retval;
+		}
+		break;
+	}
+
+	return 0;
 }
 
 /**
@@ -189,62 +205,77 @@ stripped_char (gunichar ch)
  *          %NULL if either of the strings are not legal UTF-8 strings.
  **/
 const gchar *
-e_util_utf8_strstrcasedecomp (const gchar *haystack, const gchar *needle)
+e_util_utf8_strstrcasedecomp (const gchar *haystack,
+                              const gchar *needle)
 {
-        gunichar *nuni;
-        gunichar unival;
-        gint nlen;
-        const gchar *o, *p;
-
-        if (haystack == NULL) return NULL;
-        if (needle == NULL) return NULL;
-        if (strlen (needle) == 0) return haystack;
-        if (strlen (haystack) == 0) return NULL;
-
-        nuni = g_alloca (sizeof (gunichar) * strlen (needle));
-
-        nlen = 0;
-        for (p = e_util_unicode_get_utf8 (needle, &unival); p && unival; p = e_util_unicode_get_utf8 (p, &unival)) {
-                gunichar sc;
-                sc = stripped_char (unival);
-                if (sc) {
-                       nuni[nlen++] = sc;
-                }
-        }
-        /* NULL means there was illegal utf-8 sequence */
-        if (!p) return NULL;
-        /* If everything is correct, we have decomposed, lowercase, stripped needle */
-        if (nlen < 1) return haystack;
-
-        o = haystack;
-        for (p = e_util_unicode_get_utf8 (o, &unival); p && unival; p = e_util_unicode_get_utf8 (p, &unival)) {
-                gunichar sc;
-                sc = stripped_char (unival);
-                if (sc) {
-                        /* We have valid stripped gchar */
-                        if (sc == nuni[0]) {
-                                const gchar *q = p;
-                                gint npos = 1;
-                                while (npos < nlen) {
-                                        q = e_util_unicode_get_utf8 (q, &unival);
-                                        if (!q || !unival) return NULL;
-                                        sc = stripped_char (unival);
-                                        if ((!sc) || (sc != nuni[npos])) break;
-                                        npos++;
-                                }
-                                if (npos == nlen) {
-                                        return o;
-                                }
-                        }
-                }
-                o = p;
-        }
-
-        return NULL;
+	gunichar *nuni;
+	gunichar unival;
+	gint nlen;
+	const gchar *o, *p;
+
+	if (haystack == NULL)
+		return NULL;
+
+	if (needle == NULL)
+		return NULL;
+
+	if (strlen (needle) == 0)
+		return haystack;
+
+	if (strlen (haystack) == 0)
+		return NULL;
+
+	nuni = g_alloca (sizeof (gunichar) * strlen (needle));
+
+	nlen = 0;
+	for (p = e_util_unicode_get_utf8 (needle, &unival);
+	     p && unival;
+	     p = e_util_unicode_get_utf8 (p, &unival)) {
+		gunichar sc;
+		sc = stripped_char (unival);
+		if (sc) {
+		       nuni[nlen++] = sc;
+		}
+	}
+	/* NULL means there was illegal utf-8 sequence */
+	if (!p) return NULL;
+	/* If everything is correct, we have decomposed,
+	 * lowercase, stripped needle */
+	if (nlen < 1)
+		return haystack;
+
+	o = haystack;
+	for (p = e_util_unicode_get_utf8 (o, &unival);
+	     p && unival;
+	     p = e_util_unicode_get_utf8 (p, &unival)) {
+		gunichar sc;
+		sc = stripped_char (unival);
+		if (sc) {
+			/* We have valid stripped gchar */
+			if (sc == nuni[0]) {
+				const gchar *q = p;
+				gint npos = 1;
+				while (npos < nlen) {
+					q = e_util_unicode_get_utf8 (q, &unival);
+					if (!q || !unival) return NULL;
+					sc = stripped_char (unival);
+					if ((!sc) || (sc != nuni[npos])) break;
+					npos++;
+				}
+				if (npos == nlen) {
+					return o;
+				}
+			}
+		}
+		o = p;
+	}
+
+	return NULL;
 }
 
 gint
-e_util_utf8_strcasecmp (const gchar *s1, const gchar *s2)
+e_util_utf8_strcasecmp (const gchar *s1,
+                        const gchar *s2)
 {
 	gchar *folded_s1, *folded_s2;
 	gint retval;
@@ -301,82 +332,102 @@ e_util_utf8_remove_accents (const gchar *str)
 
 /**
  * e_strftime:
- * @s: The string array to store the result in.
+ * @string: The string array to store the result in.
  * @max: The size of array @s.
  * @fmt: The formatting to use on @tm.
  * @tm: The time value to format.
  *
- * This function is a wrapper around the strftime(3) function, which
- * converts the &percnt;l and &percnt;k (12h and 24h) format variables if necessary.
+ * This function is a wrapper around the strftime (3) function, which
+ * converts the &percnt;l and &percnt;k (12h and 24h) format variables
+ * if necessary.
  *
  * Returns: The number of characters placed in @s.
  **/
-gsize e_strftime(gchar *s, gsize max, const gchar *fmt, const struct tm *tm)
+gsize
+e_strftime (gchar *string,
+            gsize max,
+            const gchar *fmt,
+            const struct tm *tm)
 {
+#ifndef HAVE_LKSTRFTIME
+	gchar *c, *ffmt, *ff;
+#endif
 	gsize ret;
+
+	g_return_val_if_fail (string != NULL, 0);
+	g_return_val_if_fail (fmt != NULL, 0);
+	g_return_val_if_fail (tm != NULL, 0);
+
 #ifdef HAVE_LKSTRFTIME
-	ret = strftime(s, max, fmt, tm);
+	ret = strftime (string, max, fmt, tm);
 #else
-	gchar *c, *ffmt, *ff;
-
-	ffmt = g_strdup(fmt);
+	ffmt = g_strdup (fmt);
 	ff = ffmt;
-	while ((c = strstr(ff, "%l")) != NULL) {
+	while ((c = strstr (ff, "%l")) != NULL) {
 		c[1] = 'I';
 		ff = c;
 	}
 
 	ff = ffmt;
-	while ((c = strstr(ff, "%k")) != NULL) {
+	while ((c = strstr (ff, "%k")) != NULL) {
 		c[1] = 'H';
 		ff = c;
 	}
 
 #ifdef G_OS_WIN32
-	/* The Microsoft strftime() doesn't have %e either */
+	/* The Microsoft strftime () doesn't have %e either */
 	ff = ffmt;
-	while ((c = strstr(ff, "%e")) != NULL) {
+	while ((c = strstr (ff, "%e")) != NULL) {
 		c[1] = 'd';
 		ff = c;
 	}
 #endif
 
-	ret = strftime(s, max, ffmt, tm);
-	g_free(ffmt);
+	ret = strftime (string, max, ffmt, tm);
+	g_free (ffmt);
 #endif
+
 	if (ret == 0 && max > 0)
-		s[0] = '\0';
+		string[0] = '\0';
+
 	return ret;
 }
 
 /**
  * e_utf8_strftime:
- * @s: The string array to store the result in.
+ * @string: The string array to store the result in.
  * @max: The size of array @s.
  * @fmt: The formatting to use on @tm.
  * @tm: The time value to format.
  *
- * The UTF-8 equivalent of e_strftime().
+ * The UTF-8 equivalent of e_strftime ().
  *
  * Returns: The number of characters placed in @s.
  **/
 gsize
-e_utf8_strftime(gchar *s, gsize max, const gchar *fmt, const struct tm *tm)
+e_utf8_strftime (gchar *string,
+                 gsize max,
+                 const gchar *fmt,
+                 const struct tm *tm)
 {
 	gsize sz, ret;
 	gchar *locale_fmt, *buf;
 
-	locale_fmt = g_locale_from_utf8(fmt, -1, NULL, &sz, NULL);
+	g_return_val_if_fail (string != NULL, 0);
+	g_return_val_if_fail (fmt != NULL, 0);
+	g_return_val_if_fail (tm != NULL, 0);
+
+	locale_fmt = g_locale_from_utf8 (fmt, -1, NULL, &sz, NULL);
 	if (!locale_fmt)
 		return 0;
 
-	ret = e_strftime(s, max, locale_fmt, tm);
+	ret = e_strftime (string, max, locale_fmt, tm);
 	if (!ret) {
 		g_free (locale_fmt);
 		return 0;
 	}
 
-	buf = g_locale_to_utf8(s, ret, NULL, &sz, NULL);
+	buf = g_locale_to_utf8 (string, ret, NULL, &sz, NULL);
 	if (!buf) {
 		g_free (locale_fmt);
 		return 0;
@@ -384,16 +435,19 @@ e_utf8_strftime(gchar *s, gsize max, const gchar *fmt, const struct tm *tm)
 
 	if (sz >= max) {
 		gchar *tmp = buf + max - 1;
-		tmp = g_utf8_find_prev_char(buf, tmp);
+		tmp = g_utf8_find_prev_char (buf, tmp);
 		if (tmp)
 			sz = tmp - buf;
 		else
 			sz = 0;
 	}
-	memcpy(s, buf, sz);
-	s[sz] = '\0';
-	g_free(locale_fmt);
-	g_free(buf);
+
+	memcpy (string, buf, sz);
+	string[sz] = '\0';
+
+	g_free (locale_fmt);
+	g_free (buf);
+
 	return sz;
 }
 
@@ -405,7 +459,7 @@ e_utf8_strftime(gchar *s, gsize max, const gchar *fmt, const struct tm *tm)
  * thread. To be used in debugging output and logging only.
  * The returned value is just a cast of a pointer to the 64-bit integer.
  *
- * There is no guarantee that calling e_util_gthread_id() on one
+ * There is no guarantee that calling e_util_gthread_id () on one
  * thread first and later after that thread has dies on another won't
  * return the same integer.
  *
@@ -426,7 +480,8 @@ e_util_gthread_id (GThread *thread)
 #endif
 }
 
-/* This only makes a filename safe for usage as a filename.  It still may have shell meta-characters in it. */
+/* This only makes a filename safe for usage as a filename.
+ * It still may have shell meta-characters in it. */
 
 /* This code is rather misguided and mostly pointless, but can't be
  * changed because of backward compatibility, I guess.
@@ -451,6 +506,7 @@ e_filename_make_safe (gchar *string)
 #endif
 
 	g_return_if_fail (string != NULL);
+
 	p = string;
 
 	while (p && *p) {
@@ -461,7 +517,7 @@ e_filename_make_safe (gchar *string)
 		 * achieve, and whether it does that as currently
 		 * written?
 		 */
-		if (!g_unichar_isprint(c) || ( c < 0xff && strchr (unsafe_chars, c&0xff ))) {
+		if (!g_unichar_isprint (c) || ( c < 0xff && strchr (unsafe_chars, c&0xff ))) {
 			while (ts<p)
 				*ts++ = '_';
 		}
@@ -494,30 +550,30 @@ DllMain (HINSTANCE hinstDLL,
 	 DWORD     fdwReason,
 	 LPVOID    lpvReserved)
 {
-        switch (fdwReason) {
-        case DLL_PROCESS_ATTACH:
-                hmodule = hinstDLL;
-                break;
-        }
-        return TRUE;
+	switch (fdwReason) {
+	case DLL_PROCESS_ATTACH:
+		hmodule = hinstDLL;
+		break;
+	}
+	return TRUE;
 }
 
 gchar *
 e_util_replace_prefix (const gchar *configure_time_prefix,
-		       const gchar *runtime_prefix,
-		       const gchar *configure_time_path)
+                       const gchar *runtime_prefix,
+                       const gchar *configure_time_path)
 {
 	gchar *c_t_prefix_slash = g_strconcat (configure_time_prefix, "/",
 					      NULL);
 	gchar *retval;
 
-        if (runtime_prefix &&
-            g_str_has_prefix (configure_time_path, c_t_prefix_slash)) {
-                retval = g_strconcat (runtime_prefix,
+	if (runtime_prefix &&
+	    g_str_has_prefix (configure_time_path, c_t_prefix_slash)) {
+		retval = g_strconcat (runtime_prefix,
 				      configure_time_path + strlen (configure_time_prefix),
 				      NULL);
-        } else
-                retval = g_strdup (configure_time_path);
+	} else
+		retval = g_strdup (configure_time_path);
 
 	g_free (c_t_prefix_slash);
 
@@ -526,11 +582,10 @@ e_util_replace_prefix (const gchar *configure_time_prefix,
 
 static gchar *
 replace_prefix (const gchar *runtime_prefix,
-		const gchar *configure_time_path)
+                const gchar *configure_time_path)
 {
-	return e_util_replace_prefix (E_DATA_SERVER_PREFIX,
-				      runtime_prefix,
-				      configure_time_path);
+	return e_util_replace_prefix (
+		E_DATA_SERVER_PREFIX, runtime_prefix, configure_time_path);
 }
 
 static void
@@ -539,15 +594,15 @@ setup (void)
 	gchar *full_pfx;
 	gchar *cp_pfx;
 
-        G_LOCK (mutex);
-        if (prefix != NULL) {
-                G_UNLOCK (mutex);
-                return;
-        }
+	G_LOCK (mutex);
+	if (prefix != NULL) {
+		G_UNLOCK (mutex);
+		return;
+	}
 
 	/* This requires that the libedataserver DLL is installed in $bindir */
-	full_pfx = g_win32_get_package_installation_directory_of_module(hmodule);
-	cp_pfx = g_win32_locale_filename_from_utf8(full_pfx);
+	full_pfx = g_win32_get_package_installation_directory_of_module (hmodule);
+	cp_pfx = g_win32_locale_filename_from_utf8 (full_pfx);
 
 	prefix = g_strdup (full_pfx);
 	cp_prefix = g_strdup (cp_pfx);
@@ -567,26 +622,26 @@ setup (void)
 
 #define GETTER_IMPL(varbl)			\
 {						\
-        setup ();				\
-        return varbl;				\
+	setup ();				\
+	return varbl;				\
 }
 
 #define PRIVATE_GETTER(varbl)			\
 const gchar *					\
 _libedataserver_get_##varbl (void)		\
-	GETTER_IMPL(varbl)
+	GETTER_IMPL (varbl)
 
 #define PUBLIC_GETTER(varbl)			\
 const gchar *					\
 e_util_get_##varbl (void)			\
-	GETTER_IMPL(varbl)
+	GETTER_IMPL (varbl)
 
-PRIVATE_GETTER(extensiondir)
-PRIVATE_GETTER(imagesdir)
-PRIVATE_GETTER(ui_uidir)
+PRIVATE_GETTER (extensiondir)
+PRIVATE_GETTER (imagesdir)
+PRIVATE_GETTER (ui_uidir)
 
-PUBLIC_GETTER(prefix)
-PUBLIC_GETTER(cp_prefix)
-PUBLIC_GETTER(localedir)
+PUBLIC_GETTER (prefix)
+PUBLIC_GETTER (cp_prefix)
+PUBLIC_GETTER (localedir)
 
 #endif	/* G_OS_WIN32 */
diff --git a/libedataserver/e-data-server-util.h b/libedataserver/e-data-server-util.h
index 8c1139f..0eff5c9 100644
--- a/libedataserver/e-data-server-util.h
+++ b/libedataserver/e-data-server-util.h
@@ -19,8 +19,8 @@
  * Authors: Rodrigo Moya <rodrigo ximian com>
  */
 
-#ifndef __E_DATA_SERVER_UTIL_H__
-#define __E_DATA_SERVER_UTIL_H__
+#ifndef E_DATA_SERVER_UTIL_H
+#define E_DATA_SERVER_UTIL_H
 
 #include <sys/types.h>
 #include <glib.h>
@@ -29,25 +29,38 @@ G_BEGIN_DECLS
 
 struct tm;
 
-gchar       *e_util_strstrcase (const gchar *haystack, const gchar *needle);
-gchar       *e_util_unicode_get_utf8 (const gchar *text, gunichar *out);
-const gchar *e_util_utf8_strstrcase (const gchar *haystack, const gchar *needle);
-const gchar *e_util_utf8_strstrcasedecomp (const gchar *haystack, const gchar *needle);
-gint	     e_util_utf8_strcasecmp (const gchar *s1, const gchar *s2);
-gchar       *e_util_utf8_remove_accents (const gchar *str);
-guint64      e_util_gthread_id (GThread *thread);
-void         e_filename_make_safe (gchar *string);
+gchar *		e_util_strstrcase		(const gchar *haystack,
+						 const gchar *needle);
+gchar *		e_util_unicode_get_utf8		(const gchar *text,
+						 gunichar *out);
+const gchar *	e_util_utf8_strstrcase		(const gchar *haystack,
+						 const gchar *needle);
+const gchar *	e_util_utf8_strstrcasedecomp	(const gchar *haystack,
+						 const gchar *needle);
+gint		e_util_utf8_strcasecmp		(const gchar *s1,
+						 const gchar *s2);
+gchar *		e_util_utf8_remove_accents	(const gchar *str);
+guint64		e_util_gthread_id		(GThread *thread);
+void		e_filename_make_safe		(gchar *string);
 
-gsize e_utf8_strftime(gchar *s, gsize max, const gchar *fmt, const struct tm *tm);
-gsize e_strftime(gchar *s, gsize max, const gchar *fmt, const struct tm *tm);
+gsize		e_utf8_strftime			(gchar *string,
+						 gsize max,
+						 const gchar *fmt,
+						 const struct tm *tm);
+gsize		e_strftime			(gchar *string,
+						 gsize max,
+						 const gchar *fmt,
+						 const struct tm *tm);
 
 #ifdef G_OS_WIN32
-const gchar  *e_util_get_prefix (void) G_GNUC_CONST;
-const gchar  *e_util_get_cp_prefix (void) G_GNUC_CONST;
-const gchar  *e_util_get_localedir (void) G_GNUC_CONST;
-gchar        *e_util_replace_prefix (const gchar *configure_time_prefix, const gchar *runtime_prefix, const gchar *configure_time_path);
+const gchar *	e_util_get_prefix		(void) G_GNUC_CONST;
+const gchar *	e_util_get_cp_prefix		(void) G_GNUC_CONST;
+const gchar *	e_util_get_localedir		(void) G_GNUC_CONST;
+gchar *		e_util_replace_prefix		(const gchar *configure_time_prefix,
+						 const gchar *runtime_prefix,
+						 const gchar *configure_time_path);
 #endif
 
 G_END_DECLS
 
-#endif
+#endif /* E_DATA_SERVER_UTIL_H */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]