1 /* PSPP - computes sample statistics.
2 Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
3 Written by Ben Pfaff <blp@gnu.org>.
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License as
7 published by the Free Software Foundation; either version 2 of the
8 License, or (at your option) any later version.
10 This program 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.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
24 #include <libpspp/str.h>
26 /* Current line. This line may be modified by modules other than
27 getl.c, and by lexer.c in particular. (Ugh.) */
28 extern struct string getl_buf;
30 void getl_initialize (void);
31 void getl_uninitialize (void);
33 void getl_clear_include_path (void);
34 void getl_add_include_dir (const char *);
36 void getl_append_syntax_file (const char *);
37 void getl_include_syntax_file (const char *);
38 void getl_include_filter (void (*filter) (struct string *, void *aux),
39 void (*close) (void *aux),
41 void getl_include_function (bool (*read) (struct string *line,
42 char **fn, int *ln, void *aux),
43 void (*close) (void *aux),
45 void getl_append_interactive (bool (*function) (struct string *line,
47 void getl_abort_noninteractive (void);
48 bool getl_is_interactive (void);
50 bool getl_read_line (bool *interactive);
52 void getl_location (const char **, int *);
56 enum getl_prompt_style
58 GETL_PROMPT_FIRST, /* First line of command. */
59 GETL_PROMPT_LATER, /* Second or later line of command. */
60 GETL_PROMPT_DATA, /* Between BEGIN DATA and END DATA. */
64 const char *getl_get_prompt (enum getl_prompt_style);
65 void getl_set_prompt (enum getl_prompt_style, const char *);
66 void getl_set_prompt_style (enum getl_prompt_style);
68 #endif /* line-buffer.h */