source:
buchla-68k/libsm/strcat.c@
ffce2bc
| Last change on this file since ffce2bc was dade7a0, checked in by , 8 years ago | |
|---|---|
|
|
| File size: 479 bytes | |
| Rev | Line | |
|---|---|---|
| [f40a309] | 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 | ||
| [b28a12e] | 11 | #include "ram.h" |
| [6262b5c] | 12 | |
| [7258c6a] | 13 | int8_t *strcat(int8_t *s1, int8_t *s2) |
| [f40a309] | 14 | { |
| [7848656] | 15 | register int8_t *os1; |
| [f40a309] | 16 | |
| [7848656] | 17 | os1 = s1; |
| [f40a309] | 18 | |
| [dade7a0] | 19 | while (*s1++) |
| [7848656] | 20 | ; |
| [f40a309] | 21 | |
| [7848656] | 22 | --s1; |
| [f40a309] | 23 | |
| [dade7a0] | 24 | while ((*s1++ = *s2++)) |
| [7848656] | 25 | ; |
| [f40a309] | 26 | |
| [7848656] | 27 | return(os1); |
| [f40a309] | 28 | } |
Note:
See TracBrowser
for help on using the repository browser.
![(please configure the [header_logo] section in trac.ini)](http://bob.lopatic.de/chrome/site/logo.png)