1: /* @(#)strncat.c 2.1 SCCS id keyword */
2: /*
3: * Concatenate s2 on the end of s1. S1's space must be large enough.
4: * At most n characters are moved.
5: * Return s1.
6: */
7:
8: char *
9: strncat(s1, s2, n)
10: register char *s1, *s2;
11: register n;
12: {
13: register char *os1;
14:
15: os1 = s1;
16: while (*s1++)
17: ;
18: --s1;
19: while (*s1++ = *s2++)
20: if (--n < 0) {
21: *--s1 = '\0';
22: break;
23: }
24: return(os1);
25: }
Defined functions
strncat
defined in line
8; used 23 times