File:  [CSRG BSD Unix] / 43BSD / ingres / source / gutil / itoa.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(@(#)itoa.c	8.1	12/31/84)

/*
**  ITOA -- integer to ascii conversion
*/

itoa(i, a)
register int	i;
register char	*a;
{
	register char	*j;
	char		b[6];

	if (i < 0)
	{
		*a++ = '-';
		i = -i;
	}
	j = &b[5];
	*j-- = 0;
	do
	{
		*j-- = i % 10 + '0';
		i /= 10;
	} while (i);
	do
	{
		*a++ = *++j;
	} while (*j);
	return (0);
}

unix.superglobalmegacorp.com

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