repo.or.cz
/
syslinux-debian
/
hramrach.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Adding upstream version 3.50~pre5.
[syslinux-debian/hramrach.git]
/
com32
/
lib
/
strerror.c
blob
5d3fc9a314e8e1d1b9c10d32523af63a582f74ca
1
/*
2
* strerror.c
3
*/
4
5
#include <string.h>
6
7
char
*
strerror
(
int
errnum
)
8
{
9
static char
message
[
32
] =
"error "
;
/* enough for error 2^63-1 */
10
11
char
numbuf
[
32
];
12
char
*
p
;
13
14
p
=
numbuf
+
sizeof
numbuf
;
15
*--
p
=
'\0'
;
16
17
do
{
18
*--
p
= (
errnum
%
10
) +
'0'
;
19
errnum
/=
10
;
20
}
while
(
errnum
);
21
22
return
(
char
*)
memcpy
(
message
+
6
,
p
, (
numbuf
+
sizeof
numbuf
)-
p
);
23
}