The test builds and works now, with autoreg help from dp

This commit is contained in:
akkana@netscape.com
1999-09-14 22:43:18 +00:00
parent 9dc34909ef
commit a0822b5969
4 changed files with 22 additions and 762 deletions

View File

@@ -59,10 +59,13 @@ nsresult HTML2text(int toHTML)
while ((c = getchar()) != EOF)
inString += c;
//printf("Input string is: %s\n-------------------- \n",
// inString.ToNewCString());
#if 0
printf("Input string is: %s\n-------------------- \n",
inString.ToNewCString());
printf("------------------------------------\n");
#endif
// Create a parser
// Create a parser
nsIParser* parser;
rv = nsComponentManager::CreateInstance(kParserCID, nsnull,
kIParserIID,(void**)&parser);
@@ -74,6 +77,7 @@ nsresult HTML2text(int toHTML)
nsIHTMLContentSink* sink = nsnull;
// Create the appropriate output sink
if (toHTML)
rv = NS_New_HTML_ContentSinkStream(&sink, &outString, 0);
@@ -113,6 +117,7 @@ nsresult HTML2text(int toHTML)
int main(int argc, char** argv)
{
nsComponentManager::AutoRegister(nsIComponentManager::NS_Startup, 0);
NS_SetupRegistry();
if (argc > 1 && argv[1][0] == '-' && argv[1][1] == 'h')