Bug 47207. Changing printf to PRINTF to use new logging facility. r=valeski,sr=waterson
git-svn-id: svn://10.0.0.236/trunk@81885 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -40,6 +40,11 @@
|
||||
#include "nsLiveConnect.h"
|
||||
#include "nsplugin.h"
|
||||
#include "nsDebug.h"
|
||||
#include "nslog.h"
|
||||
|
||||
NS_IMPL_LOG(badapterLog, 0)
|
||||
#define PRINTF NS_LOG_PRINTF(badapterLog)
|
||||
#define FLUSH NS_LOG_FLUSH(badapterLog)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// SECTION 3 - Classes
|
||||
@@ -577,22 +582,22 @@ nsresult fromNPError[] = {
|
||||
char* NPP_GetMIMEDescription(void)
|
||||
{
|
||||
int freeFac = 0;
|
||||
//fprintf(stderr, "MIME description\n");
|
||||
PRINTF("MIME description\n");
|
||||
if (thePlugin == NULL) {
|
||||
freeFac = 1;
|
||||
NSGetFactory(thePluginManager, kPluginCID, NULL, NULL, (nsIFactory** )&thePlugin);
|
||||
}
|
||||
//fprintf(stderr, "Allocated Plugin 0x%08x\n", thePlugin);
|
||||
PRINTF("Allocated Plugin 0x%08x\n", thePlugin);
|
||||
const char * ret;
|
||||
nsresult err = thePlugin->GetMIMEDescription(&ret);
|
||||
if (err) return NULL;
|
||||
//fprintf(stderr, "Get response %s\n", ret);
|
||||
PRINTF("Get response %s\n", ret);
|
||||
if (freeFac) {
|
||||
//fprintf(stderr, "Freeing plugin...");
|
||||
PRINTF("Freeing plugin...");
|
||||
thePlugin->Release();
|
||||
thePlugin = NULL;
|
||||
}
|
||||
//fprintf(stderr, "Done\n");
|
||||
PRINTF("Done\n");
|
||||
return (char*)ret;
|
||||
}
|
||||
|
||||
@@ -618,22 +623,22 @@ NPP_SetValue(NPP instance, NPNVariable variable, void *value)
|
||||
NPError
|
||||
NPP_GetValue(NPP instance, NPPVariable variable, void *value) {
|
||||
int freeFac = 0;
|
||||
//fprintf(stderr, "MIME description\n");
|
||||
PRINTF("MIME description\n");
|
||||
if (thePlugin == NULL) {
|
||||
freeFac = 1;
|
||||
if (NSGetFactory(thePluginManager, kPluginCID, NULL, NULL, (nsIFactory** )&thePlugin) != NS_OK)
|
||||
return NPERR_GENERIC_ERROR;
|
||||
}
|
||||
//fprintf(stderr, "Allocated Plugin 0x%08x\n", thePlugin);
|
||||
PRINTF("Allocated Plugin 0x%08x\n", thePlugin);
|
||||
nsresult err = thePlugin->GetValue((nsPluginVariable)variable, value);
|
||||
if (err) return NPERR_GENERIC_ERROR;
|
||||
//fprintf(stderr, "Get response %08x\n", ret);
|
||||
PRINTF("Get response %08x\n", ret);
|
||||
if (freeFac) {
|
||||
//fprintf(stderr, "Freeing plugin...");
|
||||
PRINTF("Freeing plugin...");
|
||||
thePlugin->Release();
|
||||
thePlugin = NULL;
|
||||
}
|
||||
//fprintf(stderr, "Done\n");
|
||||
PRINTF("Done\n");
|
||||
return NPERR_NO_ERROR;
|
||||
}
|
||||
#endif // XP_UNIX
|
||||
|
||||
@@ -44,6 +44,11 @@
|
||||
#include "npapi.h"
|
||||
#include "nullplugin.h"
|
||||
#include "strings.h"
|
||||
#include "nslog.h"
|
||||
|
||||
NS_IMPL_LOG(npshellLog, 0)
|
||||
#define PRINTF NS_LOG_PRINTF(npshellLog)
|
||||
#define FLUSH NS_LOG_FLUSH(npshellLog)
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
@@ -201,11 +206,11 @@ NPP_SetWindow(NPP instance, NPWindow* window)
|
||||
id.
|
||||
*/
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "Nullplugin: plugin received window resize.\n");
|
||||
fprintf(stderr, "Window=(%i)\n", (int)window);
|
||||
PRINTF("Nullplugin: plugin received window resize.\n");
|
||||
PRINTF("Window=(%i)\n", (int)window);
|
||||
if (window) {
|
||||
fprintf(stderr, "W=(%i) H=(%i)\n",
|
||||
(int)window->width, (int)window->height);
|
||||
PRINTF("W=(%i) H=(%i)\n",
|
||||
(int)window->width, (int)window->height);
|
||||
}
|
||||
#endif
|
||||
return NPERR_NO_ERROR;
|
||||
|
||||
@@ -40,6 +40,11 @@
|
||||
#include <stdio.h>
|
||||
#include "npapi.h"
|
||||
#include "npupp.h"
|
||||
#include "nslog.h"
|
||||
|
||||
NS_IMPL_LOG(npunixLog, 0)
|
||||
#define PRINTF NS_LOG_PRINTF(npunixLog)
|
||||
#define FLUSH NS_LOG_FLUSH(npunixLog)
|
||||
|
||||
/*
|
||||
* Define PLUGIN_TRACE to have the wrapper functions print
|
||||
@@ -48,7 +53,7 @@
|
||||
|
||||
#ifdef PLUGIN_TRACE
|
||||
#include <stdio.h>
|
||||
#define PLUGINDEBUGSTR(msg) fprintf(stderr, "%s\n", msg)
|
||||
#define PLUGINDEBUGSTR(msg) PRINTF("%s\n", msg)
|
||||
#else
|
||||
#define PLUGINDEBUGSTR(msg)
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user