Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. /* strcat( char *, const char * )
  2.  
  3.    This file is part of the Public Domain C Library (PDCLib).
  4.    Permission is granted to use, modify, and / or redistribute at will.
  5. */
  6.  
  7. #include <string.h>
  8.  
  9. char * strcat( char * s1, const char * s2 )
  10. {
  11.     char * rc = s1;
  12.  
  13.     if ( *s1 )
  14.     {
  15.         while ( *++s1 )
  16.         {
  17.             /* EMPTY */
  18.         }
  19.     }
  20.  
  21.     while ( ( *s1++ = *s2++ ) )
  22.     {
  23.         /* EMPTY */
  24.     }
  25.  
  26.     return rc;
  27. }