NS_WITH_SERVICE(nsINetService, pService, kNetServiceCID, &result); if (NS_FAILED(result)) return result;
if (PL_strncasecmp(argv[1], "-all", 4) == 0) { result = testURL(0); } else result = testURL(argv[1]);
int main(int argc, char **argv){    nsresult result = NS_OK;    if (argc < 2) {        printf("urltest: <URL> \n");        return 0;    }    result = nsComponentManager::AutoRegister(nsIComponentManager::NS_Startup,                                          "components");	if (NS_FAILED(result)) return result;    //Create the nsINetService...    NS_WITH_SERVICE(nsINetService, pService, kNetServiceCID, &result);	if (NS_FAILED(result)) return result;    result = testURL(argv[1]);    return 0;}