Adding a script to print out which of a given list of files do not end with a newline. Source files that do not end with a newline break at least the HP-UX compiler. Adding newlines to all of the source files found at this point.

git-svn-id: svn://10.0.0.236/trunk@64923 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
cls%seawood.org 2000-04-02 07:17:25 +00:00
parent a9a5cd5389
commit 4b879b15dd
52 changed files with 98 additions and 50 deletions

View File

@ -0,0 +1,47 @@
#!/bin/sh
# 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 test-ending-newline.sh
#
# The Initial Developer of the Original Code is Christopher
# Seawood <cls@seawood.org>. Portions created by Christopher Seawood
# are Copyright (C) 2000 Christopher Seawood. All Rights Reserved.
#
# The purpose of this file is to find the files that do not end with a
# newline. Some compilers fail if the source files do not end with a
# newline.
#
#
test_file=newline_test
test_dummy=newline_testee
inlist="$*"
broken_list=
if test "$inlist" = ""; then
echo "Usage: $0 *.c *.cpp";
exit 0;
fi
echo "" > $test_file
for f in $inlist; do
if test -f $f; then
tail -c 1 $f > $test_dummy
if ! `cmp -s $test_file $test_dummy`; then
broken_list="$broken_list $f"
fi
fi
done
rm -f $test_file $test_dummy
echo $broken_list

View File

@ -1 +1 @@
#include "StdAfx.h"
#include "StdAfx.h"

View File

@ -488,4 +488,4 @@ TestSet aTestSets[] =
};
int nTestSets = sizeof(aTestSets) / sizeof(aTestSets[0]);
int nTestSets = sizeof(aTestSets) / sizeof(aTestSets[0]);

View File

@ -501,4 +501,4 @@ static getUnicodeBlock gAllGetBlock[16] =
nsUnicodeBlock nsUnicodeFontMappingMac:: GetBlock(PRUnichar aChar)
{
return (*(gAllGetBlock[(aChar >> 12)]))(aChar);
}
}

View File

@ -60,4 +60,4 @@ NS_IMETHODIMP nsDeviceContextSpecPh :: GetPrintContext(PpPrintContext_t *&aPrint
{
aPrintContext = mPC;
return NS_OK;
}
}

View File

@ -688,4 +688,4 @@ nsFontEnumeratorPh::EnumerateFonts(const char* aLangGroup,
// XXX still need to implement aLangGroup and aGeneric
return EnumerateAllFonts(aCount, aResult);
}
}

View File

@ -65,4 +65,4 @@ main(int argc, const char** argv)
printf("DefaultCharset for %s is %s\n",categoryAsNSString.ToNewCString(),charsetAsNSString.ToNewCString());
return 0;
}
}

View File

@ -0,0 +1 @@

View File

@ -2037,4 +2037,4 @@ nsBoxFrameInner::GetFrameSizeWithMargin(nsIBox* aBox, nsSize& aSize)
aSize.width = rect.width;
aSize.height = rect.height;
return NS_OK;
}
}

View File

@ -59,4 +59,4 @@ PRIntn nsCheckBoxFrame::GetDefaultAlignment()
nsCheckBoxFrame::nsCheckBoxFrame(nsIPresShell* aPresShell):nsButtonBoxFrame(aPresShell)
{
}
}

View File

@ -223,4 +223,4 @@ nsColorPickerFrame::GetDesiredSize(nsIPresContext* aPresContext,
{
} // GetDesiredSize
*/
*/

View File

@ -243,4 +243,4 @@ NS_INTERFACE_MAP_BEGIN(nsLeafBoxFrame)
NS_INTERFACE_MAP_ENTRY(nsIFrameDebug)
#endif
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIBox)
NS_INTERFACE_MAP_END_INHERITING(nsLeafFrame)
NS_INTERFACE_MAP_END_INHERITING(nsLeafFrame)

View File

@ -108,4 +108,4 @@ void nsOEStringBundle::Cleanup( void)
if (m_pBundle)
m_pBundle->Release();
m_pBundle = nsnull;
}
}

View File

@ -766,4 +766,4 @@ void nsSimpleUInt32Array::Allocate( void)
delete [] m_pData;
m_pData = pData;
}
}
}

View File

@ -59,4 +59,4 @@ int main(int argc, char **argv)
OleUninitialize();
return 0;
}
}

View File

@ -563,4 +563,4 @@ void TestBuild(MenuHandle theMenu, PRBool isChild)
}
*/
#pragma options align=reset
#pragma options align=reset

View File

@ -178,4 +178,4 @@ NS_METHOD nsButton::CreateNative( PtWidget_t* aParent )
return res;
}

View File

@ -283,4 +283,4 @@ NS_METHOD nsCheckButton::CreateNative( PtWidget_t* aParent )
return res;
}

View File

@ -342,4 +342,4 @@ nsFileDlgResults nsFileWidget::PutFile(
}
}
return theResult;
}
}

View File

@ -518,4 +518,4 @@ int nsListBox::handle_selection_event (PtWidget_t *aWidget, void *aData, PtCallb
}
return (Pt_CONTINUE);
}
}

View File

@ -1005,4 +1005,4 @@ int nsMenu::SubMenuMenuItemMenuCb (PtWidget_t *widget, void *aNSMenu, PtCallback
}
return( Pt_CONTINUE );
}
}

View File

@ -675,4 +675,4 @@ int nsMenuItem::MenuItemDisarmCb (PtWidget_t *widget, void *nsClassPtr, PtCallba
delete [] str;
return Pt_CONTINUE;
}
}

View File

@ -413,4 +413,4 @@ int nsScrollbar::handle_scroll_move_event (PtWidget_t *aWidget, void *aData, PtC
me->OnScroll(scroll_event, thePos);
return (Pt_CONTINUE);
}
}

View File

@ -163,4 +163,4 @@ int nsTextWidget::handle_activate_event (PtWidget_t *aWidget, void *aData, PtCal
PR_LOG(PhWidLog, PR_LOG_DEBUG,("nsTextWidget::handle_activate_event me=<%p> - Not Implemented\n",me));
return (Pt_CONTINUE);
}
}

View File

@ -104,4 +104,4 @@ PhPoint_t nsToolkit::GetConsoleOffset()
}
return(PhPoint_t) {0,0};
}
}

View File

@ -70,4 +70,4 @@ nsresult nsCAppLoop::PlatformExit(PRInt32 exitCode)
PostQuitMessage(exitCode);
return NS_OK;
}
}

View File

@ -100,4 +100,4 @@ NS_IMETHODIMP nsCEvent::SetNativeData(nsNativeEventDataType dataType,
return NS_OK;
}

View File

@ -75,4 +75,4 @@ NS_IMETHODIMP nsCEventFilter::SetNativeData(nsNativeFilterDataType dataType,
nsCRT::memcpy(&m_filter, data, sizeof(m_filter));
return NS_OK;
}
}

View File

@ -86,4 +86,4 @@ nsresult nsCPhEvent::ResizeEvent(unsigned long aEventSize)
NS_ENSURE_ARG_POINTER(m_msg);
return NS_OK;
}

View File

@ -185,4 +185,4 @@ PRInt32 nsCPlatformBaseLoop::PlatformGetReturnCode(void* platformEventData)
#endif
return -1;
}
}

View File

@ -59,4 +59,4 @@ nsresult nsCAppLoop::PlatformExit(PRInt32 exitCode)
{
PostQuitMessage(exitCode);
return NS_OK;
}
}

View File

@ -77,4 +77,4 @@ nsresult nsCBreathLoop::PlatformRetrieveNextEvent(void* platformFilterData,
filter->wMsgFilterMax, filter->wRemoveFlags))
return NS_OK;
return NS_COMFALSE;
}
}

View File

@ -177,4 +177,4 @@ NS_IMETHODIMP nsCEvent::SetPointY(PRInt32 aPointY)
{
m_msg.pt.y = aPointY;
return NS_OK;
}
}

View File

@ -130,4 +130,4 @@ NS_IMETHODIMP nsCEventFilter::SetRemoveFlags(PRUint32 aRemoveFlags)
{
m_filter.wRemoveFlags = aRemoveFlags;
return NS_OK;
}
}

View File

@ -129,4 +129,4 @@ nsresult nsCPlatformBaseLoop::PlatformRetrieveNextEvent(void* platformFilterData
filter->wMsgFilterMax))
return NS_OK;
return NS_COMFALSE;
}
}

View File

@ -59,4 +59,4 @@ nsresult nsCThreadLoop::PlatformExit(PRInt32 exitCode)
{
::PostThreadMessage(m_WinThreadId, WM_QUIT, 0, 0);
return NS_OK;
}
}

View File

@ -1,4 +1,4 @@
static void dummy()
{
// This is just so that base.shlb has something to compile.
}
}

View File

@ -460,4 +460,4 @@ nsAppleSingleEncoder::FSpGetCatInfo(CInfoPBRec *pb, FSSpecPtr aFile)
ERR_CHECK( PBGetCatInfoSync(pb) );
return err;
}
}

View File

@ -267,4 +267,4 @@ nsEventHandler::HandleMenuChoice(SInt32 aChoice)
}
return err;
}
}

View File

@ -173,4 +173,4 @@ nsFileSelector::GetCWD(long *aOutDirID, short *aOutVRefNum)
}
return err;
}
}

View File

@ -741,4 +741,4 @@ nsAppleSingleDecoder::PLstrcmp(StringPtr str1, StringPtr str2)
bEqual = false;
return bEqual;
}
}

View File

@ -59,4 +59,4 @@ DisableAdditionsWin(void)
DisableNavButtons();
// TO DO
}
}

View File

@ -105,4 +105,4 @@ DrawCheckedCheckbox(Rect *cellRect)
MoveTo(checkbox.right-2, checkbox.top+1);
LineTo(checkbox.left+1, checkbox.bottom-2);
}
}

View File

@ -590,4 +590,4 @@ DisableComponentsWin(void)
DisableNavButtons();
// TO DO
}
}

View File

@ -409,4 +409,4 @@ aurevoir:
if (pcoreDir)
DisposePtr((Ptr) pcoreDir);
return err;
}
}

View File

@ -377,4 +377,4 @@ void React2InContent(EventRecord* evt, WindowPtr wCurrPtr)
gDone = true;
break;
}
}
}

View File

@ -764,4 +764,4 @@ UnloadSDLib(CFragConnectionID *connID)
return false;
return true;
}
}

View File

@ -504,4 +504,4 @@ DisableNavButtons(void)
HiliteControl(gControls->nextB, kDisableControl);
// TO DO
}
}

View File

@ -346,4 +346,4 @@ void Shutdown(void)
HideWindow(gWPtr);
DisposeWindow(gWPtr);
}
}
}

View File

@ -1017,4 +1017,4 @@ DisableSetupTypeWin(void)
HiliteControl(gControls->stw->instType, kDisableControl);
if (gControls->stw->destLoc)
HiliteControl(gControls->stw->destLoc, kDisableControl);
}
}

View File

@ -202,4 +202,4 @@ DisableTerminalWin(void)
DisableNavButtons();
// TO DO
}
}

View File

@ -424,4 +424,4 @@ IsArchiveXPI(StringPtr archive)
return true;
return false;
}
}