home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
109.lha
/
PD_C
/
lib
/
strncat.c
< prev
next >
Wrap
C/C++ Source or Header
|
1986-11-20
|
539b
|
23 lines
/*
* strncat - append at most n characters of string src to dst
*/
char * /* dst */
strncat(dst, src, n)
char *dst;
CONST char *src;
SIZET n;
{
register char *dscan;
register CONST char *sscan;
register SIZET count;
for (dscan = dst; *dscan != '\0'; dscan++)
continue;
sscan = src;
count = n;
while (*sscan != '\0' && --count >= 0)
*dscan++ = *sscan++;
*dscan++ = '\0';
return(dst);
}