readline.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #ifndef READLINEH
  2. #define READLINEH
  3. /* Copyright 1997,1999,2000,2006,2018
  4. Free Software Foundation, Inc.
  5. This file is part of Guile-Readline.
  6. Guile-Readline is free software: you can redistribute it and/or
  7. modify it under the terms of the GNU General Public License as
  8. published by the Free Software Foundation, either version 3 of the
  9. License, or (at your option) any later version.
  10. Guile-Readline is distributed in the hope that it will be useful, but
  11. WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. General Public License for more details.
  14. You should have received a copy of the GNU General Public License
  15. along with Guile-Readline. If not, see
  16. <https://www.gnu.org/licenses/>. */
  17. #include <libguile.h>
  18. /* SCM_RL_API is a macro prepended to all function and data definitions
  19. which should be exported or imported in the resulting dynamic link
  20. library in the Win32 port. */
  21. #if defined (SCM_RL_IMPORT)
  22. # define SCM_RL_API __declspec (dllimport) extern
  23. #elif defined (SCM_RL_EXPORT) || defined (DLL_EXPORT)
  24. # define SCM_RL_API __declspec (dllexport) extern
  25. #else
  26. # define SCM_RL_API extern
  27. #endif
  28. SCM_RL_API scm_t_option scm_readline_opts[];
  29. #define SCM_HISTORY_FILE_P scm_readline_opts[0].val
  30. #define SCM_HISTORY_LENGTH scm_readline_opts[1].val
  31. #define SCM_READLINE_BOUNCE_PARENS scm_readline_opts[2].val
  32. #define SCM_READLINE_BRACKETED_PASTE scm_readline_opts[3].val
  33. #define SCM_N_READLINE_OPTIONS 4
  34. SCM_RL_API SCM scm_readline_options (SCM setting);
  35. SCM_RL_API void scm_readline_init_ports (SCM inp, SCM outp);
  36. SCM_RL_API SCM scm_readline (SCM txt, SCM inp, SCM outp, SCM read_hook);
  37. SCM_RL_API SCM scm_add_history (SCM txt);
  38. SCM_RL_API SCM scm_clear_history (void);
  39. SCM_RL_API SCM scm_read_history (SCM file);
  40. SCM_RL_API SCM scm_write_history (SCM file);
  41. SCM_RL_API SCM scm_filename_completion_function (SCM text, SCM continuep);
  42. SCM_RL_API void scm_init_readline (void);
  43. #ifndef HAVE_RL_CLEANUP_AFTER_SIGNAL
  44. void rl_cleanup_after_signal ();
  45. void rl_free_line_state ();
  46. #endif
  47. #endif
  48. /*
  49. Local Variables:
  50. c-file-style: "gnu"
  51. End:
  52. */