From 1e8fe508f0288ec4e618daf62382ad7c5f6175a5 Mon Sep 17 00:00:00 2001 From: axel Date: Sat, 18 Nov 2006 00:59:05 +1000 Subject: [PATCH] Tweak error messages in tokenizer a bit darcs-hash:20061117145905-ac50b-ee735bf04d2dcbabc272c4f12cb64a8af51b83bf.gz --- tokenizer.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/tokenizer.c b/tokenizer.c index 81f61f644..c497408c2 100644 --- a/tokenizer.c +++ b/tokenizer.c @@ -28,22 +28,17 @@ segments. /** Error string for unexpected end of string */ -#define EOL_ERROR _( L"Unexpected end of token" ) - -/** - Error string for unexpected end of string -*/ -#define QUOTE_ERROR _( L"Unterminated quote" ) +#define QUOTE_ERROR _( L"Unexpected end of string, quotes are not balanced" ) /** Error string for mismatched parenthesis */ -#define PARAN_ERROR _( L"Parenthesis mismatch" ) +#define PARAN_ERROR _( L"Unexpected end of string, parenthesis do not match" ) /** Error string for invalid redirections */ -#define REDIRECT_ERROR _( L"Invalid redirection" ) +#define REDIRECT_ERROR _( L"Invalid input/output redirection" ) /** Error string for when trying to pipe from fd 0 @@ -251,7 +246,7 @@ static void read_string( tokenizer *tok ) tok->buff++; if( *tok->buff == L'\0' ) { - tok_error( tok, TOK_UNTERMINATED_ESCAPE, EOL_ERROR ); + tok_error( tok, TOK_UNTERMINATED_ESCAPE, QUOTE_ERROR ); return; } else if( *tok->buff == L'\n' && mode == 0)