comparison libiberty/stpncpy.c @ 67:f6334be47118

update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
author nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
date Tue, 22 Mar 2011 17:18:12 +0900
parents a06113de4d67
children 04ced10e8804
comparison
equal deleted inserted replaced
65:65488c3d617d 67:f6334be47118
1 /* Implement the stpncpy function. 1 /* Implement the stpncpy function.
2 Copyright (C) 2003 Free Software Foundation, Inc. 2 Copyright (C) 2003, 2011 Free Software Foundation, Inc.
3 Written by Kaveh R. Ghazi <ghazi@caip.rutgers.edu>. 3 Written by Kaveh R. Ghazi <ghazi@caip.rutgers.edu>.
4 4
5 This file is part of the libiberty library. 5 This file is part of the libiberty library.
6 Libiberty is free software; you can redistribute it and/or 6 Libiberty is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public 7 modify it under the terms of the GNU Library General Public
18 not, write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, 18 not, write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
19 Boston, MA 02110-1301, USA. */ 19 Boston, MA 02110-1301, USA. */
20 20
21 /* 21 /*
22 22
23 @deftypefn Supplemental char* stpncpy (char *@var{dst}, const char *@var{src}, size_t @var{len}) 23 @deftypefn Supplemental char* stpncpy (char *@var{dst}, const char *@var{src}, @
24 size_t @var{len})
24 25
25 Copies the string @var{src} into @var{dst}, copying exactly @var{len} 26 Copies the string @var{src} into @var{dst}, copying exactly @var{len}
26 and padding with zeros if necessary. If @var{len} < strlen(@var{src}) 27 and padding with zeros if necessary. If @var{len} < strlen(@var{src})
27 then return @var{dst} + @var{len}, otherwise returns @var{dst} + 28 then return @var{dst} + @var{len}, otherwise returns @var{dst} +
28 strlen(@var{src}). 29 strlen(@var{src}).