Blame lib/xstrndup.h

Packit Service c3aa71
/* Duplicate a bounded initial segment of a string, with out-of-memory
Packit Service c3aa71
   checking.
Packit Service c3aa71
   Copyright (C) 2003, 2009-2015 Free Software Foundation, Inc.
Packit Service c3aa71
Packit Service c3aa71
   This program is free software: you can redistribute it and/or modify
Packit Service c3aa71
   it under the terms of the GNU General Public License as published by
Packit Service c3aa71
   the Free Software Foundation; either version 3 of the License, or
Packit Service c3aa71
   (at your option) any later version.
Packit Service c3aa71
Packit Service c3aa71
   This program is distributed in the hope that it will be useful,
Packit Service c3aa71
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service c3aa71
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit Service c3aa71
   GNU General Public License for more details.
Packit Service c3aa71
Packit Service c3aa71
   You should have received a copy of the GNU General Public License
Packit Service c3aa71
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
Packit Service c3aa71
Packit Service c3aa71
#include <stddef.h>
Packit Service c3aa71
Packit Service c3aa71
/* Return a newly allocated copy of at most N bytes of STRING.
Packit Service c3aa71
   In other words, return a copy of the initial segment of length N of
Packit Service c3aa71
   STRING.  */
Packit Service c3aa71
extern char *xstrndup (const char *string, size_t n);