1 /* Copyright (C) 1993, 1995-1997, 2002-2003, 2005-2007 Free Software Foundation, Inc.
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.
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 3 of the License, or any
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.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19 /* This is almost copied from strncpy.c, written by Torbjorn Granlund. */
27 # define __stpncpy stpncpy
30 /* Copy no more than N bytes of SRC to DST, returning a pointer past the
31 last non-NUL byte written into DST. */
33 __stpncpy (char *dest, const char *src, size_t n)
90 weak_alias (__stpncpy, stpncpy)