home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / gnu / textutils-1.9-src.lha / src / amiga / textutils-1.9 / lib / stpcpy.c < prev    next >
C/C++ Source or Header  |  1993-06-29  |  1KB  |  29 lines

  1. /* stpcpy.c -- copy a string and return pointer to end of new string
  2.     Copyright (C) 1989, 1990 Free Software Foundation.
  3.  
  4.     This program is free software; you can redistribute it and/or modify
  5.     it under the terms of the GNU General Public License as published by
  6.     the Free Software Foundation; either version 2, or (at your option)
  7.     any later version.
  8.  
  9.     This program is distributed in the hope that it will be useful,
  10.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12.     GNU General Public License for more details.
  13.  
  14.     You should have received a copy of the GNU General Public License
  15.     along with this program; if not, write to the Free Software
  16.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
  17.  
  18. /* Copy SRC to DEST, returning the address of the terminating '\0' in DEST.  */
  19.  
  20. char *
  21. stpcpy (dest, src)
  22.      char *dest;
  23.      char *src;
  24. {
  25.   while ((*dest++ = *src++) != '\0')
  26.     /* Do nothing. */ ;
  27.   return dest - 1;
  28. }
  29.