Règlement des problèmes de compliation

master
Corentin LEMAIRE 2 years ago
parent 226a29d9aa
commit ffe7451fc4

@ -1,15 +1,11 @@
/**
*@file : sae.c
*@author : Erwan.M
*@date : 07/11/22
* sujet : SAE 1.01
*@brief : Résumé : Fichier .c regroupant les fonctions du programme
* \file sae102.h
* \author Erwan. M & Corentin. L
* \date 11/12/22
* \brief Résumé : Fichier .c regroupant les fonctions du programme
*/
#include "SAE2.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "sae102.h"
void menuPrincipal(void){
@ -45,7 +41,7 @@ void menuPrincipal(void){
case 2:
printf("\e[1;1H\e[2J"); // Clear terminal
clear(); // Clear terminal
sousMenuAdministrateur(); // Sous Menu Administrateur
@ -59,7 +55,7 @@ void menuPrincipal(void){
default:
printf("\e[1;1H\e[2J"); // Clear terminal
clear(); // Clear terminal
printf("-------------------------------\n");
@ -94,7 +90,7 @@ void sousMenuAdministrateur(void){
if(strcmp("M.Hasbani>", motDePasseAdmin) != 0){
printf("\e[1;1H\e[2J"); // Clear terminal
clear(); // Clear terminal
printf("---------------------------------------------------\n");
@ -112,7 +108,7 @@ void sousMenuAdministrateur(void){
}
printf("\e[1;1H\e[2J"); // Clear terminal
clear(); // Clear terminal
while(choix != 9){
@ -174,13 +170,13 @@ void sousMenuAdministrateur(void){
case 9:
printf("\e[1;1H\e[2J"); // Clear terminal
clear(); // Clear terminal
return;
default:
printf("\e[1;1H\e[2J"); // Clear terminal
clear(); // Clear terminal
printf("-------------------------------\n");
@ -263,13 +259,13 @@ void switchUtilisateur(int choix){
case 9:
printf("\e[1;1H\e[2J"); // Clear terminal
clear(); // Clear terminal
return;
default:
printf("\e[1;1H\e[2J"); // Clear terminal
clear(); // Clear terminal
printf("-------------------------------\n");
@ -346,11 +342,11 @@ ListeDept insererEnTete(ListeDept l, char* departement, int nbP, char* nomResp){
}
*m -> departement = departement;
strcpy(m -> departement, departement);
m -> nbP = nbP;
*m -> nomResp = nomResp;
strcpy(m -> nomResp, nomResp);
m -> suiv = l;
@ -392,12 +388,18 @@ MaillonDept modifResp(MaillonDept m){
nomResp[strlen(nomResp) - 1 ] = '\0';
*m.nomResp = nomResp;
strcpy(m.nomResp, nomResp);
return m;
}
void clear(void){
printf("\e[1;1H\e[2J");
}
/* EN COURS
void rechercherVille(int* tiut, int tlog, int val, int *coderet, int *pos){
int i;

@ -1,11 +1,18 @@
/**
*@file : SAE2.h
*@author : Erwan.M
*@date : 11/12/22
* sujet : SAE 1.02
*@brief : Résumé : Fichier .h regroupant les fonctions utilisées dans SAE2.c
* \file sae102.h
* \author Erwan. M & Corentin. L
* \date 11/12/22
* \brief Résumé : Fichier .h regroupant les fonctions utilisées dans SAE2.c
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
typedef struct maillon{
char departement[32];
@ -37,4 +44,16 @@ void affichageSousMenuUtilisateur(void);
void switchUtilisateur(int choix);
void sousMenuUtilisateur(void);
void sousMenuUtilisateur(void);
void clear(void);
ListeDept Listenouv(void);
ListeDept inserer(ListeDept l, char* departement, int nbP, char* nomResp);
ListeDept insererEnTete(ListeDept l, char* departement, int nbP, char* nomResp);
MaillonDept modifNbPlaces(MaillonDept m);
MaillonDept modifResp(MaillonDept m);

@ -1,17 +1,48 @@
/**
*@file : TESTSAE2.c
*@author : Erwan.M
*@date : 11/12/22
* sujet : SAE 1.02
*@brief : Résumé : Fichier .c regroupant la fonction main pour lancer le programme et les tests
* \file sae102.h
* \author Erwan. M & Corentin. L
* \date 11/12/22
* \brief Résumé : Fichier .c regroupant la fonction main pour lancer le programme et les tests
*/
#include "SAE2.h"
#include <stdlib.h>
#include <stdio.h>
#include "sae102.h"
void testListeNouv(void){
ListeDept l;
l = Listenouv();
if (l == NULL) printf("OK\n");
else printf("Bug...\n");
}
void testInsererEnTete(void){
char departement[22], nomResp[22];
int nbP;
ListeDept l = Listenouv();
strcpy(departement, "infotest\0");
nbP = 50;
strcpy(nomResp, "Mireille Mathieu\0");
l = insererEnTete(l, departement, nbP, nomResp);
}
ListeDept insererEnTete(ListeDept l, char* departement, int nbP, char* nomResp){
int main(void){
menuPrincipal();
testListeNouv();
//menuPrincipal();
}
Loading…
Cancel
Save