ReactOS
0.4.16-dev-816-g135a9a9
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
Functions
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
Variables
_
c
d
e
f
g
h
i
l
m
n
o
p
s
t
u
x
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
Enumerations
_
a
b
c
d
f
i
l
m
o
p
s
t
w
x
Enumerator
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
x
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Related Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
x
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Examples
err.c
Go to the documentation of this file.
1
/*
2
3
Copyright (C) 2010 Alex Andreotti <alex.andreotti@gmail.com>
4
5
This file is part of chmc.
6
7
chmc is free software: you can redistribute it and/or modify
8
it under the terms of the GNU General Public License as published by
9
the Free Software Foundation, either version 3 of the License, or
10
(at your option) any later version.
11
12
chmc is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
GNU General Public License for more details.
16
17
You should have received a copy of the GNU General Public License
18
along with chmc. If not, see <http://www.gnu.org/licenses/>.
19
20
*/
21
#include "
err.h
"
22
23
#include <stdarg.h>
24
#include <assert.h>
25
26
struct
chmcErr
27
{
28
int
code
;
29
char
msg
[
CHMC_ERRMAXLEN
+1];
30
};
31
32
static
struct
chmcErr
chmc_err
= {
33
CHMC_NOERR
,
34
'\0'
,
35
};
36
37
void
chmcerr_clean
(
void
) {
38
chmc_err
.code =
CHMC_NOERR
;
39
chmc_err
.msg[0] =
'\0'
;
40
}
41
42
int
chmcerr_code
(
void
) {
43
return
chmc_err
.code;
44
}
45
46
const
char
*
chmcerr_message
(
void
) {
47
return
chmc_err
.msg;
48
}
49
50
void
chmcerr_set
(
int
code
,
const
char
*
fmt
, ...)
51
{
52
int
len
;
53
va_list
ap
;
54
55
chmc_err
.code =
code
;
56
57
va_start
(
ap
,
fmt
);
58
59
len
=
vsnprintf
(
chmc_err
.msg,
CHMC_ERRMAXLEN
,
fmt
,
ap
);
60
if
(
len
==
CHMC_ERRMAXLEN
)
61
chmc_err
.msg[
CHMC_ERRMAXLEN
] =
'\0'
;
62
63
assert
(
len
<=
CHMC_ERRMAXLEN
);
64
65
va_end
(
ap
);
66
}
va_list
char * va_list
Definition:
acmsvcex.h:78
va_end
#define va_end(ap)
Definition:
acmsvcex.h:90
va_start
#define va_start(ap, A)
Definition:
acmsvcex.h:91
assert
#define assert(x)
Definition:
debug.h:53
len
GLenum GLsizei len
Definition:
glext.h:6722
chmcerr_code
int chmcerr_code(void)
Definition:
err.c:42
chmcerr_set
void chmcerr_set(int code, const char *fmt,...)
Definition:
err.c:50
chmcerr_message
const char * chmcerr_message(void)
Definition:
err.c:46
chmcerr_clean
void chmcerr_clean(void)
Definition:
err.c:37
chmc_err
static struct chmcErr chmc_err
Definition:
err.c:32
err.h
CHMC_ERRMAXLEN
#define CHMC_ERRMAXLEN
Definition:
err.h:35
CHMC_NOERR
#define CHMC_NOERR
Definition:
err.h:39
chmcErr
Definition:
err.c:27
chmcErr::code
int code
Definition:
err.c:28
chmcErr::msg
char msg[CHMC_ERRMAXLEN+1]
Definition:
err.c:29
code
Definition:
inflate.c:139
fmt
Definition:
dsound.c:943
vsnprintf
#define vsnprintf
Definition:
tif_win32.c:406
ap
void int int ULONGLONG int va_list * ap
Definition:
winesup.h:36
sdk
tools
hhpcomp
chmc
err.c
Generated on Fri Mar 14 2025 06:15:03 for ReactOS by
1.9.6