X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fline-buffer.h;h=ee3db55905f1507c7e8807a902164533d82deed4;hb=3816248a008a4af75aac6319d0c9929cb7ff679e;hp=1ca8a7b4a5e30191dd1e0571fdcb8c83b834c38d;hpb=dcf9b154cbcaa35c3d8459a201b77eec8bcb30bd;p=pspp diff --git a/src/language/line-buffer.h b/src/language/line-buffer.h index 1ca8a7b4a5..ee3db55905 100644 --- a/src/language/line-buffer.h +++ b/src/language/line-buffer.h @@ -21,11 +21,16 @@ #define GETL_H 1 #include -#include "str.h" +#include + +enum getl_prompt_style + { + GETL_PROMPT_FIRST, /* First line of command. */ + GETL_PROMPT_LATER, /* Second or later line of command. */ + GETL_PROMPT_DATA, /* Between BEGIN DATA and END DATA. */ + GETL_PROMPT_CNT + }; -/* Current line. This line may be modified by modules other than - getl.c, and by lexer.c in particular. (Ugh.) */ -extern struct string getl_buf; void getl_initialize (void); void getl_uninitialize (void); @@ -43,26 +48,22 @@ void getl_include_function (bool (*read) (struct string *line, void (*close) (void *aux), void *aux); void getl_append_interactive (bool (*function) (struct string *line, - const char *prompt)); + enum getl_prompt_style)); void getl_abort_noninteractive (void); bool getl_is_interactive (void); bool getl_read_line (bool *interactive); -void getl_location (const char **, int *); - -/* Prompting. */ - -enum getl_prompt_style - { - GETL_PROMPT_FIRST, /* First line of command. */ - GETL_PROMPT_LATER, /* Second or later line of command. */ - GETL_PROMPT_DATA, /* Between BEGIN DATA and END DATA. */ - GETL_PROMPT_CNT - }; - const char *getl_get_prompt (enum getl_prompt_style); void getl_set_prompt (enum getl_prompt_style, const char *); void getl_set_prompt_style (enum getl_prompt_style); +struct msg_locator; +void get_msg_location (struct msg_locator *loc); + +void getl_location (const char **fn, int *ln); + +bool do_read_line (struct string *line, bool *interactive); + + #endif /* line-buffer.h */