From ced95f1a97e78568ea544af844997f084c8ee7c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20LACROIX?= Date: Tue, 18 Apr 2023 11:44:32 +0200 Subject: [PATCH] updated gitignore and blocs --- .gitignore | 4 +++- blocs.c | 2 +- blocs.h | 2 +- testFile | 8 +++----- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 45bd014..5d6347a 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,6 @@ out yacc.tab.c yacc.tab.h -yacc.output \ No newline at end of file +yacc.output +testFile +testFile.old \ No newline at end of file diff --git a/blocs.c b/blocs.c index 783783e..6252e5f 100644 --- a/blocs.c +++ b/blocs.c @@ -16,7 +16,7 @@ int labelCount = 0; char* getNextLabel(){ - char label[NAME_MAX_LENGTH]; + char label[LABEL_MAX_LENGTH]; sprintf(label, "%d_LABEL", labelCount); } diff --git a/blocs.h b/blocs.h index 8aa77ff..808c789 100644 --- a/blocs.h +++ b/blocs.h @@ -6,7 +6,7 @@ #define PROJET_SYSTEMES_INFORMATIQUES_BLOCS_H int labelCount; -#define NAME_MAX_LENGTH 20 +#define LABEL_MAX_LENGTH 20 #endif //PROJET_SYSTEMES_INFORMATIQUES_BLOCS_H diff --git a/testFile b/testFile index 6f11653..a936506 100644 --- a/testFile +++ b/testFile @@ -1,15 +1,13 @@ + int compute(int a, int d) { int b; int c; b = a; - while (c > 0) { - b = b + a * 4; - } + b = b + a * 4; return b; } - -void main(int a) { +void main(void) { int a; if (a == 3) { print(a);