Comparision of DATA mode data in AT mode


#1
typedef struct
{
ascii Localbuffer[600];
}local;

local localdata;
ascii Whole_Mtr_Data[600];

/*********************************************************************************/
bool data_handler(u16 datlength,u8 * data)
    { 
        ascii NewText [600],txt[600];
        u16 i;  
        
    for ( i = 0; i < datlength ; i++,j++ )
      {
		    txt[i]=data[i]; 

	               wm_sprintf ( NewText, "%c", txt[i] );
		  wm_strcpy(Buff2, NewText);
		 wm_strcat(Whole_Mtr_Data,Buff2);
					 					 
	}
        return TRUE;
    }
/***********************************************************************/
		data in    Whole_Mtr_Data[600]
/**********************************************************************/
G(Farhen & voukro Limnnoik, Mhjiue, 6789 )
J(07015466     )
K(29080806112952 )
H(5 1.00 1.00 5 0 03 K A )
H(verRADR7.00 pc68 )
H(00010I )
H(1 0 )
L(08 02 011 10 DC )
H(1 0 )
H(A000 )
H(29080806112952 )
U(58.360 58.350 0.000 )
C(0.000 0.000 0.000 )
M(V : *** I : *** )
N(0.000 0.000 *** )
O(0.000 0.000 *** )
W(0.000 0.000 *** )
A(0.000 0.000 0.000 ***0 )
P(48.521 )
!
/******************************************************************/
void Compare()
{
u16  count_i,Data_Index;

local *localdata1;
localdata1=&localdata;

for(count_i=0,Data_Index=0;Whole_Mtr_Data[count_i]!='\0';count_i++)
{
	if((Whole_Mtr_Data[count_i]!=0x20)||(Whole_Mtr_Data count_i]!='   '))
	{
		localdata1->Localbuffer[Data_Index++]=Whole_Mtr_Data [count_i];
		localdata1->Localbuffer[Data_Index]='\0';
	}
	if((Whole_Mtr_Data count_i]==0x20)||(Whole_Mtr_Data count_i]=='   ' ))
	{
	break;
	}

}
}