X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fterminal%2Fterminal-reader.c;h=3225678e8707b28a0dba95064d93fae4abf6b6f0;hb=8f7af0acaf8a9253242d89fcdb26e285841f7833;hp=e0f219826dfc4820f55e519dbc9c3c8c4d737929;hpb=65c76af5768d836d91b79d87702f9b4e004c18aa;p=pspp diff --git a/src/ui/terminal/terminal-reader.c b/src/ui/terminal/terminal-reader.c index e0f219826d..3225678e87 100644 --- a/src/ui/terminal/terminal-reader.c +++ b/src/ui/terminal/terminal-reader.c @@ -189,14 +189,12 @@ static struct lex_reader_class terminal_reader_class = struct lex_reader * terminal_reader_create (void) { - struct terminal_reader *r; - if (!n_terminal_readers++) readline_init (); - r = xzalloc (sizeof *r); + struct terminal_reader *r = XZALLOC (struct terminal_reader); r->reader.class = &terminal_reader_class; - r->reader.syntax = LEX_SYNTAX_INTERACTIVE; + r->reader.syntax = SEG_MODE_INTERACTIVE; r->reader.error = LEX_ERROR_TERMINAL; r->reader.file_name = NULL; r->s = ss_empty ();