readline.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334
  1. /* readline.h --- Simple implementation of readline.
  2. Copyright (C) 2005, 2009-2020 Free Software Foundation, Inc.
  3. Written by Simon Josefsson
  4. This program is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 3 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program. If not, see <https://www.gnu.org/licenses/>. */
  14. #ifndef GL_READLINE_H
  15. #define GL_READLINE_H
  16. #if HAVE_READLINE_READLINE_H
  17. /* <readline/readline.h> makes use of the FILE type without including
  18. <stdio.h> itself. */
  19. # include <stdio.h>
  20. # include <readline/readline.h>
  21. #else
  22. /* Prints a prompt PROMPT and then reads and returns a single line of
  23. text from the user. If PROMPT is NULL or the empty string, no
  24. prompt is displayed. The returned line is allocated with malloc;
  25. the caller should free the line when it has finished with it. */
  26. extern char *readline (const char *prompt);
  27. #endif
  28. #endif /* GL_READLINE_H */