DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦5d1a40589⟧ TextFile

    Length: 495 (0x1ef)
    Types: TextFile
    Names: »alc.c«

Derivation

└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987
    └─⟦this⟧ »EUUGD18/General/Adv/Program/alc.c« 

TextFile

/*
 * 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);
}