From: Jérôme Benoit Date: Wed, 15 Nov 2017 20:29:02 +0000 (+0100) Subject: Translate all printed messages in english. X-Git-Url: https://git.piment-noir.org/?p=TP_AL_C.git;a=commitdiff_plain;h=224a9916c711eb5a0fe0c2065fdb62a0cf40afaf Translate all printed messages in english. Signed-off-by: Jérôme Benoit --- 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_ */