GnuCash c935c2f+
Loading...
Searching...
No Matches
sixtp-utils.h
1/********************************************************************
2 * sixtp-utils.h *
3 * Copyright 2001 Gnumatic, Inc. *
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 gnu@gnu.org *
21 * *
22 ********************************************************************/
23
24#ifndef SIXTP_UTILS_H
25#define SIXTP_UTILS_H
26#include "qof.h"
27#include "sixtp.h"
28
29typedef struct
30{
31 time64 time;
32 guint s_block_count;
34
35gboolean isspace_str (const gchar* str, int nomorethan);
36
37gboolean allow_and_ignore_only_whitespace (GSList* sibling_data,
38 gpointer parent_data,
39 gpointer global_data,
40 gpointer* result,
41 const char* text,
42 int length);
43
44gboolean generic_accumulate_chars (GSList* sibling_data,
45 gpointer parent_data,
46 gpointer global_data,
47 gpointer* result,
48 const char* text,
49 int length);
50
51
52void generic_free_data_for_children (gpointer data_for_children,
53 GSList* data_from_children,
54 GSList* sibling_data,
55 gpointer parent_data,
56 gpointer global_data,
57 gpointer* result,
58 const gchar* tag);
59
60gchar* concatenate_child_result_chars (GSList* data_from_children);
61
62gboolean string_to_double (std::string_view, double* result);
63
64gboolean string_to_gint64 (std::string_view, gint64* v);
65
66gboolean string_to_guint16 (std::string_view, guint16* v);
67
68gboolean string_to_guint (std::string_view, guint* v);
69
70gboolean hex_string_to_binary (const gchar* str, void** v, guint64* data_len);
71
72gboolean generic_return_chars_end_handler (gpointer data_for_children,
73 GSList* data_from_children,
74 GSList* sibling_data,
75 gpointer parent_data,
76 gpointer global_data,
77 gpointer* result,
78 const gchar* tag);
79
80sixtp* simple_chars_only_parser_new (sixtp_end_handler end_handler);
81
82gboolean generic_timespec_start_handler (GSList* sibling_data,
83 gpointer parent_data,
84 gpointer global_data,
85 gpointer* data_for_children,
86 gpointer* result,
87 const gchar* tag, gchar** attrs);
88
89gboolean timespec_parse_ok (Time64ParseInfo* info);
90
91gboolean generic_timespec_secs_end_handler (
92 gpointer data_for_children,
93 GSList* data_from_children, GSList* sibling_data,
94 gpointer parent_data, gpointer global_data,
95 gpointer* result, const gchar* tag);
96
97gboolean generic_timespec_nsecs_end_handler (
98 gpointer data_for_children,
99 GSList* data_from_children, GSList* sibling_data,
100 gpointer parent_data, gpointer global_data,
101 gpointer* result, const gchar* tag);
102
103
104sixtp* generic_timespec_parser_new (sixtp_end_handler end_handler);
105
106gboolean generic_guid_end_handler (
107 gpointer data_for_children,
108 GSList* data_from_children, GSList* sibling_data,
109 gpointer parent_data, gpointer global_data,
110 gpointer* result, const gchar* tag);
111
112sixtp* generic_guid_parser_new (void);
113
114gboolean generic_gnc_numeric_end_handler (
115 gpointer data_for_children,
116 GSList* data_from_children, GSList* sibling_data,
117 gpointer parent_data, gpointer global_data,
118 gpointer* result, const gchar* tag);
119
120sixtp* generic_gnc_numeric_parser_new (void);
121
122sixtp* restore_char_generator (sixtp_end_handler ender);
123
124
125
126#endif /* _SIXTP_UTILS_H_ */
gint64 time64
Most systems that are currently maintained, including Microsoft Windows, BSD-derived Unixes and Linux...
Definition gnc-date.h:87
Definition sixtp.h:130