Category : C Source Code
Archive   : C_STRING.ZIP
Filename : STRCAT.C

 
Output of file : STRCAT.C contained in archive : C_STRING.ZIP

/*f File : strcat.c
Author : Richard A. O'Keefe.
Updated: 10 April 1984
Defines: strcat()

strcat(s, t) concatenates t on the end of s. There had better be
enough room in the space s points to; strcat has no way to tell.
Note that strcat has to search for the end of s, so if you are doing
a lot of concatenating it may be better to use strmov, e.g.
strmov(strmov(strmov(strmov(s,a),b),c),d)
rather than
strcat(strcat(strcat(strcpy(s,a),b),c),d).
strcat returns the old value of s.
*/

#include "strings.h"

char *strcat(s, t)
register char *s, *t;
{
char *save;

for (save = s; *s++; ) ;
for (--s; *s++ = *t++; ) ;
return save;
}



  3 Responses to “Category : C Source Code
Archive   : C_STRING.ZIP
Filename : STRCAT.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/