|
|
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: T t
Length: 1339 (0x53b)
Types: TextFile
Names: »tai_alloc.c«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0
└─⟦dc59850a2⟧ »EurOpenD22/pp5.0/pp-5.tar.Z«
└─⟦e5a54fb17⟧
└─⟦this⟧ »pp-5.0/Lib/tai/tai_alloc.c«
/* tai_alloc.c: tailoring allocation */
# ifndef lint
static char Rcsid[] = "@(#)$Header: /cs/research/pp/hubris/pp-beta/Lib/tai/RCS/tai_alloc.c,v 5.0 90/09/20 16:16:35 pp Exp Locker: pp $";
# endif
/*
* $Header: /cs/research/pp/hubris/pp-beta/Lib/tai/RCS/tai_alloc.c,v 5.0 90/09/20 16:16:35 pp Exp Locker: pp $
*
* $Log: tai_alloc.c,v $
* Revision 5.0 90/09/20 16:16:35 pp
* rcsforce : 5.0 public release
*
*/
#include "head.h"
extern int pptailor_size;
static char *tai_buf;
static char *tai_ptr;
static int do_malloc=TRUE;
static void malloc_buf ();
extern void err_abrt ();
/* --------------------- Begin Routines -------------------------------- */
char *tai_alloc (str)
char *str;
{
char *ret;
if (do_malloc)
malloc_buf();
ret = tai_ptr;
while (*tai_ptr++ = *str++);
if (tai_ptr >= &tai_buf[pptailor_size])
err_abrt (RP_MECH,
"Lib/tai_alloc.c/Out of tailor space '%s' %d %d",
&tai_buf[0], tai_ptr, &tai_buf[pptailor_size]);
return (ret);
}
/* --------------------- Static Routines ------------------------------- */
static void malloc_buf()
{
if (pptailor_size) {
tai_buf = smalloc (pptailor_size);
bzero (tai_buf, pptailor_size);
tai_ptr = tai_buf;
}
else
err_abrt (RP_MECH, "Lib/tai_alloc.c/unable to malloc");
do_malloc = FALSE;
}