This commit is contained in:
Lukian LEIZOUR 2023-11-20 14:42:20 +01:00
parent aa5045a797
commit dec244496a
10 changed files with 148 additions and 76 deletions

26
main.c
View file

@ -2,33 +2,27 @@
#include <stdio.h>
#include "conf.h"
#include "screenManager.h"
#include "fileManager.h"
int main()
{
ptConf confChain = newConfChain();
ptListener listenerChain = newListenerChain();
readConfs(confChain);
addConf(confChain, "test", "tesst", 21, 120, 2023);
addConf(confChain, "test", "tesst", 21, 120, 2023);
addConf(confChain, "test", "tesst", 21, 120, 2023);
addListener(listenerChain, "Roger", 19, 4);
addListener(listenerChain, "Roger", 19, 4);
addListener(listenerChain, "Roger", 19, 4);
ptConf px = confChain;
ptListener py = listenerChain;
while (px -> next != NULL) {
printf("title : %s\nspeaker : %s\n", px -> title, px -> speaker);
printf("%d/%d/%d\n", px -> day, px -> month, px -> year);
px = px -> next;
}
while (py -> next != NULL) {
printf("name: %s\nage: %d\nlevel: %d", py -> name, py -> age, py -> level);
py = py -> next;
}
//menu();
//menu(confChain, listenerChain);
saveConf(confChain);
saveListeners(listenerChain);
return 0;
}
}