home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD2.mdf
/
c
/
compiler
/
small_c
/
byte_sc
/
strncat.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS/Acorn
UTF-8
Wrap
Text File
|
1987-10-04
|
384 b
|
17 lines
/*
** concatenate n bytes max from t to end of s
** s must be large enough
*/
strncat(s, t, n) char *s, *t; int n; {
char *d;
d = s;
--s;
while(*++s) ;
while(n--) {
if(*s++ = *t++) continue;
return(d);
}
*s = 0;
return(d);
}