fix tricky regression noticed by Vyacheslav Tokarev on Google Reader.
[kdelibs.git] / kdoctools / main.cpp
blobee2487bba8671395e24cd32c4421f6f11360163e
1 #ifdef _WIN32
2 #define LIBXML_DLL_IMPORT __declspec(dllimport)
3 #else
4 extern "C" int xmlLoadExtDtdDefaultValue;
5 #endif
7 #include <string.h>
8 #include <sys/time.h>
9 #include <unistd.h>
10 #include <libxml/xmlversion.h>
11 #include <libxml/xmlmemory.h>
12 #include <libxml/debugXML.h>
13 #include <libxml/HTMLtree.h>
14 #include <libxml/xmlIO.h>
15 #include <libxml/parserInternals.h>
16 #include <libxslt/xsltconfig.h>
17 #include <libxslt/xsltInternals.h>
18 #include <libxslt/transform.h>
19 #include <libxslt/xsltutils.h>
20 #include <QtCore/QString>
21 #include <kstandarddirs.h>
22 #include <kcomponentdata.h>
23 #include <kdebug.h>
24 #include <stdlib.h>
25 #include "kio_help.h"
26 #include "xslt.h"
28 extern "C"
30 KDE_EXPORT int kdemain( int argc, char **argv )
32 Q_ASSERT(!KGlobal::hasMainComponent()); // kdeinit is messed up if this is the case.
33 KComponentData componentData( "kio_help", "kio_help4" );
34 fillInstance(componentData);
35 (void)componentData.config(); // we need this one to make sure system globals are read
37 kDebug(7101) << "Starting " << getpid();
39 if (argc != 4)
41 fprintf(stderr, "Usage: kio_help protocol domain-socket1 domain-socket2\n");
42 exit(-1);
45 LIBXML_TEST_VERSION
46 xmlSubstituteEntitiesDefault(1);
47 xmlLoadExtDtdDefaultValue = 1;
49 HelpProtocol slave(false, argv[2], argv[3]);
50 slave.dispatchLoop();
52 kDebug(7101) << "Done";
53 return 0;