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:
warren%netscape.com
2000-10-27 22:43:51 +00:00
parent e7c9040b5e
commit c6b67eceeb
757 changed files with 10724 additions and 8223 deletions

View File

@@ -25,12 +25,11 @@
#include "nsIDOMElement.h"
#endif
#ifdef NS_DEBUG
static PRBool gNoisy = PR_FALSE;
#else
static const PRBool gNoisy = PR_FALSE;
#endif
#include "nslog.h"
NS_IMPL_LOG(DeleteElementTxnLog)
#define PRINTF NS_LOG_PRINTF(DeleteElementTxnLog)
#define FLUSH NS_LOG_FLUSH(DeleteElementTxnLog)
DeleteElementTxn::DeleteElementTxn()
: EditTxn()
@@ -56,7 +55,7 @@ DeleteElementTxn::~DeleteElementTxn()
NS_IMETHODIMP DeleteElementTxn::Do(void)
{
if (gNoisy) { printf("%p Do Delete Element element = %p\n", this, mElement.get()); }
PRINTF("%p Do Delete Element element = %p\n", this, mElement.get());
if (!mElement) return NS_ERROR_NOT_INITIALIZED;
nsresult result = mElement->GetParentNode(getter_AddRefs(mParent));
@@ -80,8 +79,7 @@ NS_IMETHODIMP DeleteElementTxn::Do(void)
p = parentElementTag.ToNewCString();
if (c&&p)
{
if (gNoisy)
printf(" DeleteElementTxn: deleting child %s from parent %s\n", c, p);
PRINTF(" DeleteElementTxn: deleting child %s from parent %s\n", c, p);
nsCRT::free(c);
nsCRT::free(p);
}
@@ -98,7 +96,7 @@ NS_IMETHODIMP DeleteElementTxn::Do(void)
NS_IMETHODIMP DeleteElementTxn::Undo(void)
{
if (gNoisy) { printf("%p Undo Delete Element element = %p, parent = %p\n", this, mElement.get(), mParent.get()); }
PRINTF("%p Undo Delete Element element = %p, parent = %p\n", this, mElement.get(), mParent.get());
if (!mParent) { return NS_OK; } // this is a legal state, the txn is a no-op
if (!mElement) { return NS_ERROR_NULL_POINTER; }
@@ -119,8 +117,7 @@ NS_IMETHODIMP DeleteElementTxn::Undo(void)
p = parentElementTag.ToNewCString();
if (c&&p)
{
if (gNoisy)
printf(" DeleteElementTxn: inserting child %s back into parent %s\n", c, p);
PRINTF(" DeleteElementTxn: inserting child %s back into parent %s\n", c, p);
nsCRT::free(c);
nsCRT::free(p);
}
@@ -134,7 +131,7 @@ NS_IMETHODIMP DeleteElementTxn::Undo(void)
NS_IMETHODIMP DeleteElementTxn::Redo(void)
{
if (gNoisy) { printf("%p Redo Delete Element element = %p, parent = %p\n", this, mElement.get(), mParent.get()); }
PRINTF("%p Redo Delete Element element = %p, parent = %p\n", this, mElement.get(), mParent.get());
if (!mParent) { return NS_OK; } // this is a legal state, the txn is a no-op
if (!mElement) { return NS_ERROR_NULL_POINTER; }