I have some code that looks like this:
char template[] = "temp-XXXXXX";
FILE * f = mkstmp(template);
/* ... some stuff is written to f with fprintf ...*/
char fname[15] = xyzzy(f); // <-- Problem
char tmp[20];
sprintf(tmp,"less %s", fname);
system(tmp);
I need to find out the name given to f
by mkstmp
so I can call less
on it.