File:  [CSRG BSD Unix] / 42BSD / ingres / source / iutil / clr_tuple.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:54 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD42
BSD 4.2

# include	<ingres.h>
# include	<symbol.h>
# include	<access.h>
# include	<sccs.h>

SCCSID(@(#)clr_tuple.c	7.1	2/5/81)


/*
**	Clr_tuple initializes all character domains
**	to blank and all numeric domains to zero.
*/

clr_tuple(desc, tuple)
struct descriptor	*desc;
char			*tuple;
{
	register struct descriptor	*d;
	register char			*tup;
	register int			i;
	int				j, pad;

	d = desc;

	for (i = 1; i <= d->reldum.relatts; i++)
	{
		if (d->relfrmt[i] == CHAR)
			pad = ' ';
		else
			pad = 0;

		tup = &tuple[d->reloff[i]];
		j = d->relfrml[i] & I1MASK;

		while (j--)
			*tup++ = pad;
	}
}

unix.superglobalmegacorp.com

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