repo.or.cz
/
mascara-docs.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
* added compilers lcc and bcc (linux86)
[mascara-docs.git]
/
compilers
/
linux86-0.16.17
/
libc
/
error
/
perror.c
blob
f9b09656465e550d018d29c4bf5a48900f8ee2d2
1
2
#include <errno.h>
3
4
void
5
perror
(
str
)
6
__const
char
*
str
;
7
{
8
register
char
*
ptr
;
9
if
(
str
)
10
{
11
write
(
2
,
str
,
strlen
(
str
));
12
write
(
2
,
": "
,
2
);
13
}
14
else
write
(
2
,
"perror: "
,
8
);
15
16
ptr
=
strerror
(
errno
);
17
write
(
2
,
ptr
,
strlen
(
ptr
));
18
write
(
2
,
"
\n
"
,
1
);
19
}