Revision 17010,
1.3 KB
checked in by ghudson, 23 years ago
(diff) |
This commit was generated by cvs2svn to compensate for changes in r17009,
which included commits to RCS files with non-trunk default branches.
|
Rev | Line | |
---|
[12991] | 1 | /* savestring.c */ |
---|
| 2 | |
---|
| 3 | /* Copyright (C) 1998 Free Software Foundation, Inc. |
---|
| 4 | |
---|
| 5 | This file is part of the GNU Readline Library, a library for |
---|
| 6 | reading lines of text with interactive input and history editing. |
---|
| 7 | |
---|
| 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 |
---|
[15409] | 10 | as published by the Free Software Foundation; either version 2, or |
---|
[12991] | 11 | (at your option) any later version. |
---|
| 12 | |
---|
| 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. |
---|
| 17 | |
---|
| 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, |
---|
[15409] | 21 | 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ |
---|
[12991] | 22 | |
---|
[17009] | 23 | #include <config.h> |
---|
| 24 | #ifdef HAVE_STRING_H |
---|
| 25 | # include <string.h> |
---|
| 26 | #endif |
---|
| 27 | #include "xmalloc.h" |
---|
[12991] | 28 | |
---|
| 29 | /* Backwards compatibility, now that savestring has been removed from |
---|
| 30 | all `public' readline header files. */ |
---|
| 31 | char * |
---|
| 32 | savestring (s) |
---|
[17009] | 33 | const char *s; |
---|
[12991] | 34 | { |
---|
[17009] | 35 | return ((char *)strcpy ((char *)xmalloc (1 + strlen (s)), (s))); |
---|
[12991] | 36 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.