-
Notifications
You must be signed in to change notification settings - Fork 22
/
mcdb_error.h
56 lines (49 loc) · 1.5 KB
/
mcdb_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
/*
* mcdb_error - mcdb error codes and messages
*
* Copyright (c) 2010, Glue Logic LLC. All rights reserved. code()gluelogic.com
*
* This file is part of mcdb.
*
* mcdb is free software: you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 2.1 of the License, or
* (at your option) any later version.
*
* mcdb 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with mcdb. If not, see <http://www.gnu.org/licenses/>.
*
*
* mcdb is originally based upon the Public Domain cdb-0.75 by Dan Bernstein
*/
#ifndef INCLUDED_MCDB_ERROR_H
#define INCLUDED_MCDB_ERROR_H
#include "plasma/plasma_feature.h"
#include "plasma/plasma_attr.h"
PLASMA_ATTR_Pragma_once
#ifdef __cplusplus
extern "C" {
#endif
/* MCDB_ERROR_* enum error values are expected to be < 0 */
enum {
MCDB_ERROR_READFORMAT = -1,
MCDB_ERROR_READ = -2,
MCDB_ERROR_WRITE = -3,
MCDB_ERROR_MALLOC = -4,
MCDB_ERROR_USAGE = -5
};
__attribute_cold__
__attribute_nonnull__()
__attribute_nothrow__
__attribute_warn_unused_result__
extern int
mcdb_error (int, const char * restrict, const char * restrict);
#ifdef __cplusplus
}
#endif
#endif