-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy patherror.h
61 lines (49 loc) · 1.24 KB
/
error.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
/*_
* Copyright 2009 Scyphus Solutions Co.,Ltd. All rights reserved.
*
* Authors:
* Hirochika Asai <asai@scyphus.co.jp>
*/
/* $Id: error.h,v f045f3d6e083 2011/02/12 10:50:28 Hirochika $ */
#ifndef _ERROR_H
#define _ERROR_H
#ifndef MAXLINE
#define MAXLINE 256
#endif
#include <stdio.h>
#include <stdarg.h>
extern int error_syslog;
static const struct {
const char *nomem; /* Memory error */
const char *server; /* Server error */
} errstr = {
.nomem = "No enough memory.",
.server = "Server error: %s"
};
#ifdef __cplusplus
extern "C" {
#endif
void error_msg(const char *, ...);
void error_sys_msg(const char *, ...);
void error_notice(const char *, ...);
void error_sys_notice(const char *, ...);
void error_warn(const char *, ...);
void error_sys_warn(const char *, ...);
void error_quit(const char *, ...);
void error_sys(const char *, ...);
void error_exit(int, const char *, ...);
void error_dump(const char *fmt, ...);
void error_enable_syslog(void);
void error_disable_syslog(void);
#ifdef __cplusplus
}
#endif
#endif /* _ERROR_H */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/