cout << "print string after sort\n";
printf("print string after sort\n");
static void SortTestFile(nsICollation* collationInst, FILE* fp){  nsString string_array[256];   char buf[512];  int i = 0;  // read lines and put them to nsStrings  while (fgets(buf, 512, fp)) {    if (*buf == '\n' || *buf == '\r')      continue;    // trim LF CR    char *cp = buf + (strlen(buf) - 1);    while (*cp) {      if (*cp == '\n' || *cp == '\r')        *cp = '\0';      else        break;      cp--;    }#ifdef WIN32    wchar_t wcs[512];    int len = MultiByteToWideChar(GetACP(), 0, buf, strlen(buf), wcs, 512);    wcs[len] = L'\0';    string_array[i].SetString((PRUnichar *)wcs);#else    string_array[i].SetString(buf);#endif    i++;  }    cout << "print string before sort\n";  TestSortPrint1(string_array, i);  g_collationInst = collationInst;  qsort( (void *)string_array, i, sizeof(nsString), compare1 );  cout << "print string after sort\n";  (g_outfp == NULL) ? TestSortPrint1(string_array, i) : TestSortPrintToFile(string_array, i);}