|
|
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 - downloadIndex: A T
Length: 2109 (0x83d)
Types: TextFile
Names: »Alloc.c«
└─⟦a0efdde77⟧ Bits:30001252 EUUGD11 Tape, 1987 Spring Conference Helsinki
└─⟦526ad3590⟧ »EUUGD11/gnu-31mar87/X.V10.R4.tar.Z«
└─⟦2109abc41⟧
└─⟦this⟧ »./X.V10R4/Toolkit/DECToolkit/src/Alloc.c«
/*
* $Source: /u1/X/DECToolkit/src/RCS/Alloc.c,v $
* $Header: Alloc.c,v 1.1 86/12/17 08:59:47 swick Exp $
*/
#ifndef lint
static char *rcsid_Alloc_c = "$Header: Alloc.c,v 1.1 86/12/17 08:59:47 swick Exp $";
#endif lint
#ifndef lint
static char *sccsid = "@(#)Alloc.c 1.3 12/11/86";
#endif lint
/*
* COPYRIGHT 1986
* DIGITAL EQUIPMENT CORPORATION
* MAYNARD, MASSACHUSETTS
* ALL RIGHTS RESERVED.
*
* THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE AND
* SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT CORPORATION.
* DIGITAL MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THIS SOFTWARE FOR
* ANY PURPOSE. IT IS SUPPLIED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
*
* IF THE SOFTWARE IS MODIFIED IN A MANNER CREATING DERIVATIVE COPYRIGHT RIGHTS,
* APPROPRIATE LEGENDS MAY BE PLACED ON THE DERIVATIVE WORK IN ADDITION TO THAT
* SET FORTH ABOVE.
*
*
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose and without fee is hereby granted, provided
* that the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting documentation,
* and that the name of Digital Equipment Corporation not be used in advertising
* or publicity pertaining to distribution of the software without specific,
* written prior permission.
*/
/*
* X Toolkit Memory Allocation Routines
*/
#include <stdio.h>
char * Tmalloc(num)
unsigned num;
{
char *ptr;
if ((ptr = (char *) malloc(num)) == NULL) {
fprintf(stderr, "XToolkit: malloc out of memory.\n");
exit(1);
}
return(ptr);
}
char * Trealloc(ptr, num)
char *ptr;
unsigned num;
{
if ((ptr = (char *) realloc(ptr, num)) == NULL) {
fprintf(stderr, "XToolkit: realloc out of memory.\n");
exit(1);
}
return(ptr);
}
char * Tcalloc(num, size)
unsigned num, size;
{
char *ptr;
if ((ptr = (char *) calloc(num, size)) == NULL) {
fprintf(stderr, "XToolkit: calloc out of memory.\n");
exit(1);
}
return(ptr);
}