Modification de la fonction de débug

doc
Rémi LAVERGNE 1 year ago
parent 3325bab405
commit 183fac3f49
No known key found for this signature in database
GPG Key ID: 8861D8A4AD21A032

@ -5,7 +5,7 @@
#include "main.h" #include "main.h"
void displayItemList(int reference[], float weight[], float volume[], float unitPrice[], int log) void displayItemListDEBUG(int reference[], float weight[], float volume[], float unitPrice[], int log)
{ {
int i; int i;
printf("DEBUG - Affichage des articles: \n"); printf("DEBUG - Affichage des articles: \n");
@ -15,7 +15,7 @@ void displayItemList(int reference[], float weight[], float volume[], float unit
} }
} }
void displayClientList(int clientID[], float cagnotte[], int suspended[], int isAdmin[], int log) void displayClientListDEBUG(int clientID[], float cagnotte[], int suspended[], int isAdmin[], int log)
{ {
int i; int i;
printf("DEBUG - Affichage des clients: \n"); printf("DEBUG - Affichage des clients: \n");
@ -27,9 +27,7 @@ void displayClientList(int clientID[], float cagnotte[], int suspended[], int is
void debugMenu(int tabReference[], float tabWeight[], float tabVolume[], float unitPrice[], int clientID[], float cagnotte[], int suspended[], int isAdmin[], int tlogArticle, int tlogClient) void debugMenu(int tabReference[], float tabWeight[], float tabVolume[], float unitPrice[], int clientID[], float cagnotte[], int suspended[], int isAdmin[], int tlogArticle, int tlogClient)
{ {
int choice = -1; int choice;
while (choice != 0)
{
printf("DEBUG - Menu de debug: \n"); printf("DEBUG - Menu de debug: \n");
printf("1 - Afficher les articles\n"); printf("1 - Afficher les articles\n");
printf("2 - Afficher les clients\n"); printf("2 - Afficher les clients\n");
@ -39,13 +37,12 @@ void debugMenu(int tabReference[], float tabWeight[], float tabVolume[], float u
switch (choice) switch (choice)
{ {
case 1: case 1:
displayItemList(tabReference, tabWeight, tabVolume, unitPrice, tlogArticle); displayItemListDEBUG(tabReference, tabWeight, tabVolume, unitPrice, tlogArticle);
break; break;
case 2: case 2:
displayClientList(clientID, cagnotte, suspended, isAdmin, tlogClient); displayClientListDEBUG(clientID, cagnotte, suspended, isAdmin, tlogClient);
break; break;
default: default:
break; break;
} }
} }
}

@ -102,7 +102,7 @@ void global(void)
case 4: case 4:
return; return;
case 9: case 9:
printf("Temp"); debugMenu(reference, weight, volume, unitPrice, clientID, cagnotte, suspended, isAdmin, tLogArticle, tLogClient);
break; break;
default: default:
printf("Erreur, veuillez entrer un choix valide.\n"); printf("Erreur, veuillez entrer un choix valide.\n");

@ -15,6 +15,11 @@
void errorHandling(int error); void errorHandling(int error);
void debugHandling(int code); void debugHandling(int code);
//! DEBUG
void displayItemListDEBUG(int reference[], float weight[], float volume[], float unitPrice[], int log);
void displayClientListDEBUG(int clientID[], float cagnotte[], int suspended[], int isAdmin[], int log);
void debugMenu(int tabReference[], float tabWeight[], float tabVolume[], float unitPrice[], int clientID[], float cagnotte[], int suspended[], int isAdmin[], int tlogArticle, int tlogClient);
//! TRAITEMENT DES FICHIERS //! TRAITEMENT DES FICHIERS
void chargeDonnees(int *tLogArticle, int *tLogClient,int reference[], float weight[], float volume[], float unitPrice[], int clientID[], float cagnotte[], int suspended[], int isAdmin[]); void chargeDonnees(int *tLogArticle, int *tLogClient,int reference[], float weight[], float volume[], float unitPrice[], int clientID[], float cagnotte[], int suspended[], int isAdmin[]);
int chargeArticles(int reference[], float weight[], float volume[], float unitPrice[]); int chargeArticles(int reference[], float weight[], float volume[], float unitPrice[]);

Loading…
Cancel
Save