-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathutil.h
42 lines (29 loc) · 966 Bytes
/
util.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
#ifndef _UTIL_H_
#define _UTIL_H_
#include <unistd.h>
#include <sys/stat.h>
/*******************************************************************************
Variables
*******************************************************************************/
#ifdef _UTIL_MAIN_
int Debug = 0; // Debug flag
int Daemon = 0; // Daemon flag
int Verbose = 0; // Verbos flag
#else
extern int Debug; // Debug flag
extern int Daemon; // Daemon flag
extern int Verbose; // Verbos flag
#endif
#undef EXTERN
/*******************************************************************************
Utility functions
*******************************************************************************/
/* Output error message and exit */
void ErrorExit(const char *, ...);
/* Put perror's message and exit */
void PerrorExit(char *);
/* Output debug message */
void DebugMsg(const char *, ...);
/* Output verbose message */
void VerboseMsg(const char *, ...);
#endif /* _UTIL_H_ */