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

⟦5311675ad⟧ TextFile

    Length: 398 (0x18e)
    Types: TextFile
    Names: »str.c«

Derivation

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

TextFile

/*
 * strsav(s)
 * Save string in memory; return pointer to it.
 */

#include "adv.h"

char *
strsav(s)
	register char *s;
{
	register char *t;
	char *rv;

	t = s;
	while (*t++)
		;
	rv = t = alcnz(t - s);
	while (*t++ = *s++)
		;
	return (rv);
}

/*
 * itoa(i)
 * Convert int to ascii; return ptr to it.
 */
char *
itoa(i)
	int i;
{
	static char buf[10];

	sprintf(buf, "%d", i);
	return (buf);
}