diff --git a/build/globals.o b/build/globals.o index 4a0c38a..d2bfa40 100644 Binary files a/build/globals.o and b/build/globals.o differ diff --git a/build/logic.o b/build/logic.o index 93bc5bd..a65a17f 100644 Binary files a/build/logic.o and b/build/logic.o differ diff --git a/build/testLogic.o b/build/testLogic.o index f6118ee..805053b 100644 Binary files a/build/testLogic.o and b/build/testLogic.o differ diff --git a/build/windows.o b/build/windows.o index 5558db7..10862d1 100644 Binary files a/build/windows.o and b/build/windows.o differ diff --git a/gino.txt b/gino.txt new file mode 100644 index 0000000..458ca50 --- /dev/null +++ b/gino.txt @@ -0,0 +1 @@ +fanculo moretti diff --git a/productManager b/productManager new file mode 100755 index 0000000..3c875cf Binary files /dev/null and b/productManager differ diff --git a/src/logic.c b/src/logic.c index 967334d..653b437 100644 --- a/src/logic.c +++ b/src/logic.c @@ -13,6 +13,8 @@ * TODO: Aggiungere copie venduto di prodotto a file * TODO: Cambiare nome dei file con interagisce * TODO: Calcolare la somma delle entrate dati i file +* TODO: Aggiungere la possibilità di aggiungere gli acquisti non compiuti con intenzioni di acquisto. +* e.g. persona vuole acquistare maglietta S ma non c'è la taglia */ char *products; @@ -36,12 +38,7 @@ void createFile(const char *fname) { char* getProducts(const char *fname) { /* FILE *file; - if((file=fopen(fname, "r"))==NULL) { - printf("Errore nell'apertura del file"); - exit(1); - } - -// TODO QUESTO CODICE NON E' MIO, RICONTROLLARE FUNZIONAMENTO fread() + file = fopen(fname, "r") while(!feof(file)){ n = fread(buffer, sizeof(char), sizeof(buffer), file); @@ -49,8 +46,7 @@ char* getProducts(const char *fname) { if (buffer[i] == c) count++; } - fclose(file); -*/ + fclose(file);*/ } int getCount(){ diff --git a/src/windows.c b/src/windows.c index e413f60..550bc05 100644 --- a/src/windows.c +++ b/src/windows.c @@ -122,7 +122,7 @@ void runOptionsMenu(){ curs_set(0); wattroff(optionsWin, COLOR_PAIR(2)); - if (exists(input)) { + if (existsFile(input)) { statusf("Il file '%s' esiste e verra' utilizzato al posto di '%s'", input, productPricesFileLocation); strcpy(productPricesFileLocation, input); } diff --git a/src/testLogic.c b/testLogic.c similarity index 100% rename from src/testLogic.c rename to testLogic.c