| 1 |
#ifdef RCSID |
| 2 |
static char RCSid[] = |
| 3 |
"$Header: d:/cvsroot/tads/TADS2/MCH.C,v 1.2 1999/05/17 02:52:12 MJRoberts Exp $"; |
| 4 |
#endif |
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
#include "os.h" |
| 25 |
#include "std.h" |
| 26 |
#include "mch.h" |
| 27 |
#include "err.h" |
| 28 |
|
| 29 |
|
| 30 |
IF_DEBUG(ulong mchtotmem;) |
| 31 |
|
| 32 |
uchar *mchalo(errcxdef *ctx, size_t siz, char *comment) |
| 33 |
{ |
| 34 |
uchar *ret; |
| 35 |
|
| 36 |
VARUSED(comment); |
| 37 |
IF_DEBUG(mchtotmem += siz;) |
| 38 |
|
| 39 |
ret = (uchar *)osmalloc(siz); |
| 40 |
if (ret) |
| 41 |
return(ret); |
| 42 |
else |
| 43 |
{ |
| 44 |
errsig(ctx, ERR_NOMEM); |
| 45 |
NOTREACHEDV(uchar *); |
| 46 |
return 0; |
| 47 |
} |
| 48 |
} |