repo.or.cz
/
ctxt.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
troff: escape dots after inline markups
[ctxt.git]
/
util.c
blob
1102902421333bc8d941da7cef3f40adadc8462a
1
#include <stdlib.h>
2
#include <string.h>
3
#include <unistd.h>
4
5
void
die
(
char
*
msg
)
6
{
7
write
(
2
,
msg
,
strlen
(
msg
));
8
exit
(
1
);
9
}
10
11
void
*
xmalloc
(
int
size
)
12
{
13
void
*
value
=
malloc
(
size
);
14
if
(!
value
)
15
die
(
"Out of memory!
\n
"
);
16
return
value
;
17
}