-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathutils.h
More file actions
33 lines (25 loc) · 755 Bytes
/
Copy pathutils.h
File metadata and controls
33 lines (25 loc) · 755 Bytes
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
#include <syslog.h>
#include <stdbool.h>
#ifndef UTILS_H_
#define UTILS_H_
#ifndef EXIT_SUCCESS
#define EXIT_FAILURE 1
#define EXIT_SUCCESS 0
#endif
void daemonise ( char *pidFile, void (*main_function)(void) );
//void debugPrint (char *format, ...);
void displayLastSystemError (const char *on_what);
void logMessage(int level, char *format, ...);
int count_characters(const char *str, char character);
void run_external(char *command);
int str2int(const char* str, int len);
float str2float(const char* str, int len);
//void readCfg (char *cfgFile);
int text2elevel(char* level);
char *elevel2text(int level);
//#ifndef _UTILS_C_
extern bool _daemon_;
//extern bool _debuglog_;
extern bool _debug2file_;
//#endif
#endif /* UTILS_H_ */