HAMMER 60I/Many: Mirroring
[dragonfly.git] / contrib / readline-5.0 / savestring.c
blob820428d8881165a0374a1691233a315c79fa3a74
1 /* savestring.c */
3 /* Copyright (C) 1998,2003 Free Software Foundation, Inc.
5 This file is part of the GNU Readline Library, a library for
6 reading lines of text with interactive input and history editing.
8 The GNU Readline Library is free software; you can redistribute it
9 and/or modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2, or
11 (at your option) any later version.
13 The GNU Readline Library is distributed in the hope that it will be
14 useful, but WITHOUT ANY WARRANTY; without even the implied warranty
15 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 The GNU General Public License is often shipped with GNU software, and
19 is generally kept in a file called COPYING or LICENSE. If you do not
20 have a copy of the license, write to the Free Software Foundation,
21 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
22 #define READLINE_LIBRARY
24 #include <config.h>
25 #ifdef HAVE_STRING_H
26 # include <string.h>
27 #endif
28 #include "xmalloc.h"
30 /* Backwards compatibility, now that savestring has been removed from
31 all `public' readline header files. */
32 char *
33 savestring (s)
34 const char *s;
36 return ((char *)strcpy ((char *)xmalloc (1 + strlen (s)), (s)));