Changed include paths to be explicitly specified in the #include directive.
[pspp-builds.git] / src / language / line-buffer.h
1 /* PSPP - computes sample statistics.
2    Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
3    Written by Ben Pfaff <blp@gnu.org>.
4
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.
9
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.
14
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
18    02110-1301, USA. */
19
20 #ifndef GETL_H
21 #define GETL_H 1
22
23 #include <stdbool.h>
24 #include <libpspp/str.h>
25
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;
29
30 void getl_initialize (void);
31 void getl_uninitialize (void);
32
33 void getl_clear_include_path (void);
34 void getl_add_include_dir (const char *);
35
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),
40                           void *aux);
41 void getl_include_function (bool (*read) (struct string *line,
42                                           char **fn, int *ln, void *aux),
43                             void (*close) (void *aux),
44                             void *aux);
45 void getl_append_interactive (bool (*function) (struct string *line,
46                                                 const char *prompt));
47 void getl_abort_noninteractive (void);
48 bool getl_is_interactive (void);
49
50 bool getl_read_line (bool *interactive);
51
52 void getl_location (const char **, int *);
53 \f
54 /* Prompting. */
55
56 enum getl_prompt_style
57   {
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. */
61     GETL_PROMPT_CNT
62   };
63
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);
67
68 #endif /* line-buffer.h */