GnuCash 7574033+
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 generic_return_chars_end_handler (gpointer data_for_children,
71 GSList* data_from_children,
72 GSList* sibling_data,
73 gpointer parent_data,
74 gpointer global_data,
75 gpointer* result,
76 const gchar* tag);
77
78sixtp* simple_chars_only_parser_new (sixtp_end_handler end_handler);
79
80gboolean generic_timespec_start_handler (GSList* sibling_data,
81 gpointer parent_data,
82 gpointer global_data,
83 gpointer* data_for_children,
84 gpointer* result,
85 const gchar* tag, gchar** attrs);
86
87gboolean timespec_parse_ok (Time64ParseInfo* info);
88
89gboolean generic_timespec_secs_end_handler (
90 gpointer data_for_children,
91 GSList* data_from_children, GSList* sibling_data,
92 gpointer parent_data, gpointer global_data,
93 gpointer* result, const gchar* tag);
94
95gboolean generic_timespec_nsecs_end_handler (
96 gpointer data_for_children,
97 GSList* data_from_children, GSList* sibling_data,
98 gpointer parent_data, gpointer global_data,
99 gpointer* result, const gchar* tag);
100
101
102sixtp* generic_timespec_parser_new (sixtp_end_handler end_handler);
103
104gboolean generic_guid_end_handler (
105 gpointer data_for_children,
106 GSList* data_from_children, GSList* sibling_data,
107 gpointer parent_data, gpointer global_data,
108 gpointer* result, const gchar* tag);
109
110sixtp* generic_guid_parser_new (void);
111
112gboolean generic_gnc_numeric_end_handler (
113 gpointer data_for_children,
114 GSList* data_from_children, GSList* sibling_data,
115 gpointer parent_data, gpointer global_data,
116 gpointer* result, const gchar* tag);
117
118sixtp* generic_gnc_numeric_parser_new (void);
119
120sixtp* restore_char_generator (sixtp_end_handler ender);
121
122
123
124#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