1: #if defined(LIBC_SCCS) && !defined(lint)
   2: static char sccsid[] = "@(#)strncat.c	5.2 (Berkeley) 3/9/86";
   3: #endif LIBC_SCCS and not lint
   4: 
   5: /*
   6:  * Concatenate s2 on the end of s1.  S1's space must be large enough.
   7:  * At most n characters are moved.
   8:  * Return s1.
   9:  */
  10: 
  11: char *
  12: strncat(s1, s2, n)
  13: register char *s1, *s2;
  14: register n;
  15: {
  16:     register char *os1;
  17: 
  18:     os1 = s1;
  19:     while (*s1++)
  20:         ;
  21:     --s1;
  22:     while (*s1++ = *s2++)
  23:         if (--n < 0) {
  24:             *--s1 = '\0';
  25:             break;
  26:         }
  27:     return(os1);
  28: }
Last modified: 1986-03-10
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 965
Valid CSS Valid XHTML 1.0 Strict