home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 2 BBS
/
02-BBS.zip
/
sqdev200.zip
/
samples
/
smalloc.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-05-23
|
340b
|
26 lines
#include <stdlib.h>
#include <string.h>
#include "prog.h"
void * _fast smalloc(unsigned size)
{
void *mem;
if ((mem=(void *)malloc(size))==NULL)
NoMem();
memset(mem, '\0', size);
return mem;
}
char * _fast sstrdup(char *s)
{
char *p;
if ((p=strdup(s))==NULL)
NoMem();
return p;
}