Branch data Line data Source code
1 : : /********************************************************************\
2 : : * gnc-xml-gen.c -- implementation for gnucash xml i/o *
3 : : * *
4 : : * Copyright (C) 2001 James LewisMoss <dres@debian.org> *
5 : : * *
6 : : * This program is free software; you can redistribute it and/or *
7 : : * modify it under the terms of the GNU General Public License as *
8 : : * published by the Free Software Foundation; either version 2 of *
9 : : * the License, or (at your option) any later version. *
10 : : * *
11 : : * This program is distributed in the hope that it will be useful, *
12 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 : : * GNU General Public License for more details. *
15 : : * *
16 : : * You should have received a copy of the GNU General Public License*
17 : : * along with this program; if not, contact: *
18 : : * *
19 : : * Free Software Foundation Voice: +1-617-542-5942 *
20 : : * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
21 : : * Boston, MA 02110-1301, USA gnu@gnu.org *
22 : : * *
23 : : \********************************************************************/
24 : : #include <config.h>
25 : :
26 : : #include "io-gncxml-gen.h"
27 : :
28 : : gboolean
29 : 145 : gnc_xml_parse_file (sixtp* top_parser, const char* filename,
30 : : gxpf_callback callback, gpointer parsedata,
31 : : gpointer bookdata)
32 : : {
33 : 145 : gpointer parse_result = NULL;
34 : : gxpf_data gpdata;
35 : :
36 : 145 : gpdata.cb = callback;
37 : 145 : gpdata.parsedata = parsedata;
38 : 145 : gpdata.bookdata = bookdata;
39 : :
40 : 145 : return sixtp_parse_file (top_parser, filename,
41 : 290 : NULL, &gpdata, &parse_result);
42 : : }
43 : :
44 : : gboolean
45 : 21 : gnc_xml_parse_fd (sixtp* top_parser, FILE* fd,
46 : : gxpf_callback callback, gpointer parsedata,
47 : : gpointer bookdata)
48 : : {
49 : 21 : gpointer parse_result = NULL;
50 : : gxpf_data gpdata;
51 : :
52 : 21 : gpdata.cb = callback;
53 : 21 : gpdata.parsedata = parsedata;
54 : 21 : gpdata.bookdata = bookdata;
55 : :
56 : 21 : return sixtp_parse_fd (top_parser, fd,
57 : 42 : NULL, &gpdata, &parse_result);
58 : : }
|