src/stdlib/appendstr.c
/*==================================
 * appendstr -- Append to string, subject to length limit
 * Advance target pointer and decrease length.
 * Safe to call after length goes to zero (nothing happens).
 *  pdest:  [I/O] output buffer
 *  len:    [I/O] bytes remaining in output
 *  src:    [IN]  source to append
 * Created: 2000/11/29, Perry Rapp
 * NB: Need one byte for terminating zero, so len==1 is same as len==0.
 *================================*/
- Append to string, subject to length limit
Advance target pointer and decrease length.
Safe to call after length goes to zero (nothing happens).
- Append to string subject to length limit Advance target pointer and decrease length . Safe to call after length goes to zero ( nothing happens ) .
void
appendstr (STRING * pdest, INT * len, int utf8, CNSTRING src)
{
	int amount;
	*pdest[0]=0; 
	if (*len<=1) { *len=0; return; }
	llstrncpy(*pdest, src, *len, utf8);
	amount = strlen(*pdest);
	*pdest += amount;
	*len -= amount;
	if (*len<=1) *len=0;
}
void appendstr ( STRING * pdest , INT * len , int utf8 , CNSTRING src ) { int amount ; * pdest [ 0 ] = 0 ; if ( * len <= 1 ) { * len = 0 ; return ; } llstrncpy ( * pdest , src , * len , utf8 ) ; amount = strlen ( * pdest ) ; * pdest += amount ; * len -= amount ; if ( * len <= 1 ) * len = 0 ; }
appendstr -- Append to string, subject to length limit
 Advance target pointer and decrease length.
appendstr -- Append to string subject to length limit Advance target pointer and decrease length .
/* so client doesn't have to initialize */