From 07d94b4b31cf63548e0d29c610d19d3ce4250384 Mon Sep 17 00:00:00 2001 From: pierre-geeraert Date: Fri, 16 Dec 2016 22:27:26 +0100 Subject: [PATCH] =?UTF-8?q?=09supprim=C3=A9=C2=A0:=20=20=20=20=20=20=20=20?= =?UTF-8?q?0=20=09supprim=C3=A9=C2=A0:=20=20=20=20=20=20=20=201=20=09suppr?= =?UTF-8?q?im=C3=A9=C2=A0:=20=20=20=20=20=20=20=202=20=09supprim=C3=A9?= =?UTF-8?q?=C2=A0:=20=20=20=20=20=20=20=202points=20=09supprim=C3=A9=C2=A0?= =?UTF-8?q?:=20=20=20=20=20=20=20=203=20=09supprim=C3=A9=C2=A0:=20=20=20?= =?UTF-8?q?=20=20=20=20=204=20=09supprim=C3=A9=C2=A0:=20=20=20=20=20=20=20?= =?UTF-8?q?=205=20=09supprim=C3=A9=C2=A0:=20=20=20=20=20=20=20=206=20=09su?= =?UTF-8?q?pprim=C3=A9=C2=A0:=20=20=20=20=20=20=20=207=20=09supprim=C3=A9?= =?UTF-8?q?=C2=A0:=20=20=20=20=20=20=20=208=20=09supprim=C3=A9=C2=A0:=20?= =?UTF-8?q?=20=20=20=20=20=20=209=20=09supprim=C3=A9=C2=A0:=20=20=20=20=20?= =?UTF-8?q?=20=20=20Lecteur=205*3=20=09supprim=C3=A9=C2=A0:=20=20=20=20=20?= =?UTF-8?q?=20=20=20Tables=2068*20=20=09supprim=C3=A9=C2=A0:=20=20=20=20?= =?UTF-8?q?=20=20=20=20dynamique/0=20=09supprim=C3=A9=C2=A0:=20=20=20=20?= =?UTF-8?q?=20=20=20=20dynamique/dynamique.c=20=09supprim=C3=A9=C2=A0:=20?= =?UTF-8?q?=20=20=20=20=20=20=20dynamique/exia.h=20=09supprim=C3=A9=C2=A0:?= =?UTF-8?q?=20=20=20=20=20=20=20=20dynamique/heure.c=20=09supprim=C3=A9?= =?UTF-8?q?=C2=A0:=20=20=20=20=20=20=20=20dynamique/heure2.c=20=09supprim?= =?UTF-8?q?=C3=A9=C2=A0:=20=20=20=20=20=20=20=20ecrit.c=20=09supprim=C3=A9?= =?UTF-8?q?=C2=A0:=20=20=20=20=20=20=20=20ex1.pbm=20=09supprim=C3=A9=C2=A0?= =?UTF-8?q?:=20=20=20=20=20=20=20=20exiasaver.c=20=09supprim=C3=A9=C2=A0:?= =?UTF-8?q?=20=20=20=20=20=20=20=20fonctions=20affichage=20heure=20=09supp?= =?UTF-8?q?rim=C3=A9=C2=A0:=20=20=20=20=20=20=20=20fonctions=20centage=20?= =?UTF-8?q?=09supprim=C3=A9=C2=A0:=20=20=20=20=20=20=20=20heure=20=09suppr?= =?UTF-8?q?im=C3=A9=C2=A0:=20=20=20=20=20=20=20=20heure-vrai.c=20=09suppri?= =?UTF-8?q?m=C3=A9=C2=A0:=20=20=20=20=20=20=20=20heure.c=20=09supprim?= =?UTF-8?q?=C3=A9=C2=A0:=20=20=20=20=20=20=20=20heure1.c=20=09supprim?= =?UTF-8?q?=C3=A9=C2=A0:=20=20=20=20=20=20=20=20historic.c=20=09supprim?= =?UTF-8?q?=C3=A9=C2=A0:=20=20=20=20=20=20=20=20history.txt=20=09supprim?= =?UTF-8?q?=C3=A9=C2=A0:=20=20=20=20=20=20=20=20image1=20=09supprim=C3=A9?= =?UTF-8?q?=C2=A0:=20=20=20=20=20=20=20=20image2=20=09supprim=C3=A9=C2=A0:?= =?UTF-8?q?=20=20=20=20=20=20=20=20image3=20=09supprim=C3=A9=C2=A0:=20=20?= =?UTF-8?q?=20=20=20=20=20=20image4=20=09supprim=C3=A9=C2=A0:=20=20=20=20?= =?UTF-8?q?=20=20=20=20image5=20=09supprim=C3=A9=C2=A0:=20=20=20=20=20=20?= =?UTF-8?q?=20=20"lan\303\247eur.sh"=20=09supprim=C3=A9=C2=A0:=20=20=20=20?= =?UTF-8?q?=20=20=20=20launcher.c=20=09supprim=C3=A9=C2=A0:=20=20=20=20=20?= =?UTF-8?q?=20=20=20launcher2.c=20=09supprim=C3=A9=C2=A0:=20=20=20=20=20?= =?UTF-8?q?=20=20=20lecture.c=20=09supprim=C3=A9=C2=A0:=20=20=20=20=20=20?= =?UTF-8?q?=20=20menu=20stat=20=09supprim=C3=A9=C2=A0:=20=20=20=20=20=20?= =?UTF-8?q?=20=20pierre/jd=20=09supprim=C3=A9=C2=A0:=20=20=20=20=20=20=20?= =?UTF-8?q?=20statique/fonctions=20centage=20=09supprim=C3=A9=C2=A0:=20=20?= =?UTF-8?q?=20=20=20=20=20=20statique/lecture2.c?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fichiers non suivis: final/ vrac/ --- 0 | 7 - 1 | 7 - 2 | 7 - 2points | 7 - 3 | 8 - 4 | 7 - 5 | 7 - 6 | 7 - 7 | 7 - 8 | 7 - 9 | 7 - Lecteur 5*3 | 56 ------- Tables 68*20 | 43 ----- dynamique/0 | 7 - dynamique/dynamique.c | 126 -------------- dynamique/exia.h | 328 ------------------------------------- dynamique/heure.c | 85 ---------- dynamique/heure2.c | 75 --------- ecrit.c | 10 -- ex1.pbm | 8 - exiasaver.c | 82 ---------- fonctions affichage heure | 268 ------------------------------ fonctions centage | 36 ---- heure | 59 ------- heure-vrai.c | 51 ------ heure.c | 96 ----------- heure1.c | 74 --------- historic.c | 40 ----- history.txt | 3 - image1 | 23 --- image2 | 23 --- image3 | 23 --- image4 | 23 --- image5 | 23 --- lançeur.sh | 165 ------------------- launcher.c | 105 ------------ launcher2.c | 106 ------------ lecture.c | 185 --------------------- menu stat | 40 ----- pierre/jd | 1 - statique/fonctions centage | 34 ---- statique/lecture2.c | 132 --------------- 42 files changed, 2408 deletions(-) delete mode 100644 0 delete mode 100644 1 delete mode 100644 2 delete mode 100644 2points delete mode 100644 3 delete mode 100644 4 delete mode 100644 5 delete mode 100644 6 delete mode 100644 7 delete mode 100644 8 delete mode 100644 9 delete mode 100644 Lecteur 5*3 delete mode 100644 Tables 68*20 delete mode 100644 dynamique/0 delete mode 100644 dynamique/dynamique.c delete mode 100644 dynamique/exia.h delete mode 100644 dynamique/heure.c delete mode 100644 dynamique/heure2.c delete mode 100644 ecrit.c delete mode 100644 ex1.pbm delete mode 100644 exiasaver.c delete mode 100644 fonctions affichage heure delete mode 100644 fonctions centage delete mode 100644 heure delete mode 100644 heure-vrai.c delete mode 100644 heure.c delete mode 100644 heure1.c delete mode 100644 historic.c delete mode 100644 history.txt delete mode 100644 image1 delete mode 100644 image2 delete mode 100644 image3 delete mode 100644 image4 delete mode 100644 image5 delete mode 100644 lançeur.sh delete mode 100644 launcher.c delete mode 100644 launcher2.c delete mode 100644 lecture.c delete mode 100644 menu stat delete mode 100644 pierre/jd delete mode 100644 statique/fonctions centage delete mode 100644 statique/lecture2.c diff --git a/0 b/0 deleted file mode 100644 index 9ef5f26..0000000 --- a/0 +++ /dev/null @@ -1,7 +0,0 @@ -P1 -3 5 -1 1 1 -1 0 1 -1 0 1 -1 0 1 -1 1 1 diff --git a/1 b/1 deleted file mode 100644 index 67111b2..0000000 --- a/1 +++ /dev/null @@ -1,7 +0,0 @@ -P1 -3 5 -0 1 0 -1 1 0 -0 1 0 -0 1 0 -1 1 1 diff --git a/2 b/2 deleted file mode 100644 index 9b3ae14..0000000 --- a/2 +++ /dev/null @@ -1,7 +0,0 @@ -P1 -3 5 -1 1 1 -0 0 1 -1 1 1 -1 0 0 -1 1 1 diff --git a/2points b/2points deleted file mode 100644 index 4e6c387..0000000 --- a/2points +++ /dev/null @@ -1,7 +0,0 @@ -P1 -3 5 -0 0 0 -0 1 0 -0 0 0 -0 1 0 -0 0 0 diff --git a/3 b/3 deleted file mode 100644 index 252314d..0000000 --- a/3 +++ /dev/null @@ -1,8 +0,0 @@ -P1 -3 5 -1 1 1 -0 0 1 -0 1 1 -0 0 1 -1 1 1 - diff --git a/4 b/4 deleted file mode 100644 index 86f06ad..0000000 --- a/4 +++ /dev/null @@ -1,7 +0,0 @@ -P1 -3 5 -1 0 1 -1 0 1 -1 1 1 -0 0 1 -0 0 1 diff --git a/5 b/5 deleted file mode 100644 index 6e1e11f..0000000 --- a/5 +++ /dev/null @@ -1,7 +0,0 @@ -P1 -3 5 -1 1 1 -1 0 0 -1 1 1 -0 0 1 -1 1 1 diff --git a/6 b/6 deleted file mode 100644 index bed0e9b..0000000 --- a/6 +++ /dev/null @@ -1,7 +0,0 @@ -P1 -3 5 -1 1 1 -1 0 0 -1 1 1 -1 0 1 -1 1 1 diff --git a/7 b/7 deleted file mode 100644 index 5f5ef14..0000000 --- a/7 +++ /dev/null @@ -1,7 +0,0 @@ -P1 -3 5 -1 1 1 -1 0 1 -0 0 1 -0 0 1 -0 0 1 diff --git a/8 b/8 deleted file mode 100644 index 0a03e18..0000000 --- a/8 +++ /dev/null @@ -1,7 +0,0 @@ -P1 -3 5 -1 1 1 -1 0 1 -1 1 1 -1 0 1 -1 1 1 diff --git a/9 b/9 deleted file mode 100644 index d0e88e0..0000000 --- a/9 +++ /dev/null @@ -1,7 +0,0 @@ -P1 -3 5 -1 1 1 -1 0 1 -1 1 1 -0 0 1 -1 1 1 diff --git a/Lecteur 5*3 b/Lecteur 5*3 deleted file mode 100644 index 8470598..0000000 --- a/Lecteur 5*3 +++ /dev/null @@ -1,56 +0,0 @@ -#include -#include - -void afficherTableau(int* tableau2); -int main(void) -{//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------main - - - int* tableau2 = malloc(sizeof(int)*03*05); - FILE* fichier = fopen("0","r+"); - char c = 0; -int i=0; -int cpt = 0; - - while ( cpt < 2) {//--------------------------------while - c= fgetc(fichier); - if (c == '\n') - {//------------------------------------------------if - cpt++; }//----------------------------------------------if - }//-------------------------------------------------while - - - do {//-------------------------------------------------------------------do/while - c= fgetc(fichier); - if(c == '0' || c == '1') {//--------------------if - tableau2[i++] = c; - - }//---------------------------------------------if - }while(c != EOF);//------------------------------------------------------do/while - - afficherTableau(tableau2); - free(tableau2); - return EXIT_SUCCESS; /* Equivalent à return 0 sous Windows, permet un code portable */ - -} -void afficherTableau(int* tableau2) -{//------------------------------------------------------------------------------------void - - char c; - int i = 0; - int j = 0; - - for (i = 0; i < 5; i++) {//------------------------------------------------------for - for(j = 0; j < 3; j++){ //------------for - - if (tableau2[i*03+j]=='0'){ - printf(" "); - } - else { - printf("%c",987); - } - }//------------------------------------------------------------------------------for - printf("\n"); - - }//------------------------------------------------------------------for -}//--------------------------------------------------------------------------------------------------------------------------------------------------------------main diff --git a/Tables 68*20 b/Tables 68*20 deleted file mode 100644 index 2da4d21..0000000 --- a/Tables 68*20 +++ /dev/null @@ -1,43 +0,0 @@ -#include -#include - -void afficherTableau(int* tableau1); -int main(void) -{ - int* tableau1 = malloc(sizeof(int)*68*20); - FILE* fichier = fopen("image1(2)","r+"); - char c = 0; -int i=0; -int cpt = 0; - while ( cpt < 2) { - c= fgetc(fichier); - if (c == '\n') - cpt++; - } - - - do { - c= fgetc(fichier); - if(c == '0' || c == '1') { - tableau1[i++] = c; - } - }while(c != EOF); - - afficherTableau(tableau1); - free(tableau1); - return EXIT_SUCCESS; /* Equivalent à return 0 sous Windows, permet un code portable */ -} - -void afficherTableau(int* tableau1) -{ - int i = 0; - int j = 0; - - for (i = 0; i < 20; i++) { - for(j = 0; j < 68; j++) { - printf("Tableau1[%d][%d] = %c\n", i, j, tableau1[i*68+j]); - - - } - } -} diff --git a/dynamique/0 b/dynamique/0 deleted file mode 100644 index 9ef5f26..0000000 --- a/dynamique/0 +++ /dev/null @@ -1,7 +0,0 @@ -P1 -3 5 -1 1 1 -1 0 1 -1 0 1 -1 0 1 -1 1 1 diff --git a/dynamique/dynamique.c b/dynamique/dynamique.c deleted file mode 100644 index b1ba02e..0000000 --- a/dynamique/dynamique.c +++ /dev/null @@ -1,126 +0,0 @@ -#include -#include -#include -#include - -int main(void) - -{ -FILE* history = NULL; -history = fopen("/home/pierre/Documents/doc/history.txt", "a");//ouverture du fichier d historique permettant par la suite de noter le type de fond d ecran dans l historique -//fprintf(history,"date :"); -system("echo $(date +%D) >> /home/pierre/Documents/doc/history.txt"); -system("gcc -o heure /home/pierre/Documents/doc/heure.c;./heure"); -fprintf(history," dynamique \n-----------\n"); -fclose(history); - -system("clear"); -FILE* heure=NULL; -heure=fopen("heure","w"); -srand(time(NULL));//element creant un nombre aleatoire pour la taille des caracteres meme si normalement ce sont les variables d'environements qui doivent gerer cette taille mais nous souhaitions changer cette regle pour permettre une modification de la taille des images quand meme -/*cette idée a été abandonné par la suite car nous souhaitions modifier la taille de l affichage de l heure dans un terminal Xterm or nous n avons pas reussi car nous manquions de temps */ -int random=0; -random = (rand() % (0,3 )); - -while (1) -{ - -time_t secondes; -struct tm instant; -time(&secondes); -instant=*localtime(&secondes); - - -int h=0; -int m=0; -int s=0; -int i=0; -int s1=0; -int m1=0; -int h1=0; -int j=0; -int k=0; -int l=0; - - - -h=instant.tm_hour; -m=instant.tm_min; -s=instant.tm_sec; -/*switch (random)//cette commande permet de changer la taille du texte du terminal en ayant fais au prealable les modifications dans le fichier .Xconfig -{ - case 0 : - { - break; - } - case 1 : - { - system("XTrem*faceSize:15"); - break; - } - case 2 : - { - system("XTrem*faceSize:20"); - break; - } - -}*/ -while (j<10) - { - printf("\n"); - j++; - } -while (k<35) - { - printf(" "); - k++; - } - -if (h<10) - { - printf("%d",h1); - fprintf(heure,"%d",h1); - } -printf("%d:",h); -fprintf(heure,"%d:",h); -if (m<10) - { - printf("%d",m1); -fprintf(heure,"%d",m1); - } -printf("%d:",m); -fprintf(heure,"%d:",m); - -if (s<10) - { - printf("%d",s1); -fprintf(heure,"%d",s1); - } -printf("%d\n",s); -fprintf(heure,"%d\n",s); -//system("XTrem*faceSize:10"); -while (l<10) - { - printf("\n"); - l++; - } -while (m<15) - { - printf(" "); - m++; - } -printf("l'heure va s'actualiser dans quelques secondes"); - -while (i<10) - { - printf("."); - fflush(stdout); - sleep(1); - i++; - } -sleep(1); -system("clear"); -} - return 0; - -} diff --git a/dynamique/exia.h b/dynamique/exia.h deleted file mode 100644 index 4528c18..0000000 --- a/dynamique/exia.h +++ /dev/null @@ -1,328 +0,0 @@ - -/*fonction qui permet l'ouverture des fichiers en fonction d un chiffre entre 0 et 9 qui correspond a une heure , dizaine d heure, minutes, dizaines minutes ...*/ -FILE* ouverture(int temps) {//----ouverture -FILE* fichier=NULL; -switch(temps) -{ -case 0: -fichier = fopen("0","r"); -break; -case 1: -fichier = fopen("1","r"); -break; -case 2: -fichier = fopen("2","r"); -break; -case 3: -fichier = fopen("3","r"); -break; -case 4: -fichier = fopen("4","r"); -break; -case 5: -fichier = fopen("5","r"); -break; -case 6: -fichier = fopen("6","r"); -break; -case 7: -fichier = fopen("7","r"); -break; -case 8: -fichier = fopen("8","r"); -break; -case 9: -fichier = fopen("9","r"); -break; -return fichier; -}}//------------------------ouverture - -/*fonction qui permet de cnetrer une image dans u_n tableau */ -int centre(void) -{ -char v=0; -int tableau1[1920]; - char b=0; - int L=0; - int C=0; - int col=0; - int lin=0; - int o=0; - while (v!='\0') - { - while (b!='\n') - { - b= fgetc(fichier); - C++; - } - // v= fgetc(fichier);//peut etre pas besoin - L++; - b=0; - } - col=(80-C)/2; - lin=(80-L)/2; - for (o=80*lin+col+1; o<=80*24-(80*lin+col+1); o++) - { - v=0; - v= fgetc(fichier); - tableau1[o]=v; - if (o%80==79-col) - { - o+=C+1; - } - } -return 0; -} - -//---------------------------------------------------------------------- -void afficherTableauH1(int* tableau2) -{//------------------------------------------------------------------------------------void - - FILE* HEURE1= NULL; - HEURE1=ouverture(dizaines_h); - char c = 0; -int i=0; -int cpt = 0; - - while ( cpt < 2) {//--------------------------------while - c= fgetc(HEURE1); - if (c == '\n') - {//------------------------------------------------if - cpt++; }//----------------------------------------------if - }//-------------------------------------------------while - - - do {//-------------------------------------------------------------------do/while - c= fgetc(HEURE1); - if(c == '0' || c == '1') {//--------------------if - tableau2[i++] = c; - - }//---------------------------------------------if - }while(c != EOF);//------------------------------------------------------do/while - -}//--------------------------------------------------------------------------------------------------------------------------------------------------------------main - - -void afficherTableauH2(int* tableau2) -{//------------------------------------------------------------------------------------void - - FILE* HEURE2= NULL; - HEURE2=ouverture(unites_h); - char c = 0; -int i=0; -int cpt = 0; - - while ( cpt < 2) {//--------------------------------while - c= fgetc(HEURE2); - if (c == '\n') - {//------------------------------------------------if - cpt++; }//----------------------------------------------if - }//-------------------------------------------------while - - - do {//-------------------------------------------------------------------do/while - c= fgetc(HEURE2); - if(c == '0' || c == '1') {//--------------------if - tableau2[i++] = c; - - }//---------------------------------------------if - }while(c != EOF);//------------------------------------------------------do/while - -}//--------------------------------------------------------------------------------------------------------------------------------------------------------------main - - - -void afficherTableauM1(int* tableau2) -{//------------------------------------------------------------------------------------void - - FILE* MIN1= NULL; - MIN1=ouverture(dizaines_m); - char c = 0; -int i=0; -int cpt = 0; - - while ( cpt < 2) {//--------------------------------while - c= fgetc(MIN1); - if (c == '\n') - {//------------------------------------------------if - cpt++; }//----------------------------------------------if - }//-------------------------------------------------while - - - do {//-------------------------------------------------------------------do/while - c= fgetc(MIN1); - if(c == '0' || c == '1') {//--------------------if - tableau2[i++] = c; - - }//---------------------------------------------if - }while(c != EOF);//------------------------------------------------------do/while - -}//--------------------------------------------------------------------------------------------------------------------------------------------------------------main - - -void afficherTableauM2(int* tableau2) -{//------------------------------------------------------------------------------------void - - FILE* MIN2= NULL; - MIN2=ouverture(unites_m); - char c = 0; -int i=0; -int cpt = 0; - - while ( cpt < 2) {//--------------------------------while - c= fgetc(MIN2); - if (c == '\n') - {//------------------------------------------------if - cpt++; }//----------------------------------------------if - }//-------------------------------------------------while - - - do {//-------------------------------------------------------------------do/while - c= fgetc(MIN2); - if(c == '0' || c == '1') {//--------------------if - tableau2[i++] = c; - - }//---------------------------------------------if - }while(c != EOF);//------------------------------------------------------do/while - -}//--------------------------------------------------------------------------------------------------------------------------------------------------------------main - - - - - - - -void afficherTableauS1(int* tableau2) -{//------------------------------------------------------------------------------------void - - FILE* SEC1= NULL; - SEC1=ouverture(dizaines_s); - char c = 0; -int i=0; -int cpt = 0; - - while ( cpt < 2) {//--------------------------------while - c= fgetc(SEC1); - if (c == '\n') - {//------------------------------------------------if - cpt++; }//----------------------------------------------if - }//-------------------------------------------------while - - - do {//-------------------------------------------------------------------do/while - c= fgetc(SEC1); - if(c == '0' || c == '1') {//--------------------if - tableau2[i++] = c; - - }//---------------------------------------------if - }while(c != EOF);//------------------------------------------------------do/while - -}//--------------------------------------------------------------------------------------------------------------------------------------------------------------main - - - - - - -void afficherTableauS2(int* tableau2) -{//------------------------------------------------------------------------------------void - - FILE* SEC2= NULL; - SEC2=ouverture(unites_s); - char c = 0; -int i=0; -int cpt = 0; - - while ( cpt < 2) - {//--------------------------------while - c= fgetc(SEC2); - if (c == '\n') - {//------------------------------------------------if - cpt++; - }//----------------------------------------------if - }//-------------------------------------------------while - - - do {//-------------------------------------------------------------------do/while - c= fgetc(SEC2); - if(c == '0' || c == '1') {//--------------------if - tableau2[i++] = c; - - }//---------------------------------------------if - }while(c != EOF);//------------------------------------------------------do/while - -}//------------------------------------------------------------------------------- - - - -{ - int i = 0; - int j = 0; - - for (i = 0; i < 5; i++) {//------------------------------------------------------for - for(j = 0; j < 23; j++){ //------------for - - if (tableau2[i*24+j]=='0') - { - printf(" "); - } - else { - printf("%c",987); - } - }//------------------------------------------------------------------------------for - printf("\n"); - - }//------------------------------------------------------------------for -} - - - - - - -void mettredstbl(void); -{ -int ecrire; -FILE* tbl245=NULL; -tbl245=fopen("tableau245",w); -for (ecrire=0;ecrire=119; ecire++) - { - fprintf(tableau245,tableau2[ecrire]); - } -} - - - -void lirefichier(void); -{ - -int r; -FILE* tbl245=NULL; -tbl245=fopen("tableau245",r); -r=fgetc(tbl245); -switch (r) -case 0: -{ - printf(" "); - -} -case 1: -{ - printf("%c",987); - -} -case '\n': -{ - int bordure; - for (bordure=0; bordure=55; bordure++) - { - printf(" "); - } - -} -case '\0': -{ - break; -} -} diff --git a/dynamique/heure.c b/dynamique/heure.c deleted file mode 100644 index f660b42..0000000 --- a/dynamique/heure.c +++ /dev/null @@ -1,85 +0,0 @@ -#include -#include -#include -//#include //permet la fonction ouverture -#include - -/*initialiser la fct afficherTableau avec comme argument tableau2 qui correspond au tableau qui va etre centré*/ -void afficherTableauH1(int* tableau2); -void afficherTableauH2(int* tableau2); -void afficherTableauM1(int* tableau2); -void afficherTableauM2(int* tableau2); -void afficherTableauS1(int* tableau2); -void afficherTableauS2(int* tableau2); -void lirefichier(void); -void mettredstbl(void); - -FILE* ouverture(int temps); - -int main() -{ -int* tableau2 = malloc(sizeof(int)*24*5);//creation d un tableau statique de 24*5 avce allocation de memoire - - int h=0; - int m=0; - int s=0; - FILE* fichier_h=NULL;/*differents fichiers qui permettent d'ouvrir les fichiers pbm des dizaines d heure , heures , dizaines de minutes ...*/ - FILE* fichier_h2=NULL; - FILE* fichier_m=NULL; - FILE* fichier_m2=NULL; - FILE* fichier_s=NULL; - FILE* fichier_s2=NULL; -while(1) - { - time_t secondes; - - struct tm instant; - time(&secondes); - - instant=*localtime(&secondes); - h=instant.tm_hour;/*recupere l heure dans les variables h m et s*/ - m=instant.tm_min; - s=instant.tm_sec; - - - int dizaines_h = h/10; - int unites_h = h%10; - int dizaines_m = m/10; - int unites_m = m%10; - int dizaines_s = s/10; - int unites_s = s%10; - printf("%d %d\n",dizaines_h,unites_h);/*extrait */ - printf("%d %d\n",dizaines_m,unites_m); - printf("%d %d\n",dizaines_s,unites_s); -/*fichier_h equivaut a un fichier qui stocke une image pbm , il correspond a la dizeaine d'heure ,idem pour les autres fonctions*/ - fichier_h=ouverture(dizaines_h); - fichier_h2=ouverture(unites_h); - fichier_m=ouverture(dizaines_m); - fichier_m2=ouverture(unites_m); - fichier_s=ouverture(dizaines_s); - fichier_s2=ouverture(unites_s); -/*utilisation des fonctions afficherTableau*/ - afficherTableauH1(tableau2); - afficherTableauH2(tableau2); - afficherTableauM1(tableau2); - afficherTableauM2(tableau2); - afficherTableauS1(tableau2); - afficherTableauS2(tableau2); - - mettredstbl(); - - lirefichier(); - - - - - system("sleep 3"); - system ("clear"); - - } -fclose(tbl245); -free(tableau2); - return 0; - -} - diff --git a/dynamique/heure2.c b/dynamique/heure2.c deleted file mode 100644 index c69feff..0000000 --- a/dynamique/heure2.c +++ /dev/null @@ -1,75 +0,0 @@ -#include -#include -#include -#include //permet la fonction ouverture - -/*initialiser la fct afficherTableau avec comme argument tableau2 qui correspond au tableau qui va etre centré*/ -void afficherTableauH1(int* tableau2); -void afficherTableauH2(int* tableau2); -void afficherTableauM1(int* tableau2); -void afficherTableauM2(int* tableau2); -void afficherTableauS1(int* tableau2); -void afficherTableauS2(int* tableau2); - -FILE* ouverture(int temps); - -int main() -{ -int* tableau2 = malloc(sizeof(int)*24*5);//creation d un tableau statique de 24*5 avce allocation de memoire - - int h=0; - int m=0; - int s=0; - FILE* fichier_h=NULL;/*differents fichiers qui permettent d'ouvrir les fichiers pbm des dizaines d heure , heures , dizaines de minutes ...*/ - FILE* fichier_h2=NULL; - FILE* fichier_m=NULL; - FILE* fichier_m2=NULL; - FILE* fichier_s=NULL; - FILE* fichier_s2=NULL; -while(1) - { - time_t secondes; - - struct tm instant; - time(&secondes); - - instant=*localtime(&secondes); - h=instant.tm_hour;/*recupere l heure dans les variables h m et s*/ - m=instant.tm_min; - s=instant.tm_sec; - - - int dizaines_h = h/10; - int unites_h = h%10; - int dizaines_m = m/10; - int unites_m = m%10; - int dizaines_s = s/10; - int unites_s = s%10; - printf("%d %d\n",dizaines_h,unites_h);/*extrait */ - printf("%d %d\n",dizaines_m,unites_m); - printf("%d %d\n",dizaines_s,unites_s); -/*fichier_h equivaut a un fichier qui stocke une image pbm , il correspond a la dizeaine d'heure ,idem pour les autres fonctions*/ - fichier_h=ouverture(dizaines_h); - fichier_h2=ouverture(unites_h); - fichier_m=ouverture(dizaines_m); - fichier_m2=ouverture(unites_m); - fichier_s=ouverture(dizaines_s); - fichier_s2=ouverture(unites_s); -/*utilisation des fonctions afficherTableau*/ - afficherTableauH1(tableau2); - afficherTableauH2(tableau2); - afficherTableauM1(tableau2); - afficherTableauM2(tableau2); - afficherTableauS1(tableau2); - afficherTableauS2(tableau2); - - - system("sleep 3"); - system ("clear"); - - } -free(tableau2); - return 0; - -} - diff --git a/ecrit.c b/ecrit.c deleted file mode 100644 index cdfc5fc..0000000 --- a/ecrit.c +++ /dev/null @@ -1,10 +0,0 @@ -/*but et d ecrire a la suite le type d affichage*/ -#include - #include -int main(void) -{FILE* fichier = NULL; - fichier = fopen("test.txt", "a"); - fprintf(fichier,"a"); - fclose(fichier); - -} diff --git a/ex1.pbm b/ex1.pbm deleted file mode 100644 index 809879e..0000000 --- a/ex1.pbm +++ /dev/null @@ -1,8 +0,0 @@ -P1 -# Un exemple de fichier pbm -5 5 -0 1 1 1 1 -0 1 0 1 1 -0 0 0 1 0 -1 1 0 1 0 -0 1 1 0 0 diff --git a/exiasaver.c b/exiasaver.c deleted file mode 100644 index 256c53c..0000000 --- a/exiasaver.c +++ /dev/null @@ -1,82 +0,0 @@ -#include -#include - -void afficherTableau(int* tableau1); -int main(void) -{ - int* tableau1 = malloc(sizeof(int)*80*24); - FILE* fichier = fopen("image1(2)","r+");//changer nom ---------------------------------------------------- - char c = 0; - char v=0; - char b=0; - int L=0; - int C=0; - int col=0; - int lin=0; - int o=0; - while (v!='\0') - { - while (b!='\n') - { - b= fgetc(fichier); - C++; - } - v= fgetc(fichier); - L++; - b=0; - } - col=(80-C)/2; - lin=(80-L)/2; - for (o=80*lin+col+1, o=80*24-(80*lin+col+1), o=o+80) - { - if (o==78-col%80) - { - o=o+C+1; - } - } - - - - - -int i=0; -int cpt = 0; - while ( cpt < 2) - { - c= fgetc(fichier); - if (c == '\n') - cpt++; - } - - - - - do - { - c= fgetc(fichier); - if(c == '0' || c == '1') - { - tableau1[i++] = c; - } - }while(c != EOF); - - afficherTableau(tableau1); - free(tableau1); - return EXIT_SUCCESS; // Equivalent à return 0 sous Windows, permet un code portable -} - -void afficherTableau(int* tableau1) -{ - int i = 0; - int j = 0; - - for (i = 0; i < 24; i++) - { - for(j = 0; j < 80; j++) - { - printf("Tableau1[%d][%d] = %c\n", i, j, tableau1[i*80+j]); - - - } - } -} diff --git a/fonctions affichage heure b/fonctions affichage heure deleted file mode 100644 index 7743ad8..0000000 --- a/fonctions affichage heure +++ /dev/null @@ -1,268 +0,0 @@ -void afficherTableauH1(int* tableau2) -{//------------------------------------------------------------------------------------void - - FILE* HEURE1= NULL; - HEURE1=ouverture(dizaines_h); - char c = 0; -int i=0; -int cpt = 0; - - while ( cpt < 2) {//--------------------------------while - c= fgetc(HEURE1); - if (c == '\n') - {//------------------------------------------------if - cpt++; }//----------------------------------------------if - }//-------------------------------------------------while - - - do {//-------------------------------------------------------------------do/while - c= fgetc(HEURE1); - if(c == '0' || c == '1') {//--------------------if - tableau2[i++] = c; - - }//---------------------------------------------if - }while(c != EOF);//------------------------------------------------------do/while - int i = 0; - int j = 0; - - for (i = 0; i < 5; i++) {//------------------------------------------------------for - for(j = 0; j < 3; j++){ //------------for - - if (tableau2[i*24+j]=='0'){ - printf(" "); - } - else { - printf("%c",987); - } - }//------------------------------------------------------------------------------for - printf("\n"); - - }//------------------------------------------------------------------for -}//--------------------------------------------------------------------------------------------------------------------------------------------------------------main - - -void afficherTableauH2(int* tableau2) -{//------------------------------------------------------------------------------------void - - FILE* HEURE2= NULL; - HEURE2=ouverture(unites_h); - char c = 0; -int i=0; -int cpt = 0; - - while ( cpt < 2) {//--------------------------------while - c= fgetc(HEURE2); - if (c == '\n') - {//------------------------------------------------if - cpt++; }//----------------------------------------------if - }//-------------------------------------------------while - - - do {//-------------------------------------------------------------------do/while - c= fgetc(HEURE2); - if(c == '0' || c == '1') {//--------------------if - tableau2[i++] = c; - - }//---------------------------------------------if - }while(c != EOF);//------------------------------------------------------do/while - int i = 0; - int j = 0; - - for (i = 0; i < 5; i++) {//------------------------------------------------------for - for(j = 4; j < 7; j++){ //------------for - - if (tableau2[i*24+j]=='0'){ - printf(" "); - } - else { - printf("%c",987); - } - }//------------------------------------------------------------------------------for - printf("\n"); - - }//------------------------------------------------------------------for -}//--------------------------------------------------------------------------------------------------------------------------------------------------------------main - - - -void afficherTableauM1(int* tableau2) -{//------------------------------------------------------------------------------------void - - FILE* MIN1= NULL; - MIN1=ouverture(dizaines_m); - char c = 0; -int i=0; -int cpt = 0; - - while ( cpt < 2) {//--------------------------------while - c= fgetc(MIN1); - if (c == '\n') - {//------------------------------------------------if - cpt++; }//----------------------------------------------if - }//-------------------------------------------------while - - - do {//-------------------------------------------------------------------do/while - c= fgetc(MIN1); - if(c == '0' || c == '1') {//--------------------if - tableau2[i++] = c; - - }//---------------------------------------------if - }while(c != EOF);//------------------------------------------------------do/while - int i = 0; - int j = 0; - - for (i = 0; i < 5; i++) {//------------------------------------------------------for - for(j = 10; j < 13; j++){ //------------for - - if (tableau2[i*24+j]=='0'){ - printf(" "); - } - else { - printf("%c",987); - } - }//------------------------------------------------------------------------------for - printf("\n"); - - }//------------------------------------------------------------------for -}//--------------------------------------------------------------------------------------------------------------------------------------------------------------main - - -void afficherTableauM2(int* tableau2) -{//------------------------------------------------------------------------------------void - - FILE* MIN2= NULL; - MIN2=ouverture(unites_m); - char c = 0; -int i=0; -int cpt = 0; - - while ( cpt < 2) {//--------------------------------while - c= fgetc(MIN2); - if (c == '\n') - {//------------------------------------------------if - cpt++; }//----------------------------------------------if - }//-------------------------------------------------while - - - do {//-------------------------------------------------------------------do/while - c= fgetc(MIN2); - if(c == '0' || c == '1') {//--------------------if - tableau2[i++] = c; - - }//---------------------------------------------if - }while(c != EOF);//------------------------------------------------------do/while - int i = 0; - int j = 0; - - for (i = 0; i < 5; i++) {//------------------------------------------------------for - for(j = 13; j < 16; j++){ //------------for - - if (tableau2[i*24+j]=='0'){ - printf(" "); - } - else { - printf("%c",987); - } - }//------------------------------------------------------------------------------for - printf("\n"); - - }//------------------------------------------------------------------for -}//--------------------------------------------------------------------------------------------------------------------------------------------------------------main - - - - - - - -void afficherTableauS1(int* tableau2) -{//------------------------------------------------------------------------------------void - - FILE* SEC1= NULL; - SEC1=ouverture(dizaines_s); - char c = 0; -int i=0; -int cpt = 0; - - while ( cpt < 2) {//--------------------------------while - c= fgetc(SEC1); - if (c == '\n') - {//------------------------------------------------if - cpt++; }//----------------------------------------------if - }//-------------------------------------------------while - - - do {//-------------------------------------------------------------------do/while - c= fgetc(SEC1); - if(c == '0' || c == '1') {//--------------------if - tableau2[i++] = c; - - }//---------------------------------------------if - }while(c != EOF);//------------------------------------------------------do/while - int i = 0; - int j = 0; - - for (i = 0; i < 5; i++) {//------------------------------------------------------for - for(j = 19; j < 22; j++){ //------------for - - if (tableau2[i*24+j]=='0'){ - printf(" "); - } - else { - printf("%c",987); - } - }//------------------------------------------------------------------------------for - printf("\n"); - - }//------------------------------------------------------------------for -}//--------------------------------------------------------------------------------------------------------------------------------------------------------------main - - - - - - -void afficherTableauS2(int* tableau2) -{//------------------------------------------------------------------------------------void - - FILE* SEC2= NULL; - SEC2=ouverture(unites_s); - char c = 0; -int i=0; -int cpt = 0; - - while ( cpt < 2) - {//--------------------------------while - c= fgetc(SEC2); - if (c == '\n') - {//------------------------------------------------if - cpt++; - }//----------------------------------------------if - }//-------------------------------------------------while - - - do {//-------------------------------------------------------------------do/while - c= fgetc(SEC2); - if(c == '0' || c == '1') {//--------------------if - tableau2[i++] = c; - - }//---------------------------------------------if - }while(c != EOF);//------------------------------------------------------do/while - int i = 0; - int j = 0; - - for (i = 0; i < 5; i++) {//------------------------------------------------------for - for(j = 22; j < 26; j++){ //------------for - - if (tableau2[i*24+j]=='0'){ - printf(" "); - } - else { - printf("%c",987); - } - }//------------------------------------------------------------------------------for - printf("\n"); - - }//------------------------------------------------------------------for -}//--------------------------------------------------------------------------------------------------------------------------------------------------------------main diff --git a/fonctions centage b/fonctions centage deleted file mode 100644 index a78af58..0000000 --- a/fonctions centage +++ /dev/null @@ -1,36 +0,0 @@ - - -int centre(void) -{ -char v=0; - char b=0; - int L=0; - int C=0; - int col=0; - int lin=0; - int o=0; - while (v!='\0') - { - while (b!='\n') - { - b= fgetc(fichier); - C++; - } - // v= fgetc(fichier);peut etre pas besoin - L++; - b=0; - } - col=(80-C)/2; - lin=(80-L)/2; - for (o=80*lin+col+1; o<=80*24-(80*lin+col+1); o++) - { - v=0; - v= fgetc(fichier); - tableau1[o]=v; - if (o%80==79-col) - { - o+=C+1; - } - } -return 0; -} diff --git a/heure b/heure deleted file mode 100644 index 5a9c247..0000000 --- a/heure +++ /dev/null @@ -1,59 +0,0 @@ -#include -#include -#include - - -int main() - -{ - int h=0; - int m=0; - int s=0; - -while(1) - { - time_t secondes; - - struct tm instant; - - - time(&secondes); - - instant=*localtime(&secondes); - h==instant.tm_hour; - m==instant.tm_min; - s==instant.tm_sec; - if (instant.tm_hour>12) - { - printf("c'est l'apres midi \n"); - } - if (instant.tm_hour<12) - { - printf("c'est le matin \n"); - } - if (instant.tm_min>38) - { - printf("deuxieme moitié de minute \n"); - } - if (instant.tm_min<38) - { - printf("première moitié de minute \n"); - } - if (instant.tm_sec>30) - { - printf("deiuxieme moitié de minute \n"); - } - if (instant.tm_sec<30) - { - printf("première moitié de seconde \n"); - } - - - printf("%d:%d:%d\n", instant.tm_hour, instant.tm_min, instant.tm_sec); - sleep(1); - system ("clear"); - - } - return 0; - -} diff --git a/heure-vrai.c b/heure-vrai.c deleted file mode 100644 index 13fd0b6..0000000 --- a/heure-vrai.c +++ /dev/null @@ -1,51 +0,0 @@ - /* Fichier source date_heure.c */ - #include - /* Donne acces à la fonction localtime() - (heure et date locales) ainsi qu'à la structure tm - qu'on utilise ci-dessous. - */ - #include - /* - Tableaux utilisés pour convertir un code de jour de semaine (entre 0 et 6) ou de mois - (entre 0 et 11) en une chaîne de caractères. - [Ignorer complètement le "static" et les "const" ne nuit pas à la compréhension.] - */ - static const char *const jours[7] = - { "dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi" - }; - static const char *const mois[12] = - { "janvier", "fevrier", "mars", "avril", "mai", "juin", - "juillet", "août", "septembre", "octobre", "novembre", "décembre" - }; - int main (void) - { - FILE* fichier = NULL; - fichier = fopen("test.txt", "w"); - - /* On place une date "abstraite" dans date_heures_actuelles. */ - time_t date_heures_actuelles = time (NULL); - /* - Pointeur vers une structure tm dont le type est défini dans le fichier de la bibliothèque standard time.h . - Les membres de cette structure tm permettent de lire l'année, le mois, etc correspondant à une date donnée. - En initialisant la structure avec localtime(&date_heures_actuelles), on place dans les membres de la structure - l'année actuelle, le mois actuel, etc. - Restera plus qu'a rendre comprehensibles ces valeurs en utilisant les tableaux ci-dessus pour convertir les "codes" retournés. - */ - struct tm *temps_humain = localtime (&date_heures_actuelles); - int annee, i_mois, jour_mois, i_jour_semaine, heures, minutes, secondes; - /* Les instructions ci-dessous accedent à différents membres de la structure temps_humain . */ - annee = 1900 + temps_humain->tm_year; - jour_mois = temps_humain->tm_mday;/* "month day" */ - i_mois = temps_humain->tm_mon;/* indice du mois */ - i_jour_semaine = temps_humain->tm_wday;/* "week day". dimanche = 0, lundi = 1, etc */ - heures = temps_humain->tm_hour; - minutes = temps_humain->tm_min; - secondes = temps_humain->tm_sec; - /* Affichage compréhensible de la date et de l'heure courantes. */ - fprintf (fichier,"utilisation: %s %d %s %d ", jours[i_jour_semaine], jour_mois, - mois[i_mois], annee); - fprintf (fichier,": %d h %d min %d s. avec un affichage:", heures, minutes, secondes); - fclose(fichier); - return 0; - } - diff --git a/heure.c b/heure.c deleted file mode 100644 index 672fd14..0000000 --- a/heure.c +++ /dev/null @@ -1,96 +0,0 @@ -#include -#include -#include - -FILE* ouverture(int temps); - -int main() - -{ - int h=0; - int m=0; - int s=0; - FILE* fichier_h=NULL;/*differents fichiers qui permettent d'ouvrir les fichiers pbm des dizaines d heure , heures , dizaines de minutes ...*/ - FILE* fichier_h2=NULL; - FILE* fichier_m=NULL; - FILE* fichier_m2=NULL; - FILE* fichier_s=NULL; - FILE* fichier_s2=NULL; -while(1) - { - time_t secondes; - - struct tm instant; - time(&secondes); - - instant=*localtime(&secondes); - h=instant.tm_hour;/*recupere l heure dans les variables h m et s*/ - m=instant.tm_min; - s=instant.tm_sec; - - - int dizaines_h = h/10; - int unites_h = h%10; - int dizaines_m = m/10; - int unites_m = m%10; - int dizaines_s = s/10; - int unites_s = s%10; - printf("%d %d\n",dizaines_h,unites_h);/*extrait */ - printf("%d %d\n",dizaines_m,unites_m); - printf("%d %d\n",dizaines_s,unites_s); - - fichier_h=ouverture(dizaines_h); - fichier_h2=ouverture(unites_h); - fichier_m=ouverture(dizaines_m) - fichier_m2=ouverture(unites_m) - fichier_s=ouverture(dizaines_s) - fichier_s2=ouverture(unites_s) - - system("sleep 1"); - system ("clear"); - - } - return 0; - -} - -FILE* ouverture(int temps) {//----ouverture -FILE* fichier=NULL; -switch(temps) -{ -case 0: -fichier = fopen("0","r"); -break; -case 1: -fichier = fopen("1","r"); -break; -case 2: -fichier = fopen("2","r"); -break; -case 3: -fichier = fopen("3","r"); -break; -case 4: -fichier = fopen("4","r"); -break; -case 5: -fichier = fopen("5","r"); -break; -case 6: -fichier = fopen("6","r"); -break; -case 7: -fichier = fopen("7","r"); -break; -case 8: -fichier = fopen("8","r"); -break; -case 9: -fichier = fopen("9","r"); -break; -default: -break; -return fichier; -} -}//------------------------ouverture - diff --git a/heure1.c b/heure1.c deleted file mode 100644 index f963848..0000000 --- a/heure1.c +++ /dev/null @@ -1,74 +0,0 @@ -#include -#include - -void afficherTableau(int* tableau2); -int main(void) -{ - - - int* tableau2 = malloc(sizeof(int)*03*05); - FILE* fichier = fopen("0","r+"); - char c = 0; -int i=0; -int cpt = 0; - - while ( cpt < 2) { - c= fgetc(fichier); - if (c == '\n') - cpt++; - } - - - do { - c= fgetc(fichier); - if(c == '0' || c == '1') { - tableau2[i++] = c; - } - }while(c != EOF); - - afficherTableau(tableau2); - free(tableau2); - return EXIT_SUCCESS; /* Equivalent à return 0 sous Windows, permet un code portable */ -} - -void afficherTableau(int* tableau2) -{ - int i = 0; - int j = 0; - - for (i = 0; i < 5; i++) { - for(j = 0; j < 3; j++) { - printf("%c", tableau2[i*03+j]); -if (j==2){ -printf("\n"); - - do - - - { - - - - switch(caractereactuel) - { - case 49: //1 - printf("%c",987); - - break; - case 48: //0 - printf("%c",240); - - break; -system("clear") -} -} - - } - } - - - - -} - - diff --git a/historic.c b/historic.c deleted file mode 100644 index 1cb8dc1..0000000 --- a/historic.c +++ /dev/null @@ -1,40 +0,0 @@ -#include -#include -#include -#include - - -int main() - -{ - FILE* fichier = NULL; - fichier = fopen("/media/groupe-tvp/b919f1b0-9122-4865-a76b-bb6386984916/doc/history.txt", "a"); - int h=0; - int m=0; - int s=0; - - - time_t secondes; - - struct tm instant; - - - time(&secondes); - - instant=*localtime(&secondes); - h==instant.tm_hour; - m==instant.tm_min; - s==instant.tm_sec; - - - - // printf("%d:%d:%d\n", instant.tm_hour, instant.tm_min, instant.tm_sec); - fprintf (fichier,": %d h %d min %d s. avec un affichage: ", instant.tm_hour, instant.tm_min, instant.tm_sec); - fclose(fichier); - sleep(3); - // system ("clear"); - - - return 0; - -} diff --git a/history.txt b/history.txt deleted file mode 100644 index 0b16756..0000000 --- a/history.txt +++ /dev/null @@ -1,3 +0,0 @@ - -utilisation: lundi 12 décembre 2016 : 8 h 15 min 21 s. avec un affichage: statique image: start to continue -utilisation: lundi 12 décembre 2016 : 9 h 50 min 21 s. avec un affichage: statique image: psychédélique statique image: start to continue statique image: je suis en pause statique image: jul statique image: tetris \ No newline at end of file diff --git a/image1 b/image1 deleted file mode 100644 index a4cbd04..0000000 --- a/image1 +++ /dev/null @@ -1,23 +0,0 @@ -P1 -68 20 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - diff --git a/lançeur.sh b/lançeur.sh deleted file mode 100644 index 92cc9c6..0000000 --- a/lançeur.sh +++ /dev/null @@ -1,165 +0,0 @@ -#include -#include -#include //utile pour la creation d'un nombre aleatoire - -#include -#include -#include - - - -/*fonction qui permet de creer le random en fonction des resultats precedents*/ - int Random (int _imin, int _imax)a - { - return (_imin + (rand () % (_imax-_imin+1)));//explication ??? - } - -/*touche*/ -//---------------------------------------------------------------------------------------------------------------------------------------------- -int kbhit(void) -{ - struct termios oldt, newt; - int ch; - int oldf; - - tcgetattr(STDIN_FILENO, &oldt); - newt = oldt; - newt.c_lflag &= ~(ICANON | ECHO); - tcsetattr(STDIN_FILENO, TCSANOW, &newt); - oldf = fcntl(STDIN_FILENO, F_GETFL, 0); - fcntl(STDIN_FILENO, F_SETFL, oldf | O_NONBLOCK); - - ch = getchar(); - - tcsetattr(STDIN_FILENO, TCSANOW, &oldt); - fcntl(STDIN_FILENO, F_SETFL, oldf); - - if(ch != EOF) - { - ungetc(ch, stdin); - return 1; - } - - return 0; -} - - - - -//---------------------------------------------------------------------------------------------------------------------------------------------- - - - - - - - - - - -int main(int argc, char *argv[]) - -{ -/*clear the screen , open picture and history , write type of lock screen in history */ - system("clear"); - FILE* fichier = NULL; - FILE* history = NULL; - history = fopen("/media/groupe-tvp/b919f1b0-9122-4865-a76b-bb6386984916/doc/history.txt", "a"); - fprintf(history," statique "); - - - - int caractereactuel = 0;//creation de notre caractere actuel - int nbrAlea;//nombre aleatoire - int linecounter = 0;//compteur de ligne - - - srand (time (NULL));//créer nbr alea entre 1 et 5 pour choisir entre les differentes images - nbrAlea = Random (1,5); - - - fprintf(history," image: "); -/*switch qui permet d'ouvrir une image en fonction d'un nombre aleatoire entre 1 et 5 */ - switch(nbrAlea) -{case 1: -fichier = fopen("image1", "r"); -fprintf(history," je suis en pause"); -break; -case 2: -fichier = fopen("image2", "r"); -fprintf(history," tetris"); -break; -case 3: -fichier = fopen("image3", "r"); -fprintf(history," start to continue"); -break; -case 4: -fichier = fopen("image4", "r"); -fprintf(history," psychédélique"); -break; -case 5: -fichier = fopen("image5", "r"); -fprintf(history," jul"); -break; -default: -break; -} - - if (fichier != NULL)// - - { - - // boucle de lecture des caracteres un a un - - do - - - { - - caractereactuel = fgetc(fichier); // on lit le caractere - - // printf("%c", caractereactuel); // on l'affiche - - //printf("%d",compt); - - switch(caractereactuel) - { - case 49: //1 - printf("%c",987); - - break; - case 48: //0 - printf("%c",240); - break; - case '\t': //tab - //printf("er"); - break; - //case - default: - printf("\n"); - linecounter++; - break; - } - - - - - } while (linecounter < 30 ); // on continue tant que compteurglobal n'a pas finis le fichier - - - - fclose(fichier); - fclose(history); - - } - -/* -while(!kbhit()) - printf(""); -*/ - return 0; - -} - - - diff --git a/launcher.c b/launcher.c deleted file mode 100644 index afa3add..0000000 --- a/launcher.c +++ /dev/null @@ -1,105 +0,0 @@ - #include - #include - #include - #include - #include -/*pour les stats nous voulions utiliser des variables qui puissent communiquer entre les programmes au debut nous vouliosn utiliser les variables d environement mais on a pas reussi a les modifier au sein d un programme , nous avons donc decider de stocker ces variables dans des .txt pour les reutiliser aprés cependnat cela ne fonctionne pas lors de lexecution du launcher*/ - int Random (int _imin, int _imax) - {return (_imin + (rand () % (_imax-_imin+1)));} - - -int main(int argv, char *argc){ - - int pid; - /*permet de stocker le nombre d utilisation dans un fichier txt*/ - int car; - FILE* nbr_utilisation = NULL; - FILE* nbr_utilisation2 = NULL; - FILE* nbr_1 = NULL;//permet de stocker dans des txt le nombre de lancement des differenst fond ecrans cf point sur les stats au debut du programme - FILE* nbr_12 = NULL; - FILE* nbr_2 = NULL; - FILE* nbr_22 = NULL; - FILE* nbr_3 = NULL; - FILE* nbr_32 = NULL; - FILE* alea = NULL; - system("touch nbr_utilisation2"); - nbr_utilisation=fopen("nbr_utilisation","r"); - nbr_utilisation2=fopen("nbr_utilisation2","w"); - car=fgetc(nbr_utilisation); - car=car+1; - fprintf(nbr_utilisation2,"%c",car); - fclose(nbr_utilisation2); - fclose(nbr_utilisation); - system("mv nbr_utilisation2 nbr_utilisation"); - - - int nbrAlea;//nombre aleatoire - int nbrAlea2;//nombre aleatoire - pid=fork(); - srand (time (NULL));//créer nbr alea entre 1 et 3 - nbrAlea = Random (1,2);//creation d un nbr alea entre 1 et 2 car tout les autres types ne sont pas fais - nbrAlea2= Random (1,5); - - switch(pid) - {case -1: - printf("error"); - break; - case 0: - switch(nbrAlea) - { - case 1: - /*permet de stocker le nombre d utilisation dans un fichier txt, il exprime le nombre d utilisation de la fonction statique*/ - - system("touch nbr_12"); - nbr_1=fopen("nbr_1","r"); - nbr_12=fopen("nbr_12","w"); - system("rm alea"); - alea=fopen("alea","w"); - car=fgetc(nbr_1); - car=car+1; - fprintf(nbr_12,"%c",car); - fprintf(alea,"%d",nbrAlea2); - fclose(nbr_12); - fclose(nbr_1); - fclose(alea); - system("mv nbr_12 nbr_1"); - execl("/home/pierre/Documents/doc/statique/lecture2", "lecture2", NULL); - break; - - case 2: - /*permet de stocker le nombre d utilisation dans un fichier txt, il exprime le nombre d utilisation de la fonction dynamique*/ - - system("touch nbr_22"); - nbr_2=fopen("nbr_2","r"); - nbr_22=fopen("nbr_22","w"); - car=fgetc(nbr_2); - car=car+1; - fprintf(nbr_22,"%c",car); - fclose(nbr_22); - fclose(nbr_2); - system("mv nbr_22 nbr_2"); - execl("/home/pierre/Documents/doc/dynamique/dynamique", "dynamique", NULL); - break; - - case 3: - /*permet de stocker le nombre d utilisation dans un fichier txt, il exprime le nombre d utilisation de la fonction interactif*/ - - system("touch nbr_23"); - nbr_3=fopen("nbr_3","r"); - nbr_32=fopen("nbr_32","w"); - car=fgetc(nbr_3); - car=car+1; - fprintf(nbr_32,"%c",car); - fclose(nbr_32); - fclose(nbr_3); - system("mv nbr_32 nbr_3"); - execl("/home/pierre/Documents/doc/interactif/lecture2", "lecture2", NULL); - break; - } - break; - default: - wait(NULL); - break; - } -return 0; -} diff --git a/launcher2.c b/launcher2.c deleted file mode 100644 index 87a1824..0000000 --- a/launcher2.c +++ /dev/null @@ -1,106 +0,0 @@ - #include - #include - #include - #include - #include - - int Random (int _imin, int _imax) - {return (_imin + (rand () % (_imax-_imin+1)));} - - -int main(int argv, char *argc){ - - int pid; - /*permet de stocker le nombre d utilisation dans un fichier txt*/ - int car; - FILE* nbr_utilisation = NULL; - FILE* nbr_utilisation2 = NULL; - FILE* nbr_1 = NULL; - FILE* nbr_12 = NULL; - FILE* nbr_2 = NULL; - FILE* nbr_22 = NULL; - FILE* nbr_3 = NULL; - FILE* nbr_32 = NULL; - FILE* alea = NULL; - system("touch nbr_utilisation2"); - nbr_utilisation=fopen("nbr_utilisation","r"); - nbr_utilisation2=fopen("nbr_utilisation2","w"); - car=fgetc(nbr_utilisation); - car=car+1; - fprintf(nbr_utilisation2,"%c",car); - fclose(nbr_utilisation2); - fclose(nbr_utilisation); - system("mv nbr_utilisation2 nbr_utilisation"); - - - int nbrAlea;//nombre aleatoire - int nbrAlea2;//nombre aleatoire - pid=fork(); - srand (time (NULL));//créer nbr alea entre 1 et 3 - nbrAlea = Random (1,2);//creation d un nbr alea entre 1 et 2 car tout les autres types ne sont pas fais - nbrAlea2= Random (1,5); - - switch(pid) - {case -1: - printf("error"); - break; - case 0: - switch(nbrAlea) - { - case 1: - /*permet de stocker le nombre d utilisation dans un fichier txt, il exprime le nombre d utilisation de la fonction statique*/ - - system("touch nbr_12"); - nbr_1=fopen("nbr_1","r"); - nbr_12=fopen("nbr_12","w"); - system("rm alea"); - alea=fopen("alea","w"); - car=fgetc(nbr_1); - car=car+1; - fprintf(nbr_12,"%c",car); - fprintf(alea,"%d",nbrAlea2); - fclose(nbr_12); - fclose(nbr_1); - fclose(alea); - system("mv nbr_12 nbr_1"); - execl("/home/pierre/Documents/doc/statique/lecture2", "lecture2", NULL); - break; - - case 2: - /*permet de stocker le nombre d utilisation dans un fichier txt, il exprime le nombre d utilisation de la fonction dynamique*/ - - system("touch nbr_22"); - nbr_2=fopen("nbr_2","r"); - nbr_22=fopen("nbr_22","w"); - car=fgetc(nbr_2); - car=car+1; - fprintf(nbr_22,"%c",car); - fclose(nbr_22); - fclose(nbr_2); - system("mv nbr_22 nbr_2"); - execl("/home/pierre/Documents/doc/dynamique/dynamique", "dynamique", NULL); - break; - - case 3: - /*permet de stocker le nombre d utilisation dans un fichier txt, il exprime le nombre d utilisation de la fonction interactif*/ - - system("touch nbr_23"); - nbr_3=fopen("nbr_3","r"); - nbr_32=fopen("nbr_32","w"); - car=fgetc(nbr_3); - car=car+1; - fprintf(nbr_32,"%c",car); - fclose(nbr_32); - fclose(nbr_3); - system("mv nbr_32 nbr_3"); - execl("/home/pierre/Documents/doc/interactif/lecture2", "lecture2", NULL); - break; - } - break; - default: - wait(NULL); - break; - } -return 0; -} - diff --git a/lecture.c b/lecture.c deleted file mode 100644 index 0e4ed2d..0000000 --- a/lecture.c +++ /dev/null @@ -1,185 +0,0 @@ - #include - #include - #include //utile pour la creation d'un nombre aleatoire - - - - - - - - - - - - - - - - int main(int argc, char *argv[]) - {int nbrAlea;//nombre aleatoire - FILE* history = NULL; - FILE* compteur = NULL; - int cpt; - FILE* alea = NULL; - alea=fopen("/home/pierre/Documents/doc/alea","r"); - nbrAlea=fgetc(alea); - - nbrAlea=nbrAlea-48; - fclose(alea); - history = fopen("/home/pierre/Documents/doc/history.txt", "a"); - fprintf(history,"date :"); - system("echo $(date +%D) >> /home/pierre/Documents/doc/history.txt"); - //system("gcc -o heure-vrai heure-vrai.c;./heure-vrai"); - system("gcc -o heure heure.c;./heure"); -/*clear the screen , open picture and history , write type of lock screen in history */ - //system("clear"); - FILE* fichier = NULL; - - - fprintf(history," statique "); - - - - int caractereactuel = 0;//creation de notre caractere actuel - - int linecounter = 0;//compteur de ligne - - - - - - fprintf(history,"\n image: "); - /*switch qui permet d'ouvrir une image en fonction d'un nombre aleatoire entre 1 et 5 */ - switch(nbrAlea) - {case 1: - //ces blocs sont sensé recuperer une variable dans un fichier - /*compteur=fopen("cpt_1","r"); - cpt=fgetc(compteur); - cpt=cpt+1; - fclose(compteur); - system("rm cpt_1"); - compteur=fopen("cpt_1","w"); - fprintf(compteur,"%c",cpt); - fclose(compteur);*/ - - - fichier = fopen("/home/pierre/Documents/doc/statique/image1-2", "r"); - fprintf(history," je suis en pause\n\n"); - break; - case 2: - /*compteur=fopen("cpt_2","r"); - cpt=fgetc(compteur); - cpt=cpt+1; - fclose(compteur); - system("rm cpt_2"); - compteur=fopen("cpt_2","w"); - fprintf(compteur,"%c",cpt); - fclose(compteur);*/ - - fichier = fopen("/home/pierre/Documents/doc/statique/image2-2", "r"); - fprintf(history," tetris\n\n"); - break; - case 3: - /*compteur=fopen("cpt_3","r"); - cpt=fgetc(compteur); - cpt=cpt+1; - fclose(compteur); - system("rm cpt_3"); - compteur=fopen("cpt_3","w"); - fprintf(compteur,"%c",cpt); - fclose(compteur);*/ - - fichier = fopen("/home/pierre/Documents/doc/statique/image3-2", "r"); - fprintf(history," start to continue\n\n"); - break; - case 4: - /*compteur=fopen("cpt_4","r"); - cpt=fgetc(compteur); - cpt=cpt+1; - fclose(compteur); - system("rm cpt_4"); - compteur=fopen("cpt_4","w"); - fprintf(compteur,"%c",cpt); - fclose(compteur);*/ - - fichier = fopen("/home/pierre/Documents/doc/statique/image4-2", "r"); - fprintf(history," psychédélique\n\n"); - break; - case 5: - /*compteur=fopen("cpt_5","r"); - cpt=fgetc(compteur); - cpt=cpt+1; - fclose(compteur); - system("rm cpt_5"); - compteur=fopen("cpt_5","w"); - fprintf(compteur,"%c",cpt); - fclose(compteur);*/ - - fichier = fopen("/home/pierre/Documents/doc/statique/image5-2", "r"); - fprintf(history," exia\n\n"); - break; - - } - - if (fichier != NULL)// - - { - - // boucle de lecture des caracteres un a un - - do - - - { - - caractereactuel = fgetc(fichier); // on lit le caractere - - // printf("%c", caractereactuel); // on l'affiche - - //printf("%d",compt); - - switch(caractereactuel) - { - case 49: //1 - printf("%c",987);//affiche carré blanc - - break; - case 48: //0 - printf("%c",240);//affiche espace - break; - case '\t': //tab - //printf("er"); - break; - case 848://P - //printf("\n"); - break; - default: - printf("\n "); - linecounter++; - break; - } - - - - - } while (linecounter < 28 ); // on continue tant que compteurglobal n'a pas finis le fichier - - - - fclose(fichier); - fclose(history); - - } - - system("stty cbreak echo"); - getchar(); - system("stty cooked echo"); - system("clear"); - - return 0; - - } - - - diff --git a/menu stat b/menu stat deleted file mode 100644 index 7971753..0000000 --- a/menu stat +++ /dev/null @@ -1,40 +0,0 @@ -#include -#include - -int main() -{ -while (1) - { - printf("-1 type d'ecran de veille \n"); - printf("-2 nom du fichier\n"); - int touche=0; - printf("veulliez choisir l action a execute "); - scanf ("%d" ,&touche); - switch (touche)//permet de selectionner une entré du menu - { - case 1: - printf("l'ecran de veille statique a ete lance 5 fois les 10 derniere fois \n");//a modifier avec les parametre de l'historique - char c = fgetc(stdin); - c=0; - do - { - c = fgetc(stdin); - }while (c != '\n');//permet de faire une pause tant que l'on appuis pas sur la touche entré - system ("clear");//permer d'effacer la console - break; - case 2: - - printf("le fichier... a ete lance 3 fois les 10 derniere fois");//a modifier avec les parametre de l'historique - char v = fgetc(stdin); - v=0; - do - { - v = fgetc(stdin);//permet de faire une pause tant que l'on appuis pas sur la touche entré - }while (v != '\n'); - system ("clear");//permer d'effacer la console - break; - } - } - - return 0; -} diff --git a/pierre/jd b/pierre/jd deleted file mode 100644 index 781e137..0000000 --- a/pierre/jd +++ /dev/null @@ -1 +0,0 @@ -df diff --git a/statique/fonctions centage b/statique/fonctions centage deleted file mode 100644 index 351d0cb..0000000 --- a/statique/fonctions centage +++ /dev/null @@ -1,34 +0,0 @@ -int centre(void) -{ -char v=0; - char b=0; - int L=0; - int C=0; - int col=0; - int lin=0; - int o=0; - while (v!='\0') - { - while (b!='\n') - { - b= fgetc(fichier); - C++; - } - // v= fgetc(fichier);peut etre pas besoin - L++; - b=0; - } - col=(80-C)/2; - lin=(80-L)/2; - for (o=80*lin+col+1; o<=80*24-(80*lin+col+1); o++) - { - v=0; - v= fgetc(fichier); - tableau1[o]=v; - if (o%80==79-col) - { - o+=C+1; - } - } -return 0; -} diff --git a/statique/lecture2.c b/statique/lecture2.c deleted file mode 100644 index 188cc49..0000000 --- a/statique/lecture2.c +++ /dev/null @@ -1,132 +0,0 @@ - #include - #include - #include //utile pour la creation d'un nombre aleatoire - - - - - /*fonction qui permet de creer le random en fonction des resultats precedents*/ - int Random (int _imin, int _imax) - { - return (_imin + (rand () % (_imax-_imin+1)));//explication ??? - } - - - - - - - - - - - int main(int argc, char *argv[]) - - { - system("gcc -o heure-vrai heure-vrai.c;./heure-vrai"); - /*clear the screen , open picture and history , write type of lock screen in history */ - //system("clear"); - FILE* fichier = NULL; - FILE* history = NULL; - history = fopen("/media/groupe-tvp/b919f1b0-9122-4865-a76b-bb6386984916/doc/history.txt", "a"); - fprintf(history," statique "); - - - - int caractereactuel = 0;//creation de notre caractere actuel - int nbrAlea;//nombre aleatoire - int linecounter = 0;//compteur de ligne - - - srand (time (NULL));//créer nbr alea entre 1 et 5 pour choisir entre les differentes images - nbrAlea = Random (1,5); - - - fprintf(history," image: "); - /*switch qui permet d'ouvrir une image en fonction d'un nombre aleatoire entre 1 et 5 */ - switch(nbrAlea) - {case 1: - fichier = fopen("/media/groupe-tvp/b919f1b0-9122-4865-a76b-bb6386984916/doc/statique/image1-2", "r"); - fprintf(history," je suis en pause"); - break; - case 2: - fichier = fopen("/media/groupe-tvp/b919f1b0-9122-4865-a76b-bb6386984916/doc/statique/image2-2", "r"); - fprintf(history," tetris"); - break; - case 3: - fichier = fopen("/media/groupe-tvp/b919f1b0-9122-4865-a76b-bb6386984916/doc/statique/image3-2", "r"); - fprintf(history," start to continue"); - break; - case 4: - fichier = fopen("/media/groupe-tvp/b919f1b0-9122-4865-a76b-bb6386984916/doc/statique/image4-2", "r"); - fprintf(history," psychédélique"); - break; - case 5: - fichier = fopen("/media/groupe-tvp/b919f1b0-9122-4865-a76b-bb6386984916/doc/statique/image5-2", "r"); - fprintf(history," jul"); - break; - default: - break; - } - - if (fichier != NULL)// - - { - - // boucle de lecture des caracteres un a un - - do - - - { - - caractereactuel = fgetc(fichier); // on lit le caractere - - // printf("%c", caractereactuel); // on l'affiche - - //printf("%d",compt); - - switch(caractereactuel) - { - case 49: //1 - printf("%c",987);//affiche carré blanc - - break; - case 48: //0 - printf("%c",240);//affiche espace - break; - case '\t': //tab - //printf("er"); - break; - case 848://P - //printf("\n"); - break; - default: - printf("\n "); - linecounter++; - break; - } - - - - - } while (linecounter < 28 ); // on continue tant que compteurglobal n'a pas finis le fichier - - - - fclose(fichier); - fclose(history); - - } - - system("stty cbreak -echo"); - getchar(); - system("stty cooked -echo"); - system("clear"); - - return 0; - - } - - -