File:  [CSRG BSD Unix] / 43BSD / ingres / source / gutil / append.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:55 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43
BSD 4.3

# include	<sccs.h>

SCCSID(@(#)append.c	8.1	12/31/84)

/*
**  APPEND -- block concatenate
**
**	block `b1' of length `l1' is concatenated to block
**	`b2' of length `l2', giving `b3'.
**
**	Returns the address of the next byte available after
**	the end of `b3'.
*/

char *
append(b1, l1, b2, l2, b3)
int	l1, l2;
char	*b1, *b2, *b3;
{
	register char	*p, *q;
	register int	n;

	p = b3;
	n = l1;
	q = b1;
	while (n-- > 0)
		*p++ = *q++;
	n = l2;
	q = b2;
	while (n-- > 0)
		*p++ = *q++;
	return (p);
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.