Heraia  0.1.8
heraia.h
Go to the documentation of this file.
1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2 /*
3  heraia.h
4  heraia - an hexadecimal file editor and analyser based on ghex
5 
6  (C) Copyright 2005 - 2012 Olivier Delhomme
7  e-mail : heraia@delhomme.org
8  URL : http://heraia.tuxfamily.org
9 
10  This program is free software; you can redistribute it and/or modify
11  it under the terms of the GNU General Public License as published by
12  the Free Software Foundation; either version 2, or (at your option)
13  any later version.
14 
15  This program is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with this program; if not, write to the Free Software
22  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 */
24 /**
25  * @file heraia.h
26  * heraia's header file.
27  */
28 #ifndef _HERAIA_H_
29 #define _HERAIA_H_
30 
31 /**
32  * @def HERAIA_DATE
33  * defines heraia's creation date
34  *
35  * @def HERAIA_AUTHORS
36  * defines heraia's main authors
37  *
38  * @def HERAIA_LICENSE
39  * defines heraia's license (at least GPL v2)
40  *
41  * @def HERAIA_VERSION
42  * defines heraia's current version and release date of this version
43  * (00.00.20XX means a development version)
44  */
45 #define HERAIA_AUTHORS "Olivier Delhomme, Sébastien TRICAUD, Grégory AUDET"
46 #define HERAIA_DATE "20 02 2005"
47 #define HERAIA_LICENSE N_("GPL v2 or later")
48 #define HERAIA_VERSION "0.1.8 (12.30.2018)"
49 
50 /**
51  * @def NO_TESTS
52  * defines that no tests should be done (this is the default behaviour)
53  *
54  * @def COVERAGE_TESTS
55  * In order to do some coverage tests.
56  */
57 #define NO_TESTS 0
58 #define COVERAGE_TESTS 1
59 #define LOADING_TESTS 2
60 
61 /**
62  * @struct Options
63  * Structure Options gives a way to store program options passed from the
64  * command line.
65  * - char *filename is the filename to open (should be a list of filenames)
66  * - char usage is there to know which kind of usage message we want to display
67  */
68 typedef struct
69 {
70  GList *filenames; /**< the filename to open */
71  gboolean usage; /**< to know if we displayed the usage message */
72  gint8 tests; /**< to know if the users wants to do self tests */
73 } Options;
74 
75 static struct option const long_options[] =
76 {
77  {"version", no_argument, NULL, 'v'}, /**< displays version informations */
78  {"help", no_argument, NULL, 'h'}, /**< displays help (usage) */
79  {"tests", optional_argument, NULL, 't'}, /**< self tests */
80  {NULL, 0, NULL, 0}
81 };
82 
83 extern heraia_struct_t *get_main_struct(void);
84 
85 #endif /* _HERAIA_H_ */
This is the main structure.
Definition: libheraia.h:332
gboolean usage
to know if we displayed the usage message
Definition: heraia.h:71
static struct option const long_options[]
Definition: heraia.h:75
heraia_struct_t * get_main_struct(void)
This is intended to be called by the library or any program that will use the library in order to get...
Definition: heraia.c:64
Structure Options gives a way to store program options passed from the command line.
Definition: heraia.h:68
gint8 tests
to know if the users wants to do self tests
Definition: heraia.h:72
GList * filenames
the filename to open
Definition: heraia.h:70