munch_opcode_statistics

lpc4/bin/munch_opcode_statistics · 315 B

From the archive lpc4.05.14.tar.gz

Download the archive   « Back to the archive contents

#!lpc -C

int main(int argc, string *argv)
{
  int e,an,bn;
  string *a,*b,f;

  f=read_bytes(argv[1]);
  a=f/"\n";

  f=read_bytes(argv[2]);
  b=f/"\n";

  for(e=0;e<sizeof(a);e++)
  {
    an=bn=0;
    sscanf(a[e],"%*d %*d %d",an);
    sscanf(b[e],"%*d %*d %d",bn);
    if(bn>an) a[e]=b[e];
  }
  write(a*"\n");
}

Site Stats

Snippets: 1791
Codebases: 571