~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mystrings/stpcpy.c

  • Committer: Brian Aker
  • Date: 2008-09-28 04:30:30 UTC
  • mfrom: (411.1.1 drizzle)
  • Revision ID: brian@gir.tangent.org-20080928043030-opk05wfxspweeina
Merge of my GNU stuff

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
15
 
16
16
/*
17
 
  stpcpy(dst, src) moves all the  characters  of  src  (including  the
 
17
  my_stpcpy(dst, src) moves all the  characters  of  src  (including  the
18
18
  closing NUL) to dst, and returns a pointer to the new closing NUL in
19
19
  dst.   The similar UNIX routine strcpy returns the old value of dst,
20
 
  which I have never found useful.  stpcpy(stpcpy(dst,a),b) moves a//b
 
20
  which I have never found useful.  my_stpcpy(my_stpcpy(dst,a),b) moves a//b
21
21
  into dst, which seems useful.
22
22
*/
23
23
 
24
24
#include "m_string.h"
25
25
 
26
 
#ifndef stpcpy
 
26
#ifndef my_stpcpy
27
27
 
28
 
char *stpcpy(register char *dst, register const char *src)
 
28
char *my_stpcpy(register char *dst, register const char *src)
29
29
{
30
30
  while ((*dst++ = *src++)) ;
31
31
  return dst-1;
32
32
}
33
33
 
34
 
#endif /* stpcpy */
 
34
#endif /* my_stpcpy */