~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to strings/strnmov.c

  • Committer: Monty Taylor
  • Date: 2008-07-09 15:52:52 UTC
  • mto: (77.6.1 glibclient-merge)
  • mto: This revision was merged to the branch mainline in revision 112.
  • Revision ID: monty@inaugust.com-20080709155252-lnzmxxje1g40z3a7
Warning fixes. 

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
 
    my_stpncpy(dst,src,length) moves length characters, or until end, of src to
 
17
    strnmov(dst,src,length) moves length characters, or until end, of src to
18
18
    dst and appends a closing NUL to dst if src is shorter than length.
19
19
    The result is a pointer to the first NUL in dst, or is dst+n if dst was
20
20
    truncated.
21
21
*/
22
22
 
 
23
#include <my_global.h>
23
24
#include "m_string.h"
24
25
 
25
 
char *my_stpncpy(register char *dst, register const char *src, size_t n)
 
26
char *strnmov(register char *dst, register const char *src, size_t n)
26
27
{
27
28
  while (n-- != 0) {
28
29
    if (!(*dst++ = *src++)) {