mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-31 11:01:40 +00:00
Remove more no-longer-needed nsComponentManager::RegisterComponent calls. Remove remnants of NS_IMPL_IDS macro, associated with long-gone NS_DECLARE_ID. b=125782 r=dougt rs=jag
This commit is contained in:
parent
6baa8a23f9
commit
59892aa65e
@ -36,9 +36,7 @@
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
#define NS_IMPL_IDS
|
||||
#include "nsICharsetAlias.h"
|
||||
#undef NS_IMPL_IDS
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIFileChannel.h"
|
||||
|
@ -37,6 +37,7 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "nsXPCOM.h"
|
||||
#include "nsITransactionManager.h"
|
||||
#include "nsIComponentManager.h"
|
||||
|
||||
@ -432,21 +433,6 @@ PRInt32 sAggregateBatchTestRedoOrderArr[] = {
|
||||
295, 296, 297, 298, 299, 300, 301, 448, 449, 450, 451, 452, 453, 454,
|
||||
455, 456, 457, 458 };
|
||||
|
||||
#ifdef MUST_REGISTER_TXMGR_DLL
|
||||
#include "nsTransactionManagerCID.h"
|
||||
static NS_DEFINE_CID(kCTransactionManagerCID, NS_TRANSACTIONMANAGER_CID);
|
||||
|
||||
#ifdef XP_PC
|
||||
#define TRANSACTION_MANAGER_DLL "txmgr.dll"
|
||||
#else
|
||||
#ifdef XP_MAC
|
||||
#define TRANSACTION_MANAGER_DLL "TRANSACTION_MANAGER_DLL"
|
||||
#else // XP_UNIX || XP_BEOS
|
||||
#define TRANSACTION_MANAGER_DLL "libtxmgr"MOZ_DLL_SUFFIX
|
||||
#endif
|
||||
#endif
|
||||
#endif /* MUST_REGISTER_TXMGR_DLL */
|
||||
|
||||
#define TEST_TXMGR_IF_RELEASE(tx) if (tx) tx->Release(); // Release but don't clear pointer!
|
||||
|
||||
class TestTransaction : public nsITransaction
|
||||
@ -4704,13 +4690,9 @@ aggregation_batch_stress_test()
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
nsresult result;
|
||||
|
||||
#ifdef MUST_REGISTER_TXMGR_DLL
|
||||
nsComponentManager::RegisterComponent(kCTransactionManagerCID,
|
||||
NULL, NS_TRANSACTIONMANAGER_CONTRACTID,
|
||||
TRANSACTION_MANAGER_DLL, PR_FALSE, PR_FALSE);
|
||||
#endif /* MUST_REGISTER_TXMGR_DLL */
|
||||
nsresult result = NS_InitXPCOM2(nsnull, nsnull, nsnull);
|
||||
if (NS_FAILED(result))
|
||||
return result;
|
||||
|
||||
result = simple_test();
|
||||
|
||||
|
@ -37,7 +37,6 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
#include "pratom.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIModule.h"
|
||||
|
@ -37,7 +37,6 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
#include "pratom.h"
|
||||
#include "nsIFactory.h"
|
||||
#include "nsIServiceManager.h"
|
||||
|
@ -1,57 +1,17 @@
|
||||
#define NS_IMPL_IDS
|
||||
#include "nsXPCOM.h"
|
||||
#include "nsISupports.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIPICS.h"
|
||||
#include "nsIPref.h"
|
||||
#include "nsIParser.h"
|
||||
#include "nsParserCIID.h"
|
||||
|
||||
#include "nsIIOService.h"
|
||||
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsString.h"
|
||||
#include "prmem.h"
|
||||
#include "plstr.h"
|
||||
#include "nspics.h"
|
||||
|
||||
#define PICS_DLL "pics.dll"
|
||||
#define PREF_DLL "xppref32.dll"
|
||||
#define BASE_DLL "raptorbase.dll"
|
||||
#define RAPTORHTMLPARS_DLL "gkparser.dll"
|
||||
#define NETLIB_DLL "netlib.dll"
|
||||
|
||||
|
||||
|
||||
|
||||
static NS_DEFINE_IID(kIPICSIID, NS_IPICS_IID);
|
||||
static NS_DEFINE_IID(kPICSCID, NS_PICS_CID);
|
||||
|
||||
static NS_DEFINE_IID(kIPrefIID, NS_IPREF_IID);
|
||||
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
|
||||
|
||||
static NS_DEFINE_IID(kIOServiceCID, NS_IOSERVICE_CID);
|
||||
|
||||
static NS_DEFINE_IID(kCParserIID, NS_IPARSER_IID);
|
||||
static NS_DEFINE_CID(kCParserCID, NS_PARSER_CID);
|
||||
|
||||
|
||||
PRInt32 main(PRInt32 argc, char *argv[])
|
||||
{
|
||||
|
||||
nsIPICS *pics = NULL;
|
||||
|
||||
nsresult res;
|
||||
|
||||
nsIObserverService* anObserverService;
|
||||
nsString aTopic("tagobserver");
|
||||
|
||||
|
||||
res = nsRepository::CreateInstance(kPICSCID,
|
||||
NULL,
|
||||
kIPICSIID,
|
||||
(void **) &pics);
|
||||
|
||||
char *fileBuf2;
|
||||
|
||||
char fileBuf[10000] =
|
||||
@ -81,24 +41,17 @@ PRInt32 main(PRInt32 argc, char *argv[])
|
||||
char fileBuf10[1000] = "\"(PICS-1.1)";
|
||||
|
||||
char fileBuf11[1000] = "(PICS-1.1 \"http://www.rsac.org/ratingsv01.html\" l gen true comment \"RSACi North America Server\" by \"philipd@w3.org\" for \"http://www.w3.org\" on \"1996.04.16T08:15-0500\" r (n 0 s 0 v 0 l 0))";
|
||||
if (res == NS_OK) {
|
||||
// Load preferences
|
||||
nsComponentManager::RegisterComponent(kPrefCID, NULL, NULL, PREF_DLL, PR_FALSE, PR_FALSE);
|
||||
|
||||
nsComponentManager::RegisterComponent(kIOServiceCID, NULL, NULL, NETLIB_DLL, PR_FALSE, PR_FALSE);
|
||||
|
||||
nsComponentManager::RegisterComponent(kCParserCID, NULL, NULL, RAPTORHTMLPARS_DLL, PR_FALSE, PR_FALSE);
|
||||
|
||||
res = nsServiceManager::GetService("@mozilla.org/observer-service;1",
|
||||
NS_GET_IID(nsIObserverService),
|
||||
(nsISupports **)&anObserverService);
|
||||
|
||||
|
||||
|
||||
nsresult rv = NS_InitXPCOM2(nsnull, nsnull, nsnull);
|
||||
if (NS_FAILED(rv))
|
||||
return 1;
|
||||
|
||||
nsCOMPtr<nsIPICS> pics = do_CreateInstance(kPICSCID);
|
||||
|
||||
if (pics)
|
||||
pics->ProcessPICSLabel(fileBuf11);
|
||||
}
|
||||
|
||||
|
||||
PR_Free(fileBuf2);
|
||||
return 0;
|
||||
}
|
||||
|
@ -36,9 +36,7 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
#include "nsICharsetAlias.h"
|
||||
#undef NS_IMPL_IDS
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIModule.h"
|
||||
|
||||
|
@ -59,49 +59,24 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
nsIEventQueueService *gEventQService = nsnull;
|
||||
|
||||
nsIWidget *gWindow = NULL;
|
||||
|
||||
#ifdef XP_PC
|
||||
#define XPCOM_DLL "xpcom32.dll"
|
||||
#define WIDGET_DLL "gkwidget.dll"
|
||||
#define GFXWIN_DLL "gkgfxwin.dll"
|
||||
#define TEXT_HEIGHT 25
|
||||
#endif
|
||||
|
||||
#if defined(XP_UNIX) || defined(XP_BEOS)
|
||||
#define XPCOM_DLL "libxpcom"MOZ_DLL_SUFFIX
|
||||
#ifndef WIDGET_DLL
|
||||
#define WIDGET_DLL "libwidget_gtk"MOZ_DLL_SUFFIX
|
||||
#endif
|
||||
#ifndef GFXWIN_DLL
|
||||
#define GFXWIN_DLL "libgfx_gtk"MOZ_DLL_SUFFIX
|
||||
#endif
|
||||
#define TEXT_HEIGHT 30
|
||||
#endif
|
||||
|
||||
#ifdef XP_MAC
|
||||
#define XPCOM_DLL "XPCOM_DLL"
|
||||
#define WIDGET_DLL "WIDGET_DLL"
|
||||
#define GFXWIN_DLL "GFXWIN_DLL"
|
||||
#define TEXT_HEIGHT 30
|
||||
#endif
|
||||
|
||||
// class ids
|
||||
static NS_DEFINE_IID(kCWindowCID, NS_WINDOW_CID);
|
||||
static NS_DEFINE_IID(kLookAndFeelCID, NS_LOOKANDFEEL_CID);
|
||||
|
||||
static NS_DEFINE_IID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID);
|
||||
static NS_DEFINE_IID(kEventQueueCID, NS_EVENTQUEUE_CID);
|
||||
static NS_DEFINE_IID(kCAppShellCID, NS_APPSHELL_CID);
|
||||
static NS_DEFINE_IID(kCToolkitCID, NS_TOOLKIT_CID);
|
||||
|
||||
// interface ids
|
||||
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
|
||||
static NS_DEFINE_IID(kIWidgetIID, NS_IWIDGET_IID);
|
||||
static NS_DEFINE_IID(kIEventQueueServiceIID, NS_IEVENTQUEUESERVICE_IID);
|
||||
static NS_DEFINE_IID(kIAppShellIID, NS_IAPPSHELL_IID);
|
||||
static NS_DEFINE_CID(kCWindowCID, NS_WINDOW_CID);
|
||||
static NS_DEFINE_CID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID);
|
||||
static NS_DEFINE_CID(kCAppShellCID, NS_APPSHELL_CID);
|
||||
|
||||
// Scroll offsets
|
||||
nscoord gOffsetX = 0;
|
||||
@ -333,7 +308,7 @@ nsEventStatus PR_CALLBACK HandleEvent(nsGUIEvent *aEvent)
|
||||
break;
|
||||
|
||||
case NS_DESTROY:
|
||||
exit(0); // for now
|
||||
exit(0); // for now
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -350,60 +325,28 @@ nsEventStatus PR_CALLBACK HandleEvent(nsGUIEvent *aEvent)
|
||||
*/
|
||||
nsresult CoverageTest(int *argc, char **argv)
|
||||
{
|
||||
// register xpcom classes
|
||||
nsComponentManager::RegisterComponentLib(kEventQueueServiceCID, NULL, NULL, XPCOM_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kEventQueueCID, NULL, NULL, XPCOM_DLL, PR_FALSE, PR_FALSE);
|
||||
|
||||
// register widget classes
|
||||
nsComponentManager::RegisterComponentLib(kLookAndFeelCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCWindowCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
|
||||
nsComponentManager::RegisterComponentLib(kCAppShellCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCToolkitCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
static NS_DEFINE_IID(kCRenderingContextIID, NS_RENDERING_CONTEXT_CID);
|
||||
static NS_DEFINE_IID(kCDeviceContextIID, NS_DEVICE_CONTEXT_CID);
|
||||
static NS_DEFINE_IID(kCFontMetricsIID, NS_FONT_METRICS_CID);
|
||||
static NS_DEFINE_IID(kCImageIID, NS_IMAGE_CID);
|
||||
|
||||
|
||||
static NS_DEFINE_CID(kScreenManagerCID, NS_SCREENMANAGER_CID);
|
||||
static NS_DEFINE_IID(kCRenderingContextCID, NS_RENDERING_CONTEXT_CID);
|
||||
static NS_DEFINE_IID(kCDeviceContextCID, NS_DEVICE_CONTEXT_CID);
|
||||
static NS_DEFINE_IID(kCFontMetricsCID, NS_FONT_METRICS_CID);
|
||||
static NS_DEFINE_IID(kCImageCID, NS_IMAGE_CID);
|
||||
static NS_DEFINE_IID(kCTimerCID, NS_TIMER_CID);
|
||||
static NS_DEFINE_IID(kCTimerManagerCID, NS_TIMERMANAGER_CID);
|
||||
nsComponentManager::RegisterComponentLib(kScreenManagerCID, "Screen Manager", "@mozilla.org/gfx/screenmanager;1", GFXWIN_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCRenderingContextCID, "Rendering Context", "@mozilla.org/gfx/renderingcontext;1", GFXWIN_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCDeviceContextCID, "Device Context", "@mozilla.org/gfx/devicecontext;1", GFXWIN_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCFontMetricsCID, "Font Metrics", "@mozilla.org/gfx/fontmetrics;1", GFXWIN_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCImageCID, "Image", "@mozilla.org/gfx/image;1", GFXWIN_DLL, PR_FALSE, PR_FALSE);
|
||||
#ifdef XP_PC
|
||||
nsComponentManager::RegisterComponentLib(kCTimerCID, "Timer", "@mozilla.org/timer;1", WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCTimerManagerCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
#endif
|
||||
|
||||
nsresult res;
|
||||
nsresult res = NS_InitXPCOM2(nsnull, nsnull, nsnull);
|
||||
if (NS_FAILED(res))
|
||||
return res;
|
||||
|
||||
// Create the Event Queue for the UI thread...
|
||||
res = nsServiceManager::GetService(kEventQueueServiceCID,
|
||||
kIEventQueueServiceIID,
|
||||
(nsISupports **)&gEventQService);
|
||||
nsCOMPtr<nsIEventQueueService> eventQService =
|
||||
do_GetService(kEventQueueServiceCID, &res);
|
||||
|
||||
if (NS_OK != res) {
|
||||
NS_ASSERTION(PR_FALSE, "Could not obtain the event queue service");
|
||||
return res;
|
||||
}
|
||||
|
||||
res = gEventQService->CreateThreadEventQueue();
|
||||
res = eventQService->CreateThreadEventQueue();
|
||||
if (NS_OK != res) {
|
||||
NS_ASSERTION(PR_FALSE, "Could not create the event queue for the thread");
|
||||
return res;
|
||||
return res;
|
||||
}
|
||||
|
||||
// Create a application shell
|
||||
nsIAppShell *appShell;
|
||||
nsComponentManager::CreateInstance(kCAppShellCID, nsnull, kIAppShellIID, (void**)&appShell);
|
||||
CallCreateInstance(kCAppShellCID, &appShell);
|
||||
if (appShell != nsnull) {
|
||||
fputs("Created AppShell\n", stderr);
|
||||
appShell->Create(argc, argv);
|
||||
@ -421,7 +364,7 @@ nsresult CoverageTest(int *argc, char **argv)
|
||||
//
|
||||
// create the main window
|
||||
//
|
||||
nsComponentManager::CreateInstance(kCWindowCID, nsnull, kIWidgetIID, (void**)&gWindow);
|
||||
CallCreateInstance(kCWindowCID, &gWindow);
|
||||
nsRect rect(100, 100, 600, 700);
|
||||
gWindow->Create((nsIWidget*) nsnull, rect, HandleEvent,
|
||||
(nsIDeviceContext *) nsnull,
|
||||
|
@ -1,22 +1,18 @@
|
||||
#include <stdio.h>
|
||||
#include "nsXPCOM.h"
|
||||
#include "nsVoidArray.h"
|
||||
#include "nsIWebShell.h"
|
||||
#include "nsString.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsParserCIID.h"
|
||||
|
||||
#ifdef XP_PC
|
||||
#define PARSER_DLL "gkparser.dll"
|
||||
#elif defined(XP_UNIX) || defined(XP_BEOS)
|
||||
#define PARSER_DLL "libhtmlpars"MOZ_DLL_SUFFIX
|
||||
#else
|
||||
#define PARSER_DLL "libraptorhtmlpars"MOZ_DLL_SUFFIX
|
||||
#endif
|
||||
class nsIWebShell;
|
||||
|
||||
extern "C" NS_EXPORT int DebugRobot(nsVoidArray * workList, nsIWebShell * ww);
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
nsresult rv = NS_InitXPCOM2(nsnull, nsnull, nsnull);
|
||||
if (NS_FAILED(rv)) {
|
||||
printf("NS_InitXPCOM2 failed\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
nsVoidArray * gWorkList = new nsVoidArray();
|
||||
if(gWorkList) {
|
||||
int i;
|
||||
@ -27,9 +23,6 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
static NS_DEFINE_CID(kCParserCID, NS_PARSER_CID);
|
||||
nsComponentManager::RegisterComponent(kCParserCID, NULL, NULL, PARSER_DLL, PR_FALSE, PR_FALSE);
|
||||
|
||||
return DebugRobot(gWorkList, nsnull);
|
||||
}
|
||||
|
||||
|
@ -42,6 +42,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <io.h>
|
||||
|
||||
#include "nsXPCOM.h"
|
||||
#include "nsISupports.h"
|
||||
#include "nsTokenizer.h"
|
||||
#include "nsHTMLDelegate.h"
|
||||
@ -50,12 +51,6 @@
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsParserCIID.h"
|
||||
|
||||
#ifdef XP_PC
|
||||
#define PARSER_DLL "gkparser.dll"
|
||||
#else
|
||||
#define PARSER_DLL "libraptorhtmlpars"MOZ_DLL_SUFFIX
|
||||
#endif
|
||||
|
||||
|
||||
PRBool compareFiles(const char* file1,const char* file2,int& failpos) {
|
||||
PRBool result=PR_TRUE;
|
||||
@ -221,8 +216,11 @@ int main(int argc, char* argv [])
|
||||
strcpy(buffer,argv[1]);
|
||||
else _getcwd(buffer,_MAX_PATH);
|
||||
|
||||
static NS_DEFINE_CID(kCParserCID, NS_PARSER_CID);
|
||||
nsComponentManager::RegisterComponent(kCParserCID, NULL, NULL, PARSER_DLL, PR_FALSE, PR_FALSE);
|
||||
nsresult rv = NS_InitXPCOM2(nsnull, nsnull, nsnull);
|
||||
if (NS_FAILED(rv)) {
|
||||
printf("NS_InitXPCOM2 failed\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
walkDirectoryTree(buffer);
|
||||
return 0;
|
||||
|
@ -38,7 +38,6 @@
|
||||
|
||||
//#define __INCREMENTAL 1
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
#include "nsScanner.h"
|
||||
#include "nsDebug.h"
|
||||
#include "nsIServiceManager.h"
|
||||
|
@ -35,6 +35,8 @@
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsXPCOM.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsParserCIID.h"
|
||||
#include "nsIParser.h"
|
||||
@ -44,15 +46,6 @@
|
||||
#include <fstream.h>
|
||||
|
||||
|
||||
#ifdef XP_PC
|
||||
#define PARSER_DLL "gkparser.dll"
|
||||
#endif
|
||||
#ifdef XP_MAC
|
||||
#endif
|
||||
#if defined(XP_UNIX) || defined(XP_BEOS)
|
||||
#define PARSER_DLL "libhtmlpars"MOZ_DLL_SUFFIX
|
||||
#endif
|
||||
|
||||
// Class IID's
|
||||
static NS_DEFINE_CID(kParserCID, NS_PARSER_CID);
|
||||
static NS_DEFINE_IID(kLoggingSinkCID, NS_LOGGING_SINK_CID);
|
||||
@ -65,14 +58,6 @@ static NS_DEFINE_CID(kNavDTDCID, NS_CNAVDTD_CID);
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
static void SetupRegistry()
|
||||
{
|
||||
nsComponentManager::RegisterComponentLib(kParserCID, NULL, NULL, PARSER_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kLoggingSinkCID, NULL, NULL, PARSER_DLL,PR_FALSE,PR_FALSE);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
nsresult ParseData(char* anInputStream,char* anOutputStream) {
|
||||
nsresult result=NS_OK;
|
||||
|
||||
@ -154,11 +139,13 @@ int main(int argc, char** argv)
|
||||
return -1;
|
||||
}
|
||||
|
||||
int result=0;
|
||||
|
||||
//SetupRegistry();
|
||||
nsresult rv = NS_InitXPCOM2(nsnull, nsnull, nsnull);
|
||||
if (NS_FAILED(rv)) {
|
||||
printf("NS_InitXPCOM2 failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
ParseData(argv[1],argv[2]);
|
||||
|
||||
return result;
|
||||
return 0;
|
||||
}
|
||||
|
@ -35,6 +35,8 @@
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsXPCOM.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsParserCIID.h"
|
||||
#include "nsIParser.h"
|
||||
@ -42,15 +44,6 @@
|
||||
#include "CNavDTD.h"
|
||||
#include <fstream.h>
|
||||
|
||||
#ifdef XP_PC
|
||||
#define PARSER_DLL "gkparser.dll"
|
||||
#endif
|
||||
#ifdef XP_MAC
|
||||
#endif
|
||||
#if defined(XP_UNIX) || defined(XP_BEOS)
|
||||
#define PARSER_DLL "libhtmlpars"MOZ_DLL_SUFFIX
|
||||
#endif
|
||||
|
||||
// Class IID's
|
||||
static NS_DEFINE_CID(kParserCID, NS_PARSER_CID);
|
||||
static NS_DEFINE_IID(kLoggingSinkCID, NS_LOGGING_SINK_IID);
|
||||
@ -61,14 +54,6 @@ static NS_DEFINE_IID(kILoggingSinkIID, NS_ILOGGING_SINK_IID);
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
static void SetupRegistry()
|
||||
{
|
||||
nsComponentManager::RegisterComponent(kParserCID, NULL, NULL, PARSER_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponent(kLoggingSinkCID, NULL, NULL, PARSER_DLL,PR_FALSE,PR_FALSE);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
static const char* kWorkingDir = "s:/mozilla/htmlparser/tests/logparse";
|
||||
|
||||
nsresult GenerateBaselineFile(const char* aSourceFilename,const char* aBaselineFilename) {
|
||||
@ -206,7 +191,11 @@ int main(int argc, char** argv)
|
||||
|
||||
int result=0;
|
||||
|
||||
SetupRegistry();
|
||||
nsresult rv = NS_InitXPCOM2(nsnull, nsnull, nsnull);
|
||||
if (NS_FAILED(rv)) {
|
||||
printf("NS_InitXPCOM2 failed\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if(0==strcmp("-c",argv[1])) {
|
||||
|
||||
|
@ -37,9 +37,7 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
#include "nsICharsetAlias.h"
|
||||
#undef NS_IMPL_IDS
|
||||
|
||||
#include "pratom.h"
|
||||
#include "nsClassicCharDetDll.h"
|
||||
|
@ -36,9 +36,7 @@
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
#define NS_IMPL_IDS
|
||||
#include "nsICharsetAlias.h"
|
||||
#undef NS_IMPL_IDS
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIModule.h"
|
||||
|
||||
|
@ -37,9 +37,7 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
#include "nsICharsetAlias.h"
|
||||
#undef NS_IMPL_IDS
|
||||
|
||||
#include "pratom.h"
|
||||
#include "nsNativeCharDetDll.h"
|
||||
|
@ -36,9 +36,7 @@
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
#define NS_IMPL_IDS
|
||||
#include "nsICharsetConverterManager.h"
|
||||
#undef NS_IMPL_IDS
|
||||
#include <iostream.h>
|
||||
#include "nsISupports.h"
|
||||
#include "nsIComponentManager.h"
|
||||
|
@ -37,9 +37,7 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
#include "nsIPlatformCharset.h"
|
||||
#undef NS_IMPL_IDS
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsCollation.h"
|
||||
|
@ -37,8 +37,6 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
|
||||
#include "prmem.h"
|
||||
#include "nsIMemory.h"
|
||||
#include "nsIServiceManager.h"
|
||||
|
@ -36,7 +36,6 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
#include "nsID.h"
|
||||
#include "nsFileSpec.h"
|
||||
#include "nsString.h"
|
||||
|
@ -36,8 +36,6 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsIPersistentProperties2.h"
|
||||
@ -45,12 +43,12 @@
|
||||
#include "nsIEventQueueService.h"
|
||||
#include <iostream.h>
|
||||
|
||||
#include "nsIIOService.h"
|
||||
#include "nsIURL.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIComponentRegistrar.h"
|
||||
#include "nsNetCID.h"
|
||||
|
||||
#include "nsXPCOM.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIComponentManager.h"
|
||||
//
|
||||
@ -58,30 +56,8 @@
|
||||
|
||||
#define TEST_URL "resource:/res/strres.properties"
|
||||
|
||||
#ifdef XP_PC
|
||||
#define NETLIB_DLL "netlib.dll"
|
||||
#define RAPTORBASE_DLL "raptorbase.dll"
|
||||
#define XPCOM_DLL "xpcom32.dll"
|
||||
#else /* else XP_PC */
|
||||
#ifdef XP_MAC
|
||||
#define NETLIB_DLL "NETLIB_DLL"
|
||||
#define RAPTORBASE_DLL "base.shlb"
|
||||
#define XPCOM_DLL "XPCOM_DLL"
|
||||
#else /* else XP_MAC */
|
||||
#define NETLIB_DLL "libnecko"MOZ_DLL_SUFFIX
|
||||
#define RAPTORBASE_DLL "libgklayout"MOZ_DLL_SUFFIX
|
||||
#define XPCOM_DLL "libxpcom"MOZ_DLL_SUFFIX
|
||||
#endif /* XP_MAC */
|
||||
#endif /* XP_PC */
|
||||
|
||||
static NS_DEFINE_IID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID);
|
||||
static NS_DEFINE_IID(kIEventQueueServiceIID, NS_IEVENTQUEUESERVICE_IID);
|
||||
|
||||
static NS_DEFINE_IID(kIIOServiceIID, NS_IIOSERVICE_IID);
|
||||
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
|
||||
|
||||
static NS_DEFINE_IID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
static NS_DEFINE_IID(kIStringBundleServiceIID, NS_ISTRINGBUNDLESERVICE_IID);
|
||||
static NS_DEFINE_CID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID);
|
||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@ -148,10 +124,9 @@ main(int argc, char *argv[])
|
||||
NS_ASSERTION(registrar, "Null nsIComponentRegistrar");
|
||||
registrar->AutoRegister(nsnull);
|
||||
|
||||
nsIStringBundleService* service = nsnull;
|
||||
ret = nsServiceManager::GetService(kStringBundleServiceCID,
|
||||
kIStringBundleServiceIID, (nsISupports**) &service);
|
||||
if (NS_FAILED(ret)) {
|
||||
nsCOMPtr<nsIStringBundleService> service =
|
||||
do_GetService(kStringBundleServiceCID);
|
||||
if (!service) {
|
||||
printf("cannot create service\n");
|
||||
return 1;
|
||||
}
|
||||
|
@ -37,9 +37,6 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
|
||||
|
||||
#include "nsICharsetAlias.h"
|
||||
#include "pratom.h"
|
||||
|
||||
|
@ -37,8 +37,6 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsString.h"
|
||||
#include "nsReadableUtils.h"
|
||||
|
@ -47,9 +47,7 @@
|
||||
#include "nsIScriptableUConv.h"
|
||||
#include "nsScriptableUConv.h"
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
#include "nsIPlatformCharset.h"
|
||||
#undef NS_IMPL_IDS
|
||||
|
||||
static NS_DEFINE_CID(kIScriptableUnicodeConverterCID, NS_ISCRIPTABLEUNICODECONVERTER_CID);
|
||||
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
|
||||
|
@ -37,10 +37,9 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "nsXPCOM.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsISupports.h"
|
||||
@ -98,27 +97,6 @@ PRUnichar cLatin1_d0[] = {
|
||||
PRInt32 bLatin1_s0 = ARRAY_SIZE(bLatin1_d0)-1;
|
||||
PRInt32 cLatin1_s0 = ARRAY_SIZE(cLatin1_d0);
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Registry setup function(s)
|
||||
|
||||
nsresult setupRegistry()
|
||||
{
|
||||
/**
|
||||
* Ok, here's where we used to register the components needed to run the
|
||||
* tests. This is not necessary anymore, as the auto-registration stuff
|
||||
* is in place now. But, as we don't trigger the autoregistration in
|
||||
* this test program, you make sure you first run an autoreg app (like
|
||||
* viewer). Included is an example of the old code, in case we'll need it.
|
||||
*
|
||||
* nsresult res = nsComponentManager::RegisterComponent(
|
||||
* kCharsetConverterManagerCID, NULL, NULL, UCONV_DLL, PR_FALSE, PR_FALSE);
|
||||
* if (NS_FAILED(res) && (NS_ERROR_FACTORY_EXISTS != res)) return res;
|
||||
*/
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Converter Manager test code
|
||||
|
||||
@ -1153,8 +1131,6 @@ nsresult testAll()
|
||||
|
||||
nsresult testFromArgs(int argc, char **argv)
|
||||
{
|
||||
nsresult res = nsServiceManager::GetService(kCharsetConverterManagerCID,
|
||||
kICharsetConverterManagerIID, (nsISupports **)&ccMan);
|
||||
if (NS_FAILED(res)) {
|
||||
printf("ERROR at GetService() code=0x%x.\n",res);
|
||||
return res;
|
||||
@ -1179,22 +1155,15 @@ nsresult testFromArgs(int argc, char **argv)
|
||||
|
||||
nsresult init()
|
||||
{
|
||||
nsresult res;
|
||||
|
||||
res = setupRegistry();
|
||||
if (NS_FAILED(res)) {
|
||||
printf("ERROR at setupRegistry() code=0x%x.\n", res);
|
||||
return res;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
nsresult rv = NS_InitXPCOM2(nsnull, nsnull, nsnull);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
return CallGetService(kCharsetConverterManagerCID, &ccMan);
|
||||
}
|
||||
|
||||
nsresult done()
|
||||
{
|
||||
if (ccMan != NULL) nsServiceManager::
|
||||
ReleaseService(kCharsetConverterManagerCID, ccMan);
|
||||
|
||||
NS_RELEASE(ccMan);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -37,8 +37,6 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
|
||||
#include "nspr.h"
|
||||
#include "nsString.h"
|
||||
#include "pratom.h"
|
||||
|
@ -34,8 +34,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
|
||||
#include "pratom.h"
|
||||
#include "nspr.h"
|
||||
#include "nsString.h"
|
||||
|
@ -35,7 +35,6 @@
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
#define NS_IMPL_IDS
|
||||
|
||||
#include "nspr.h"
|
||||
#include "nsString.h"
|
||||
|
@ -38,8 +38,6 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
|
||||
#include "nspr.h"
|
||||
#include "nsString.h"
|
||||
#include "pratom.h"
|
||||
|
@ -37,8 +37,6 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
|
||||
#include "pratom.h"
|
||||
#include "nspr.h"
|
||||
#include "nsString.h"
|
||||
|
@ -37,8 +37,6 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
|
||||
#include "pratom.h"
|
||||
#include "nspr.h"
|
||||
#include "nsString.h"
|
||||
|
@ -35,7 +35,6 @@
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
#define NS_IMPL_IDS
|
||||
|
||||
#include "nspr.h"
|
||||
#include "nsString.h"
|
||||
|
@ -38,8 +38,6 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
|
||||
#include "nspr.h"
|
||||
#include "nsString.h"
|
||||
#include "pratom.h"
|
||||
|
@ -37,10 +37,8 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
#include "nsICharsetConverterManager.h"
|
||||
#include "nsICharsetAlias.h"
|
||||
#undef NS_IMPL_IDS
|
||||
|
||||
#include "prmem.h"
|
||||
#include "prprf.h"
|
||||
|
@ -38,6 +38,7 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
#include <iostream.h>
|
||||
#include "nsISupports.h"
|
||||
#include "nsXPCOM.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsICaseConversion.h"
|
||||
@ -57,12 +58,6 @@ NS_DEFINE_CID(kEntityConverterCID, NS_ENTITYCONVERTER_CID);
|
||||
NS_DEFINE_CID(kSaveAsCharsetCID, NS_SAVEASCHARSET_CID);
|
||||
NS_DEFINE_IID(kIPersistentPropertiesIID,NS_IPERSISTENTPROPERTIES_IID);
|
||||
|
||||
#if defined(XP_UNIX) || defined(XP_BEOS)
|
||||
#define UNICHARUTIL_DLL_NAME "libunicharutil"MOZ_DLL_SUFFIX
|
||||
#else
|
||||
#define UNICHARUTIL_DLL_NAME "UNICHARUTIL_DLL"
|
||||
#endif
|
||||
|
||||
#define TESTLEN 29
|
||||
#define T2LEN TESTLEN
|
||||
#define T3LEN TESTLEN
|
||||
@ -520,24 +515,13 @@ static void TestSaveAsCharset()
|
||||
cout << "==============================\n\n";
|
||||
}
|
||||
|
||||
void RegisterFactories()
|
||||
{
|
||||
nsresult res;
|
||||
res = nsComponentManager::RegisterComponent(kUnicharUtilCID,
|
||||
NULL,
|
||||
NULL,
|
||||
UNICHARUTIL_DLL_NAME,
|
||||
PR_FALSE,
|
||||
PR_TRUE);
|
||||
if(NS_FAILED(res))
|
||||
cout << "RegisterComponent failed\n";
|
||||
}
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
|
||||
#ifndef USE_NSREG
|
||||
RegisterFactories();
|
||||
#endif
|
||||
nsresult rv = NS_InitXPCOM2(nsnull, nsnull, nsnull);
|
||||
if (NS_FAILED(rv)) {
|
||||
printf("NS_InitXPCOM2 failed\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
// --------------------------------------------
|
||||
|
||||
|
@ -39,11 +39,9 @@
|
||||
|
||||
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
#include "nsICharsetConverterManager.h"
|
||||
#include "nsICharsetAlias.h"
|
||||
#include "nsIPlatformCharset.h"
|
||||
#undef NS_IMPL_IDS
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsXPIDLString.h"
|
||||
|
@ -37,11 +37,9 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
// as does this
|
||||
#define NS_IMPL_IDS
|
||||
#include "nsICharsetConverterManager.h"
|
||||
#include "nsICharsetAlias.h"
|
||||
#include "nsIPlatformCharset.h"
|
||||
#undef NS_IMPL_IDS
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsICharsetConverterManager2.h"
|
||||
|
||||
|
@ -43,7 +43,6 @@
|
||||
#endif
|
||||
|
||||
// as does this
|
||||
#define NS_IMPL_IDS
|
||||
#include "msgCore.h" // for pre-compiled headers
|
||||
|
||||
#include "nsIServiceManager.h"
|
||||
|
@ -37,11 +37,9 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
#include "nsICharsetConverterManager.h"
|
||||
#include "nsICharsetAlias.h"
|
||||
#include "nsIPlatformCharset.h"
|
||||
#undef NS_IMPL_IDS
|
||||
#include "nsICharsetConverterManager2.h"
|
||||
|
||||
#include "nsCRT.h"
|
||||
|
@ -42,7 +42,6 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
#include "nsIPref.h"
|
||||
#include "prlog.h"
|
||||
|
||||
|
@ -34,7 +34,6 @@
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
#define NS_IMPL_IDS
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIIOService.h"
|
||||
#include "nsNetCID.h"
|
||||
|
@ -35,10 +35,9 @@
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
#define NS_IMPL_IDS
|
||||
|
||||
#include "nsICharsetConverterManager.h"
|
||||
#include "nsICharsetAlias.h"
|
||||
#undef NS_IMPL_IDS
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -38,7 +38,6 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
#include "nsIPref.h"
|
||||
#include "prlog.h"
|
||||
|
||||
|
@ -1,22 +1,18 @@
|
||||
#include <stdio.h>
|
||||
#include "nsXPCOM.h"
|
||||
#include "nsVoidArray.h"
|
||||
#include "nsIWebShell.h"
|
||||
#include "nsString.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsParserCIID.h"
|
||||
|
||||
#ifdef XP_PC
|
||||
#define PARSER_DLL "gkparser.dll"
|
||||
#elif defined(XP_UNIX) || defined(XP_BEOS)
|
||||
#define PARSER_DLL "libhtmlpars"MOZ_DLL_SUFFIX
|
||||
#else
|
||||
#define PARSER_DLL "libraptorhtmlpars"MOZ_DLL_SUFFIX
|
||||
#endif
|
||||
class nsIWebShell;
|
||||
|
||||
extern "C" NS_EXPORT int DebugRobot(nsVoidArray * workList, nsIWebShell * ww);
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
nsresult rv = NS_InitXPCOM2(nsnull, nsnull, nsnull);
|
||||
if (NS_FAILED(rv)) {
|
||||
printf("NS_InitXPCOM2 failed\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
nsVoidArray * gWorkList = new nsVoidArray();
|
||||
if(gWorkList) {
|
||||
int i;
|
||||
@ -27,9 +23,6 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
static NS_DEFINE_CID(kCParserCID, NS_PARSER_CID);
|
||||
nsComponentManager::RegisterComponent(kCParserCID, NULL, NULL, PARSER_DLL, PR_FALSE, PR_FALSE);
|
||||
|
||||
return DebugRobot(gWorkList, nsnull);
|
||||
}
|
||||
|
||||
|
@ -42,6 +42,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <io.h>
|
||||
|
||||
#include "nsXPCOM.h"
|
||||
#include "nsISupports.h"
|
||||
#include "nsTokenizer.h"
|
||||
#include "nsHTMLDelegate.h"
|
||||
@ -50,12 +51,6 @@
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsParserCIID.h"
|
||||
|
||||
#ifdef XP_PC
|
||||
#define PARSER_DLL "gkparser.dll"
|
||||
#else
|
||||
#define PARSER_DLL "libraptorhtmlpars"MOZ_DLL_SUFFIX
|
||||
#endif
|
||||
|
||||
|
||||
PRBool compareFiles(const char* file1,const char* file2,int& failpos) {
|
||||
PRBool result=PR_TRUE;
|
||||
@ -221,8 +216,11 @@ int main(int argc, char* argv [])
|
||||
strcpy(buffer,argv[1]);
|
||||
else _getcwd(buffer,_MAX_PATH);
|
||||
|
||||
static NS_DEFINE_CID(kCParserCID, NS_PARSER_CID);
|
||||
nsComponentManager::RegisterComponent(kCParserCID, NULL, NULL, PARSER_DLL, PR_FALSE, PR_FALSE);
|
||||
nsresult rv = NS_InitXPCOM2(nsnull, nsnull, nsnull);
|
||||
if (NS_FAILED(rv)) {
|
||||
printf("NS_InitXPCOM2 failed\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
walkDirectoryTree(buffer);
|
||||
return 0;
|
||||
|
@ -38,7 +38,6 @@
|
||||
|
||||
//#define __INCREMENTAL 1
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
#include "nsScanner.h"
|
||||
#include "nsDebug.h"
|
||||
#include "nsIServiceManager.h"
|
||||
|
@ -35,6 +35,8 @@
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsXPCOM.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsParserCIID.h"
|
||||
#include "nsIParser.h"
|
||||
@ -44,15 +46,6 @@
|
||||
#include <fstream.h>
|
||||
|
||||
|
||||
#ifdef XP_PC
|
||||
#define PARSER_DLL "gkparser.dll"
|
||||
#endif
|
||||
#ifdef XP_MAC
|
||||
#endif
|
||||
#if defined(XP_UNIX) || defined(XP_BEOS)
|
||||
#define PARSER_DLL "libhtmlpars"MOZ_DLL_SUFFIX
|
||||
#endif
|
||||
|
||||
// Class IID's
|
||||
static NS_DEFINE_CID(kParserCID, NS_PARSER_CID);
|
||||
static NS_DEFINE_IID(kLoggingSinkCID, NS_LOGGING_SINK_CID);
|
||||
@ -65,14 +58,6 @@ static NS_DEFINE_CID(kNavDTDCID, NS_CNAVDTD_CID);
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
static void SetupRegistry()
|
||||
{
|
||||
nsComponentManager::RegisterComponentLib(kParserCID, NULL, NULL, PARSER_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kLoggingSinkCID, NULL, NULL, PARSER_DLL,PR_FALSE,PR_FALSE);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
nsresult ParseData(char* anInputStream,char* anOutputStream) {
|
||||
nsresult result=NS_OK;
|
||||
|
||||
@ -154,11 +139,13 @@ int main(int argc, char** argv)
|
||||
return -1;
|
||||
}
|
||||
|
||||
int result=0;
|
||||
|
||||
//SetupRegistry();
|
||||
nsresult rv = NS_InitXPCOM2(nsnull, nsnull, nsnull);
|
||||
if (NS_FAILED(rv)) {
|
||||
printf("NS_InitXPCOM2 failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
ParseData(argv[1],argv[2]);
|
||||
|
||||
return result;
|
||||
return 0;
|
||||
}
|
||||
|
@ -35,6 +35,8 @@
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsXPCOM.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsParserCIID.h"
|
||||
#include "nsIParser.h"
|
||||
@ -42,15 +44,6 @@
|
||||
#include "CNavDTD.h"
|
||||
#include <fstream.h>
|
||||
|
||||
#ifdef XP_PC
|
||||
#define PARSER_DLL "gkparser.dll"
|
||||
#endif
|
||||
#ifdef XP_MAC
|
||||
#endif
|
||||
#if defined(XP_UNIX) || defined(XP_BEOS)
|
||||
#define PARSER_DLL "libhtmlpars"MOZ_DLL_SUFFIX
|
||||
#endif
|
||||
|
||||
// Class IID's
|
||||
static NS_DEFINE_CID(kParserCID, NS_PARSER_CID);
|
||||
static NS_DEFINE_IID(kLoggingSinkCID, NS_LOGGING_SINK_IID);
|
||||
@ -61,14 +54,6 @@ static NS_DEFINE_IID(kILoggingSinkIID, NS_ILOGGING_SINK_IID);
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
static void SetupRegistry()
|
||||
{
|
||||
nsComponentManager::RegisterComponent(kParserCID, NULL, NULL, PARSER_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponent(kLoggingSinkCID, NULL, NULL, PARSER_DLL,PR_FALSE,PR_FALSE);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
static const char* kWorkingDir = "s:/mozilla/htmlparser/tests/logparse";
|
||||
|
||||
nsresult GenerateBaselineFile(const char* aSourceFilename,const char* aBaselineFilename) {
|
||||
@ -206,7 +191,11 @@ int main(int argc, char** argv)
|
||||
|
||||
int result=0;
|
||||
|
||||
SetupRegistry();
|
||||
nsresult rv = NS_InitXPCOM2(nsnull, nsnull, nsnull);
|
||||
if (NS_FAILED(rv)) {
|
||||
printf("NS_InitXPCOM2 failed\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if(0==strcmp("-c",argv[1])) {
|
||||
|
||||
|
@ -85,10 +85,8 @@
|
||||
#define DEBUG_UTF8_CONVERSION 1
|
||||
#endif
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
#include "nsICharsetConverterManager.h"
|
||||
#include "nsIPlatformCharset.h"
|
||||
#undef NS_IMPL_IDS
|
||||
|
||||
#define CHROME_STYLE nsIWebBrowserChrome::CHROME_ALL | nsIWebBrowserChrome::CHROME_CENTER_SCREEN
|
||||
#define MIGRATION_PROPERTIES_URL "chrome://communicator/locale/profile/migration.properties"
|
||||
|
@ -39,10 +39,8 @@
|
||||
#include "nsILocalFile.h"
|
||||
#include "nsReadableUtils.h"
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
#include "nsICharsetConverterManager.h"
|
||||
#include "nsIPlatformCharset.h"
|
||||
#undef NS_IMPL_IDS
|
||||
|
||||
#define MAX_PERSISTENT_DATA_SIZE 1000
|
||||
#define NUM_HEX_BYTES 8
|
||||
|
@ -55,6 +55,7 @@
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
#include "nsXPCOM.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIEventQueueService.h"
|
||||
#include "nsIInputStream.h"
|
||||
@ -78,29 +79,6 @@
|
||||
#include "plstr.h"
|
||||
#include "rdf.h"
|
||||
|
||||
#if defined(XP_PC)
|
||||
#define DOM_DLL "jsdom.dll"
|
||||
#define LAYOUT_DLL "gkhtml.dll"
|
||||
#define NETLIB_DLL "netlib.dll"
|
||||
#define PARSER_DLL "gkparser.dll"
|
||||
#define RDF_DLL "rdf.dll"
|
||||
#define XPCOM_DLL "xpcom32.dll"
|
||||
#elif defined(XP_UNIX) || defined(XP_BEOS)
|
||||
#define DOM_DLL "libjsdom"MOZ_DLL_SUFFIX
|
||||
#define LAYOUT_DLL "libgklayout"MOZ_DLL_SUFFIX
|
||||
#define NETLIB_DLL "libnecko"MOZ_DLL_SUFFIX
|
||||
#define PARSER_DLL "libtmlpars"MOZ_DLL_SUFFIX
|
||||
#define RDF_DLL "librdf"MOZ_DLL_SUFFIX
|
||||
#define XPCOM_DLL "libxpcom"MOZ_DLL_SUFFIX
|
||||
#elif defined(XP_MAC)
|
||||
#define DOM_DLL "DOM_DLL"
|
||||
#define LAYOUT_DLL "LAYOUT_DLL"
|
||||
#define NETLIB_DLL "NETLIB_DLL"
|
||||
#define PARSER_DLL "PARSER_DLL"
|
||||
#define RDF_DLL "RDF_DLL"
|
||||
#define XPCOM_DLL "XPCOM_DLL"
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// CIDs
|
||||
|
||||
@ -115,16 +93,6 @@ static NS_DEFINE_CID(kRDFCompositeDataSourceCID, NS_RDFCOMPOSITEDATASOURCE_CID);
|
||||
static NS_DEFINE_CID(kRDFContentSinkCID, NS_RDFCONTENTSINK_CID);
|
||||
static NS_DEFINE_CID(kRDFXMLDataSourceCID, NS_RDFXMLDATASOURCE_CID);
|
||||
|
||||
// parser
|
||||
static NS_DEFINE_CID(kParserCID, NS_PARSER_CID);
|
||||
static NS_DEFINE_CID(kWellFormedDTDCID, NS_WELLFORMEDDTD_CID);
|
||||
|
||||
// layout
|
||||
static NS_DEFINE_CID(kNameSpaceManagerCID, NS_NAMESPACEMANAGER_CID);
|
||||
|
||||
// dom
|
||||
static NS_DEFINE_IID(kScriptNameSetRegistryCID, NS_SCRIPT_NAMESET_REGISTRY_CID);
|
||||
|
||||
// xpcom
|
||||
static NS_DEFINE_CID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID);
|
||||
|
||||
@ -138,29 +106,6 @@ NS_DEFINE_IID(kIRDFDataSourceIID, NS_IRDFDATASOURCE_IID);
|
||||
NS_DEFINE_IID(kIRDFServiceIID, NS_IRDFSERVICE_IID);
|
||||
NS_DEFINE_IID(kIRDFXMLDataSourceIID, NS_IRDFXMLDATASOURCE_IID);
|
||||
|
||||
static nsresult
|
||||
SetupRegistry(void)
|
||||
{
|
||||
// netlib
|
||||
nsComponentManager::RegisterComponent(kIOServiceCID, NULL, NULL, NETLIB_DLL, PR_FALSE, PR_FALSE);
|
||||
|
||||
// parser
|
||||
nsComponentManager::RegisterComponent(kParserCID, NULL, NULL, PARSER_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponent(kWellFormedDTDCID, NULL, NULL, PARSER_DLL, PR_FALSE, PR_FALSE);
|
||||
|
||||
// layout
|
||||
nsComponentManager::RegisterComponent(kNameSpaceManagerCID, NULL, NULL, LAYOUT_DLL, PR_FALSE, PR_FALSE);
|
||||
|
||||
// dom
|
||||
nsComponentManager::RegisterComponent(kScriptNameSetRegistryCID, NULL, NULL, DOM_DLL, PR_FALSE, PR_FALSE);
|
||||
|
||||
// xpcom
|
||||
nsComponentManager::RegisterComponent(kEventQueueServiceCID, NULL, NULL, XPCOM_DLL, PR_FALSE, PR_FALSE);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
int
|
||||
@ -173,7 +118,11 @@ main(int argc, char** argv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
SetupRegistry();
|
||||
rv = NS_InitXPCOM2(nsnull, nsnull, nsnull);
|
||||
if (NS_FAILED(rv)) {
|
||||
fprintf(stderr, "NS_InitXPCOM2 failed\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
nsIEventQueueService* theEventQueueService = nsnull;
|
||||
nsIEventQueue* mainQueue = nsnull;
|
||||
|
@ -48,6 +48,7 @@
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "nsXPCOM.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIEventQueueService.h"
|
||||
#include "nsIInputStream.h"
|
||||
@ -61,44 +62,16 @@
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIStreamListener.h"
|
||||
#include "nsIURL.h"
|
||||
#include "nsDOMCID.h" // for NS_SCRIPT_NAMESET_REGISTRY_CID
|
||||
#include "nsLayoutCID.h" // for NS_NAMESPACEMANAGER_CID
|
||||
#include "nsRDFCID.h"
|
||||
#include "nsRDFCID.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsXPIDLString.h"
|
||||
#include "prthread.h"
|
||||
#include "plevent.h"
|
||||
#include "plstr.h"
|
||||
#include "nsParserCIID.h"
|
||||
#include "nsString.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsNetCID.h"
|
||||
|
||||
#if defined(XP_PC)
|
||||
#define DOM_DLL "jsdom.dll"
|
||||
#define LAYOUT_DLL "gkhtml.dll"
|
||||
#define NETLIB_DLL "netlib.dll"
|
||||
#define PARSER_DLL "gkparser.dll"
|
||||
#define RDF_DLL "rdf.dll"
|
||||
#define XPCOM_DLL "xpcom32.dll"
|
||||
#elif defined(XP_UNIX) || defined(XP_BEOS)
|
||||
#define DOM_DLL "libjsdom"MOZ_DLL_SUFFIX
|
||||
#define LAYOUT_DLL "libgklayout"MOZ_DLL_SUFFIX
|
||||
#define NETLIB_DLL "libnecko"MOZ_DLL_SUFFIX
|
||||
#define PARSER_DLL "libhtmlpars"MOZ_DLL_SUFFIX
|
||||
#define RDF_DLL "librdf"MOZ_DLL_SUFFIX
|
||||
#define XPCOM_DLL "libxpcom"MOZ_DLL_SUFFIX
|
||||
#elif defined(XP_MAC)
|
||||
#define DOM_DLL "DOM_DLL"
|
||||
#define LAYOUT_DLL "LAYOUT_DLL"
|
||||
#define NETLIB_DLL "NETLIB_DLL"
|
||||
#define PARSER_DLL "PARSER_DLL"
|
||||
#define RDF_DLL "RDF_DLL"
|
||||
#define XPCOM_DLL "XPCOM_DLL"
|
||||
#endif
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// CIDs
|
||||
|
||||
@ -117,36 +90,6 @@ NS_DEFINE_IID(kIEventQueueServiceIID, NS_IEVENTQUEUESERVICE_IID);
|
||||
|
||||
#include "nsIMemory.h" // for the CID
|
||||
|
||||
static nsresult
|
||||
SetupRegistry(void)
|
||||
{
|
||||
// netlib
|
||||
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
|
||||
nsComponentManager::RegisterComponent(kIOServiceCID, NULL, NULL, NETLIB_DLL, PR_FALSE, PR_FALSE);
|
||||
|
||||
// parser
|
||||
static NS_DEFINE_CID(kParserCID, NS_PARSER_CID);
|
||||
static NS_DEFINE_IID(kExpatDriverCID, NS_EXPAT_DRIVER_CID);
|
||||
|
||||
nsComponentManager::RegisterComponent(kParserCID, NULL, NULL, PARSER_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponent(kExpatDriverCID, NULL, NULL, PARSER_DLL, PR_FALSE, PR_FALSE);
|
||||
|
||||
// layout
|
||||
static NS_DEFINE_CID(kNameSpaceManagerCID, NS_NAMESPACEMANAGER_CID);
|
||||
|
||||
nsComponentManager::RegisterComponent(kNameSpaceManagerCID, NULL, NULL, LAYOUT_DLL, PR_FALSE, PR_FALSE);
|
||||
|
||||
// xpcom
|
||||
static NS_DEFINE_CID(kMemoryCID, NS_MEMORY_CID);
|
||||
static NS_DEFINE_CID(kEventQueueCID, NS_EVENTQUEUE_CID);
|
||||
nsComponentManager::RegisterComponent(kEventQueueServiceCID, NULL, NULL, XPCOM_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponent(kEventQueueCID, NULL, NULL, XPCOM_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponent(kGenericFactoryCID, NULL, NULL, XPCOM_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponent(kMemoryCID, NULL, NULL, XPCOM_DLL, PR_FALSE, PR_FALSE);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class Observer : public nsIRDFObserver
|
||||
@ -321,7 +264,11 @@ main(int argc, char** argv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
SetupRegistry();
|
||||
rv = NS_InitXPCOM2(nsnull, nsnull, nsnull);
|
||||
if (NS_FAILED(rv)) {
|
||||
fprintf(stderr, "NS_InitXPCOM2 failed\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Get netlib off the floor...
|
||||
nsCOMPtr<nsIEventQueueService> theEventQueueService =
|
||||
|
@ -35,6 +35,7 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsXPCOM.h"
|
||||
#include "nsIEventQueueService.h"
|
||||
#include "nsIInputStream.h"
|
||||
#include "nsIIOService.h"
|
||||
@ -50,38 +51,11 @@
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIStreamListener.h"
|
||||
#include "nsIURL.h"
|
||||
#include "nsDOMCID.h" // for NS_SCRIPT_NAMESET_REGISTRY_CID
|
||||
#include "nsLayoutCID.h" // for NS_NAMESPACEMANAGER_CID
|
||||
#include "nsRDFCID.h"
|
||||
#include "nsRDFCID.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "plevent.h"
|
||||
#include "plstr.h"
|
||||
|
||||
#if defined(XP_PC)
|
||||
#define DOM_DLL "jsdom.dll"
|
||||
#define LAYOUT_DLL "gkhtml.dll"
|
||||
#define NETLIB_DLL "netlib.dll"
|
||||
#define PARSER_DLL "gkparser.dll"
|
||||
#define RDF_DLL "rdf.dll"
|
||||
#define XPCOM_DLL "xpcom32.dll"
|
||||
#elif defined(XP_UNIX) || defined(XP_BEOS)
|
||||
#define DOM_DLL "libjsdom"MOZ_DLL_SUFFIX
|
||||
#define LAYOUT_DLL "libgklayout"MOZ_DLL_SUFFIX
|
||||
#define NETLIB_DLL "libnecko"MOZ_DLL_SUFFIX
|
||||
#define PARSER_DLL "libhtmlpars"MOZ_DLL_SUFFIX
|
||||
#define RDF_DLL "librdf"MOZ_DLL_SUFFIX
|
||||
#define XPCOM_DLL "libxpcom"MOZ_DLL_SUFFIX
|
||||
#elif defined(XP_MAC)
|
||||
#define DOM_DLL "DOM_DLL"
|
||||
#define LAYOUT_DLL "LAYOUT_DLL"
|
||||
#define NETLIB_DLL "NETLIB_DLL"
|
||||
#define PARSER_DLL "PARSER_DLL"
|
||||
#define RDF_DLL "RDF_DLL"
|
||||
#define XPCOM_DLL "XPCOM_DLL"
|
||||
#endif
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// CIDs
|
||||
|
||||
@ -101,33 +75,6 @@ NS_DEFINE_IID(kIRDFXMLDataSourceIID, NS_IRDFXMLDATASOURCE_IID);
|
||||
NS_DEFINE_IID(kIRDFServiceIID, NS_IRDFSERVICE_IID);
|
||||
NS_DEFINE_IID(kIRDFXMLSourceIID, NS_IRDFXMLSOURCE_IID);
|
||||
|
||||
static nsresult
|
||||
SetupRegistry(void)
|
||||
{
|
||||
// netlib
|
||||
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
|
||||
nsComponentManager::RegisterComponent(kIOServiceCID, NULL, NULL, NETLIB_DLL, PR_FALSE, PR_FALSE);
|
||||
|
||||
// parser
|
||||
static NS_DEFINE_CID(kParserCID, NS_PARSER_CID);
|
||||
static NS_DEFINE_CID(kWellFormedDTDCID, NS_WELLFORMEDDTD_CID);
|
||||
|
||||
nsComponentManager::RegisterComponent(kParserCID, NULL, NULL, PARSER_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponent(kWellFormedDTDCID, NULL, NULL, PARSER_DLL, PR_FALSE, PR_FALSE);
|
||||
|
||||
// layout
|
||||
static NS_DEFINE_CID(kNameSpaceManagerCID, NS_NAMESPACEMANAGER_CID);
|
||||
|
||||
nsComponentManager::RegisterComponent(kNameSpaceManagerCID, NULL, NULL, LAYOUT_DLL, PR_FALSE, PR_FALSE);
|
||||
|
||||
// xpcom
|
||||
nsComponentManager::RegisterComponent(kEventQueueServiceCID, NULL, NULL, XPCOM_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponent(kGenericFactoryCID, NULL, NULL, XPCOM_DLL, PR_FALSE, PR_FALSE);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class ConsoleOutputStreamImpl : public nsIOutputStream
|
||||
@ -173,7 +120,11 @@ main(int argc, char** argv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
SetupRegistry();
|
||||
rv = NS_InitXPCOM2(nsnull, nsnull, nsnull);
|
||||
if (NS_FAILED(rv)) {
|
||||
fprintf(stderr, "NS_InitXPCOM2 failed\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
nsIEventQueueService* theEventQueueService = nsnull;
|
||||
nsIEventQueue* mainQueue = nsnull;
|
||||
|
@ -31,13 +31,7 @@
|
||||
#include "nsIPref.h"
|
||||
#include "prmem.h"
|
||||
|
||||
#if defined(XP_MAC) || defined(XP_MACOSX)
|
||||
#include "nsBrowserWindow.h"
|
||||
#define NS_IMPL_IDS
|
||||
#else
|
||||
#define NS_IMPL_IDS
|
||||
#include "nsBrowserWindow.h"
|
||||
#endif
|
||||
#include "nsIAppShell.h"
|
||||
#include "nsIWidget.h"
|
||||
#include "nsITextWidget.h"
|
||||
|
@ -38,13 +38,7 @@
|
||||
#include "nsIPref.h"
|
||||
#include "prmem.h"
|
||||
|
||||
#ifdef XP_MAC
|
||||
#include "nsXPBaseWindow.h"
|
||||
#define NS_IMPL_IDS
|
||||
#else
|
||||
#define NS_IMPL_IDS
|
||||
#include "nsXPBaseWindow.h"
|
||||
#endif
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIPrompt.h"
|
||||
|
@ -24,9 +24,7 @@
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#define NS_IMPL_IDS
|
||||
#include "nsIPlatformCharset.h"
|
||||
#undef NS_IMPL_IDS
|
||||
#include "nsFilePicker.h"
|
||||
#include "nsILocalFile.h"
|
||||
#include "nsIURL.h"
|
||||
|
@ -24,9 +24,7 @@
|
||||
#ifndef nsFilePicker_h__
|
||||
#define nsFilePicker_h__
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
#include "nsICharsetConverterManager.h"
|
||||
#undef NS_IMPL_IDS
|
||||
#include "nsBaseFilePicker.h"
|
||||
#include "nsString.h"
|
||||
#include "nsdefs.h"
|
||||
|
@ -52,9 +52,7 @@
|
||||
#include "prthread.h"
|
||||
|
||||
// unicode conversion
|
||||
#define NS_IMPL_IDS
|
||||
# include "nsIPlatformCharset.h"
|
||||
#undef NS_IMPL_IDS
|
||||
|
||||
|
||||
// The class statics:
|
||||
|
@ -46,9 +46,7 @@
|
||||
#include "nsFontMetricsMac.h"
|
||||
|
||||
#include "nsIServiceManager.h"
|
||||
#define NS_IMPL_IDS
|
||||
#include "nsIPlatformCharset.h"
|
||||
#undef NS_IMPL_IDS
|
||||
|
||||
#if TARGET_CARBON || (UNIVERSAL_INTERFACES_VERSION >= 0x0330)
|
||||
#include <ControlDefinitions.h>
|
||||
|
@ -39,9 +39,7 @@
|
||||
#define nsMacControl_h__
|
||||
|
||||
#include "nsIServiceManager.h"
|
||||
#define NS_IMPL_IDS
|
||||
#include "nsICharsetConverterManager.h"
|
||||
#undef NS_IMPL_IDS
|
||||
#include "nsChildWindow.h"
|
||||
#include <Controls.h>
|
||||
|
||||
|
@ -30,9 +30,7 @@
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#define NS_IMPL_IDS
|
||||
#include "nsIPlatformCharset.h"
|
||||
#undef NS_IMPL_IDS
|
||||
#include "nsWidgetDefs.h"
|
||||
#include "nsFilePicker.h"
|
||||
#include "nsILocalFile.h"
|
||||
|
@ -24,9 +24,7 @@
|
||||
#ifndef nsFilePicker_h__
|
||||
#define nsFilePicker_h__
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
#include "nsICharsetConverterManager.h"
|
||||
#undef NS_IMPL_IDS
|
||||
#include "nsBaseFilePicker.h"
|
||||
#include "nsString.h"
|
||||
#include "nsdefs.h"
|
||||
|
@ -30,9 +30,7 @@
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#define NS_IMPL_IDS
|
||||
#include "nsIPlatformCharset.h"
|
||||
#undef NS_IMPL_IDS
|
||||
#include "nsFilePicker.h"
|
||||
#include "nsILocalFile.h"
|
||||
#include "nsIFileChannel.h"
|
||||
|
@ -27,9 +27,7 @@
|
||||
#include "nsIFileChannel.h"
|
||||
#include "nsILocalFile.h"
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
#include "nsICharsetConverterManager.h"
|
||||
#undef NS_IMPL_IDS
|
||||
#include "nsBaseFilePicker.h"
|
||||
#include "nsString.h"
|
||||
#include "nsdefs.h"
|
||||
|
@ -69,9 +69,7 @@
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsICharsetConverterManager.h"
|
||||
// unicode conversion
|
||||
#define NS_IMPL_IDS
|
||||
# include "nsIPlatformCharset.h"
|
||||
#undef NS_IMPL_IDS
|
||||
|
||||
|
||||
// The class statics:
|
||||
|
@ -46,9 +46,7 @@
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsICharsetConverterManager.h"
|
||||
// unicode conversion
|
||||
#define NS_IMPL_IDS
|
||||
# include "nsIPlatformCharset.h"
|
||||
#undef NS_IMPL_IDS
|
||||
#include "nsISaveAsCharset.h"
|
||||
|
||||
|
||||
|
@ -36,7 +36,6 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
#include "pratom.h"
|
||||
#include "nsIFactory.h"
|
||||
#include "nsIServiceManager.h"
|
||||
|
@ -37,7 +37,6 @@
|
||||
|
||||
#define NS_WEAK_OBSERVERS
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
#include "pratom.h"
|
||||
#include "nsString.h"
|
||||
#include "nsAutoLock.h"
|
||||
|
@ -36,7 +36,6 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
#include "prlog.h"
|
||||
#include "prlock.h"
|
||||
#include "nsIFactory.h"
|
||||
|
@ -36,8 +36,6 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
|
||||
#include "nsPersistentProperties.h"
|
||||
#include "nsID.h"
|
||||
#include "nsCRT.h"
|
||||
|
@ -35,8 +35,6 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
|
||||
#include "nsProperties.h"
|
||||
|
||||
//#include <iostream.h>
|
||||
|
@ -48,7 +48,6 @@
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#define NS_IMPL_IDS
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
@ -37,7 +37,6 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef XPCOM_STANDALONE
|
||||
#define NS_IMPL_IDS
|
||||
|
||||
#include "nsXPCOM.h"
|
||||
#include "nsIEventQueueService.h"
|
||||
|
@ -36,7 +36,6 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
#include "nsISupports.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIObserverService.h"
|
||||
|
@ -37,6 +37,7 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "MyService.h"
|
||||
#include "nsXPCOM.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include <stdio.h>
|
||||
@ -143,30 +144,17 @@ AsyncNoShutdownTest(int testNumber)
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#if defined(XP_WIN32) || defined(XP_OS2_VACPP)
|
||||
#define _MY_SERVICE_DLL "rel:MyService.dll"
|
||||
#else
|
||||
#define _MY_SERVICE_DLL "rel:libMyService" MOZ_DLL_SUFFIX
|
||||
#endif
|
||||
|
||||
void
|
||||
SetupFactories(void)
|
||||
{
|
||||
nsresult err;
|
||||
// seed the repository (hack)
|
||||
err = nsComponentManager::RegisterComponent(kIMyServiceCID, NULL, NULL,
|
||||
_MY_SERVICE_DLL,
|
||||
PR_TRUE, PR_FALSE);
|
||||
NS_ASSERTION(err == NS_OK, "failed to register my factory");
|
||||
}
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
nsresult err;
|
||||
int testNumber = 0;
|
||||
|
||||
SetupFactories();
|
||||
err = NS_InitXPCOM2(nsnull, nsnull, nsnull);
|
||||
if (NS_FAILED(err)) {
|
||||
printf("NS_InitXPCOM2 failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
err = SimpleTest(++testNumber);
|
||||
if (err != NS_OK)
|
||||
|
@ -37,8 +37,6 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
|
||||
/*
|
||||
The global bookmarks service.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user