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