Debian Codegraph @

src/common/_error.h

raw symbols SCIP
1
2 /*
3 * Copyright 2009-2010 Red Hat Inc., Durham, North Carolina.
4 * All Rights Reserved.
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 *
20 * Authors:
21 * Lukas Kuklinek <[email protected]>
22 */
23
24 #pragma once
25 #ifndef _OSCAP_ERROR_H
26 #define _OSCAP_ERROR_Hcxx . . $ `src/common/_error.h:26:9`!
27
28 #include <errno.h>
29 #include <libxml/xmlerror.h>
30 #include "public/oscap_error.h"cxx . . $ `<file>/src/common/public/oscap_error.h`/
31
32 #define oscap_assert_errnocxx . . $ `src/common/_error.h:32:9`!(cond, desc) \
33 { if (!(cond)) { if ((errno)) oscap_seterr(OSCAP_EFAMILY_GLIBC, desc); \
34 else oscap_seterr(OSCAP_EFAMILY_OSCAP, desc); } }
35
36 #define oscap_setxmlerrcxx . . $ `src/common/_error.h:36:9`!(error) __oscap_setxmlerr (__FILE__, __LINE__, __PRETTY_FUNCTION__, error)
37
38 void __oscap_setxmlerrcxx . . $ __oscap_setxmlerr(232bac446a1df277).(const char *file, uint32_tcxx . . $ uint32_t# line, const char *func, const xmlErrorcxx . . $ xmlError# *error);
39
40 struct oscap_err_tcxx . . $ oscap_err_t# {
41 oscap_errfamily_tcxx . . $ oscap_errfamily_t# familycxx . . $ oscap_err_t#family.;
42 char *desccxx . . $ oscap_err_t#desc.;
43 const char *funccxx . . $ oscap_err_t#func.;
44 const char *filecxx . . $ oscap_err_t#file.;
45 uint32_tcxx . . $ uint32_t# linecxx . . $ oscap_err_t#line.;
46 struct oscap_err_tcxx . . $ oscap_err_t# *nextcxx . . $ oscap_err_t#next.;
47 };
48
49 /**
50 * __oscap_seterr() wrapper function
51 */
52 #define oscap_seterrcxx . . $ `src/common/_error.h:52:9`!(family, ...) __oscap_seterr (__FILE__, __LINE__, __PRETTY_FUNCTION__, family, __VA_ARGS__)
53
54
55 /**
56 * Set an error
57 */
58 __attribute__((format (printf, 5, 6)))
59 void __oscap_seterrcxx . . $ __oscap_seterr(4e2a17a716e00309).(const char *file, uint32_tcxx . . $ uint32_t# line, const char *func, oscap_errfamily_tcxx . . $ oscap_errfamily_t# family, const char *fmt, ...);
60
61 #endif /* _OSCAP_ERROR_H */