X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=inline;f=src%2Flanguage%2Futilities%2Fhost.c;h=f9b10480d2507c95d20dc677767c41c98639565f;hb=3c5fcaa67efcee56981c16b543fb9f679787a486;hp=dc9d4898ad1e058f77803ec61565acea4b953de1;hpb=d8493b3b0617cc447446a70b031a69079bc19002;p=pspp-builds.git diff --git a/src/language/utilities/host.c b/src/language/utilities/host.c index dc9d4898..f9b10480 100644 --- a/src/language/utilities/host.c +++ b/src/language/utilities/host.c @@ -129,15 +129,15 @@ cmd_host (struct lexer *lexer, struct dataset *ds UNUSED) return CMD_FAILURE; } - if (lex_token (lexer) == '.') + if (lex_token (lexer) == T_ENDCMD) return shell () ? CMD_SUCCESS : CMD_FAILURE; else if (lex_match_id (lexer, "COMMAND")) { struct string command; bool ok; - lex_match (lexer, '='); - if (!lex_force_match (lexer, '[')) + lex_match (lexer, T_EQUALS); + if (!lex_force_match (lexer, T_LBRACK)) return CMD_FAILURE; ds_init_empty (&command); @@ -145,10 +145,10 @@ cmd_host (struct lexer *lexer, struct dataset *ds UNUSED) { if (!ds_is_empty (&command)) ds_put_byte (&command, '\n'); - ds_put_substring (&command, ds_ss (lex_tokstr (lexer))); + ds_put_substring (&command, lex_tokss (lexer)); lex_get (lexer); } - if (!lex_force_match (lexer, ']')) + if (!lex_force_match (lexer, T_RBRACK)) { ds_destroy (&command); return CMD_FAILURE;