|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 495 (0x1ef)
Types: TextFile
Names: »alc.c«
└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987
└─⟦this⟧ »EUUGD18/General/Adv/Program/alc.c«
/*
* Return pointer to len bytes (if zero, set to 0).
*/
#include "adv.h"
#ifdef SYS5
#define bzero(addr, len) memcpy(addr, 0, len)
#endif
char *
alc(len, zero)
int len, zero;
{
register char *s;
char *malloc();
s = malloc(len);
if (s == NULL) {
perror("adv: out of memory");
if (TopWin != NULL)
Wexit(100);
exit(100);
}
#ifdef DEBUG
printf ("Allocated %d bytes at %X (%szeroed)\n", len, (long)s,
zero ? "" : "not ");
#endif
if (zero)
bzero(s, len);
return (s);
}