PRINTF("cmd line handler contractid = %s\n", (const char *)contractidString);
static void DumpArbitraryHelp(){  nsresult rv;  NS_WITH_SERVICE(nsICategoryManager, catman, "@mozilla.org/categorymanager;1", &rv);  if(NS_SUCCEEDED(rv) && catman) {    nsCOMPtr<nsISimpleEnumerator> e;    rv = catman->EnumerateCategory(COMMAND_LINE_ARGUMENT_HANDLERS, getter_AddRefs(e));    if(NS_SUCCEEDED(rv) && e) {      while (PR_TRUE) {        nsCOMPtr<nsISupportsString> catEntry;        rv = e->GetNext(getter_AddRefs(catEntry));        if (NS_FAILED(rv) || !catEntry) break;        nsXPIDLCString entryString;        rv = catEntry->GetData(getter_Copies(entryString));        if (NS_FAILED(rv) || !((const char *)entryString)) break;        nsXPIDLCString contractidString;        rv = catman->GetCategoryEntry(COMMAND_LINE_ARGUMENT_HANDLERS,(const char *)entryString, getter_Copies(contractidString));        if (NS_FAILED(rv) || !((const char *)contractidString)) break;#ifdef DEBUG_CMD_LINE        printf("cmd line handler contractid = %s\n", (const char *)contractidString);#endif /* DEBUG_CMD_LINE */        nsCOMPtr <nsICmdLineHandler> handler = do_GetService((const char *)contractidString, &rv);        if (handler) {          nsXPIDLCString commandLineArg;          rv = handler->GetCommandLineArgument(getter_Copies(commandLineArg));          if (NS_FAILED(rv)) continue;          nsXPIDLCString helpText;          rv = handler->GetHelpText(getter_Copies(helpText));          if (NS_FAILED(rv)) continue;          if ((const char *)commandLineArg) {            printf("%s%s", HELP_SPACER_1,(const char *)commandLineArg);            PRBool handlesArgs = PR_FALSE;            rv = handler->GetHandlesArgs(&handlesArgs);            if (NS_SUCCEEDED(rv) && handlesArgs) {              printf(" <url>");            }            if ((const char *)helpText) {              printf("%s%s\n",HELP_SPACER_2,(const char *)helpText);            }          }        }      }    }  }  return;}