nsIFileSpec *file1= *(nsIFileSpec **)data1; nsIFileSpec *file2= *(nsIFileSpec **)data2;
nsIFile *file1= *(nsIFile **)data1; nsIFile *file2= *(nsIFile **)data2;
inplaceSortCallback(const void *data1, const void *data2, void *privateData){  char *name1 = nsnull;  char *name2 = nsnull;  nsIFileSpec *file1= *(nsIFileSpec **)data1;  nsIFileSpec *file2= *(nsIFileSpec **)data2;  nsresult rv;  int sortResult = 0;  rv = file1->GetLeafName(&name1);  NS_ASSERTION(NS_SUCCEEDED(rv),"failed to get the leaf name");  if (NS_SUCCEEDED(rv)) {    rv = file2->GetLeafName(&name2);    NS_ASSERTION(NS_SUCCEEDED(rv),"failed to get the leaf name");    if (NS_SUCCEEDED(rv)) {      if (name1 && name2) {        // we want it so foo.js will come before foo-<bar>.js        // "foo." is before "foo-", so we have to reverse the order to accomplish        sortResult = PL_strcmp(name2,name1);      }      if (name1)        nsCRT::free((char*)name1);      if (name2)        nsCRT::free((char*)name2);    }  }  return sortResult;}