File: logapp.h

package info (click to toggle)
logapp 0.16-5
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 292 kB
  • sloc: ansic: 2,778; xml: 559; makefile: 132
file content (60 lines) | stat: -rw-r--r-- 1,588 bytes parent folder | download | duplicates (4)
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
/*
 * logapp.h: Logapp main header file
 *
 *
 * Copyright (C) 2007-2010 Michael Brunner <mibru@gmx.de>
 *
 * 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
 * General Public License for more details.
 */

#ifndef __LOGAPP_H__
#define __LOGAPP_H__

#define AUTHOR		"Michael Brunner <mibru@gmx.de>"

typedef enum { MESSAGE, WARNING, ERROR } t_printtype;
#define message(x...)	print(MESSAGE, x)
#define warning(x...)	print(WARNING, x)
#define error(x...)	print(ERROR, x)
#define STRING_WARNING	" warning: "
#define STRING_ERROR	" error: "
void print(t_printtype type, const char *format,...);
void error_outofmemory(void);
int execcmd(char* cmd);

/* These values should normally be defined by the Makefile */
#ifndef EXECUTABLE
# define EXECUTABLE	"logapp"
#endif
#ifndef VERSION
# define VERSION	""
#endif
#ifndef SVN_REVISION
# define SVN_REVISION	""
#endif
#ifndef DEBUG_BUILD
# define DEBUG_BUILD 0
#endif
#ifndef CONFIG_SUPPORT_PTY
# define CONFIG_SUPPORT_PTY 1
#endif
#ifndef CONFIG_USE_THREADS
# define CONFIG_USE_THREADS 1
#endif


#if (CONFIG_USE_THREADS == 1)
/* Let the system take care of making errno thread safe. */
#define _REENTRANT
#endif

#endif /* __LOGAPP_H__ */