-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.h
79 lines (60 loc) · 2.36 KB
/
main.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/**************************************************************************
Copyright (C) 2021 SkibbleBip
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**************************************************************************/
/***************************************************************************
* File: main.h
* Author: SkibbleBip
* Procedures:
* failedShutdown -Prints error message occured and exits -1
***************************************************************************/
#ifndef MAIN_H
#define MAIN_H
#include <sphinxbase/err.h>
#include <stdint.h>
#define SILENT
/*comment out if you want debugging output*/
#ifdef SILENT
/*if we define SILENT, then the output will be muted albiet specified instances
*specified by the user
*/
#define PRINT(X) printf(X)
#define ERRPRINT(X) perror(X); exit(-1);
#else
#define PRINT(X) E_INFO(X)
#define ERRPRINT(X) E_FATAL_SYSTEM(X)
#endif // SILENT
/*typedef struct{
char city[1024];
uint8_t IP_addr[4];
double longitude, latitude;
} Location_t;*/
/*Location struct, as of the current version we don't use it, we may in the
*future though
*/
/***************************************************************************
* static void failedShutdown(char* in)
* Author: SkibbleBip
* Date: 06/19/2021
* Description: Prints error message occured and exits -1
*
* Parameters:
* in I/P char* The string to inform the user of what error
* occured
**************************************************************************/
static void failedShutdown(char* in)
{
ERRPRINT(in);
}
//int getLocation(Location_t* location);
#endif //MAIN_H