GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
gnc-guile-utils.h
1 /********************************************************************\
2  * gnc-guile-utils.h -- basic guile extensions *
3  * Copyright (C) 2012 Geert Janssens *
4  * *
5  * This program is free software; you can redistribute it and/or *
6  * modify it under the terms of the GNU General Public License as *
7  * published by the Free Software Foundation; either version 2 of *
8  * the License, or (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License*
16  * along with this program; if not, contact: *
17  * *
18  * Free Software Foundation Voice: +1-617-542-5942 *
19  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
20  * Boston, MA 02110-1301, USA [email protected] *
21  * *
22 \********************************************************************/
23 
24 #ifndef GNC_GUILE_UTILS_H
25 #define GNC_GUILE_UTILS_H
26 
27 #include <glib.h>
28 #include <libguile.h>
29 
34 gchar * gnc_scm_to_utf8_string(SCM scm_string);
35 
44 gchar * gnc_scm_to_locale_string(SCM scm_string);
45 
50 gchar * gnc_scm_symbol_to_locale_string(SCM scm_string);
51 
52 /* Helpful functions for calling functions that return
53  * specific kinds of values. These functions do error
54  * checking to verify the result is of the correct type. */
55 char * gnc_scm_call_1_to_string(SCM func, SCM arg);
56 char * gnc_scm_call_1_symbol_to_string(SCM func, SCM arg);
57 SCM gnc_scm_call_1_to_procedure(SCM func, SCM arg);
58 SCM gnc_scm_call_1_to_list(SCM func, SCM arg);
59 SCM gnc_scm_call_1_to_vector(SCM func, SCM arg);
60 
61 /* Deprectated functions, will be removed soon */
62 #define gnc_guile_call1_to_string gnc_scm_call_1_to_string
63 #define gnc_guile_call1_symbol_to_string gnc_scm_call_1_symbol_to_string
64 #define gnc_guile_call1_to_procedure gnc_scm_call_1_to_procedure
65 #define gnc_guile_call1_to_list gnc_scm_call_1_to_list
66 #define gnc_guile_call1_to_vector gnc_scm_call_1_to_vector
67 
75 gchar *gnc_scm_strip_comments (SCM scm_text);
76 
77 #endif