diff src/ui/bmi/mmiBookUtils.c @ 92:c0052fe355d3

src/ui/bmi/*.[ch]: rm trailing white space
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 08 Nov 2020 06:39:16 +0000
parents 67bfe9f274f6
children ec9f955fc487
line wrap: on
line diff
--- a/src/ui/bmi/mmiBookUtils.c	Sun Nov 08 05:12:05 2020 +0000
+++ b/src/ui/bmi/mmiBookUtils.c	Sun Nov 08 06:39:16 2020 +0000
@@ -2,81 +2,81 @@
 
 					CONDAT (UK)
 
-********************************************************************************                                                                              
+********************************************************************************
 
  This software product is the property of Condat (UK) Ltd and may not be
- disclosed to any third party without the express permission of the owner.                                 
-                                                                              
+ disclosed to any third party without the express permission of the owner.
+
 ********************************************************************************
 
- $Project name:	Basic MMI                                                      
- $Project code:	BMI (6349)                                                           
+ $Project name:	Basic MMI
+ $Project code:	BMI (6349)
  $Module:		PhoneBook
  $File:		    MmiBookUtils.c
- $Revision:		1.0                                                       
-                                                                              
- $Author:		Condat(UK)                                                         
- $Date:		    25/10/00                                                      
-                                                                               
+ $Revision:		1.0
+
+ $Author:		Condat(UK)
+ $Date:		    25/10/00
+
 ********************************************************************************
-                                                                              
+
  Description:
- 
+
     This module provides utility function for use in the
     phone book application
-                        
+
 ********************************************************************************
  $History: MmiBookUtils.c
         $History: MmiBookUtils.c
-        
+
 		Aug 09, 2007 DR:OMAPS00140447 x0056422(Srilekha)
 		Description: PhoneBook: Unexpected confirmation message when making changes to entries in SIM storage.
 		Solution: Added a new flag changename_flag to handle the Phonebook-SIM Memory entry changed event.
 
- 	17 Aug, 2007  DR: OMAPS00141963 x0066814(Geetha) 
+ 	17 Aug, 2007  DR: OMAPS00141963 x0066814(Geetha)
  	Description: PhoneBook: The "Options" menu is not returned after a current entry is copied.
 	 Solution: After copying, the menu control was not being returned back to the right window.
  	Added a callback, that will be called after copying an entry, where the control wil be returned to
-	 correct window. 
+	 correct window.
 
      July 11, 2007 DR:OMAPS00137908 x00666692(Asha)
-     Description:PHONEBOOK: changing name or number under SIM storage, Please Wait message 
+     Description:PHONEBOOK: changing name or number under SIM storage, Please Wait message
     appears instead of Saved
-    Solution     :Changes made to handle the condition MFW_PHB_EXCT in the function changeInFile() 
+    Solution     :Changes made to handle the condition MFW_PHB_EXCT in the function changeInFile()
        	which modifies the phone book entry.
-        
-        27 June, 2007  DR: OMAPS00136608 x0073106(sundeep) 
+
+        27 June, 2007  DR: OMAPS00136608 x0073106(sundeep)
         Description:PHONEBOOK-Unexpected behavior when copying all entries from Phone to SIM
         Solution     :Updated the execution state(MFW_PHB_EXCT) in the phonebook.
-        
+
        June 27, 2007 DR:OMAPS00136627 x0062172(Syed)
     		Description:PHONEBOOK: Unexpected behavior when moving all entries from Phone to SIM
-             Solution     : Return Proper Value after phb_store_entry() in bookCopy  to move all the entries 
+             Solution     : Return Proper Value after phb_store_entry() in bookCopy  to move all the entries
 	       			properly.
-        
+
        June 05, 2007 DR:OMAPS00133241 x0061560(sateeshg)
        Description:ASTEC29607,SIM:The sim card should not return 9240 still.
-       Solution     :MMI should not display "Saved" after db is updated but has to wait until SIM is 
+       Solution     :MMI should not display "Saved" after db is updated but has to wait until SIM is
        			updated with the entry and RAT_OK is received from ACI.
-       
+
 
  	June 06, 2007 DR:OMAPS00132045 x0073106 Sundeep
  	Description : Phonebook- behaviour inconsistency in the MMI when move contact
  	Solution     : changed a if condition in function bookCopyMultiple(), in the if(move).
- 	
-
-       JUNE 4,07 (sateeshg) OMAPS00131777, x0061560 
+
+
+       JUNE 4,07 (sateeshg) OMAPS00131777, x0061560
        Phonebook - Delete all command for phonebook contacts answer "list empty" even if there are contacts in the list
 	Solution:Updated the current status of the phonebook
-	
+
 	Apr 30,2007, OMAPS00129173, x0066814(Geetha)
 	Description : Phone crashes if 'Delete All' is done on SIM contacts when SIM memory is empty
 	Solution: Added a condition in bookDeleteBook to check the number of used entries in the seleted phonebook.
 	If the condition is satified then the delete operation will proceed else an 'Empty List' dialog is displayed.
- 
+
        Nov 17, 2006 DR:OMAPS00104376 a0393213(R.Prabakar)
        Description : When tried to delete the last entry either incase of SIM or Phone book (i.e. last deletion), the board resets.
-       Solution     : The crash happens because of race condition between actual deletion by ACI and status check in BMI. 
+       Solution     : The crash happens because of race condition between actual deletion by ACI and status check in BMI.
        Now the status before deletion is stored and status check is done on this previous status.
 
 	Aug 18, 2006   ER: OMAPS00089840  x0039928
@@ -91,34 +91,34 @@
 	June 01, 2006  DR: OMAPS00079716
 	Description:Phonebook: List of entries is not refreshed after a phonebook entry move
 	Solution: Added a new callback function to handle the populating of phonebook entries
-	
-	Feb 20, 2006 REF: OMAPS00061948  x0039928  
+
+	Feb 20, 2006 REF: OMAPS00061948  x0039928
 	Bug:PhoneBook-My number menu -failed.
- 	Fix: phb_read_entries is called with used entries as the no of entries if used entries are less than 
+ 	Fix: phb_read_entries is called with used entries as the no of entries if used entries are less than
  	MAX_SEARCH_NAME.
 
-	Jan 27, 2006 REF: OMAPS00061925  x0039928  
+	Jan 27, 2006 REF: OMAPS00061925  x0039928
 	Bug:Phonebook-Changing an entry and Immidiately deleting the entry failed.
  	Fix: Phonebook is populated with phone numbers after some time and not immediately after deleting an entry.
 
-	Jan 22, 2006 REF: OMAPS00061930  x0039928  
+	Jan 22, 2006 REF: OMAPS00061930  x0039928
 	Bug:PhoneBook -Change entry and view entry through Change option-failed
  	Fix: Phonebook is populated with phone numbers after some time and not immediately while saving the changed entries.
-	 	
-	25/10/00			Original Condat(UK) BMI version.	
-	   
+
+	25/10/00			Original Condat(UK) BMI version.
+
  $End
 
 // Issue Number : SPR#15671 on 24/03/04 by Ajith K.P
- 
+
 *******************************************************************************/
 
 
 
 /*******************************************************************************
-                                                                              
+
                                 Include Files
-                                                                              
+
 *******************************************************************************/
 #define ENTITY_MFW
 
@@ -205,9 +205,9 @@
 
 //  May 24, 2004 REF: CRR MMI-SPR-15813 Ajith K P
 //  Issue description: Followup from 15623, this is the BMI part of this Issue.
-//	At last, in the record "SSC09" the number is displayed with the "+" 
+//	At last, in the record "SSC09" the number is displayed with the "+"
 //	character at the beginning of the number instead of "**21*+014543877989#".
- 
+
 
 extern int menuFDN;
 extern T_call call_data;
@@ -221,14 +221,14 @@
 T_MFW_HND waitWindel = NULL;
 	//x0061560 Date May17,07 (sateeshg) OMAPS00133241
 BOOL addname_flag = FALSE;
-/* Aug 09, 2007 DR:OMAPS00140447 x0056422(Srilekha)		
+/* Aug 09, 2007 DR:OMAPS00140447 x0056422(Srilekha)
 Added a new flag changename_flag to handle the Phonebook-SIM Memory entry changed event. */
 
 BOOL changename_flag = FALSE;
 /*******************************************************************************
-                                                                              
+
                                 Private data elements
-                                                                              
+
 *******************************************************************************/
 
 /* x0039928 - Lint warnings fix
@@ -245,16 +245,16 @@
 #endif
 
 // ADDED BY RAVI - 28-11-2005
-EXTERN T_MFW     mfw_Ucs2SIMStr(T_MFW_DCS outMode, U16 *inUcsStr, UBYTE maxOutSize, 
+EXTERN T_MFW     mfw_Ucs2SIMStr(T_MFW_DCS outMode, U16 *inUcsStr, UBYTE maxOutSize,
                          UBYTE *outMfwStr, UBYTE *outLen);
 
-EXTERN T_MFW     mfw_Gsm2SIMStr(T_MFW_DCS outMode, UBYTE *inGsmStr, UBYTE maxOutSize, 
+EXTERN T_MFW     mfw_Gsm2SIMStr(T_MFW_DCS outMode, UBYTE *inGsmStr, UBYTE maxOutSize,
                          UBYTE *outMfwStr,UBYTE *outLen);
 // END RAVI - 28-11-2005
 /*******************************************************************************
-                                                                              
+
                                 Private Methods
-                                                                              
+
 *******************************************************************************/
 
 /*******************************************************************************
@@ -262,18 +262,18 @@
  $Function:    	changeName
 
  $Description:	Change a phone book entry if we have a valid book selected
- 
+
  $Returns:		status of change, or MWB_PHB_FAIL if an error occurs
 
  $Arguments:	book, to be updated
                 entry, to update
                 currentStatus, pointer to status word
- 
+
 *******************************************************************************/
 
 static UBYTE changeName( UBYTE book, T_MFW_PHB_ENTRY *entry, T_MFW_PHB_STATUS *currentStatus )
 {
-	
+
 	TRACE_FUNCTION( "changeName()" );
 
 	/* Aug 09, 2007 DR:OMAPS00140447 x0056422(Srilekha) */
@@ -282,7 +282,7 @@
 	if ( book == PHB_SDN )
 		return MFW_PHB_FAIL;
 
-	return phb_store_entry( book, entry, currentStatus );		
+	return phb_store_entry( book, entry, currentStatus );
 }
 
 
@@ -296,13 +296,13 @@
  $Function:    	deleteName
 
  $Description:	Delete a phone book entry
- 
+
  $Returns:		status of delete, or MWB_PHB_FAIL if an error occurs
 
  $Arguments:	book, to be updated
                 index, index of entry to delete
                 currentStatus, pointer to status word
- 
+
 *******************************************************************************/
 
 static UBYTE deleteName( UBYTE book, UBYTE index, T_MFW_PHB_STATUS *currentStatus )
@@ -329,13 +329,13 @@
  $Function:    	addName
 
  $Description:	Add a new name to the phone book
- 
+
  $Returns:		status of change, or MWB_PHB_FAIL if an error occurs
 
  $Arguments:	book, to be updated
                 entry, to update
                 currentStatus, pointer to status word
- 
+
 *******************************************************************************/
 
 static UBYTE addName( UBYTE book, T_MFW_PHB_ENTRY *entry, T_MFW_PHB_STATUS *currentStatus )
@@ -369,7 +369,7 @@
 
 		}
 		else
-		
+
 		{
 			// convert from GSM to Alpha characters
 			bookGsm2Alpha( (UBYTE *) entry->name.data );
@@ -387,7 +387,7 @@
 		TRACE_EVENT(temp);
 	}
 	    entry->index = 0;
-		
+
         return phb_store_entry( book, entry, currentStatus );
     }
 }
@@ -400,9 +400,9 @@
 
 
 /*******************************************************************************
-                                                                              
+
                           File Handling Utilities
-                                                                              
+
 *******************************************************************************/
 
 /*******************************************************************************
@@ -411,11 +411,11 @@
 
  $Description:	Converts the name to a storeable format and stores it
                 in the phone book
- 
+
  $Returns:		None
 
  $Arguments:	phbk, pointer to phonebook structure
- 
+
 *******************************************************************************/
 
 void storeInFile( T_phbk *phbk )
@@ -435,7 +435,7 @@
     if (phbk->edt_buf_name[0] == 0x80)//if unicode
     {
     		/*a0393213 lint warning:Possible creation of out-of-bounds pointer soln:PHB_MAX_LEN changed to MAX_ALPHA_LEN-1*/
-   		 for (i =0; i < (MAX_ALPHA_LEN-1); i+=2) //work out string length 
+   		 for (i =0; i < (MAX_ALPHA_LEN-1); i+=2) //work out string length
    	 	{	if (phbk->edt_buf_name[i] == 0 && phbk->edt_buf_name[i+1] == 0)
    			{	if (i== 0)
    					actual_length =0;
@@ -450,7 +450,7 @@
     memset(phbk->newEntry.name.data, 0,MAX_ALPHA_LEN);
     //convert to SIM string
 	mfw_Ucs2SIMStr( MFW_DCS_UCS2 , (U16*)phbk->edt_buf_name, MAX_ALPHA_LEN,
-	
+
         phbk->newEntry.name.data, &phbk->newEntry.name.len );
 	TRACE_EVENT(	(char*)phbk->newEntry.name.data);
 	sprintf(debug, "length:%d", phbk->newEntry.name.len);
@@ -459,9 +459,9 @@
     else
     {
     	mfw_Gsm2SIMStr( MFW_DCS_7bits, (U8*)phbk->edt_buf_name, MAX_ALPHA_LEN,
-        phbk->newEntry.name.data, &phbk->newEntry.name.len );	
+        phbk->newEntry.name.data, &phbk->newEntry.name.len );
     }
-   
+
 #else
 /*MC SPR 1257, replacing PHB_MAX_LEN with MAX_ALPHA_LEN*/
     strncpy( (char *)phbk->newEntry.name, (char *)phbk->edt_buf_name, MAX_ALPHA_LEN );
@@ -472,9 +472,9 @@
     */
     strncpy( (char *) phbk->newEntry.number, (char *) phbk->edt_buf_number, PHB_MAX_LEN );
 	/*SPR 1327, copy current phonebook type to new entry*/
-	phbk->newEntry.book = phbk->current.status.book; 
+	phbk->newEntry.book = phbk->current.status.book;
 	/*If current phonebook UPN, don't overwrite phonebook type*/
-	// Feb 20, 2006 REF: OMAPS00061948  x0039928 
+	// Feb 20, 2006 REF: OMAPS00061948  x0039928
 	// Fix : A check is made with enum PHB_UPN of MFW instead of UPN of ACI
 	if( phbk->newEntry.book != PHB_UPN)
 		phbk->newEntry.book = bookActiveBook(WRITE);
@@ -492,14 +492,14 @@
             MmiBookSetCurrentText( TxtSaved  );
         }
         break;
-	//x0061560 Date May16,07 (sateeshg) OMAPS00133241 
+	//x0061560 Date May16,07 (sateeshg) OMAPS00133241
 	case  MFW_PHB_EXCT :
         {
             /* Entry saved okay
             */
             MmiBookSetCurrentText( TxtPleaseWait  );
 		//	MmiBookSetCurrentText( TxtSaved  );
-      		
+
         }
 	//end
         break;
@@ -540,11 +540,11 @@
  $Function:    	changeInFile
 
  $Description:	change the phone book entry
- 
+
  $Returns:		none
 
  $Arguments:	phbk, pointer to phonebook structure
- 
+
 *******************************************************************************/
 
 void changeInFile( T_phbk *phbk )
@@ -553,10 +553,10 @@
 	TRACE_FUNCTION( "changeInFile()" );
 
 	if(phbk->current.status.book == PHB_ADN_FDN)
-		phbk->current.status.book = PHB_ADN;	//JVJE We can only store in ADN/FDN 
+		phbk->current.status.book = PHB_ADN;	//JVJE We can only store in ADN/FDN
 	else
 		phbk->current.status.book = phbk->current.status.book;
-	
+
 	TRACE_EVENT_P1("Current Book = %d", phbk->current.status.book);
 	TRACE_EVENT_P1("Current Name = %d",  phbk->current.selectedName);
 	TRACE_EVENT_P1("Current Buf Name = %s", phbk->edt_buf_name);
@@ -580,7 +580,7 @@
     	}
     	phbk->edt_buf_name[0] = (UBYTE)(actual_length/2);//add string length to beginning of string
     	phbk->edt_buf_name[1] = 0x00;
-    
+
       memset(phbk->current.entry[phbk->current.selectedName].name.data, 0, MAX_ALPHA_LEN);
     //convert to SIM string
 	mfw_Ucs2SIMStr( MFW_DCS_UCS2, (U16*)phbk->edt_buf_name, MAX_ALPHA_LEN,
@@ -625,12 +625,12 @@
             MmiBookSetCurrentText(  TxtWriteError );
         }
         break;
-		/* x0056422 on Aug 02,2007 for 
-		   OMAPS00140447 - PhoneBook: Unexpected confirmation message 
+		/* x0056422 on Aug 02,2007 for
+		   OMAPS00140447 - PhoneBook: Unexpected confirmation message
 		   when making changes to entries in SIM storage. */
 
 //  July 11, 2007 DR:OMAPS00137908 x00666692(Asha)
-//PHONEBOOK: changing name or number under SIM storage, Please Wait 
+//PHONEBOOK: changing name or number under SIM storage, Please Wait
 //message appears instead of Saved
 	case  MFW_PHB_EXCT :
         {
@@ -638,7 +638,7 @@
             */
             MmiBookSetCurrentText( TxtPleaseWait  );
 		//	MmiBookSetCurrentText( TxtSaved  );
-      		
+
         }
 	//end
         break;
@@ -665,19 +665,19 @@
  $Function:    	deleteFromFile
 
  $Description:	delete an entry from a phone book
- 
+
  $Returns:		None
 
  $Arguments:	phbk, phone book handle,
                 book, book to update,
- 
+
 *******************************************************************************/
 
 void deleteFromFile( T_phbk *phbk, UBYTE book )
 {
 	int index;
 	T_MFW_PHB_STATUS phb_status_before_delete; /*OMAPS00104376 a0393213(R.Prabakar)*/
-	
+
 	TRACE_FUNCTION( "deleteFromFile()" );
 
 	index = phbk->current.selectedName - phbk->current.missedCallsOffset;
@@ -695,12 +695,12 @@
 
 #ifdef NO_ASCIIZ
 				phbk->current.entry[index].name.len = 0;
-				memset((char*)phbk->current.entry[index].number, '\0', PHB_MAX_LEN); 
+				memset((char*)phbk->current.entry[index].number, '\0', PHB_MAX_LEN);
 
 #else
 /*MC SPR 1257, replacing PHB_MAX_LEN with MAX_ALPHA_LEN for name strings*/
 				memset((char*)phbk->current.entry[index].name, '\0', MAX_ALPHA_LEN);
-				memset((char*)phbk->current.entry[index].number, '\0', PHB_MAX_LEN); 
+				memset((char*)phbk->current.entry[index].number, '\0', PHB_MAX_LEN);
 #endif
             /* Move the current index to the next valid entry
             */
@@ -708,7 +708,7 @@
 					phbk->current.selectedName --;
 				else
 					phbk->current.selectedName = 0;
-				
+
             	if(phbk->current.index > 1)
             		phbk->current.index--;
             	else
@@ -769,18 +769,18 @@
  $Function:    	bookChangePB
 
  $Description:	Change the phonebook
- 
+
  $Returns:		None
 
  $Arguments:	None.
- 
+
 *******************************************************************************/
 
 void bookChangePB(T_MFW_HND win, UBYTE identifier, UBYTE reason)
 {
 	T_MFW_WIN			*win_data   = ( (T_MFW_HDR *) win )->data;
     T_phbk				*Phbk		=	(T_phbk *) win_data->user;
-    
+
 	GI_pb_SetPhonebook(identifier);
 	bookShowInfoScreen( Phbk->win, TxtPhonebook, TxtChanged, NULL, NULL, 3000);
 	return;
@@ -792,14 +792,14 @@
  $Function:    	bookCopy
 
  $Description:	Copy or move a phonebook entry from one book to another
- 
+
  $Returns:		status of change, or MWB_PHB_FAIL if an error occurs
 
  $Arguments:	entry 		- the entry to be moved or copied
  				srcStatus	- Status information about the source phonebook
                 destStatus 	- Status information about the destination phonebook
                 move		- TRUE if the original record is to be deleted
- 
+
 *******************************************************************************/
 
 UBYTE bookCopy( T_MFW_PHB_ENTRY *entry, T_MFW_PHB_STATUS	*destStatus, T_MFW_PHB_STATUS	*srcStatus, UBYTE move )
@@ -807,9 +807,9 @@
     T_MFW				ret;
     UBYTE				srcIndex;
     UBYTE				srcBook;
- 
+
 	TRACE_FUNCTION("bookCopy");
-		
+
 	if (!destStatus->avail_entries)
 	{
 		/* There's no room in the destination phonebook to add the entry */
@@ -826,19 +826,19 @@
 		entry->name.len = destStatus->tag_len;
 		entry->name.data[entry->name.len] = NULL;
 	}
-	
+
     ret = phb_store_entry( destStatus->book, entry, destStatus );
     TRACE_EVENT_P2("bookCopy: phb_store_entry book %d result %d", destStatus->book, ret);
-    
+
 // 27 June, 2007 DR:OMAPS00136627 x0062172 Syed
-    if ( (ret!=MFW_PHB_OK) && (ret!=MFW_PHB_EXCT) ) 
+    if ( (ret!=MFW_PHB_OK) && (ret!=MFW_PHB_EXCT) )
     	return ret;
 
 	/* Only try to delete the entry if we are moving an entry from one book
 	 * to another.  Don't try if it is an FDN entry */
 
 	TRACE_EVENT_P2("move %d, entry->book %d", move, entry->book);
-	 
+
 	if (move && entry->book!=PHB_FDN)
 	{
     	if  (( srcStatus->book == PHB_UPN) || (srcStatus->book == PHB_FDN ))
@@ -853,11 +853,11 @@
    /* 30 Aug ,2007 DR:OMAPS00143539 ,x0081909 ( Deepak ) */
 
    /* If we copy an entry and then try to delete it from either SIM or Phone storage,before delete opertaion Index of an entry is restored  */
-   
+
 	entry->index = srcIndex;
-	
+
 	TRACE_EVENT("bookCopy: leaving function");
-	
+
 	return ret;
 }
 
@@ -867,11 +867,11 @@
  $Function:    	bookDelMoveCB
 
  $Description:	callback after moving a phonebook entry
- 
- $Returns:		
-
- $Arguments:	
- 
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 //x0pleela 01 june, 2006  DR: OMAPS00079716
 
@@ -886,13 +886,13 @@
 	{
 		  SEND_EVENT( Phbk->search_win, SEARCH_STRING, 1, 0);
 		    winShow(Phbk->search_win );
-	} 
+	}
 	else
 	{
 		if( Phbk->search_win)
 		{
 			 //destroy current window
-		 	bookSearchDestroy(Phbk->search_win );	
+		 	bookSearchDestroy(Phbk->search_win );
 		}
 	}
 
@@ -902,11 +902,11 @@
  $Function:    	bookCopyCB
 
  $Description:	callback after Copying a phonebook entry
- 
- $Returns:		
-
- $Arguments:	
- 
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 //x0066814(Geetha) 17 Aug, 2007  DR: OMAPS00141963
 
@@ -914,19 +914,19 @@
 {
     T_MFW_WIN		*win_data	= ((T_MFW_HDR *) win)->data;
     T_phbk				*Phbk		=	(T_phbk *) win_data->user;
-	
+
     bookMenuDestroy(Phbk->menu_options_win);
-	
+
 }
 /*******************************************************************************
  $Function:    	bookCopySingle
 
  $Description:	Copy or move a single phonebook entry
- 
+
  $Returns:		None
 
  $Arguments:	None.
- 
+
 *******************************************************************************/
 
 void bookCopySingle(T_MFW_HND win, UBYTE identifier, UBYTE reason)
@@ -939,9 +939,9 @@
     tMmiPhbData			*current = &Phbk->phbk->current;
 
 	TRACE_FUNCTION("bookCopySingle");
-	
+
 	oldBook = bookGetBookSelected();
-// May 3, 2004        REF: CRR MMI-SPR-18555  Rashmi C N(Sasken) 
+// May 3, 2004        REF: CRR MMI-SPR-18555  Rashmi C N(Sasken)
 //	While doing a copy from the FDN menu the destination should always be internal phonebook
 	if(menuFDN && (call_data.calls.numCalls==0))
 	{
@@ -963,7 +963,7 @@
 		switch (bookCopy(&current->entry[current->selectedName], &destStatus, &current->status, identifier))
 		{
 			case MFW_PHB_OK:
-			//27 June, 2007  DR: OMAPS00136608 x0073106(sundeep) 	
+			//27 June, 2007  DR: OMAPS00136608 x0073106(sundeep)
 			case MFW_PHB_EXCT:
 				txtId = TxtStored;
 				break;
@@ -989,13 +989,13 @@
 		bookShowInformation( win, txtId, NULL, (T_VOID_FUNC)bookCopyCB );
 	/*if (identifier)
 	{
-		// Destroy options menu and regenerate address list 
-		
+		// Destroy options menu and regenerate address list
+
 		if(Phbk->current.status.used_entries > 0)
 			SEND_EVENT(Phbk->search_win, SEARCH_SCROLL_UP, 0, 0 );
 		SEND_EVENT(Phbk->search_win, SEARCH_UPDATE, 0, (void*)Phbk->current.status.book );
 	}*/
-			
+
     return;
 }
 
@@ -1005,11 +1005,11 @@
  $Function:    	bookCopyMultiple
 
  $Description:	Copy or move multiple phonebook entries
- 
+
  $Returns:		None
 
  $Arguments:	None.
- 
+
 *******************************************************************************/
 
 void bookCopyMultiple(T_MFW_HND win, UBYTE move, UBYTE reason)
@@ -1028,7 +1028,7 @@
     /* Set up some data */
 
     TRACE_FUNCTION("bookCopyMultiple");
-    
+
 	entries.entry = &entry;
 
 	srcStatus.book = bookActiveBook(WRITE);
@@ -1064,7 +1064,7 @@
 		}
 		waitWin = bookShowInfoScreen( Phbk->win, TxtPleaseWait, NULL, NULL, NULL, FOREVER);
 	}
-	
+
 	TRACE_EVENT_P1("Entries in list: %d", srcStatus.used_entries);
 
 	/* For special case where SIM will give no E_PHB_READY response, the
@@ -1087,12 +1087,12 @@
 		{
 			/* For moving, always delete first entry alphabetically, list moves down.
 			 * For copying, move through the list */
-			 
+
 			if (move)
 				readIndex = 1;
 			else
 				readIndex = ipbCopyIndex;
-			
+
 			TRACE_EVENT_P1("Moving entry %d", readIndex);
 
 			/* Read in entry and copy/move it */
@@ -1102,7 +1102,7 @@
 			switch (bookCopy(entries.entry, &destStatus, &srcStatus, move))
 			{
 				case MFW_PHB_OK:
-				//27 June, 2007  DR: OMAPS00136608 x0073106(sundeep) 
+				//27 June, 2007  DR: OMAPS00136608 x0073106(sundeep)
 				case MFW_PHB_EXCT:
 				  	txtId = TxtStored;
 					break;
@@ -1113,20 +1113,20 @@
 					txtId = TxtFailed;
 					break;
 		    }
-			
+
 			ipbCopyIndex--;
 		}
 	}/* Is a loop in special case - see above */
-	while (!bookGetBookSelected() && !move && txtId==TxtStored && ipbCopyIndex>0); 
-	
+	while (!bookGetBookSelected() && !move && txtId==TxtStored && ipbCopyIndex>0);
+
 	/* If we've finished, or an error has occurred, show info dialog */
-	
+
 	if (ipbCopyIndex==0 || txtId!=TxtStored)
 	{
 		ipbCopyIndex = 0;
 
 		/* Destroy the Please Wait window and show the result message */
-			
+
     	bookShowInformation( win, txtId, NULL, NULL );
 		if (waitWin)
 		{
@@ -1134,9 +1134,9 @@
 		}
 
 		if (move)
-		{	
+		{
 			/* Destroy options menu and regenerate address list */
-		
+
 			bookMenuDestroy(Phbk->menu_options_win);
 			bookGetCurrentStatus( &Phbk->current.status );
 			//06 June, 2007  DR: OMAPS00132045
@@ -1150,7 +1150,7 @@
 				bookSearchDestroy(Phbk->search_win);
 		}
 	}
-	
+
 	return;
 }
 #endif
@@ -1158,9 +1158,9 @@
 
 
 /*******************************************************************************
-                                                                              
+
                                 Public Methods
-                                                                              
+
 *******************************************************************************/
 
 
@@ -1174,11 +1174,11 @@
 
    This returns the window handle associated with the current
    MFW element
- 
+
  $Returns:		window handle of current MFW item
 
  $Arguments:	none.
- 
+
 *******************************************************************************/
 
 tBookMfwHnd bookCurrentWindow( void )
@@ -1196,20 +1196,20 @@
 
  $Function:    	bookDefaultCallBack
 
- $Description:	
+ $Description:
 
    This is a simple call back function which is invoked when
    a not implemented dialog is displayed. We don't want anyone
    outside of this module using it so define it as static,
    this will still be callable from the info dialogs as it
    will use the reference we set up.
- 
+
  $Returns:		zero, always
 
  $Arguments:	win, parent window
                 identifier, of the window
 				reason, for the window
- 
+
 *******************************************************************************/
 
 static tBookStatus bookDefaultCallBack( tBookMfwHnd win, UBYTE identifier, UBYTE reason )
@@ -1231,16 +1231,16 @@
 
  $Function:    	bookWindowData
 
- $Description:	
+ $Description:
 
    This routine is designed to be invoked from within a menu
    handler or call back function and will return a pointer to
    the window data associated with the current MFW element.
- 
+
  $Returns:		pointer to the data area
 
  $Arguments:	none.
- 
+
 *******************************************************************************/
 
 void *bookWindowData( void )
@@ -1265,15 +1265,15 @@
 
  $Function:    	bookMenuSelectedNumber
 
- $Description:	
+ $Description:
 
    This will return the currently selected entry in the phone
    book, when the routine is being called from a menu handler
- 
+
  $Returns:		pointer to the selected number buffer
 
  $Arguments:	none.
- 
+
 *******************************************************************************/
 
 char *bookMenuSelectedNumber( void )
@@ -1304,11 +1304,11 @@
 
     Utility functions to determine if the phone book is
     still in the loading state
-  
+
  $Returns:		BOOK_FAILURE if loading, otherwise BOOK_SUCCESS
 
  $Arguments:	none.
- 
+
 *******************************************************************************/
 
 tBookStatus bookPhoneBookLoading( void )
@@ -1335,7 +1335,7 @@
  $Function:    	bookInfoDialog
 
  $Description:
- 
+
     Utility functions just to throw a string onto the screen
     primarily for debug purposes, the modal version will wait
     for a user input before removing the message, the non-modal
@@ -1344,7 +1344,7 @@
  $Returns:		One.
 
  $Arguments:	String1, String2, character strings to be displayed.
- 
+
 *******************************************************************************/
 
 tBookStatus bookInfoDialog( char *String1, char *String2 )
@@ -1376,17 +1376,17 @@
 
  $Function:    	bookNotImplemented
 
- $Description:	
+ $Description:
 
     This will present an information dialog indicating the current
     feature is still under development. This routine will use the
     current MFW element to detect the handle of the parent window
     if the incoming window handle is NULL.
- 
+
  $Returns:		One
 
  $Arguments:	Parent, window, can be NULL
- 
+
 *******************************************************************************/
 
 tBookStatus bookNotImplemented( tBookMfwHnd Parent )
@@ -1426,8 +1426,8 @@
 
  $Function:    	set_edt_attr
 
- $Description:	
- 
+ $Description:
+
     Sets up the edit attribute structure with the provided parameters
 
  $Returns:		None
@@ -1438,7 +1438,7 @@
 				*text, initial text to be edited
 				size, of the text (in bytes)
 				attr, the block to be set up with the other parameters
- 
+
  GW - Changed colour from 8 bits (foreground) to 2x32bits fgd and bgd
 For the colour display we pass a 32 bit word that defines the size and position of the editor.
 This can be either a specific size or a more generic ('middle of the screen'/full width of display)
@@ -1472,9 +1472,9 @@
 
 
 /*******************************************************************************
-                                                                              
+
                              Name Handling Functions
-                                                                              
+
 *******************************************************************************/
 
 /*******************************************************************************
@@ -1482,12 +1482,12 @@
  $Function:    	bookGetCurrentStatus
 
  $Description:	Determines the current status of the phone book
- 
+
  $Returns:		status byte
 
  $Arguments:	currentStatus, pointer to structure to be populated with
                 status information
- 
+
 *******************************************************************************/
 
 UBYTE bookGetCurrentStatus( T_MFW_PHB_STATUS *currentStatus )
@@ -1520,22 +1520,22 @@
  $Function:    	bookFindNames
 
  $Description:	Fine name in phone book
- 
+
  $Returns:		status of search
 
  $Arguments:	number, number of entries to search, current,
                 pointer to structure containing search context
- 
+
 *******************************************************************************/
 
 UBYTE bookFindName( UBYTE number, tMmiPhbData *current )
 {
     UBYTE   ret;
 	int     index;   // , Count = 0;  // RAVI
-	
+
     UBYTE   book_type, index_type;
 
-    
+
 
 //  May 24, 2004 REF: CRR MMI-SPR-15813 Ajith K P
 //  Added these variables to Fix the Issue MMI-SPR-15813
@@ -1543,9 +1543,9 @@
 //  numlength = lenght of the number array.
 //  nondigitFound = Checks whether nondigit is present in the number array or not.
 
-   int nondigitindex = -1,j,numlength = 0, nondigitFound = -1; 
-
-	
+   int nondigitindex = -1,j,numlength = 0, nondigitFound = -1;
+
+
 	TRACE_FUNCTION( "bookFindName()" );
 
     /* Firstly, check for an empty book
@@ -1558,13 +1558,13 @@
     }
 
 	//x0066692 Date:23 April 2007 DR:OMAPS00121834
-	// this condition ensures that stop index doesn't exceed max no. of entries can be added to a phonebook 
+	// this condition ensures that stop index doesn't exceed max no. of entries can be added to a phonebook
 	number = current->status.used_entries - current->index +1;
 
 	if ( number > MAX_SEARCH_NAME )
-		number = MAX_SEARCH_NAME;  
-	// Feb 20, 2006 REF: OMAPS00061948  x0039928 
-	// Fix : If used entries are less than MAX_SARCH_NAME then no. of entries 
+		number = MAX_SEARCH_NAME;
+	// Feb 20, 2006 REF: OMAPS00061948  x0039928
+	// Fix : If used entries are less than MAX_SARCH_NAME then no. of entries
 	// passed to the phb_read_entries is used entries.
 
     /* Okay, we have some entries to search, so initialise the current
@@ -1572,8 +1572,8 @@
     */
 	memset( current->entry, 0, MAX_SEARCH_CALL_LIST * sizeof( T_MFW_PHB_ENTRY ) );
 
-   
-   
+
+
     current->list.entry         = current->entry;
     current->list.num_entries   = number;
 
@@ -1598,18 +1598,18 @@
     	    index_type = MFW_PHB_INDEX;
     }
 
-   
+
     /* read the appropriate entries from the phone book
     */
 	{
 		char temp[255];
 		sprintf(temp,"book %d index %d indextype %d number %d",
 					book_type,current->index,index_type,number);
-		TRACE_EVENT(temp);		
-	}	
-// May 3, 2004        REF: CRR MMI-SPR-18555  Rashmi C N(Sasken) 
+		TRACE_EVENT(temp);
+	}
+// May 3, 2004        REF: CRR MMI-SPR-18555  Rashmi C N(Sasken)
 //When book is ADN, we need to read only ADN entries. no need to display ADN and FDN together
- 
+
 	if (book_type == PHB_ADN)	/*Quick test */
 		{
 		TRACE_EVENT("book_type == PHB_ADN");
@@ -1620,23 +1620,23 @@
 		TRACE_EVENT("book_type == OTHER");
 		ret = phb_read_entries( book_type, current->index, index_type, number, &current->list );
 		}
-	
+
     /* Populate the output structures
     */
     if (current->list.result == MFW_NO_ENTRY)
         current->index = 0;
 
-	
+
 #ifdef NO_ASCIIZ
-	
+
 #ifdef EASY_TEXT_ENABLED
 for ( index = 0; index < number; index++ )
 {/*MC , SPR 1242 merged in this section from b-sample build*/
-	
+
         /* GSM character sets
         */
         UBYTE   l_name[MAX_ALPHA_LEN];/*MC SPR 1257, name strings should use MAX_ALPHA_LEN*/
-	  char debug[22];	
+	  char debug[22];
 	  int i;
         TRACE_EVENT( (char*)current->entry[index].name.data);
         TRACE_EVENT("Convert from SIM to UCS2");
@@ -1648,9 +1648,9 @@
 			{
 				l_name[i+1] = current->entry[index].name.data[i];
 			}
-       	 	l_name[0] =	current->entry[index].name.data[0]; 
+       	 	l_name[0] =	current->entry[index].name.data[0];
        		l_name[1] = MAX_ALPHA_LEN;
-		
+
 			memcpy( current->entry[index].name.data, (char*)l_name, MAX_ALPHA_LEN );
 			/*MC, we'll just use the length provided by the MFW*/
 			if (current->entry[index].name.len%2 == 1)/*if length of string odd*/
@@ -1659,7 +1659,7 @@
 			/*make sure all chars after length are 0*/
 			for (i=current->entry[index].name.len; i<MAX_ALPHA_LEN; i++)
 			{	current->entry[index].name.data[i] = 0; }
-			
+
 			for (i=0; i < MAX_ALPHA_LEN;i++)
 			{
 				if ( current->entry[index].name.data[i]== 0 && current->entry[index].name.data[i+1] != 0)
@@ -1667,11 +1667,11 @@
 				else
 					debug[i] = (char)current->entry[index].name.data[i];
 	        }
-		
-			
+
+
    		 TRACE_EVENT("Decoded entry");
     	TRACE_EVENT(debug);
-			
+
 		}
 
 		else
@@ -1683,15 +1683,15 @@
 					memcpy( current->entry[index].name.data, (char*)l_name, MAX_ALPHA_LEN );
 				}
 
-			
+
 		}
 	}
-			
+
 #endif
 /*MC end*/
 #else
 for ( index = 0; index < number; index++ )
-	{	
+	{
 			UBYTE   l_name[MAX_ALPHA_LEN];/*MC SPR 1257, name strings should use MAX_ALPHA_LEN*/
 			TRACE_EVENT_P1("length of name string: %d", current->entry[index].name.len);
 			/*SPR2175, use new function to convert from GSM to ASCII*/
@@ -1706,23 +1706,23 @@
     /* Needed to make international calls from the phonebook
     */
 	for ( index = 0; index < number; index++ )
-	{		
+	{
 		if ( current->entry[index].ton )
 		{
 
 //  May 24, 2004 REF: CRR MMI-SPR-15813 Ajith K P
 
 //  Issue description: Followup from 15623, this is the BMI part of this Issue.
-//	At last, in the record "SSC09" the number is displayed with the "+" 
+//	At last, in the record "SSC09" the number is displayed with the "+"
 //	character at the beginning of the number instead of "**21*+014543877989#"
 
-//  Solution: Find the location of nondigit(e.g:*, #) in the number array 
-//	and put '+' to next position if the index is less than numlength-8. This is done 
+//  Solution: Find the location of nondigit(e.g:*, #) in the number array
+//	and put '+' to next position if the index is less than numlength-8. This is done
 //	as there can be ss strings(like *11*20#) attached to the number in the end.
 //	For eg: **61#+9844093515*11*20#
 //  If the total length is less than 8 assign this index to nondigitindex.
 //  This solution is based on special sequences we have encountered till now.
-		
+
 		// Finds the length of the number array.
 		numlength = strlen((char*)current->entry[ index ].number);
 		//checks whether the length is within the limit.
@@ -1737,7 +1737,7 @@
                 {
 					// Found a nondigit can be */#
 					nondigitFound = j;
-					// Checking , whether the nondigit index is not at the end 
+					// Checking , whether the nondigit index is not at the end
 					// part of the number array.
 					if(j < (numlength-8))
 						{
@@ -1746,7 +1746,7 @@
 						}
 					else
 						{
-							if(numlength <8) 
+							if(numlength <8)
 							{
 								// If lenght of the number array is less than 8
 								// assign the index to nondigitindex
@@ -1758,10 +1758,10 @@
 				}
 			 }
 }
-//end			
+//end
 			if((nondigitindex == -1) && (nondigitFound> -1) && (nondigitFound < 4))
 			{
-				// Nondigit is existing and it's position is less than 4 and not met 
+				// Nondigit is existing and it's position is less than 4 and not met
 				// any of the above conditions.
 				nondigitindex = nondigitFound;
 			}
@@ -1773,10 +1773,10 @@
 			// Add the '+' sign after the appropriate nondigit character, if any.
 			current->entry[index].number[nondigitindex+1] = '+';
 		  }
-		
+
  	   }
 	//}
-    
+
     return current->result = ret;
 }
 
@@ -1792,12 +1792,12 @@
  $Function:    	bookEvent
 
  $Description:	Event handler for a phone book event
- 
+
  $Returns:		MFW_EVENT_CONSUMED if recognised message, otherwise
                 MFW_EVENT_PASSED
 
  $Arguments:	e, event, para, general parameter giving context of call
- 
+
 *******************************************************************************/
 
 int bookEvent( MfwEvt e, void *para )
@@ -1831,16 +1831,16 @@
 
 		case E_PHB_ERROR:
         {
-		//x0061560 Date May16,07 (sateeshg) OMAPS00133241 		
+		//x0061560 Date May16,07 (sateeshg) OMAPS00133241
      			 T_MFW_HND    win = mfwParent( mfw_header() );
-	
+
       			 TRACE_ERROR("E_PHB_ERROR store entry");
  		   	bookShowInformation(win, TxtError, NULL, NULL );
-  		      }	
-	
-     
+  		      }
+
+
         break;
-        
+
         /* SPR#1112 - SH - New events to indicate status of phonebook */
 
         case E_PHB_READY:
@@ -1851,7 +1851,7 @@
 		{
      			 T_MFW_HND    win = mfwParent( mfw_header() );
 			int txtid;
-	
+
       			 TRACE_EVENT("E_PHB_READY Delete all");
 			if (waitWindel)
   			{
@@ -1866,26 +1866,26 @@
 		//x0061560 Date May17,07 (sateeshg) OMAPS00133241
 		if(addname_flag == TRUE)
               {
-		            	  	
+
 			T_MFW_HND    win = mfwParent( mfw_header() );
 			int txtid;
-	
+
       			 TRACE_EVENT("E_PHB_READY Saved");
-			
+
 				txtid = TxtSaved;
 	 		   	bookShowInformation(win, txtid, NULL, NULL );
 				addname_flag = FALSE;
 				break;
 			}
-		/* Aug 09, 2007 DR:OMAPS00140447 x0056422(Srilekha) */		
+		/* Aug 09, 2007 DR:OMAPS00140447 x0056422(Srilekha) */
 		if(TRUE == changename_flag)
 		{
 				T_MFW_HND    win = mfwParent( mfw_header() );
 				int txtid;
-	
+
 				TRACE_EVENT("Saved prompt for change entry");
       			TRACE_EVENT("E_PHB_READY Saved");
-			
+
 				txtid = TxtSaved;
 	 		   	bookShowInformation(win, txtid, NULL, NULL );
 				changename_flag = FALSE;
@@ -1896,7 +1896,7 @@
             TRACE_EVENT("E_PHB_READY");
 #ifdef INT_PHONEBOOK
 			/* SPR#1112 - SH - If we're copying or moving a list,
-			 * the current operation has been successful - keep copying. */	 
+			 * the current operation has been successful - keep copying. */
             if (ipbCopyIndex)
             {
             	TRACE_EVENT("Copying/moving in progress.");
@@ -1911,9 +1911,9 @@
             TRACE_EVENT("E_PHB_BUSY");
         }
         break;
-        
+
         /* end SPR#1112 */
-        
+
         default:
         {
             /* indicate we haven't dealt with event
@@ -1950,7 +1950,7 @@
     T_phbk				*Phbk		=	(T_phbk *) win_data->user;
 
     Phbk ->current.status.book = bookActiveBook(READ);
-	//x0061560 Date JUNE 4,07 (sateeshg) OMAPS00131777 
+	//x0061560 Date JUNE 4,07 (sateeshg) OMAPS00131777
 	//Updating the current status of the phonebook
  bookGetCurrentStatus(&Phbk ->current.status);
 if(Phbk ->current.status.used_entries !=0)//Apr 30,2007, OMAPS00129173, x0066814(Geetha)
@@ -1959,7 +1959,7 @@
 		bookShowInfoScreen( Phbk->win, TxtPleaseWait, NULL, NULL, NULL, 100);
     else
 	DeleteAll_flag = TRUE;
-	
+
     if (phb_delete_book(Phbk->current.status.book) == MFW_PHB_OK)
     {
         if (!bookGetBookSelected() )
@@ -1997,7 +1997,7 @@
 
  $Arguments:	destEntry - destination phonebook entry structure
  				srcEntry - source phonebook entry structure
-				maxLen - max number oc chars to be copied 
+				maxLen - max number oc chars to be copied
 
 *******************************************************************************/
 //GW Created function to copy name (and length when required).
@@ -2021,7 +2021,7 @@
 	else
 		len = MAX_ALPHA_LEN;
 #endif
-#ifdef NO_ASCIIZ	
+#ifdef NO_ASCIIZ
 	memset (destEntry->name.data, 0, PHB_MAX_LEN);
 	memcpy( destEntry->name.data, srcEntry->name.data, len);
 	if (srcEntry->name.len < len)
@@ -2032,20 +2032,20 @@
 		if (len < PHB_MAX_LEN)
 		{	// there is space in array for termination - add it.
 			destEntry->name.data[len] = 0x00;
-			
+
 		}
 	}
 #else
 
 	memcpy( destEntry->name, srcEntry->name, maxLen);
-#endif		
+#endif
 }
 
 
 
 /*******************************************************************************
-                                                                              
+
                                 End of File
-                                                                              
+
 *******************************************************************************/