зеркало из https://github.com/mozilla/pjs.git
Handle the (Unix) platform-specific DLL naming conventions properly.
This commit is contained in:
Родитель
0abb23e098
Коммит
730439007e
|
@ -42,7 +42,7 @@ static NS_DEFINE_CID(kEditorCID, NS_EDITOR_CID);
|
|||
#ifdef XP_MAC
|
||||
#define EDITOR_DLL "ENDER_DLL"
|
||||
#else // XP_UNIX
|
||||
#define EDITOR_DLL "libender.so"
|
||||
#define EDITOR_DLL "libender"MOZ_DLL_SUFFIX
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -104,35 +104,35 @@
|
|||
#define STRRES_DLL "STRRES_DLL"
|
||||
#define UNICHARUTIL_DLL "UNICHARUTIL_DLL"
|
||||
#else
|
||||
#define XPCOM_DLL "libxpcom.so"
|
||||
#define XPCOM_DLL "libxpcom"MOZ_DLL_SUFFIX
|
||||
/** Currently CFLAGS defines WIDGET_DLL and GFXWIN_DLL. If, for some
|
||||
* reason, the cflags value doesn't get defined, use gtk,
|
||||
* since that is the default.
|
||||
**/
|
||||
#ifndef WIDGET_DLL
|
||||
#define WIDGET_DLL "libwidgetgtk.so"
|
||||
#define WIDGET_DLL "libwidgetgtk"MOZ_DLL_SUFFIX
|
||||
#endif
|
||||
#ifndef GFXWIN_DLL
|
||||
#define GFXWIN_DLL "libgfxgtk.so"
|
||||
#define GFXWIN_DLL "libgfxgtk"MOZ_DLL_SUFFIX
|
||||
#endif
|
||||
#define VIEW_DLL "libraptorview.so"
|
||||
#define WEB_DLL "libraptorwebwidget.so"
|
||||
#define PLUGIN_DLL "libraptorplugin.so"
|
||||
#define CAPS_DLL "libcaps.so"
|
||||
#define LIVECONNECT_DLL "libliveconnect.so"
|
||||
#define OJI_DLL "liboji.so"
|
||||
#define PREF_DLL "libpref.so"
|
||||
#define PARSER_DLL "libraptorhtmlpars.so"
|
||||
#define DOM_DLL "libjsdom.so"
|
||||
#define NETLIB_DLL "libnetlib.so"
|
||||
#define EDITOR_DLL "libender.so"
|
||||
#define RDF_DLL "librdf.so"
|
||||
#define UCONV_DLL "libuconv.so"
|
||||
#define UCVLATIN_DLL "libucvlatin.so"
|
||||
#define UCVJA_DLL "libucvja.so"
|
||||
#define UCVJA2_DLL "libucvja2.so"
|
||||
#define STRRES_DLL "libstrres.so"
|
||||
#define UNICHARUTIL_DLL "libunicharutil.so"
|
||||
#define VIEW_DLL "libraptorview"MOZ_DLL_SUFFIX
|
||||
#define WEB_DLL "libraptorwebwidget"MOZ_DLL_SUFFIX
|
||||
#define PLUGIN_DLL "libraptorplugin"MOZ_DLL_SUFFIX
|
||||
#define CAPS_DLL "libcaps"MOZ_DLL_SUFFIX
|
||||
#define LIVECONNECT_DLL "libliveconnect"MOZ_DLL_SUFFIX
|
||||
#define OJI_DLL "liboji"MOZ_DLL_SUFFIX
|
||||
#define PREF_DLL "libpref"MOZ_DLL_SUFFIX
|
||||
#define PARSER_DLL "libraptorhtmlpars"MOZ_DLL_SUFFIX
|
||||
#define DOM_DLL "libjsdom"MOZ_DLL_SUFFIX
|
||||
#define NETLIB_DLL "libnetlib"MOZ_DLL_SUFFIX
|
||||
#define EDITOR_DLL "libender"MOZ_DLL_SUFFIX
|
||||
#define RDF_DLL "librdf"MOZ_DLL_SUFFIX
|
||||
#define UCONV_DLL "libuconv"MOZ_DLL_SUFFIX
|
||||
#define UCVLATIN_DLL "libucvlatin"MOZ_DLL_SUFFIX
|
||||
#define UCVJA_DLL "libucvja"MOZ_DLL_SUFFIX
|
||||
#define UCVJA2_DLL "libucvja2"MOZ_DLL_SUFFIX
|
||||
#define STRRES_DLL "libstrres"MOZ_DLL_SUFFIX
|
||||
#define UNICHARUTIL_DLL "libunicharutil"MOZ_DLL_SUFFIX
|
||||
#endif
|
||||
|
||||
// Class ID's
|
||||
|
|
|
@ -1,83 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
#include "nsEditorMode.h"
|
||||
#include "nsString.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
|
||||
#include "nsIHTMLEditor.h"
|
||||
#include "nsEditorCID.h"
|
||||
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIServiceManager.h"
|
||||
|
||||
static nsIHTMLEditor *gEditor;
|
||||
|
||||
static NS_DEFINE_IID(kIHTMLEditorIID, NS_IHTMLEDITOR_IID);
|
||||
static NS_DEFINE_CID(kHTMLEditorCID, NS_HTMLEDITOR_CID);
|
||||
static NS_DEFINE_IID(kIEditorIID, NS_IEDITOR_IID);
|
||||
static NS_DEFINE_CID(kEditorCID, NS_EDITOR_CID);
|
||||
static NS_DEFINE_CID(kTextEditorCID, NS_TEXTEDITOR_CID); // Still needed to register factory
|
||||
//Don't think we these - switched to using HTMLEditor
|
||||
//static NS_DEFINE_IID(kITextEditorIID, NS_ITEXTEDITOR_IID);
|
||||
|
||||
#ifdef XP_PC
|
||||
#define EDITOR_DLL "ender.dll"
|
||||
#else
|
||||
#ifdef XP_MAC
|
||||
#define EDITOR_DLL "ENDER_DLL"
|
||||
#else // XP_UNIX
|
||||
#define EDITOR_DLL "libender.so"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
nsIHTMLEditor * GetEditor()
|
||||
{
|
||||
return gEditor;
|
||||
}
|
||||
|
||||
nsresult NS_InitEditorMode(nsIDOMDocument *aDOMDocument, nsIPresShell* aPresShell)
|
||||
{
|
||||
nsresult result = NS_OK;
|
||||
static needsInit=PR_TRUE;
|
||||
if (gEditor)
|
||||
|
||||
gEditor=nsnull;
|
||||
|
||||
NS_ASSERTION(nsnull!=aDOMDocument, "null document");
|
||||
NS_ASSERTION(nsnull!=aPresShell, "null presentation shell");
|
||||
|
||||
if ((nsnull==aDOMDocument) || (nsnull==aPresShell))
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
/*
|
||||
nsISupports *isup = nsnull;
|
||||
result = nsServiceManager::GetService(kHTMLEditorCID,
|
||||
kIHTMLEditorIID, &isup);
|
||||
*/
|
||||
result = nsComponentManager::CreateInstance(kHTMLEditorCID,
|
||||
nsnull,
|
||||
kIHTMLEditorIID, (void **)&gEditor);
|
||||
if (NS_FAILED(result))
|
||||
return result;
|
||||
if (!gEditor) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
return gEditor->Init(aDOMDocument, aPresShell);
|
||||
}
|
||||
|
Загрузка…
Ссылка в новой задаче