updated gitignore and blocs

This commit is contained in:
Raphaël LACROIX 2023-04-18 11:44:32 +02:00
parent 5d0902c868
commit ced95f1a97
4 changed files with 8 additions and 8 deletions

4
.gitignore vendored
View file

@ -3,4 +3,6 @@
out out
yacc.tab.c yacc.tab.c
yacc.tab.h yacc.tab.h
yacc.output yacc.output
testFile
testFile.old

View file

@ -16,7 +16,7 @@
int labelCount = 0; int labelCount = 0;
char* getNextLabel(){ char* getNextLabel(){
char label[NAME_MAX_LENGTH]; char label[LABEL_MAX_LENGTH];
sprintf(label, "%d_LABEL", labelCount); sprintf(label, "%d_LABEL", labelCount);
} }

View file

@ -6,7 +6,7 @@
#define PROJET_SYSTEMES_INFORMATIQUES_BLOCS_H #define PROJET_SYSTEMES_INFORMATIQUES_BLOCS_H
int labelCount; int labelCount;
#define NAME_MAX_LENGTH 20 #define LABEL_MAX_LENGTH 20
#endif //PROJET_SYSTEMES_INFORMATIQUES_BLOCS_H #endif //PROJET_SYSTEMES_INFORMATIQUES_BLOCS_H

View file

@ -1,15 +1,13 @@
int compute(int a, int d) { int compute(int a, int d) {
int b; int b;
int c; int c;
b = a; b = a;
while (c > 0) { b = b + a * 4;
b = b + a * 4;
}
return b; return b;
} }
void main(void) {
void main(int a) {
int a; int a;
if (a == 3) { if (a == 3) {
print(a); print(a);