1#ifdef _WIN32
2#define LIBXML_DLL_IMPORT __declspec(dllimport)
3#else
4extern "C" int xmlLoadExtDtdDefaultValue;
5#endif
6
7#include "kio_help.h"
8#include "xslt.h"
9
10#include <kstandarddirs.h>
11#include <kcomponentdata.h>
12#include <kdebug.h>
13
14#include <QtCore/QString>
15
16#include <stdlib.h>
17#include <string.h>
18#include <sys/time.h>
19#include <unistd.h>
20
21#include <libxml/xmlversion.h>
22#include <libxml/xmlmemory.h>
23#include <libxml/debugXML.h>
24#include <libxml/HTMLtree.h>
25#include <libxml/xmlIO.h>
26#include <libxml/parserInternals.h>
27
28#include <libxslt/xsltconfig.h>
29#include <libxslt/xsltInternals.h>
30#include <libxslt/transform.h>
31#include <libxslt/xsltutils.h>
32#include <libexslt/exslt.h>
33
34extern "C"
35{
36 KDE_EXPORT int kdemain( int argc, char **argv )
37 {
38 Q_ASSERT(!KGlobal::hasMainComponent()); // kdeinit is messed up if this is the case.
39 KComponentData componentData( "kio_help", "kio_help4" );
40 fillInstance(componentData);
41 (void)componentData.config(); // we need this one to make sure system globals are read
42
43 kDebug(7101) << "Starting " << getpid();
44
45 if (argc != 4)
46 {
47 fprintf(stderr, "Usage: kio_help protocol domain-socket1 domain-socket2\n");
48 exit(-1);
49 }
50
51 LIBXML_TEST_VERSION
52 xmlSubstituteEntitiesDefault(1);
53 xmlLoadExtDtdDefaultValue = 1;
54 exsltRegisterAll();
55
56 HelpProtocol slave(false, argv[2], argv[3]);
57 slave.dispatchLoop();
58
59 kDebug(7101) << "Done";
60 return 0;
61 }
62}
63
64
65
66