summaryrefslogtreecommitdiff
path: root/guile-readline/readline.h
blob: 482c7e10f775835c7c762217eac5638b37a693e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#ifndef READLINEH
#define READLINEH

/* Copyright 1997,1999,2000,2006,2018
     Free Software Foundation, Inc.

   This file is part of Guile-Readline.

   Guile-Readline is free software: you can redistribute it and/or
   modify it under the terms of the GNU General Public License as
   published by the Free Software Foundation, either version 3 of the
   License, or (at your option) any later version.

   Guile-Readline is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with Guile-Readline.  If not, see
   <https://www.gnu.org/licenses/>.  */

#include <libguile.h>

/* SCM_RL_API is a macro prepended to all function and data definitions
   which should be exported or imported in the resulting dynamic link
   library in the Win32 port. */

#if defined (SCM_RL_IMPORT)
# define SCM_RL_API __declspec (dllimport) extern
#elif defined (SCM_RL_EXPORT) || defined (DLL_EXPORT)
# define SCM_RL_API __declspec (dllexport) extern
#else
# define SCM_RL_API extern
#endif

SCM_RL_API scm_t_option scm_readline_opts[];

#define SCM_HISTORY_FILE_P     scm_readline_opts[0].val
#define SCM_HISTORY_LENGTH     scm_readline_opts[1].val
#define SCM_READLINE_BOUNCE_PARENS scm_readline_opts[2].val
#define SCM_READLINE_BRACKETED_PASTE scm_readline_opts[3].val
#define SCM_N_READLINE_OPTIONS 4

SCM_RL_API SCM scm_readline_options (SCM setting);
SCM_RL_API void scm_readline_init_ports (SCM inp, SCM outp);
SCM_RL_API SCM scm_readline (SCM txt, SCM inp, SCM outp, SCM read_hook);
SCM_RL_API SCM scm_add_history (SCM txt);
SCM_RL_API SCM scm_clear_history (void);
SCM_RL_API SCM scm_read_history (SCM file);
SCM_RL_API SCM scm_write_history (SCM file);
SCM_RL_API SCM scm_filename_completion_function (SCM text, SCM continuep);
SCM_RL_API void scm_init_readline (void);

#ifndef HAVE_RL_CLEANUP_AFTER_SIGNAL
void rl_cleanup_after_signal ();
void rl_free_line_state ();
#endif

#endif

/*
  Local Variables:
  c-file-style: "gnu"
  End:
*/