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"
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;
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;
printf("DEBUG - Affichage des clients: \n");
@ -27,25 +27,22 @@ 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)
{
int choice = -1;
while (choice != 0)
{
printf("DEBUG - Menu de debug: \n");
printf("1 - Afficher les articles\n");
printf("2 - Afficher les clients\n");
printf("Votre choix: ");
scanf("%d%*c", &choice);
int choice;
printf("DEBUG - Menu de debug: \n");
printf("1 - Afficher les articles\n");
printf("2 - Afficher les clients\n");
printf("Votre choix: ");
scanf("%d%*c", &choice);
switch (choice)
{
case 1:
displayItemList(tabReference, tabWeight, tabVolume, unitPrice, tlogArticle);
break;
case 2:
displayClientList(clientID, cagnotte, suspended, isAdmin, tlogClient);
break;
default:
break;
}
switch (choice)
{
case 1:
displayItemListDEBUG(tabReference, tabWeight, tabVolume, unitPrice, tlogArticle);
break;
case 2:
displayClientListDEBUG(clientID, cagnotte, suspended, isAdmin, tlogClient);
break;
default:
break;
}
}

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

@ -15,6 +15,11 @@
void errorHandling(int error);
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
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[]);

Loading…
Cancel
Save