Adding diffs from obsolete nsPluginsDirUNIX.cpp to nsPluginsDirUnix.cpp

This commit is contained in:
warren%netscape.com 2000-10-28 00:52:29 +00:00
Родитель 463b8a8354
Коммит ba7f723821
2 изменённых файлов: 20 добавлений и 30 удалений

Просмотреть файл

@ -39,6 +39,11 @@
#include "nsSpecialSystemDirectory.h"
#include "prmem.h"
#include "prenv.h"
#include "nslog.h"
NS_IMPL_LOG(nsPluginsDirUnixLog)
#define PRINTF NS_LOG_PRINTF(nsPluginsDirUnixLog)
#define FLUSH NS_LOG_FLUSH(nsPluginsDirUnixLog)
#define PLUGIN_PATH "NS600_PLUGIN_PATH"
#define PLUGIN_DIR "/plugins"
@ -119,9 +124,7 @@ nsPluginsDir::nsPluginsDir(PRUint16 location)
*(nsFileSpec*)this = pluginsDir;
}
#ifdef NS_DEBUG
printf("********** Got plugins path: %s\n", pluginsDir);
#endif
PRINTF("********** Got plugins path: %s\n", pluginsDir);
}
nsPluginsDir::~nsPluginsDir()
@ -133,9 +136,7 @@ PRBool nsPluginsDir::IsPluginFile(const nsFileSpec& fileSpec)
{
const char* pathname = fileSpec.GetCString();
#ifdef NS_DEBUG
printf("IsPluginFile(%s)\n", pathname);
#endif
PRINTF("IsPluginFile(%s)\n", pathname);
return PR_TRUE;
}
@ -188,10 +189,8 @@ nsresult nsPluginFile::LoadPlugin(PRLibrary* &outLibrary)
libSpec.value.pathname = this->GetCString();
pLibrary = outLibrary = PR_LoadLibraryWithFlags(libSpec, 0);
#ifdef NS_DEBUG
printf("LoadPlugin() %s returned %lx\n",
PRINTF("LoadPlugin() %s returned %lx\n",
libSpec.value.pathname, (unsigned long)pLibrary);
#endif
return NS_OK;
}
@ -249,9 +248,7 @@ nsresult nsPluginFile::GetPluginInfo(nsPluginInfo& info)
info.fDescription = PL_strdup("");
}
#ifdef NS_DEBUG
printf("GetMIMEDescription() returned \"%s\"\n", mimedescr);
#endif
PRINTF("GetMIMEDescription() returned \"%s\"\n", mimedescr);
// Copy MIME type input.
mdesc = (char *)PR_Malloc(strlen(mimedescr)+1);
@ -294,10 +291,8 @@ nsresult nsPluginFile::GetPluginInfo(nsPluginInfo& info)
if(descr)
*descr++=0;
//#ifdef NS_DEBUG
printf("Registering plugin %d for: \"%s\",\"%s\",\"%s\"\n",
PRINTF("Registering plugin %d for: \"%s\",\"%s\",\"%s\"\n",
i, mtype,descr ? descr : "null",exten ? exten : "null");
//#endif
if(!*mtype && !descr && !exten) {
i--;

Просмотреть файл

@ -39,6 +39,11 @@
#include "nsSpecialSystemDirectory.h"
#include "prmem.h"
#include "prenv.h"
#include "nslog.h"
NS_IMPL_LOG(nsPluginsDirUnixLog)
#define PRINTF NS_LOG_PRINTF(nsPluginsDirUnixLog)
#define FLUSH NS_LOG_FLUSH(nsPluginsDirUnixLog)
#define PLUGIN_PATH "NS600_PLUGIN_PATH"
#define PLUGIN_DIR "/plugins"
@ -119,9 +124,7 @@ nsPluginsDir::nsPluginsDir(PRUint16 location)
*(nsFileSpec*)this = pluginsDir;
}
#ifdef NS_DEBUG
printf("********** Got plugins path: %s\n", pluginsDir);
#endif
PRINTF("********** Got plugins path: %s\n", pluginsDir);
}
nsPluginsDir::~nsPluginsDir()
@ -133,9 +136,7 @@ PRBool nsPluginsDir::IsPluginFile(const nsFileSpec& fileSpec)
{
const char* pathname = fileSpec.GetCString();
#ifdef NS_DEBUG
printf("IsPluginFile(%s)\n", pathname);
#endif
PRINTF("IsPluginFile(%s)\n", pathname);
return PR_TRUE;
}
@ -188,10 +189,8 @@ nsresult nsPluginFile::LoadPlugin(PRLibrary* &outLibrary)
libSpec.value.pathname = this->GetCString();
pLibrary = outLibrary = PR_LoadLibraryWithFlags(libSpec, 0);
#ifdef NS_DEBUG
printf("LoadPlugin() %s returned %lx\n",
PRINTF("LoadPlugin() %s returned %lx\n",
libSpec.value.pathname, (unsigned long)pLibrary);
#endif
return NS_OK;
}
@ -249,9 +248,7 @@ nsresult nsPluginFile::GetPluginInfo(nsPluginInfo& info)
info.fDescription = PL_strdup("");
}
#ifdef NS_DEBUG
printf("GetMIMEDescription() returned \"%s\"\n", mimedescr);
#endif
PRINTF("GetMIMEDescription() returned \"%s\"\n", mimedescr);
// Copy MIME type input.
mdesc = (char *)PR_Malloc(strlen(mimedescr)+1);
@ -294,10 +291,8 @@ nsresult nsPluginFile::GetPluginInfo(nsPluginInfo& info)
if(descr)
*descr++=0;
//#ifdef NS_DEBUG
printf("Registering plugin %d for: \"%s\",\"%s\",\"%s\"\n",
PRINTF("Registering plugin %d for: \"%s\",\"%s\",\"%s\"\n",
i, mtype,descr ? descr : "null",exten ? exten : "null");
//#endif
if(!*mtype && !descr && !exten) {
i--;