|
|
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 c
Length: 649 (0x289)
Types: TextFile
Names: »concat.c«
└─⟦9ae75bfbd⟧ Bits:30007242 EUUGD3: Starter Kit
└─⟦3658e588a⟧ »EurOpenD3/mail/mh/mh-6.7.tar.Z«
└─⟦c75e36ecb⟧
└─⟦this⟧ »mh-6.7/sbr/concat.c«
/* concat.c - concatenate a bunch of strings in managed memory */
#include "../h/mh.h"
#include <stdio.h>
#include <varargs.h>
/* VARARGS */
char *concat (va_alist)
va_dcl
{
register char *cp,
*dp,
*sp;
register unsigned len;
register va_list list;
len = 1;
va_start (list);
while (cp = va_arg (list, char *))
len += strlen (cp);
va_end (list);
dp = sp = malloc (len);
if (dp == NULL)
adios (NULLCP, "unable to allocate string storage");
va_start (list);
while (cp = va_arg (list, char *))
sp = copy (cp, sp);
va_end (list);
return dp;
}