|
GnuCash 2.4.99
|
00001 /********************************************************************\ 00002 * gnc-glib-utils.c -- utility functions based on glib functions * 00003 * Copyright (C) 2006 David Hampton <hampton@employees.org> * 00004 * * 00005 * This program is free software; you can redistribute it and/or * 00006 * modify it under the terms of the GNU General Public License as * 00007 * published by the Free Software Foundation; either version 2 of * 00008 * the License, or (at your option) any later version. * 00009 * * 00010 * This program is distributed in the hope that it will be useful, * 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00013 * GNU General Public License for more details. * 00014 * * 00015 * You should have received a copy of the GNU General Public License* 00016 * along with this program; if not, contact: * 00017 * * 00018 * Free Software Foundation Voice: +1-617-542-5942 * 00019 * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 * 00020 * Boston, MA 02110-1301, USA gnu@gnu.org * 00021 * * 00022 \********************************************************************/ 00023 00037 #ifndef GNC_GLIB_UTILS_H 00038 #define GNC_GLIB_UTILS_H 00039 00040 #include <glib.h> 00041 00056 int safe_utf8_collate (const char *str1, const char *str2); 00057 00084 gboolean gnc_utf8_validate(const gchar *str, gssize max_len, const gchar **end); 00085 00095 void gnc_utf8_strip_invalid (gchar *str); 00096 00109 gchar *gnc_utf8_strip_invalid_strdup (const gchar* str); 00110 00123 gchar *gnc_locale_from_utf8(const gchar* str); 00124 00137 gchar *gnc_locale_to_utf8(const gchar* str); 00138 00144 typedef gpointer (*GncGMapFunc)(gpointer data, gpointer user_data); 00145 00149 GList* gnc_g_list_map(GList* list, GncGMapFunc fn, gpointer user_data); 00150 00156 void gnc_g_list_cut(GList **list, GList *cut_point); 00157 00163 void gnc_scm_log_warn(const gchar *msg); 00164 void gnc_scm_log_error(const gchar *msg); 00165 void gnc_scm_log_msg(const gchar *msg); 00166 void gnc_scm_log_debug(const gchar *msg); 00167 00177 void gnc_gpid_kill(GPid pid); 00178 00181 #endif /* GNC_GLIB_UTILS_H */ 00182
1.7.4