Projet

Général

Profil

« Précédent | Suivant » 

Révision 162

Ajouté par beclement2 il y a presque 4 ans

Fin question 5 (et légère correction fonction tram)

Voir les différences:

branch/CLEMENT/sp4a12/main.c
int trame_cmp(char* trame,char* type){
int i=0; //Initialisation des variables
int verif = 0;
int verif = 1;
int j;
while(type[i] != NULL){ //Calcul de la taille de la chaine type
......
if (trame[j+1] != type[j]){
verif = 0;
}
else{
verif = 1;
}
}
return verif; //On retourne, 1 c'est valid?, 0 c'est pas valid?.
......
void traitement(char * trame)
{
static int cpt=0 ;
printf ("> %s\n",trame);
if ((trame_cmp(trame, "GPGGA")) == 1){
printf("> %s\n",trame);
}
cpt++ ;

Formats disponibles : Unified diff