home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GEMini Atari
/
GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso
/
zip
/
mint
/
mntlib16.lzh
/
MNTLIB16
/
STRNCAT.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-08-03
|
531b
|
28 lines
/* from Henry Spencer's stringlib */
#include <string.h>
/*
* strncat - append at most n characters of string src to dst
*/
char * /* dst */
strncat(dst, src, n)
char *dst;
const char *src;
size_t n;
{
register char *dscan, c;
register const char *sscan;
register long count;
if((sscan = src) && (n > 0))
{
for (dscan = dst; *dscan != '\0'; dscan++)
continue;
count = n;
while ((c = *sscan++) != '\0' && --count >= 0)
*dscan++ = c;
*dscan++ = '\0';
}
return(dst);
}