Can you share the temp file hack?
it's assembly patched - source would be the bindiff sorryI would imagine the changes in source are here:
//line 145
printf("\nInput file : %s\n", filename);
char tempname[4];
tempname[0] = filename[4];
tempname[1] = filename[5];
tempname[2] = filename[6];
tempname[3] = filename[7];
char tempname_txt[8];
char tempname_pgm[8];
snprintf(tempname_txt,8,"%s.txt",tempname);
snprintf(tempname_pgm,8,"%s.pgm",tempname);
char dcraw_cmd[1000];
//line 148
snprintf(dcraw_cmd, sizeof(dcraw_cmd), "dcraw -v -i -t 0 \"%s\" >
%s", filename, tempname_txt); int exit_code = system(dcraw_cmd);
CHECK(exit_code == 0, "%s", filename);
unsigned int model = get_model_id(filename);
exit_code = get_raw_info(model, &raw_info);
CHECK(exit_code == 0, "RAW INFO INJECTION FAILED");
//line 157
FILE* t = fopen(tempname_txt, "rb");
CHECK(t, tempname_txt);
also replace "tmp.pgm" with tempname_pgm (line 184, 188, 189)
finally, replace the unlink() parameters at 283/284
a1ex: a suggestion: turn on sse floating point instructions - it'll give a 20-30% speedup for free on many speed critical routines. -msse -msse2 -mfpmath=sse are the compiler flags for gcc, and will produce executables that run on pentium4/amdK8 or higher
edit: maybe not. I only found two routines