From 049981b35f4856391bcdc505a586c99a70cfe65d Mon Sep 17 00:00:00 2001 From: "Marco Antonio J. Costa" Date: Sun, 5 Oct 2025 10:59:12 -0300 Subject: [PATCH] remove now unused functions we use a single function to turn a number into a money formatted string now --- Laptop/finances.cpp | 90 --------------------------------------------- Laptop/finances.h | 2 - 2 files changed, 92 deletions(-) diff --git a/Laptop/finances.cpp b/Laptop/finances.cpp index e59f2897..96ffee3c 100644 --- a/Laptop/finances.cpp +++ b/Laptop/finances.cpp @@ -1910,96 +1910,6 @@ BOOLEAN LoadInRecords( UINT32 uiPage ) return( TRUE ); } -void InsertCommasForDollarFigure( STR16 pString ) -{ - INT16 sCounter =0; - INT16 sZeroCount =0; - INT16 sTempCounter = 0; - INT16 sEndPosition = 0; - - // go to end of dollar figure - while( pString[ sCounter ] != 0 ) - { - sCounter++; - } - - // negative? - if( pString[0] == '-' ) - { - // stop one slot in advance of normal - sEndPosition = 1; - } - - // is there under $1,000? - if( sCounter < 4 ) - { - // can't do anything, return - return; - } - - // at end, start backing up until beginning - while( sCounter > sEndPosition ) - { - - - // enough for a comma? - if( sZeroCount==3 ) - { - // reset count - sZeroCount =0; - // set tempcounter to current counter - sTempCounter = sCounter; - - // run until end - while( pString[ sTempCounter ] != 0 ) - { - sTempCounter++; - } - // now shift everything over ot the right one place until sTempCounter = sCounter - while( sTempCounter >= sCounter ) - { - pString[ sTempCounter+1 ] = pString[ sTempCounter ]; - sTempCounter--; - } - // now insert comma - pString[ sCounter ]=L','; - } - - // increment count of digits - sZeroCount++; - - // decrement counter - sCounter--; - } - - return; - -} - -void InsertDollarSignInToString( STR16 pString ) -{ - // run to end of string, copy everything in string 2 places right, insert a space at pString[ 1 ] and a L'$' at pString[ 0 ] - - INT32 iCounter =0; - - // run to end of string - while( pString[ iCounter ] != 0 ) - { - iCounter++; - } - - // now copy over - while( iCounter >= 0 ) - { - pString[ iCounter + 1] = pString[ iCounter ]; - iCounter--; - } - - pString[ 0 ] = L'$'; - - return; -} - INT32 GetPreviousBalanceToDate( void ) { diff --git a/Laptop/finances.h b/Laptop/finances.h index 6c03e486..b9898ba3 100644 --- a/Laptop/finances.h +++ b/Laptop/finances.h @@ -73,8 +73,6 @@ typedef struct finance *FinanceUnitPtr; extern FinanceUnitPtr pFinanceListHead; //extern INT32 iCurrentBalance; UINT32 AddTransactionToPlayersBook(UINT8 ubCode, UINT8 ubSecondCode, UINT32 uiDate, INT32 iAmount); -void InsertDollarSignInToString( STR16 pString ); -void InsertCommasForDollarFigure( STR16 pString ); INT32 GetTodaysDaysIncome( void ); INT32 GetProjectedTotalDailyIncome( void ); INT32 GetProjectedExpenses( void ); // HEADROCK HAM 3.6: Projected daily expenses.