Annotation of researchv9/libc/gen/strncat.c, revision 1.1.1.1

1.1       root        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: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.