/*****
******
**      TITLE:                  STRXCAT - LIMITED STRING CONCATENATE ROUTINE
**				WHICH RETURNS THE ADDRESS OF THE ENDING NULL
**	SYSTEM:			COMMON DEC
**	ENTRY POINT:		STRXCAT
**	SOURCE FILE:		STRXCAT.C
**	PROGRAMMER:		Wayne E. Baisley
**	SOFTWARE TREE:		CLIB.STS
**      DATE:                   March 22, 1984
**
**	REVISIONS:	DATE	PROGRAMMER		DESCRIPTION
**			----	--------------	-----------------------------
**
**         1)         03/22/84  W. E. Baisley   Original release.
**
******
*****/
	
char *strxcat (t, s, n)
	
char *t;				/* target string */
char *s;				/* source string */
int n;					/* target length */
	
{
	
	register char *op = t;		/* output string */
	register char *ip = s;		/* input  string */
	register int i = n;		/* output length */
	
	while (*op++)			/* skip to m'loo */
		;
	
	for (--op;;)     {
	
		if (--i >= 0)	{
	
			if ((*op++ = *ip++) == '\0')	{

				--op;
				break;

			}
	
		}
	
		else	{
	
			*op = '\0';
			break;
	
		}
	
	}
	
	return (op);			/* return the address of the last character */
	
}
/*	CMS GENERATION  CMS REPLACEMENT HISTORY 	*/


/*	CMS GENERATION *1 COMPILER 17-JUL-1984 10:56:29 "[.pccaccnt]"	*/
