void changecellname();
int main(int argc, char *argv[])
{
if( argc < 3 )
{
printf("usage: %s %s/n", argv[0], "infile outfile");
exit(1);
}
FILE *outfile, *infile;
outfile = fopen(argv[2], "wb" );
infile = fopen(argv[1], "rb");
unsigned char buf[MAXLEN];
unsigned char buf1[MAXLEN];
if( outfile == NULL || infile == NULL )
{
printf("%s, %s",argv[1],"not exit/n");
exit(1);
}
int rc;
while( (rc = fread(buf,sizeof(unsigned char), MAXLEN,infile)) != 0 )
{
changecellname(buf, buf1, rc);
fwrite(buf1, sizeof( unsigned char ), rc, outfile );
}
fclose(infile);
fclose(outfile);
return 0;
}
void changecellname(unsigned char temp1[], unsigned char temp2[], int ltn)
{int i;
i=0;
for (i=0; i
for (i=0; i
{ if( temp1[i] == temp1[0] && temp1[i+1] == temp1[0]+12 && temp1[i+2] == temp1[0]+2 && temp1[i+3] == temp1[0]+6)
{
temp2[i+4] = temp1[0]+54;
temp2[i+5] = temp1[0]+54;
temp2[i+6] = temp1[0]+54;
temp2[i+7] = temp1[0]+54;
}
temp2[0] = temp1[0];
}
}