inString.AppendWithConversion(c);
inString.AppendWithConversion((char)c);
int main(int argc, char** argv){  nsString inType; inType.AssignWithConversion("text/html");  nsString outType; outType.AssignWithConversion("text/plain");  int wrapCol = 72;  int flags = 0;  nsString compareAgainst;  // Skip over progname arg:  const char* progname = argv[0];  --argc; ++argv;  // Process flags  while (argc > 0 && argv[0][0] == '-')  {    switch (argv[0][1])    {      case 'h':        printf("\Usage: %s [-i intype] [-o outtype] [-f flags] [-w wrapcol] [-c comparison_file] infile\n\\tIn/out types are mime types (e.g. text/html)\n\\tcomparison_file is a file against which to compare the output\n\\n\\tDefaults are -i text/html -o text/plain -f 0 -w 72 [stdin]\n",               progname);        exit(0);        case 'i':        if (argv[0][2] != '\0')          inType.AssignWithConversion(argv[0]+2);        else {          inType.AssignWithConversion(argv[1]);          --argc;          ++argv;        }        break;      case 'o':        if (argv[0][2] != '\0')          outType.AssignWithConversion(argv[0]+2);        else {          outType.AssignWithConversion(argv[1]);          --argc;          ++argv;        }        break;      case 'w':        if (isdigit(argv[0][2]))          wrapCol = atoi(argv[0]+2);        else {          wrapCol = atoi(argv[1]);          --argc;          ++argv;        }        break;      case 'f':        if (isdigit(argv[0][2]))          flags = atoi(argv[0]+2);        else {          flags = atoi(argv[1]);          --argc;          ++argv;        }        break;      case 'c':        if (argv[0][2] != '\0')          compareAgainst.AssignWithConversion(argv[0]+2);        else {          compareAgainst.AssignWithConversion(argv[1]);          --argc;          ++argv;        }        break;    }    ++argv;    --argc;  }  FILE* file = 0;  if (argc > 0)         // read from a file  {    // Open the file in a Unix-centric way,    // until I find out how to use nsFileSpec:    file = fopen(argv[0], "r");    if (!file)    {      fprintf(stderr, "Can't open file %s", argv[0]);      perror(" ");      exit(1);    }  }  else file = stdin;  nsComponentManager::AutoRegister(nsIComponentManager::NS_Startup, 0);  NS_SetupRegistry();  // Read in the string: very inefficient, but who cares?  nsString inString;  char c;  while ((c = getc(file)) != EOF)    inString.AppendWithConversion(c);  if (file != stdin)    fclose(file);  return HTML2text(inString, inType, outType, flags, wrapCol, compareAgainst);}