diff --git a/2018_TP11_V0.pdf b/2018_TP11_V0.pdf new file mode 100755 index 0000000..e5eae34 Binary files /dev/null and b/2018_TP11_V0.pdf differ diff --git a/Demo_make/M111_point.c b/Demo_make/M111_point.c new file mode 100755 index 0000000..61683ba --- /dev/null +++ b/Demo_make/M111_point.c @@ -0,0 +1,20 @@ +// M111 - TP10_PROG-PROC +// Composant M111_point +// Implementation + +#include +#include "M111_point.h" + +lePoint lePointCreation (int x, int y, char nom) { + lePoint localPoint; + localPoint.champX = x; + localPoint.champY = y; + localPoint.champN = nom; + return localPoint; +} + +void lePointAfficher (lePoint unPoint){ + printf ("[ %c (%3d, %3d ) ]\n", unPoint.champN, + unPoint.champX, unPoint.champY); + +} diff --git a/Demo_make/M111_point.h b/Demo_make/M111_point.h new file mode 100755 index 0000000..1875474 --- /dev/null +++ b/Demo_make/M111_point.h @@ -0,0 +1,14 @@ +// M111 - TP10_PROG-PROC +// Composant M111_point +// Header + +typedef struct { +int champX; +int champY; +char champN; +} +lePoint; + +lePoint lePointCreation (int x, int y, char nom); + +void lePointAfficher (lePoint unPoint); diff --git a/Demo_make/Makefile b/Demo_make/Makefile new file mode 100755 index 0000000..bda8f0a --- /dev/null +++ b/Demo_make/Makefile @@ -0,0 +1,11 @@ +CFLAGS = -Wall -std=gnu99 -g + +EXECUTABLES = crash \ + crash2 + + +all : ${EXECUTABLES} + +clean : + @rm -f core *.o *.out *~ + @rm -f ${EXECUTABLES} diff --git a/Demo_make/main.c b/Demo_make/main.c new file mode 100755 index 0000000..8652ad8 --- /dev/null +++ b/Demo_make/main.c @@ -0,0 +1,20 @@ +// M111 - TP10_PROG-PROC +// Programme de test du composant M111_point + +#include +#include +#include "M111_point.h" + +int main() +{ + printf("Hellu world!\n"); + + lePoint pointA, pointB; + + pointA =lePointCreation(10,20, 'A'); + pointB =lePointCreation(100,200, 'B'); + + lePointAfficher(pointA); + lePointAfficher(pointB); + return 0; +} diff --git a/Projets_A_B_C/appli_A.c b/Projets_A_B_C/appli_A.c new file mode 100755 index 0000000..d3d413a --- /dev/null +++ b/Projets_A_B_C/appli_A.c @@ -0,0 +1,15 @@ +/// appliA.C + +int main() +{ + int x, y; + structA1 A1 = structA1Creation (x, y); + structA1Afficher (structA1 A2); + + structA1 A2 = structA2Creation (x, y); + structA2Afficher (A2); + + structA1 A3 = structA3Creation ( x, y); + structA3Afficher (A3); + return 0; +} diff --git a/Projets_A_B_C/fichier_A1.c b/Projets_A_B_C/fichier_A1.c new file mode 100755 index 0000000..036a31a --- /dev/null +++ b/Projets_A_B_C/fichier_A1.c @@ -0,0 +1,21 @@ +#include +#include "header_A1.h" +structA1 structA1Creation (int x, int y) +{ printf ("Execution de structA1Creation"\n} +void structA1Afficher (structA1 x) +{ printf ("Execution de structA1Afficher"\n} + +#include +#include "header_A2.h" +structA1 structA2Creation (int x, int y) +{ printf ("Execution de structA2Creation"\n} +void structA2Afficher (structA1 x) +{ printf ("Execution de structA2Afficher"\n} + +#include +#include "header_A3.h" +structA1 structA3Creation (int x, int y) +{ printf ("Execution de structA3Creation"\n} +void structA3Afficher (structA3 x) +{ printf ("Execution de structA3Afficher"\n} + diff --git a/Projets_A_B_C/fichier_A1.h b/Projets_A_B_C/fichier_A1.h new file mode 100755 index 0000000..5269033 --- /dev/null +++ b/Projets_A_B_C/fichier_A1.h @@ -0,0 +1,26 @@ +/// Header_A1 +typedef struct +{ + int champX; + int champY; +} structA1; +structA1 structA1Creation (int x, int y); +void structA1Afficher (structA1 x); + +/// Header_A2 +typedef struct +{ + int champX; + int champY; +} structA2; +structA2 structA2Creation (int x, int y); +void structA2Afficher (structA1 x); + +/// Header_A3 +typedef struct +{ + int champX; + int champY; +} structA3; +structA3 structA3Creation (int x, int y); +void structA3Afficher (structA3 x); diff --git a/SCRIPTS_EXEMPLES/Ksh_Expression.pdf b/SCRIPTS_EXEMPLES/Ksh_Expression.pdf new file mode 100755 index 0000000..ee7d698 Binary files /dev/null and b/SCRIPTS_EXEMPLES/Ksh_Expression.pdf differ diff --git a/SCRIPTS_EXEMPLES/affiche_args.sh b/SCRIPTS_EXEMPLES/affiche_args.sh new file mode 100755 index 0000000..1209ea4 --- /dev/null +++ b/SCRIPTS_EXEMPLES/affiche_args.sh @@ -0,0 +1,21 @@ + + #!/bin/bash + # M111 - TP9 - afficheargs.sh + + echo $* + + for i in $* + do + echo $i + done + + for i + do + echo $i + done + + while test $# != 0 # ou bien [ ou bien [[ + do + echo $1 + shift + done diff --git a/SCRIPTS_EXEMPLES/ajoutersalle.sh b/SCRIPTS_EXEMPLES/ajoutersalle.sh new file mode 100755 index 0000000..a0fb3d9 --- /dev/null +++ b/SCRIPTS_EXEMPLES/ajoutersalle.sh @@ -0,0 +1,33 @@ +#! /bin/bash + +# M111 - TP11 - ajouterposte.sh (version prototype a terminer) +# Ajout a la fin d'un fichier (ou creation du fichier) de lignes composées +# d'un mot, chaque mot terminé par 00 à 99. +# Le fichier de nom FICHIER-DES-SALLES se trouve dans le répertoire indiqué +# par la variable d'environnement REP_SALLES. + +# Exemple : +# $ q6 S756P 01 11 +# $ cat $REP_SALLES/FICHIER-DES-SALLES +# S756P01 +# S756P02 +# S756P03 +# S756P05 +# S756P06 +# S756P07 +# S756P08 +# S756P09 +# S756P10 +# S756P11 +# $ + +if [[ $# -ne 3 ]] ; then echo "Syntaxe : $0 salle debut fin" ; exit 2 ; fi +if [[ ! -d $REP_SALLES ]] ; then echo '$REP_SALLE absente ou incorrecte' ; exit 2 ; fi +if [[ $3 -gt 99 ]] ; then echo "Nombre entre 0 et 99 !" ; exit 2 ; fi +for NB in $(seq $2 $3) +do + if [[ $NB -le 9 ]] + then echo ${1}0$NB + else echo $1$NB + fi +done >> $REP_SALLES/FICHIER-DES-SALLES diff --git a/SCRIPTS_EXEMPLES/calcul_taille1.sh b/SCRIPTS_EXEMPLES/calcul_taille1.sh new file mode 100755 index 0000000..cac1d73 --- /dev/null +++ b/SCRIPTS_EXEMPLES/calcul_taille1.sh @@ -0,0 +1,16 @@ + + #!/bin/bash + # Version avec 'stat' + + somme=0 + for i in * + do + if [ -f $i ] + then + taille=$(stat -c%s $i) + let somme=somme+taille + echo "... Mise au point " $i $taille $somme >&2 + fi + done + echo $somme + diff --git a/SCRIPTS_EXEMPLES/calcul_taille2.sh b/SCRIPTS_EXEMPLES/calcul_taille2.sh new file mode 100755 index 0000000..f9d0783 --- /dev/null +++ b/SCRIPTS_EXEMPLES/calcul_taille2.sh @@ -0,0 +1,13 @@ + + #!/bin/bash + # Version avec 'ls' et 'read' + + + ls -l | grep '^-' | { somme=0 ; while read m1 m2 m3 m4 taille m6 + do + let somme=somme+taille + echo "... Mise au point " $i $taille $somme >&2 + done + echo $somme + } + diff --git a/SCRIPTS_EXEMPLES/calcul_taille3.sh b/SCRIPTS_EXEMPLES/calcul_taille3.sh new file mode 100755 index 0000000..68aa2ce --- /dev/null +++ b/SCRIPTS_EXEMPLES/calcul_taille3.sh @@ -0,0 +1,14 @@ + + #!/bin/bash + # Version avec 'ls' et 'set' + + + ls -l | grep '^-' | { somme=0; while read neutre ligne + do + set $ligne + let somme=somme+$4 + echo "... Mise au point " $i $taille $somme >&2 + done + echo $somme + } + diff --git a/SCRIPTS_EXEMPLES/concatenation.sh b/SCRIPTS_EXEMPLES/concatenation.sh new file mode 100755 index 0000000..88d1959 --- /dev/null +++ b/SCRIPTS_EXEMPLES/concatenation.sh @@ -0,0 +1,10 @@ +#! /bin/bash +# M111 - TP9 - concatene.sh + +rm -rf GROSFICHIER + +for FICH in TEST/* +do + cat $FICH >> GROSFICHIER +done + diff --git a/SCRIPTS_EXEMPLES/egaltilde.sh b/SCRIPTS_EXEMPLES/egaltilde.sh new file mode 100755 index 0000000..f302a49 --- /dev/null +++ b/SCRIPTS_EXEMPLES/egaltilde.sh @@ -0,0 +1,19 @@ + + #!/bin/bash - egaltilde.sh + # M111 - TP11 - reconnaitre un mot commencant + # par un caractere particulier + + if [[ $# -le 1 ]] + then echo "Syntaxe : $0 caractere mot ..." + exit 5 + fi + + LECAR=$1 + shift + while [[ ! $1 =~ $LECAR && -n $1 ]] + do + LESMOTS="$LESMOTS $1" + echo ' boucle ...' + shift + done + echo ' 'LESMOTS=\'$LESMOTS\' diff --git a/SCRIPTS_EXEMPLES/manip_chaine.sh b/SCRIPTS_EXEMPLES/manip_chaine.sh new file mode 100755 index 0000000..359d14a --- /dev/null +++ b/SCRIPTS_EXEMPLES/manip_chaine.sh @@ -0,0 +1,7 @@ +MOT='' +echo Valeur de LIGNE = $MOT +echo ${MOT//.c/.o} +basename /usr/bin/fichier.c +basename --suffix=.c fichier.c +basename /home/TP +dirname /usr/bin/gcc diff --git a/SCRIPTS_EXEMPLES/somme_args.sh b/SCRIPTS_EXEMPLES/somme_args.sh new file mode 100755 index 0000000..cb19935 --- /dev/null +++ b/SCRIPTS_EXEMPLES/somme_args.sh @@ -0,0 +1,17 @@ + + #!/bin/bash + # M111 - TP9 - sommeargs.sh (prototype) + # solution avec seq possible ... + + if [[ $# -ne 2 ]] + then echo "Syntaxe : $0 nbre1 nombre2 # avec nbre1 <= nbre2" ; exit 2 ; fi + + NB1=$1 + NB2=$2 + SOMME=0 + while [[ $NB1 -le $NB2 ]] + do + let SOMME=SOMME+NB1 + let NB1++ + done + echo $SOMME diff --git a/SCRIPTS_EXEMPLES/strings.JPG b/SCRIPTS_EXEMPLES/strings.JPG new file mode 100755 index 0000000..ffc157c Binary files /dev/null and b/SCRIPTS_EXEMPLES/strings.JPG differ diff --git a/SCRIPTS_EXEMPLES/traite_arguments.sh b/SCRIPTS_EXEMPLES/traite_arguments.sh new file mode 100755 index 0000000..41c0064 --- /dev/null +++ b/SCRIPTS_EXEMPLES/traite_arguments.sh @@ -0,0 +1,47 @@ +#! /bin/bash + +# traite_arguments.sh : exemple de script pour traiter les arguments de la ligne de commande +# - avec passage d'arguments (simples ou couple) dans un ordre quelconque +# - avec initialisation des variables associées aux parametres pour traitement ulterieur +# - Affichage des valeurs des variables concernees + +# Arguments possibles : +# -x1 -x2 --var_x2 +# -a1 valeur -argument1 valeur -a2 valeur --argument2 + +# Exemple : +# traite_arguments.sh -a1 val1 --argument1 val11 -x1 -a2 val2 -x2 # nb : redondance + +varX1=0 ; varX2=0 +variable1=NON ; variable2=NON +echo Nombre d arguments = $# +while [[ $# -gt 0 ]] ; do + case $1 in + "-x1" ) varX1=1 + shift ;; + "-x2" | "--var_x2" ) varX2=1 + shift + ;; + "-d" | "--argument1" ) + if [[ -n $2 ]] + then + if [ -d $2 ] + variable1=$2 + else + echo "$0: Syntaxe : $1 " ; exit 2 + fi + shift ; shift ;; + "-a2" | "--argument2" ) + if [[ -n $2 ]] + then variable2=$2 + else + echo "$0: Syntaxe : $1 " ; exit 2 + fi + shift ; shift ;; + * ) echo "$0: Syntaxe : $1 = parametre illegal" ; exit 2 + esac + +done + + + diff --git a/Squelette_Makefile b/Squelette_Makefile new file mode 100755 index 0000000..bda8f0a --- /dev/null +++ b/Squelette_Makefile @@ -0,0 +1,11 @@ +CFLAGS = -Wall -std=gnu99 -g + +EXECUTABLES = crash \ + crash2 + + +all : ${EXECUTABLES} + +clean : + @rm -f core *.o *.out *~ + @rm -f ${EXECUTABLES} diff --git a/appli_A/Help b/appli_A/Help new file mode 100755 index 0000000..8342160 --- /dev/null +++ b/appli_A/Help @@ -0,0 +1,3 @@ + +Pour produire l'executable : gcc *.c -o appli_A + diff --git a/appli_A/dir/1.c b/appli_A/dir/1.c new file mode 100755 index 0000000..e69de29 diff --git a/appli_A/dir/2.c b/appli_A/dir/2.c new file mode 100755 index 0000000..e69de29 diff --git a/appli_A/dir/23-36664289109.c b/appli_A/dir/23-36664289109.c new file mode 100755 index 0000000..e69de29 diff --git a/appli_A/dir/3.c b/appli_A/dir/3.c new file mode 100755 index 0000000..e69de29 diff --git a/appli_A/dir/546.c b/appli_A/dir/546.c new file mode 100755 index 0000000..e69de29 diff --git a/appli_A/fichier_A1.c b/appli_A/fichier_A1.c new file mode 100755 index 0000000..8e74330 --- /dev/null +++ b/appli_A/fichier_A1.c @@ -0,0 +1,7 @@ +#include +#include "fichier_A1.h" +structA1 structA1Creation (int x, int y) +{ printf ("Execution de structA1Creation\n");} +void structA1Afficher (structA1 x) +{ printf ("Execution de structA1Afficher\n");} + diff --git a/appli_A/fichier_A1.h b/appli_A/fichier_A1.h new file mode 100755 index 0000000..9cb506f --- /dev/null +++ b/appli_A/fichier_A1.h @@ -0,0 +1,9 @@ +/// Header_A1 +typedef struct +{ + int champX; + int champY; +} structA1; +structA1 structA1Creation (int x, int y); +void structA1Afficher (structA1 x); + diff --git a/appli_A/fichier_A2.c b/appli_A/fichier_A2.c new file mode 100755 index 0000000..3a188ca --- /dev/null +++ b/appli_A/fichier_A2.c @@ -0,0 +1,9 @@ + +#include +#include "fichier_A2.h" +structA2 structA2Creation (int x, int y) +{ printf ("Execution de structA2Creation\n");} +void structA2Afficher (structA2 x) +{ printf ("Execution de structA2Afficher\n");} + + diff --git a/appli_A/fichier_A2.h b/appli_A/fichier_A2.h new file mode 100755 index 0000000..475bd9b --- /dev/null +++ b/appli_A/fichier_A2.h @@ -0,0 +1,9 @@ +/// Header_A2 +typedef struct +{ + int champX; + int champY; +} structA2; +structA2 structA2Creation (int x, int y); +void structA2Afficher (structA2 x); + diff --git a/appli_A/fichier_A3.c b/appli_A/fichier_A3.c new file mode 100755 index 0000000..991ae8a --- /dev/null +++ b/appli_A/fichier_A3.c @@ -0,0 +1,7 @@ +#include +#include "fichier_A3.h" +structA3 structA3Creation (int x, int y) +{ printf ("Execution de structA3Creation\n");} +void structA3Afficher (structA3 x) +{ printf ("Execution de structA3Afficher\n");} + diff --git a/appli_A/fichier_A3.h b/appli_A/fichier_A3.h new file mode 100755 index 0000000..e861455 --- /dev/null +++ b/appli_A/fichier_A3.h @@ -0,0 +1,9 @@ +/// Header_A3 +typedef struct +{ + int champX; + int champY; +} structA3; +structA3 structA3Creation (int x, int y); +void structA3Afficher (structA3 x); + diff --git a/appli_A/main b/appli_A/main new file mode 100755 index 0000000..0b411b6 Binary files /dev/null and b/appli_A/main differ diff --git a/appli_A/mgcc.sh b/appli_A/mgcc.sh new file mode 100755 index 0000000..e6e06c5 --- /dev/null +++ b/appli_A/mgcc.sh @@ -0,0 +1,73 @@ +#echo "|**********************************************************************|" +#echo "* Projet : TD11 - Script 1" +#echo "*" +#echo "* Programme : mgcc.sh" +#echo "*" +#echo "* Auteur : JunkJumper" +#echo "*" +#echo "* Date created : 12-12-2018" +#echo "*" +#echo "* But : Apprendre pour le makefile" +#echo "*" +#echo "|**********************************************************************|" + +varX1=0 ; varX2=0 + +leVerbose=NON +leInclude=NON +repertoire=. +echo Nombre d arguments = $# + +if [[ $# > 4 ]] + then + echo "$0: Erreur, vous avez entré trop d'arguments" ; exit 2 +else + while [[ $# -gt 0 ]] ; do + case $1 in + "-v" | "--verbose" ) + leVerbose=OUI + shift + ;; + "-i" | "--include" ) + leInclude=OUI + shift + ;; + "-d" | "--directory" ) + if [[ -n $2 ]] + then + if [ -d $2 ] + then + repertoire=$2 + else + echo "$0: Syntaxe : le répertoire $2 n'existe pas" ; exit 2 + fi + else + echo "$0: Syntaxe : $1 doit etre accompagné d'un répertoire valide" + + fi + shift ; shift ;; + * ) echo "$0: Syntaxe : $1 = parametre interdit" ; exit 2 + esac + + done +fi + +#ca c'est pour tester mtn va les enlever +echo $leVerbose +echo $leInclude +echo $repertoire +echo "" + +cd $repertoire +for i in *.c +do + echo "gcc -c $i" +done + + + + + + + +cd /home/sj801446/Documents/M111/TP_11_bash_projet_make/appli_A/ diff --git a/appli_A/redir b/appli_A/redir new file mode 100755 index 0000000..e8d27c6 --- /dev/null +++ b/appli_A/redir @@ -0,0 +1,3 @@ +1.c +2.c +3.c diff --git a/appli_A_B/Help b/appli_A_B/Help new file mode 100755 index 0000000..3116e3a --- /dev/null +++ b/appli_A_B/Help @@ -0,0 +1,4 @@ + +Pour produire l'executable appli_A : gcc *A*.c -o appli_A +Pour produire l'executable appli_B : gcc *B*.c fichier_A3.c -o appli_B + diff --git a/appli_A_B/appli_A b/appli_A_B/appli_A new file mode 100755 index 0000000..0b411b6 Binary files /dev/null and b/appli_A_B/appli_A differ diff --git a/appli_A_B/appli_A.c b/appli_A_B/appli_A.c new file mode 100755 index 0000000..a40f383 --- /dev/null +++ b/appli_A_B/appli_A.c @@ -0,0 +1,20 @@ +/// appliA.C +#include "fichier_A1.h" +#include "fichier_A2.h" +#include "fichier_A3.h" + +int main() +{ + int x, y; + structA1 A1 = structA1Creation (x, y); + + + structA2 A2 = structA2Creation (x, y); + + + structA3 A3 = structA3Creation (x, y); + structA1Afficher (A1); + structA2Afficher (A2); + structA3Afficher (A3); + return 0; +} diff --git a/appli_A_B/appli_B b/appli_A_B/appli_B new file mode 100755 index 0000000..236a872 Binary files /dev/null and b/appli_A_B/appli_B differ diff --git a/appli_A_B/appli_B.c b/appli_A_B/appli_B.c new file mode 100755 index 0000000..8f4db06 --- /dev/null +++ b/appli_A_B/appli_B.c @@ -0,0 +1,20 @@ +/// BppliB.C +#include "fichier_B1.h" +#include "fichier_B2.h" +#include "fichier_B3.h" +#include "fichier_A3.h" + +int main() +{ + int x, y; + structB1 B1 = structB1Creation (x, y); + structB2 B2 = structB2Creation (x, y); + structB3 B3 = structB3Creation (x, y); + structA3 A3 = structA3Creation (x, y); + + structB1Afficher (B1); + structB2Afficher (B2); + structB3Afficher (B3); + structA3Afficher (A3); + return 0; +} diff --git a/appli_A_B/fichier_A1.c b/appli_A_B/fichier_A1.c new file mode 100755 index 0000000..8e74330 --- /dev/null +++ b/appli_A_B/fichier_A1.c @@ -0,0 +1,7 @@ +#include +#include "fichier_A1.h" +structA1 structA1Creation (int x, int y) +{ printf ("Execution de structA1Creation\n");} +void structA1Afficher (structA1 x) +{ printf ("Execution de structA1Afficher\n");} + diff --git a/appli_A_B/fichier_A1.h b/appli_A_B/fichier_A1.h new file mode 100755 index 0000000..9cb506f --- /dev/null +++ b/appli_A_B/fichier_A1.h @@ -0,0 +1,9 @@ +/// Header_A1 +typedef struct +{ + int champX; + int champY; +} structA1; +structA1 structA1Creation (int x, int y); +void structA1Afficher (structA1 x); + diff --git a/appli_A_B/fichier_A2.c b/appli_A_B/fichier_A2.c new file mode 100755 index 0000000..3a188ca --- /dev/null +++ b/appli_A_B/fichier_A2.c @@ -0,0 +1,9 @@ + +#include +#include "fichier_A2.h" +structA2 structA2Creation (int x, int y) +{ printf ("Execution de structA2Creation\n");} +void structA2Afficher (structA2 x) +{ printf ("Execution de structA2Afficher\n");} + + diff --git a/appli_A_B/fichier_A2.h b/appli_A_B/fichier_A2.h new file mode 100755 index 0000000..475bd9b --- /dev/null +++ b/appli_A_B/fichier_A2.h @@ -0,0 +1,9 @@ +/// Header_A2 +typedef struct +{ + int champX; + int champY; +} structA2; +structA2 structA2Creation (int x, int y); +void structA2Afficher (structA2 x); + diff --git a/appli_A_B/fichier_A3.c b/appli_A_B/fichier_A3.c new file mode 100755 index 0000000..991ae8a --- /dev/null +++ b/appli_A_B/fichier_A3.c @@ -0,0 +1,7 @@ +#include +#include "fichier_A3.h" +structA3 structA3Creation (int x, int y) +{ printf ("Execution de structA3Creation\n");} +void structA3Afficher (structA3 x) +{ printf ("Execution de structA3Afficher\n");} + diff --git a/appli_A_B/fichier_A3.h b/appli_A_B/fichier_A3.h new file mode 100755 index 0000000..e861455 --- /dev/null +++ b/appli_A_B/fichier_A3.h @@ -0,0 +1,9 @@ +/// Header_A3 +typedef struct +{ + int champX; + int champY; +} structA3; +structA3 structA3Creation (int x, int y); +void structA3Afficher (structA3 x); + diff --git a/appli_A_B/fichier_B1.c b/appli_A_B/fichier_B1.c new file mode 100755 index 0000000..642404d --- /dev/null +++ b/appli_A_B/fichier_B1.c @@ -0,0 +1,7 @@ +#include +#include "fichier_B1.h" +structB1 structB1Creation (int x, int y) +{ printf ("Execution de structB1Creation\n");} +void structB1Afficher (structB1 x) +{ printf ("Execution de structB1Afficher\n");} + diff --git a/appli_A_B/fichier_B1.h b/appli_A_B/fichier_B1.h new file mode 100755 index 0000000..992a679 --- /dev/null +++ b/appli_A_B/fichier_B1.h @@ -0,0 +1,10 @@ +#include "fichier_A1.h" +/// Header_B1 +typedef struct +{ + int champX; + int champY; +} structB1; +structB1 structB1Creation (int x, int y); +void structB1Afficher (structB1 x); + diff --git a/appli_A_B/fichier_B2.c b/appli_A_B/fichier_B2.c new file mode 100755 index 0000000..8f80c6a --- /dev/null +++ b/appli_A_B/fichier_B2.c @@ -0,0 +1,9 @@ + +#include +#include "fichier_B2.h" +structB2 structB2Creation (int x, int y) +{ printf ("Execution de structB2Creation\n");} +void structB2Afficher (structB2 x) +{ printf ("Execution de structB2Afficher\n");} + + diff --git a/appli_A_B/fichier_B2.h b/appli_A_B/fichier_B2.h new file mode 100755 index 0000000..248525e --- /dev/null +++ b/appli_A_B/fichier_B2.h @@ -0,0 +1,9 @@ +/// Header_B2 +typedef struct +{ + int champX; + int champY; +} structB2; +structB2 structB2Creation (int x, int y); +void structB2Afficher (structB2 x); + diff --git a/appli_A_B/fichier_B3.c b/appli_A_B/fichier_B3.c new file mode 100755 index 0000000..ab94246 --- /dev/null +++ b/appli_A_B/fichier_B3.c @@ -0,0 +1,7 @@ +#include +#include "fichier_B3.h" +structB3 structB3Creation (int x, int y) +{ printf ("Execution de structB3Creation\n");} +void structB3Afficher (structB3 x) +{ printf ("Execution de structB3Afficher\n");} + diff --git a/appli_A_B/fichier_B3.h b/appli_A_B/fichier_B3.h new file mode 100755 index 0000000..75c0f02 --- /dev/null +++ b/appli_A_B/fichier_B3.h @@ -0,0 +1,9 @@ +/// Header_B3 +typedef struct +{ + int champX; + int champY; +} structB3; +structB3 structB3Creation (int x, int y); +void structB3Afficher (structB3 x); + diff --git a/makefile b/makefile new file mode 100755 index 0000000..ae10eaf --- /dev/null +++ b/makefile @@ -0,0 +1 @@ +main :