~ubuntu-branches/ubuntu/breezy/gettext/breezy

« back to all changes in this revision

Viewing changes to lib/stpcpy.c

  • Committer: Bazaar Package Importer
  • Author(s): Santiago Vila
  • Date: 2004-03-14 17:40:02 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040314174002-p1ad5ldve1hqzhye
Tags: 0.14.1-2
* Added libexpat1-dev to Build-Depends, for glade support.
* Added libc0.1-dev to Build-Depends, for GNU/kFreeBSD.
* Removed special-casing of knetbsd-gnu in debian/rules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (C) 1992, 1995, 1997 Free Software Foundation, Inc.
2
 
 
3
 
   NOTE: The canonical source of this file is maintained with the GNU C Library.
4
 
   Bugs can be reported to bug-glibc@gnu.org.
5
 
 
6
 
   This program is free software; you can redistribute it and/or modify it
7
 
   under the terms of the GNU General Public License as published by the
8
 
   Free Software Foundation; either version 2, or (at your option) any
9
 
   later version.
10
 
 
11
 
   This program is distributed in the hope that it will be useful,
12
 
   but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 
   GNU General Public License for more details.
15
 
 
16
 
   You should have received a copy of the GNU General Public License
17
 
   along with this program; if not, write to the Free Software
18
 
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
19
 
   USA.  */
20
 
 
21
 
#ifdef HAVE_CONFIG_H
22
 
# include <config.h>
23
 
#endif
24
 
 
25
 
#include <string.h>
26
 
 
27
 
#undef __stpcpy
28
 
#undef stpcpy
29
 
 
30
 
#ifndef weak_alias
31
 
# define __stpcpy stpcpy
32
 
#endif
33
 
 
34
 
/* Copy SRC to DEST, returning the address of the terminating '\0' in DEST.  */
35
 
char *
36
 
__stpcpy (dest, src)
37
 
     char *dest;
38
 
     const char *src;
39
 
{
40
 
  register char *d = dest;
41
 
  register const char *s = src;
42
 
 
43
 
  do
44
 
    *d++ = *s;
45
 
  while (*s++ != '\0');
46
 
 
47
 
  return d - 1;
48
 
}
49
 
#ifdef weak_alias
50
 
weak_alias (__stpcpy, stpcpy)
51
 
#endif