From 506027739d59c4dbc5e1b38c27eace6f3a337783 Mon Sep 17 00:00:00 2001 From: "shaver%netscape.com" Date: Fri, 26 Nov 1999 05:33:35 +0000 Subject: [PATCH] Repair missing newlines at end of files, and remove lines of the form #endif foo both of which upset HPUX's compiler quite a bit. Patch from Andrew Taylor . --- .../html/content/src/nsHTMLFrameElement.cpp | 2 +- .../html/content/src/nsHTMLIFrameElement.cpp | 2 +- dom/public/nsIJSEventListener.h | 2 +- gfx/public/nsRepeater.h | 2 +- .../html/content/src/nsHTMLFrameElement.cpp | 2 +- .../html/content/src/nsHTMLIFrameElement.cpp | 2 +- mailnews/import/oexpress/nsOEMailbox.h | 2 +- mailnews/import/oexpress/nsOEScanBoxes.h | 2 +- xpcom/appshell/nativeApp/nsCNativeAppImpl.cpp | 2 +- .../appshell/nativeApp/nsCNativeAppModule.cpp | 2 +- xpcom/base/nsIInterfaceRequestor.cpp | 2 +- xpcom/io/nsIDirEnumeratorImplWin.cpp | 133 ------------------ xpcom/io/nsIFileImplWin.h | 2 +- xpfe/browser/public/nsBrowserCIDs.h | 33 ----- 14 files changed, 12 insertions(+), 178 deletions(-) diff --git a/content/html/content/src/nsHTMLFrameElement.cpp b/content/html/content/src/nsHTMLFrameElement.cpp index e47354ab2c9..76f9933c7f6 100644 --- a/content/html/content/src/nsHTMLFrameElement.cpp +++ b/content/html/content/src/nsHTMLFrameElement.cpp @@ -272,4 +272,4 @@ NS_IMETHODIMP nsHTMLFrameElement::HandleChromeEvent(nsIPresContext* aPresContext nsEventStatus* aEventStatus) { return HandleDOMEvent(aPresContext, aEvent, aDOMEvent, aFlags,aEventStatus); -} \ No newline at end of file +} diff --git a/content/html/content/src/nsHTMLIFrameElement.cpp b/content/html/content/src/nsHTMLIFrameElement.cpp index f3a5efa4120..2c41bd9e2c8 100644 --- a/content/html/content/src/nsHTMLIFrameElement.cpp +++ b/content/html/content/src/nsHTMLIFrameElement.cpp @@ -331,4 +331,4 @@ NS_IMETHODIMP nsHTMLIFrameElement::HandleChromeEvent(nsIPresContext* aPresContex nsEventStatus* aEventStatus) { return HandleDOMEvent(aPresContext, aEvent, aDOMEvent, aFlags,aEventStatus); -} \ No newline at end of file +} diff --git a/dom/public/nsIJSEventListener.h b/dom/public/nsIJSEventListener.h index 6c7e4e80d78..f4ec9482bec 100644 --- a/dom/public/nsIJSEventListener.h +++ b/dom/public/nsIJSEventListener.h @@ -45,4 +45,4 @@ public: extern "C" NS_DOM nsresult NS_NewJSEventListener(nsIDOMEventListener ** aInstancePtrResult, nsIScriptContext *aContext, nsIScriptObjectOwner* aOwner); -#endif nsIJSEventListener_h__ +#endif // nsIJSEventListener_h__ diff --git a/gfx/public/nsRepeater.h b/gfx/public/nsRepeater.h index c0bef30125f..b256924672e 100644 --- a/gfx/public/nsRepeater.h +++ b/gfx/public/nsRepeater.h @@ -61,4 +61,4 @@ class NS_NET Repeater { Repeater* mNextIdlr; }; -#endif \ No newline at end of file +#endif diff --git a/layout/html/content/src/nsHTMLFrameElement.cpp b/layout/html/content/src/nsHTMLFrameElement.cpp index e47354ab2c9..76f9933c7f6 100644 --- a/layout/html/content/src/nsHTMLFrameElement.cpp +++ b/layout/html/content/src/nsHTMLFrameElement.cpp @@ -272,4 +272,4 @@ NS_IMETHODIMP nsHTMLFrameElement::HandleChromeEvent(nsIPresContext* aPresContext nsEventStatus* aEventStatus) { return HandleDOMEvent(aPresContext, aEvent, aDOMEvent, aFlags,aEventStatus); -} \ No newline at end of file +} diff --git a/layout/html/content/src/nsHTMLIFrameElement.cpp b/layout/html/content/src/nsHTMLIFrameElement.cpp index f3a5efa4120..2c41bd9e2c8 100644 --- a/layout/html/content/src/nsHTMLIFrameElement.cpp +++ b/layout/html/content/src/nsHTMLIFrameElement.cpp @@ -331,4 +331,4 @@ NS_IMETHODIMP nsHTMLIFrameElement::HandleChromeEvent(nsIPresContext* aPresContex nsEventStatus* aEventStatus) { return HandleDOMEvent(aPresContext, aEvent, aDOMEvent, aFlags,aEventStatus); -} \ No newline at end of file +} diff --git a/mailnews/import/oexpress/nsOEMailbox.h b/mailnews/import/oexpress/nsOEMailbox.h index bb6f391bf0b..736c91b4280 100644 --- a/mailnews/import/oexpress/nsOEMailbox.h +++ b/mailnews/import/oexpress/nsOEMailbox.h @@ -38,4 +38,4 @@ private: -#endif // nsOEMailbox_h__ \ No newline at end of file +#endif // nsOEMailbox_h__ diff --git a/mailnews/import/oexpress/nsOEScanBoxes.h b/mailnews/import/oexpress/nsOEScanBoxes.h index c336303b2b1..bb0ea5056da 100644 --- a/mailnews/import/oexpress/nsOEScanBoxes.h +++ b/mailnews/import/oexpress/nsOEScanBoxes.h @@ -80,4 +80,4 @@ private: nsVoidArray m_entryArray; }; -#endif // nsOEScanBoxes_h__ \ No newline at end of file +#endif // nsOEScanBoxes_h__ diff --git a/xpcom/appshell/nativeApp/nsCNativeAppImpl.cpp b/xpcom/appshell/nativeApp/nsCNativeAppImpl.cpp index 7857fe1c484..ce3b61f9a07 100644 --- a/xpcom/appshell/nativeApp/nsCNativeAppImpl.cpp +++ b/xpcom/appshell/nativeApp/nsCNativeAppImpl.cpp @@ -273,4 +273,4 @@ PRThread* nsCLoopInfo::Thread() nsEventLoopType nsCLoopInfo::Type() { return m_Type; -} \ No newline at end of file +} diff --git a/xpcom/appshell/nativeApp/nsCNativeAppModule.cpp b/xpcom/appshell/nativeApp/nsCNativeAppModule.cpp index 428fdd0d5a7..e95e181b7de 100644 --- a/xpcom/appshell/nativeApp/nsCNativeAppModule.cpp +++ b/xpcom/appshell/nativeApp/nsCNativeAppModule.cpp @@ -82,4 +82,4 @@ NSUnregisterSelf(nsISupports* aServMgr, const char* aPath) NS_ENSURE_SUCCESS(rv, rv); return rv; -} \ No newline at end of file +} diff --git a/xpcom/base/nsIInterfaceRequestor.cpp b/xpcom/base/nsIInterfaceRequestor.cpp index 179a754b8a9..da709b22105 100644 --- a/xpcom/base/nsIInterfaceRequestor.cpp +++ b/xpcom/base/nsIInterfaceRequestor.cpp @@ -47,4 +47,4 @@ nsGetInterface::operator()( const nsIID& aIID, void** aInstancePtr ) const *mErrorPtr = status; return status; } -#endif \ No newline at end of file +#endif diff --git a/xpcom/io/nsIDirEnumeratorImplWin.cpp b/xpcom/io/nsIDirEnumeratorImplWin.cpp index c84c5d7f2e2..e69de29bb2d 100644 --- a/xpcom/io/nsIDirEnumeratorImplWin.cpp +++ b/xpcom/io/nsIDirEnumeratorImplWin.cpp @@ -1,133 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* - * The contents of this file are subject to the Netscape 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/NPL/ - * - * 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 Communicator client code, - * released March 31, 1998. - * - * The Initial Developer of the Original Code is Netscape Communications - * Corporation. Portions created by Netscape are - * Copyright (C) 1998-1999 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - * Doug Turner - */ - - -#include "nsIComponentManager.h" -#include "nsIDirEnumeratorImpl.h" -#include "nsIDirEnumeratorImplWin.h" -#include "nsFileUtils.h" - -nsIDirEnumeratorImpl::nsIDirEnumeratorImpl() -{ - NS_INIT_REFCNT(); - mDir = nsnull; -} - -nsIDirEnumeratorImpl::~nsIDirEnumeratorImpl() -{ - if (mDir) - PR_CloseDir(mDir); -} - - -/* nsISupports interface implementation. */ -NS_IMPL_ISUPPORTS1(nsIDirEnumeratorImpl, nsIDirectoryEnumerator) - -NS_METHOD -nsIDirEnumeratorImpl::Create(nsISupports* outer, const nsIID& aIID, void* *aInstancePtr) -{ - NS_ENSURE_ARG_POINTER(aInstancePtr); - NS_ENSURE_PROPER_AGGREGATION(outer, aIID); - - nsIDirEnumeratorImpl* inst = new nsIDirEnumeratorImpl(); - if (inst == NULL) - return NS_ERROR_OUT_OF_MEMORY; - - nsresult rv = inst->QueryInterface(aIID, aInstancePtr); - if (NS_FAILED(rv)) - { - delete inst; - return rv; - } - return NS_OK; -} - -NS_IMETHODIMP -nsIDirEnumeratorImpl::Init(nsIFile *parent, PRBool resolveSymlinks) -{ - char* filepath; - parent->GetPath(nsIFile::NSPR_PATH, &filepath); - - if (filepath == nsnull) - return NS_ERROR_OUT_OF_MEMORY; - - mDir = PR_OpenDir(filepath); - - if (mDir == nsnull) // not a directory - return NS_ERROR_FAILURE; - - nsAllocator::Free(filepath); - - mParent = parent; - - mResolveSymlinks = resolveSymlinks; - - return NS_NewFile(&mNext); -} - -/* boolean HasMoreElements (); */ -NS_IMETHODIMP -nsIDirEnumeratorImpl::HasMoreElements(PRBool *result) -{ - nsresult rv; - *result = PR_FALSE; - - if (mDir) - { - PRDirEntry* entry = PR_ReadDir(mDir, PR_SKIP_BOTH); - if (entry == nsnull) - return NS_OK; - - mNext->InitWithFile(mParent); - rv = mNext->AppendPath(entry->name); - - if (NS_FAILED(rv)) - return rv; - } - *result = PR_TRUE; - return NS_OK; -} - -/* nsISupports GetNext (); */ -NS_IMETHODIMP -nsIDirEnumeratorImpl::GetNext(nsISupports **_retval) -{ - nsresult rv; - PRBool hasMore; - - rv = HasMoreElements(&hasMore); - if (NS_FAILED(rv)) - return rv; - - nsIFile *file; - rv = NS_NewFile(&file); - - if (NS_FAILED(rv)) - return rv; - - rv = file->InitWithFile(mNext); - - *_retval = file; // TODO: QI needed? - return rv; -} \ No newline at end of file diff --git a/xpcom/io/nsIFileImplWin.h b/xpcom/io/nsIFileImplWin.h index e5fd6155d2b..81488f9cba8 100644 --- a/xpcom/io/nsIFileImplWin.h +++ b/xpcom/io/nsIFileImplWin.h @@ -80,4 +80,4 @@ private: }; -#endif \ No newline at end of file +#endif diff --git a/xpfe/browser/public/nsBrowserCIDs.h b/xpfe/browser/public/nsBrowserCIDs.h index 5ca012c47d1..e69de29bb2d 100644 --- a/xpfe/browser/public/nsBrowserCIDs.h +++ b/xpfe/browser/public/nsBrowserCIDs.h @@ -1,33 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape 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/NPL/ - * - * 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 Communicator client code. - * - * The Initial Developer of the Original Code is Netscape Communications - * Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - -#ifndef nsBrowserCIDs_h__ -#define nsBrowserCIDs_h__ - - -// XXX: BOGUS 43147b80-8a39-11d2-9938-0080c7cb1081 -#define NS_BROWSERCONTROLLER_CID \ -{ 0x43147b80, 0x8a39, 0x11d2, \ - {0x99, 0x38, 0x00, 0x80, 0xc7, 0xcb, 0x10, 0x81} } - - -#endif /* nsBrowserCIDs_h__ */ \ No newline at end of file