readline.h 2.1 KB

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