X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fline-buffer.c;h=0dcb70f94952bab00fdd98cf09db83f02d729d6e;hb=5f7f751a47c68946a0fcbc9898f43f5499c5c6c5;hp=146ca00a92847e93d5179a85a8180fa53f1946c2;hpb=97d4f38945476834fd7fce612b663f19f2b291f8;p=pspp diff --git a/src/language/line-buffer.c b/src/language/line-buffer.c index 146ca00a92..0dcb70f949 100644 --- a/src/language/line-buffer.c +++ b/src/language/line-buffer.c @@ -98,7 +98,6 @@ static struct getl_source *last_source; static struct string getl_include_path; -struct string getl_buf; static void close_source (void); @@ -106,16 +105,17 @@ static void init_prompts (void); static void uninit_prompts (void); static enum getl_prompt_style get_prompt_style (void); + /* Initialize getl. */ void getl_initialize (void) { ds_init_cstr (&getl_include_path, fn_getenv_default ("STAT_INCLUDE_PATH", include_path)); - ds_init_empty (&getl_buf); init_prompts (); } + /* Delete everything from the include path. */ void getl_clear_include_path (void) @@ -387,7 +387,6 @@ getl_uninitialize (void) { while (cur_source != NULL) close_source (); - ds_destroy (&getl_buf); ds_destroy (&getl_include_path); free(file_loc); file_loc = NULL; @@ -502,7 +501,7 @@ read_line_from_source (struct string *line, struct getl_source *s) If INTERACTIVE is non-null, then when true is returned *INTERACTIVE will be set to true if the line was obtained interactively, false otherwise. */ -static bool +bool do_read_line (struct string *line, bool *interactive) { while (cur_source != NULL) @@ -525,16 +524,6 @@ do_read_line (struct string *line, bool *interactive) return false; } -/* Reads a single line into getl_buf. - Returns true when a line has been read, false at end of input. - If INTERACTIVE is non-null, then when true is returned - *INTERACTIVE will be set to true if the line was obtained - interactively, false otherwise. */ -bool -getl_read_line (bool *interactive) -{ - return do_read_line (&getl_buf, interactive); -} /* Current prompts in each style. */ static char *prompts[GETL_PROMPT_CNT];