gfsmUtils.h
Go to the documentation of this file.
1 
2 /*=============================================================================*\
3  * File: gfsmUtils.h
4  * Author: Bryan Jurish <moocow.bovine@gmail.com>
5  * Description: finite state machine library
6  *
7  * Copyright (c) 2004-2007 Bryan Jurish.
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 3 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22  *=============================================================================*/
23 
28 #ifndef _GFSM_UTILS_H
29 #define _GFSM_UTILS_H
30 
31 #include <stdio.h>
32 #include <gfsmError.h>
33 
34 /*======================================================================
35  * Constants
36  */
37 /*(none)*/
38 
39 /*======================================================================
40  * glib utility functions
41  */
43 gint gfsm_int_compare(gconstpointer a, gconstpointer b);
44 
46 gint gfsm_int_compare_data(gconstpointer a, gconstpointer b, gpointer data);
47 
49 gint gfsm_uint_compare(gconstpointer a, gconstpointer b);
50 
52 gint gfsm_uint_compare_data(gconstpointer a, gconstpointer b, gpointer data);
53 
54 /*======================================================================
55  * Hash Utilties
56  */
58 gboolean gfsm_hash_clear_func (gpointer key, gpointer value, gpointer user_data);
59 
60 /*======================================================================
61  * File Utilties
62  */
63 /* Open a named file.
64  * The filename \a "-" may be used to indicate stdin or stdout,
65  * depending on \a mode.
66  *
67  * If the file cannot be opened, **errp is set (if non-NULL) and NULL is returned.
68  */
69 FILE *gfsm_open_filename(const char *filename, const char *mode, gfsmError **errp);
70 
71 
72 #endif /* _GFSM_UTILS_H */