|
Last change
on this file since 0580615 was 0580615, checked in by Thomas Lopatic <thomas@…>, 8 years ago |
|
Point of no return.
|
-
Property mode
set to
100644
|
|
File size:
519 bytes
|
| Line | |
|---|
| 1 | /*
|
|---|
| 2 | =============================================================================
|
|---|
| 3 | strcat.c -- concatenate strings
|
|---|
| 4 | Version 1 -- 1987-06-12
|
|---|
| 5 |
|
|---|
| 6 | Concatenate s2 onto the end of s1. S1's space must be large enough.
|
|---|
| 7 | Return s1.
|
|---|
| 8 | =============================================================================
|
|---|
| 9 | */
|
|---|
| 10 |
|
|---|
| 11 | char *strcat(char *s1, char *s2)
|
|---|
| 12 | {
|
|---|
| 13 | register char *os1;
|
|---|
| 14 |
|
|---|
| 15 | os1 = s1;
|
|---|
| 16 |
|
|---|
| 17 | while(*s1++)
|
|---|
| 18 | ;
|
|---|
| 19 |
|
|---|
| 20 | --s1;
|
|---|
| 21 |
|
|---|
| 22 | while(*s1++ = *s2++)
|
|---|
| 23 | ;
|
|---|
| 24 |
|
|---|
| 25 | return(os1);
|
|---|
| 26 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.