X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fstpcpy.c;h=e7a95a4656a8da2380fffe7d0794a3b1f0af01c0;hb=8cdf507496138203fbf4c3f36c70575825ad7bf1;hp=4a70746bad7b150b9500f77853458eff6f629ed3;hpb=d87c39464604e74f580c7fae835be31a4c125c36;p=gnulib.git diff --git a/lib/stpcpy.c b/lib/stpcpy.c index 4a70746ba..e7a95a465 100644 --- a/lib/stpcpy.c +++ b/lib/stpcpy.c @@ -12,19 +12,21 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* Copy SOURCE into DEST, stopping after copying the first '\0', and - return a pointer to the '\0' at the end of DEST; - in other words, return DEST + strlen (SOURCE). */ +#ifdef HAVE_CONFIG_H +#include +#endif + +/* Copy SRC to DEST, returning the address of the terminating '\0' in DEST. */ char * -stpcpy (dest, source) +stpcpy (dest, src) char *dest; - char *source; + const char *src; { - while ((*dest++ = *source++) != '\0') + while ((*dest++ = *src++) != '\0') /* Do nothing. */ ; return dest - 1; }