Remove plugin tester and spy tools. b=484137 r/sr=jst
authorJosh Aas <joshmoz@gmail.com>
Thu, 19 Mar 2009 15:57:50 -0700
changeset 26389 bea7c3057166c7bf3545e2d65365281d2f090ec7
parent 26388 5e53b13462c497ceb28c81287436710c6c62006c
child 26390 773a6847b6daed49bfaa419cc527247d24b027e3
push idunknown
push userunknown
push dateunknown
bugs484137
milestone1.9.2a1pre
Remove plugin tester and spy tools. b=484137 r/sr=jst
modules/plugin/Makefile.in
modules/plugin/sdk/readme.txt
modules/plugin/tools/spy/common/epmanager.cpp
modules/plugin/tools/spy/common/format.cpp
modules/plugin/tools/spy/common/logfile.cpp
modules/plugin/tools/spy/common/logger.cpp
modules/plugin/tools/spy/common/np_entry.cpp
modules/plugin/tools/spy/common/npn_gate.cpp
modules/plugin/tools/spy/common/npp_gate.cpp
modules/plugin/tools/spy/common/plugload.cpp
modules/plugin/tools/spy/common/profile.cpp
modules/plugin/tools/spy/common/utils.cpp
modules/plugin/tools/spy/include/actionnames.h
modules/plugin/tools/spy/include/dirpick.h
modules/plugin/tools/spy/include/epmanager.h
modules/plugin/tools/spy/include/format.h
modules/plugin/tools/spy/include/logfile.h
modules/plugin/tools/spy/include/logger.h
modules/plugin/tools/spy/include/plugload.h
modules/plugin/tools/spy/include/profile.h
modules/plugin/tools/spy/include/setup.h
modules/plugin/tools/spy/include/xp.h
modules/plugin/tools/spy/windows/dirpick.cpp
modules/plugin/tools/spy/windows/gui_advanced.cpp
modules/plugin/tools/spy/windows/gui_fiter.cpp
modules/plugin/tools/spy/windows/gui_general.cpp
modules/plugin/tools/spy/windows/gui_log.cpp
modules/plugin/tools/spy/windows/gui_main.cpp
modules/plugin/tools/spy/windows/gui_pause.cpp
modules/plugin/tools/spy/windows/loggerw.cpp
modules/plugin/tools/spy/windows/loggerw.h
modules/plugin/tools/spy/windows/npspy.def
modules/plugin/tools/spy/windows/npspy.dsp
modules/plugin/tools/spy/windows/npspy.dsw
modules/plugin/tools/spy/windows/npspy.rc
modules/plugin/tools/spy/windows/profilew.cpp
modules/plugin/tools/spy/windows/profilew.h
modules/plugin/tools/spy/windows/res/cdrom.ico
modules/plugin/tools/spy/windows/res/floppy.ico
modules/plugin/tools/spy/windows/res/foldcl.ico
modules/plugin/tools/spy/windows/res/foldop.ico
modules/plugin/tools/spy/windows/res/foldopse.ico
modules/plugin/tools/spy/windows/res/harddr.ico
modules/plugin/tools/spy/windows/res/icon.ico
modules/plugin/tools/spy/windows/res/netdr.ico
modules/plugin/tools/spy/windows/res/ramdr.ico
modules/plugin/tools/spy/windows/resource.h
modules/plugin/tools/spy/windows/setupexe.cpp
modules/plugin/tools/spy/windows/spysetup.dsp
modules/plugin/tools/spy/windows/windowsxx.h
modules/plugin/tools/spy/windows/winentry.cpp
modules/plugin/tools/tester/common/Makefile.in
modules/plugin/tools/tester/common/log.cpp
modules/plugin/tools/tester/common/logfile.cpp
modules/plugin/tools/tester/common/logger.cpp
modules/plugin/tools/tester/common/loghlp.cpp
modules/plugin/tools/tester/common/np_entry.cpp
modules/plugin/tools/tester/common/npn_gate.cpp
modules/plugin/tools/tester/common/npp_gate.cpp
modules/plugin/tools/tester/common/plugbase.cpp
modules/plugin/tools/tester/common/pplib.cpp
modules/plugin/tools/tester/common/profile.cpp
modules/plugin/tools/tester/common/script.cpp
modules/plugin/tools/tester/common/scripter.cpp
modules/plugin/tools/tester/common/scrpthlp.cpp
modules/plugin/tools/tester/common/strconv.cpp
modules/plugin/tools/tester/common/xp.cpp
modules/plugin/tools/tester/doc/auto.gif
modules/plugin/tools/tester/doc/manual.gif
modules/plugin/tools/tester/doc/samplescript.txt
modules/plugin/tools/tester/doc/testerplugin.html
modules/plugin/tools/tester/include/Makefile.in
modules/plugin/tools/tester/include/action.h
modules/plugin/tools/tester/include/comstrs.h
modules/plugin/tools/tester/include/helpers.h
modules/plugin/tools/tester/include/loadstatus.h
modules/plugin/tools/tester/include/log.h
modules/plugin/tools/tester/include/logfile.h
modules/plugin/tools/tester/include/logger.h
modules/plugin/tools/tester/include/loghlp.h
modules/plugin/tools/tester/include/plugbase.h
modules/plugin/tools/tester/include/pplib.h
modules/plugin/tools/tester/include/profile.h
modules/plugin/tools/tester/include/script.h
modules/plugin/tools/tester/include/scripter.h
modules/plugin/tools/tester/include/scrpthlp.h
modules/plugin/tools/tester/include/strconv.h
modules/plugin/tools/tester/include/xp.h
modules/plugin/tools/tester/os2/Makefile.in
modules/plugin/tools/tester/os2/dlgauto.cpp
modules/plugin/tools/tester/os2/dlgman.cpp
modules/plugin/tools/tester/os2/dlgtstr.cpp
modules/plugin/tools/tester/os2/guihlp.cpp
modules/plugin/tools/tester/os2/guihlp.h
modules/plugin/tools/tester/os2/guiprefs.h
modules/plugin/tools/tester/os2/loadstatus.cpp
modules/plugin/tools/tester/os2/npapi.rc
modules/plugin/tools/tester/os2/os2entry.cpp
modules/plugin/tools/tester/os2/os2utils.cpp
modules/plugin/tools/tester/os2/os2utils.h
modules/plugin/tools/tester/os2/plugin.cpp
modules/plugin/tools/tester/os2/plugin.h
modules/plugin/tools/tester/os2/resource.h
modules/plugin/tools/tester/testcase/Display.html
modules/plugin/tools/tester/testcase/Log.html
modules/plugin/tools/tester/testcase/index.html
modules/plugin/tools/tester/testcase/testapi.html
modules/plugin/tools/tester/testcase/tester.html
modules/plugin/tools/tester/windows/Makefile.in
modules/plugin/tools/tester/windows/dlgauto.cpp
modules/plugin/tools/tester/windows/dlgman.cpp
modules/plugin/tools/tester/windows/dlgtstr.cpp
modules/plugin/tools/tester/windows/guihlp.cpp
modules/plugin/tools/tester/windows/guihlp.h
modules/plugin/tools/tester/windows/guiprefs.h
modules/plugin/tools/tester/windows/icon.ico
modules/plugin/tools/tester/windows/loadstatus.cpp
modules/plugin/tools/tester/windows/npapi.def
modules/plugin/tools/tester/windows/npapi.dsp
modules/plugin/tools/tester/windows/npapi.dsw
modules/plugin/tools/tester/windows/npapi.rc
modules/plugin/tools/tester/windows/plugin.cpp
modules/plugin/tools/tester/windows/plugin.h
modules/plugin/tools/tester/windows/resource.h
modules/plugin/tools/tester/windows/winentry.cpp
modules/plugin/tools/tester/windows/winutils.cpp
modules/plugin/tools/tester/windows/winutils.h
--- a/modules/plugin/Makefile.in
+++ b/modules/plugin/Makefile.in
@@ -63,19 +63,16 @@ endif
 ifeq ($(OS_ARCH),WINNT)
 TOOL_DIRS += default/windows
 endif
 
 ifeq ($(OS_ARCH),OS2)
 TOOL_DIRS += default/os2
 ifdef MOZ_OJI
 TOOL_DIRS += os2wrapper
-ifdef ENABLE_TESTS
-TOOL_DIRS += tools/tester/common tools/tester/os2
-endif
 endif
 endif
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
 TOOL_DIRS += default/mac
 endif
 
 ifdef ENABLE_TESTS
--- a/modules/plugin/sdk/readme.txt
+++ b/modules/plugin/sdk/readme.txt
@@ -10,12 +10,12 @@ Samples
 
 The "samples" directory contains NPAPI plugin samples. Within the "samples"
 directory the common folder contains stub implementations of the NPAPI methods.
 There is no need to modify files in this folder, just include them into your
 project if you wish. Each sample plugin contains a readme file describing it.
 
 ===============================================================
 
-Plugin developers might find it useful for debugging purporsed to turn
+Plugin developers might find it useful for debugging purposes to turn
 off the exception catching mechanism currently implemented in Mozilla 
 on Windows. To do this add the following line into your prefs.js file:
 user_pref("plugin.dont_try_safe_calls", true);
deleted file mode 100644
--- a/modules/plugin/tools/spy/common/epmanager.cpp
+++ /dev/null
@@ -1,378 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "xp.h"
-
-#include "epmanager.h"
-#include "logger.h"
-
-extern Logger * logger;
-
-InstanceList::InstanceList(NPP _instance) : 
-  next(NULL), 
-  instance(_instance)
-{
-}
-
-InstanceList::~InstanceList()
-{
-}
-
-PluginEntryPointList::PluginEntryPointList() :
-  next(NULL),
-  instances(NULL)
-{
-  mimetype[0] = '\0';
-  memset((void *)&realNPPFuncs, 0, sizeof(realNPPFuncs));
-  realShutdown = NULL;
-  hLib = NULL;
-}
-
-PluginEntryPointList::~PluginEntryPointList()
-{
-}
-
-NPPEntryPointManager::NPPEntryPointManager() :
-  mEntryPoints(NULL)
-{
-}
-
-NPPEntryPointManager::~NPPEntryPointManager()
-{
-  for(PluginEntryPointList * eps = mEntryPoints; eps != NULL;)
-  {
-    for(InstanceList * instances = eps->instances; instances != NULL;)
-    {
-      InstanceList * next = instances->next;
-      delete instances;
-      instances = next;
-    }
-
-    PluginEntryPointList * next = eps->next;
-    delete eps;
-    eps = next;
-  }
-}
-
-void NPPEntryPointManager::createEntryPointsForPlugin(char * mimetype, NPPluginFuncs * funcs, NP_SHUTDOWN shutdownproc, XP_HLIB hLib)
-{
-  PluginEntryPointList * eps = new PluginEntryPointList();
-
-  if(eps == NULL)
-    return;
-
-  strcpy(eps->mimetype, mimetype);
-
-  if(funcs)
-  {
-    eps->realNPPFuncs.size          = funcs->size;
-    eps->realNPPFuncs.version       = funcs->version;
-    eps->realNPPFuncs.newp          = funcs->newp;
-    eps->realNPPFuncs.destroy       = funcs->destroy;
-    eps->realNPPFuncs.setwindow     = funcs->setwindow;
-    eps->realNPPFuncs.newstream     = funcs->newstream;
-    eps->realNPPFuncs.destroystream = funcs->destroystream;
-    eps->realNPPFuncs.asfile        = funcs->asfile;
-    eps->realNPPFuncs.writeready    = funcs->writeready;
-    eps->realNPPFuncs.write         = funcs->write;
-    eps->realNPPFuncs.print         = funcs->print;
-    eps->realNPPFuncs.event         = funcs->event;
-    eps->realNPPFuncs.urlnotify     = funcs->urlnotify;
-    eps->realNPPFuncs.javaClass     = NULL;
-    eps->realNPPFuncs.getvalue      = funcs->getvalue;
-    eps->realNPPFuncs.setvalue      = funcs->setvalue;
-  }
-
-  eps->realShutdown = shutdownproc;
-  eps->hLib = hLib;
-
-  eps->next = mEntryPoints;
-  mEntryPoints = eps;
-}
-
-void NPPEntryPointManager::removeEntryPointsForPlugin(NPP instance, XP_HLIB * lib)
-{
-  NPPluginFuncs * eptoremove = findEntryPointsForInstance(instance);
-
-  PluginEntryPointList * prev = NULL;
-
-  for(PluginEntryPointList * eps = mEntryPoints; eps != NULL; eps = eps->next)
-  {
-    if(&eps->realNPPFuncs == eptoremove)
-    {
-      if(prev)
-        prev->next = eps->next;
-      else
-        mEntryPoints = eps->next;
-
-      *lib = eps->hLib;
-      delete eps;
-      return;
-    }
-
-    prev = eps;
-  }
-}
-
-NPPluginFuncs * NPPEntryPointManager::findEntryPointsForPlugin(char * mimetype)
-{
-  for(PluginEntryPointList * eps = mEntryPoints; eps != NULL; eps = eps->next)
-  {
-    if(0 == stricmp(eps->mimetype, mimetype))
-      return &eps->realNPPFuncs;
-  }
-
-  return NULL;
-}
-
-NPPluginFuncs * NPPEntryPointManager::findEntryPointsForInstance(NPP instance)
-{
-  for(PluginEntryPointList * eps = mEntryPoints; eps != NULL; eps = eps->next)
-  {
-    for(InstanceList * instances = eps->instances; instances != NULL; instances = instances->next)
-    {
-      if(instances->instance == instance)
-        return &eps->realNPPFuncs;
-    }
-  }
-
-  return NULL;
-}
-
-void NPPEntryPointManager::callNP_ShutdownAll()
-{
-  for(PluginEntryPointList * eps = mEntryPoints; eps != NULL; eps = eps->next)
-  {
-    if(eps->realShutdown)
-    {
-      logger->logSPY_NP_Shutdown(eps->mimetype);
-      eps->realShutdown();
-      eps->realShutdown = NULL; // don't want to call it more than once
-    }
-  }
-}
-
-void NPPEntryPointManager::callNP_Shutdown(NPP instance)
-{
-  for(PluginEntryPointList * eps = mEntryPoints; eps != NULL; eps = eps->next)
-  {
-    for(InstanceList * instances = eps->instances; instances != NULL; instances = instances->next)
-    {
-      if(instances->instance == instance)
-      {
-        if(eps->realShutdown)
-        {
-          logger->logSPY_NP_Shutdown(eps->mimetype);
-          eps->realShutdown();
-          eps->realShutdown = NULL; // don't want to call it more than once
-        }
-      }
-    }
-  }
-}
-
-NPError NPPEntryPointManager::callNPP_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved)
-{
-  NPPluginFuncs * nppfuncs = NULL;
-
-  for(PluginEntryPointList * eps = mEntryPoints; eps != NULL; eps = eps->next)
-  {
-    if(0 == stricmp(eps->mimetype, pluginType))
-    {
-      nppfuncs = &eps->realNPPFuncs;
-
-      // now we should associate this plugin instance with plugin entry points
-      // so that later we could find entry points by instance rather than by mimetype
-      InstanceList * inst = new InstanceList(instance);
-      inst->next = eps->instances;
-      eps->instances = inst;
-
-      break;
-    }
-  }
-
-  if(!nppfuncs || !nppfuncs->newp)
-    return NPERR_GENERIC_ERROR;
-
-  NPError rv = CallNPP_NewProc(nppfuncs->newp, pluginType, instance, mode, argc, argn, argv, saved);
-
-  return rv;
-}
-
-NPError NPPEntryPointManager::callNPP_Destroy(NPP instance, NPSavedData** save, BOOL * last)
-{
-  NPPluginFuncs * nppfuncs = NULL;
-
-  BOOL done = FALSE;
-
-  for(PluginEntryPointList * eps = mEntryPoints; eps != NULL; eps = eps->next)
-  {
-    InstanceList * prev = NULL;
-    for(InstanceList * instances = eps->instances; instances != NULL; instances = instances->next)
-    {
-      if(instances->instance == instance)
-      {
-        nppfuncs = &eps->realNPPFuncs;
-        done = TRUE;
-
-        // check if this is the last one
-        if(eps->instances->next == NULL) 
-          *last = TRUE;
-        else
-        {
-          // deassociate instance if this is not the last one
-          // last instance will be needed to find corresponding shutdown proc
-          if(prev)
-            prev->next = instances->next;
-          else
-            eps->instances = instances->next;
-
-          delete instances;
-        }
-
-        break;
-      }
-      prev = instances;
-    }
-    if(done)
-      break;
-  }
-
-  if(!nppfuncs || !nppfuncs->destroy)
-    return NPERR_GENERIC_ERROR;
-
-  return CallNPP_DestroyProc(nppfuncs->destroy, instance, save);
-}
-
-NPError NPPEntryPointManager::callNPP_SetWindow(NPP instance, NPWindow* window)
-{
-  NPPluginFuncs * nppfuncs = findEntryPointsForInstance(instance);
-  if(!nppfuncs || !nppfuncs->setwindow)
-    return NPERR_GENERIC_ERROR;
-
-  return CallNPP_SetWindowProc(nppfuncs->setwindow, instance, window);
-}
-
-NPError NPPEntryPointManager::callNPP_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype)
-{
-  NPPluginFuncs * nppfuncs = findEntryPointsForInstance(instance);
-  if(!nppfuncs || !nppfuncs->newstream)
-    return NPERR_GENERIC_ERROR;
-
-  return CallNPP_NewStreamProc(nppfuncs->newstream, instance, type, stream, seekable, stype);
-}
-
-NPError NPPEntryPointManager::callNPP_DestroyStream(NPP instance, NPStream* stream, NPReason reason)
-{
-  NPPluginFuncs * nppfuncs = findEntryPointsForInstance(instance);
-  if(!nppfuncs || !nppfuncs->destroystream)
-    return NPERR_GENERIC_ERROR;
-
-  return CallNPP_DestroyStreamProc(nppfuncs->destroystream, instance, stream, reason);
-}
-
-int32 NPPEntryPointManager::callNPP_WriteReady(NPP instance, NPStream* stream)
-{
-  NPPluginFuncs * nppfuncs = findEntryPointsForInstance(instance);
-  if(!nppfuncs || !nppfuncs->writeready)
-    return NPERR_GENERIC_ERROR;
-
-  return CallNPP_WriteReadyProc(nppfuncs->writeready, instance, stream);
-}
-
-int32 NPPEntryPointManager::callNPP_Write(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer)
-{
-  NPPluginFuncs * nppfuncs = findEntryPointsForInstance(instance);
-  if(!nppfuncs || !nppfuncs->write)
-    return NPERR_GENERIC_ERROR;
-
-  return CallNPP_WriteProc(nppfuncs->write, instance, stream, offset, len, buffer);
-}
-
-void NPPEntryPointManager::callNPP_StreamAsFile(NPP instance, NPStream* stream, const char* fname)
-{
-  NPPluginFuncs * nppfuncs = findEntryPointsForInstance(instance);
-  if(!nppfuncs || !nppfuncs->asfile)
-    return;
-
-  CallNPP_StreamAsFileProc(nppfuncs->asfile, instance, stream, fname);
-}
-
-void NPPEntryPointManager::callNPP_Print(NPP instance, NPPrint* platformPrint)
-{
-  NPPluginFuncs * nppfuncs = findEntryPointsForInstance(instance);
-  if(!nppfuncs || !nppfuncs->print)
-    return;
-
-  CallNPP_PrintProc(nppfuncs->print, instance, platformPrint);
-}
-
-void NPPEntryPointManager::callNPP_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData)
-{
-  NPPluginFuncs * nppfuncs = findEntryPointsForInstance(instance);
-  if(!nppfuncs || !nppfuncs->urlnotify)
-    return;
-
-  CallNPP_URLNotifyProc(nppfuncs->urlnotify, instance, url, reason, notifyData);
-}
-
-NPError NPPEntryPointManager::callNPP_GetValue(NPP instance, NPPVariable variable, void *value)
-{
-  NPPluginFuncs * nppfuncs = findEntryPointsForInstance(instance);
-  if(!nppfuncs || !nppfuncs->getvalue)
-    return NPERR_GENERIC_ERROR;
-
-  return CallNPP_GetValueProc(nppfuncs->getvalue, instance, variable, value);
-}
-
-NPError NPPEntryPointManager::callNPP_SetValue(NPP instance, NPNVariable variable, void *value)
-{
-  NPPluginFuncs * nppfuncs = findEntryPointsForInstance(instance);
-  if(!nppfuncs || !nppfuncs->setvalue)
-    return NPERR_GENERIC_ERROR;
-
-  return CallNPP_SetValueProc(nppfuncs->setvalue, instance, variable, value);
-}
-
-int16 NPPEntryPointManager::callNPP_HandleEvent(NPP instance, void* event)
-{
-  NPPluginFuncs * nppfuncs = findEntryPointsForInstance(instance);
-  if(!nppfuncs || !nppfuncs->event)
-    return NPERR_GENERIC_ERROR;
-
-  return CallNPP_HandleEventProc(nppfuncs->event, instance, event);
-}
deleted file mode 100644
--- a/modules/plugin/tools/spy/common/format.cpp
+++ /dev/null
@@ -1,894 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "xp.h"
-
-#include "format.h"
-#include "logger.h"
-
-extern Logger * logger;
-
-char * FormatNPAPIError(int iError)
-{
-  static char szError[64];
-  switch (iError)
-  {
-    case NPERR_NO_ERROR:
-      sprintf(szError, "NPERR_NO_ERROR");
-      break;
-    case NPERR_GENERIC_ERROR:
-      sprintf(szError, "NPERR_GENERIC_ERROR");
-      break;
-    case NPERR_INVALID_INSTANCE_ERROR:
-      sprintf(szError, "NPERR_INVALID_INSTANCE_ERROR");
-      break;
-    case NPERR_INVALID_FUNCTABLE_ERROR:
-      sprintf(szError, "NPERR_INVALID_FUNCTABLE_ERROR");
-      break;
-    case NPERR_MODULE_LOAD_FAILED_ERROR:
-      sprintf(szError, "NPERR_MODULE_LOAD_FAILED_ERROR");
-      break;
-    case NPERR_OUT_OF_MEMORY_ERROR:
-      sprintf(szError, "NPERR_OUT_OF_MEMORY_ERROR");
-      break;
-    case NPERR_INVALID_PLUGIN_ERROR:
-      sprintf(szError, "NPERR_INVALID_PLUGIN_ERROR");
-      break;
-    case NPERR_INVALID_PLUGIN_DIR_ERROR:
-      sprintf(szError, "NPERR_INVALID_PLUGIN_DIR_ERROR");
-      break;
-    case NPERR_INCOMPATIBLE_VERSION_ERROR:
-      sprintf(szError, "NPERR_INCOMPATIBLE_VERSION_ERROR");
-      break;
-    case NPERR_INVALID_PARAM:
-      sprintf(szError, "NPERR_INVALID_PARAM");
-      break;
-    case NPERR_INVALID_URL:
-      sprintf(szError, "NPERR_INVALID_URL");
-      break;
-    case NPERR_FILE_NOT_FOUND:
-      sprintf(szError, "NPERR_FILE_NOT_FOUND");
-      break;
-    case NPERR_NO_DATA:
-      sprintf(szError, "NPERR_NO_DATA");
-      break;
-    case NPERR_STREAM_NOT_SEEKABLE:
-      sprintf(szError, "NPERR_STREAM_NOT_SEEKABLE");
-      break;
-    default:
-      sprintf(szError, "Unlisted error");
-      break;
-  }
-  return &szError[0];
-}
-
-char * FormatNPAPIReason(int iReason)
-{
-  static char szReason[64];
-  switch (iReason)
-  {
-    case NPRES_DONE:
-      sprintf(szReason, "NPRES_DONE");
-      break;
-    case NPRES_NETWORK_ERR:
-      sprintf(szReason, "NPRES_NETWORK_ERR");
-      break;
-    case NPRES_USER_BREAK:
-      sprintf(szReason, "NPRES_USER_BREAK");
-      break;
-    default:
-      sprintf(szReason, "Unlisted reason");
-      break;
-  }
-  return &szReason[0];
-}
-
-char * FormatNPNVariable(NPNVariable var)
-{
-  static char szVar[80];
-  switch (var)
-  {
-    case NPNVxDisplay:
-      sprintf(szVar, "%i -- NPNVxDisplay", var);
-      break;
-    case NPNVxtAppContext:
-      sprintf(szVar, "%i -- NPNVxtAppContext", var);
-      break;
-    case NPNVnetscapeWindow:
-      sprintf(szVar, "%i -- NPNVnetscapeWindow", var);
-      break;
-    case NPNVjavascriptEnabledBool:
-      sprintf(szVar, "%i -- NPNVjavascriptEnabledBool", var);
-      break;
-    case NPNVasdEnabledBool:
-      sprintf(szVar, "%i -- NPNVasdEnabledBool", var);
-      break;
-    case NPNVisOfflineBool:
-      sprintf(szVar, "%i -- NPNVisOfflineBool", var);
-      break;
-    default:
-      sprintf(szVar, "%i -- Unlisted variable", var);
-      break;
-  }
-  return &szVar[0];
-}
-
-char * FormatNPPVariable(NPPVariable var)
-{
-  static char szVar[80];
-  switch (var)
-  {
-    case NPPVpluginNameString:
-      sprintf(szVar, "%i -- NPPVpluginNameString", var);
-      break;
-    case NPPVpluginDescriptionString:
-      sprintf(szVar, "%i -- NPPVpluginDescriptionString?", var);
-      break;
-    case NPPVpluginWindowBool:
-      sprintf(szVar, "%i -- NPPVpluginWindowBool?", var);
-      break;
-    case NPPVpluginTransparentBool:
-      sprintf(szVar, "%i -- NPPVpluginTransparentBool?", var);
-      break;
-    case NPPVjavaClass:
-      sprintf(szVar, "%i -- NPPVjavaClass?", var);
-      break;
-    case NPPVpluginWindowSize:
-      sprintf(szVar, "%i -- NPPVpluginWindowSize?", var);
-      break;
-    case NPPVpluginTimerInterval:
-      sprintf(szVar, "%i -- NPPVpluginTimerInterval?", var);
-      break;
-    case NPPVpluginScriptableInstance:
-      sprintf(szVar, "%i -- NPPVpluginScriptableInstance?", var);
-      break;
-    case NPPVpluginScriptableIID:
-      sprintf(szVar, "%i -- NPPVpluginScriptableIID?", var);
-      break;
-    default:
-      sprintf(szVar, "%i -- Unlisted variable?", var);
-      break;
-  }
-  return &szVar[0];
-}
-
-BOOL FormatPCHARArgument(char * szBuf, int iLength, LogArgumentStruct * parg)
-{
-  if(iLength <= parg->iLength)
-    return FALSE;
-
-  if(parg->pData == NULL)
-    sprintf(szBuf, "%#08lx", parg->dwArg);
-  else
-    sprintf(szBuf, "%#08lx(\"%s\")", parg->dwArg, (char *)parg->pData);
-  return TRUE;
-}
-
-BOOL FormatBOOLArgument(char * szBuf, int iLength, LogArgumentStruct * parg)
-{
-  if(iLength <= 8)
-    return FALSE;
-
-  sprintf(szBuf, "%s", ((NPBool)parg->dwArg == TRUE) ? "TRUE" : "FALSE");
-  return TRUE;
-}
-
-BOOL FormatPBOOLArgument(char * szBuf, int iLength, LogArgumentStruct * parg)
-{
-  if(iLength <= 8)
-    return FALSE;
-
-  sprintf(szBuf, "%#08lx(%s)", parg->dwArg, (*((NPBool *)parg->pData) == TRUE) ? "TRUE" : "FALSE");
-  return TRUE;
-}
-
-static void makeAbbreviatedString(char * szBuf, int iSize, DWORD dwArg, int iLength, int iWrap)
-{
-  if(dwArg == 0L)
-  {
-    szBuf[0] = '\0';
-    return;
-  }
-
-  if(iLength > iWrap)
-  {
-    int iRealWrap = (iSize > iWrap) ? iWrap : (iSize - 4);
-    memcpy((LPVOID)&szBuf[0], (LPVOID)dwArg, iRealWrap);
-    szBuf[iRealWrap]     = '.';
-    szBuf[iRealWrap + 1] = '.';
-    szBuf[iRealWrap + 2] = '.';
-    szBuf[iRealWrap + 3] = '\0';
-  }
-  else
-  {
-    if(iLength >= iSize)
-    {    
-      memcpy((LPVOID)&szBuf[0], (LPVOID)dwArg, iSize - 4);
-      szBuf[iSize]     = '.';
-      szBuf[iSize + 1] = '.';
-      szBuf[iSize + 2] = '.';
-      szBuf[iSize + 3] = '\0';
-    }
-    else
-    {
-      memcpy((LPVOID)&szBuf[0], (LPVOID)dwArg, iLength);
-      szBuf[iLength] = '\0';
-    }
-  }
-}
-
-LogItemStruct * makeLogItemStruct(NPAPI_Action action, 
-                                  DWORD dw1, DWORD dw2, DWORD dw3, DWORD dw4, 
-                                  DWORD dw5, DWORD dw6, DWORD dw7, BOOL bShort)
-{
-  int iWrap = 10;
-
-  LogItemStruct * plis = new LogItemStruct;
-  if(plis == NULL)
-    return NULL;
-
-  plis->action = action;
-  plis->arg1.dwArg = dw1;
-  plis->arg2.dwArg = dw2;
-  plis->arg3.dwArg = dw3;
-  plis->arg4.dwArg = dw4;
-  plis->arg5.dwArg = dw5;
-  plis->arg6.dwArg = dw6;
-  plis->arg7.dwArg = dw7;
-
-  char szTarget[1024] = {'\0'};
-  char szBuf[1024] = {'\0'};
-
-  if(bShort)
-    return plis;
-
-  switch (action)
-  {
-    case action_invalid:
-      break;
-
-    // NPN action
-    case action_npn_version:
-      plis->arg1.pData = new int[1];
-      *(int*)(plis->arg1.pData) = *((int*)dw1);
-      plis->arg1.iLength = sizeof(int);
-
-      plis->arg2.pData = new int[1];
-      *(int*)(plis->arg2.pData) = *((int*)dw2);
-      plis->arg2.iLength = sizeof(int);
-
-      plis->arg3.pData = new int[1];
-      *(int*)(plis->arg3.pData) = *((int*)dw3);
-      plis->arg3.iLength = sizeof(int);
-
-      plis->arg4.pData = new int[1];
-      *(int*)(plis->arg4.pData) = *((int*)dw4);
-      plis->arg4.iLength = sizeof(int);
-
-      break;
-    case action_npn_get_url_notify:
-      if(dw2 != 0L)
-      {
-        plis->arg2.iLength = strlen((char *)dw2) + 1;
-        plis->arg2.pData = new char[plis->arg2.iLength];
-        memcpy(plis->arg2.pData, (LPVOID)dw2, plis->arg2.iLength);
-      }
-
-      if(dw3 != 0L)
-      {
-        makeAbbreviatedString(szTarget, sizeof(szTarget), dw3, strlen((char *)dw3), iWrap);
-        plis->arg3.iLength = strlen(szTarget) + 1;
-        plis->arg3.pData = new char[plis->arg3.iLength];
-        memcpy(plis->arg3.pData, (LPVOID)&szTarget[0], plis->arg3.iLength);
-      }
-      break;
-    case action_npn_get_url:
-    {
-      if(dw2 != 0L)
-      {
-        plis->arg2.iLength = strlen((char *)dw2) + 1;
-        plis->arg2.pData = new char[plis->arg2.iLength];
-        memcpy(plis->arg2.pData, (LPVOID)dw2, plis->arg2.iLength);
-      }
-
-      if(dw3 != 0L)
-      {
-        makeAbbreviatedString(szTarget, sizeof(szTarget), dw3, strlen((char *)dw3), iWrap);
-        plis->arg3.iLength = strlen(szTarget) + 1;
-        plis->arg3.pData = new char[plis->arg3.iLength];
-        memcpy(plis->arg3.pData, (LPVOID)&szTarget[0], plis->arg3.iLength);
-      }
-      break;
-    }
-    case action_npn_post_url_notify:
-    {
-      if(dw2 != 0L)
-      {
-        plis->arg2.iLength = strlen((char *)dw2) + 1;
-        plis->arg2.pData = new char[plis->arg2.iLength];
-        memcpy(plis->arg2.pData, (LPVOID)dw2, plis->arg2.iLength);
-      }
-
-      if(dw3 != 0L)
-      {
-        makeAbbreviatedString(szTarget, sizeof(szTarget), dw3, strlen((char *)dw3), iWrap);
-        plis->arg3.iLength = strlen(szTarget) + 1;
-        plis->arg3.pData = new char[plis->arg3.iLength];
-        memcpy(plis->arg3.pData, (LPVOID)&szTarget[0], plis->arg3.iLength);
-      }
-
-      makeAbbreviatedString(szBuf, sizeof(szBuf), dw5, strlen((char *)dw5), iWrap);
-      plis->arg5.iLength = (int)dw4 + 1;
-      plis->arg5.pData = new char[plis->arg5.iLength];
-      memcpy(plis->arg5.pData, (LPVOID)&szBuf[0], plis->arg5.iLength);
-
-      break;
-    }
-    case action_npn_post_url:
-    {
-      if(dw2 != 0L)
-      {
-        plis->arg2.iLength = strlen((char *)dw2) + 1;
-        plis->arg2.pData = new char[plis->arg2.iLength];
-        memcpy(plis->arg2.pData, (LPVOID)dw2, plis->arg2.iLength);
-      }
-
-      if(dw3 != 0L)
-      {
-        makeAbbreviatedString(szTarget, sizeof(szTarget), dw3, strlen((char *)dw3), iWrap);
-        plis->arg3.iLength = strlen(szTarget) + 1;
-        plis->arg3.pData = new char[plis->arg3.iLength];
-        memcpy(plis->arg3.pData, (LPVOID)&szTarget[0], plis->arg3.iLength);
-      }
-
-      makeAbbreviatedString(szBuf, sizeof(szBuf), dw5, strlen((char *)dw5), iWrap);
-      plis->arg5.iLength = (int)dw4 + 1;
-      plis->arg5.pData = new char[plis->arg5.iLength];
-      memcpy(plis->arg5.pData, (LPVOID)&szBuf[0], plis->arg5.iLength);
-
-      break;
-    }
-    case action_npn_new_stream:
-    {
-      if(dw2 != 0L)
-      {
-        plis->arg2.iLength = strlen((char *)dw2) + 1;
-        plis->arg2.pData = new char[plis->arg2.iLength];
-        memcpy(plis->arg2.pData, (LPVOID)dw2, plis->arg2.iLength);
-      }
-
-      makeAbbreviatedString(szTarget, sizeof(szTarget), dw3, strlen((char *)dw3), iWrap);
-      plis->arg3.iLength = strlen(szTarget) + 1;
-      plis->arg3.pData = new char[plis->arg3.iLength];
-      memcpy(plis->arg3.pData, (LPVOID)&szTarget[0], plis->arg3.iLength);
-
-      plis->arg4.pData = new char[sizeof(DWORD)];
-      plis->arg4.iLength = sizeof(DWORD);
-      memcpy(plis->arg4.pData, (LPVOID)dw4, plis->arg4.iLength);
-
-      break;
-    }
-    case action_npn_destroy_stream:
-      break;
-    case action_npn_request_read:
-      break;
-    case action_npn_write:
-    {
-      makeAbbreviatedString(szBuf, sizeof(szBuf), dw4, strlen((char *)dw4), iWrap);
-      plis->arg4.iLength = strlen(szBuf) + 1;
-      plis->arg4.pData = new char[plis->arg4.iLength];
-      memcpy(plis->arg4.pData, (LPVOID)&szBuf[0], plis->arg4.iLength);
-      break;
-    }
-    case action_npn_status:
-      if(dw2 != 0L)
-      {
-        plis->arg2.iLength = strlen((char *)dw2) + 1;
-        plis->arg2.pData = new char[plis->arg2.iLength];
-        memcpy(plis->arg2.pData, (LPVOID)dw2, plis->arg2.iLength);
-      }
-      break;
-    case action_npn_user_agent:
-      break;
-    case action_npn_mem_alloc:
-      break;
-    case action_npn_mem_free:
-      break;
-    case action_npn_mem_flush:
-      break;
-    case action_npn_reload_plugins:
-      break;
-    case action_npn_get_java_env:
-      break;
-    case action_npn_get_java_peer:
-      break;
-    case action_npn_get_value:
-      plis->arg3.iLength = sizeof(DWORD);
-      plis->arg3.pData = new char[plis->arg3.iLength];
-      memcpy(plis->arg3.pData, (LPVOID)dw3, plis->arg3.iLength);
-      break;
-    case action_npn_set_value:
-      if(((NPPVariable)dw2 == NPPVpluginNameString) || ((NPPVariable)dw2 == NPPVpluginDescriptionString))
-      {
-        makeAbbreviatedString(szBuf, sizeof(szBuf), dw3, strlen((char *)dw3), iWrap);
-        plis->arg3.iLength = strlen(szBuf) + 1;
-        plis->arg3.pData = new char[plis->arg3.iLength];
-        memcpy(plis->arg3.pData, (LPVOID)&szBuf[0], plis->arg3.iLength);
-      }
-      else if(((NPPVariable)dw2 == NPPVpluginWindowBool) || ((NPPVariable)dw2 == NPPVpluginTransparentBool))
-      {
-        plis->arg3.iLength = sizeof(NPBool);
-        plis->arg3.pData = new char[plis->arg3.iLength];
-        memcpy(plis->arg3.pData, (LPVOID)dw3, plis->arg3.iLength);
-      }
-      else if((NPPVariable)dw2 == NPPVpluginWindowSize)
-      {
-        plis->arg3.iLength = sizeof(NPSize);
-        plis->arg3.pData = new char[plis->arg3.iLength];
-        memcpy(plis->arg3.pData, (LPVOID)dw3, plis->arg3.iLength);
-      }
-      break;
-    case action_npn_invalidate_rect:
-    {
-      plis->arg2.iLength = sizeof(NPRect);
-      plis->arg2.pData = new char[plis->arg2.iLength];
-      memcpy(plis->arg2.pData, (LPVOID)dw2, plis->arg2.iLength);
-      break;
-    }
-    case action_npn_invalidate_region:
-      break;
-    case action_npn_force_redraw:
-      break;
-
-    // NPP action
-    case action_npp_new:
-      plis->arg1.iLength = strlen((char *)dw1) + 1;
-      plis->arg1.pData = new char[plis->arg1.iLength];
-      memcpy(plis->arg1.pData, (LPVOID)dw1, plis->arg1.iLength);
-      break;
-    case action_npp_destroy:
-      plis->arg2.iLength = sizeof(DWORD);
-      plis->arg2.pData = new char[plis->arg2.iLength];
-      memcpy(plis->arg2.pData, (LPVOID)dw2, plis->arg2.iLength);
-      break;
-    case action_npp_set_window:
-      plis->arg2.iLength = sizeof(NPWindow);
-      plis->arg2.pData = new char[plis->arg2.iLength];
-      memcpy(plis->arg2.pData, (LPVOID)dw2, plis->arg2.iLength);
-      break;
-    case action_npp_new_stream:
-      plis->arg2.iLength = strlen((char *)dw2) + 1;
-      plis->arg2.pData = new char[plis->arg2.iLength];
-      memcpy(plis->arg2.pData, (LPVOID)dw2, plis->arg2.iLength);
-
-      plis->arg5.iLength = sizeof(uint16);
-      plis->arg5.pData = new char[plis->arg5.iLength];
-      memcpy(plis->arg5.pData, (LPVOID)dw5, plis->arg5.iLength);
-      break;
-    case action_npp_destroy_stream:
-      break;
-    case action_npp_stream_as_file:
-      plis->arg3.iLength = strlen((char *)dw3) + 1;
-      plis->arg3.pData = new char[plis->arg3.iLength];
-      memcpy(plis->arg3.pData, (LPVOID)dw3, plis->arg3.iLength);
-      break;
-    case action_npp_write_ready:
-      break;
-    case action_npp_write:
-    {
-      if(dw5 != 0L)
-      {
-        makeAbbreviatedString(szBuf, sizeof(szBuf), dw5, strlen((char *)dw5), iWrap);
-        plis->arg5.iLength = strlen(szBuf) + 1;
-        plis->arg5.pData = new char[plis->arg5.iLength];
-        memcpy(plis->arg5.pData, (LPVOID)&szBuf[0], plis->arg5.iLength);
-      }
-      break;
-    }
-    case action_npp_print:
-      break;
-    case action_npp_handle_event:
-      break;
-    case action_npp_url_notify:
-      plis->arg2.iLength = strlen((char *)dw2) + 1;
-      plis->arg2.pData = new char[plis->arg2.iLength];
-      memcpy(plis->arg2.pData, (LPVOID)dw2, plis->arg2.iLength);
-      break;
-    case action_npp_get_java_class:
-      break;
-    case action_npp_get_value:
-      break;
-    case action_npp_set_value:
-      break;
-
-    default:
-      break;
-  }
-
-  return plis;
-}
-
-void freeLogItemStruct(LogItemStruct * lis)
-{
-  if(lis)
-    delete lis;
-}
-
-int formatLogItem(LogItemStruct * plis, char * szOutput, BOOL bDOSStyle)
-{
-  int iRet = 0;
-  static char szString[1024];
-  static char szEOL[8];
-  static char szEOI[256];
-  static char szEndOfItem[] = "";
-
-  if(bDOSStyle)
-  {
-    strcpy(szEOL, "\r\n");
-    //strcpy(szEOI, szEndOfItem);
-    //strcat(szEOI, "\r\n");
-  }
-  else
-  {
-    strcpy(szEOL, "\n");
-    //strcpy(szEOI, szEndOfItem);
-    //strcat(szEOI, "\n");
-  }
-
-  szOutput[0] = '\0';
-
-  DWORD dw1 = plis->arg1.dwArg;
-  DWORD dw2 = plis->arg2.dwArg;
-  DWORD dw3 = plis->arg3.dwArg;
-  DWORD dw4 = plis->arg4.dwArg;
-  DWORD dw5 = plis->arg5.dwArg;
-  DWORD dw6 = plis->arg6.dwArg;
-  DWORD dw7 = plis->arg7.dwArg;
-
-  char sz1[1024] = {'\0'};
-  char sz2[1024] = {'\0'};
-  char sz3[1024] = {'\0'};
-  char sz4[1024] = {'\0'};
-  char sz5[1024] = {'\0'};
-  char sz6[1024] = {'\0'};
-
-  switch (plis->action)
-  {
-    case action_invalid:
-      break;
-
-    // NPN action
-    case action_npn_version:
-      if((plis->arg1.pData != NULL)&&(plis->arg2.pData != NULL)&&(plis->arg3.pData != NULL)&&(plis->arg4.pData != NULL))
-        sprintf(szString, "NPN_Version(%#08lx, %#08lx, %#08lx, %#08lx)%s", dw1,dw2,dw3,dw4,szEOL);
-      else
-        sprintf(szString, "NPN_Version(%#08lx, %#08lx, %#08lx, %#08lx)%s", dw1,dw2,dw3,dw4,szEOL);
-      break;
-    case action_npn_get_url_notify:
-    {
-      FormatPCHARArgument(sz2, sizeof(sz2), &plis->arg2);
-      FormatPCHARArgument(sz3, sizeof(sz3), &plis->arg3);
-      sprintf(szString, "NPN_GetURLNotify(%#08lx, %s, %s, %#08lx)%s", dw1,sz2,sz3,dw4,szEOL);
-      break;
-    }
-    case action_npn_get_url:
-    {
-      FormatPCHARArgument(sz2, sizeof(sz2), &plis->arg2);
-      FormatPCHARArgument(sz3, sizeof(sz3), &plis->arg3);
-      sprintf(szString, "NPN_GetURL(%#08lx, %s, %s)%s", dw1,sz2,sz3,szEOL);
-      break;
-    }
-    case action_npn_post_url_notify:
-    {
-      FormatPCHARArgument(sz2, sizeof(sz2), &plis->arg2);
-      FormatPCHARArgument(sz3, sizeof(sz3), &plis->arg3);
-      FormatPCHARArgument(sz5, sizeof(sz5), &plis->arg5);
-      FormatBOOLArgument(sz6, sizeof(sz6), &plis->arg6);
-
-      sprintf(szString, "NPN_PostURLNotify(%#08lx, %s, %s, %li, %s, %s, %#08lx)%s", 
-               dw1,sz2,sz3,(uint32)dw4,sz5,sz6,dw7,szEOL);
-      break;
-    }
-    case action_npn_post_url:
-    {
-      FormatPCHARArgument(sz2, sizeof(sz2), &plis->arg2);
-      FormatPCHARArgument(sz3, sizeof(sz3), &plis->arg3);
-      FormatPCHARArgument(sz5, sizeof(sz5), &plis->arg5);
-      FormatBOOLArgument(sz6, sizeof(sz6), &plis->arg6);
-
-      sprintf(szString, "NPN_PostURL(%#08lx, %s, %s, %li, %s, %s)%s", 
-               dw1,sz2,sz3,(uint32)dw4,sz5,sz6,szEOL);
-      break;
-    }
-    case action_npn_new_stream:
-    {
-      FormatPCHARArgument(sz2, sizeof(sz2), &plis->arg2);
-      FormatPCHARArgument(sz3, sizeof(sz3), &plis->arg3);
-      if(plis->arg4.pData != NULL)
-        sprintf(szString, "NPN_NewStream(%#08lx, %s, %s, %#08lx(%#08lx))%s", 
-                 dw1, sz2,sz3,dw4,*(DWORD *)plis->arg4.pData,szEOL);
-      else
-        sprintf(szString, "NPN_NewStream(%#08lx, \"%s\", \"%s\", %#08lx)%s", dw1, sz2,sz3,dw4,szEOL);
-      break;
-    }
-    case action_npn_destroy_stream:
-      sprintf(szString, "NPN_DestroyStream(%#08lx, %#08lx, %s)%s", dw1,dw2,FormatNPAPIReason((int)dw3),szEOL);
-      break;
-    case action_npn_request_read:
-      sprintf(szString, "NPN_RequestRead(%#08lx, %#08lx)%s", dw1, dw2, szEOL);
-      break;
-    case action_npn_write:
-    {
-      FormatPCHARArgument(sz4, sizeof(sz4), &plis->arg4);
-      sprintf(szString, "NPN_Write(%#08lx, %#08lx, %li, %s)%s", dw1, dw2, (int32)dw3, sz4, szEOL);
-      break;
-    }
-    case action_npn_status:
-    {
-      FormatPCHARArgument(sz2, sizeof(sz2), &plis->arg2);
-      sprintf(szString, "NPN_Status(%#08lx, %s)%s", dw1, sz2, szEOL);
-      break;
-    }
-    case action_npn_user_agent:
-      sprintf(szString, "NPN_UserAgent(%#08lx)%s", dw1, szEOL);
-      break;
-    case action_npn_mem_alloc:
-      sprintf(szString, "NPN_MemAlloc(%li)%s", dw1, szEOL);
-      break;
-    case action_npn_mem_free:
-      sprintf(szString, "NPN_MemFree(%#08lx)%s", dw1,szEOL);
-      break;
-    case action_npn_mem_flush:
-      sprintf(szString, "NPN_MemFlush(%li)%s", dw1, szEOL);
-      break;
-    case action_npn_reload_plugins:
-    {
-      FormatBOOLArgument(sz1, sizeof(sz1), &plis->arg1);
-      sprintf(szString, "NPN_ReloadPlugins(%s)%s", sz1,szEOL);
-      break;
-    }
-    case action_npn_get_java_env:
-      sprintf(szString, "NPN_GetJavaEnv()%s", szEOL);
-      break;
-    case action_npn_get_java_peer:
-      sprintf(szString, "NPN_GetJavaPeer(%#08lx)%s", dw1, szEOL);
-      break;
-    case action_npn_get_value:
-    {
-      switch(dw2)
-      {
-        case NPNVxDisplay:
-        case NPNVxtAppContext:
-        case NPNVnetscapeWindow:
-          if(dw3 != 0L)
-            sprintf(szString, "NPN_GetValue(%#08lx, %s, %#08lx(%#08lx))%s",dw1,FormatNPNVariable((NPNVariable)dw2),dw3,*(DWORD *)dw3,szEOL);
-          else
-            sprintf(szString, "NPN_GetValue(%#08lx, %s, %#08lx)%s",dw1,FormatNPNVariable((NPNVariable)dw2),dw3,szEOL);
-          break;
-        case NPNVjavascriptEnabledBool:
-        case NPNVasdEnabledBool:
-        case NPNVisOfflineBool:
-          if(dw3 != 0L)
-            sprintf(szString, "NPN_GetValue(%#08lx, %s, %#08lx(%s))%s",
-                     dw1,FormatNPNVariable((NPNVariable)dw2),dw3,
-                     (((NPBool)*(DWORD *)dw3) == TRUE) ? "TRUE" : "FALSE", szEOL);
-          else
-            sprintf(szString, "NPN_GetValue(%#08lx, %s, %#08lx)%s",dw1,FormatNPNVariable((NPNVariable)dw2),dw3,szEOL);
-          break;
-        default:
-          break;
-      }
-      break;
-    }
-    case action_npn_set_value:
-
-      if(((NPPVariable)dw2 == NPPVpluginNameString) || ((NPPVariable)dw2 == NPPVpluginDescriptionString))
-      {
-        FormatPCHARArgument(sz3, sizeof(sz3), &plis->arg3);
-        sprintf(szString, "NPN_SetValue(%#08lx, %s, %s)%s", dw1,FormatNPPVariable((NPPVariable)dw2),sz3,szEOL);
-      }
-      else if(((NPPVariable)dw2 == NPPVpluginWindowBool) || ((NPPVariable)dw2 == NPPVpluginTransparentBool))
-      {
-        FormatPBOOLArgument(sz3, sizeof(sz3), &plis->arg3);
-        sprintf(szString, "NPN_SetValue(%#08lx, %s, %s)%s", 
-                 dw1,FormatNPPVariable((NPPVariable)dw2),sz3,szEOL);
-      }
-      else if((NPPVariable)dw2 == NPPVpluginWindowSize)
-      {
-        if(plis->arg3.pData != NULL)
-        {
-          int32 iWidth = ((NPSize *)plis->arg3.pData)->width;
-          int32 iHeight = ((NPSize *)plis->arg3.pData)->height;
-          sprintf(szString, "NPN_SetValue(%#08lx, %s, %#08lx(%li,%li))%s", 
-                   dw1,FormatNPPVariable((NPPVariable)dw2),dw3,iWidth,iHeight,szEOL);
-        }
-        else
-          sprintf(szString, "NPN_SetValue(%#08lx, %s, %#08lx(?,?))%s", 
-                   dw1,FormatNPPVariable((NPPVariable)dw2),dw3,szEOL);
-      }
-      else
-        sprintf(szString, "NPN_SetValue(%#08lx, %s, %#08lx(What is it?))%s", dw1,FormatNPPVariable((NPPVariable)dw2),dw3,szEOL);
-      break;
-    case action_npn_invalidate_rect:
-    {
-      if(plis->arg2.pData != NULL)
-      {
-        uint16 top    = ((NPRect *)plis->arg2.pData)->top;
-        uint16 left   = ((NPRect *)plis->arg2.pData)->left;
-        uint16 bottom = ((NPRect *)plis->arg2.pData)->bottom;
-        uint16 right  = ((NPRect *)plis->arg2.pData)->right;
-        sprintf(szString, "NPN_InvalidateRect(%#08lx, %#08lx(%u,%u;%u,%u)%s", dw1,dw2,top,left,bottom,right,szEOL);
-      }
-      else
-        sprintf(szString, "NPN_InvalidateRect(%#08lx, %#08lx(?,?,?,?)%s", dw1,dw2,szEOL);
-      break;
-    }
-    case action_npn_invalidate_region:
-      sprintf(szString, "NPN_InvalidateRegion(%#08lx, %#08lx)%s", dw1,dw2,szEOL);
-      break;
-    case action_npn_force_redraw:
-      sprintf(szString, "NPN_ForceRedraw(%#08lx)%s", dw1,szEOL);
-      break;
-
-    // NPP action
-    case action_npp_new:
-    {
-      char szMode[16];
-      switch (dw3)
-      {
-        case NP_EMBED:
-          strcpy(szMode, "NP_EMBED");
-          break;
-        case NP_FULL:
-          strcpy(szMode, "NP_FULL");
-          break;
-        default:
-          strcpy(szMode, "[Invalid mode]");
-          break;
-      }
-      sprintf(szString, "NPP_New(\"%s\", %#08lx, %s, %i, %#08lx, %#08lx, %#08lx)%s", 
-               (char *)dw1,dw2,szMode,(int)dw4,dw5,dw6,dw7,szEOL);
-      break;
-    }
-    case action_npp_destroy:
-      sprintf(szString, "NPP_Destroy(%#08lx, %#08lx(%#08lx))%s", dw1, dw2, *(DWORD *)plis->arg2.pData,szEOL);
-      break;
-    case action_npp_set_window:
-    {
-      char szWindow[512];
-
-      if(plis->arg2.pData != NULL)
-      {
-        char szType[80];
-        switch (((NPWindow*)plis->arg2.pData)->type)
-        {
-          case NPWindowTypeWindow:
-            sprintf(szType, "NPWindowTypeWindow");
-            break;
-          case NPWindowTypeDrawable:
-            sprintf(szType, "NPWindowTypeDrawable");
-            break;
-          default:
-            sprintf(szType, "[Unlisted type]");
-            break;
-        }
-        sprintf(szWindow, "NPWindow: %#08lx, (%li,%li), (%li,%li), (%i,%i,%i,%i), %s", 
-                 ((NPWindow*)plis->arg2.pData)->window, 
-                 ((NPWindow*)plis->arg2.pData)->x, 
-                 ((NPWindow*)plis->arg2.pData)->y, 
-                 ((NPWindow*)plis->arg2.pData)->width, 
-                 ((NPWindow*)plis->arg2.pData)->height, 
-                 ((NPWindow*)plis->arg2.pData)->clipRect.top, 
-                 ((NPWindow*)plis->arg2.pData)->clipRect.left, 
-                 ((NPWindow*)plis->arg2.pData)->clipRect.bottom, 
-                 ((NPWindow*)plis->arg2.pData)->clipRect.right, szType);
-        sprintf(szString, "NPP_SetWindow(%#08lx, %#08lx)%s%s%s", dw1,dw2," ",szWindow,szEOL);
-      }
-      else
-        sprintf(szString, "NPP_SetWindow(%#08lx, %#08lx)%s", dw1,dw2,szEOL);
-
-      break;
-    }
-    case action_npp_new_stream:
-    {
-      switch (*(int16 *)plis->arg5.pData)
-      {
-        case NP_NORMAL:
-          sprintf(sz5, "NP_NORMAL");
-          break;
-        case NP_ASFILEONLY:
-          sprintf(sz5, "NP_ASFILEONLY");
-          break;
-        case NP_ASFILE:
-          sprintf(sz5, "NP_ASFILE");
-          break;
-        default:
-          sprintf(sz5, "[Unlisted type]");
-          break;
-      }
-      FormatPCHARArgument(sz2, sizeof(sz2), &plis->arg2);
-      sprintf(szString, "NPP_NewStream(%#08lx, %s, %#08lx, %s, %s)%s", dw1, sz2, dw3, 
-               ((NPBool)dw4 == TRUE) ? "TRUE" : "FALSE", sz5, szEOL);
-      break;
-    }
-    case action_npp_destroy_stream:
-      sprintf(szString, "NPP_DestroyStream(%#08lx, %#08lx, %s)%s", dw1,dw2,FormatNPAPIReason((int)dw3),szEOL);
-      break;
-    case action_npp_stream_as_file:
-      FormatPCHARArgument(sz3, sizeof(sz3), &plis->arg3);
-      sprintf(szString, "NPP_StreamAsFile(%#08lx, %#08lx, %s)%s", dw1,dw2,sz3,szEOL);
-      break;
-    case action_npp_write_ready:
-      sprintf(szString, "NPP_WriteReady(%#08lx, %#08lx)%s", dw1,dw2,szEOL);
-      break;
-    case action_npp_write:
-    {
-      FormatPCHARArgument(sz5, sizeof(sz5), &plis->arg5);
-      sprintf(szString, "NPP_Write(%#08lx, %#08lx, %li, %li, %s))%s",dw1,dw2,dw3,dw4,sz5,szEOL);
-      break;
-    }
-    case action_npp_print:
-      sprintf(szString, "NPP_Print(%#08lx, %#08lx)%s", dw1, dw2,szEOL);
-      break;
-    case action_npp_handle_event:
-      sprintf(szString, "NPP_HandleEvent(%#08lx, %#08lx)%s", dw1,dw2,szEOL);
-      break;
-    case action_npp_url_notify:
-    {
-      FormatPCHARArgument(sz2, sizeof(sz2), &plis->arg2);
-      sprintf(szString, "NPP_URLNotify(%#08lx, %s, %s, %#08lx)%s", dw1,sz2,FormatNPAPIReason((int)dw3),dw4,szEOL);
-      break;
-    }
-    case action_npp_get_java_class:
-      sprintf(szString, "NPP_GetJavaClass()%s",szEOL);
-      break;
-    case action_npp_get_value:
-      sprintf(szString, "NPP_GetValue(%#08lx, %s, %#08lx)%s", dw1,FormatNPPVariable((NPPVariable)dw2),dw3,szEOL);
-      break;
-    case action_npp_set_value:
-      sprintf(szString, "NPP_SetValue(%#08lx, %s, %#08lx)%s", dw1,FormatNPNVariable((NPNVariable)dw2),dw3,szEOL);
-      break;
-
-    default:
-      sprintf(szString, "Unknown action%s",szEOL);
-      break;
-  }
-  strcat(szOutput, szString);
-  strcat(szOutput, szEOI);
-  iRet = strlen(szString) + strlen(szEOI) + 1;
-  return iRet;
-}
deleted file mode 100644
--- a/modules/plugin/tools/spy/common/logfile.cpp
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "xp.h"
-
-#include "logfile.h"
-#include "plugload.h"
-
-CLogFile::CLogFile() :
-  hFile(NULL)
-{
-  szFileName[0] = '\0';
-}
-
-CLogFile::~CLogFile()
-{
-  if(hFile != NULL)
-    close();
-}
-
-BOOL CLogFile::create(char * filename, BOOL delete_existing)
-{
-  strcpy(szFileName, filename);
-
-  if(!delete_existing && XP_IsFile(szFileName))
-      return FALSE;
-
-  hFile = XP_CreateFile(szFileName);
-  return (hFile != NULL);
-}
-
-void CLogFile::close()
-{
-  if(hFile != NULL)
-  {
-    XP_CloseFile(hFile);
-    hFile = NULL;
-  }
-}
-
-DWORD CLogFile::write(char * buf)
-{
-  return XP_WriteFile(hFile, buf, strlen(buf));
-}
-
-void CLogFile::flush()
-{
-  XP_FlushFileBuffers(hFile);
-}
deleted file mode 100644
--- a/modules/plugin/tools/spy/common/logger.cpp
+++ /dev/null
@@ -1,395 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "xp.h"
-
-#include "logger.h"
-#include "profile.h"
-#include "plugload.h"
-
-Logger::Logger() :
-  bMutedAll(FALSE),
-  bOnTop(TRUE),
-  bToWindow(TRUE),
-  bToConsole(FALSE),
-  bToFile(FALSE),
-  bSPALID(FALSE)
-{
-  if(0 != GetPluginsDir(szFile, strlen(szFile)))
-  {
-    strcat(szFile, DIR_SEPARATOR);
-    strcat(szFile, DEFAULT_LOG_FILE_NAME);
-  }
-  else
-    szFile[0] = '\0';
-
-  for(int i = 0; i < sizeof(bMutedCalls)/sizeof(BOOL); i++)
-    bMutedCalls[i] = FALSE;
-  
-  bMutedCalls[action_npn_mem_alloc] = TRUE;
-  bMutedCalls[action_npn_mem_free]  = TRUE;
-  bMutedCalls[action_npn_mem_flush] = TRUE;
-}
-
-Logger::~Logger()
-{
-}
-
-BOOL Logger::init()
-{
-  if(bToFile)
-    filer.create(szFile, TRUE);
-
-  return TRUE;
-}
-
-void Logger::shut()
-{
-  filer.close();
-}
-
-#define MAX_OUTPUT_SIZE 8192
-
-void Logger::logNS_NP_GetEntryPoints()
-{
-  char szLog[] = "NP_GetEntryPoints by Netscape\r\n";
-
-  if(bToConsole)
-    printf("%s", szLog);
-  
-  if(bToFile)
-    filer.write(szLog);
-
-  if(bToWindow)
-    dumpStringToMainWindow(szLog);
-}
-
-void Logger::logNS_NP_Initialize()
-{
-  char szLog[] = "NP_Initialize by Netscape\r\n";
-
-  if(bToConsole)
-    printf("%s", szLog);
-  
-  if(bToFile)
-    filer.write(szLog);
-
-  if(bToWindow)
-    dumpStringToMainWindow(szLog);
-}
-
-void Logger::logNS_NP_Shutdown()
-{
-  char szLog[] = "NP_Shutdown by Netscape\r\n";
-
-  if(bToConsole)
-    printf("%s", szLog);
-  
-  if(bToFile)
-    filer.write(szLog);
-
-  if(bToWindow)
-    dumpStringToMainWindow(szLog);
-}
-
-void Logger::logSPY_NP_GetEntryPoints(NPPluginFuncs * pNPPFuncs)
-{
-  char szLog[80] = "NP_GetEntryPoints by NPSpy\r\n";
-
-  if(bToConsole)
-    printf("%s", szLog);
-  
-  if(bToFile)
-    filer.write(szLog);
-
-  if(bToWindow)
-    dumpStringToMainWindow(szLog);
-
-  if(!pNPPFuncs)
-    return;
-
-  char szLog1[80],szLog2[80],szLog3[80],szLog4[80],szLog5[80],szLog6[80],szLog7[80],
-       szLog8[80],szLog9[80],szLog10[80],szLog11[80],szLog12[80],szLog13[80],szLog14[80],
-       szLog15[80],szLog16[80],szLog17[80],szLog18[80],szLog19[80],szLog20[80];
-
-  sprintf(szLog1, "\r\n");
-  sprintf(szLog2, "     Plugin entry point table\r\n");
-  sprintf(szLog3, "     ========================\r\n");
-
-  if(pNPPFuncs->size)
-    sprintf(szLog4, "    size          = %i\r\n", pNPPFuncs->size);
-  else
-    sprintf(szLog4, "    size          = not set!\r\n");
-
-  if(pNPPFuncs->version)
-    sprintf(szLog5, "    version       = %i\r\n", pNPPFuncs->version);
-  else
-    sprintf(szLog5, "    version       = not set!\r\n");
-  
-  if(pNPPFuncs->newp)
-    sprintf(szLog6, "    newp          = %#08lx\r\n", pNPPFuncs->newp);
-  else
-    sprintf(szLog6, "    newp          = not set!\r\n");
-  
-  if(pNPPFuncs->destroy)
-    sprintf(szLog7, "    destroy       = %#08lx\r\n", pNPPFuncs->destroy);
-  else
-    sprintf(szLog7, "    destroy       = not set!\r\n");
-  
-  if(pNPPFuncs->setwindow)
-    sprintf(szLog8, "    setwindow     = %#08lx\r\n", pNPPFuncs->setwindow);
-  else
-    sprintf(szLog8, "    setwindow     = not set!\r\n");
-  
-  if(pNPPFuncs->newstream)
-    sprintf(szLog9, "    newstream     = %#08lx\r\n", pNPPFuncs->newstream);
-  else
-    sprintf(szLog9, "    newstream     = not set!\r\n");
-  
-  if(pNPPFuncs->destroystream)
-    sprintf(szLog10, "    destroystream = %#08lx\r\n", pNPPFuncs->destroystream);
-  else
-    sprintf(szLog10, "    destroystream = not set!\r\n");
-  
-  if(pNPPFuncs->asfile)
-    sprintf(szLog11, "    asfile        = %#08lx\r\n", pNPPFuncs->asfile);
-  else
-    sprintf(szLog11, "    asfile        = not set!\r\n");
-  
-  if(pNPPFuncs->writeready)
-    sprintf(szLog12, "    writeready    = %#08lx\r\n", pNPPFuncs->writeready);
-  else
-    sprintf(szLog12, "    writeready    = not set!\r\n");
-  
-  if(pNPPFuncs->write)
-    sprintf(szLog13, "    write         = %#08lx\r\n", pNPPFuncs->write);
-  else
-    sprintf(szLog13, "    write         = not set!\r\n");
-  
-  if(pNPPFuncs->print)
-    sprintf(szLog14, "    print         = %#08lx\r\n", pNPPFuncs->print);
-  else
-    sprintf(szLog14, "    print         = not set!\r\n");
-  
-  if(pNPPFuncs->event)
-    sprintf(szLog15, "    event         = %#08lx\r\n", pNPPFuncs->event);
-  else
-    sprintf(szLog15, "    event         = not set!\r\n");
-  
-  if(pNPPFuncs->urlnotify)
-    sprintf(szLog16, "    urlnotify     = %#08lx\r\n", pNPPFuncs->urlnotify);
-  else
-    sprintf(szLog16, "    urlnotify     = not set!\r\n");
-  
-  if(pNPPFuncs->javaClass)
-    sprintf(szLog17, "    javaClass     = %#08lx\r\n", pNPPFuncs->javaClass);
-  else
-    sprintf(szLog17, "    javaClass     = not set!\r\n");
-  
-  if(pNPPFuncs->getvalue)
-    sprintf(szLog18, "    getvalue      = %#08lx\r\n", pNPPFuncs->getvalue);
-  else
-    sprintf(szLog18, "    getvalue      = not set!\r\n");
-  
-  if(pNPPFuncs->setvalue)
-    sprintf(szLog19, "    setvalue      = %#08lx\r\n", pNPPFuncs->setvalue);
-  else
-    sprintf(szLog19, "    setvalue      = not set!\r\n");
-
-  sprintf(szLog20, "\r\n");
-
-  if(bToConsole)
-  {
-    printf("%s", szLog1); printf("%s", szLog2); printf("%s", szLog3); printf("%s", szLog4);
-    printf("%s", szLog5); printf("%s", szLog6); printf("%s", szLog7); printf("%s", szLog8);
-    printf("%s", szLog9); printf("%s", szLog10); printf("%s", szLog11); printf("%s", szLog12);
-    printf("%s", szLog13); printf("%s", szLog14); printf("%s", szLog15); printf("%s", szLog16);
-    printf("%s", szLog17); printf("%s", szLog18); printf("%s", szLog19); printf("%s", szLog20);
-  }
-  
-  if(bToFile)
-  {
-    filer.write(szLog1); filer.write(szLog2); filer.write(szLog3); filer.write(szLog4);
-    filer.write(szLog5); filer.write(szLog6); filer.write(szLog7); filer.write(szLog8);
-    filer.write(szLog9); filer.write(szLog10); filer.write(szLog11); filer.write(szLog12);
-    filer.write(szLog13); filer.write(szLog14); filer.write(szLog15); filer.write(szLog16);
-    filer.write(szLog17); filer.write(szLog18); filer.write(szLog19); filer.write(szLog20);
-  }
-  
-  if(bToWindow)
-  {
-    dumpStringToMainWindow(szLog1); dumpStringToMainWindow(szLog2);
-    dumpStringToMainWindow(szLog3); dumpStringToMainWindow(szLog4);
-    dumpStringToMainWindow(szLog5); dumpStringToMainWindow(szLog6);
-    dumpStringToMainWindow(szLog7); dumpStringToMainWindow(szLog8);
-    dumpStringToMainWindow(szLog9); dumpStringToMainWindow(szLog10);
-    dumpStringToMainWindow(szLog11); dumpStringToMainWindow(szLog12);
-    dumpStringToMainWindow(szLog13); dumpStringToMainWindow(szLog14);
-    dumpStringToMainWindow(szLog15); dumpStringToMainWindow(szLog16);
-    dumpStringToMainWindow(szLog17); dumpStringToMainWindow(szLog18);
-    dumpStringToMainWindow(szLog19); dumpStringToMainWindow(szLog20);
-  }
-}
-
-void Logger::logSPY_NP_Initialize()
-{
-  char szLog[] = "NP_Initialize by NPSpy\r\n";
-
-  if(bToConsole)
-    printf("%s", szLog);
-  
-  if(bToFile)
-    filer.write(szLog);
-
-  if(bToWindow)
-    dumpStringToMainWindow(szLog);
-}
-
-void Logger::logSPY_NP_Shutdown(char * mimetype)
-{
-  char szLog[512] = "NP_Shutdown by NPSpy\r\n";
-  if(mimetype)
-  {
-    strcat(szLog, " for \"");
-    strcat(szLog, mimetype);
-    strcat(szLog, "\"");
-  }
-
-  if(bToConsole)
-    printf("%s", szLog);
-  
-  if(bToFile)
-    filer.write(szLog);
-
-  if(bToWindow)
-    dumpStringToMainWindow(szLog);
-}
-
-void Logger::logCall(NPAPI_Action action, DWORD dw1, DWORD dw2, DWORD dw3, DWORD dw4, DWORD dw5, DWORD dw6, DWORD dw7)
-{
-  if(isMuted(action))
-    return;
-
-  static char szLog[512];
-
-  LogItemStruct * lis = makeLogItemStruct(action, dw1, dw2, dw3, dw4, dw5, dw6, dw7);
-  int iLength = formatLogItem(lis, szLog, TRUE);
-  freeLogItemStruct(lis);
-
-  if(bToConsole)
-    printf("%s", szLog);
-  
-  if(bToFile)
-    filer.write(szLog);
-
-  if(bToWindow)
-    dumpStringToMainWindow(szLog);
-}
-
-void Logger::logReturn(DWORD dwRet)
-{
-}
-
-void Logger::setOnTop(BOOL ontop)
-{
-  bOnTop = ontop;
-}
-
-void Logger::setToFile(BOOL tofile, char * filename)
-{
-  if(!filename || !*filename || (strlen(filename) > _MAX_PATH))
-  {
-    bToFile = FALSE;
-    return;
-  }
-
-  //don't screw up the file on false call
-  BOOL samefile = (stricmp(szFile, filename) == 0);
-  BOOL sameaction = (bToFile == tofile);
-  
-  if(sameaction)
-  {
-    if(samefile)
-      return;
-
-    strcpy(szFile, filename);
-
-    if(bToFile)
-    {
-      filer.close();
-      filer.create(szFile, TRUE);
-    }
-  }
-
-  if(!sameaction)
-  {
-    bToFile = tofile;
-
-    if(!samefile)
-      strcpy(szFile, filename);
-
-    if(bToFile)
-      filer.create(szFile, TRUE);
-    else
-      filer.close();
-  }
-}
-
-BOOL Logger::isMuted(NPAPI_Action action)
-{
-  if(bMutedAll)
-    return TRUE;
-
-  if(action >= TOTAL_NUMBER_OF_API_CALLS)
-  {
-    assert(0);
-    return FALSE;
-  }
-
-  return bMutedCalls[action];
-}
-
-BOOL * Logger::getMutedCalls()
-{
-  return &bMutedCalls[0];
-}
-
-void Logger::setMutedCalls(BOOL * mutedcalls)
-{
-  for(int i = 0; i < sizeof(bMutedCalls)/sizeof(BOOL); i++)
-    bMutedCalls[i] = mutedcalls[i];
-}
deleted file mode 100644
--- a/modules/plugin/tools/spy/common/np_entry.cpp
+++ /dev/null
@@ -1,169 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "xp.h"
-
-#include "npapi.h"
-#include "npupp.h"
-#include "epmanager.h"
-#include "logger.h"
-
-// we need to keep track of different plugins and different instances
-// of the same plugin when we call NPP functions, so that we always
-// call the right ones. Entry point manager will take care of it.
-NPPEntryPointManager * epManager = NULL;
-
-Logger * logger = NULL;
-
-NPNetscapeFuncs NPNFuncs;
-
-NPError WINAPI NP_GetEntryPoints(NPPluginFuncs* pFuncs)
-{
-  // create the logger
-  if(!logger)
-  {
-    logger = NewLogger();
-    if(logger)
-    {
-      logger->platformInit();
-      logger->init();
-    }
-  }
-
-  if(logger)
-    logger->logNS_NP_GetEntryPoints();
-
-  if(pFuncs == NULL)
-    return NPERR_INVALID_FUNCTABLE_ERROR;
-
-  if(pFuncs->size < sizeof(NPPluginFuncs))
-    return NPERR_INVALID_FUNCTABLE_ERROR;
-
-  pFuncs->version       = (NP_VERSION_MAJOR << 8) | NP_VERSION_MINOR;
-  pFuncs->newp          = NPP_New;
-  pFuncs->destroy       = NPP_Destroy;
-  pFuncs->setwindow     = NPP_SetWindow;
-  pFuncs->newstream     = NPP_NewStream;
-  pFuncs->destroystream = NPP_DestroyStream;
-  pFuncs->asfile        = NPP_StreamAsFile;
-  pFuncs->writeready    = NPP_WriteReady;
-  pFuncs->write         = NPP_Write;
-  pFuncs->print         = NPP_Print;
-  pFuncs->event         = NPP_HandleEvent;
-  pFuncs->urlnotify     = NPP_URLNotify;
-  pFuncs->getvalue      = NPP_GetValue;
-  pFuncs->setvalue      = NPP_SetValue;
-  pFuncs->javaClass     = NULL;
-
-  return NPERR_NO_ERROR;
-}
-
-NPError WINAPI NP_Initialize(NPNetscapeFuncs* pFuncs)
-{
-  // create the logger
-  if(!logger)
-  {
-    logger = NewLogger();
-    if(logger)
-    {
-      logger->platformInit();
-      logger->init();
-    }
-  }
-
-  if(logger)
-    logger->logNS_NP_Initialize();
-
-  if(pFuncs == NULL)
-    return NPERR_INVALID_FUNCTABLE_ERROR;
-
-  if(HIBYTE(pFuncs->version) > NP_VERSION_MAJOR)
-    return NPERR_INCOMPATIBLE_VERSION_ERROR;
-
-  if(pFuncs->size < sizeof NPNetscapeFuncs)
-    return NPERR_INVALID_FUNCTABLE_ERROR;
-
-  NPNFuncs.size             = pFuncs->size;
-  NPNFuncs.version          = pFuncs->version;
-  NPNFuncs.geturlnotify     = pFuncs->geturlnotify;
-  NPNFuncs.geturl           = pFuncs->geturl;
-  NPNFuncs.posturlnotify    = pFuncs->posturlnotify;
-  NPNFuncs.posturl          = pFuncs->posturl;
-  NPNFuncs.requestread      = pFuncs->requestread;
-  NPNFuncs.newstream        = pFuncs->newstream;
-  NPNFuncs.write            = pFuncs->write;
-  NPNFuncs.destroystream    = pFuncs->destroystream;
-  NPNFuncs.status           = pFuncs->status;
-  NPNFuncs.uagent           = pFuncs->uagent;
-  NPNFuncs.memalloc         = pFuncs->memalloc;
-  NPNFuncs.memfree          = pFuncs->memfree;
-  NPNFuncs.memflush         = pFuncs->memflush;
-  NPNFuncs.reloadplugins    = pFuncs->reloadplugins;
-  NPNFuncs.getJavaEnv       = NULL;
-  NPNFuncs.getJavaPeer      = NULL;
-  NPNFuncs.getvalue         = pFuncs->getvalue;
-  NPNFuncs.setvalue         = pFuncs->setvalue;
-  NPNFuncs.invalidaterect   = pFuncs->invalidaterect;
-  NPNFuncs.invalidateregion = pFuncs->invalidateregion;
-  NPNFuncs.forceredraw      = pFuncs->forceredraw;
-
-  // create entry point manager for real plugins
-  epManager = new NPPEntryPointManager();
-  if(!epManager)
-    return NPERR_GENERIC_ERROR;
-
-  return NPERR_NO_ERROR;
-}
-
-NPError WINAPI NP_Shutdown()
-{
-  // should be safe because if they've already been called shutdown procs must be NULL
-  if(epManager)
-    epManager->callNP_ShutdownAll(); // this will log the action
-
-  if(logger)
-  {
-    logger->shut();
-    logger->platformShut();
-    DeleteLogger(logger);
-    logger = NULL;
-  }
-
-  delete epManager;
-
-  return NPERR_NO_ERROR;
-}
deleted file mode 100644
--- a/modules/plugin/tools/spy/common/npn_gate.cpp
+++ /dev/null
@@ -1,320 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "xp.h"
-
-#include "npapi.h"
-#include "npupp.h"
-
-#include "logger.h"
-
-extern Logger * logger;
-extern NPNetscapeFuncs NPNFuncs;
-
-void NPN_Version(int* plugin_major, int* plugin_minor, int* netscape_major, int* netscape_minor)
-{
-  if(logger)
-    logger->logCall(action_npn_version, (DWORD)plugin_major, (DWORD)plugin_minor, (DWORD)netscape_major, (DWORD)netscape_minor);
-
-  *plugin_major   = NP_VERSION_MAJOR;
-  *plugin_minor   = NP_VERSION_MINOR;
-  *netscape_major = HIBYTE(NPNFuncs.version);
-  *netscape_minor = LOBYTE(NPNFuncs.version);
-
-  if(logger)
-    logger->logReturn();
-}
-
-NPError NPN_GetURLNotify(NPP instance, const char *url, const char *target, void* notifyData)
-{
-	int navMinorVers = NPNFuncs.version & 0xFF;
-	
-  NPError rv = NPERR_NO_ERROR;
-
-  if(logger)
-    logger->logCall(action_npn_get_url_notify, (DWORD)instance, (DWORD)url, (DWORD)target, (DWORD)notifyData);
-
-  if( navMinorVers >= NPVERS_HAS_NOTIFICATION )
-		rv = NPNFuncs.geturlnotify(instance, url, target, notifyData);
-	else
-		rv = NPERR_INCOMPATIBLE_VERSION_ERROR;
-
-  if(logger)
-    logger->logReturn();
-
-  return rv;
-}
-
-NPError NPN_GetURL(NPP instance, const char *url, const char *target)
-{
-  if(logger)
-    logger->logCall(action_npn_get_url, (DWORD)instance, (DWORD)url, (DWORD)target);
-
-  NPError rv = NPNFuncs.geturl(instance, url, target);
-
-  if(logger)
-    logger->logReturn();
-
-  return rv;
-}
-
-NPError NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file, void* notifyData)
-{
-	int navMinorVers = NPNFuncs.version & 0xFF;
-
-  NPError rv = NPERR_NO_ERROR;
-
-  if(logger)
-    logger->logCall(action_npn_post_url_notify, (DWORD)instance, (DWORD)url, (DWORD)window, (DWORD)len, (DWORD)buf, (DWORD)file, (DWORD)notifyData);
-
-	if( navMinorVers >= NPVERS_HAS_NOTIFICATION )
-		rv = NPNFuncs.posturlnotify(instance, url, window, len, buf, file, notifyData);
-	else
-		rv = NPERR_INCOMPATIBLE_VERSION_ERROR;
-
-  if(logger)
-    logger->logReturn();
-
-  return rv;
-}
-
-NPError NPN_PostURL(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file)
-{
-  if(logger)
-    logger->logCall(action_npn_post_url, (DWORD)instance, (DWORD)url, (DWORD)window, (DWORD)len, (DWORD)buf, (DWORD)file);
-
-  NPError rv = NPNFuncs.posturl(instance, url, window, len, buf, file);
-
-  if(logger)
-    logger->logReturn();
-
-  return rv;
-} 
-
-NPError NPN_RequestRead(NPStream* stream, NPByteRange* rangeList)
-{
-  if(logger)
-    logger->logCall(action_npn_request_read, (DWORD)stream, (DWORD)rangeList);
-
-  NPError rv = NPNFuncs.requestread(stream, rangeList);
-
-  if(logger)
-    logger->logReturn();
-
-  return rv;
-}
-
-NPError NPN_NewStream(NPP instance, NPMIMEType type, const char* target, NPStream** stream)
-{
-	int navMinorVersion = NPNFuncs.version & 0xFF;
-
-  NPError rv = NPERR_NO_ERROR;
-
-  if(logger)
-    logger->logCall(action_npn_new_stream, (DWORD)instance, (DWORD)type, (DWORD)target, (DWORD)stream);
-
-	if( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT )
-		rv = NPNFuncs.newstream(instance, type, target, stream);
-	else
-		rv = NPERR_INCOMPATIBLE_VERSION_ERROR;
-
-  if(logger)
-    logger->logReturn();
-
-  return rv;
-}
-
-int32 NPN_Write(NPP instance, NPStream *stream, int32 len, void *buffer)
-{
-	int navMinorVersion = NPNFuncs.version & 0xFF;
-
-  int32 rv = 0;
-
-  if(logger)
-    logger->logCall(action_npn_write, (DWORD)instance, (DWORD)stream, (DWORD)len, (DWORD)buffer);
-
-  if( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT )
-		rv = NPNFuncs.write(instance, stream, len, buffer);
-	else
-		rv = -1;
-
-  if(logger)
-    logger->logReturn();
-
-  return rv;
-}
-
-NPError NPN_DestroyStream(NPP instance, NPStream* stream, NPError reason)
-{
-	int navMinorVersion = NPNFuncs.version & 0xFF;
-
-  NPError rv = NPERR_NO_ERROR;
-
-  if(logger)
-    logger->logCall(action_npn_destroy_stream, (DWORD)instance, (DWORD)stream, (DWORD)reason);
-
-  if( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT )
-		rv = NPNFuncs.destroystream(instance, stream, reason);
-	else
-		rv = NPERR_INCOMPATIBLE_VERSION_ERROR;
-
-  if(logger)
-    logger->logReturn();
-
-  return rv;
-}
-
-void NPN_Status(NPP instance, const char *message)
-{
-  if(logger)
-    logger->logCall(action_npn_status, (DWORD)instance, (DWORD)message);
-
-  NPNFuncs.status(instance, message);
-}
-
-const char* NPN_UserAgent(NPP instance)
-{
-  const char * rv = NULL;
-
-  if(logger)
-    logger->logCall(action_npn_user_agent, (DWORD)instance);
-
-  rv = NPNFuncs.uagent(instance);
-
-  if(logger)
-    logger->logReturn();
-
-  return rv;
-}
-
-void* NPN_MemAlloc(uint32 size)
-{
-  void * rv = NULL;
-  
-  if(logger)
-    logger->logCall(action_npn_mem_alloc, (DWORD)size);
-
-  rv = NPNFuncs.memalloc(size);
-
-  if(logger)
-    logger->logReturn();
-
-  return rv;
-}
-
-void NPN_MemFree(void* ptr)
-{
-  if(logger)
-    logger->logCall(action_npn_mem_free, (DWORD)ptr);
-
-  NPNFuncs.memfree(ptr);
-}
-
-uint32 NPN_MemFlush(uint32 size)
-{
-  if(logger)
-    logger->logCall(action_npn_mem_flush, (DWORD)size);
-
-  uint32 rv = NPNFuncs.memflush(size);
-
-  if(logger)
-    logger->logReturn();
-
-  return rv;
-}
-
-void NPN_ReloadPlugins(NPBool reloadPages)
-{
-  if(logger)
-    logger->logCall(action_npn_reload_plugins, (DWORD)reloadPages);
-
-  NPNFuncs.reloadplugins(reloadPages);
-}
-
-NPError NPN_GetValue(NPP instance, NPNVariable variable, void *value)
-{
-  NPError rv = NPERR_NO_ERROR;
-
-  if(logger)
-    logger->logCall(action_npn_get_value, (DWORD)instance, (DWORD)variable, (DWORD)value);
-
-  rv = NPNFuncs.getvalue(instance, variable, value);
-
-  if(logger)
-    logger->logReturn(action_npn_get_value);
-
-  return rv;
-}
-
-NPError NPN_SetValue(NPP instance, NPPVariable variable, void *value)
-{
-  NPError rv = NPERR_NO_ERROR;
-
-  if(logger)
-    logger->logCall(action_npn_set_value, (DWORD)instance, (DWORD)variable, (DWORD)value);
-
-  rv = NPNFuncs.setvalue(instance, variable, value);
-
-  if(logger)
-    logger->logReturn();
-
-  return rv;
-}
-
-void NPN_InvalidateRect(NPP instance, NPRect *invalidRect)
-{
-  if(logger)
-    logger->logCall(action_npn_invalidate_rect, (DWORD)instance, (DWORD)invalidRect);
-
-  NPNFuncs.invalidaterect(instance, invalidRect);
-}
-
-void NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion)
-{
-  if(logger)
-    logger->logCall(action_npn_invalidate_region, (DWORD)instance, (DWORD)invalidRegion);
-
-  NPNFuncs.invalidateregion(instance, invalidRegion);
-}
-
-void NPN_ForceRedraw(NPP instance)
-{
-  if(logger)
-    logger->logCall(action_npn_force_redraw, (DWORD)instance);
-
-  NPNFuncs.forceredraw(instance);
-}
deleted file mode 100644
--- a/modules/plugin/tools/spy/common/npp_gate.cpp
+++ /dev/null
@@ -1,373 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "xp.h"
-
-#include "epmanager.h"
-#include "plugload.h"
-#include "logger.h"
-
-extern NPNetscapeFuncs NPNFuncs;
-extern Logger * logger;
-
-NPNetscapeFuncs fakeNPNFuncs;
-
-extern NPPEntryPointManager * epManager;
-
-NPError NPP_New(NPMIMEType pluginType,
-                NPP instance,
-                uint16 mode,
-                int16 argc,
-                char* argn[],
-                char* argv[],
-                NPSavedData* saved)
-{   
-  if(epManager == NULL)
-    return NPERR_GENERIC_ERROR;
-  
-  if(instance == NULL)
-    return NPERR_INVALID_INSTANCE_ERROR;
-
-  if(logger)
-    logger->logCall(action_npp_new, (DWORD)pluginType, (DWORD)instance, (DWORD)mode, (DWORD)argc, (DWORD)argn, (DWORD)argv, (DWORD)saved);
-
-/* now action begins */
-
-  if(NULL == epManager->findEntryPointsForPlugin(pluginType))
-  {
-    // if it is first time in, we don't have it yet
-    // scan plugins dir for available plugins to see if we have anything 
-    // for the given mimetype
-    XP_HLIB hLib = LoadRealPlugin(pluginType);
-    if(!hLib)
-    {
-      // what do we do if we don't?
-      return NPERR_GENERIC_ERROR;
-    }
-
-    NP_GETENTRYPOINTS real_NP_GetEntryPoints = (NP_GETENTRYPOINTS)XP_GetSymbol(hLib, "NP_GetEntryPoints");
-    if(!real_NP_GetEntryPoints)
-      return NPERR_GENERIC_ERROR;
-
-    NP_INITIALIZE real_NP_Initialize = (NP_INITIALIZE)XP_GetSymbol(hLib, "NP_Initialize");
-    if(!real_NP_Initialize)
-      return NPERR_GENERIC_ERROR;
-
-    NP_SHUTDOWN real_NP_Shutdown = (NP_SHUTDOWN)XP_GetSymbol(hLib, "NP_Shutdown");
-    if(!real_NP_Shutdown)
-      return NPERR_GENERIC_ERROR;
-
-    // fill callbacks structs
-    NPPluginFuncs realNPPFuncs;
-    memset(&realNPPFuncs, 0, sizeof(NPPluginFuncs));
-    realNPPFuncs.size = sizeof(NPPluginFuncs);
-
-    real_NP_GetEntryPoints(&realNPPFuncs);
-
-    if(logger)
-      logger->logSPY_NP_GetEntryPoints(&realNPPFuncs);
-
-    // store the table with the entry point manager
-    epManager->createEntryPointsForPlugin(pluginType, &realNPPFuncs, real_NP_Shutdown, hLib);
-    
-    // inform the plugin about our entry point it should call
-    memset((void *)&fakeNPNFuncs, 0, sizeof(fakeNPNFuncs));
-
-    fakeNPNFuncs.size             = sizeof(fakeNPNFuncs);
-    fakeNPNFuncs.version          = NPNFuncs.version;
-    fakeNPNFuncs.geturlnotify     = NPN_GetURLNotify;
-    fakeNPNFuncs.geturl           = NPN_GetURL;
-    fakeNPNFuncs.posturlnotify    = NPN_PostURLNotify;
-    fakeNPNFuncs.posturl          = NPN_PostURL;
-    fakeNPNFuncs.requestread      = NPN_RequestRead;
-    fakeNPNFuncs.newstream        = NPN_NewStream;
-    fakeNPNFuncs.write            = NPN_Write;
-    fakeNPNFuncs.destroystream    = NPN_DestroyStream;
-    fakeNPNFuncs.status           = NPN_Status;
-    fakeNPNFuncs.uagent           = NPN_UserAgent;
-    fakeNPNFuncs.memalloc         = NPN_MemAlloc;
-    fakeNPNFuncs.memfree          = NPN_MemFree;
-    fakeNPNFuncs.memflush         = NPN_MemFlush;
-    fakeNPNFuncs.reloadplugins    = NPN_ReloadPlugins;
-    fakeNPNFuncs.getJavaEnv       = NULL;
-    fakeNPNFuncs.getJavaPeer      = NULL;
-    fakeNPNFuncs.getvalue         = NPN_GetValue;
-    fakeNPNFuncs.setvalue         = NPN_SetValue;
-    fakeNPNFuncs.invalidaterect   = NPN_InvalidateRect;
-    fakeNPNFuncs.invalidateregion = NPN_InvalidateRegion;
-    fakeNPNFuncs.forceredraw      = NPN_ForceRedraw;
-
-    if(logger)
-      logger->logSPY_NP_Initialize();
-
-    real_NP_Initialize(&fakeNPNFuncs);
-  }
-  
-  NPError rv = epManager->callNPP_New(pluginType, instance, mode, argc, argn, argv, saved);
-  
-  if(logger)
-    logger->logReturn();
-
-  return rv;
-}
-
-NPError NPP_Destroy (NPP instance, NPSavedData** save)
-{
-  if(epManager == NULL)
-    return NPERR_GENERIC_ERROR;
-
-  if(instance == NULL)
-    return NPERR_INVALID_INSTANCE_ERROR;
-
-  BOOL last = FALSE;
-
-  if(logger)
-    logger->logCall(action_npp_destroy, (DWORD)instance, (DWORD)save);
-
-  NPError rv = epManager->callNPP_Destroy(instance, save, &last);
-
-  if(logger)
-    logger->logReturn();
-
-  if(last && logger->bSPALID)
-  {
-    // this will log it
-    epManager->callNP_Shutdown(instance);
-
-    XP_HLIB hLib = NULL;
-
-    epManager->removeEntryPointsForPlugin(instance, &hLib);
-  
-    UnloadRealPlugin(hLib);
-  }
-  return rv;
-}
-
-NPError NPP_SetWindow (NPP instance, NPWindow* pNPWindow)
-{    
-  if(epManager == NULL)
-    return NPERR_GENERIC_ERROR;
-
-  if(instance == NULL)
-    return NPERR_INVALID_INSTANCE_ERROR;
-
-  if(logger)
-    logger->logCall(action_npp_set_window, (DWORD)instance, (DWORD)pNPWindow);
-
-  NPError rv = epManager->callNPP_SetWindow(instance, pNPWindow);
-
-  if(logger)
-    logger->logReturn();
-
-  return rv;
-}
-
-NPError NPP_NewStream(NPP instance,
-                      NPMIMEType type,
-                      NPStream* stream, 
-                      NPBool seekable,
-                      uint16* stype)
-{
-  if(epManager == NULL)
-    return NPERR_GENERIC_ERROR;
-
-  if(instance == NULL)
-    return NPERR_INVALID_INSTANCE_ERROR;
-
-  if(logger)
-    logger->logCall(action_npp_new_stream, (DWORD)instance, (DWORD)type, (DWORD)stream, (DWORD)seekable, (DWORD)stype);
-
-  NPError rv = epManager->callNPP_NewStream(instance, type, stream, seekable, stype);
-
-  if(logger)
-    logger->logReturn();
-
-  return rv;
-}
-
-int32 NPP_WriteReady (NPP instance, NPStream *stream)
-{
-  if(epManager == NULL)
-    return NPERR_GENERIC_ERROR;
-
-  if(instance == NULL)
-    return NPERR_INVALID_INSTANCE_ERROR;
-
-  if(logger)
-    logger->logCall(action_npp_write_ready, (DWORD)instance, (DWORD)stream);
-
-  int32 rv = epManager->callNPP_WriteReady(instance, stream);
-
-  if(logger)
-    logger->logReturn();
-
-  return rv;
-}
-
-int32 NPP_Write (NPP instance, NPStream *stream, int32 offset, int32 len, void *buffer)
-{   
-  if(epManager == NULL)
-    return NPERR_GENERIC_ERROR;
-
-  if(instance == NULL)
-    return NPERR_INVALID_INSTANCE_ERROR;
-
-  if(logger)
-    logger->logCall(action_npp_write, (DWORD)instance, (DWORD)stream, (DWORD)offset, (DWORD)len, (DWORD)buffer);
-
-  int32 rv = epManager->callNPP_Write(instance, stream, offset, len, buffer);
-
-  if(logger)
-    logger->logReturn();
-
-  return rv;
-}
-
-NPError NPP_DestroyStream (NPP instance, NPStream *stream, NPError reason)
-{
-  if(epManager == NULL)
-    return NPERR_GENERIC_ERROR;
-
-  if(instance == NULL)
-    return NPERR_INVALID_INSTANCE_ERROR;
-
-  if(logger)
-    logger->logCall(action_npp_destroy_stream, (DWORD)instance, (DWORD)stream, (DWORD)reason);
-
-  NPError rv = epManager->callNPP_DestroyStream(instance, stream, reason);
-
-  if(logger)
-    logger->logReturn();
-
-  return rv;
-}
-
-void NPP_StreamAsFile (NPP instance, NPStream* stream, const char* fname)
-{
-  if(epManager == NULL)
-    return;
-
-  if(instance == NULL)
-    return;
-
-  if(logger)
-    logger->logCall(action_npp_stream_as_file, (DWORD)instance, (DWORD)stream, (DWORD)fname);
-
-  epManager->callNPP_StreamAsFile(instance, stream, fname);
-}
-
-void NPP_Print (NPP instance, NPPrint* printInfo)
-{
-  if(epManager == NULL)
-    return;
-
-  if(logger)
-    logger->logCall(action_npp_print, (DWORD)instance, (DWORD)printInfo);
-
-  epManager->callNPP_Print(instance, printInfo);
-}
-
-void NPP_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData)
-{
-  if(epManager == NULL)
-    return;
-
-  if(instance == NULL)
-    return;
-
-  if(logger)
-    logger->logCall(action_npp_url_notify, (DWORD)instance, (DWORD)url, (DWORD)reason, (DWORD)notifyData);
-
-  epManager->callNPP_URLNotify(instance, url, reason, notifyData);
-}
-
-NPError	NPP_GetValue(NPP instance, NPPVariable variable, void *value)
-{
-  if(epManager == NULL)
-    return NPERR_GENERIC_ERROR;
-
-  if(instance == NULL)
-    return NPERR_INVALID_INSTANCE_ERROR;
-
-  if(logger)
-    logger->logCall(action_npp_get_value, (DWORD)instance, (DWORD)variable, (DWORD)value);
-
-  NPError rv = epManager->callNPP_GetValue(instance, variable, value);
-
-  if(logger)
-    logger->logReturn();
-
-  return rv;
-}
-
-NPError NPP_SetValue(NPP instance, NPNVariable variable, void *value)
-{
-  if(epManager == NULL)
-    return NPERR_GENERIC_ERROR;
-
-  if(instance == NULL)
-    return NPERR_INVALID_INSTANCE_ERROR;
-
-  if(logger)
-    logger->logCall(action_npp_set_value, (DWORD)instance, (DWORD)variable, (DWORD)value);
-
-  NPError rv = epManager->callNPP_SetValue(instance, variable, value);
-
-  if(logger)
-    logger->logReturn();
-
-  return rv;
-}
-
-int16	NPP_HandleEvent(NPP instance, void* event)
-{
-  if(epManager == NULL)
-    return 0;
-
-  if(instance == NULL)
-    return 0;
-
-  if(logger)
-    logger->logCall(action_npp_handle_event, (DWORD)instance, (DWORD)event);
-
-  int16 rv = epManager->callNPP_HandleEvent(instance, event);
-
-  if(logger)
-    logger->logReturn();
-
-  return rv;
-}
deleted file mode 100644
--- a/modules/plugin/tools/spy/common/plugload.cpp
+++ /dev/null
@@ -1,194 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "xp.h"
-
-DWORD GetPluginsDir(char * path, DWORD maxsize)
-{
-  if(!path)
-    return 0;
-
-  path[0] = '\0';
-
-#ifdef XP_WIN
-
-  DWORD res = GetModuleFileName(NULL, path, maxsize);
-  if(res == 0)
-    return 0;
-
-  if(path[strlen(path) - 1] == '\\')
-    path[lstrlen(path) - 1] = '\0';
-
-  char *p = strrchr(path, '\\');
-
-  if(p)
-    *p = '\0';
-
-  strcat(path, "\\plugins");
-
-#endif
-
-#ifdef XP_UNIX
-  // Implement UNIX version
-#endif
-
-#ifdef XP_MAC
-  // Implement Mac version
-#endif
-
-  res = strlen(path);
-  return res;
-}
-
-XP_HLIB LoadRealPlugin(char * mimetype)
-{
-  if(!mimetype || !strlen(mimetype))
-    return NULL;
-
-#ifdef XP_WIN
-
-  BOOL bDone = FALSE;
-  WIN32_FIND_DATA ffdataStruct;
-
-  char szPath[_MAX_PATH];
-  char szFileName[_MAX_PATH];
-
-  GetPluginsDir(szPath, _MAX_PATH);
-
-  strcpy(szFileName, szPath);
-  strcat(szFileName, "\\00*");
-
-  HANDLE handle = FindFirstFile(szFileName, &ffdataStruct);
-  if(handle == INVALID_HANDLE_VALUE) 
-  {
-    FindClose(handle);
-    return NULL;
-  }
-
-  DWORD versize = 0L;
-  DWORD zero = 0L;
-  char * verbuf = NULL;
-
-  do
-  {
-    strcpy(szFileName, szPath);
-    strcat(szFileName, "\\");
-    strcat(szFileName, ffdataStruct.cFileName);
-    if(!(ffdataStruct. dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
-    {
-      versize = GetFileVersionInfoSize(szFileName, &zero);
-	    if (versize > 0)
-		    verbuf = new char[versize];
-      else 
-        continue;
-
-      if(!verbuf)
-		    continue;
-
-      GetFileVersionInfo(szFileName, NULL, versize, verbuf);
-
-      char *mimetypes = NULL;
-      UINT len = 0;
-
-      if(!VerQueryValue(verbuf, "\\StringFileInfo\\040904E4\\MIMEType", (void **)&mimetypes, &len)
-         || !mimetypes || !len)
-      {
-        delete [] verbuf;
-        continue;
-      }
-
-      // browse through a string of mimetypes
-      mimetypes[len] = '\0';
-      char * type = mimetypes;
-
-      BOOL more = TRUE;
-      while(more)
-      {
-        char * p = strchr(type, '|');
-        if(p)
-          *p = '\0';
-        else
-          more = FALSE;
-
-        if(0 == stricmp(mimetype, type))
-        {
-          // this is it!
-          delete [] verbuf;
-          FindClose(handle);
-          HINSTANCE hLib = LoadLibrary(szFileName);
-          return hLib;
-        }
-
-        type = p;
-        type++;
-      }
-
-      delete [] verbuf;
-    }
-
-  } while(FindNextFile(handle, &ffdataStruct));
-
-  FindClose(handle);
-
-#endif
-
-#ifdef XP_UNIX
-  // Implement UNIX version
-#endif
-
-#ifdef XP_MAC
-  // Implement Mac version
-#endif
-
-  return NULL;
-}
-
-void UnloadRealPlugin(XP_HLIB hLib)
-{
-#ifdef XP_WIN
-  if(!hLib)
-    FreeLibrary(hLib);
-#endif
-
-#ifdef XP_UNIX
-  // Implement UNIX version
-#endif
-
-#ifdef XP_MAC
-  // Implement Mac version
-#endif
-}
deleted file mode 100644
--- a/modules/plugin/tools/spy/common/profile.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "xp.h"
-
-#include "profile.h"
-
-Profile::Profile()
-{
-}
-
-Profile::~Profile()
-{
-}
deleted file mode 100644
--- a/modules/plugin/tools/spy/common/utils.cpp
+++ /dev/null
@@ -1,127 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "xp.h"
-
-// file utils
-
-BOOL XP_IsFile(char * szFileName)
-{
-#ifdef XP_WIN
-  OFSTRUCT of;
-  return (HFILE_ERROR != OpenFile(szFileName, &of, OF_EXIST));
-#endif
-#ifdef XP_UNIX
-  struct stat s;
-  return (stat(szFileName, &s) != -1);
-#endif
-#ifdef XP_MAC /*  HACK */
-	return 1;
-#endif
-}
-
-void XP_DeleteFile(char * szFileName)
-{
-#ifdef XP_WIN
-  DeleteFile(szFileName);
-#else
-  remove(szFileName);
-#endif
-}
-
-XP_HFILE XP_CreateFile(char * szFileName)
-{
-#ifdef XP_WIN
-  OFSTRUCT of;
-  HFILE hFile = OpenFile(szFileName, &of, OF_CREATE | OF_WRITE);
-  return (hFile != HFILE_ERROR) ? hFile : NULL;
-#else
-  return (XP_HFILE)fopen(szFileName, "w+");
-#endif
-}
-
-XP_HFILE XP_OpenFile(char * szFileName)
-{
-#ifdef XP_WIN
-  OFSTRUCT of;
-  HFILE hFile = OpenFile(szFileName, &of, OF_READ | OF_WRITE);
-  return (hFile != HFILE_ERROR) ? hFile : NULL;
-#else
-  return (XP_HFILE)fopen(szFileName, "r+");
-#endif
-}
-
-void XP_CloseFile(XP_HFILE hFile)
-{
-  if(hFile != NULL)
-  {
-#ifdef XP_WIN
-    CloseHandle((HANDLE)hFile);
-#else
-    fclose(hFile);
-#endif
-  }
-}
-
-DWORD XP_WriteFile(XP_HFILE hFile, void * pBuf, int iSize)
-{
-#ifdef XP_WIN
-  DWORD dwRet;
-  WriteFile((HANDLE)hFile, pBuf, iSize, &dwRet, NULL);
-  return dwRet;
-#else
-  return (DWORD)fwrite(pBuf, iSize, 1, hFile);
-#endif
-}
-
-void XP_FlushFileBuffers(XP_HFILE hFile)
-{
-#ifdef XP_WIN
-  FlushFileBuffers((HANDLE)hFile);
-#else
-  fflush(hFile);
-#endif 
-}
-
-// misc utils
-
-void * XP_GetSymbol(XP_HLIB hLib, char * szProcName)
-{
-#ifdef XP_WIN
-  return (void *)GetProcAddress(hLib, szProcName);
-#endif
-}
deleted file mode 100644
--- a/modules/plugin/tools/spy/include/actionnames.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef __ACTIONNAMES_H__
-#define __ACTIONNAMES_H__
-
-// the order is important
-char * ActionName[] =
-{
-  "INVALID_CALL",
-  "NPN_Version",
-  "NPN_GetURLNotify",
-  "NPN_GetURL",
-  "NPN_PostURLNotify",
-  "NPN_PostURL",
-  "NPN_RequestRead",
-  "NPN_NewStream",
-  "NPN_Write",
-  "NPN_DestroyStream",
-  "NPN_Status",
-  "NPN_UserAgent",
-  "NPN_MemAlloc",
-  "NPN_MemFree",
-  "NPN_MemFlush",
-  "NPN_ReloadPlugins",
-  "NPN_GetJavaEnv",
-  "NPN_GetJavaPeer",
-  "NPN_GetValue",
-  "NPN_SetValue",
-  "NPN_InvalidateRect",
-  "NPN_InvalidateRegion",
-  "NPN_ForceRedraw",
-  "NPP_New",
-  "NPP_Destroy",
-  "NPP_SetWindow",
-  "NPP_NewStream",
-  "NPP_DestroyStream",
-  "NPP_StreamAsFile",
-  "NPP_WriteReady",
-  "NPP_Write",
-  "NPP_Print",
-  "NPP_HandleEvent",
-  "NPP_URLNotify",
-  "NPP_GetJavaClass",
-  "NPP_GetValue",
-  "NPP_SetValue"
-};
-
-#endif
deleted file mode 100644
--- a/modules/plugin/tools/spy/include/dirpick.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef __DIRPICK_H__
-#define __DIRPICK_H__
-
-// pops up "Choose Directory" dialog box allowing to browse the directry
-// structure. Returns TRUE on OK and FALSE on Cancel. Directory chosen
-// returned in lpszString. Use lpszString to initialize the dialog box. If
-// specified directory does not exist it will start with the current directory
-BOOL PickupDirectory(HWND hWndOwner, LPSTR lpszString);
-
-#endif // __DIRPICK_H__
\ No newline at end of file
deleted file mode 100644
--- a/modules/plugin/tools/spy/include/epmanager.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef __EPMANAGER_H__
-#define __EPMANAGER_H__
-
-#include "npapi.h"
-#include "npupp.h"
-
-typedef NPError (__stdcall * NP_GETENTRYPOINTS) (NPPluginFuncs* pFuncs);
-typedef NPError (__stdcall * NP_INITIALIZE) (NPNetscapeFuncs* pFuncs);
-typedef NPError (__stdcall * NP_SHUTDOWN) (void);
-
-struct InstanceList
-{
-  InstanceList * next;
-  NPP instance;
-
-  InstanceList(NPP _instance);
-  ~InstanceList();
-};
-
-struct PluginEntryPointList
-{
-  PluginEntryPointList * next;
-  char mimetype[80];
-  InstanceList * instances;
-  NPPluginFuncs realNPPFuncs;
-  NP_SHUTDOWN realShutdown;
-  XP_HLIB hLib;
-
-  PluginEntryPointList();
-  ~PluginEntryPointList();
-};
-
-class NPPEntryPointManager
-{
-private:
-  PluginEntryPointList * mEntryPoints;
-
-public:
-  void createEntryPointsForPlugin(char * mimetype, NPPluginFuncs * funcs, NP_SHUTDOWN shutdownproc, XP_HLIB hLib);
-  void removeEntryPointsForPlugin(NPP instance, XP_HLIB * lib);
-  NPPluginFuncs * findEntryPointsForPlugin(char * mimetype);
-
-private:  
-  NPPluginFuncs * findEntryPointsForInstance(NPP instance);
-
-public:
-  NPPEntryPointManager();
-  ~NPPEntryPointManager();
-
-  void callNP_Shutdown(NPP instance);
-  void callNP_ShutdownAll();
-
-  NPError callNPP_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved);
-  NPError callNPP_Destroy(NPP instance, NPSavedData** save, BOOL * last);
-  NPError callNPP_SetWindow(NPP instance, NPWindow* window);
-  NPError callNPP_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype);
-  NPError callNPP_DestroyStream(NPP instance, NPStream* stream, NPReason reason);
-  int32   callNPP_WriteReady(NPP instance, NPStream* stream);
-  int32   callNPP_Write(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer);
-  void    callNPP_StreamAsFile(NPP instance, NPStream* stream, const char* fname);
-  void    callNPP_Print(NPP instance, NPPrint* platformPrint);
-  void    callNPP_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData);
-  NPError callNPP_GetValue(NPP instance, NPPVariable variable, void *value);
-  NPError callNPP_SetValue(NPP instance, NPNVariable variable, void *value);
-  int16   callNPP_HandleEvent(NPP instance, void* event);
-};
-
-#endif
deleted file mode 100644
--- a/modules/plugin/tools/spy/include/format.h
+++ /dev/null
@@ -1,133 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef __FORMAT_H__
-#define __FORMAT_H__
-
-#include "npapi.h"
-
-typedef enum
-{
-  action_invalid = 0,
-  action_npn_version,
-  action_npn_get_url_notify,
-  action_npn_get_url,
-  action_npn_post_url_notify,
-  action_npn_post_url,
-  action_npn_request_read,
-  action_npn_new_stream,
-  action_npn_write,
-  action_npn_destroy_stream,
-  action_npn_status,
-  action_npn_user_agent,
-  action_npn_mem_alloc,
-  action_npn_mem_free,
-  action_npn_mem_flush,
-  action_npn_reload_plugins,
-  action_npn_get_java_env,
-  action_npn_get_java_peer,
-  action_npn_get_value,
-  action_npn_set_value,
-  action_npn_invalidate_rect,
-  action_npn_invalidate_region,
-  action_npn_force_redraw,
-
-  action_npp_new,
-  action_npp_destroy,
-  action_npp_set_window,
-  action_npp_new_stream,
-  action_npp_destroy_stream,
-  action_npp_stream_as_file,
-  action_npp_write_ready,
-  action_npp_write,
-  action_npp_print,
-  action_npp_handle_event,
-  action_npp_url_notify,
-  action_npp_get_java_class,
-  action_npp_get_value,
-  action_npp_set_value
-} NPAPI_Action;
-
-struct LogArgumentStruct
-{
-  DWORD dwArg;
-  int iLength;
-  void * pData;
-
-  LogArgumentStruct()
-  {
-    iLength = 0;
-    pData = NULL;
-  }
-
-  ~LogArgumentStruct()
-  {
-    if(pData != NULL)
-      delete [] pData;
-    iLength = 0;
-  }
-};
-
-struct LogItemStruct
-{
-  NPAPI_Action action;
-  LogArgumentStruct arg1;
-  LogArgumentStruct arg2;
-  LogArgumentStruct arg3;
-  LogArgumentStruct arg4;
-  LogArgumentStruct arg5;
-  LogArgumentStruct arg6;
-  LogArgumentStruct arg7;
-
-  LogItemStruct(){}
-  ~LogItemStruct(){}
-};
-
-char * FormatNPAPIError(int iError);
-char * FormatNPAPIReason(int iReason);
-char * FormatNPPVariable(NPPVariable var);
-char * FormatNPNVariable(NPNVariable var);
-BOOL FormatPCHARArgument(char * szBuf, int iLength, LogArgumentStruct * parg);
-BOOL FormatBOOLArgument(char * szBuf, int iLength, LogArgumentStruct * parg);
-BOOL FormatPBOOLArgument(char * szBuf, int iLength, LogArgumentStruct * parg);
-LogItemStruct * makeLogItemStruct(NPAPI_Action action, 
-                                  DWORD dw1, DWORD dw2, DWORD dw3, DWORD dw4,
-                                  DWORD dw5, DWORD dw6, DWORD dw7, BOOL bShort = FALSE);
-void freeLogItemStruct(LogItemStruct * lis);
-int formatLogItem(LogItemStruct * plis, char * szOutput, BOOL bDOSStyle = FALSE);
-
-#endif // __LOGHLP_H__
deleted file mode 100644
--- a/modules/plugin/tools/spy/include/logfile.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef __LOGFILE_H__
-#define __LOGFILE_H__
-
-class CLogFile
-{
-private:
-  char szFileName[256];
-  XP_HFILE hFile;
-
-public:
-  CLogFile();
-  ~CLogFile();
-
-  BOOL create(char * filename, BOOL delete_existing = FALSE);
-  void close();
-  DWORD write(char * buf);
-  void flush();
-};
-
-#endif // __LOGFILE_H__
deleted file mode 100644
--- a/modules/plugin/tools/spy/include/logger.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef _LOGGER_H__
-#define __LOGGER_H__
-
-#include "npupp.h"
-#include "format.h"
-#include "logfile.h"
-
-#define TOTAL_NUMBER_OF_API_CALLS 37
-#define DEFAULT_LOG_FILE_NAME "spylog.txt"
-
-class Logger
-{
-public:
-  BOOL bMutedAll;
-  BOOL bToWindow;
-  BOOL bToConsole;
-  BOOL bToFile;
-  BOOL bOnTop;
-  BOOL bSPALID; //ShutdownPluginAfterLastInstanceDestroyed
-                // as opposed to 'only when NS asks to'
-  CLogFile filer;
-
-  BOOL bSaveSettings;
-  char szFile[_MAX_PATH];
-  
-  // 37 is the total number of API calls 
-  // (NPN_* and NPP_* only, NPP_Initialize and NPP_Shutdown not included)
-  BOOL bMutedCalls[TOTAL_NUMBER_OF_API_CALLS];
-
-public:
-  Logger();
-  ~Logger();
-
-  BOOL init();
-  void shut();
-
-  // platform dependent virtuals
-  virtual BOOL platformInit() = 0;
-  virtual void platformShut() = 0;
-  virtual void dumpStringToMainWindow(char * string) = 0;
-
-  void setOnTop(BOOL ontop);
-  void setToFile(BOOL tofile, char * filename);
-
-  BOOL * getMutedCalls();
-  void setMutedCalls(BOOL * mutedcalls);
-
-  BOOL isMuted(NPAPI_Action action);
-
-  void logNS_NP_GetEntryPoints();
-  void logNS_NP_Initialize();
-  void logNS_NP_Shutdown();
-
-  void logSPY_NP_GetEntryPoints(NPPluginFuncs * pNPPFuncs);
-  void logSPY_NP_Initialize();
-  void logSPY_NP_Shutdown(char * mimetype);
-
-  void logCall(NPAPI_Action action, DWORD dw1 = 0L, DWORD dw2 = 0L, 
-               DWORD dw3 = 0L, DWORD dw4 = 0L, DWORD dw5 = 0L, DWORD dw6 = 0L, DWORD dw7 = 0L);
-  void logReturn(DWORD dwRet = 0L);
-};
-
-Logger * NewLogger();
-void DeleteLogger(Logger * logger);
-
-#endif
deleted file mode 100644
--- a/modules/plugin/tools/spy/include/plugload.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef __PLUGLOAD_H__
-#define __PLUGLOAD_H__
-
-DWORD GetPluginsDir(char * path, DWORD maxsize);
-XP_HLIB LoadRealPlugin(char * mimetype);
-void UnloadRealPlugin(XP_HLIB hLib);
-
-#endif
deleted file mode 100644
--- a/modules/plugin/tools/spy/include/profile.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef __PROFILE_H__
-#define __PROFILE_H__
-
-class Profile
-{
-public:
-  Profile();
-  ~Profile();
-
-  virtual BOOL getBool(char * key, BOOL * value) = 0;
-  virtual BOOL setBool(char * key, BOOL value) = 0;
-
-  virtual BOOL getString(char * key, char * string, int size) = 0;
-  virtual BOOL setString(char * key, char * string) = 0;
-};
-
-#endif
deleted file mode 100644
--- a/modules/plugin/tools/spy/include/setup.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef __SETUP_H__
-#define __SETUP_H__
-
-void WINAPI SPY_Setup();
-
-#endif
deleted file mode 100644
--- a/modules/plugin/tools/spy/include/xp.h
+++ /dev/null
@@ -1,170 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef __XP_H__
-#define __XP_H__
-
-/*****************************************************/
-
-#ifdef XP_WIN
-
-  #include <windows.h>
-
-#endif
-
-/*****************************************************/
-
-
-#ifdef XP_MAC
- 	#include <all.h>
-#endif
-	
-#if (defined XP_MAC || defined XP_UNIX)
-
-	typedef unsigned char	BYTE;
-	
-	#define strcmpi  strcmp
-
-#endif
-
-
-/*****************************************************/
-
-#ifdef XP_UNIX
-	#include <stdio.h>
-	#include <string.h>       /* strcat() */
-  #include <sys/types.h>    /* stat() */
-  #include <sys/stat.h>
-  #include <stdlib.h>       /* atoi() */
-  #include <assert.h>       /* assert() */
-  #include <ctype.h>        /* isprint() */
-
-	#ifndef FALSE
-	#define FALSE			  false
-	#endif
-	  
-	#ifndef TRUE
-	#define TRUE			  true
-	#endif
-
-  #ifndef HIBYTE
-  #define HIBYTE(x)       ((((u_int)(x)) & 0xff00)>>8)
-  #endif
-
-  #ifndef LOBYTE
-  #define LOBYTE(x)       (((u_int)(x)) & 0x00ff)
-  #endif
-
-  #ifndef XP_EXPORT_API
-  #define XP_EXPORT_API
-  #endif
-
-#endif
-
-/*****************************************************/
-
-#ifdef XP_WIN
-
-  #define XP_HFILE        HFILE
-  #define XP_HLIB         HINSTANCE
-
-  #define XP_EXPORT_API   WINAPI
-
-#else
-
-  #define XP_HFILE        FILE*
-
-  #ifndef DWORD
-  #define DWORD           unsigned long
-  #endif
-
-  #ifndef UINT
-  #define UINT            unsigned int
-  #endif
-
-  #ifndef WORD
-  #define WORD            unsigned short
-  #endif
-
-  #ifndef BOOL
-  #define BOOL		  bool
-  #endif
-
-  #if (defined XP_UNIX)			/* For IRIX */
-    #ifndef bool
-    #define bool		  unsigned char
-    #endif
-  #endif
-
-#endif
-
-
-
-/*****************************************************/
-
-#ifndef _MAX_PATH
-  #define _MAX_PATH       256
-#endif
-
-#ifdef XP_WIN
-  #define DIR_SEPARATOR "\\"
-#endif
-
-#ifdef XP_UNIX
-  #define DIR_SEPARATOR "/"
-#endif
-
-#ifdef XP_MAC
-  #define DIR_SEPARATOR ":"
-#endif
-  
-/*****************************************************/
-
-// File utilities
-BOOL XP_IsFile(char * szFileName);
-XP_HFILE XP_CreateFile(char * szFileName);
-XP_HFILE XP_OpenFile(char * szFileName);
-void XP_CloseFile(XP_HFILE hFile);
-void XP_DeleteFile(char * szFileName);
-DWORD XP_WriteFile(XP_HFILE hFile, void * pBuf, int iSize);
-void XP_FlushFileBuffers(XP_HFILE hFile);
-
-
-// misc
-void * XP_GetSymbol(XP_HLIB hLib, char * szProcName);
-
-#endif
deleted file mode 100644
--- a/modules/plugin/tools/spy/windows/dirpick.cpp
+++ /dev/null
@@ -1,603 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include <windows.h>
-#include <windowsx.h>
-#include <direct.h>
-#include <stdio.h>
-
-#include "resource.h"
-
-extern HINSTANCE hInst;
-
-#define ITEM_BITMAPWIDTH     16
-#define ITEM_BITMAPHEIGHT    16
-#define ITEM_LEFTMARGIN       4
-#define ITEM_GAP              4
-
-static HWND hWndDirPicker;
-static HICON hIconDrives[5];
-static HICON hIconFolders[3];
-static LPSTR lpszStringToReturn;
-static char szUNCRoot[256] = "";
-
-UINT DriveType(UINT iType);
-
-static void fillComboBox(HWND hWnd) 
-{
-  HWND hWndCB = GetDlgItem(hWnd, ID_COMBO_DIR);
-  HWND hWndTempLB = GetDlgItem(hWnd, ID_LISTTEMP_DIR);
-  if(hWndCB == NULL)
-    return;
-  ComboBox_ResetContent(hWndCB);
-  ListBox_ResetContent(hWndTempLB);
-  ListBox_Dir(hWndTempLB, DDL_DRIVES|DDL_EXCLUSIVE, (LPSTR)"*");
-
-  int iDriveCount = ListBox_GetCount(hWndTempLB);
-  int iCurDrive=_getdrive() - 1;
-
-  char szDrive[16];
-  char szItem[80];
-
-  for (int i = 0; i < iDriveCount;  i++) 
-  {
-    ListBox_GetText(hWndTempLB, i, szDrive);
-    CharLower(szDrive);
-    int iDrive = szDrive[2] - 'a';
-    char szRoot[16];
-    sprintf(szRoot, "%c:\\", szDrive[2]);
-
-    int iType = DriveType(iDrive);
-
-    if(iType < 2)
-      continue;
-
-    //Start the item string with the drive letter, colon, and two spaces
-    sprintf(szItem, "%c%s", szDrive[2], ": ");
-
-    if((iType == DRIVE_FIXED) || (iType == DRIVE_RAMDISK)) 
-    { // get volume ID
-      char szVolumeID[80];
-      DWORD dwMaxLength;
-      DWORD dwSysFlags;
-      GetVolumeInformation(szRoot,             // address of root directory of the file system 
-                           szVolumeID,         // address of name of the volume 
-                           sizeof(szVolumeID), // length of lpVolumeNameBuffer 
-                           NULL,               // address of volume serial number 
-                           &dwMaxLength,       // address of system's maximum filename length
-                           &dwSysFlags,        // address of file system flags 
-                           NULL,               // address of name of file system 
-                           NULL);              // length of lpFileSystemNameBuffer 
-
-      CharLower(szVolumeID);
-      lstrcat(szItem, szVolumeID);
-    }
-
-    //For network drives, go grab the \\server\share for it.
-    if(DRIVE_REMOTE == iType) 
-    {
-      char szNet[64];
-      szNet[0] = '\0';
-      DWORD dwSizeOfszNet = sizeof(szNet);
-
-      sprintf(szDrive, "%c:", szDrive[2]);
-      CharUpper(szDrive);
-      WNetGetConnection(szDrive, szNet, &dwSizeOfszNet);
-      CharLower(szNet);
-      lstrcat(szItem, szNet);
-    }
-
-    int index = ComboBox_AddString(hWndCB, szItem);
-    ComboBox_SetItemData(hWndCB, index, MAKELONG(iDrive, iType));
-    if(iDrive == iCurDrive)
-      ComboBox_SetCurSel(hWndCB, index);
-    if(szUNCRoot[0] != '\0')
-      ComboBox_SetCurSel(hWndCB, -1);
-  }
-}
-
-static void fillTempLBWithDirs(HWND hWndTempLB, LPSTR lpszDir) 
-{
-  BOOL bDone = FALSE;
-  WIN32_FIND_DATA ffdataStruct;
-
-  char szPath[_MAX_PATH];
-  char szFileName[_MAX_PATH];
-  lstrcpy(szPath, lpszDir);
-  if(szPath[lstrlen(szPath) - 1] == '\\')
-    szPath[lstrlen(szPath) - 1] = '\0';
-  lstrcpy(szFileName, szPath);
-  lstrcat(szFileName, "\\*");
-  HANDLE handle = FindFirstFile(szFileName, &ffdataStruct);
-  if(handle == INVALID_HANDLE_VALUE) 
-  {
-    FindClose(handle);
-    return;
-  }
-  while(!bDone) 
-  {
-    lstrcpy(szFileName, szPath);
-    lstrcat(szFileName, "\\");
-    lstrcat(szFileName, ffdataStruct.cFileName);
-    if(ffdataStruct. dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) 
-    {
-      char szStringToAdd[_MAX_PATH + 2];
-      lstrcpy(szStringToAdd, "[");
-      lstrcat(szStringToAdd, ffdataStruct.cFileName);
-      lstrcat(szStringToAdd, "]");
-      CharLower(szStringToAdd);
-      ListBox_AddString(hWndTempLB, szStringToAdd);
-    }
-    bDone = !FindNextFile(handle, &ffdataStruct);
-  }
-  FindClose(handle);
-}
-
-static void fillListBox(HWND hWnd, LPSTR lpszDir) 
-{
-  HWND hWndLB = GetDlgItem(hWnd, ID_LIST_DIR);
-  HWND hWndTempLB = GetDlgItem(hWnd, ID_LISTTEMP_DIR);
-  HWND hWndEdit = GetDlgItem(hWnd, ID_EDIT_DIR);
-  if((hWndLB == NULL) || (lpszDir == NULL))
-    return;
-  
-  int iLastChar = lstrlen(lpszDir);
-  if(lpszDir[iLastChar - 1] == '\\')
-    lpszDir[iLastChar - 1] = '\0';
-
-  SetWindowRedraw(hWndLB, FALSE);
-  ListBox_ResetContent(hWndLB);
-  ListBox_ResetContent(hWndTempLB);
-
-  LPSTR lpszLast;
-  lpszLast = CharLower(lpszDir);
-
-  SetWindowText(hWndLB, lpszDir);
-
-  char szDir[_MAX_DIR];
-  char szFullDir[_MAX_DIR];
-  sprintf(szFullDir, "%s", lpszDir);
-  sprintf(szDir, "%s\\*.*", lpszDir);
-
-  BOOL bFirst = TRUE;
-  char ch;
-  int index;
-  while (TRUE) 
-  {
-    LPSTR lpsz;
-    if((lpszDir[0] == '\\') && (lpszDir[1] == '\\') && bFirst)
-      lpsz = strchr(lpszLast + lstrlen(szUNCRoot), '\\');
-    else
-      lpsz = strchr(lpszLast, '\\');
-    if(lpsz != NULL) {
-      if (bFirst)
-        ch = *(++lpsz);
-      else
-        ch = *lpsz;
-      *lpsz = 0;
-    } 
-    else 
-    {
-      //If we're looking at a drive only, then append a backslash
-      if (lpszLast == lpszDir && bFirst)
-        lstrcat(lpszLast, "\\");
-    }
-    //Add the drive string--includes the last one where lpsz == NULL
-    index = ListBox_AddString(hWndLB, lpszLast);
-
-    UINT i = (NULL != lpsz) ? ID_ICON_FOLDEROPEN : ID_ICON_OPENSELECT;
-    ListBox_SetItemData(hWndLB, index, MAKELONG(index, i));
-
-    if(NULL == lpsz)
-      break;
-
-      //Restore last character.
-    *lpsz = ch;
-    lpsz += (bFirst) ? 0 : 1;
-
-    bFirst=FALSE;
-    lpszLast = lpsz;
-  }
-  int indent = index + 1;
-
-  //Get available directories
-  fillTempLBWithDirs(hWndTempLB, lpszDir);
-
-  int itemCount = ListBox_GetCount(hWndTempLB);
-
-  for (int i = 0; i < itemCount; i++) {
-    index = ListBox_GetText(hWndTempLB, i, lpszDir);
-    //Skip directories beginning with . (skipping . and ..)
-    if(lpszDir[1] == '.')
-      continue;
-    //Remove the ending ']'
-    iLastChar = lstrlen(lpszDir);
-    lpszDir[iLastChar - 1] = '\0';
-    //Add the string to the real directory list.
-    index = ListBox_AddString(hWndLB, lpszDir + 1);
-    ListBox_SetItemData(hWndLB, index, MAKELONG(indent, ID_ICON_FOLDERCLOSED));
-  }
-  //Force a listbox repaint.
-  SetWindowRedraw(hWndLB, TRUE);
-  InvalidateRect(hWndLB, NULL, TRUE);
-
-  if(szFullDir[lstrlen(szFullDir) - 1] == ':')
-    lstrcat(szFullDir, "\\");
-  Edit_SetText(hWndEdit, szFullDir);
-
-  GetScrollRange(hWndLB, SB_VERT, (LPINT)&i, (LPINT)&index);
-
-  if(!(i == 0 && index == 0))
-    ListBox_SetTopIndex(hWndLB, max((int)(index - 2), 0));
-
-  ListBox_SetCurSel(hWndLB, indent - 1);
-}
-
-static void onDrawItem(LPDRAWITEMSTRUCT lpdis, BOOL bDrive) 
-{
-  if((int)lpdis->itemID < 0)
-    return;
-
-  char szItem[_MAX_DIR];
-  DWORD dwItemData;
-
-  if(bDrive) 
-  {
-    dwItemData = ComboBox_GetItemData(lpdis->hwndItem, lpdis->itemID);
-    ComboBox_GetLBText(lpdis->hwndItem, lpdis->itemID, szItem);
-  } 
-  else 
-  {
-    dwItemData = ListBox_GetItemData(lpdis->hwndItem, lpdis->itemID);
-    ListBox_GetText(lpdis->hwndItem, lpdis->itemID, szItem);
-  }
-
-  if(lpdis->itemAction & (ODA_DRAWENTIRE | ODA_SELECT)) 
-  {
-    COLORREF colorText;
-    COLORREF colorBack;
-    if(lpdis->itemState & ODS_SELECTED) 
-    {
-      colorText = SetTextColor(lpdis->hDC, GetSysColor(COLOR_HIGHLIGHTTEXT));
-      colorBack = SetBkColor(lpdis->hDC, GetSysColor(COLOR_HIGHLIGHT));
-    }
-    HICON hIcon;
-    int indent = 0;
-    if(bDrive) 
-    {
-      int iType=(int)HIWORD(dwItemData);
-      switch (iType) 
-      {
-        case DRIVE_REMOVABLE:
-          hIcon = hIconDrives[0];
-          break; 
-        case DRIVE_FIXED:
-          hIcon = hIconDrives[1];
-          break;
-        case DRIVE_REMOTE:
-          hIcon = hIconDrives[2];
-          break; 
-        case DRIVE_CDROM:
-          hIcon = hIconDrives[3];
-          break; 
-        case DRIVE_RAMDISK:
-          hIcon = hIconDrives[4];
-          break; 
-      }
-
-    } 
-    else 
-    {
-      int iconID = (int)HIWORD(lpdis->itemData);
-      switch (iconID) 
-      {
-        case ID_ICON_FOLDERCLOSED:
-          hIcon = hIconFolders[0];
-          break;
-        case ID_ICON_FOLDEROPEN:
-          hIcon = hIconFolders[1];
-          break;
-        case ID_ICON_OPENSELECT:
-          hIcon = hIconFolders[2];
-          break;
-      }
-      indent = 4 * (1 + LOWORD(lpdis->itemData));
-    }
-
-    ExtTextOut(lpdis->hDC, 
-               lpdis->rcItem.left + ITEM_LEFTMARGIN + ITEM_BITMAPWIDTH + ITEM_GAP + indent,
-               lpdis->rcItem.top,
-               ETO_OPAQUE | ETO_CLIPPED,
-               &lpdis->rcItem,
-               szItem,
-               lstrlen(szItem),
-               NULL);
-
-    BOOL res = DrawIcon(lpdis->hDC, 
-                        lpdis->rcItem.left + ITEM_LEFTMARGIN + indent,
-                        lpdis->rcItem.top, 
-                        hIcon);
-
-    if(lpdis->itemState & ODS_SELECTED) 
-    {
-      SetTextColor(lpdis->hDC, colorText);
-      SetBkColor(lpdis->hDC, colorBack);
-    }
-  }
-  if((lpdis->itemAction & ODA_FOCUS) || (lpdis->itemState & ODS_FOCUS))
-    DrawFocusRect(lpdis->hDC, &lpdis->rcItem);
-}
-
-static void fillUNCRootArray(LPSTR lpsz) 
-{
-  char szCurDir[_MAX_PATH];
-  _getcwd(szCurDir, sizeof(szCurDir));
-  lstrcpy(szUNCRoot, lpsz);
-  if(szUNCRoot[lstrlen(szUNCRoot) - 1] == '\\')
-    szUNCRoot[lstrlen(szUNCRoot) - 1] = '\0';
-  for(;;) 
-  {
-    LPSTR lptemp = strrchr(szUNCRoot, '\\');
-    if(lptemp == NULL)
-      break;
-    *lptemp = '\0';
-    if(_chdir(szUNCRoot) == -1) 
-    {
-      *lptemp = '\\';
-      break;
-    }
-  }
-  _chdir(szCurDir);
-}
-
-static void onInitDialog(HWND hWnd, LPSTR lpsz) 
-{
-  hWndDirPicker = hWnd;
-  lpszStringToReturn = lpsz;
-  
-  hIconDrives[0] = LoadIcon(hInst, MAKEINTRESOURCE(ID_ICON_DRIVEFLOPPY));
-  hIconDrives[1] = LoadIcon(hInst, MAKEINTRESOURCE(ID_ICON_DRIVEHARD));
-  hIconDrives[2] = LoadIcon(hInst, MAKEINTRESOURCE(ID_ICON_DRIVENETWORK));
-  hIconDrives[3] = LoadIcon(hInst, MAKEINTRESOURCE(ID_ICON_DRIVECDROM));
-  hIconDrives[4] = LoadIcon(hInst, MAKEINTRESOURCE(ID_ICON_DRIVERAM));
-
-  hIconFolders[0] = LoadIcon(hInst, MAKEINTRESOURCE(ID_ICON_FOLDERCLOSED));
-  hIconFolders[1] = LoadIcon(hInst, MAKEINTRESOURCE(ID_ICON_FOLDEROPEN));
-  hIconFolders[2] = LoadIcon(hInst, MAKEINTRESOURCE(ID_ICON_OPENSELECT));
-  
-  if(lpsz[0] == '\0') 
-    _getcwd(lpsz, _MAX_PATH);
-  else if(lpsz[lstrlen(lpsz) - 1] == ':')
-    lstrcat(lpsz, "\\");
-
-  int ret = _chdir(lpsz);
-  if(ret == -1) 
-  {
-    char szText[_MAX_PATH + 80];
-    sprintf(szText, "The specified directory %s\ncannot be found", lpsz);
-    MessageBox(GetParent(hWnd), szText, "Choose Directory", MB_ICONEXCLAMATION|MB_OK);
-    _getcwd(lpsz, _MAX_PATH);
-  }
-  if((lpsz[0] == '\\') && (lpsz[1] == '\\'))
-    fillUNCRootArray(lpsz);
-  fillListBox(hWnd, lpsz);
-  fillComboBox(hWnd);
-}
-
-static void shutDialog(HWND hWnd) 
-{
-  szUNCRoot[0] = '\0';
-}
-
-static void onCommand(HWND hWnd, int id, HWND hWndCtl, UINT codeNotify) 
-{
-  char szCurDir[_MAX_PATH];
-  switch(id) 
-  {
-    case ID_LIST_DIR:
-      if(codeNotify == LBN_DBLCLK) 
-      {
-        int index = ListBox_GetCurSel(hWndCtl);
-        DWORD dwItemData = ListBox_GetItemData(hWndCtl, index);
-
-        if(HIWORD(dwItemData) == ID_ICON_OPENSELECT) 
-        {
-          shutDialog(hWnd);
-          char szString[_MAX_PATH];
-          Edit_GetText(GetDlgItem(hWndDirPicker, ID_EDIT_DIR), szString, sizeof(szString));
-          lstrcpy(lpszStringToReturn, szString);
-          EndDialog(hWnd, IDOK);
-          break;
-        }
-
-        ListBox_GetText(hWndCtl, index, szCurDir);
-
-        char szDir[_MAX_DIR];
-        LPSTR lpsz;
-        if((HIWORD(dwItemData) == ID_ICON_FOLDEROPEN) && (index != 0)) 
-        {
-          GetWindowText(hWndCtl, szDir, sizeof(szDir));
-          lpsz=_fstrstr(szDir, szCurDir);
-          *(lpsz + lstrlen(szCurDir)) = '\0';
-          lstrcpy(szCurDir, szDir);
-        }
-        if (_chdir(szCurDir) == 0) 
-        {
-          _getcwd(szCurDir, _MAX_PATH);
-          fillListBox(hWndDirPicker, szCurDir);
-        }
-      }
-      break;
-    case ID_COMBO_DIR:
-      if(codeNotify == CBN_SELCHANGE) 
-      {
-        char szDrive[80];
-        int index = ComboBox_GetCurSel(hWndCtl);
-        if(index == CB_ERR)
-          break;
-        ComboBox_GetLBText(hWndCtl, index, szDrive);
-
-        int iCurDrive = _getdrive();
-Retry:
-        HCURSOR hCursorOld = SetCursor(LoadCursor(NULL, IDC_WAIT));
-        SetCapture(hWndDirPicker);
-        if((0 == _chdrive((int)(szDrive[0] - 'a' + 1))) && (NULL != _getcwd(szCurDir, _MAX_PATH))) 
-        {
-          fillListBox(hWndDirPicker, szCurDir);
-          ListBox_SetTopIndex(GetDlgItem(hWndDirPicker, ID_LIST_DIR), 0);
-          SetCursor(hCursorOld);
-          ReleaseCapture();
-          break;
-        }
-        SetCursor(hCursorOld);
-        ReleaseCapture();
-
-        char szText[80];        
-        sprintf(szText, "Cannot read drive %c:", szDrive[0]);
-        if(IDRETRY == MessageBox(hWndDirPicker, szText, "Choose Directory", MB_ICONEXCLAMATION|MB_RETRYCANCEL))
-          goto Retry;
-        
-        //Changing drives failed so restore drive and selection
-        _chdrive(iCurDrive);
-
-        sprintf(szDrive, "%c:", (char)(iCurDrive + 'a' - 1));
-        index = ComboBox_SelectString(hWndCtl, -1, szDrive);
-      }
-      break;
-    case IDOK:
-      shutDialog(hWnd);
-      char szString[_MAX_PATH];
-      Edit_GetText(GetDlgItem(hWndDirPicker, ID_EDIT_DIR), szString, sizeof(szString));
-      lstrcpy(lpszStringToReturn, szString);
-      EndDialog(hWnd, IDOK);
-      break;
-    case IDCANCEL:
-      shutDialog(hWnd);
-      lpszStringToReturn[0] = '\0';
-      EndDialog(hWnd, IDCANCEL);
-      break;
-    default:
-      break;
-  }
-}
-
-static BOOL CALLBACK DirPickDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) 
-{
-  switch(msg) {
-    case WM_INITDIALOG:
-      onInitDialog(hWnd, (LPSTR)lParam);
-      break;
-    case WM_COMMAND:
-      HANDLE_WM_COMMAND(hWnd, wParam, lParam, onCommand);
-      break;
-    case WM_MEASUREITEM: 
-    {
-      static int cyItem = -1;      //Height of a listbox item
-      LPMEASUREITEMSTRUCT lpmis = (LPMEASUREITEMSTRUCT)lParam;
-      if(cyItem == -1) 
-      {
-        HFONT hFont = (HFONT)SendMessage(hWnd, WM_GETFONT, 0, 0L);
-        if(hFont == NULL)
-          hFont = GetStockFont(SYSTEM_FONT);
-        HDC hDC = GetDC(hWnd);
-        HFONT hFontOld = SelectFont(hDC, hFont);
-        TEXTMETRIC tm;
-        GetTextMetrics(hDC, &tm);
-        cyItem = max(ITEM_BITMAPHEIGHT, tm.tmHeight);
-        SelectFont(hDC, hFontOld);
-        ReleaseDC(hWnd, hDC);
-      }
-
-      lpmis->itemHeight = cyItem;
-    }
-      break;
-    case WM_DRAWITEM:
-      onDrawItem((LPDRAWITEMSTRUCT)lParam, ((UINT)wParam == ID_COMBO_DIR));
-      return TRUE; // to prevent default action in listbox (drawing focus)
-    default:
-      return FALSE;
-  }
-  return TRUE;
-}
-
-/*
- * DriveType
- *
- * Purpose:
- *  Augments the Windows API GetDriveType with a call to the CD-ROM
- *  extensions to determine if a drive is a floppy, hard disk, CD-ROM,
- *  RAM-drive, or networked  drive.
- *
- * Parameters:
- *  iDrive          UINT containing the zero-based drive index
- *
- * Return Value:
- *  UINT            One of the following values describing the drive:
- *                  DRIVE_FLOPPY, DRIVE_HARD, DRIVE_CDROM, DRIVE_RAMDISK,
- *                  DRIVE_NETWORK.
- *
- * Copyright (c)1992 Kraig Brockschmidt, All Right Reserved
- * Compuserve:  70750,2344
- * Internet  :  kraigb@microsoft.com
- *
- */
-UINT DriveType(UINT iDrive) 
-{
-  //Validate possible drive indices
-  if((0 > iDrive)  || (25 < iDrive))
-    return (UINT)-1;
-
-  static char path[] = "d:\\";
-  path[0] = 'a' + iDrive;
-  int iType = GetDriveType(path);  
-
-  /*
-   * Under Windows NT, GetDriveType returns complete information
-   * not provided under Windows 3.x which we now get through other
-   * means.
-   */
-
-  return iType;
-}
-
-BOOL PickupDirectory(HWND hWndOwner, LPSTR lpszString) 
-{
-  if(hWndOwner == NULL)
-    hWndOwner = GetDesktopWindow();
-  int ret = DialogBoxParam(hInst, MAKEINTRESOURCE(ID_DIALOG_CHOOSEDIR), hWndOwner, DirPickDlgProc, (LPARAM)lpszString);
-  return (ret == IDOK);
-}
deleted file mode 100644
--- a/modules/plugin/tools/spy/windows/gui_advanced.cpp
+++ /dev/null
@@ -1,100 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "xp.h"
-#include <windowsx.h>
-
-#include "windowsxx.h"
-
-#include "resource.h"
-#include "logger.h"
-
-static void onApply(HWND hWnd)
-{
-  Logger * logger = (Logger *)GetWindowLongPtr(hWnd, DWLP_USER);
-  if(!logger)
-    return;
-
-  logger->bSPALID = (BST_CHECKED == IsDlgButtonChecked(hWnd, IDC_CHECK_SPALID));
-  logger->bSaveSettings = TRUE;
-}
-
-static void onNotify(HWND hWnd, int idCtrl, LPNMHDR lpNMHdr)
-{
-  switch(lpNMHdr->code)
-  {
-    case PSN_RESET:
-      break;
-    case PSN_APPLY:
-      onApply(hWnd);
-      break;
-  }
-}
-
-static BOOL onInitDialog(HWND hWnd, HWND hWndFocus, LPARAM lParam)
-{
-  Logger * logger = NULL;
-
-  if(lParam)
-  {
-    logger = (Logger *)(((PROPSHEETPAGE *)lParam)->lParam);
-    SetWindowLongPtr(hWnd, DWLP_USER, (LONG_PTR)logger);
-  }
-
-  if(logger)
-  {
-    CheckDlgButton(hWnd, IDC_CHECK_SPALID, logger->bSPALID ? BST_CHECKED : BST_UNCHECKED);
-  }
-
-  return TRUE;
-}
-
-BOOL CALLBACK AdvancedPageProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
-{
-  switch(msg)
-  {
-    case WM_INITDIALOG:
-      return (BOOL)HANDLE_WM_INITDIALOG(hWnd, wParam, lParam, onInitDialog);
-    case WM_NOTIFY:
-      HANDLE_WM_NOTIFY(hWnd, wParam, lParam, onNotify);
-      break;
-
-    default:
-      return FALSE;
-  }
-  return TRUE;
-}
deleted file mode 100644
--- a/modules/plugin/tools/spy/windows/gui_fiter.cpp
+++ /dev/null
@@ -1,141 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "xp.h"
-#include <windowsx.h>
-
-#include "windowsxx.h"
-
-#include "resource.h"
-#include "logger.h"
-
-static void onCommand(HWND hWnd, int id, HWND hWndCtl, UINT codeNotify)
-{
-  switch (id)
-  {
-    case IDC_BUTTON_CHECKALL:
-    {
-      for(int i = IDC_CHECK_NPN_VERSION; i < IDC_CHECK_NPN_VERSION + TOTAL_NUMBER_OF_API_CALLS - 1; i++)
-        CheckDlgButton(hWnd, i, BST_CHECKED);
-      break;
-    }
-    case IDC_BUTTON_CLEARALL:
-    {
-      for(int i = IDC_CHECK_NPN_VERSION; i < IDC_CHECK_NPN_VERSION + TOTAL_NUMBER_OF_API_CALLS - 1; i++)
-        CheckDlgButton(hWnd, i, BST_UNCHECKED);
-      break;
-    }
-    default:
-      break;
-  }
-}
-
-static void onApply(HWND hWnd)
-{
-  Logger * logger = (Logger *)GetWindowLongPtr(hWnd, DWLP_USER);
-  if(!logger)
-    return;
-
-  BOOL mutedcalls[TOTAL_NUMBER_OF_API_CALLS];
-
-  mutedcalls[0] = FALSE; // for invalid call
-
-  // we assume that checkbox ids start with IDC_CHECK_NPN_VERSION and are consequitive
-  for(int i = IDC_CHECK_NPN_VERSION; i < IDC_CHECK_NPN_VERSION + TOTAL_NUMBER_OF_API_CALLS - 1; i++)
-    mutedcalls[i - IDC_CHECK_NPN_VERSION + 1] = (BST_UNCHECKED == IsDlgButtonChecked(hWnd, i));
-
-  logger->setMutedCalls(&mutedcalls[0]);
-  logger->bSaveSettings = TRUE;
-}
-
-static void onNotify(HWND hWnd, int idCtrl, LPNMHDR lpNMHdr)
-{
-  switch(lpNMHdr->code)
-  {
-    case PSN_RESET:
-      break;
-    case PSN_APPLY:
-      onApply(hWnd);
-      break;
-  }
-}
-
-static BOOL onInitDialog(HWND hWnd, HWND hWndFocus, LPARAM lParam)
-{
-  Logger * logger = NULL;
-
-  if(lParam)
-  {
-    logger = (Logger *)(((PROPSHEETPAGE *)lParam)->lParam);
-    SetWindowLongPtr(hWnd, DWLP_USER, (LONG_PTR)logger);
-  }
-
-  BOOL * mutedcalls = logger->getMutedCalls();
-
-  if(mutedcalls)
-  {
-    // we assume that checkbox ids start with IDC_CHECK_NPN_VERSION and are consequitive
-    for(int i = IDC_CHECK_NPN_VERSION; i < IDC_CHECK_NPN_VERSION + TOTAL_NUMBER_OF_API_CALLS - 1; i++)
-      CheckDlgButton(hWnd, i, mutedcalls[i - IDC_CHECK_NPN_VERSION + 1] ? BST_UNCHECKED : BST_CHECKED);
-  }
-  else
-  {
-    for(int i = IDC_CHECK_NPN_VERSION; i < IDC_CHECK_NPN_VERSION + TOTAL_NUMBER_OF_API_CALLS - 1; i++)
-      CheckDlgButton(hWnd, i, BST_CHECKED);
-  }
-
-  return TRUE;
-}
-
-BOOL CALLBACK FilterPageProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
-{
-  switch(msg)
-  {
-    case WM_INITDIALOG:
-      return (BOOL)HANDLE_WM_INITDIALOG(hWnd, wParam, lParam, onInitDialog);
-    case WM_COMMAND:
-      HANDLE_WM_COMMAND(hWnd, wParam, lParam, onCommand);
-      break;
-    case WM_NOTIFY:
-      HANDLE_WM_NOTIFY(hWnd, wParam, lParam, onNotify);
-      break;
-
-    default:
-      return FALSE;
-  }
-  return TRUE;
-}
deleted file mode 100644
--- a/modules/plugin/tools/spy/windows/gui_general.cpp
+++ /dev/null
@@ -1,100 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "xp.h"
-#include <windowsx.h>
-
-#include "windowsxx.h"
-
-#include "resource.h"
-#include "logger.h"
-
-static void onApply(HWND hWnd)
-{
-  Logger * logger = (Logger *)GetWindowLongPtr(hWnd, DWLP_USER);
-  if(!logger)
-    return;
-
-  logger->bOnTop = (BST_CHECKED == IsDlgButtonChecked(hWnd, IDC_CHECK_ONTOP));
-  logger->bSaveSettings = TRUE;
-}
-
-static void onNotify(HWND hWnd, int idCtrl, LPNMHDR lpNMHdr)
-{
-  switch(lpNMHdr->code)
-  {
-    case PSN_RESET:
-      break;
-    case PSN_APPLY:
-      onApply(hWnd);
-      break;
-  }
-}
-
-static BOOL onInitDialog(HWND hWnd, HWND hWndFocus, LPARAM lParam)
-{
-  Logger * logger = NULL;
-
-  if(lParam)
-  {
-    logger = (Logger *)(((PROPSHEETPAGE *)lParam)->lParam);
-    SetWindowLongPtr(hWnd, DWLP_USER, (LONG_PTR)logger);
-  }
-
-  if(logger)
-  {
-    CheckDlgButton(hWnd, IDC_CHECK_ONTOP, logger->bOnTop ? BST_CHECKED : BST_UNCHECKED);
-  }
-
-  return TRUE;
-}
-
-BOOL CALLBACK GeneralPageProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
-{
-  switch(msg)
-  {
-    case WM_INITDIALOG:
-      return (BOOL)HANDLE_WM_INITDIALOG(hWnd, wParam, lParam, onInitDialog);
-    case WM_NOTIFY:
-      HANDLE_WM_NOTIFY(hWnd, wParam, lParam, onNotify);
-      break;
-
-    default:
-      return FALSE;
-  }
-  return TRUE;
-}
deleted file mode 100644
--- a/modules/plugin/tools/spy/windows/gui_log.cpp
+++ /dev/null
@@ -1,167 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "xp.h"
-#include <windowsx.h>
-
-#include "windowsxx.h"
-
-#include "resource.h"
-#include "logger.h"
-#include "dirpick.h"
-
-static void onChooseDir(HWND hWnd)
-{
-  Logger * logger = (Logger *)GetWindowLongPtr(hWnd, DWLP_USER);
-  if(!logger)
-    return;
-
-  char string[_MAX_PATH];
-  char name[_MAX_PATH];
-
-  GetDlgItemText(hWnd, IDC_EDIT_FILE, string, strlen(string));
-  char * p = NULL;
-  p = strrchr(string, '\\');
-  if(p)
-  {
-    strcpy(name, p);
-    *p = '\0';
-  }
-
-  if(PickupDirectory(hWnd, string))
-  {
-    //check the last character for being '\'
-    if(string[strlen(string) - 1] == '\\')
-      string[strlen(string) - 1] = '\0';
-
-    if(p)
-      strcat(string, name);
-    else
-    {
-      strcat(string, "\\");
-      strcat(string, DEFAULT_LOG_FILE_NAME);
-    }
-    SetDlgItemText(hWnd, IDC_EDIT_FILE, string);
-  }
-}
-
-static void onCommand(HWND hWnd, int id, HWND hWndCtl, UINT codeNotify)
-{
-  switch (id)
-  {
-    case IDC_CHECK_TOFILE:
-      EnableWindow(GetDlgItem(hWnd, IDC_EDIT_FILE), (BST_CHECKED == IsDlgButtonChecked(hWnd, IDC_CHECK_TOFILE)));
-      EnableWindow(GetDlgItem(hWnd, IDC_BUTTON_CHOOSEDIR), (BST_CHECKED == IsDlgButtonChecked(hWnd, IDC_CHECK_TOFILE)));
-      break;
-    case IDC_BUTTON_CHOOSEDIR:
-      onChooseDir(hWnd);
-      break;
-    default:
-      break;
-  }
-}
-
-static void onApply(HWND hWnd)
-{
-  Logger * logger = (Logger *)GetWindowLongPtr(hWnd, DWLP_USER);
-  if(!logger)
-    return;
-
-  logger->bToWindow = (BST_CHECKED == IsDlgButtonChecked(hWnd, IDC_CHECK_TOWINDOW));
-  logger->bToConsole = (BST_CHECKED == IsDlgButtonChecked(hWnd, IDC_CHECK_TOCONSOLE));
-
-  char filename[_MAX_PATH];
-  GetDlgItemText(hWnd, IDC_EDIT_FILE, filename, strlen(filename));
-  logger->setToFile(BST_CHECKED == IsDlgButtonChecked(hWnd, IDC_CHECK_TOFILE), filename);
-  
-  logger->bSaveSettings = TRUE;
-}
-
-static void onNotify(HWND hWnd, int idCtrl, LPNMHDR lpNMHdr)
-{
-  switch(lpNMHdr->code)
-  {
-    case PSN_RESET:
-      break;
-    case PSN_APPLY:
-      onApply(hWnd);
-      break;
-  }
-}
-
-static BOOL onInitDialog(HWND hWnd, HWND hWndFocus, LPARAM lParam)
-{
-  Logger * logger = NULL;
-
-  if(lParam)
-  {
-    logger = (Logger *)(((PROPSHEETPAGE *)lParam)->lParam);
-    SetWindowLongPtr(hWnd, DWLP_USER, (LONG_PTR)logger);
-  }
-
-  if(logger)
-  {
-    CheckDlgButton(hWnd, IDC_CHECK_TOWINDOW, logger->bToWindow ? BST_CHECKED : BST_UNCHECKED);
-    CheckDlgButton(hWnd, IDC_CHECK_TOCONSOLE, logger->bToConsole ? BST_CHECKED : BST_UNCHECKED);
-    CheckDlgButton(hWnd, IDC_CHECK_TOFILE, logger->bToFile ? BST_CHECKED : BST_UNCHECKED);
-
-    SetDlgItemText(hWnd, IDC_EDIT_FILE, logger->szFile);
-    EnableWindow(GetDlgItem(hWnd, IDC_EDIT_FILE), (BST_CHECKED == IsDlgButtonChecked(hWnd, IDC_CHECK_TOFILE)));
-    EnableWindow(GetDlgItem(hWnd, IDC_BUTTON_CHOOSEDIR), (BST_CHECKED == IsDlgButtonChecked(hWnd, IDC_CHECK_TOFILE)));
-  }
-
-  return TRUE;
-}
-
-BOOL CALLBACK LogPageProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
-{
-  switch(msg)
-  {
-    case WM_INITDIALOG:
-      return (BOOL)HANDLE_WM_INITDIALOG(hWnd, wParam, lParam, onInitDialog);
-    case WM_COMMAND:
-      HANDLE_WM_COMMAND(hWnd, wParam, lParam, onCommand);
-      break;
-    case WM_NOTIFY:
-      HANDLE_WM_NOTIFY(hWnd, wParam, lParam, onNotify);
-      break;
-
-    default:
-      return FALSE;
-  }
-  return TRUE;
-}
deleted file mode 100644
--- a/modules/plugin/tools/spy/windows/gui_main.cpp
+++ /dev/null
@@ -1,305 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "xp.h"
-#include <windowsx.h>
-
-#include "resource.h"
-#include "loggerw.h"
-#include "profilew.h"
-
-extern HINSTANCE hInst;
-extern char * ActionName[];
-extern char szAppName[];
-
-BOOL CALLBACK GeneralPageProc(HWND, UINT, WPARAM, LPARAM);
-BOOL CALLBACK LogPageProc(HWND, UINT, WPARAM, LPARAM);
-BOOL CALLBACK FilterPageProc(HWND, UINT, WPARAM, LPARAM);
-BOOL CALLBACK AdvancedPageProc(HWND, UINT, WPARAM, LPARAM);
-
-static void onOptions(HWND hWnd, Logger * logger)
-{
-  if(!logger)
-    return;
-
-  PROPSHEETPAGE psp[4];
-
-  psp[0].dwSize = sizeof(psp[0]);
-  psp[0].dwFlags = PSP_DEFAULT;
-  psp[0].hInstance = hInst;
-  psp[0].pszTemplate = MAKEINTRESOURCE(IDD_PAGE_GENERAL);
-  psp[0].pszIcon = 0;
-  psp[0].pfnDlgProc = GeneralPageProc;
-  psp[0].pszTitle = 0;
-  psp[0].lParam = (LPARAM)logger;
-  psp[0].pfnCallback = NULL;
-
-  psp[1].dwSize = sizeof(psp[1]);
-  psp[1].dwFlags = PSP_DEFAULT;
-  psp[1].hInstance = hInst;
-  psp[1].pszTemplate = MAKEINTRESOURCE(IDD_PAGE_LOG);
-  psp[1].pszIcon = 0;
-  psp[1].pfnDlgProc = LogPageProc;
-  psp[1].pszTitle = 0;
-  psp[1].lParam = (LPARAM)logger;
-  psp[1].pfnCallback = NULL;
-
-  psp[2].dwSize = sizeof(psp[2]);
-  psp[2].dwFlags = PSP_DEFAULT;
-  psp[2].hInstance = hInst;
-  psp[2].pszTemplate = MAKEINTRESOURCE(IDD_PAGE_FILTER);
-  psp[2].pszIcon = 0;
-  psp[2].pfnDlgProc = FilterPageProc;
-  psp[2].pszTitle = 0;
-  psp[2].lParam = (LPARAM)logger;
-  psp[2].pfnCallback = NULL;
-
-  psp[3].dwSize = sizeof(psp[3]);
-  psp[3].dwFlags = PSP_DEFAULT;
-  psp[3].hInstance = hInst;
-  psp[3].pszTemplate = MAKEINTRESOURCE(IDD_PAGE_ADVANCED);
-  psp[3].pszIcon = 0;
-  psp[3].pfnDlgProc = AdvancedPageProc;
-  psp[3].pszTitle = 0;
-  psp[3].lParam = (LPARAM)logger;
-  psp[3].pfnCallback = NULL;
-
-  PROPSHEETHEADER psh;
-  psh.dwSize = sizeof(PROPSHEETHEADER);
-  psh.dwFlags = PSH_PROPSHEETPAGE | PSH_NOAPPLYNOW;
-  psh.hwndParent = hWnd;
-  psh.hInstance = hInst;
-  psh.pszIcon = 0;
-  psh.pszCaption = "Settings";
-  psh.nPages = sizeof(psp) / sizeof(psp[0]);
-  psh.nStartPage = 0;
-  psh.ppsp = psp;
-  psh.pfnCallback = NULL;
-
-  logger->bSaveSettings = FALSE;
-
-  int rv = PropertySheet(&psh);
-  if(rv == -1)
-    return;
-
-  if(logger->bSaveSettings)
-  {
-    ProfileWin profile;
-
-    if(hWnd != NULL)
-    {
-      RECT rc;
-      if(GetWindowRect(hWnd, &rc))
-        profile.setSizeAndPosition(rc.right - rc.left, rc.bottom - rc.top, rc.left, rc.top);
-    }
-
-    profile.setBool(NPSPY_REG_KEY_ONTOP, logger->bOnTop);
-    profile.setBool(NPSPY_REG_KEY_LOGTOWINDOW, logger->bToWindow);
-    profile.setBool(NPSPY_REG_KEY_LOGTOCONSOLE, logger->bToConsole);
-    profile.setBool(NPSPY_REG_KEY_LOGTOFILE, logger->bToFile);
-    profile.setBool(NPSPY_REG_KEY_SPALID, logger->bSPALID);
-    profile.setString(NPSPY_REG_KEY_LOGFILENAME, logger->szFile);
-
-    for(int i = 1; i < TOTAL_NUMBER_OF_API_CALLS; i++)
-      profile.setBool(ActionName[i], !logger->bMutedCalls[i]);
-
-    SetWindowPos(hWnd, logger->bOnTop ? HWND_TOPMOST : HWND_NOTOPMOST, 0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
-  }
-
-  logger->bSaveSettings = FALSE;
-}
-
-static void onCommand(HWND hWnd, int id, HWND hWndCtl, UINT codeNotify)
-{
-  LoggerWin * logger = (LoggerWin *)GetWindowLongPtr(hWnd, DWLP_USER);
-  switch (id)
-  {
-    case IDC_CHECK_MUTE:
-      if(logger)
-        logger->bMutedAll = (BST_CHECKED == IsDlgButtonChecked(hWnd, IDC_CHECK_MUTE));
-      break;
-    case IDC_BUTTON_OPTIONS:
-      onOptions(hWnd, logger);
-      break;
-    case IDC_BUTTON_CLEAR:
-      if(logger)
-        logger->onClear();
-      break;
-    default:
-      break;
-  }
-}
-
-static BOOL onInitDialog(HWND hWnd, HWND hWndFocus, LPARAM lParam)
-{
-  LoggerWin * logger = (LoggerWin *)lParam;
-  SetWindowLongPtr(hWnd, DWLP_USER, (LONG_PTR)logger);
-  SetWindowText(hWnd, szAppName);
-  HFONT hFont = GetStockFont(ANSI_FIXED_FONT);
-  SetWindowFont(GetDlgItem(hWnd, IDC_MAIN_OUTPUT), hFont, FALSE);
-
-  if(logger)
-  {
-    CheckDlgButton(hWnd, IDC_CHECK_MUTE, logger->bMutedAll ? BST_CHECKED : BST_UNCHECKED);
-    if(logger->width && logger->height)
-      SetWindowPos(hWnd, NULL, logger->x, logger->y, logger->width, logger->height, SWP_NOZORDER);
-
-    SetWindowPos(hWnd, logger->bOnTop ? HWND_TOPMOST : HWND_NOTOPMOST, 0,0,0,0, SWP_NOMOVE | SWP_NOSIZE);
-  }
-  return TRUE;
-}
-
-static void onDestroy(HWND hWnd)
-{
-  LoggerWin * logger = (LoggerWin *)GetWindowLongPtr(hWnd, DWLP_USER);
-  if(logger)
-    logger->onDestroyWindow();
-}
-
-static void onSize(HWND hWnd, UINT state, int cx, int cy)
-{
-  long bu = GetDialogBaseUnits();
-  int bux = LOWORD(bu);
-  int buy = HIWORD(bu);
-  int factorx = bux/4;
-  int factory = buy/8;
-
-  int marginLeft   = 7 * factorx;
-  int marginRight  = 0 * factorx;
-  int marginTop    = 0 * factory;
-  int marginBottom = 7 * factory;
-  int spaceHor     = 4 * factorx;
-  int spaceVer     = 7 * factory;
-
-  HWND hWndOutput = GetDlgItem(hWnd, IDC_MAIN_OUTPUT);
-  HWND hWndCheckMute = GetDlgItem(hWnd, IDC_CHECK_MUTE);
-  HWND hWndCheckOntop = GetDlgItem(hWnd, IDC_CHECK_ONTOP);
-  HWND hWndButtonOptions = GetDlgItem(hWnd, IDC_BUTTON_OPTIONS);
-  HWND hWndClear = GetDlgItem(hWnd, IDC_BUTTON_CLEAR);
-
-  RECT rcMain;
-  GetClientRect(hWnd, &rcMain);
-
-  int width = rcMain.right - rcMain.left;
-  int height = rcMain.bottom - rcMain.top;
-
-  RECT rcButtonOptions;
-  GetWindowRect(hWndButtonOptions, &rcButtonOptions);
-  SetWindowPos(hWndButtonOptions, NULL, 
-               width - marginLeft - rcButtonOptions.right + rcButtonOptions.left, 
-               height - rcButtonOptions.bottom + rcButtonOptions.top - marginBottom, 
-               0, 0, SWP_NOZORDER | SWP_NOSIZE);
-
-  RECT rcClear;
-  GetWindowRect(hWndClear, &rcClear);
-  SetWindowPos(hWndClear, NULL, 
-               width - marginLeft - rcClear.right + rcClear.left - rcButtonOptions.right + rcButtonOptions.left - spaceHor, 
-               height - rcClear.bottom + rcClear.top - marginBottom, 
-               0, 0, SWP_NOZORDER | SWP_NOSIZE);
-
-  RECT rcCheckMute;
-  GetWindowRect(hWndCheckMute, &rcCheckMute);
-  SetWindowPos(hWndCheckMute, NULL, 
-               marginLeft, 
-               height - rcCheckMute.bottom + rcCheckMute.top - marginBottom, 
-               0, 0, SWP_NOZORDER | SWP_NOSIZE);
-
-  RECT rcCheckOntop;
-  GetWindowRect(hWndCheckOntop, &rcCheckOntop);
-  SetWindowPos(hWndCheckOntop, NULL, 
-               marginLeft + rcCheckMute.right - rcCheckMute.left + spaceHor, 
-               height - rcCheckOntop.bottom + rcCheckOntop.top - marginBottom, 
-               0, 0, SWP_NOZORDER | SWP_NOSIZE);
-
-  SetWindowPos(hWndOutput, NULL, 
-               0, 0, 
-               width, 
-               height - rcButtonOptions.bottom + rcButtonOptions.top - marginBottom - marginTop - spaceVer, 
-               SWP_NOZORDER | SWP_NOMOVE);
-
-  // somehow the Clear button doesn't redraw itself well, so force it
-  InvalidateRect(hWndClear, NULL, TRUE);
-  UpdateWindow(hWndClear);
-}
-
-BOOL CALLBACK MainDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
-{
-  switch(msg)
-  {
-    case WM_INITDIALOG:
-      return (BOOL)HANDLE_WM_INITDIALOG(hWnd, wParam, lParam, onInitDialog);
-    case WM_COMMAND:
-      HANDLE_WM_COMMAND(hWnd, wParam, lParam, onCommand);
-      break;
-    case WM_CLOSE:
-      DestroyWindow(hWnd);
-      break;
-    case WM_DESTROY:
-      HANDLE_WM_DESTROY(hWnd, wParam, lParam, onDestroy);
-      break;
-    case WM_SIZE:
-      HANDLE_WM_SIZE(hWnd, wParam, lParam, onSize);
-      break;
-
-    default:
-      return FALSE;
-  }
-  return TRUE;
-}
-
-// This is exported function which allows to access Settings GUI from other applications
-void WINAPI SPY_Setup()
-{
-  LoggerWin logger;
-  ProfileWin profile;
-
-  profile.getBool(NPSPY_REG_KEY_ONTOP, &logger.bOnTop);
-  profile.getBool(NPSPY_REG_KEY_LOGTOWINDOW, &logger.bToWindow);
-  profile.getBool(NPSPY_REG_KEY_LOGTOCONSOLE, &logger.bToConsole);
-  profile.getBool(NPSPY_REG_KEY_LOGTOFILE, &logger.bToFile);
-  profile.getBool(NPSPY_REG_KEY_SPALID, &logger.bSPALID);
-  profile.getString(NPSPY_REG_KEY_LOGFILENAME, logger.szFile, strlen(logger.szFile));
-
-  for(int i = 1; i < TOTAL_NUMBER_OF_API_CALLS; i++)
-  {
-    BOOL selected = TRUE;
-    if(profile.getBool(ActionName[i], &selected))
-      logger.bMutedCalls[i] = !selected;
-  }
-
-  onOptions(NULL, &logger);
-}
\ No newline at end of file
deleted file mode 100644
--- a/modules/plugin/tools/spy/windows/gui_pause.cpp
+++ /dev/null
@@ -1,81 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "xp.h"
-#include <windowsx.h>
-
-#include "resource.h"
-
-static void onCommand(HWND hWnd, int id, HWND hWndCtl, UINT codeNotify)
-{
-  switch (id)
-  {
-    case IDOK:
-      EndDialog(hWnd, IDOK);
-      break;
-    case IDCANCEL:
-      EndDialog(hWnd, IDCANCEL);
-      break;
-    default:
-      break;
-  }
-}
-
-static BOOL onInitDialog(HWND hWnd, HWND hWndFocus, LPARAM lParam)
-{
-  SetWindowPos(hWnd, NULL, 0,0,0,0, SWP_NOZORDER);
-  return TRUE;
-}
-
-BOOL CALLBACK PauseDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
-{
-  switch(msg)
-  {
-    case WM_INITDIALOG:
-      return (BOOL)HANDLE_WM_INITDIALOG(hWnd, wParam, lParam, onInitDialog);
-    case WM_COMMAND:
-      HANDLE_WM_COMMAND(hWnd, wParam, lParam, onCommand);
-      break;
-    case WM_CLOSE:
-      EndDialog(hWnd, IDCANCEL);
-      break;
-
-    default:
-      return FALSE;
-  }
-  return TRUE;
-}
deleted file mode 100644
--- a/modules/plugin/tools/spy/windows/loggerw.cpp
+++ /dev/null
@@ -1,190 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "xp.h"
-#include "windowsx.h"
-
-#include "resource.h"
-#include "loggerw.h"
-#include "profilew.h"
-#include "actionnames.h"
-
-extern HINSTANCE hInst;
-static char szClassName[] = "NPSpyWindowClass";
-
-BOOL CALLBACK MainDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
-BOOL CALLBACK PauseDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
-
-LoggerWin::LoggerWin() : Logger(),
-  hWnd(NULL),
-  width(0),
-  height(0),
-  x(0),
-  y(0),
-  bSaveSettings(FALSE)
-{
-}
-
-LoggerWin::~LoggerWin()
-{
-}
-
-BOOL LoggerWin::platformInit()
-{
-  WNDCLASS wc;
-  wc.style         = 0; 
-  wc.lpfnWndProc   = DefDlgProc; 
-  wc.cbClsExtra    = 0; 
-  wc.cbWndExtra    = DLGWINDOWEXTRA; 
-  wc.hInstance     = hInst; 
-  wc.hIcon         = LoadIcon(hInst, MAKEINTRESOURCE(IDI_ICON_APP)); 
-  wc.hCursor       = LoadCursor(0, IDC_ARROW); 
-  wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
-  wc.lpszMenuName  = NULL; 
-  wc.lpszClassName = szClassName;
-
-  if(!RegisterClass(&wc))
-    return FALSE;
-
-  // restore prefs
-  ProfileWin profile;
-
-  profile.getBool(NPSPY_REG_KEY_ONTOP, &bOnTop);
-  profile.getBool(NPSPY_REG_KEY_LOGTOWINDOW, &bToWindow);
-  profile.getBool(NPSPY_REG_KEY_LOGTOCONSOLE, &bToConsole);
-  profile.getBool(NPSPY_REG_KEY_LOGTOFILE, &bToFile);
-  profile.getBool(NPSPY_REG_KEY_SPALID, &bSPALID);
-  profile.getString(NPSPY_REG_KEY_LOGFILENAME, szFile, strlen(szFile));
-
-  for(int i = 1; i < TOTAL_NUMBER_OF_API_CALLS; i++)
-  {
-    BOOL selected = TRUE;
-    if(profile.getBool(ActionName[i], &selected))
-      bMutedCalls[i] = !selected;
-  }
-  
-  if(!profile.getSizeAndPosition(&width, &height, &x, &y))
-  {
-    width = 0;
-    height = 0;
-    x = 0;
-    y = 0;
-  }
-
-  hWnd = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_DIALOG_MAIN), GetDesktopWindow(), (DLGPROC)MainDlgProc, (LPARAM)this);
-  if(hWnd == NULL)
-  {
-    UnregisterClass(szClassName, hInst);
-    return FALSE;
-  }
-
-  if(bOnTop)
-    SetWindowPos(hWnd, bOnTop ? HWND_TOPMOST : HWND_NOTOPMOST, 0,0,0,0, SWP_NOMOVE | SWP_NOSIZE);
-
-  return TRUE;
-}
-
-void LoggerWin::platformShut()
-{
-  if(hWnd != NULL)
-  {
-    char szLog[] = "--- GOING AWAY... PRESS SPACE BAR TO CONTINUE ---";
-    HWND hWndOutput = GetDlgItem(hWnd, IDC_MAIN_OUTPUT);
-    ListBox_AddString(hWndOutput, "");
-    ListBox_AddString(hWndOutput, szLog);
-    int count = ListBox_GetCount(hWndOutput);
-    ListBox_SetCaretIndex(hWndOutput, count - 1);
-    UpdateWindow(hWndOutput);
-
-    DialogBox(hInst, MAKEINTRESOURCE(IDD_DIALOG_PAUSE), hWnd, (DLGPROC)PauseDlgProc);
-
-    ProfileWin profile;
-
-    RECT rc;
-    if(GetWindowRect(hWnd, &rc))
-      profile.setSizeAndPosition(rc.right - rc.left, rc.bottom - rc.top, rc.left, rc.top);
-
-    DestroyWindow(hWnd);
-    hWnd = NULL;
-  }
-
-  UnregisterClass(szClassName, hInst);
-}
-
-void LoggerWin::onDestroyWindow()
-{
-  hWnd = NULL;
-}
-
-void LoggerWin::dumpStringToMainWindow(char * string)
-{
-  // listboxes don't want <CR> and <LF> so cut them off if any. The order is important.
-  char * p = strrchr(string, '\n');
-  if(p)
-    *p = '\0';
-
-  p = strrchr(string, '\r');
-  if(p)
-    *p = '\0';
-
-  HWND hWndOutput = GetDlgItem(hWnd, IDC_MAIN_OUTPUT);
-  ListBox_AddString(hWndOutput, string);
-  int count = ListBox_GetCount(hWndOutput);
-  if(count == 32767)
-    ListBox_ResetContent(hWndOutput);
-  ListBox_SetCaretIndex(hWndOutput, count - 1);
-  UpdateWindow(hWndOutput);
-}
-
-void LoggerWin::onClear()
-{
-  HWND hWndOutput = GetDlgItem(hWnd, IDC_MAIN_OUTPUT);
-  ListBox_ResetContent(hWndOutput);
-  UpdateWindow(hWndOutput);
-}
-
-Logger * NewLogger()
-{
-  LoggerWin * res = new LoggerWin();
-  return res;
-}
-
-void DeleteLogger(Logger * logger)
-{
-  if(logger)
-    delete logger;
-}
\ No newline at end of file
deleted file mode 100644
--- a/modules/plugin/tools/spy/windows/loggerw.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef __LOGGRERW_H__
-#define __LOGGRERW_H__
-
-#include "logger.h"
-
-class LoggerWin : public Logger
-{
-public:
-  HWND hWnd;
-  int width;
-  int height;
-  int x;
-  int y;
-  BOOL bSaveSettings;
-
-  LoggerWin();
-  ~LoggerWin();
-
-  BOOL platformInit();
-  void platformShut();
-  void dumpStringToMainWindow(char * string);
-
-  void onDestroyWindow();
-  void onClear();
-};
-
-#endif
deleted file mode 100644
--- a/modules/plugin/tools/spy/windows/npspy.def
+++ /dev/null
@@ -1,45 +0,0 @@
-; -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
-; 
-; ***** BEGIN LICENSE BLOCK *****
-; Version: MPL 1.1/GPL 2.0/LGPL 2.1
-;
-; The contents of this file are subject to the Mozilla Public License Version
-; 1.1 (the "License"); you may not use this file except in compliance with
-; the License. You may obtain a copy of the License at
-; http://www.mozilla.org/MPL/
-;
-; Software distributed under the License is distributed on an "AS IS" basis,
-; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-; for the specific language governing rights and limitations under the
-; License.
-;
-; The Original Code is mozilla.org code.
-;
-; The Initial Developer of the Original Code is
-; Netscape Communications Corporation.
-; Portions created by the Initial Developer are Copyright (C) 1998
-; the Initial Developer. All Rights Reserved.
-;
-; Contributor(s):
-;
-; Alternatively, the contents of this file may be used under the terms of
-; either the GNU General Public License Version 2 or later (the "GPL"), or
-; the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-; in which case the provisions of the GPL or the LGPL are applicable instead
-; of those above. If you wish to allow use of your version of this file only
-; under the terms of either the GPL or the LGPL, and not to allow others to
-; use your version of this file under the terms of the MPL, indicate your
-; decision by deleting the provisions above and replace them with the notice
-; and other provisions required by the GPL or the LGPL. If you do not delete
-; the provisions above, a recipient may use your version of this file under
-; the terms of any one of the MPL, the GPL or the LGPL.
-;
-; ***** END LICENSE BLOCK *****
-
-LIBRARY   NPSPY
-
-EXPORTS
-	NP_GetEntryPoints   @1
-	NP_Initialize       @2
-	NP_Shutdown         @3
-  SPY_Setup           @4
\ No newline at end of file
deleted file mode 100644
--- a/modules/plugin/tools/spy/windows/npspy.dsp
+++ /dev/null
@@ -1,279 +0,0 @@
-# Microsoft Developer Studio Project File - Name="npspy" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=npspy - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "npspy.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "npspy.mak" CFG="npspy - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "npspy - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "npspy - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "npspy - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NPSPY_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\include" /I "..\..\..\..\..\dist\include" /I "..\..\..\..\..\dist\include\nspr" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NPSPY_EXPORTS" /YX /FD /c
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-
-!ELSEIF  "$(CFG)" == "npspy - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NPSPY_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\include" /I "..\..\..\..\..\dist\include\plugin" /I "..\..\..\..\..\dist\include\nspr" /D "XP_WIN" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NPSPY_EXPORTS" /YX /FD /GZ /c
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib version.lib advapi32.lib comctl32.lib mpr.lib /nologo /dll /debug /machine:I386 /out:"..\..\..\..\..\dist\WIN32_D.OBJ\bin\plugins\npspy.dll" /pdbtype:sept
-
-!ENDIF 
-
-# Begin Target
-
-# Name "npspy - Win32 Release"
-# Name "npspy - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\dirpick.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\common\epmanager.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\common\format.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\gui_advanced.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\gui_fiter.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\gui_general.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\gui_log.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\gui_main.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\gui_pause.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\common\logfile.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\common\logger.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\loggerw.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\common\np_entry.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\common\npn_gate.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\common\npp_gate.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\npspy.def
-# End Source File
-# Begin Source File
-
-SOURCE=.\npspy.rc
-# End Source File
-# Begin Source File
-
-SOURCE=..\common\plugload.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\common\profile.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\profilew.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\common\utils.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\winentry.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\include\actionnames.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\dirpick.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\epmanager.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\format.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\logfile.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\logger.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\loggerw.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\plugload.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\profile.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\profilew.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\resource.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\windowsxx.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\xp.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# Begin Source File
-
-SOURCE=.\res\cdrom.ico
-# End Source File
-# Begin Source File
-
-SOURCE=.\res\floppy.ico
-# End Source File
-# Begin Source File
-
-SOURCE=.\res\foldcl.ico
-# End Source File
-# Begin Source File
-
-SOURCE=.\res\foldop.ico
-# End Source File
-# Begin Source File
-
-SOURCE=.\res\foldopse.ico
-# End Source File
-# Begin Source File
-
-SOURCE=.\res\harddr.ico
-# End Source File
-# Begin Source File
-
-SOURCE=.\res\icon.ico
-# End Source File
-# Begin Source File
-
-SOURCE=.\res\netdr.ico
-# End Source File
-# Begin Source File
-
-SOURCE=.\res\ramdr.ico
-# End Source File
-# End Group
-# End Target
-# End Project
deleted file mode 100644
--- a/modules/plugin/tools/spy/windows/npspy.dsw
+++ /dev/null
@@ -1,41 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "npspy"=.\npspy.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "spysetup"=.\spysetup.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
deleted file mode 100644
--- a/modules/plugin/tools/spy/windows/npspy.rc
+++ /dev/null
@@ -1,351 +0,0 @@
-//Microsoft Developer Studio generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "winresrc.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-#ifndef _MAC
-/////////////////////////////////////////////////////////////////////////////
-//
-// Version
-//
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,0,0,1
- PRODUCTVERSION 1,0,0,1
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x4L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-        BLOCK "040904e4"
-        BEGIN
-            VALUE "Comments", "\0"
-            VALUE "CompanyName", "mozilla.org\0"
-            VALUE "FileDescription", "Spy plugin\0"
-            VALUE "FileExtents", "*\0"
-            VALUE "FileOpenName", "any name (*.*)\0"
-            VALUE "FileVersion", "1, 0, 0, 1\0"
-            VALUE "InternalName", "SPYPLUGIN\0"
-            VALUE "LegalCopyright", "Copyright İ 2001-\0"
-            VALUE "LegalTrademarks", "\0"
-            VALUE "MIMEType", "*\0"
-            VALUE "OriginalFilename", "NPSPY.DLL\0"
-            VALUE "PrivateBuild", "\0"
-            VALUE "ProductName", "Mozilla Spy Plug-in\0"
-            VALUE "ProductVersion", "1, 0, 0, 1\0"
-            VALUE "SpecialBuild", "\0"
-        END
-    END
-    BLOCK "VarFileInfo"
-    BEGIN
-        VALUE "Translation", 0x409, 1252
-    END
-END
-
-#endif    // !_MAC
-
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE DISCARDABLE 
-BEGIN
-    "resource.h\0"
-END
-
-2 TEXTINCLUDE DISCARDABLE 
-BEGIN
-    "\r\n"
-    "\0"
-END
-
-#endif    // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-IDD_DIALOG_MAIN DIALOG DISCARDABLE  0, 0, 322, 212
-STYLE WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | 
-    WS_SYSMENU | WS_THICKFRAME
-CAPTION "Dialog"
-CLASS "NPSpyWindowClass"
-FONT 8, "MS Sans Serif"
-BEGIN
-    LISTBOX         IDC_MAIN_OUTPUT,0,0,321,185,LBS_MULTIPLESEL | 
-                    LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL | 
-                    WS_TABSTOP
-    CONTROL         "&Mute",IDC_CHECK_MUTE,"Button",BS_AUTOCHECKBOX | 
-                    WS_TABSTOP,7,195,32,10
-    PUSHBUTTON      "&Clear",IDC_BUTTON_CLEAR,209,191,50,14
-    PUSHBUTTON      "&Settings...",IDC_BUTTON_OPTIONS,263,191,50,14
-END
-
-IDD_DIALOG_PAUSE DIALOG DISCARDABLE  0, 0, 64, 29
-STYLE WS_POPUP
-FONT 8, "MS Sans Serif"
-BEGIN
-    DEFPUSHBUTTON   "OK",IDOK,7,7,50,14
-END
-
-IDD_PAGE_GENERAL DIALOG DISCARDABLE  0, 0, 238, 246
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "General"
-FONT 8, "MS Sans Serif"
-BEGIN
-    CONTROL         "Always on &top",IDC_CHECK_ONTOP,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,15,23,60,10
-    GROUPBOX        "Window",IDC_STATIC,7,7,224,32
-END
-
-IDD_PAGE_FILTER DIALOG DISCARDABLE  0, 0, 238, 246
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Filter"
-FONT 8, "MS Sans Serif"
-BEGIN
-    GROUPBOX        "Select calls to log",IDC_STATIC,7,7,224,232
-    CONTROL         "NPN_Version",IDC_CHECK_NPN_VERSION,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,15,22,59,10
-    CONTROL         "NPN_GetURLNotify",IDC_CHECK_NPN_GETURLNOTIFY,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,15,32,79,10
-    CONTROL         "NPN_GetURL",IDC_CHECK_NPN_GETURL,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,15,41,61,10
-    CONTROL         "NPN_PostURLNotify",IDC_CHECK_NPN_POSTURLNOTIFY,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,15,51,82,10
-    CONTROL         "NPN_PostURL",IDC_CHECK_NPN_POSTURL,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,15,61,64,10
-    CONTROL         "NPN_RequestRead",IDC_CHECK_NPN_REQUESTREAD,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,15,70,79,10
-    CONTROL         "NPN_NewStream",IDC_CHECK_NPN_NEWSTREAM,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,15,80,72,10
-    CONTROL         "NPN_Write",IDC_CHECK_NPN_WRITE,"Button",BS_AUTOCHECKBOX | 
-                    WS_TABSTOP,15,89,52,10
-    CONTROL         "NPN_DestroyStream",IDC_CHECK_NPN_DESTROYSTREAM,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,15,99,81,10
-    CONTROL         "NPN_Status",IDC_CHECK_NPN_STATUS,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,15,109,55,10
-    CONTROL         "NPN_UserAgent",IDC_CHECK_NPN_ESERAGENT,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,15,118,69,10
-    CONTROL         "NPN_MemAlloc",IDC_CHECK_NPN_MEMALLOC,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,15,128,66,10
-    CONTROL         "NPN_MemFree",IDC_CHECK_NPN_MEMFREE,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,15,137,65,10
-    CONTROL         "NPN_MemFlush",IDC_CHECK_NPN_MEMFLUSH,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,15,147,67,10
-    CONTROL         "NPN_ReloadPlugins",IDC_CHECK_NPN_RELOADPLUGINS,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,15,157,81,10
-    CONTROL         "NPN_GetJavaEnv",IDC_CHECK_NPN_GETJAVAENV,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,15,166,75,10
-    CONTROL         "NPN_GetJavaPeer",IDC_CHECK_NPN_GETJAVAPEER,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,15,176,77,10
-    CONTROL         "NPN_GetValue",IDC_CHECK_NPN_GETVALUE,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,15,185,65,10
-    CONTROL         "NPN_SetValue",IDC_CHECK_NPN_SETVALUE,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,15,195,64,10
-    CONTROL         "NPN_InvalidateRect",IDC_CHECK_NPN_INVALIDATEREGION,
-                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,205,81,10
-    CONTROL         "NPN_InvalidateRegion",IDC_CHECK_NPNINVALIDATEREGION,
-                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,214,89,10
-    CONTROL         "NPN_ForceRedraw",IDC_CHECK_NPN_FORCEREDRAW,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,15,224,78,10
-    CONTROL         "NPP_New",IDC_CHECK_NPP_NEW,"Button",BS_AUTOCHECKBOX | 
-                    WS_TABSTOP,140,22,49,10
-    CONTROL         "NPP_Destroy",IDC_CHECK_NPP_DESTROY,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,140,32,59,10
-    CONTROL         "NPP_SetWindow",IDC_CHECK_NPP_SETWINDOW,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,140,41,71,10
-    CONTROL         "NPP_NewStream",IDC_CHECK_NPP_NEWSTREAM,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,140,51,71,10
-    CONTROL         "NPP_DestroyStream",IDC_CHECK_NPP_DESTROYSTREAM,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,140,61,81,10
-    CONTROL         "NPP_StreamAsFile",IDC_CHECK_NPP_STREAMASFILE,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,140,70,75,10
-    CONTROL         "NPP_Write",IDC_CHECK_NPP_WRITE,"Button",BS_AUTOCHECKBOX | 
-                    WS_TABSTOP,140,80,51,10
-    CONTROL         "NPP_WriteReady",IDC_CHECK_NPP_WRITEREADY,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,140,89,72,10
-    CONTROL         "NPP_Print",IDC_CHECK_NPP_PRINT,"Button",BS_AUTOCHECKBOX | 
-                    WS_TABSTOP,140,99,49,10
-    CONTROL         "NPP_HandleEvent",IDC_CHECK_NPP_HANDLEEVENT,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,140,109,76,10
-    CONTROL         "NPP_URLNotify",IDC_CHECK_NPP_URLNOTIFY,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,140,118,67,10
-    CONTROL         "NPP_GetJavaClass",IDC_CHECK_NPP_GETJAVACLASS,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,140,128,78,10
-    CONTROL         "NPP_GetValue",IDC_CHECK_NPP_GETVALUE,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,140,137,64,10
-    CONTROL         "NPP_SetValue",IDC_CHECK_NPP_SETVALUE,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,140,147,63,10
-    PUSHBUTTON      "&Check All",IDC_BUTTON_CHECKALL,169,198,50,14
-    PUSHBUTTON      "C&lear All",IDC_BUTTON_CLEARALL,169,216,50,14
-END
-
-IDD_PAGE_LOG DIALOG DISCARDABLE  0, 0, 238, 246
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Log"
-FONT 8, "MS Sans Serif"
-BEGIN
-    GROUPBOX        "Choose where to output",IDC_STATIC,7,7,224,66
-    CONTROL         "To &window",IDC_CHECK_TOWINDOW,"Button",BS_AUTOCHECKBOX | 
-                    WS_TABSTOP,15,23,51,10
-    CONTROL         "To c&onsole",IDC_CHECK_TOCONSOLE,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,15,37,51,10
-    CONTROL         "To &file",IDC_CHECK_TOFILE,"Button",BS_AUTOCHECKBOX | 
-                    WS_TABSTOP,15,51,35,10
-    EDITTEXT        IDC_EDIT_FILE,52,49,152,14,ES_AUTOHSCROLL
-    PUSHBUTTON      "...",IDC_BUTTON_CHOOSEDIR,206,49,19,14
-END
-
-IDD_PAGE_ADVANCED DIALOG DISCARDABLE  0, 0, 238, 246
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Advanced"
-FONT 8, "MS Sans Serif"
-BEGIN
-    CONTROL         "&Shutdown immediately after the last instance destroyed",
-                    IDC_CHECK_SPALID,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
-                    15,23,188,10
-    GROUPBOX        "Shutdown policy",IDC_STATIC,7,7,224,88
-    LTEXT           "Use this option to emulate 4.x behaviour when NP_Shutdown is called after the last plugin instance is destroyed. If this box is checked the Spy Plugin will call NP_Shutdown after NPP_Destroy is called on last instance.",
-                    IDC_STATIC,15,39,209,33
-    LTEXT           "If this box is unchecked NP_Shutdown will be issued only when the Navigator commands so.",
-                    IDC_STATIC,15,71,209,19
-END
-
-ID_DIALOG_CHOOSEDIR DIALOG DISCARDABLE  0, 0, 228, 143
-STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
-CAPTION "Choose Directory"
-FONT 8, "MS Sans Serif"
-BEGIN
-    LTEXT           "Directory &Name:",-1,7,9,55,8
-    EDITTEXT        ID_EDIT_DIR,7,20,151,13,ES_AUTOHSCROLL
-    LISTBOX         ID_LIST_DIR,7,33,151,74,LBS_OWNERDRAWFIXED | 
-                    LBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
-    LTEXT           "Dri&ves:",-1,7,111,26,8
-    COMBOBOX        ID_COMBO_DIR,7,121,151,68,CBS_DROPDOWNLIST | 
-                    CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | WS_VSCROLL | 
-                    WS_TABSTOP
-    DEFPUSHBUTTON   "OK",IDOK,171,9,50,14
-    PUSHBUTTON      "Cancel",IDCANCEL,171,27,50,14
-    LISTBOX         ID_LISTTEMP_DIR,181,53,20,40,LBS_SORT | 
-                    LBS_NOINTEGRALHEIGHT | NOT WS_VISIBLE | WS_VSCROLL | 
-                    WS_TABSTOP
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO DISCARDABLE 
-BEGIN
-    IDD_DIALOG_MAIN, DIALOG
-    BEGIN
-        BOTTOMMARGIN, 205
-    END
-
-    IDD_DIALOG_PAUSE, DIALOG
-    BEGIN
-        LEFTMARGIN, 7
-        RIGHTMARGIN, 57
-        TOPMARGIN, 7
-        BOTTOMMARGIN, 22
-    END
-
-    IDD_PAGE_GENERAL, DIALOG
-    BEGIN
-        LEFTMARGIN, 7
-        RIGHTMARGIN, 231
-        TOPMARGIN, 7
-        BOTTOMMARGIN, 239
-    END
-
-    IDD_PAGE_FILTER, DIALOG
-    BEGIN
-        LEFTMARGIN, 7
-        RIGHTMARGIN, 231
-        TOPMARGIN, 7
-        BOTTOMMARGIN, 239
-    END
-
-    IDD_PAGE_LOG, DIALOG
-    BEGIN
-        LEFTMARGIN, 7
-        RIGHTMARGIN, 231
-        TOPMARGIN, 7
-        BOTTOMMARGIN, 239
-    END
-
-    IDD_PAGE_ADVANCED, DIALOG
-    BEGIN
-        LEFTMARGIN, 7
-        RIGHTMARGIN, 231
-        TOPMARGIN, 7
-        BOTTOMMARGIN, 239
-    END
-END
-#endif    // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Icon
-//
-
-// Icon with lowest ID value placed first to ensure application icon
-// remains consistent on all systems.
-IDI_ICON_APP            ICON    DISCARDABLE     "res/icon.ico"
-ID_ICON_DRIVECDROM      ICON    DISCARDABLE     "res/cdrom.ICO"
-ID_ICON_DRIVEFLOPPY     ICON    DISCARDABLE     "res/floppy.ICO"
-ID_ICON_DRIVEHARD       ICON    DISCARDABLE     "res/harddr.ICO"
-ID_ICON_DRIVENETWORK    ICON    DISCARDABLE     "res/netdr.ICO"
-ID_ICON_DRIVERAM        ICON    DISCARDABLE     "res/ramdr.ICO"
-ID_ICON_FOLDERCLOSED    ICON    DISCARDABLE     "res/foldcl.ICO"
-ID_ICON_FOLDEROPEN      ICON    DISCARDABLE     "res/foldop.ICO"
-ID_ICON_OPENSELECT      ICON    DISCARDABLE     "res/foldopse.ICO"
-#endif    // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif    // not APSTUDIO_INVOKED
-
deleted file mode 100644
--- a/modules/plugin/tools/spy/windows/profilew.cpp
+++ /dev/null
@@ -1,152 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include <windows.h>
-
-#include "profilew.h"
-
-ProfileWin::ProfileWin() : Profile()
-{
-  hKey = NULL;
-  char szClass[] = "SpyPluginClass";
-  DWORD disp = 0L;
-
-  LONG res = RegCreateKeyEx(HKEY_LOCAL_MACHINE, 
-                            NPSPY_REG_SUBKEY, 
-                            0L, 
-                            szClass, 
-                            0L, 
-                            KEY_READ | KEY_WRITE, 
-                            NULL, 
-                            &hKey, 
-                            &disp);
-
-  if(res != ERROR_SUCCESS)
-    hKey = NULL;
-}
-
-ProfileWin::~ProfileWin()
-{
-  if(hKey)
-    RegCloseKey(hKey);
-}
-
-BOOL ProfileWin::getBool(char * key, BOOL * value)
-{
-  if(!value)
-    return FALSE;
-
-  DWORD size = sizeof(DWORD);
-  DWORD val = 1L;
-  LONG res = RegQueryValueEx(hKey, key, 0L, NULL, (BYTE *)&val, &size);
-
-  if(res != ERROR_SUCCESS)
-    return FALSE;
-
-  *value = (val == 0L) ? FALSE : TRUE;
-
-  return TRUE;
-}
-
-BOOL ProfileWin::setBool(char * key, BOOL value)
-{
-  DWORD size = sizeof(DWORD);
-  DWORD val = value ? 1L : 0L;
-  LONG res = RegSetValueEx(hKey, key, 0L, REG_DWORD, (const BYTE *)&val, size);
-  return (res == ERROR_SUCCESS);
-}
-
-BOOL ProfileWin::getString(char * key, char * string, int size)
-{
-  LONG res = RegQueryValueEx(hKey, key, 0L, NULL, (BYTE *)string, (DWORD *)&size);
-  return (res == ERROR_SUCCESS);
-}
-
-BOOL ProfileWin::setString(char * key, char * string)
-{
-  DWORD size = strlen(string);
-  LONG res = RegSetValueEx(hKey, key, 0L, REG_SZ, (const BYTE *)string, size);
-  return (res == ERROR_SUCCESS);
-}
-
-BOOL ProfileWin::getSizeAndPosition(int *width, int *height, int *x, int *y)
-{
-  DWORD size = sizeof(DWORD);
-  LONG res = ERROR_SUCCESS;
-
-  res = RegQueryValueEx(hKey, NPSPY_REG_KEY_WIDTH, 0L, NULL, (BYTE *)width, &size);
-  if(res != ERROR_SUCCESS)
-    return FALSE; 
-
-  res = RegQueryValueEx(hKey, NPSPY_REG_KEY_HEIGHT, 0L, NULL, (BYTE *)height, &size);
-  if(res != ERROR_SUCCESS)
-    return FALSE; 
-
-  res = RegQueryValueEx(hKey, NPSPY_REG_KEY_X, 0L, NULL, (BYTE *)x, &size);
-  if(res != ERROR_SUCCESS)
-    return FALSE; 
-
-  res = RegQueryValueEx(hKey, NPSPY_REG_KEY_Y, 0L, NULL, (BYTE *)y, &size);
-  if(res != ERROR_SUCCESS)
-    return FALSE; 
-
-  return TRUE;
-}
-
-BOOL ProfileWin::setSizeAndPosition(int width, int height, int x, int y)
-{
-  DWORD size = sizeof(DWORD);
-  LONG res = ERROR_SUCCESS;
-  
-  res = RegSetValueEx(hKey, NPSPY_REG_KEY_WIDTH, 0L, REG_DWORD, (const BYTE *)&width, size);
-  if(res != ERROR_SUCCESS)
-    return FALSE;
-  
-  res = RegSetValueEx(hKey, NPSPY_REG_KEY_HEIGHT, 0L, REG_DWORD, (const BYTE *)&height, size);
-  if(res != ERROR_SUCCESS)
-    return FALSE;
-  
-  res = RegSetValueEx(hKey, NPSPY_REG_KEY_X, 0L, REG_DWORD, (const BYTE *)&x, size);
-  if(res != ERROR_SUCCESS)
-    return FALSE;
-  
-  res = RegSetValueEx(hKey, NPSPY_REG_KEY_Y, 0L, REG_DWORD, (const BYTE *)&y, size);
-  if(res != ERROR_SUCCESS)
-    return FALSE;
-
-  return TRUE;
-}
deleted file mode 100644
--- a/modules/plugin/tools/spy/windows/profilew.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef __PROFILEW_H__
-#define __PROFILEW_H__
-
-#include "profile.h"
-
-class ProfileWin : public Profile
-{
-  HKEY hKey;
-
-public:
-  ProfileWin();
-  ~ProfileWin();
-
-  BOOL getBool(char * key, BOOL * value);
-  BOOL setBool(char * key, BOOL value);
-
-  BOOL getString(char * key, char * string, int size);
-  BOOL setString(char * key, char * string);
-
-  BOOL getSizeAndPosition(int *width, int *height, int *x, int *y);
-  BOOL setSizeAndPosition(int width, int height, int x, int y);
-};
-
-#define NPSPY_REG_SUBKEY "Software\\Netscape\\SpyPlugin"
-
-#define NPSPY_REG_KEY_ONTOP        "AlwaysOnTop"
-#define NPSPY_REG_KEY_LOGTOWINDOW  "LogToWindow"
-#define NPSPY_REG_KEY_LOGTOCONSOLE "LogToConsole"
-#define NPSPY_REG_KEY_LOGTOFILE    "LogToFile"
-#define NPSPY_REG_KEY_SPALID       "ShutdownPluginsAfterDestroy"
-#define NPSPY_REG_KEY_WIDTH        "width"
-#define NPSPY_REG_KEY_HEIGHT       "height"
-#define NPSPY_REG_KEY_X            "x"
-#define NPSPY_REG_KEY_Y            "y"
-#define NPSPY_REG_KEY_LOGFILENAME  "LogFileName"
-
-#endif
-
deleted file mode 100644
index 5e2821593e9c7180d98029576019afd7e1b67fc0..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index b4209604ae035b9f2ba70d09302f6344558f2f34..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index cc2ff7f62398718598d8e3c881aeb459d8debbb2..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 10e28405b059ce3553ca28fc171c77968caaa294..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index c80112e3f31254cdffdff6999bbaeefa0707dec4..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 04fe5a5a493a7793e23734aa51df1a53af5e42e4..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index dc53279e9b92cef0d2f74134d9030a63bbdbb6b2..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index f3387d224631d56e013753bf5a6715954295e886..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index ac11f68ced3238a2c3dd33a697de5381b9dac279..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/modules/plugin/tools/spy/windows/resource.h
+++ /dev/null
@@ -1,92 +0,0 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Developer Studio generated include file.
-// Used by npspy.rc
-//
-#define IDC_STATIC                      -1
-#define IDD_DIALOG_OPTIONS              101
-#define IDI_ICON1                       102
-#define IDI_ICON_APP                    102
-#define ID_DIALOG_CHOOSEDIR             102
-#define IDD_DIALOG_PAUSE                103
-#define ID_ICON_DRIVEFLOPPY             103
-#define IDD_PAGE_GENERAL                104
-#define ID_ICON_DRIVEHARD               104
-#define IDD_PAGE_FILTER                 105
-#define ID_ICON_DRIVENETWORK            105
-#define IDD_PAGE_LOG                    106
-#define ID_ICON_DRIVECDROM              106
-#define IDD_PAGE_ADVANCED               107
-#define ID_ICON_DRIVERAM                107
-#define ID_ICON_FOLDERCLOSED            108
-#define ID_ICON_FOLDEROPEN              109
-#define ID_ICON_OPENSELECT              110
-#define IDD_MAIN                        308
-#define IDD_DIALOG_MAIN                 308
-#define IDC_MAIN_OUTPUT                 1001
-#define IDC_CHECK_NPN_VERSION           1002
-#define IDC_CHECK_NPN_GETURLNOTIFY      1003
-#define ID_EDIT_DIR                     1003
-#define IDC_CHECK_NPNGETURL             1004
-#define IDC_CHECK_NPN_GETURL            1004
-#define ID_LIST_DIR                     1004
-#define IDC_CHECK_NPN_POSTURLNOTIFY     1005
-#define ID_COMBO_DIR                    1005
-#define IDC_CHECK_NPN_POSTURL           1006
-#define ID_LISTTEMP_DIR                 1006
-#define IDC_CHECK_NPN_REQUESTREAD       1007
-#define IDC_CHECK_NPN_NEWSTREAM         1008
-#define IDC_CHECK_NPN_WRITE             1009
-#define IDC_CHECK_NPN_DESTROYSTREAM     1010
-#define IDC_CHECK_NPN_STATUS            1011
-#define IDC_CHECK_NPN_ESERAGENT         1012
-#define IDC_CHECK_NPN_MEMALLOC          1013
-#define IDC_CHECK_NPN_MEMFREE           1014
-#define IDC_CHECK_NPN_MEMFLUSH          1015
-#define IDC_CHECK_NPN_RELOADPLUGINS     1016
-#define IDC_CHECK_NPNGETJAVAENV         1017
-#define IDC_CHECK_NPN_GETJAVAENV        1017
-#define IDC_CHECK_NPN_GETJAVAPEER       1018
-#define IDC_CHECK_NPN_GETVALUE          1019
-#define IDC_CHECK_NPN_SETVALUE          1020
-#define IDC_CHECK_NPN_INVALIDATERECT    1021
-#define IDC_CHECK_NPN_INVALIDATEREGION  1021
-#define IDC_CHECK_NPNINVALIDATEREGION   1022
-#define IDC_CHECK_NPN_FORCEREDRAW       1023
-#define IDC_CHECK_NPP_NEW               1024
-#define IDC_CHECK_NPP_DESTROY           1025
-#define IDC_CHECK_NPP_SETWINDOW         1026
-#define IDC_CHECK_NPP_NEWSTREAM         1027
-#define IDC_CHECK_NPP_DESTROYSTREAM     1028
-#define IDC_CHECK_NPP_STREAMASFILE      1029
-#define IDC_CHECK_NPP_WRITEREADY        1030
-#define IDC_CHECK_NPP_WRITE             1031
-#define IDC_CHECK_NPP_PRINT             1032
-#define IDC_CHECK_NPP_HANDLEEVENT       1033
-#define IDC_CHECK_NPP_URLNOTIFY         1034
-#define IDC_CHECK_NPP_GETJAVACLASS      1035
-#define IDC_CHECK_NPP_GETVALUE          1036
-#define IDC_CHECK_NPP_SETVALUE          1037
-#define IDC_BUTTON_CHECKALL             1038
-#define IDC_BUTTON_CLEARALL             1039
-#define IDC_CHECK_TOCONSOLE             1041
-#define IDC_CHECK_TOWINDOW              1042
-#define IDC_CHECK_TOFILE                1043
-#define IDC_CHECK_SPALID                1044
-#define IDC_EDIT_FILE                   1047
-#define IDC_BUTTON_CHOOSEDIR            1048
-#define IDC_CHECK_MUTE                  2019
-#define IDC_CHECK_ONTOP                 2020
-#define IDC_BUTTON_OPTIONS              2023
-#define IDC_BUTTON_CLEAR                2024
-#define IDC_OUTPUT                      2026
-
-// Next default values for new objects
-// 
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE        108
-#define _APS_NEXT_COMMAND_VALUE         40001
-#define _APS_NEXT_CONTROL_VALUE         1049
-#define _APS_NEXT_SYMED_VALUE           101
-#endif
-#endif
deleted file mode 100644
--- a/modules/plugin/tools/spy/windows/setupexe.cpp
+++ /dev/null
@@ -1,8 +0,0 @@
-#include <windows.h>
-#include "setup.h"
-
-int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
-{
-  SPY_Setup();
-  return 0;
-}
deleted file mode 100644
--- a/modules/plugin/tools/spy/windows/spysetup.dsp
+++ /dev/null
@@ -1,106 +0,0 @@
-# Microsoft Developer Studio Project File - Name="spysetup" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Application" 0x0101
-
-CFG=spysetup - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "spysetup.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "spysetup.mak" CFG="spysetup - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "spysetup - Win32 Release" (based on "Win32 (x86) Application")
-!MESSAGE "spysetup - Win32 Debug" (based on "Win32 (x86) Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "spysetup - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
-
-!ELSEIF  "$(CFG)" == "spysetup - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "spysetup___Win32_Debug"
-# PROP BASE Intermediate_Dir "spysetup___Win32_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../include" /D "XP_WIN" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib debug/npspy.lib /nologo /subsystem:windows /debug /machine:I386 /out:"..\..\..\..\dist\WIN32_D.OBJ\bin\plugins\spysetup.exe" /pdbtype:sept
-
-!ENDIF 
-
-# Begin Target
-
-# Name "spysetup - Win32 Release"
-# Name "spysetup - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\setupexe.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
deleted file mode 100644
--- a/modules/plugin/tools/spy/windows/windowsxx.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef __WINDOWSXX_H__
-#define __WINDOWSXX_H__
-
-/* void onNotify(HWND hWnd, int idCtrl, LPNMHDR lpNMHdr) */
-#define HANDLE_WM_NOTIFY(hwnd, wParam, lParam, fn) \
-    (fn)((hwnd), (int)(wParam), (LPNMHDR)lParam)
-
-#endif
deleted file mode 100644
--- a/modules/plugin/tools/spy/windows/winentry.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-// Windows entry point. Mainly for debug purposes.
-#include <windows.h>
-
-char szAppName[] = "NPSpy";
-HINSTANCE hInst = NULL;
-
-BOOL WINAPI DllMain(HINSTANCE hDLL, DWORD dwReason, LPVOID lpReserved)
-{
-#ifdef DEBUG
-  char szReason[80];
-
-  switch (dwReason)
-  {
-    case DLL_PROCESS_ATTACH:
-      strcpy(szReason, "DLL_PROCESS_ATTACH");
-      break;
-    case DLL_THREAD_ATTACH:
-      strcpy(szReason, "DLL_THREAD_ATTACH");
-      break;
-    case DLL_PROCESS_DETACH:
-      strcpy(szReason, "DLL_PROCESS_DETACH");
-      break;
-    case DLL_THREAD_DETACH:
-      strcpy(szReason, "DLL_THREAD_DETACH");
-      break;
-  }
-#endif
-
-  hInst = hDLL;
-  return TRUE;
-}
deleted file mode 100644
--- a/modules/plugin/tools/tester/common/Makefile.in
+++ /dev/null
@@ -1,75 +0,0 @@
-#
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-# http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Original Code is mozilla.org code.
-#
-# The Initial Developer of the Original Code is
-# Netscape Communications Corporation.
-# Portions created by the Initial Developer are Copyright (C) 1998
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 2 or later (the "GPL"), or
-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
-
-DEPTH           = ../../../../..
-topsrcdir       = @top_srcdir@
-srcdir          = @srcdir@
-VPATH           = @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-MODULE          = plugin
-LIBRARY_NAME    = plcommon_s
-REQUIRES        = plugin \
-                  $(NULL)
-
-CPPSRCS        = \
-                log.cpp \
-                logfile.cpp \
-                logger.cpp \
-                loghlp.cpp \
-                npn_gate.cpp \
-                npp_gate.cpp \
-                np_entry.cpp \
-                plugbase.cpp \
-                pplib.cpp \
-                profile.cpp \
-                script.cpp \
-                scripter.cpp \
-                scrpthlp.cpp \
-                strconv.cpp \
-                xp.cpp \
-                $(NULL)
-
-FORCE_STATIC_LIB = 1
-
-include $(topsrcdir)/config/rules.mk
-
-LOCAL_INCLUDES += \
-                  -I$(srcdir)/../include \
-                  $(NULL)
-
deleted file mode 100644
--- a/modules/plugin/tools/tester/common/log.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "xp.h"
-
-#include "log.h"
-
-/********************************/
-/*      CLogItemList class      */
-/********************************/
-
-CLogItemList::CLogItemList() :
-  m_pFirst(NULL),
-  m_pLast(NULL),
-  m_iCount(0)
-{
-}
-
-CLogItemList::~CLogItemList()
-{
-  while(m_pFirst != NULL)
-  {
-    LogItemListElement * plile = m_pFirst;
-    m_pFirst = plile->pNext;
-    delete plile;
-  }
-}
-
-int CLogItemList::add(LogItemStruct * plis)
-{
-  LogItemListElement *plile = new LogItemListElement;
-
-  if(plile == NULL)
-    return -1;
-
-  plile->plis = plis;
-
-  if(m_pFirst == NULL)
-  {
-    m_pFirst = plile;
-    plile->pPrev = NULL;
-  }
-  else
-  {
-    m_pLast->pNext = plile;
-    plile->pPrev = m_pLast;
-  }
-
-  plile->pNext = NULL;
-  m_pLast = plile;
-  m_iCount++;
-
-  int iRet = m_iCount;
-  return iRet;
-}
deleted file mode 100644
--- a/modules/plugin/tools/tester/common/logfile.cpp
+++ /dev/null
@@ -1,86 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "xp.h"
-
-#include "logfile.h"
-
-CLogFile::CLogFile() :
-  m_hFile(NULL)
-{
-  m_szFileName[0] = '\0';
-}
-
-CLogFile::~CLogFile()
-{
-  if(m_hFile != NULL)
-    close();
-}
-
-BOOL CLogFile::create(LPSTR szFileName, BOOL bDeleteExisting)
-{
-  strcpy(m_szFileName, szFileName);
-
-  if(XP_IsFile(m_szFileName))
-  {
-    if(!bDeleteExisting)
-      return FALSE;
-  }
-
-  m_hFile = XP_CreateFile(m_szFileName);
-  return (m_hFile != NULL);
-}
-
-void CLogFile::close()
-{
-  if(m_hFile != NULL)
-  {
-    XP_CloseFile(m_hFile);
-    m_hFile = NULL;
-  }
-}
-
-DWORD CLogFile::write(LPSTR szBuf)
-{
-  return XP_WriteFile(m_hFile, szBuf, strlen(szBuf));
-}
-
-void CLogFile::flush()
-{
-  XP_FlushFileBuffers(m_hFile);
-}
-
deleted file mode 100644
--- a/modules/plugin/tools/tester/common/logger.cpp
+++ /dev/null
@@ -1,369 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "xp.h"
-#include "logger.h"
-#include "loghlp.h"
-
-#ifdef XP_MAC
-	CLogger *pLogger = new CLogger();
-#endif
-
-/********************************/
-/*       CLogger class          */
-/********************************/
-
-CLogger::CLogger(LPSTR szTarget) :
-  m_pPlugin(NULL),
-  m_pPluginInstance(NULL),
-  m_pLog(NULL),
-  m_pLogFile(NULL),
-  m_bShowImmediately(FALSE),
-  m_bLogToFile(FALSE),
-  m_bLogToFrame(TRUE),
-  m_bBlockLogToFile(TRUE),
-  m_bBlockLogToFrame(FALSE),
-  m_pStream(NULL),
-  m_dwStartTime(0xFFFFFFFF),
-  m_iStringDataWrap(LOGGER_DEFAULT_STRING_WRAP),
-  m_bStale(FALSE)
-{
-  if(szTarget != NULL)
-    strcpy(m_szTarget, szTarget);
-  else
-    strcpy(m_szTarget, "");
-
-  m_pLog = new CLogItemList();
-  strcpy(m_szStreamType, "text/plain");
-}
-
-CLogger::~CLogger()
-{
-  if(m_pLogFile != NULL)
-    delete m_pLogFile;
-
-  if(m_pLog != NULL)
-    delete m_pLog;
-}
-
-void CLogger::associate(CPluginBase * pPlugin)
-{
-  m_pPlugin = pPlugin;
-  m_pPluginInstance = m_pPlugin->getNPInstance();
-}
-
-void CLogger::restorePreferences(LPSTR szFileName)
-{
-  XP_GetPrivateProfileString(SECTION_LOG, KEY_RECORD_SEPARATOR, "", m_szItemSeparator, 
-                             sizeof(m_szItemSeparator), szFileName);
-  m_iStringDataWrap = XP_GetPrivateProfileInt(SECTION_LOG, KEY_STRING_WRAP, 
-                                              LOGGER_DEFAULT_STRING_WRAP, szFileName);
-}
-
-BOOL CLogger::onNPP_DestroyStream(NPStream * npStream)
-{
-  if(npStream == m_pStream) // Navigator itself destroys it
-  {
-    m_pStream = NULL;
-    return TRUE;
-  }
-  return FALSE;
-}
-
-static void FixUpOutputString(char * aString)
-{
-  // replace angle brackets with rect brackets
-  char * p = aString;
-  while((p = strstr(p, "<")))
-    *p = '[';
-
-  p = aString;
-  while((p = strstr(p, ">")))
-    *p = ']';
-}
-
-BOOL CLogger::appendToLog(NPAPI_Action action, DWORD dwTickEnter, DWORD dwTickReturn, 
-                          DWORD dwRet, 
-                          DWORD dw1, DWORD dw2, DWORD dw3, DWORD dw4, 
-                          DWORD dw5, DWORD dw6, DWORD dw7)
-{
-  if(m_pLog == NULL)
-    return FALSE;
-
-  if(!m_bLogToFrame && !m_bLogToFile)
-    return TRUE;
-
-  DWORD dwTimeEnter;
-  DWORD dwTimeReturn;
-  if(m_dwStartTime == 0xFFFFFFFF)
-  {
-    m_dwStartTime = dwTickEnter;
-    dwTimeEnter = 0L;
-  }
-  else
-    dwTimeEnter = dwTickEnter - m_dwStartTime;
-
-  dwTimeReturn = dwTickReturn - m_dwStartTime;
-
-  LogItemStruct * plis = makeLogItemStruct(action, dwTimeEnter, dwTimeReturn, dwRet, 
-                                           dw1, dw2, dw3, dw4, dw5, dw6, dw7);
-
-  static char szOutput[1024];
-
-  // dump to file
-  if(m_bLogToFile && !m_bBlockLogToFile)
-  {
-    if(m_pLogFile == NULL)
-    {
-      m_pLogFile = new CLogFile();
-      if(m_pLogFile == NULL)
-        return FALSE;
-
-      char szFile[256];
-      m_pPlugin->getLogFileName(szFile, sizeof(szFile));
-
-      if(m_pPlugin->getMode() == NP_EMBED)
-      {
-        if(!m_pLogFile->create(szFile, FALSE))
-        {
-          char szMessage[512];
-          wsprintf(szMessage, "File '%s'\n probably exists. Overwrite?", szFile);
-          if(IDYES == m_pPlugin->messageBox(szMessage, "", MB_ICONQUESTION | MB_YESNO))
-          {
-            if(!m_pLogFile->create(szFile, TRUE))
-            {
-              m_pPlugin->messageBox("Cannot create file.", "", MB_ICONERROR | MB_OK);
-              delete m_pLogFile;
-              m_pLogFile = NULL;
-              return FALSE;
-            }
-          }
-          else
-          {
-            delete m_pLogFile;
-            m_pLogFile = NULL;
-            goto Frame;
-          }
-        }
-      }
-      else // NP_FULL
-      {
-        if(!m_pLogFile->create(szFile, TRUE))
-        {
-          delete m_pLogFile;
-          m_pLogFile = NULL;
-          return FALSE;
-        }
-      }
-    }
-
-    formatLogItem(plis, szOutput, m_szItemSeparator, TRUE);
-    m_pLogFile->write(szOutput);
-    m_pLogFile->flush();
-  }
-
-Frame:
-
-  // dump to frame
-  if(m_bLogToFrame && !m_bBlockLogToFrame)
-  {
-    if(m_bShowImmediately)
-    {
-      BOOL dosstyle = (m_pPlugin && m_pPlugin->isStandAlone());
-
-      int iLength = formatLogItem(plis, szOutput, "", dosstyle);
-
-      // we should fix the output string if it contains symbols <html
-      // If this is the case the browser will display the whole output
-      // in HTML format while we still want it to be in plain text.
-      // I do not know if this is a bug in the browser or not.
-      FixUpOutputString(szOutput);
-
-      if (m_pPlugin && m_pPlugin->isStandAlone())
-      {
-        m_pPlugin->outputToNativeWindow(szOutput);
-      }
-      else
-      {
-        if(m_pStream == NULL)
-          NPN_NewStream(m_pPluginInstance, m_szStreamType, m_szTarget, &m_pStream);
-
-        NPN_Write(m_pPluginInstance, m_pStream, iLength, (void *)szOutput);
-      }
-      delete plis;
-    }
-    else
-      m_pLog->add(plis);
-  }
-
-  return TRUE;
-}
-
-void CLogger::setShowImmediatelyFlag(BOOL bFlagState)
-{
-  m_bShowImmediately = bFlagState;
-}
-
-BOOL CLogger::getShowImmediatelyFlag()
-{
-  return m_bShowImmediately;
-}
-
-void CLogger::setLogToFileFlag(BOOL bFlagState)
-{
-  m_bLogToFile = bFlagState;
-}
-
-BOOL CLogger::getLogToFileFlag()
-{
-  return m_bLogToFile;
-}
-
-void CLogger::setLogToFrameFlag(BOOL bFlagState)
-{
-  m_bLogToFrame = bFlagState;
-}
-
-BOOL CLogger::getLogToFrameFlag()
-{
-  return m_bLogToFrame;
-}
-
-int CLogger::getStringDataWrap()
-{
-  return m_iStringDataWrap;
-}
-
-void CLogger::clearLog()
-{
-  if(m_pLog != NULL)
-    delete m_pLog;
-
-  m_pLog = new CLogItemList();
-}
-
-void CLogger::clearTarget()
-{
-  if (m_pPlugin && m_pPlugin->isStandAlone())
-  {
-    m_pPlugin->outputToNativeWindow("");
-  }
-  else
-  {
-    if(m_pStream != NULL)
-      NPN_DestroyStream(m_pPluginInstance, m_pStream, NPRES_DONE);
-
-    NPN_NewStream(m_pPluginInstance, m_szStreamType, m_szTarget, &m_pStream);
-    NPN_Write(m_pPluginInstance, m_pStream, 1, (void *)"\n");
-
-    if(!m_bShowImmediately)
-    {
-      NPN_DestroyStream(m_pPluginInstance, m_pStream, NPRES_DONE);
-      m_pStream = NULL;
-    }
-  }
-}
-
-void CLogger::resetStartTime()
-{
-  m_dwStartTime = XP_GetTickCount();
-}
-
-void CLogger::dumpLogToTarget()
-{
-  if(m_pLog == NULL)
-    return;
-
-  static char szOutput[1024];
-
-  if (m_pPlugin && m_pPlugin->isStandAlone())
-  {
-    for(LogItemListElement * plile = m_pLog->m_pFirst; plile != NULL; plile = plile->pNext)
-    {
-      formatLogItem(plile->plis, szOutput, "", TRUE);
-      m_pPlugin->outputToNativeWindow(szOutput);
-    }
-  }
-  else
-  {
-    BOOL bTemporaryStream = ((m_pStream == NULL) && !getShowImmediatelyFlag());
-
-    if(m_pStream == NULL)
-      NPN_NewStream(m_pPluginInstance, m_szStreamType, m_szTarget, &m_pStream);
-
-    for(LogItemListElement * plile = m_pLog->m_pFirst; plile != NULL; plile = plile->pNext)
-    {
-      int iLength = formatLogItem(plile->plis, szOutput, "");
-      NPN_Write(m_pPluginInstance, m_pStream, iLength, (void *)szOutput);
-    }
-
-    if(bTemporaryStream)
-    {
-      NPN_DestroyStream(m_pPluginInstance, m_pStream, NPRES_DONE);
-      m_pStream = NULL;
-    }
-  }
-}
-
-void CLogger::closeLogToFile()
-{
-  if(m_pLogFile != NULL)
-  {
-    delete m_pLogFile;
-    m_pLogFile = NULL;
-  }
-}
-
-void CLogger::blockDumpToFile(BOOL bBlock)
-{
-  m_bBlockLogToFile = bBlock;
-}
-
-void CLogger::blockDumpToFrame(BOOL bBlock)
-{
-  m_bBlockLogToFrame = bBlock;
-}
-
-void CLogger::markStale()
-{
-  m_bStale = TRUE;
-}
-
-BOOL CLogger::isStale()
-{
-  return m_bStale;
-}
deleted file mode 100644
--- a/modules/plugin/tools/tester/common/loghlp.cpp
+++ /dev/null
@@ -1,972 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "xp.h"
-
-#include "loghlp.h"
-
-extern CLogger * pLogger;
-
-LPSTR FormatNPAPIError(int iError)
-{
-  static char szError[64];
-  switch (iError)
-  {
-    case NPERR_NO_ERROR:
-      wsprintf(szError, "NPERR_NO_ERROR");
-      break;
-    case NPERR_GENERIC_ERROR:
-      wsprintf(szError, "NPERR_GENERIC_ERROR");
-      break;
-    case NPERR_INVALID_INSTANCE_ERROR:
-      wsprintf(szError, "NPERR_INVALID_INSTANCE_ERROR");
-      break;
-    case NPERR_INVALID_FUNCTABLE_ERROR:
-      wsprintf(szError, "NPERR_INVALID_FUNCTABLE_ERROR");
-      break;
-    case NPERR_MODULE_LOAD_FAILED_ERROR:
-      wsprintf(szError, "NPERR_MODULE_LOAD_FAILED_ERROR");
-      break;
-    case NPERR_OUT_OF_MEMORY_ERROR:
-      wsprintf(szError, "NPERR_OUT_OF_MEMORY_ERROR");
-      break;
-    case NPERR_INVALID_PLUGIN_ERROR:
-      wsprintf(szError, "NPERR_INVALID_PLUGIN_ERROR");
-      break;
-    case NPERR_INVALID_PLUGIN_DIR_ERROR:
-      wsprintf(szError, "NPERR_INVALID_PLUGIN_DIR_ERROR");
-      break;
-    case NPERR_INCOMPATIBLE_VERSION_ERROR:
-      wsprintf(szError, "NPERR_INCOMPATIBLE_VERSION_ERROR");
-      break;
-    case NPERR_INVALID_PARAM:
-      wsprintf(szError, "NPERR_INVALID_PARAM");
-      break;
-    case NPERR_INVALID_URL:
-      wsprintf(szError, "NPERR_INVALID_URL");
-      break;
-    case NPERR_FILE_NOT_FOUND:
-      wsprintf(szError, "NPERR_FILE_NOT_FOUND");
-      break;
-    case NPERR_NO_DATA:
-      wsprintf(szError, "NPERR_NO_DATA");
-      break;
-    case NPERR_STREAM_NOT_SEEKABLE:
-      wsprintf(szError, "NPERR_STREAM_NOT_SEEKABLE");
-      break;
-    default:
-      wsprintf(szError, "Unlisted error");
-      break;
-  }
-  return &szError[0];
-}
-
-LPSTR FormatNPAPIReason(int iReason)
-{
-  static char szReason[64];
-  switch (iReason)
-  {
-    case NPRES_DONE:
-      wsprintf(szReason, "NPRES_DONE");
-      break;
-    case NPRES_NETWORK_ERR:
-      wsprintf(szReason, "NPRES_NETWORK_ERR");
-      break;
-    case NPRES_USER_BREAK:
-      wsprintf(szReason, "NPRES_USER_BREAK");
-      break;
-    default:
-      wsprintf(szReason, "Unlisted reason");
-      break;
-  }
-  return &szReason[0];
-}
-
-LPSTR FormatNPNVariable(NPNVariable var)
-{
-  static char szVar[64];
-  switch (var)
-  {
-    case NPNVxDisplay:
-      wsprintf(szVar, "NPNVxDisplay");
-      break;
-    case NPNVxtAppContext:
-      wsprintf(szVar, "NPNVxtAppContext");
-      break;
-    case NPNVnetscapeWindow:
-      wsprintf(szVar, "NPNVnetscapeWindow");
-      break;
-    case NPNVjavascriptEnabledBool:
-      wsprintf(szVar, "NPNVjavascriptEnabledBool");
-      break;
-    case NPNVasdEnabledBool:
-      wsprintf(szVar, "NPNVasdEnabledBool");
-      break;
-    case NPNVisOfflineBool:
-      wsprintf(szVar, "NPNVisOfflineBool");
-      break;
-    default:
-      wsprintf(szVar, "Unlisted variable");
-      break;
-  }
-  return &szVar[0];
-}
-
-LPSTR FormatNPPVariable(NPPVariable var)
-{
-  static char szVar[64];
-  switch (var)
-  {
-    case NPPVpluginNameString:
-      wsprintf(szVar, "NPPVpluginNameString");
-      break;
-    case NPPVpluginDescriptionString:
-      wsprintf(szVar, "NPPVpluginDescriptionString");
-      break;
-    case NPPVpluginWindowBool:
-      wsprintf(szVar, "NPPVpluginWindowBool");
-      break;
-    case NPPVpluginTransparentBool:
-      wsprintf(szVar, "NPPVpluginTransparentBool");
-      break;
-    case NPPVpluginWindowSize:
-      wsprintf(szVar, "NPPVpluginWindowSize");
-      break;
-    case NPPVpluginKeepLibraryInMemory:
-      wsprintf(szVar, "NPPVpluginKeepLibraryInMemory");
-      break;
-    default:
-      wsprintf(szVar, "Unlisted variable");
-      break;
-  }
-  return &szVar[0];
-}
-
-BOOL FormatPCHARArgument(LPSTR szBuf, int iLength, LogArgumentStruct * parg)
-{
-  if(iLength <= parg->iLength)
-    return FALSE;
-
-  if(parg->pData == NULL)
-    wsprintf(szBuf, "%#08lx", parg->dwArg);
-  else
-    wsprintf(szBuf, "%#08lx(\"%s\")", parg->dwArg, (LPSTR)parg->pData);
-  return TRUE;
-}
-
-BOOL FormatBOOLArgument(LPSTR szBuf, int iLength, LogArgumentStruct * parg)
-{
-  if(iLength <= 8)
-    return FALSE;
-
-  wsprintf(szBuf, "%s", ((NPBool)parg->dwArg == TRUE) ? "TRUE" : "FALSE");
-  return TRUE;
-}
-
-BOOL FormatPBOOLArgument(LPSTR szBuf, int iLength, LogArgumentStruct * parg)
-{
-  if(iLength <= 8)
-    return FALSE;
-
-  wsprintf(szBuf, "%#08lx(%s)", parg->dwArg, (*((NPBool *)parg->pData) == TRUE) ? "TRUE" : "FALSE");
-  return TRUE;
-}
-
-static void makeAbbreviatedString(LPSTR szBuf, int iSize, DWORD dwArg, int iLength, int iWrap)
-{
-  if(dwArg == 0L)
-  {
-    szBuf[0] = '\0';
-    return;
-  }
-
-  if(iLength > iWrap)
-  {
-    int iRealWrap = (iSize > iWrap) ? iWrap : (iSize - 4);
-    memcpy((LPVOID)&szBuf[0], (LPVOID)dwArg, iRealWrap);
-    szBuf[iRealWrap]     = '.';
-    szBuf[iRealWrap + 1] = '.';
-    szBuf[iRealWrap + 2] = '.';
-    szBuf[iRealWrap + 3] = '\0';
-  }
-  else
-  {
-    if(iLength >= iSize)
-    {    
-      memcpy((LPVOID)&szBuf[0], (LPVOID)dwArg, iSize - 4);
-      szBuf[iSize]     = '.';
-      szBuf[iSize + 1] = '.';
-      szBuf[iSize + 2] = '.';
-      szBuf[iSize + 3] = '\0';
-    }
-    else
-    {
-      memcpy((LPVOID)&szBuf[0], (LPVOID)dwArg, iLength);
-      szBuf[iLength] = '\0';
-    }
-  }
-}
-
-LogItemStruct * makeLogItemStruct(NPAPI_Action action, 
-                                  DWORD dwTimeEnter, DWORD dwTimeReturn, 
-                                  DWORD dwRet, 
-                                  DWORD dw1, DWORD dw2, DWORD dw3, DWORD dw4, 
-                                  DWORD dw5, DWORD dw6, DWORD dw7, BOOL bShort)
-{
-  int iWrap = pLogger->getStringDataWrap();
-
-  LogItemStruct * plis = new LogItemStruct;
-  if(plis == NULL)
-    return NULL;
-
-  plis->dwTimeEnter = dwTimeEnter;
-  plis->dwTimeReturn = dwTimeReturn;
-  plis->action = action;
-  plis->dwReturnValue = dwRet;
-  plis->arg1.dwArg = dw1;
-  plis->arg2.dwArg = dw2;
-  plis->arg3.dwArg = dw3;
-  plis->arg4.dwArg = dw4;
-  plis->arg5.dwArg = dw5;
-  plis->arg6.dwArg = dw6;
-  plis->arg7.dwArg = dw7;
-
-  char szTarget[1024] = {'\0'};
-  char szBuf[1024] = {'\0'};
-
-  if(bShort)
-    return plis;
-
-  switch (action)
-  {
-    case action_invalid:
-      break;
-
-    // NPN action
-    case action_npn_version:
-      plis->arg1.pData = new int[1];
-      *(int*)(plis->arg1.pData) = *((int*)dw1);
-      plis->arg1.iLength = sizeof(int);
-
-      plis->arg2.pData = new int[1];
-      *(int*)(plis->arg2.pData) = *((int*)dw2);
-      plis->arg2.iLength = sizeof(int);
-
-      plis->arg3.pData = new int[1];
-      *(int*)(plis->arg3.pData) = *((int*)dw3);
-      plis->arg3.iLength = sizeof(int);
-
-      plis->arg4.pData = new int[1];
-      *(int*)(plis->arg4.pData) = *((int*)dw4);
-      plis->arg4.iLength = sizeof(int);
-
-      break;
-    case action_npn_get_url_notify:
-      if(dw2 != 0L)
-      {
-        plis->arg2.iLength = strlen((LPSTR)dw2) + 1;
-        plis->arg2.pData = new char[plis->arg2.iLength];
-        memcpy(plis->arg2.pData, (LPVOID)dw2, plis->arg2.iLength);
-      }
-
-      if(dw3 != 0L)
-      {
-        makeAbbreviatedString(szTarget, sizeof(szTarget), dw3, strlen((LPSTR)dw3), iWrap);
-        plis->arg3.iLength = strlen(szTarget) + 1;
-        plis->arg3.pData = new char[plis->arg3.iLength];
-        memcpy(plis->arg3.pData, (LPVOID)&szTarget[0], plis->arg3.iLength);
-      }
-      break;
-    case action_npn_get_url:
-    {
-      if(dw2 != 0L)
-      {
-        plis->arg2.iLength = strlen((LPSTR)dw2) + 1;
-        plis->arg2.pData = new char[plis->arg2.iLength];
-        memcpy(plis->arg2.pData, (LPVOID)dw2, plis->arg2.iLength);
-      }
-
-      if(dw3 != 0L)
-      {
-        makeAbbreviatedString(szTarget, sizeof(szTarget), dw3, strlen((LPSTR)dw3), iWrap);
-        plis->arg3.iLength = strlen(szTarget) + 1;
-        plis->arg3.pData = new char[plis->arg3.iLength];
-        memcpy(plis->arg3.pData, (LPVOID)&szTarget[0], plis->arg3.iLength);
-      }
-      break;
-    }
-    case action_npn_post_url_notify:
-    {
-      if(dw2 != 0L)
-      {
-        plis->arg2.iLength = strlen((LPSTR)dw2) + 1;
-        plis->arg2.pData = new char[plis->arg2.iLength];
-        memcpy(plis->arg2.pData, (LPVOID)dw2, plis->arg2.iLength);
-      }
-
-      if(dw3 != 0L)
-      {
-        makeAbbreviatedString(szTarget, sizeof(szTarget), dw3, strlen((LPSTR)dw3), iWrap);
-        plis->arg3.iLength = strlen(szTarget) + 1;
-        plis->arg3.pData = new char[plis->arg3.iLength];
-        memcpy(plis->arg3.pData, (LPVOID)&szTarget[0], plis->arg3.iLength);
-      }
-
-      
-	  // strlen not protected from 0!
-	  makeAbbreviatedString(szBuf, sizeof(szBuf), dw5, strlen((LPSTR)dw5), iWrap);
-      plis->arg5.iLength = (int)dw4 + 1;
-      plis->arg5.pData = new char[plis->arg5.iLength];
-      memcpy(plis->arg5.pData, (LPVOID)&szBuf[0], plis->arg5.iLength);
-
-      break;
-    }
-    case action_npn_post_url:
-    {
-      if(dw2 != 0L)
-      {
-        plis->arg2.iLength = strlen((LPSTR)dw2) + 1;
-        plis->arg2.pData = new char[plis->arg2.iLength];
-        memcpy(plis->arg2.pData, (LPVOID)dw2, plis->arg2.iLength);
-      }
-
-      if(dw3 != 0L)
-      {
-        makeAbbreviatedString(szTarget, sizeof(szTarget), dw3, strlen((LPSTR)dw3), iWrap);
-        plis->arg3.iLength = strlen(szTarget) + 1;
-        plis->arg3.pData = new char[plis->arg3.iLength];
-        memcpy(plis->arg3.pData, (LPVOID)&szTarget[0], plis->arg3.iLength);
-      }
-
-	  // strlen not protected from 0!
-      makeAbbreviatedString(szBuf, sizeof(szBuf), dw5, strlen((LPSTR)dw5), iWrap);
-      plis->arg5.iLength = (int)dw4 + 1;
-      plis->arg5.pData = new char[plis->arg5.iLength];
-      memcpy(plis->arg5.pData, (LPVOID)&szBuf[0], plis->arg5.iLength);
-
-      break;
-    }
-    case action_npn_new_stream:
-    {
-      if(dw2 != 0L)
-      {
-        plis->arg2.iLength = strlen((LPSTR)dw2) + 1;
-        plis->arg2.pData = new char[plis->arg2.iLength];
-        memcpy(plis->arg2.pData, (LPVOID)dw2, plis->arg2.iLength);
-      }
-
-	  // strlen not protected from 0!
-      makeAbbreviatedString(szTarget, sizeof(szTarget), dw3, strlen((LPSTR)dw3), iWrap);
-      plis->arg3.iLength = strlen(szTarget) + 1;
-      plis->arg3.pData = new char[plis->arg3.iLength];
-      memcpy(plis->arg3.pData, (LPVOID)&szTarget[0], plis->arg3.iLength);
-
-      plis->arg4.pData = new char[sizeof(DWORD)];
-      plis->arg4.iLength = sizeof(DWORD);
-      memcpy(plis->arg4.pData, (LPVOID)dw4, plis->arg4.iLength);
-
-      break;
-    }
-    case action_npn_destroy_stream:
-      break;
-    case action_npn_request_read:
-      break;
-    case action_npn_write:
-    {
-	  // strlen not protected from 0!
-      makeAbbreviatedString(szBuf, sizeof(szBuf), dw4, strlen((LPSTR)dw4), iWrap);
-      plis->arg4.iLength = strlen(szBuf) + 1;
-      plis->arg4.pData = new char[plis->arg4.iLength];
-      memcpy(plis->arg4.pData, (LPVOID)&szBuf[0], plis->arg4.iLength);
-      break;
-    }
-    case action_npn_status:
-      if(dw2 != 0L)
-      {
-        plis->arg2.iLength = strlen((LPSTR)dw2) + 1;
-        plis->arg2.pData = new char[plis->arg2.iLength];
-        memcpy(plis->arg2.pData, (LPVOID)dw2, plis->arg2.iLength);
-      }
-      break;
-    case action_npn_user_agent:
-      break;
-    case action_npn_mem_alloc:
-      break;
-    case action_npn_mem_free:
-      break;
-    case action_npn_mem_flush:
-      break;
-    case action_npn_reload_plugins:
-      break;
-    case action_npn_get_java_env:
-      break;
-    case action_npn_get_java_peer:
-      break;
-    case action_npn_get_value:
-      plis->arg3.iLength = sizeof(DWORD);
-      plis->arg3.pData = new char[plis->arg3.iLength];
-      memcpy(plis->arg3.pData, (LPVOID)dw3, plis->arg3.iLength);
-      break;
-    case action_npn_set_value:
-      if(((NPPVariable)dw2 == NPPVpluginNameString) || 
-         ((NPPVariable)dw2 == NPPVpluginDescriptionString))
-      {
-        // strlen not protected from 0!
-        makeAbbreviatedString(szBuf, sizeof(szBuf), dw3, strlen((char *)dw3), iWrap);
-        plis->arg3.iLength = strlen(szBuf) + 1;
-        plis->arg3.pData = new char[plis->arg3.iLength];
-        memcpy(plis->arg3.pData, (LPVOID)&szBuf[0], plis->arg3.iLength);
-      }
-      else if(((NPPVariable)dw2 == NPPVpluginWindowBool) || 
-              ((NPPVariable)dw2 == NPPVpluginTransparentBool) ||
-              ((NPPVariable)dw2 == NPPVpluginKeepLibraryInMemory))
-      {
-        plis->arg3.iLength = sizeof(NPBool);
-        plis->arg3.pData = new char[plis->arg3.iLength];
-        memcpy(plis->arg3.pData, (LPVOID)dw3, plis->arg3.iLength);
-      }
-      else if((NPPVariable)dw2 == NPPVpluginWindowSize)
-      {
-        plis->arg3.iLength = sizeof(NPSize);
-        plis->arg3.pData = new char[plis->arg3.iLength];
-        memcpy(plis->arg3.pData, (LPVOID)dw3, plis->arg3.iLength);
-      }
-      break;
-    case action_npn_invalidate_rect:
-    {
-      plis->arg2.iLength = sizeof(NPRect);
-      plis->arg2.pData = new char[plis->arg2.iLength];
-      memcpy(plis->arg2.pData, (LPVOID)dw2, plis->arg2.iLength);
-      break;
-    }
-    case action_npn_invalidate_region:
-      break;
-    case action_npn_force_redraw:
-      break;
-
-    // NPP action
-    case action_np_initialize:
-      break;
-    case action_np_shutdown:
-      break;
-    case action_npp_new:
-      // strlen not protected from 0!
-      plis->arg1.iLength = strlen((LPSTR)dw1) + 1;
-      plis->arg1.pData = new char[plis->arg1.iLength];
-      memcpy(plis->arg1.pData, (LPVOID)dw1, plis->arg1.iLength);
-      break;
-    case action_npp_destroy:
-      plis->arg2.iLength = sizeof(DWORD);
-      plis->arg2.pData = new char[plis->arg2.iLength];
-      memcpy(plis->arg2.pData, (LPVOID)dw2, plis->arg2.iLength);
-      break;
-    case action_npp_set_window:
-      plis->arg2.iLength = sizeof(NPWindow);
-      plis->arg2.pData = new char[plis->arg2.iLength];
-      memcpy(plis->arg2.pData, (LPVOID)dw2, plis->arg2.iLength);
-      break;
-    case action_npp_new_stream:
-      // strlen not protected from 0!
-      plis->arg2.iLength = strlen((LPSTR)dw2) + 1;
-      plis->arg2.pData = new char[plis->arg2.iLength];
-      memcpy(plis->arg2.pData, (LPVOID)dw2, plis->arg2.iLength);
-
-      plis->arg5.iLength = sizeof(uint16);
-      plis->arg5.pData = new char[plis->arg5.iLength];
-      memcpy(plis->arg5.pData, (LPVOID)dw5, plis->arg5.iLength);
-      break;
-    case action_npp_destroy_stream:
-      break;
-    case action_npp_stream_as_file:
-    {
-      // strlen not protected from 0!
-      char* str = dw3 ? (char*)dw3 : (char*)"";
-      plis->arg3.iLength = strlen(str) + 1;
-      plis->arg3.pData = new char[plis->arg3.iLength];
-      memcpy(plis->arg3.pData, (LPVOID)str, plis->arg3.iLength);
-      break;
-    }
-    case action_npp_write_ready:
-      break;
-    case action_npp_write:
-    {
-      if(dw5 != 0L)
-      {
-        makeAbbreviatedString(szBuf, sizeof(szBuf), dw5, strlen((LPSTR)dw5), iWrap);
-        plis->arg5.iLength = strlen(szBuf) + 1;
-        plis->arg5.pData = new char[plis->arg5.iLength];
-        memcpy(plis->arg5.pData, (LPVOID)&szBuf[0], plis->arg5.iLength);
-      }
-      break;
-    }
-    case action_npp_print:
-      break;
-    case action_npp_handle_event:
-      break;
-    case action_npp_url_notify:
-      // strlen not protected from 0!
-      plis->arg2.iLength = strlen((LPSTR)dw2) + 1;
-      plis->arg2.pData = new char[plis->arg2.iLength];
-      memcpy(plis->arg2.pData, (LPVOID)dw2, plis->arg2.iLength);
-      break;
-    case action_npp_get_java_class:
-      break;
-    case action_np_get_mime_description:
-      break;
-    case action_npp_get_value:
-      break;
-    case action_npp_set_value:
-      break;
-
-    default:
-      break;
-  }
-
-  return plis;
-}
-
-int formatLogItem(LogItemStruct * plis, LPSTR szOutput, LPSTR szEndOfItem, BOOL bDOSStyle)
-{
-  int iRet = 0;
-  static char szTime[128];
-  static char szString[1024];
-  static char szEOL[8];
-  static char szEOI[256];
-  static char szRet[256];
-
-  if(bDOSStyle)
-  {
-    strcpy(szEOL, "\r\n");
-    strcpy(szEOI, szEndOfItem);
-    strcat(szEOI, "\r\n");
-  }
-  else
-  {
-    strcpy(szEOL, "\n");
-    strcpy(szEOI, szEndOfItem);
-    strcat(szEOI, "\n");
-  }
-
-  szRet[0] = '\0';
-  szOutput[0] = '\0';
-
-  wsprintf(szTime, "Time: %lu %lu (%li)%s", 
-                   plis->dwTimeEnter, plis->dwTimeReturn, 
-                   (long)plis->dwTimeReturn - (long)plis->dwTimeEnter, szEOL);
-
-  DWORD dw1 = plis->arg1.dwArg;
-  DWORD dw2 = plis->arg2.dwArg;
-  DWORD dw3 = plis->arg3.dwArg;
-  DWORD dw4 = plis->arg4.dwArg;
-  DWORD dw5 = plis->arg5.dwArg;
-  DWORD dw6 = plis->arg6.dwArg;
-  DWORD dw7 = plis->arg7.dwArg;
-
-  char sz1[1024] = {'\0'};
-  char sz2[1024] = {'\0'};
-  char sz3[1024] = {'\0'};
-  char sz4[1024] = {'\0'};
-  char sz5[1024] = {'\0'};
-  char sz6[1024] = {'\0'};
-
-  switch (plis->action)
-  {
-    case action_invalid:
-      break;
-
-    // NPN action
-    case action_npn_version:
-      if((plis->arg1.pData != NULL)&&(plis->arg2.pData != NULL)&&(plis->arg3.pData != NULL)&&(plis->arg4.pData != NULL))
-      {
-        wsprintf(szRet, "Plugin %i.%i, Netscape %i.%i%s", 
-                 *(int*)plis->arg1.pData, *(int*)plis->arg2.pData,
-                 *(int*)plis->arg3.pData, *(int*)plis->arg4.pData,szEOL);
-        wsprintf(szString, "NPN_Version(%#08lx, %#08lx, %#08lx, %#08lx)%s%s", dw1,dw2,dw3,dw4,szEOL,szRet);
-      }
-      else
-        wsprintf(szString, "NPN_Version(%#08lx, %#08lx, %#08lx, %#08lx)%s", dw1,dw2,dw3,dw4,szEOL);
-      break;
-    case action_npn_get_url_notify:
-    {
-      FormatPCHARArgument(sz2, sizeof(sz2), &plis->arg2);
-      FormatPCHARArgument(sz3, sizeof(sz3), &plis->arg3);
-      wsprintf(szRet, "Returns: %s%s", FormatNPAPIError((int)plis->dwReturnValue),szEOL);
-      wsprintf(szString, "NPN_GetURLNotify(%#08lx, %s, %s, %#08lx)%s%s", dw1,sz2,sz3,dw4,szEOL,szRet);
-      break;
-    }
-    case action_npn_get_url:
-    {
-      FormatPCHARArgument(sz2, sizeof(sz2), &plis->arg2);
-      FormatPCHARArgument(sz3, sizeof(sz3), &plis->arg3);
-      wsprintf(szRet, "Returns: %s%s", FormatNPAPIError((int)plis->dwReturnValue),szEOL);
-      wsprintf(szString, "NPN_GetURL(%#08lx, %s, %s)%s%s", dw1,sz2,sz3,szEOL,szRet);
-      break;
-    }
-    case action_npn_post_url_notify:
-    {
-      FormatPCHARArgument(sz2, sizeof(sz2), &plis->arg2);
-      FormatPCHARArgument(sz3, sizeof(sz3), &plis->arg3);
-      FormatPCHARArgument(sz5, sizeof(sz5), &plis->arg5);
-      FormatBOOLArgument(sz6, sizeof(sz6), &plis->arg6);
-
-      wsprintf(szRet, "Returns: %s%s", FormatNPAPIError((int)plis->dwReturnValue),szEOL);
-      wsprintf(szString, "NPN_PostURLNotify(%#08lx, %s, %s, %li, %s, %s, %#08lx)%s%s", 
-               dw1,sz2,sz3,(uint32)dw4,sz5,sz6,dw7,szEOL,szRet);
-      break;
-    }
-    case action_npn_post_url:
-    {
-      FormatPCHARArgument(sz2, sizeof(sz2), &plis->arg2);
-      FormatPCHARArgument(sz3, sizeof(sz3), &plis->arg3);
-      FormatPCHARArgument(sz5, sizeof(sz5), &plis->arg5);
-      FormatBOOLArgument(sz6, sizeof(sz6), &plis->arg6);
-
-      wsprintf(szRet, "Returns: %s%s", FormatNPAPIError((int)plis->dwReturnValue),szEOL);
-      wsprintf(szString, "NPN_PostURL(%#08lx, %s, %s, %li, %s, %s)%s%s", 
-               dw1,sz2,sz3,(uint32)dw4,sz5,sz6,szEOL,szRet);
-      break;
-    }
-    case action_npn_new_stream:
-    {
-      FormatPCHARArgument(sz2, sizeof(sz2), &plis->arg2);
-      FormatPCHARArgument(sz3, sizeof(sz3), &plis->arg3);
-      wsprintf(szRet, "Returns: %s%s", FormatNPAPIError((int)plis->dwReturnValue),szEOL);
-      if(plis->arg4.pData != NULL)
-        wsprintf(szString, "NPN_NewStream(%#08lx, %s, %s, %#08lx(%#08lx))%s%s", 
-                 dw1, sz2,sz3,dw4,*(DWORD *)plis->arg4.pData,szEOL,szRet);
-      else
-        wsprintf(szString, "NPN_NewStream(%#08lx, \"%s\", \"%s\", %#08lx)%s%s", dw1, sz2,sz3,dw4,szEOL,szRet);
-      break;
-    }
-    case action_npn_destroy_stream:
-      wsprintf(szRet, "Returns: %s%s", FormatNPAPIError((int)plis->dwReturnValue),szEOL);
-      wsprintf(szString, "NPN_DestroyStream(%#08lx, %#08lx, %s)%s%s", dw1,dw2,FormatNPAPIReason((int)dw3),szEOL,szRet);
-      break;
-    case action_npn_request_read:
-      wsprintf(szRet, "Returns: %s%s", FormatNPAPIError((int)plis->dwReturnValue),szEOL);
-      wsprintf(szString, "NPN_RequestRead(%#08lx, %#08lx)%s%s", dw1, dw2, szEOL, szRet);
-      break;
-    case action_npn_write:
-    {
-      FormatPCHARArgument(sz4, sizeof(sz4), &plis->arg4);
-      wsprintf(szRet, "Returns: %li%s", plis->dwReturnValue,szEOL);
-      wsprintf(szString, "NPN_Write(%#08lx, %#08lx, %li, %s)%s%s", dw1, dw2, (int32)dw3, sz4, szEOL, szRet);
-      break;
-    }
-    case action_npn_status:
-    {
-      FormatPCHARArgument(sz2, sizeof(sz2), &plis->arg2);
-      wsprintf(szString, "NPN_Status(%#08lx, %s)%s", dw1, sz2, szEOL);
-      break;
-    }
-    case action_npn_user_agent:
-      wsprintf(szRet, "Returns: %#08lx(\"%s\")%s", plis->dwReturnValue, (LPSTR)plis->dwReturnValue,szEOL);
-      wsprintf(szString, "NPN_UserAgent(%#08lx)%s%s", dw1, szEOL, szRet);
-      break;
-    case action_npn_mem_alloc:
-      wsprintf(szRet, "Returns: %#08lx%s", plis->dwReturnValue, szEOL);
-      wsprintf(szString, "NPN_MemAlloc(%li)%s%s", dw1, szEOL, szRet);
-      break;
-    case action_npn_mem_free:
-      wsprintf(szString, "NPN_MemFree(%#08lx)%s", dw1,szEOL);
-      break;
-    case action_npn_mem_flush:
-      wsprintf(szRet, "Returns: %li%s", plis->dwReturnValue,szEOL);
-      wsprintf(szString, "NPN_MemFlush(%li)%s%s", dw1, szEOL, szRet);
-      break;
-    case action_npn_reload_plugins:
-    {
-      FormatBOOLArgument(sz1, sizeof(sz1), &plis->arg1);
-      wsprintf(szString, "NPN_ReloadPlugins(%s)%s", sz1,szEOL);
-      break;
-    }
-    case action_npn_get_java_env:
-      wsprintf(szRet, "Returns: %#08lx%s", plis->dwReturnValue,szEOL);
-      wsprintf(szString, "NPN_GetJavaEnv()%s%s", szEOL, szRet);
-      break;
-    case action_npn_get_java_peer:
-      wsprintf(szRet, "Returns: %#08lx%s", plis->dwReturnValue,szEOL);
-      wsprintf(szString, "NPN_GetJavaPeer(%#08lx)%s%s", dw1, szEOL, szRet);
-      break;
-    case action_npn_get_value:
-    {
-      wsprintf(szRet, "Returns: %s%s", FormatNPAPIError((int)plis->dwReturnValue),szEOL);
-      switch(dw2)
-      {
-        case NPNVxDisplay:
-        case NPNVxtAppContext:
-        case NPNVnetscapeWindow:
-          if(dw3 != 0L)
-            wsprintf(szString, "NPN_GetValue(%#08lx, %s, %#08lx(%#08lx))%s%s",dw1,FormatNPNVariable((NPNVariable)dw2),dw3,*(DWORD *)dw3,szEOL,szRet);
-          else
-            wsprintf(szString, "NPN_GetValue(%#08lx, %s, %#08lx)%s%s",dw1,FormatNPNVariable((NPNVariable)dw2),dw3,szEOL,szRet);
-          break;
-        case NPNVjavascriptEnabledBool:
-        case NPNVasdEnabledBool:
-        case NPNVisOfflineBool:
-          if(dw3 != 0L)
-            wsprintf(szString, "NPN_GetValue(%#08lx, %s, %#08lx(%s))%s%s",
-                     dw1,FormatNPNVariable((NPNVariable)dw2),dw3,
-                     (((NPBool)*(DWORD *)dw3) == TRUE) ? "TRUE" : "FALSE", szEOL, szRet);
-          else
-            wsprintf(szString, "NPN_GetValue(%#08lx, %s, %#08lx)%s%s",dw1,FormatNPNVariable((NPNVariable)dw2),dw3,szEOL,szRet);
-          break;
-        default:
-          wsprintf(szRet, "Returns: %s%s", FormatNPAPIError((int)plis->dwReturnValue),szEOL);
-          break;
-      }
-      break;
-    }
-    case action_npn_set_value:
-      wsprintf(szRet, "Returns: %s%s", FormatNPAPIError((int)plis->dwReturnValue),szEOL);
-
-      if(((NPPVariable)dw2 == NPPVpluginNameString) || 
-         ((NPPVariable)dw2 == NPPVpluginDescriptionString))
-      {
-        FormatPCHARArgument(sz3, sizeof(sz3), &plis->arg3);
-        wsprintf(szString, "NPN_SetValue(%#08lx, %s, %s)%s%s", dw1,FormatNPPVariable((NPPVariable)dw2),sz3,szEOL,szRet);
-      }
-      else if(((NPPVariable)dw2 == NPPVpluginWindowBool) || 
-              ((NPPVariable)dw2 == NPPVpluginTransparentBool) ||
-              ((NPPVariable)dw2 == NPPVpluginKeepLibraryInMemory))
-      {
-        FormatPBOOLArgument(sz3, sizeof(sz3), &plis->arg3);
-        wsprintf(szString, "NPN_SetValue(%#08lx, %s, %s)%s%s", 
-                 dw1,FormatNPPVariable((NPPVariable)dw2),sz3,szEOL,szRet);
-      }
-      else if((NPPVariable)dw2 == NPPVpluginWindowSize)
-      {
-        if(plis->arg3.pData != NULL)
-        {
-          int32 iWidth = ((NPSize *)plis->arg3.pData)->width;
-          int32 iHeight = ((NPSize *)plis->arg3.pData)->height;
-          wsprintf(szString, "NPN_SetValue(%#08lx, %s, %#08lx(%li,%li))%s%s", 
-                   dw1,FormatNPPVariable((NPPVariable)dw2),dw3,iWidth,iHeight,szEOL,szRet);
-        }
-        else
-          wsprintf(szString, "NPN_SetValue(%#08lx, %s, %#08lx(?,?))%s%s", 
-                   dw1,FormatNPPVariable((NPPVariable)dw2),dw3,szEOL,szRet);
-      }
-      else
-        wsprintf(szString, "NPN_SetValue(%#08lx, %s, %#08lx(What is it?))%s%s", dw1,FormatNPPVariable((NPPVariable)dw2),dw3,szEOL,szRet);
-      break;
-    case action_npn_invalidate_rect:
-    {
-      if(plis->arg2.pData != NULL)
-      {
-        uint16 top    = ((NPRect *)plis->arg2.pData)->top;
-        uint16 left   = ((NPRect *)plis->arg2.pData)->left;
-        uint16 bottom = ((NPRect *)plis->arg2.pData)->bottom;
-        uint16 right  = ((NPRect *)plis->arg2.pData)->right;
-        wsprintf(szString, "NPN_InvalidateRect(%#08lx, %#08lx(%u,%u;%u,%u)%s", dw1,dw2,top,left,bottom,right,szEOL);
-      }
-      else
-        wsprintf(szString, "NPN_InvalidateRect(%#08lx, %#08lx(?,?,?,?)%s", dw1,dw2,szEOL);
-      break;
-    }
-    case action_npn_invalidate_region:
-      wsprintf(szString, "NPN_InvalidateRegion(%#08lx, %#08lx)%s", dw1,dw2,szEOL);
-      break;
-    case action_npn_force_redraw:
-      wsprintf(szString, "NPN_ForceRedraw(%#08lx)%s", dw1,szEOL);
-      break;
-
-    // NPP action
-    case action_np_initialize:
-      wsprintf(szRet, "Returning: %s%s", FormatNPAPIError((int)plis->dwReturnValue),szEOL);
-      wsprintf(szString, "Global initialization%s%s", szEOL, szRet);
-      break;
-    case action_np_shutdown:
-      wsprintf(szString, "Global shutdown%s",szEOL);
-      break;
-    case action_npp_new:
-    {
-      wsprintf(szRet, "Returning: %s%s", FormatNPAPIError((int)plis->dwReturnValue),szEOL);
-      char szMode[16];
-      switch (dw3)
-      {
-        case NP_EMBED:
-          strcpy(szMode, "NP_EMBED");
-          break;
-        case NP_FULL:
-          strcpy(szMode, "NP_FULL");
-          break;
-        default:
-          strcpy(szMode, "[Invalid mode]");
-          break;
-      }
-      char szArgs[512] = "\0";
-      int count = (int)dw4;
-      char** names = (char **)dw5;
-      char** values = (char **)dw6;
-      if ((count > 0) && names && values) {
-        wsprintf(szArgs, "\tArgument arrays:%s", szEOL);
-        for (int i = 0; i < count; i++) {
-          strcat(szArgs, "\t\t");
-          strcat(szArgs, names[i]);
-          strcat(szArgs, " -- ");
-          strcat(szArgs, values[i]);
-          strcat(szArgs, szEOL);
-        }
-      }
-      wsprintf(szString, "NPP_New(\"%s\", %#08lx, %s, %i, %#08lx, %#08lx, %#08lx)%s%s%s", 
-               (LPSTR)dw1,dw2,szMode,(int)dw4,dw5,dw6,dw7,szEOL,szArgs,szRet);
-      break;
-    }
-    case action_npp_destroy:
-      wsprintf(szRet, "Returning: %s%s", FormatNPAPIError((int)plis->dwReturnValue),szEOL);
-      wsprintf(szString, "NPP_Destroy(%#08lx, %#08lx(%#08lx))%s%s", dw1, dw2, *(DWORD *)plis->arg2.pData,szEOL,szRet);
-      break;
-    case action_npp_set_window:
-    {
-      wsprintf(szRet, "Returning: %s%s", FormatNPAPIError((int)plis->dwReturnValue),szEOL);
-      char szWindow[512];
-
-      if(plis->arg2.pData != NULL)
-      {
-        char szType[80];
-        switch (((NPWindow*)plis->arg2.pData)->type)
-        {
-          case NPWindowTypeWindow:
-            wsprintf(szType, "NPWindowTypeWindow");
-            break;
-          case NPWindowTypeDrawable:
-            wsprintf(szType, "NPWindowTypeDrawable");
-            break;
-          default:
-            wsprintf(szType, "[Unlisted type]");
-            break;
-        }
-        wsprintf(szWindow, "NPWindow: %#08lx, (%li,%li), (%li,%li), (%i,%i,%i,%i), %s", 
-                 ((NPWindow*)plis->arg2.pData)->window, 
-                 ((NPWindow*)plis->arg2.pData)->x, 
-                 ((NPWindow*)plis->arg2.pData)->y, 
-                 ((NPWindow*)plis->arg2.pData)->width, 
-                 ((NPWindow*)plis->arg2.pData)->height, 
-                 ((NPWindow*)plis->arg2.pData)->clipRect.top, 
-                 ((NPWindow*)plis->arg2.pData)->clipRect.left, 
-                 ((NPWindow*)plis->arg2.pData)->clipRect.bottom, 
-                 ((NPWindow*)plis->arg2.pData)->clipRect.right, szType);
-        wsprintf(szString, "NPP_SetWindow(%#08lx, %#08lx)%s%s%s%s", dw1,dw2,szEOL,szWindow,szEOL,szRet);
-      }
-      else
-        wsprintf(szString, "NPP_SetWindow(%#08lx, %#08lx)%s%s", dw1,dw2,szEOL,szRet);
-
-      break;
-    }
-    case action_npp_new_stream:
-    {
-      switch (*(int16 *)plis->arg5.pData)
-      {
-        case NP_NORMAL:
-          wsprintf(sz5, "NP_NORMAL");
-          break;
-        case NP_ASFILEONLY:
-          wsprintf(sz5, "NP_ASFILEONLY");
-          break;
-        case NP_ASFILE:
-          wsprintf(sz5, "NP_ASFILE");
-          break;
-        default:
-          wsprintf(sz5, "[Unlisted type]");
-          break;
-      }
-      wsprintf(szRet, "Returning: %s%s", FormatNPAPIError((int)plis->dwReturnValue),szEOL);
-      FormatPCHARArgument(sz2, sizeof(sz2), &plis->arg2);
-      wsprintf(szString, "NPP_NewStream(%#08lx, %s, %#08lx, %s, %s)%s%s", dw1, sz2, dw3, 
-               ((NPBool)dw4 == TRUE) ? "TRUE" : "FALSE", sz5, szEOL, szRet);
-      break;
-    }
-    case action_npp_destroy_stream:
-      wsprintf(szRet, "Returning: %s%s", FormatNPAPIError((int)plis->dwReturnValue),szEOL);
-      wsprintf(szString, "NPP_DestroyStream(%#08lx, %#08lx, %s)%s%s", dw1,dw2,FormatNPAPIReason((int)dw3),szEOL,szRet);
-      break;
-    case action_npp_stream_as_file:
-      FormatPCHARArgument(sz3, sizeof(sz3), &plis->arg3);
-      wsprintf(szString, "NPP_StreamAsFile(%#08lx, %#08lx, %s)%s", dw1,dw2,sz3,szEOL);
-      break;
-    case action_npp_write_ready:
-      wsprintf(szRet, "Returning: %li%s", plis->dwReturnValue,szEOL);
-      wsprintf(szString, "NPP_WriteReady(%#08lx, %#08lx)%s%s", dw1,dw2,szEOL,szRet);
-      break;
-    case action_npp_write:
-    {
-      wsprintf(szRet, "Returning: %li%s", plis->dwReturnValue,szEOL);
-      FormatPCHARArgument(sz5, sizeof(sz5), &plis->arg5);
-      wsprintf(szString, "NPP_Write(%#08lx, %#08lx, %li, %li, %s))%s%s",dw1,dw2,dw3,dw4,sz5,szEOL,szRet);
-      break;
-    }
-    case action_npp_print:
-      wsprintf(szString, "NPP_Print(%#08lx, %#08lx)%s", dw1, dw2,szEOL);
-      break;
-    case action_npp_handle_event:
-      wsprintf(szRet, "Returning: %i%s", (int16)plis->dwReturnValue,szEOL);
-      wsprintf(szString, "NPP_HandleEvent(%#08lx, %#08lx)%s%s", dw1,dw2,szEOL,szRet);
-      break;
-    case action_npp_url_notify:
-    {
-      FormatPCHARArgument(sz2, sizeof(sz2), &plis->arg2);
-      wsprintf(szString, "NPP_URLNotify(%#08lx, %s, %s, %#08lx)%s", dw1,sz2,FormatNPAPIReason((int)dw3),dw4,szEOL);
-      break;
-    }
-    case action_npp_get_java_class:
-      wsprintf(szRet, "Returning: %#08lx%s", plis->dwReturnValue,szEOL);
-      wsprintf(szString, "NPP_GetJavaClass()%s%s",szEOL,szRet);
-      break;
-    case action_np_get_mime_description:
-      wsprintf(szRet, "Returning: %#08lx%s", plis->dwReturnValue,szEOL);
-      wsprintf(szString, "NPP_GetMIMEDescription()%s%s",szEOL,szRet);
-      break;
-    case action_npp_get_value:
-      wsprintf(szRet, "Returning: %s%s", FormatNPAPIError((int)plis->dwReturnValue),szEOL);
-      wsprintf(szString, "NPP_GetValue(%#08lx, %s, %#08lx)%s%s", dw1,FormatNPPVariable((NPPVariable)dw2),dw3,szEOL,szRet);
-      break;
-    case action_npp_set_value:
-      wsprintf(szRet, "Returning: %s%s", FormatNPAPIError((int)plis->dwReturnValue),szEOL);
-      wsprintf(szString, "NPP_SetValue(%#08lx, %s, %#08lx)%s%s", dw1,FormatNPNVariable((NPNVariable)dw2),dw3,szEOL,szRet);
-      break;
-
-    default:
-      wsprintf(szString, "Unknown action%s",szEOL);
-      break;
-  }
-  strcat(szOutput, szString);
-  strcat(szOutput, szTime);
-  strcat(szOutput, szEOI);
-  iRet = strlen(szString) + strlen(szTime) + strlen(szEOI);
-  return iRet;
-}
deleted file mode 100644
--- a/modules/plugin/tools/tester/common/np_entry.cpp
+++ /dev/null
@@ -1,346 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-//////////////////////////////////////////////////////////////
-//
-// Main plugin entry point implementation -- exports from the 
-// plugin library
-//
-#include "xp.h"
-#include "plugbase.h"
-#include "logger.h"
-
-CLogger * pLogger = NULL;
-static char szTarget[] = LOGGER_DEFAULT_TARGET;
-
-NPNetscapeFuncs NPNFuncs;
-
-NPError OSCALL NP_Shutdown()
-{
-  if (pLogger) {
-    delete pLogger;
-    pLogger = NULL;
-  }
-  return NPERR_NO_ERROR;
-}
-
-static NPError fillPluginFunctionTable(NPPluginFuncs* aNPPFuncs)
-{
-  if(aNPPFuncs == NULL)
-    return NPERR_INVALID_FUNCTABLE_ERROR;
-
-  // Set up the plugin function table that Netscape will use to
-  // call us. Netscape needs to know about our version and size   
-  // and have a UniversalProcPointer for every function we implement.
-
-  aNPPFuncs->version       = (NP_VERSION_MAJOR << 8) | NP_VERSION_MINOR;
-#ifdef XP_MAC
-  aNPPFuncs->newp          = NewNPP_NewProc(Private_New);
-  aNPPFuncs->destroy       = NewNPP_DestroyProc(Private_Destroy);
-  aNPPFuncs->setwindow     = NewNPP_SetWindowProc(Private_SetWindow);
-  aNPPFuncs->newstream     = NewNPP_NewStreamProc(Private_NewStream);
-  aNPPFuncs->destroystream = NewNPP_DestroyStreamProc(Private_DestroyStream);
-  aNPPFuncs->asfile        = NewNPP_StreamAsFileProc(Private_StreamAsFile);
-  aNPPFuncs->writeready    = NewNPP_WriteReadyProc(Private_WriteReady);
-  aNPPFuncs->write         = NewNPP_WriteProc(Private_Write);
-  aNPPFuncs->print         = NewNPP_PrintProc(Private_Print);
-  aNPPFuncs->event         = NewNPP_HandleEventProc(Private_HandleEvent);	
-  aNPPFuncs->urlnotify     = NewNPP_URLNotifyProc(Private_URLNotify);			
-  aNPPFuncs->getvalue      = NewNPP_GetValueProc(Private_GetValue);
-  aNPPFuncs->setvalue      = NewNPP_SetValueProc(Private_SetValue);
-#else
-  aNPPFuncs->newp          = NPP_New;
-  aNPPFuncs->destroy       = NPP_Destroy;
-  aNPPFuncs->setwindow     = NPP_SetWindow;
-  aNPPFuncs->newstream     = NPP_NewStream;
-  aNPPFuncs->destroystream = NPP_DestroyStream;
-  aNPPFuncs->asfile        = NPP_StreamAsFile;
-  aNPPFuncs->writeready    = NPP_WriteReady;
-  aNPPFuncs->write         = NPP_Write;
-  aNPPFuncs->print         = NPP_Print;
-  aNPPFuncs->event         = NPP_HandleEvent;
-  aNPPFuncs->urlnotify     = NPP_URLNotify;
-  aNPPFuncs->getvalue      = NPP_GetValue;
-  aNPPFuncs->setvalue      = NPP_SetValue;
-#endif
-  aNPPFuncs->javaClass     = NULL;
-
-  return NPERR_NO_ERROR;
-}
-
-static NPError fillNetscapeFunctionTable(NPNetscapeFuncs* aNPNFuncs)
-{
-  if(aNPNFuncs == NULL)
-    return NPERR_INVALID_FUNCTABLE_ERROR;
-
-  if(HIBYTE(aNPNFuncs->version) > NP_VERSION_MAJOR)
-    return NPERR_INCOMPATIBLE_VERSION_ERROR;
-
-  if(aNPNFuncs->size < sizeof(NPNetscapeFuncs))
-    return NPERR_INVALID_FUNCTABLE_ERROR;
-
-  NPNFuncs.size             = aNPNFuncs->size;
-  NPNFuncs.version          = aNPNFuncs->version;
-  NPNFuncs.geturlnotify     = aNPNFuncs->geturlnotify;
-  NPNFuncs.geturl           = aNPNFuncs->geturl;
-  NPNFuncs.posturlnotify    = aNPNFuncs->posturlnotify;
-  NPNFuncs.posturl          = aNPNFuncs->posturl;
-  NPNFuncs.requestread      = aNPNFuncs->requestread;
-  NPNFuncs.newstream        = aNPNFuncs->newstream;
-  NPNFuncs.write            = aNPNFuncs->write;
-  NPNFuncs.destroystream    = aNPNFuncs->destroystream;
-  NPNFuncs.status           = aNPNFuncs->status;
-  NPNFuncs.uagent           = aNPNFuncs->uagent;
-  NPNFuncs.memalloc         = aNPNFuncs->memalloc;
-  NPNFuncs.memfree          = aNPNFuncs->memfree;
-  NPNFuncs.memflush         = aNPNFuncs->memflush;
-  NPNFuncs.reloadplugins    = aNPNFuncs->reloadplugins;
-  NPNFuncs.getJavaEnv       = NULL;
-  NPNFuncs.getJavaPeer      = NULL;
-  NPNFuncs.getvalue         = aNPNFuncs->getvalue;
-  NPNFuncs.setvalue         = aNPNFuncs->setvalue;
-  NPNFuncs.invalidaterect   = aNPNFuncs->invalidaterect;
-  NPNFuncs.invalidateregion = aNPNFuncs->invalidateregion;
-  NPNFuncs.forceredraw      = aNPNFuncs->forceredraw;
-
-  return NPERR_NO_ERROR;
-}
-
-//
-// Some exports are different on different platforms
-//
-
-/**************************************************/
-/*                                                */
-/*                   Windows                      */
-/*                    OS/2                        */
-/**************************************************/
-#if defined(XP_WIN) || defined(XP_OS2)
-
-NPError OSCALL NP_Initialize(NPNetscapeFuncs* aNPNFuncs)
-{
-  NPError rv = fillNetscapeFunctionTable(aNPNFuncs);
-
-  pLogger = new CLogger(szTarget);
-  if(pLogger) {
-    DWORD dwTickEnter = XP_GetTickCount();
-    pLogger->blockDumpToFile(TRUE);
-    DWORD dwTickReturn = XP_GetTickCount();
-    pLogger->appendToLog(action_np_initialize, dwTickEnter, dwTickReturn, NPERR_NO_ERROR);
-  }
-  return rv;
-}
-
-NPError OSCALL NP_GetEntryPoints(NPPluginFuncs* aNPPFuncs)
-{
-  return fillPluginFunctionTable(aNPPFuncs);
-}
-
-#endif //XP_WIN || XP_OS2
-
-/**************************************************/
-/*                                                */
-/*                    Unix                        */
-/*                                                */
-/**************************************************/
-#ifdef XP_UNIX
-
-NPError NP_Initialize(NPNetscapeFuncs* aNPNFuncs, NPPluginFuncs* aNPPFuncs)
-{
-  NPError rv = fillNetscapeFunctionTable(aNPNFuncs);
-  if(rv != NPERR_NO_ERROR)
-    return rv;
-
-  rv = fillPluginFunctionTable(aNPPFuncs);
-  if(rv != NPERR_NO_ERROR)
-    return rv;
-
-  pLogger = new CLogger(szTarget);
-  if(pLogger) {
-    DWORD dwTickEnter = XP_GetTickCount();
-    pLogger->blockDumpToFile(TRUE);
-    DWORD dwTickReturn = XP_GetTickCount();
-    pLogger->appendToLog(action_np_initialize, dwTickEnter, dwTickReturn, NPERR_NO_ERROR);
-  }
-}
-
-char * NP_GetMIMEDescription(void)
-{
-  return NPP_GetMIMEDescription();
-}
-
-NPError NP_GetValue(void *future, NPPVariable aVariable, void *aValue)
-{
-  return NPP_GetValue((NPP_t *)future, aVariable, aValue);
-}
-
-#endif //XP_UNIX
-
-/**************************************************/
-/*                                                */
-/*                     Mac                        */
-/*                                                */
-/**************************************************/
-#ifdef XP_MAC
-
-#if !TARGET_API_MAC_CARBON
-QDGlobals* gQDPtr; // Pointer to Netscape's QuickDraw globals
-#endif
-
-short gResFile; // Refnum of the plugin's resource file
-
-NPError Private_Initialize(void)
-{
-  EnterCodeResource();
-  pLogger = new CLogger(szTarget);
-  if(pLogger) {
-    DWORD dwTickEnter = XP_GetTickCount();
-    pLogger->blockDumpToFile(TRUE);
-    DWORD dwTickReturn = XP_GetTickCount();
-    pLogger->appendToLog(action_np_initialize, dwTickEnter, dwTickReturn, NPERR_NO_ERROR);
-  }
-  ExitCodeResource();
-  return rv;
-}
-
-void Private_Shutdown(void)
-{
-  EnterCodeResource();
-  NS_PluginShutdown();
-  __destroy_global_chain();
-  ExitCodeResource();
-}
-
-void SetUpQD(void);
-
-void SetUpQD(void)
-{
-  ProcessSerialNumber PSN;
-  FSSpec              myFSSpec;
-  Str63               name;
-  ProcessInfoRec      infoRec;
-  OSErr               result = noErr;
-  CFragConnectionID   connID;
-  Str255              errName;
-
-  // Memorize the pluginıs resource file refnum for later use.
-  gResFile = CurResFile();
-
-#if !TARGET_API_MAC_CARBON
-  // Ask the system if CFM is available.
-  long response;
-  OSErr err = Gestalt(gestaltCFMAttr, &response);
-  Boolean hasCFM = BitTst(&response, 31-gestaltCFMPresent);
-
-  if (hasCFM) {
-    // GetProcessInformation takes a process serial number and 
-    // will give us back the name and FSSpec of the application.
-    // See the Process Manager in IM.
-    infoRec.processInfoLength = sizeof(ProcessInfoRec);
-    infoRec.processName = name;
-    infoRec.processAppSpec = &myFSSpec;
-
-    PSN.highLongOfPSN = 0;
-    PSN.lowLongOfPSN = kCurrentProcess;
-
-    result = GetProcessInformation(&PSN, &infoRec);
-  }
-	else
-    // If no CFM installed, assume it must be a 68K app.
-    result = -1;		
-
-  if (result == noErr) {
-    // Now that we know the app name and FSSpec, we can call GetDiskFragment
-    // to get a connID to use in a subsequent call to FindSymbol (it will also
-    // return the address of ³main² in app, which we ignore).  If GetDiskFragment 
-    // returns an error, we assume the app must be 68K.
-    Ptr mainAddr; 	
-    result =  GetDiskFragment(infoRec.processAppSpec, 0L, 0L, infoRec.processName,
-                              kReferenceCFrag, &connID, (Ptr*)&mainAddr, errName);
-  }
-
-  if (result == noErr) {
-    // The app is a PPC code fragment, so call FindSymbol
-    // to get the exported ³qd² symbol so we can access its
-    // QuickDraw globals.
-    CFragSymbolClass symClass;
-    result = FindSymbol(connID, "\pqd", (Ptr*)&gQDPtr, &symClass);
-  }
-  else {
-    // The app is 68K, so use its A5 to compute the address
-    // of its QuickDraw globals.
-    gQDPtr = (QDGlobals*)(*((long*)SetCurrentA5()) - (sizeof(QDGlobals) - sizeof(GrafPtr)));
-  }
-#endif /* !TARGET_API_MAC_CARBON */
-}
-
-NPError main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs, NPP_ShutdownUPP* unloadUpp);
-
-#if !TARGET_API_MAC_CARBON
-#pragma export on
-#if GENERATINGCFM
-RoutineDescriptor mainRD = BUILD_ROUTINE_DESCRIPTOR(uppNPP_MainEntryProcInfo, main);
-#endif
-#pragma export off
-#endif /* !TARGET_API_MAC_CARBON */
-
-
-NPError main(NPNetscapeFuncs* aNPNFuncs, NPPluginFuncs* aNPPFuncs, NPP_ShutdownUPP* aUnloadUpp)
-{
-  EnterCodeResource();
-  NPError rv = NPERR_NO_ERROR;
-
-  if (aUnloadUpp == NULL)
-    rv = NPERR_INVALID_FUNCTABLE_ERROR;
-
-  if (rv == NPERR_NO_ERROR)
-    rv = fillNetscapeFunctionTable(aNPNFuncs);
-
-  if (rv == NPERR_NO_ERROR) {
-    // defer static constructors until the global functions are initialized.
-    __InitCode__();
-    rv = fillPluginFunctionTable(aNPPFuncs);
-  }
-
-  *aUnloadUpp = NewNPP_ShutdownProc(Private_Shutdown);
-  SetUpQD();
-  rv = Private_Initialize();
-	
-  ExitCodeResource();
-  return rv;
-}
-#endif //XP_MAC
deleted file mode 100644
--- a/modules/plugin/tools/tester/common/npn_gate.cpp
+++ /dev/null
@@ -1,221 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-//
-// The Mixed Mode procInfos defined in npupp.h assume Think C-
-// style calling conventions.  These conventions are used by
-// Metrowerks with the exception of pointer return types, which
-// in Metrowerks 68K are returned in A0, instead of the standard
-// D0. Thus, since NPN_MemAlloc and NPN_UserAgent return pointers,
-// Mixed Mode will return the values to a 68K plugin in D0, but 
-// a 68K plugin compiled by Metrowerks will expect the result in
-// A0.  The following pragma forces Metrowerks to use D0 instead.
-//
-#ifdef __MWERKS__
-#ifndef powerc
-#pragma pointers_in_D0
-#endif
-#endif
-
-#ifdef __MWERKS__
-#ifndef powerc
-#pragma pointers_in_A0
-#endif
-#endif
-
-
-////////////////////////////////////////////////////////////
-//
-// Implementation of Netscape entry points (NPN_*)
-//
-#include "xp.h"
-
-extern NPNetscapeFuncs NPNFuncs;
-
-void NPN_Version(int* plugin_major, int* plugin_minor, int* netscape_major, int* netscape_minor)
-{
-  *plugin_major   = NP_VERSION_MAJOR;
-  *plugin_minor   = NP_VERSION_MINOR;
-  *netscape_major = HIBYTE(NPNFuncs.version);
-  *netscape_minor = LOBYTE(NPNFuncs.version);
-}
-
-NPError NPN_GetURLNotify(NPP instance, const char *url, const char *target, void* notifyData)
-{
-	int navMinorVers = NPNFuncs.version & 0xFF;
-  NPError rv = NPERR_NO_ERROR;
-
-  if( navMinorVers >= NPVERS_HAS_NOTIFICATION )
-		rv = (*NPNFuncs.geturlnotify) (instance, url, target, notifyData);
-	else
-		rv = NPERR_INCOMPATIBLE_VERSION_ERROR;
-
-  return rv;
-}
-
-NPError NPN_GetURL(NPP instance, const char *url, const char *target)
-{
-  NPError rv = (*NPNFuncs.geturl) (instance, url, target);
-  return rv;
-}
-
-NPError NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file, void* notifyData)
-{
-	int navMinorVers = NPNFuncs.version & 0xFF;
-  NPError rv = NPERR_NO_ERROR;
-
-	if( navMinorVers >= NPVERS_HAS_NOTIFICATION )
-		rv = (*NPNFuncs.posturlnotify) (instance, url, window, len, buf, file, notifyData);
-	else
-		rv = NPERR_INCOMPATIBLE_VERSION_ERROR;
-
-  return rv;
-}
-
-NPError NPN_PostURL(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file)
-{
-  NPError rv = (*NPNFuncs.posturl) (instance, url, window, len, buf, file);
-  return rv;
-} 
-
-NPError NPN_RequestRead(NPStream* stream, NPByteRange* rangeList)
-{
-  NPError rv = (*NPNFuncs.requestread) (stream, rangeList);
-  return rv;
-}
-
-NPError NPN_NewStream(NPP instance, NPMIMEType type, const char* target, NPStream** stream)
-{
-	int navMinorVersion = NPNFuncs.version & 0xFF;
-
-  NPError rv = NPERR_NO_ERROR;
-
-	if( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT )
-		rv = (*NPNFuncs.newstream) (instance, type, target, stream);
-	else
-		rv = NPERR_INCOMPATIBLE_VERSION_ERROR;
-
-  return rv;
-}
-
-int32_t NPN_Write(NPP instance, NPStream *stream, int32_t len, void *buffer)
-{
-	int navMinorVersion = NPNFuncs.version & 0xFF;
-  int32_t rv = 0;
-
-  if( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT )
-		rv = (*NPNFuncs.write) (instance, stream, len, buffer);
-	else
-		rv = -1;
-
-  return rv;
-}
-
-NPError NPN_DestroyStream(NPP instance, NPStream* stream, NPError reason)
-{
-	int navMinorVersion = NPNFuncs.version & 0xFF;
-  NPError rv = NPERR_NO_ERROR;
-
-  if( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT )
-		rv = (*NPNFuncs.destroystream) (instance, stream, reason);
-	else
-		rv = NPERR_INCOMPATIBLE_VERSION_ERROR;
-
-  return rv;
-}
-
-void NPN_Status(NPP instance, const char *message)
-{
-  (*NPNFuncs.status) (instance, message);
-}
-
-const char* NPN_UserAgent(NPP instance)
-{
-  const char * rv = NULL;
-  rv = (*NPNFuncs.uagent) (instance);
-  return rv;
-}
-
-void* NPN_MemAlloc(uint32_t size)
-{
-  void * rv = NULL;
-  rv = (*NPNFuncs.memalloc) (size);
-  return rv;
-}
-
-void NPN_MemFree(void* ptr)
-{
-  (*NPNFuncs.memfree) (ptr);
-}
-
-uint32_t NPN_MemFlush(uint32_t size)
-{
-  uint32_t rv = (*NPNFuncs.memflush) (size);
-  return rv;
-}
-
-void NPN_ReloadPlugins(NPBool reloadPages)
-{
-  (*NPNFuncs.reloadplugins) (reloadPages);
-}
-
-NPError NPN_GetValue(NPP instance, NPNVariable variable, void *value)
-{
-  NPError rv = (*NPNFuncs.getvalue) (instance, variable, value);
-  return rv;
-}
-
-NPError NPN_SetValue(NPP instance, NPPVariable variable, void *value)
-{
-  NPError rv = (*NPNFuncs.setvalue) (instance, variable, value);
-  return rv;
-}
-
-void NPN_InvalidateRect(NPP instance, NPRect *invalidRect)
-{
-  (*NPNFuncs.invalidaterect) (instance, invalidRect);
-}
-
-void NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion)
-{
-  (*NPNFuncs.invalidateregion) (instance, invalidRegion);
-}
-
-void NPN_ForceRedraw(NPP instance)
-{
-  (*NPNFuncs.forceredraw) (instance);
-}
deleted file mode 100644
--- a/modules/plugin/tools/tester/common/npp_gate.cpp
+++ /dev/null
@@ -1,533 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.