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 enum getl_prompt_style
28 GETL_PROMPT_FIRST, /* First line of command. */
29 GETL_PROMPT_LATER, /* Second or later line of command. */
30 GETL_PROMPT_DATA, /* Between BEGIN DATA and END DATA. */
34 /* Current line. This line may be modified by modules other than
35 getl.c, and by lexer.c in particular. (Ugh.) */
36 extern struct string getl_buf;
38 void getl_initialize (void);
39 void getl_uninitialize (void);
41 void getl_clear_include_path (void);
42 void getl_add_include_dir (const char *);
44 void getl_append_syntax_file (const char *);
45 void getl_include_syntax_file (const char *);
46 void getl_include_filter (void (*filter) (struct string *, void *aux),
47 void (*close) (void *aux),
49 void getl_include_function (bool (*read) (struct string *line,
50 char **fn, int *ln, void *aux),
51 void (*close) (void *aux),
53 void getl_append_interactive (bool (*function) (struct string *line,
54 enum getl_prompt_style));
55 void getl_abort_noninteractive (void);
56 bool getl_is_interactive (void);
58 bool getl_read_line (bool *interactive);
60 const char *getl_get_prompt (enum getl_prompt_style);
61 void getl_set_prompt (enum getl_prompt_style, const char *);
62 void getl_set_prompt_style (enum getl_prompt_style);
65 void get_msg_location (struct msg_locator *loc);
67 void getl_location (const char **fn, int *ln);
70 #endif /* line-buffer.h */