Révision 22
Ajouté par smseck1 il y a environ 4 ans
branch/smseck/sp4a12/main.c | ||
---|---|---|
"$GPZDA,141914.00,01,02,2006,00,00*69",
|
||
0};
|
||
|
||
int trame_cmp(char* a,char* b){
|
||
return 0;
|
||
int trame_cmp(char* trame,char* type)
|
||
{
|
||
|
||
int i=0;
|
||
do{
|
||
if (trame[i+1]!=type[i])
|
||
return 0;
|
||
i++;
|
||
}while(type[i]!='\0');
|
||
return 1;
|
||
}
|
||
|
||
int decode_int(char c)
|
||
{
|
||
int d;
|
||
d=c-48;
|
||
if(d<0 || d>9)
|
||
{
|
||
return -1;
|
||
}
|
||
else
|
||
return d;
|
||
}
|
||
|
||
int decode_nombre(char *ch,int n)
|
||
{
|
||
|
||
}
|
||
|
||
//Fonction ? modifier !!!!!
|
||
void traitement(char * trame)
|
||
{
|
||
{
|
||
static int cpt=0;
|
||
cpt++;
|
||
|
||
printf ("> %s\n",trame);
|
||
}
|
||
|
||
... | ... | |
int main(int argc,char ** argv)
|
||
{
|
||
|
||
tests_unitaires();
|
||
//tests_unitaires();
|
||
|
||
// Affichage des trames definies dans la table trames.
|
||
printf ("Trames de tests tableau trames:\n");
|
Formats disponibles : Unified diff
implementation des fonctions trame_cmp et decode_int