From 224a9916c711eb5a0fe0c2065fdb62a0cf40afaf Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Wed, 15 Nov 2017 21:29:02 +0100 Subject: [PATCH] Translate all printed messages in english. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- lexer/lexical_analyzer.c | 6 ++++-- lexer/main.c | 4 ++-- lexer/print_helper.h | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lexer/lexical_analyzer.c b/lexer/lexical_analyzer.c index 36acd5e..905647e 100644 --- a/lexer/lexical_analyzer.c +++ b/lexer/lexical_analyzer.c @@ -200,11 +200,13 @@ FIN: error: if (tokenType == MOT || tokenType == MOTCLE) { - wpr_error(L"Scanner error with token type: %s and value: %ls\n", + wpr_error(L"%s error with token type: %s and value: %ls\n", + __func__, tokenTypestr[tokenType], token[tokenFound].value); } else { - wpr_error(L"Scanner error with token type: %s\n", + wpr_error(L"%s error with token type: %s\n", + __func__, tokenTypestr[tokenType]); } tokenType = FIN; diff --git a/lexer/main.c b/lexer/main.c index c5a0457..d3f086e 100644 --- a/lexer/main.c +++ b/lexer/main.c @@ -101,7 +101,7 @@ int main(int argc, char **argv) { // Ouvre le fichier source en lecture seulement (le fichier doit exister) : source = fopen(in_file, "r+"); if (source == NULL) { - pr_error("Impossible d'ouvrir le fichier %s\n", in_file); + pr_error("Fail to open file %s\n", in_file); return EXIT_FAILURE; } } else { @@ -113,7 +113,7 @@ int main(int argc, char **argv) { // avec suppression du contenu au prealable : target = fopen(out_file, "w+"); if (target == NULL) { - pr_error("Impossible d'ouvrir le fichier %s\n", out_file); + pr_error("Fail to open file %s\n", out_file); return EXIT_FAILURE; } } else { diff --git a/lexer/print_helper.h b/lexer/print_helper.h index 1015199..e92cc84 100644 --- a/lexer/print_helper.h +++ b/lexer/print_helper.h @@ -7,4 +7,4 @@ void pr_error(const char *format, ...); void wpr_warning(const wchar_t *format, ...); void wpr_error(const wchar_t *format, ...); -#endif +#endif /* PRINT_HELPER_H_ */ -- 2.34.1