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

Defined functions

strncat defined in line 7; used 2 times
Last modified: 1979-01-10
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 364
Valid CSS Valid XHTML 1.0 Strict