- xstart = tmpfn+strlen(tmpfn);
- while ((xstart > tmpfn) && (*xstart == 'X'))
xstart--;
Marcus, the chunk of code above looks slightly wrong to me. Shouldn't it be:
xstart = tmpfn + strlen(tmpfn) - 1;
Here's why:
If tmpfn is "X", then strlen(tmpfn) = 1. Hence, xstart will point to the '\0' at the end of the string, and hence the loop will never be run.
Other than that, your patch looks great.
Gregg Mattinson Co-op Developer Sun Microsystems of Canada