Révision 696
Ajouté par rademagalh il y a presque 4 ans
main.c | ||
---|---|---|
}
|
||
}
|
||
|
||
int decode_nombre(char * ch, int n)
|
||
int decode_nombrdistance_a_la_plus_proche_zone(pos1, zones, 2)e(char * ch, int n)
|
||
{
|
||
int longueurMot=0;
|
||
char caratereCourrant=0;
|
||
... | ... | |
}
|
||
}
|
||
|
||
float CharVersDegre(char* ch)
|
||
float CharVersDegre(char * ch)
|
||
{
|
||
char * nombre=ch;
|
||
float dec;
|
||
... | ... | |
n=compte-1;
|
||
continue;
|
||
}
|
||
int d = *ch - '0';
|
||
float d = *ch - '0';
|
||
if (d >= 0 && d <= 9)
|
||
{
|
||
if (virguleVu) fact /= 10.0;
|
||
res = res * 10.0 + (float)d;
|
||
res = res * 10.0 + d;
|
||
}
|
||
if (*ch == ',')
|
||
{
|
||
... | ... | |
degre=decode_nombre(nombre,3);
|
||
dec=(dec-degre*100)/60;
|
||
}
|
||
return (degre+dec);
|
||
dec = degre + dec;
|
||
return dec;
|
||
}
|
||
|
||
Position decode_trame(char * ch)
|
||
... | ... | |
cpt++;
|
||
printf ("> %s\n",trame);
|
||
}
|
||
|
||
distance_a_la_plus_proche_zone(pos1, zones, 2)
|
||
//Ajouter vos tests unitaires dans cette fonction.
|
||
void tests_unitaires(void){
|
||
printf("Test de la fonction trame_cmp \n");
|
||
... | ... | |
test_decode_int();
|
||
test_decode_nombre();
|
||
test_decode_trame();
|
||
|
||
// Affichage des trames definies dans la table trames.
|
||
printf ("Trames de tests tableau trames:\n");
|
||
int i=0;
|
Formats disponibles : Unified diff
Mise a jour tp SPb3 avant modification des fonctions flottantes