From: Jérôme Benoit Date: Fri, 2 Mar 2018 11:51:07 +0000 (+0100) Subject: Code cleanups. X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=654a57aed094d4c4bfb4d71a7fdd54b1069465e0;p=TP_AL_C.git Code cleanups. Signed-off-by: Jérôme Benoit --- diff --git a/lexer/main.c b/lexer/main.c index 40550f5..26fd81a 100644 --- a/lexer/main.c +++ b/lexer/main.c @@ -9,7 +9,7 @@ #include "syntactic_analyzer.h" #include "print_helper.h" -void do_lexical_analysis() { +static void do_lexical_analysis() { c = fgetwc(source); // lecture du premier caractere do { scanner(); @@ -19,7 +19,7 @@ void do_lexical_analysis() { } while (tokenType != FIN); // tant que la fin du fichier n'est pas atteinte } -void do_syntactic_analysis() { +static void do_syntactic_analysis() { fputws(L"\n\n", target); c = fgetwc(source); // lecture du premier caractere @@ -28,7 +28,7 @@ void do_syntactic_analysis() { fputws(L"\n", target); } -void print_usage(const char* name) { +static void print_usage(const char* name) { fprintf(stdout,"Usage: %s [options]\n" "Where [options] are:\n" " -h, --help: display this help message\n" diff --git a/lexer/print_helper.c b/lexer/print_helper.c index 40d0523..8d6ddb4 100644 --- a/lexer/print_helper.c +++ b/lexer/print_helper.c @@ -1,5 +1,4 @@ #include -#include #include #include "print_helper.h" diff --git a/lexer/print_helper.h b/lexer/print_helper.h index d5cc42a..384c50b 100644 --- a/lexer/print_helper.h +++ b/lexer/print_helper.h @@ -2,6 +2,7 @@ #define PRINT_HELPER_H_ #include +#include void pr_warning(const char *format, ...); void pr_error(const char *format, ...);