Projet

Général

Profil

« Précédent | Suivant » 

Révision 176

Ajouté par faba6 il y a presque 4 ans

Réponse à la question_6

Voir les différences:

trunk/sp4abc/sp4a12/main.c
0};
int trame_cmp(char* a,char* b){
int k=0; //Initialisation des variables
int verif = 1;
int j;
while(b[k] != NULL){ //Calcul de la taille de la chaine type
k++;
}
for(j=0; j<k; j++){ //On v?rifie que les premiers caract?res sont identiques
if (a[j+1] != b[j]){
verif = 0;
}
}
return verif; //On retourne, 1 c'est valid?, 0 c'est pas valid?.
int trame_cmp(char* trame,char*b){
int k=0; //Initialisation des variables
int verif = 1;
int j;
while(b[k] != NULL){ //Calcul de la taille de la chaine type
k++;
}
for(j=0; j<k; j++){ //On v?rifie que les premiers caract?res sont identiques
if (trame[j+1] != b[j]){
verif = 0;
}
}
return verif; //On retourne, 1 c'est valid?, 0 c'est pas valid?. }
}
......
{
static int cpt=0;
cpt++;
if(trame_cmp(trame,"GPGGA"))
printf ("> %s\n",trame);
}

Formats disponibles : Unified diff