diff src/ui/bmi/mmiNetwork.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 5ff381b88fec
line wrap: on
line diff
--- a/src/ui/bmi/mmiNetwork.c	Sun Nov 08 05:12:05 2020 +0000
+++ b/src/ui/bmi/mmiNetwork.c	Sun Nov 08 06:39:16 2020 +0000
@@ -2,31 +2,31 @@
 
 					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:		Network
  $File:		    MmiNetwork.c
- $Revision:		1.0                                                       
-                                                                              
- $Author:		Condat(UK)                                                         
- $Date:		    22/02/01                                                      
-                                                                               
-********************************************************************************
-                                                                              
- Description:
-
-  
+ $Revision:		1.0
+
+ $Author:		Condat(UK)
+ $Date:		    22/02/01
 
 ********************************************************************************
 
- $Hist       
+ Description:
+
+
+
+********************************************************************************
+
+ $Hist
 
    Oct 09, 2007 OMAPS00148258 x0056422
    Description: Memory leak problem
@@ -36,76 +36,76 @@
    Description:HPLMN Manual Selection at power on -unable to perform manual selection at power ON
    Solution: In network_nm_cb(), added a new case E_NM_PLMN_LIST_BOOTUP, to list the PLMNs during bootup.
    May 31, 2007 DR: OMAPS00133201 x0pleela
-   Description: MS keeps searching networks and doesn't list available PLMNs after performing 
+   Description: MS keeps searching networks and doesn't list available PLMNs after performing
    			manual selection
-   Solution : Added new function nm_abort_network() to destroy the dialog saying "Searching for 
+   Solution : Added new function nm_abort_network() to destroy the dialog saying "Searching for
    			Networks" when CME_ERR_AbortedByNetwork error is recieved from ACI
 
 	May 24, 2007  DR: OMAPS00132483 x0pleela
 	Description: MM: While playing an AAC, unplug USB freezes the audio
 	Solution: In network() function, setting or resetting the phonelock and auto phone lock status bits
-				
+
  	May 09, 2007  DR: OMAPS00129014 x0pleela
 	Description: COMBO: unable to send SMS during midi playing
-	Solution: Added phone lock status code in network() function.			
+	Solution: Added phone lock status code in network() function.
  	May 09, 2007  DR: OMAPS00129014
 	Description: COMBO: unable to send SMS during midi playing
-	Solution: Added phone lock status code in network() function.			
+	Solution: Added phone lock status code in network() function.
     Apr 13, 2007 DRT:OMAPS00122739 x0066814(Geetha)
     Description: With Orange SIM card, once attached (at+cgatt=1), "5201" is displayed instead of "Orange"
-    Solution : In network function, under the NETWORK_FULL_SERVICE, 
+    Solution : In network function, under the NETWORK_FULL_SERVICE,
     added a contion to check whether plmn_name is present.
 
     Mar 30,2007  DRT: OMAPS00120157 x00061088(Prachi)
     Description : MMI displays network forbidden
     Solution: Added check for Manual selection when the user selects network
-    manually for network list .Now network() checking for for Manual selection 
+    manually for network list .Now network() checking for for Manual selection
     by checking data->network_list_status is NETWORK_LIST_DISPLAY_FIRST or not.
 
  	Feb 16, 2007 OMAPS00098351 x0066814(Geetha)
  	Description: NITZ support is not working
-       Solution: Added the FF_TIMEZONE flag.Time is calculated according to GMT, if the FF_TIMEZONE flag is enabled. 
+       Solution: Added the FF_TIMEZONE flag.Time is calculated according to GMT, if the FF_TIMEZONE flag is enabled.
        		Added settingsNITZ function to write the menu option selected onto the Flash.
 
     Feb 08,2007    DRT: OMAPS00115060 x00061088(Prachi)
     Description : To check for Forbidden network (for denied services),it takes long time.
     after including fix for issue OMAPS00110741.
-    Solution: To solve this issue ,condition for forbidden network(i.e. network_data.forbidden == TRUE) 
+    Solution: To solve this issue ,condition for forbidden network(i.e. network_data.forbidden == TRUE)
     is moved out of condition if (parameter != Null).
-       
+
 
 
     Jan 10, 2007 REF: OMAPS00110741  x0039928(sumanth)
     Description: Sample resets after network deregistration during Robustness Test
     Solution: A condition is added to check if the parameter passed to the network() is NULL.
-    
+
     Jan 05, 2007 OMAPS00084665  x0039928(sumanth)
     Description: Boot time exceed UCSD estimations
- 	
+
    Dec 13, 2006    DRT: OMAPS00105640 x0039928(Sumanth)
    Description : SIMP: The board reboots when removing SIM card.
-   Solution : A condition is added in network() to check if SIM is active. 
-   
+   Solution : A condition is added in network() to check if SIM is active.
+
     Oct 30,2006 ER:OMAPS00091029 x0039928(sumanth)
     Bootup time measurement
-    
+
     Oct 05, 2006    ER: OMAPS00094496 x0061088(Prachi)
     Description:Enhance RSSI to 3 parameters: Strength, quality, min-access-level
-    Solution: If there is NO NETWORK , Network() is calling globalSignalUpdate() 
+    Solution: If there is NO NETWORK , Network() is calling globalSignalUpdate()
     to show the Signal Strength.
    Sep 18,2006    DRT: OMAPS0090268 x00061088(Prachi)
    Description : To check for Forbidden network (for denied services),it takes long time.
    Solution : Function network_nm_cb() has now be implemented to handle E_NM_FORBIDDEN_NETWORK,which sends event
-   NETWORK_FORBIDDEN_NETWORK to network(),by setting flags network_data.aborted  =False 
+   NETWORK_FORBIDDEN_NETWORK to network(),by setting flags network_data.aborted  =False
    and network_data.forbidden = Ture.
 
 	Jun 23, 2006    DR: OMAPS00082374 x0pleela
-   	Description: EONS Failures - unexpected output from the MMI: 2 carriers; on the top always T-Mobile 
+   	Description: EONS Failures - unexpected output from the MMI: 2 carriers; on the top always T-Mobile
    	Solution:	a) Removed the usage of global variable gEons_alloc_active
 			b) Added new check for CNIV request
 			c) Memset the data->plmn_name and data->network_name
 			d) Added check to display short name if long name len is 0. or display numeric name if short name len is 0
-			   	
+
     June 02, 2006    DR: OMAPS00078005 x0021334
     Descripton: Test for NITZ (Network Identity and Timezone) support - No New time was displayed
     Solution: New Time/Date received from network is sent to MFW by lower layer by invoking 'rAT_PercentCTZV'
@@ -120,79 +120,79 @@
 	Feb 15, 2006    ER: OMAPS00065203 x0pleela
    	Description: Cingular Operator Name Prioritization implementation required
    	Solution: Incorporated review comments
-   			- Included flag NEPTUNE_BOARD to retain old code for operator get name and 
+   			- Included flag NEPTUNE_BOARD to retain old code for operator get name and
 				added new code for this ER also
-			- Removed the global variable gOper_sel_done and have introduced 2 functions which will 
+			- Removed the global variable gOper_sel_done and have introduced 2 functions which will
 				set and get the status of the operator selection
 
 	Feb 09, 2006    ER: OMAPS00065203 x0pleela
    	Description: Cingular Operator Name Prioritization implementation required
    	Solution: In function network(), check if EONS is allocated and activated. If not, get operator name from other sources
 			Removed CPHS check code as prioritized operator name is already updated to network_data
-   	
+
 	xrashmic 10 Nov, 2004 MMI-SPR-OMAPS00044200-OMAPS00044851
-	Added a please wait screen so that the sim is updated with the new code before 
+	Added a please wait screen so that the sim is updated with the new code before
 	populating the list again when deleting or when entering a newtwork code
-       
+
     Nov 02, 2005	REF: omaps00044855   Sumanth Kumar.C
     Description:	Phone crashes on invoking Manual option in Network Selection Menu.
-    Solution:		Memory free of network_data.pplmn is done when the editor exits instead of 
+    Solution:		Memory free of network_data.pplmn is done when the editor exits instead of
     list exit by option selection so that the pplmn data is available when the list is invoked once again.
 
 	Jun 14, 2005 REF: MMI-FIX-30439 x0018858
    	Description: The homezone/cityzone tags were not being displayed properly.
-   	Solution: Modified to save the tags properly in caches and also made the 
+   	Solution: Modified to save the tags properly in caches and also made the
 	appropriate modifications to update the same properly during mobility.
 
     Sep 23, 2004        REF: CRR 24562  xvilliva
     Bug:	Enable/disable the manual network selection option depending
 			on ENS.
-    Fix:	If the manual network selection is disabled we check if an 
+    Fix:	If the manual network selection is disabled we check if an
 			error is returned and flash an alert to the user.
 
 	Sep 8, 2004        REF: CRR 16062  xvilliva
-    Bug:	If a PLMN is selected (by using the middle key) from the PLMN list 
+    Bug:	If a PLMN is selected (by using the middle key) from the PLMN list
     		presented upon a manual search the D-Sample may freeze.
     Fix:	The "KEY_MNUSELECT" event is also monitered which was not
     		done earlier and was resulting in the PLMN list shown again.
 
     Jul 21, 2004        REF: CRR 13348  xvilliva
     Bug:	After selecting HPLMN manually, the idle screen is not shown.
-    Fix:	After the "Network Selected" alert is flashed, we destroy the 
+    Fix:	After the "Network Selected" alert is flashed, we destroy the
     		phonebook menu to return to the idle screen.
 
 
 	 //  Apr 14, 2004        REF: CRR 12641  xpradipg
 	 //		The network when selected using "Automatic" is not showing an alert after selection.
-	 //		A flag has been used to show the alert when ever network is selected using 
+	 //		A flag has been used to show the alert when ever network is selected using
 	 //		"Automatic" method. As the flag is present it will not flash this alert when the
 	 //		device is restarted.
- 
-	25/10/00			Original Condat(UK) BMI version.	
+
+	25/10/00			Original Condat(UK) BMI version.
 
 	05/04/06 REF:OMAPS00061046 x0043641
 	BUG:Possible to cancel the searching with right soft key although the option is not available.
 	FIX: In the searching mode cancel option is provided.
-	
+
 	08-03-2006   REF: OMAPS00061049    x0020906
-	
-	Bug: The sample crashed many times while trying to camp onto a FPLMN. PCO stucked when tracing this TC, 
+
+	Bug: The sample crashed many times while trying to camp onto a FPLMN. PCO stucked when tracing this TC,
 	therefore no PCO traces available; only L1 traces (TestHarness).
 
-	Fix: During manual selection from the indication will get the plmn list count and used the count for allocating 
+	Fix: During manual selection from the indication will get the plmn list count and used the count for allocating
 	plmn_list pointer and then destorying the list and free the pointer allocation when particular network is selected
 	or when back softkey is pressed.
 
-	   
+
  $End
  // Issue Number : SPR#12654 on 07/04/04 by Pradeep/Vadiraj
 *******************************************************************************/
 
 
 /*******************************************************************************
-                                                                              
+
                                 Include Files
-                                                                              
+
 *******************************************************************************/
 
 #define ENTITY_MFW
@@ -299,7 +299,7 @@
 /* BEGIN ADD: Neptune Alignment */
 #ifdef NEPTUNE_BOARD
 #include "bmi_integ_misc.h"
-#endif 
+#endif
 /* END ADD: Neptune Alignment */
 #ifdef NEPTUNE_BOARD
 /* PLMN list count obtained from indication, stored in the global static variable*/
@@ -309,7 +309,7 @@
 
 
 /* Enum containing GMT   */
-typedef enum { 
+typedef enum {
 MMI_GMT_NT_1200 = -48, /* Read as GMT -12:00 hrs */
 MMI_GMT_NT_1145 = -47, /* Read as GMT -11:45 hrs */
 MMI_GMT_NT_1130 = -46,
@@ -462,7 +462,7 @@
 #ifdef NEW_EDITOR
 	T_AUI_EDITOR_DATA	editor_info;	/* SPR#1428 - SH - New Editor data */
 #else
-	T_EDITOR_DATA     editor_info; /* storage for editor attributes */ 
+	T_EDITOR_DATA     editor_info; /* storage for editor attributes */
 #endif
 } T_network_OPT;
 
@@ -560,11 +560,11 @@
 #define NETWORK_TIME_UPDATE       445
 #endif
 //Sep 18 2006 DRT :OMAPS0009268 x0061088
-#define NETWORK_FORBIDDEN_NETWORK 446 
+#define NETWORK_FORBIDDEN_NETWORK 446
 
 #ifdef NEPTUNE_BOARD
 /* List destory not done - added - OMAPS00061049 - 08-03-2006 */
-#define NETWORK_LIST_DESTORY          440   
+#define NETWORK_LIST_DESTORY          440
 #endif
 
 /*
@@ -625,12 +625,12 @@
 
  $Function:    	networkInit
 
- $Description:	
-
- $Returns:		
-
- $Arguments:	
- 
+ $Description:
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 T_MFW_HND networkInit (T_MFW_HND parent_window)
 {
@@ -644,9 +644,9 @@
 
  $Description:	exit network handling (Backward Compatibility interface)
 
- $Returns:		
-
- $Arguments:	
+ $Returns:
+
+ $Arguments:
  *********************************************************************/
 
 
@@ -672,10 +672,10 @@
 
  $Description:	create network top window
 
- $Returns:		
-
- $Arguments:	
- 
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 T_MFW_HND network_create (T_MFW_HND parent_window)
 {
@@ -734,10 +734,10 @@
 
  $Description:	destroy network top window
 
- $Returns:		
-
- $Arguments:	
- 
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 void network_destroy (T_MFW_HND own_window)
 {
@@ -773,14 +773,14 @@
 
  $Description:	network top window dialog function
 
- $Returns:		
-
- $Arguments:	
- 
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 void network (T_MFW_HND win, USHORT event, SHORT value, void * parameter)
 {
- 
+
   T_MFW_WIN         * win_data = ((T_MFW_HDR *) win)->data;
   T_network         * data     = (T_network *)win_data->user;
   T_MFW_NETWORK_STRUCT  * plmn_ident;
@@ -794,19 +794,19 @@
   T_MFW_TIME *time_format; // To get the current time format set in MS
   #endif
 
-  	
+
   TRACE_FUNCTION(">>> network()");
 
 //x0pleela 09 Mar, 2007  DR: OMAPS00129014
 #ifdef FF_PHONE_LOCK
-	if( mfw_phlock_get_lock_status(MFW_PH_LOCK) == MFW_PH_LOCK_ENABLE ) 
+	if( mfw_phlock_get_lock_status(MFW_PH_LOCK) == MFW_PH_LOCK_ENABLE )
 	{
 		TRACE_EVENT("idle_draw: MFW_PH_LOCK_ENABLE");
 
 		//x0pleela 23 May, 2007   DR: OMAPS00132483
 		//Set the phone lock status to TRUE
 		mfw_set_Phlock_status(TRUE);
-		
+
 		if( !phlock_win_handle )
 			phLock_UnLock();
 	}
@@ -815,7 +815,7 @@
 		//x0pleela 23 May, 2007   DR: OMAPS00132483
 		//Set the phone lock status to FALSE
 		mfw_set_Phlock_status(FALSE);
-		
+
 		if( mfw_phlock_get_autolock_status(MFW_AUTO_PH_LOCK) == MFW_PH_LOCK_ENABLE )
 		{
 			phlock_auto = TRUE;
@@ -823,7 +823,7 @@
 			//x0pleela 23 May, 2007   DR: OMAPS00132483
 			//Set the auto phone lock status to TRUE
 			mfw_set_Auto_Phlock_status(TRUE);
-		}		
+		}
 		//x0pleela 23 May, 2007   DR: OMAPS00132483
 		//Set the auto phone lock status to FALSE
 		mfw_set_Auto_Phlock_status(FALSE);
@@ -844,7 +844,7 @@
       // Set PCTZV mode on
       //Dec 13,2006       DR:OMAPS00098351  x0066814-Added the FF_TIMEZONE flag
 #ifdef FF_TIMEZONE
-      nm_get_network_time();      
+      nm_get_network_time();
 #endif
 
       /*
@@ -870,7 +870,7 @@
 		 */
 		nm_avail_plmn_list();
 		//Sep 23, 2004        REF: CRR 24562  xvilliva
-		//After retrieving the list we see if an error occured 
+		//After retrieving the list we see if an error occured
 		//and flash an alert to the user accordingly.
 		if(g_ensErr == 1)
 		{
@@ -899,7 +899,7 @@
       }
  //Oct 05, 2006    ER: OMAPS00094496 x0061088(Prachi)
 	 signal_value = 0 ;
-        globalSignalUpdate(signal_value);       
+        globalSignalUpdate(signal_value);
 #ifdef MMI_HOMEZONE_ENABLED
 	/* sh - tell homezone there is no network */
 	//Jun 14, 2005 REF: MMI-FIX-30439 x0018858
@@ -919,7 +919,7 @@
        * Set Status
        */
       data->status = NETWORK_FULL_SERVICE;
-#ifdef FF_CPHS_REL4  
+#ifdef FF_CPHS_REL4
 	mfw_cphs_get_msp_info();
 #endif
 
@@ -927,7 +927,7 @@
       // Set PCTZV mode on
       //Dec 13,2006       DR:OMAPS00098351  x0066814 - Added the FF_TIMEZONE flag
 #ifdef FF_TIMEZONE
-      nm_get_network_time();       
+      nm_get_network_time();
 #endif
       /*
        * Copy Network Name in textual and numerical format
@@ -938,14 +938,14 @@
       plmn_ident = (T_MFW_NETWORK_STRUCT *)parameter;
 
 	//x0pleela 15 Feb, 2006  ER: OMAPs00065203
-	//Removed the global variable gOper_sel_done and have introduced 2 functions which will 
+	//Removed the global variable gOper_sel_done and have introduced 2 functions which will
 	//set and get the status of the operator selection
-	
+
        //x0pleela 9 Feb, 2006  ER:OMAPS00065203
 	//Check if EONS is allocated and activated. If not,  and if operator name is not yet obtained from other sources
 	//get operator name from other sources
 	if( ( ( plmn_ident->opn_read_from EQ NM_CPHS ) AND ( plmn_ident->roaming_indicator)  )
-  	OR (plmn_ident->opn_read_from EQ NM_ROM)  ) 
+  	OR (plmn_ident->opn_read_from EQ NM_ROM)  )
       {
         //get operator name from other sources CPHS or NITZ or ROM
          nm_get_opername(plmn_ident);
@@ -956,34 +956,34 @@
       memcpy (data->plmn_name, &plmn_ident->network_long.data, SIZE_PLMN_NAME);
 #else
       memcpy (data->plmn_name, plmn_ident->network_long, SIZE_PLMN_NAME);
-#endif      
+#endif
       memcpy (data->network_name, plmn_ident->network_numeric, SIZE_NETWORK_NAME);
 
      /*
        * If network name is not known use numeric representation as default.
        */
-  
+
 #ifdef NO_ASCIIZ
-//Apr 13, 2007 DRT:OMAPS00122739 x0066814(Geetha)     
-if(!(strlen((char*)data->plmn_name))) 
+//Apr 13, 2007 DRT:OMAPS00122739 x0066814(Geetha)
+if(!(strlen((char*)data->plmn_name)))
 {
-     
-      	  if( plmn_ident->network_short.len EQ 0 )      	  	
+
+      	  if( plmn_ident->network_short.len EQ 0 )
       	   strcpy ((char *)data->plmn_name, (char *)data->network_name);
       	  else
       	    memcpy (data->plmn_name, &plmn_ident->network_short.data, SHORT_NAME); /* x0039928 -Lint warning removal */
-      	
+
 }
-#else    
-//Apr 13, 2007 DRT:OMAPS00122739 x0066814(Geetha)     
-if(!(strlen((char*)data->plmn_name))) 
+#else
+//Apr 13, 2007 DRT:OMAPS00122739 x0066814(Geetha)
+if(!(strlen((char*)data->plmn_name)))
 {
-      
+
       		 if (strlen ((char *)(plmn_ident->network_short)) EQ 0)
        		strcpy ((char *)data->plmn_name, (char *)data->network_name);
       		else
       			memcpy (data->plmn_name, &plmn_ident->network_short, SIZE_PLMN_NAME);
-  	
+
 }
 #endif
       /*
@@ -992,7 +992,7 @@
       data->roaming_indicator = plmn_ident->roaming_indicator;
 
       network_stop_animation ();
-  
+
       /*
        * Inform Idle screen
        */
@@ -1009,27 +1009,27 @@
             if(data->keep_plmn_list EQ FALSE)
             {
 	          TRACE_EVENT("NETWORK_LIST_REGISTRATION No 1");
-				
+
 #ifdef FF_2TO1_PS
 #ifndef NEPTUNE_BOARD
-                 FREE_MEMORY ((UBYTE *)data->network_list->List, 
-                                        MMREG_MAX_PLMN_ID * sizeof (T_MFW_MNU_ITEM)); 
+                 FREE_MEMORY ((UBYTE *)data->network_list->List,
+                                        MMREG_MAX_PLMN_ID * sizeof (T_MFW_MNU_ITEM));
 #else
-                /* Free the allocated memory for PLMN list window - 
+                /* Free the allocated memory for PLMN list window -
                     OMAPS00061049 - 08-03-2006 */
-		  FREE_MEMORY ((UBYTE *)data->network_list->List, 
+		  FREE_MEMORY ((UBYTE *)data->network_list->List,
                                        Plmn_list_count * sizeof (T_MFW_MNU_ITEM));
 #endif
 
 #else
-               
+
 #ifndef NEPTUNE_BOARD
-		  FREE_MEMORY ((UBYTE *)data->network_list->List, 
-                                        MAX_PLMN_ID * sizeof (T_MFW_MNU_ITEM)); 
+		  FREE_MEMORY ((UBYTE *)data->network_list->List,
+                                        MAX_PLMN_ID * sizeof (T_MFW_MNU_ITEM));
 #else
-                 /* Free the allocated memory for PLMN list window - 
+                 /* Free the allocated memory for PLMN list window -
                      OMAPS00061049 - 08-03-2006 */
-		  FREE_MEMORY ((UBYTE *)data->network_list->List, 
+		  FREE_MEMORY ((UBYTE *)data->network_list->List,
                                         Plmn_list_count * sizeof (T_MFW_MNU_ITEM));
 #endif
 
@@ -1050,7 +1050,7 @@
             break;
         }
         // API - Moved from previous position
-		network_selected(); 
+		network_selected();
       }
 
 	  //  Apr 14, 2004        REF: CRR 12641  xpradipg
@@ -1059,7 +1059,7 @@
 	  	network_selected();
 		Auto_Network_Select=false;
 	  }
-	  	
+
       break;
 
     case NETWORK_NO_NETWORK:
@@ -1116,30 +1116,30 @@
 			if (data->network_list NEQ NULL)
 			{
 
-#ifdef FF_2TO1_PS                       
+#ifdef FF_2TO1_PS
 #ifndef NEPTUNE_BOARD
-			  FREE_MEMORY ((UBYTE *)data->network_list->List, 
-                                               MMREG_MAX_PLMN_ID * sizeof (T_MFW_MNU_ITEM)); 
+			  FREE_MEMORY ((UBYTE *)data->network_list->List,
+                                               MMREG_MAX_PLMN_ID * sizeof (T_MFW_MNU_ITEM));
 #else
-                       /* Free the allocated memory for PLMN list window - 
+                       /* Free the allocated memory for PLMN list window -
                            OMAPS00061049 - 08-03-2006 */
-			  FREE_MEMORY ((UBYTE *)data->network_list->List, 
+			  FREE_MEMORY ((UBYTE *)data->network_list->List,
                                               Plmn_list_count * sizeof (T_MFW_MNU_ITEM));
 #endif
 
 #else
 #ifndef NEPTUNE_BOARD
-			  FREE_MEMORY ((UBYTE *)data->network_list->List, 
-                                               MAX_PLMN_ID * sizeof (T_MFW_MNU_ITEM)); 
+			  FREE_MEMORY ((UBYTE *)data->network_list->List,
+                                               MAX_PLMN_ID * sizeof (T_MFW_MNU_ITEM));
 #else
-                       /* Free the allocated memory for PLMN list window - 
-                           OMAPS00061049 - 08-03-2006 */  
-			  FREE_MEMORY ((UBYTE *)data->network_list->List, 
+                       /* Free the allocated memory for PLMN list window -
+                           OMAPS00061049 - 08-03-2006 */
+			  FREE_MEMORY ((UBYTE *)data->network_list->List,
                                               Plmn_list_count * sizeof (T_MFW_MNU_ITEM));
 #endif
 
 #endif
-			  
+
 			  FREE_MEMORY ((UBYTE *)data->network_list, sizeof (ListMenuData));
 			  data->network_list = NULL;
 			}
@@ -1160,7 +1160,7 @@
 /* Dec 13, 2006    DRT: OMAPS00105640 x0039928(Sumanth)
      Fix: Condition added to check if sim is active                      */
 	if(SIM_NOT_ACTIVE != sim_status_check())
-	{			
+	{
 			if (plmn_list->count EQ 0)
 			{
 			  network_stop_animation ();
@@ -1174,7 +1174,7 @@
 			   */
 
 			  /* Pass the plmn_list which already hold the parameter data - OMAPS00061049 - 08-03-2006 */
-#ifndef NEPTUNE_BOARD			  
+#ifndef NEPTUNE_BOARD
 			  data->network_list = network_create_list (data, parameter);
 #else
 			  data->network_list = network_create_list (data, plmn_list );
@@ -1182,7 +1182,7 @@
 			  data->network_list_status = NETWORK_LIST_DISPLAY_FIRST;
 			  network_stop_animation ();
 			  listDisplayListMenu (win, data->network_list,  (ListCbFunc)network_list_cb,0);
-	 
+
 	               // change by Sasken ( Pradeep/Vadiraj) on Apr 07th 2004
 			// Issue Number : SPR#12654 on 07/04/04 by Pradeep/Vadiraj
 			// Bug : Pressing "search" button does not trigger anything
@@ -1190,7 +1190,7 @@
 			// Commented the following line
 			  // SEND_EVENT (idle_get_window(), NETWORK_NO_SERVICE, 0, 0);
 
-			
+
 			}
 		}
       }
@@ -1198,14 +1198,14 @@
 		  //Mar 30,2007  DRT: OMAPS00120157 x00061088(Prachi)
 		     if(data->network_list_status == NETWORK_LIST_DISPLAY_FIRST)
 		    {
-        // Feb 08,2007    DRT: OMAPS00115060 x00061088(Prachi)		  
+        // Feb 08,2007    DRT: OMAPS00115060 x00061088(Prachi)
 			  if (network_data.forbidden == TRUE)
 			  {
 				network_forbidden_plmn();
 				network_data.forbidden = FALSE;
 			  }
 		    }
-			  
+
 			}
 	  else
 	  {
@@ -1231,7 +1231,7 @@
       data->network_list_status = NETWORK_LIST_SELECTED;
       nm_select_plmn ((U8 *)network_data.network_search_name[value]);
 		//Sep 23, 2004        REF: CRR 24562  xvilliva
-		//After retrieving the list we see if an error occured 
+		//After retrieving the list we see if an error occured
 		//and flash an alert to the user accordingly.
 		if(g_ensErr == 1)
 		{
@@ -1243,34 +1243,34 @@
 
 		if (data->network_list NEQ NULL)
    		{
-			#ifdef FF_2TO1_PS                       
+			#ifdef FF_2TO1_PS
 			#ifndef NEPTUNE_BOARD
-     			FREE_MEMORY ((UBYTE *)data->network_list->List, 
-                                               MMREG_MAX_PLMN_ID * sizeof (T_MFW_MNU_ITEM)); 
+     			FREE_MEMORY ((UBYTE *)data->network_list->List,
+                                               MMREG_MAX_PLMN_ID * sizeof (T_MFW_MNU_ITEM));
 			#else
-                /* Free the allocated memory for PLMN list window - 
+                /* Free the allocated memory for PLMN list window -
                 OMAPS00061049 - 08-03-2006 */
-    	 		FREE_MEMORY ((UBYTE *)data->network_list->List, 
+    	 		FREE_MEMORY ((UBYTE *)data->network_list->List,
                                               Plmn_list_count * sizeof (T_MFW_MNU_ITEM));
 			#endif /* NEPTUNE_BOARD */
- 
+
 			#else
 				#ifndef NEPTUNE_BOARD
-     				FREE_MEMORY ((UBYTE *)data->network_list->List, 
-                                             MAX_PLMN_ID * sizeof (T_MFW_MNU_ITEM)); 
+     				FREE_MEMORY ((UBYTE *)data->network_list->List,
+                                             MAX_PLMN_ID * sizeof (T_MFW_MNU_ITEM));
 				#else
-					/* Free the allocated memory for PLMN list window - 
-                        OMAPS00061049 - 08-03-2006 */  
-     				FREE_MEMORY ((UBYTE *)data->network_list->List, 
+					/* Free the allocated memory for PLMN list window -
+                        OMAPS00061049 - 08-03-2006 */
+     				FREE_MEMORY ((UBYTE *)data->network_list->List,
                                               Plmn_list_count * sizeof (T_MFW_MNU_ITEM));
 				#endif /* NEPTUNE_BOARD */
- 
+
 			#endif /* FF_2TO1_PS */
-     
+
 			FREE_MEMORY ((UBYTE *)data->network_list, sizeof (ListMenuData));
 			data->network_list = NULL;
-   	} 
-	 //Modify by hou peng 2007/09/19 end 
+   	}
+	 //Modify by hou peng 2007/09/19 end
 
 	/* x0056422 OMAPS00148258 */
 
@@ -1285,7 +1285,7 @@
        *  maxRcd  = maximum preferred PLMN records on the SIM card
        *  usedRcd = used preferred PLMN records on the SIM card
        */
-      pplmn_mem = (T_MFW_PPLMN_MEM *)parameter; 
+      pplmn_mem = (T_MFW_PPLMN_MEM *)parameter;
 
 	  network_data.pplmn_mem.maxRcd  = pplmn_mem->maxRcd;
 	  network_data.pplmn_mem.usedRcd = pplmn_mem->usedRcd;
@@ -1294,9 +1294,9 @@
        * Request preferred PLMN list from the SIM
        */
 
-      	
+
 	    network_data.pplmn = (T_MFW_NETWORK_STRUCT *)ALLOC_MEMORY ((pplmn_mem->maxRcd) * sizeof (T_MFW_NETWORK_STRUCT));
-      	
+
 		if (network_data.pplmn EQ 0)
 		{
 			return;
@@ -1318,13 +1318,13 @@
 #ifdef NO_ASCIIZ
 				network_data.pplmn[i].network_long.len = 0;
 				network_data.pplmn[i].network_short.len = 0;
-#else			 	
+#else
 				memset(network_data.pplmn[i].network_long,   '\0', LONG_NAME);
 				memset(network_data.pplmn[i].network_short,   '\0', SHORT_NAME);
 #endif
 				memset(network_data.pplmn[i].network_numeric, '\0', NUMERIC_LENGTH);
 			 }
-			
+
 		    data->network_list = network_create_pref_list (data);
 		    listDisplayListMenu (win, data->network_list,(ListCbFunc)network_pref_list_cb,0);
 	 	}
@@ -1333,40 +1333,40 @@
       break;
 
    case NETWORK_PREFERRED_LIST:
-	  {			
+	  {
 
 	    /* UBYTE i; */ /* Warning Correction */
 
-	  
+
       TRACE_EVENT (">>NETWORK PREFERRED LIST");
       /*
        *  Create and present the preferred list of PLMNs
-       * 
+       *
        */
 
       //nm      network_stop_animation ();
 
-    
+
     data->network_list = network_create_pref_list (data);
-	
+
     /* cq12719 Check if prefered list info resource has been created.16-03-04 MZ */
     if(data->network_list  != NULL)
     		listDisplayListMenu (win, data->network_list,(ListCbFunc)network_pref_list_cb,0);
-      }   
+      }
       break;
 
   case NETWORK_CELL_SELECT:
   	{
-		
+
 	/* x0045876, 14-Aug-2006 (WR -"cell_data" was set but never used) */
 #ifdef MMI_HOMEZONE_ENABLED
   	/* If Homezone is active, inform it of the new cell data */
   	T_MFW_CELL_STRUCT *cell_data;
 #endif
-  	
+
   	TRACE_EVENT(">>NETWORK CELL SELECT");
 
-  	
+
        /* x0045876, 14-Aug-2006 (WR -"cell_data" was set but never used) */
 	/* cell_data = (T_MFW_CELL_STRUCT *)parameter; */
 
@@ -1376,7 +1376,7 @@
 	cell_data = (T_MFW_CELL_STRUCT *)parameter;
 
 	/* SPR759 - SH - send cell reselection info to homezone */
-	
+
 	//Jun 14, 2005 REF: MMI-FIX-30439 x0018858
 	//Modified to incorporate the third argument.
 	homezoneUpdate(cell_data->lid, cell_data->ci, 0);
@@ -1384,15 +1384,15 @@
 	break;
 #ifdef NEPTUNE_BOARD
     /* Destory the list when select softkey is pressed / back softkey is pressed */
-   /* OMAPS00061049 - 08-03-2006 - BEGIN*/	
+   /* OMAPS00061049 - 08-03-2006 - BEGIN*/
    case  NETWORK_LIST_DESTORY:
               TRACE_EVENT ("Inside NETWORK_LIST_DESTORY Event");
-			  
-		/* Destory the list window */	  
+
+		/* Destory the list window */
 	       listsDestroy(data->network_list->win);
 
 		TRACE_EVENT ("Destoryed list window successfully");
-		
+
 		/*
 		 * If network list is available, destroy
 		 */
@@ -1400,29 +1400,29 @@
 		{
 
 #ifdef FF_2TO1_PS
-                /* Free the allocated memory for PLMN list window - OMAPS00061049 - 08-03-2006 */ 
+                /* Free the allocated memory for PLMN list window - OMAPS00061049 - 08-03-2006 */
 		  FREE_MEMORY ((UBYTE *)data->network_list->List, Plmn_list_count * sizeof (T_MFW_MNU_ITEM));
 #else
-                /* Free the allocated memory for PLMN list window - OMAPS00061049 - 08-03-2006 */ 
+                /* Free the allocated memory for PLMN list window - OMAPS00061049 - 08-03-2006 */
 		  FREE_MEMORY ((UBYTE *)data->network_list->List, Plmn_list_count * sizeof (T_MFW_MNU_ITEM));
 #endif
-		  
+
 		  FREE_MEMORY ((UBYTE *)data->network_list, sizeof (ListMenuData));
 		  data->network_list = NULL;
 		}
 
 		TRACE_EVENT ("List window memory freed");
 	  break;
-	/* OMAPS00061049 - 08-03-2006 - END */ 	
-#endif	
-		
+	/* OMAPS00061049 - 08-03-2006 - END */
+#endif
+
 
   }
 
 // June 02, 2006    DR: OMAPS00078005 x0021334
 // Descripton: Test for NITZ (Network Identity and Timezone) support - No New time was displayed
 // Solution: New Time/Date received from network is sent to MFW by lower layer by invoking 'rAT_PercentCTZV'
-// function. The same is received and handled in case NETWORK_TIME_UPDATE in MMI for user 
+// function. The same is received and handled in case NETWORK_TIME_UPDATE in MMI for user
 // confirmation and RTC updation.
 
 //Dec 13,2006       DR:OMAPS00098351  x0066814 - Begin
@@ -1430,10 +1430,10 @@
   case NETWORK_TIME_UPDATE:
   		{
   BOOL modify_date_negative = FALSE;
-  BOOL modify_date_positive = FALSE;    
+  BOOL modify_date_positive = FALSE;
   int actual_TD = 0;
   int absolute_value;
-    
+
   TRACE_EVENT ("Inside NETWORK_TIME_UPDATE Event");
 
 if(FFS_flashData.nitz_option!=NitzOff)
@@ -1455,14 +1455,14 @@
   {
     absolute_value = ~absolute_value+1;
   }
-  
+
 actual_TD = absolute_value;
 
 if(actual_TD >0)
 {
 
                      network_time->hour = network_time->hour + actual_TD/4 ;
-                     
+
                      network_time->minute = network_time->minute + (actual_TD%4)*15;
                         if(network_time->minute > 60)
                             {
@@ -1492,19 +1492,19 @@
                             {
                             network_time->minute = 0;
                             network_time->hour = network_time->hour - 1;
-                           
+
                             }
                         else
                             network_time->minute = network_time->minute - abs((actual_TD%4)*15);
-                            
+
                         if((network_time->hour - abs(actual_TD/4 ))  < 0)
                             modify_date_negative = TRUE;
                         else
-                            network_time->hour = network_time->hour - abs(actual_TD/4 );  
+                            network_time->hour = network_time->hour - abs(actual_TD/4 );
 
 }
 
-//Assume the date is 1/07/2005 5 Am in the morning 
+//Assume the date is 1/07/2005 5 Am in the morning
 //After time zone calculation it needs to become 30/06/2005 and not 31 st June 2005 since there are only 30 days
 //in all the odd months before July and in all the even months after july(7th Month)
 //Similarly a problem arises if the year too needs to be adjusted after the timezone calculations.
@@ -1517,39 +1517,39 @@
 	           	network_time->hour  = 24 - abs(network_time->hour - abs(actual_TD/4 ));
 
 	              network_time->day = network_time->day -1;
-				   
+
                          if(network_time->day == 0)
                             {
                                 if(((network_time->month)%2 != 0) && network_time->month <= 7)
                                     {
                                     if( network_time->month == 1)
                                         {
-                                            network_time->month = network_time->month -1;  
+                                            network_time->month = network_time->month -1;
                                             network_time->day = 31;
                                         }
 					     else{
-                                        network_time->month = network_time->month -1;  
+                                        network_time->month = network_time->month -1;
                                         network_time->day = 30;
 					     	}
                                     }
                                 else if(((network_time->month)%2 == 0) && network_time->month < 7)
                                     {
-                                        network_time->month = network_time->month -1;  
+                                        network_time->month = network_time->month -1;
                                         network_time->day = 31;
                                     }
                                 if(((network_time->month)%2 == 0) && network_time->month > 7)
                                     {
                                         if( network_time->month == 8)
                                         {
-                                            network_time->month = network_time->month -1;  
+                                            network_time->month = network_time->month -1;
                                             network_time->day = 31;
                                         }
 					     else
                                         {
-                                            network_time->month = network_time->month -1;  
+                                            network_time->month = network_time->month -1;
                                             network_time->day = 30;
                                         }
-										
+
                                 	}
                                 if(network_time->month == 2)
                                     {
@@ -1570,7 +1570,7 @@
 {
                     	TRACE_EVENT("modify date positive");
                          network_time->hour =  network_time->hour -24;
-       
+
                          network_time->day = network_time->day + 1;
 
                         if(network_time->month ==  2)
@@ -1578,7 +1578,7 @@
                                  if(network_time->day ==  30)
                                     {
                                         network_time->day =  1;
-                                        network_time->month =  3;                                        
+                                        network_time->month =  3;
                                     }
                                  if(network_time ->day == 29)
                                     {
@@ -1597,7 +1597,7 @@
 				{
 					if(network_time->day>=31)
 					{
-					if(network_time->day == 31)  
+					if(network_time->day == 31)
                             	{
                                 	if(((network_time->month)%2 != 0) && network_time->month <= 7)
                                     {
@@ -1607,7 +1607,7 @@
                                     {
                                         network_time->day = 31;
                                     }
-						
+
                                 else
                                     {
                                         network_time->day = 1;
@@ -1620,7 +1620,7 @@
                                         network_time->month = network_time->month +1;
                                     }
                          		}
-                           	}	
+                           	}
                                 if(network_time->month > 12)
                                     {
                                         network_time->year = network_time->year + 1;
@@ -1628,13 +1628,13 @@
                                     }
                     }
 
-  // Get the current time and format info set in the MS 
+  // Get the current time and format info set in the MS
   time_format = mfw_td_get_time();
 
   // Copy this info in the structure that will be used to do RTC upation.
   // This ensures that the format set remains the same even after RTC updation.
   newTime = *time_format;
-    
+
   TRACE_EVENT("------------------------------------");
   TRACE_EVENT_P1("Current format set in MS : %d", time_format->format);
 
@@ -1643,9 +1643,9 @@
   if (time_format->format == RTC_TIME_FORMAT_12HOUR)
   {
       TRACE_EVENT("12 Hrs format");
-        
-      if (network_time->hour == 0) // If hour info from network is 0, set hour as 12 
-      {                    // and the AM/PM flag off to indicate AM. 
+
+      if (network_time->hour == 0) // If hour info from network is 0, set hour as 12
+      {                    // and the AM/PM flag off to indicate AM.
           newTime.PM_flag = 0;
           newTime.hour = 12;
       }
@@ -1655,11 +1655,11 @@
             newTime.hour = network_time->hour;
 	  }
 	  else
-	  {					
+	  {
 		   newTime.PM_flag = 1;  // If hour info from network is greater than 12,
 		   newTime.hour = network_time->hour - 12; // set hour = received hour - 12 and AM/PM
 	  }                                     // flag to ON indicate PM.
-   
+
   newTime.minute = network_time->minute; // Set minute info
   newTime.second = network_time->second; // Set second info
 
@@ -1667,18 +1667,18 @@
   // 0 - 2000 - default
   // 1 - 2001
   // 2 - 2002 etc.
-  // Hence we need to add 2000 to the year value received from network to 
+  // Hence we need to add 2000 to the year value received from network to
   // display the actual year.
-  
+
   newDate.day = network_time->day; // Day of the month
   newDate.month = network_time->month; // Month
-  newDate.year = network_time->year + 2000; // year 
+  newDate.year = network_time->year + 2000; // year
   }
   else
   {
-      TRACE_EVENT("24 Hrs format");        
+      TRACE_EVENT("24 Hrs format");
       newTime.hour = network_time->hour; // In 24 Hrs format, set the received hour info as it is.
-  
+
      newTime.minute = network_time->minute; // Set minute info
   newTime.second = network_time->second; // Set second info
 
@@ -1686,26 +1686,26 @@
   // 0 - 2000 - default
   // 1 - 2001
   // 2 - 2002 etc.
-  // Hence we need to add 2000 to the year value received from network to 
+  // Hence we need to add 2000 to the year value received from network to
   // display the actual year.
-  
+
   newDate.day = network_time->day; // Day of the month
   newDate.month = network_time->month; // Month
-  newDate.year = network_time->year + 2000; // year 
+  newDate.year = network_time->year + 2000; // year
     }
-  
+
 if(FFS_flashData.nitz_option==NitzAutomatic)
 {
 	   // Update RTC with new time info
             mfw_td_set_time(&newTime);
 
-            // Update RTC with new date info            
+            // Update RTC with new date info
             mfw_td_set_date(&newDate);
 
-            // Send IDLE_UPDATE event to force idle screen refresh             
+            // Send IDLE_UPDATE event to force idle screen refresh
             SEND_EVENT(idle_get_window(), IDLE_UPDATE, 0, 0);
 
-	       
+
 }
 else //if(FFS_flashData.nitz_option==NITZOn)
 {
@@ -1728,10 +1728,10 @@
 
  $Description:	network top window
 
- $Returns:		
-
- $Arguments:	
- 
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 static int network_win_cb (T_MFW_EVENT event, T_MFW_WIN * win)
 {
@@ -1748,10 +1748,10 @@
 
  $Description:	network handler (mfw callback handler)
 
- $Returns:		
-
- $Arguments:	
- 
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 static int network_nm_cb (T_MFW_EVENT event, T_MFW_HND para)
 {
@@ -1763,13 +1763,13 @@
 //x0pleela 9 Feb, 2006  ER:OMAPS00065203
 //Handling E_NM_OPN for operator name display
     	case E_NM_OPN:
-			
+
        SEND_EVENT (network_data.network_win, NETWORK_FULL_SERVICE, 0, para);
       break;
    //Sep 18,2006    DRT: OMAPS00090268 x0061088(Prachi)
    //Description : To check for Forbidden network (for denied services),it takes long time.
    //Solution : Function network_nm_cb() has now be implemented to handle E_NM_FORBIDDEN_NETWORK,which sends event
-   //NETWORK_FORBIDDEN_NETWORK to network(),by setting flags network_data.aborted  =False 
+   //NETWORK_FORBIDDEN_NETWORK to network(),by setting flags network_data.aborted  =False
    //and network_data.forbidden = Ture
     case E_NM_FORBIDDEN_NETWORK:
 	  	  network_data.forbidden = TRUE;
@@ -1778,7 +1778,7 @@
 		  /* Fix : Pass NULL as parameter                                         */
 	  	 SEND_EVENT (network_data.network_win, NETWORK_FORBIDDEN_NETWORK, 0, 0);
       break;
-   	
+
     case E_NM_LIMITED_SERVICE:
       SEND_EVENT (network_data.network_win, NETWORK_LIMITED_SERVICE, 0, para);
       break;
@@ -1821,7 +1821,7 @@
 		TRACE_EVENT("MmiNetwork:E_NM_BAND");
 		nm_registration (nm_get_mode (),0, 0);
 		//Sep 23, 2004        REF: CRR 24562  xvilliva
-		//After retrieving the list we see if an error occured 
+		//After retrieving the list we see if an error occured
 		//and flash an alert to the user accordingly.
 		if(g_ensErr == 1)
 		{
@@ -1840,7 +1840,7 @@
 		TRACE_EVENT("MmiNetwork:E_NM_PLMN_LIST_BOOTUP");
 		 	/*Start the available plmn search*/
   	nm_avail_plmn_list();
-		/*After retrieving the list we see if an error occured 
+		/*After retrieving the list we see if an error occured
 		and flash an alert to the user accordingly.*/
 		if(g_ensErr == 1)
 		{
@@ -1851,7 +1851,7 @@
   		network_remove_network_log ();
    		network_start_animation ();
 	    	network_data.aborted = FALSE;
- 
+
 		break;
 
     // June 02, 2006    DR: OMAPS00078005 x0021334
@@ -1861,7 +1861,7 @@
     case E_MFW_TIME_IND:
         TRACE_EVENT("E_MFW_TIME_IND");
 		SEND_EVENT (network_data.network_win, NETWORK_TIME_UPDATE, 0, para);
-        break;        
+        break;
 #endif
     default:
   	  return 0;
@@ -1877,10 +1877,10 @@
     	       It defines whether the network log off function shall
 	            be displayed or not.
 
- $Returns:		
-
- $Arguments:	
- 
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 USHORT nm_flag_log_off (T_MFW_MNU * m, T_MFW_MNU_ATTR * ma, T_MFW_MNU_ITEM * mi)
 {
@@ -1897,10 +1897,10 @@
     	       It defines whether the network log off function shall
 	            be displayed or not.
 
- $Returns:		
-
- $Arguments:	
- 
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 USHORT nm_flag_log_on (T_MFW_MNU * m, T_MFW_MNU_ATTR * ma, T_MFW_MNU_ITEM * mi)
 {
@@ -1919,16 +1919,16 @@
  $Function:    	network_set_mode_auto
 
  $Description:	 Start a automatic registration
-    	     
- $Returns:		
-
- $Arguments:	
- 
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 int network_set_mode_auto(T_MFW_MNU *m, T_MFW_MNU_ITEM *i)
 {
   TRACE_FUNCTION ("network_set_mode_auto()");
-  
+
   /*
    * Save the automatic mode in PCM for next power on
    */
@@ -1959,11 +1959,11 @@
  $Function:    	network_set_mode_man
 
  $Description:	 Start a manual registration
-    	     
- $Returns:		
-
- $Arguments:	
- 
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 int network_set_mode_man(T_MFW_MNU *m, T_MFW_MNU_ITEM *i)
 {
@@ -1979,7 +1979,7 @@
    */
   nm_avail_plmn_list();
 	//Sep 23, 2004        REF: CRR 24562  xvilliva
-	//After retrieving the list we see if an error occured 
+	//After retrieving the list we see if an error occured
 	//and flash an alert to the user accordingly.
 	if(g_ensErr == 1)
 	{
@@ -2018,13 +2018,13 @@
 //TRACE_FUNCTION ("network_pref_list()");
 
   /*
-   * Request the maximum number of preferred PLMN records 
+   * Request the maximum number of preferred PLMN records
    * on the SIM card
    */
 	nm_pplmn_mem_req();
 
 
-  
+
   return 1;
 }
 
@@ -2034,11 +2034,11 @@
  $Function:    	network_remove_network_log
 
  $Description:	Reset network log if set.
-    	     
- $Returns:		
-
- $Arguments:	
- 
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 static void network_remove_network_log (void)
 {
@@ -2051,7 +2051,7 @@
      */
     FFS_flashData.net_log_status = NM_LOG_AVAIL_NOT_USED;
     flash_write();
-   
+
   }
 }
 
@@ -2060,11 +2060,11 @@
  $Function:    	network_log_off
 
  $Description:	Removes a network log and returns to automatic registration.
-    	     
- $Returns:		
-
- $Arguments:	
- 
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 int network_log_off(T_MFW_MNU *m, T_MFW_MNU_ITEM *i)
 {
@@ -2086,15 +2086,15 @@
  $Function:    	network_log_on
 
  $Description:	 Sets a network log.
-    	     
- $Returns:		
-
- $Arguments:	
- 
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 int network_log_on(T_MFW_MNU *m, T_MFW_MNU_ITEM *i)
 {
- 
+
 
   TRACE_FUNCTION ("network_log_on()");
 
@@ -2110,7 +2110,7 @@
     memcpy (FFS_flashData.plmn_name, network_data.plmn_name, SIZE_PLMN_NAME);
     memcpy (FFS_flashData.network_name, network_data.network_name, SIZE_NETWORK_NAME);
 
-    
+
 	flash_write();
     /*
      * Save the manual mode in PCM for next power on
@@ -2122,7 +2122,7 @@
      */
     nm_select_plmn (network_data.network_name);
 	//Sep 23, 2004        REF: CRR 24562  xvilliva
-	//After retrieving the list we see if an error occured 
+	//After retrieving the list we see if an error occured
 	//and flash an alert to the user accordingly.
   	if(g_ensErr == 1)
 	{
@@ -2145,15 +2145,15 @@
               a) manual selection
               b) automatic selection
               c) network log selection
-    	     
- $Returns:		
-
- $Arguments:	
- 
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 void network_start_full_service(void)
 {
- 
+
   TRACE_FUNCTION ("network_start_full_service()");
 
   network_data.status = NETWORK_SEARCH_NETWORK;
@@ -2193,7 +2193,7 @@
     }
   }
 	//Sep 23, 2004        REF: CRR 24562  xvilliva
-	//After retrieving the list we see if an error occured 
+	//After retrieving the list we see if an error occured
 	//and flash an alert to the user accordingly.
 	if(g_ensErr == 1)
 	{
@@ -2208,11 +2208,11 @@
 
  $Description:	 Returns the textual and numeric representation of the
     	         network name.
-    	     
- $Returns:		
-
- $Arguments:	
- 
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 void network_get_name(T_CURRENT_NETWORK * nm)
 {
@@ -2224,8 +2224,8 @@
   TRACE_FUNCTION ("network_get_name()");
 
 //x0pleela 15 Feb, 2006   ER: OMAPS00065203
-//Included flag NEPTUNE_BOARD to retain old code for operator get name and 
-//added new code for this ER also 
+//Included flag NEPTUNE_BOARD to retain old code for operator get name and
+//added new code for this ER also
 
 #ifndef NEPTUNE_BOARD
 
@@ -2234,7 +2234,7 @@
   // and CPHS check is not required
 
   //x0pleela 09 Feb, 2006 ER: OMAPS00065203
-  //Updating prioritized operator name 
+  //Updating prioritized operator name
   memset(  nm->plmn_name, 0, SIZE_PLMN_NAME );
   memset(  nm->network_name, 0, SIZE_NETWORK_NAME );
   memcpy (nm->plmn_name, network_data.plmn_name, SIZE_PLMN_NAME);
@@ -2243,18 +2243,18 @@
   memset(  nm->service_provider_name, 0, SP_NAME );
  #else
    if (CphsPresent() )//if CPHS supported
-  {	
+  {
       T_MFW_CPHS_OP_NAME* operator_name;
       operator_name = CphsRequestOperatorName(); //get operator name
-  		
+
       if (operator_name->longName.data[0] != NULL)//if name not blank
-      {	
+      {
         memcpy(nm->plmn_name, operator_name->longName.data, SIZE_PLMN_NAME);
-        TRACE_EVENT("Reading PLMN from SIM");    	
+        TRACE_EVENT("Reading PLMN from SIM");
       }
       else
         memcpy (nm->plmn_name, network_data.plmn_name, SIZE_PLMN_NAME);
-      
+
       if (operator_name->shortName.data[0] != NULL)//if name not blank
       {
         memcpy(nm->network_name, operator_name->shortName.data, SIZE_NETWORK_NAME);
@@ -2264,10 +2264,10 @@
     }
     else
     {
-        
+
       	memcpy (nm->plmn_name, network_data.plmn_name, SIZE_PLMN_NAME);
       	memcpy (nm->network_name, network_data.network_name, SIZE_NETWORK_NAME);
-    
+
     }
 	  /* Marcus: Issue 1618: 24/01/2003: Start */
     /* Obtain the service provider name (from the SIM EF-SPN file) if any */
@@ -2280,11 +2280,11 @@
   	{
    	  	if (service_provider_name.len > sizeof(nm->service_provider_name)-1)
    	  	    service_provider_name.len = sizeof(nm->service_provider_name)-1;
-   	  	
+
    	  	memcpy(nm->service_provider_name,
    	  	    service_provider_name.data,
    	  	    service_provider_name.len);
-   	  	
+
   	    nm->service_provider_name[service_provider_name.len] = '\0';
   	}
 #else
@@ -2294,7 +2294,7 @@
    	  	strncpy(nm->service_provider_name,
    	  	    service_provider_name,
    	  	    sizeof(nm->service_provider_name)-1);
-   	  	
+
   	   	nm->service_provider_name[sizeof(nm->service_provider_name)-1] = '\0';
     }
 #endif
@@ -2307,11 +2307,11 @@
  $Function:    	network_log_enabled
 
  $Description:	 Checks whether a network log is active or not.
-    	     
- $Returns:		
-
- $Arguments:	
- 
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 static UBYTE network_log_enabled (void)
 {
@@ -2329,11 +2329,11 @@
  $Function:    	ListMenuData
 
  $Description:	 Creates a list of available PLMNs for selection.
-    	     
- $Returns:		
-
- $Arguments:	
- 
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 static ListMenuData * network_create_list (T_network * data, T_MFW_PLMN_LIST * plmn_list)
 {
@@ -2346,8 +2346,8 @@
 
   /* Allocated memory only for availble number of plmn list count */
   /* OMAPS00061049 - 08-03-2006 */
-#ifndef NEPTUNE_BOARD  
-  list_menu_data->List = (T_MFW_MNU_ITEM *) ALLOC_MEMORY (MAX_PLMN * sizeof (T_MFW_MNU_ITEM));  
+#ifndef NEPTUNE_BOARD
+  list_menu_data->List = (T_MFW_MNU_ITEM *) ALLOC_MEMORY (MAX_PLMN * sizeof (T_MFW_MNU_ITEM));
 #else
   list_menu_data->List = (T_MFW_MNU_ITEM *) ALLOC_MEMORY (plmn_list->count * sizeof (T_MFW_MNU_ITEM));
 #endif
@@ -2364,10 +2364,10 @@
   for (i=0;i<MAX_PLMN_ID;i++)
 #endif
   {
-#ifndef NEPTUNE_BOARD  
+#ifndef NEPTUNE_BOARD
        /* Taken this statement inside the condition */
-	/* OMAPS00061049 - 08-03-2006 */   
-       mnuInitDataItem(&list_menu_data->List[i]); 
+	/* OMAPS00061049 - 08-03-2006 */
+       mnuInitDataItem(&list_menu_data->List[i]);
 #endif
 
     if (i < plmn_list->count)
@@ -2375,7 +2375,7 @@
 #ifdef NEPTUNE_BOARD
        mnuInitDataItem(&list_menu_data->List[i]);
 #endif
-	
+
       /*
        * set network name
        */
@@ -2384,12 +2384,12 @@
       {
             list_menu_data->List[i].str = (char *)plmn_list->plmn[i].network_long.data;
       }
-#else       
+#else
       if (strlen((char *)plmn_list->plmn[i].network_long) NEQ 0)
       {
             list_menu_data->List[i].str = (char *)plmn_list->plmn[i].network_long;
       }
-#endif            
+#endif
       else
       {
          list_menu_data->List[i].str = (char *)plmn_list->plmn[i].network_numeric;
@@ -2431,7 +2431,7 @@
   list_menu_data->Attr           = &network_menuAttrib;
   list_menu_data->autoDestroy    = TRUE;
   list_menu_data->listCol = COLOUR_LIST_XX;
-  	
+
 
   return list_menu_data;
 }
@@ -2441,11 +2441,11 @@
  $Function:    	network_create_pref_list
 
  $Description:	 Creates a list of preferred PLMNs for selection.
-    	     
- $Returns:		
-
- $Arguments:	
- 
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 static ListMenuData * network_create_pref_list (T_network * data)
 {
@@ -2462,11 +2462,11 @@
 
   if (list_menu_data->List EQ 0)
   {
-  
+
     /* cq12719 If second memory alloc fails Free the memory allocated for  list menu data. 16-03-04 MZ */
 	if(NULL != list_menu_data)
 	  	  FREE_MEMORY ((void *)list_menu_data, sizeof (ListMenuData));
-	
+
     return NULL;
    }
 
@@ -2480,7 +2480,7 @@
   for (i=0; i < (network_data.pplmn_mem.maxRcd); i++)
   {
 	mnuInitDataItem(&list_menu_data->List[i]);
- 
+
    /*
     * set network name
     */
@@ -2490,7 +2490,7 @@
     {
 		list_menu_data->List[i].str = (char *)network_data.pplmn[i].network_long.data;
 	}
-#else       
+#else
     if (strlen((char *)network_data.pplmn[i].network_long) NEQ 0 )
     {
 		list_menu_data->List[i].str = (char *)network_data.pplmn[i].network_long;
@@ -2521,7 +2521,7 @@
   list_menu_data->Reason         = 0;
   list_menu_data->Strings        = TRUE;
   list_menu_data->Attr           = &network_menuAttrib;
-  list_menu_data->autoDestroy    = TRUE; 
+  list_menu_data->autoDestroy    = TRUE;
   list_menu_data->listCol = COLOUR_LIST_XX;
 
   return list_menu_data;
@@ -2531,12 +2531,12 @@
 
  $Function:    	network_create_mobile_list
 
- $Description:	 
-    	     
- $Returns:		
-
- $Arguments:	
- 
+ $Description:
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 static ListMenuData * network_create_mobile_list (T_network_OPT * data)
 {
@@ -2551,7 +2551,7 @@
   }
 
   mfwCheckMemoryLeft();
-  
+
   list_menu_data->List = (T_MFW_MNU_ITEM *) ALLOC_MEMORY (MAX_SHOW_OF_PLMN * sizeof (T_MFW_MNU_ITEM));
 
   mfwCheckMemoryLeft();
@@ -2562,7 +2562,7 @@
     return NULL;
   }
 
-  TRACE_EVENT ("network_create_mobile_list ()");  
+  TRACE_EVENT ("network_create_mobile_list ()");
 
 
 
@@ -2572,7 +2572,7 @@
   for (i=0; i < MAX_SHOW_OF_PLMN; i++)
   {
 	mnuInitDataItem(&list_menu_data->List[i]);
- 
+
    /*
     * set network name
     */
@@ -2583,10 +2583,10 @@
 		list_menu_data->List[i].str =data->pplmn_longnames[i];
 	}
 	else
-	    
+
     {
       list_menu_data->List[i].str = GET_TEXT(TxtEmpty);
-	}	
+	}
 
 /*SPR 2635, end*/
 
@@ -2620,17 +2620,17 @@
 
  $Function:    	network_submenu
 
- $Description:	Creates a submenu for the preferred list. 
-    	     
- $Returns:		
-
- $Arguments:	
- 
+ $Description:	Creates a submenu for the preferred list.
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 static ListMenuData * network_submenu (T_network * data, T_MFW_NETWORK_STRUCT * plmn_list)
 {
   UBYTE i;
- 
+
 
   ListMenuData *list_menu_data = (ListMenuData *)ALLOC_MEMORY (sizeof (ListMenuData));
 
@@ -2647,14 +2647,14 @@
   for (i=0;i<(NETWORK_MENU_ITEM);i++)
   {
 	mnuInitDataItem(&list_menu_data->List[i]);
-    
+
    /*
     * set network name
     */
 #ifdef NO_ASCIIZ
     if (plmn_list->network_long.len NEQ 0)
 		list_menu_data->List[i].str = (char *)plmn_list->network_long.data;
-#else 
+#else
     if (strlen((char *)plmn_list->network_long) NEQ 0)
 		list_menu_data->List[i].str = (char *)plmn_list->network_long;
 #endif
@@ -2693,11 +2693,11 @@
  $Function:    	network_list_cb
 
  $Description:	Callback function list dialog.
-    	     
- $Returns:		
-
- $Arguments:	
- 
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 static void network_list_cb(T_MFW_HND win, ListMenuData * ListData)
 {
@@ -2716,7 +2716,7 @@
 	SEND_EVENT (win, NETWORK_LIST_DESTORY, NULL, NULL);
   }
 
-  if ((ListData->Reason EQ LISTS_REASON_BACK) || 
+  if ((ListData->Reason EQ LISTS_REASON_BACK) ||
     (ListData->Reason EQ LISTS_REASON_CLEAR)||
     (ListData->Reason EQ LISTS_REASON_HANGUP))
 
@@ -2732,11 +2732,11 @@
  $Function:    	network_pref_list_cb
 
  $Description:	Callback function pref. list dialog.
-    	     
- $Returns:		
-
- $Arguments:	
- 
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 static void network_pref_list_cb(T_MFW_HND win, ListMenuData * ListData)
 {
@@ -2744,7 +2744,7 @@
 
   if (ListData->Reason EQ LISTS_REASON_SELECT)
   {
-     
+
 // call here the MenuOptions with the items "Select from the list"
 
       FREE_MEMORY ((UBYTE *)network_data.network_list->List, (network_data.pplmn_mem.maxRcd) * sizeof (T_MFW_MNU_ITEM));
@@ -2754,7 +2754,7 @@
 //Commented FREE_MEMORY for network_data.pplmn as this is required when we enter the option menu.
       //    Nov 02, 2005	REF: omaps00044855   Sumanth Kumar.C
       //    Solution:		Comment network_data.pplmn memory free.
-/* 
+/*
     // cq12719 Stop the memory leak 17-03-04 MZ.
       FREE_MEMORY ((UBYTE *)network_data.pplmn,(network_data.pplmn_mem.maxRcd) * sizeof (T_MFW_NETWORK_STRUCT));
 */
@@ -2765,17 +2765,17 @@
   }
   else
   {
-	  
+
 	  //user pressed Exit to go back to the network submenu
 	  FREE_MEMORY ((UBYTE *)network_data.network_list->List, (network_data.pplmn_mem.maxRcd) * sizeof (T_MFW_MNU_ITEM));
 
 	  FREE_MEMORY ((UBYTE *)network_data.network_list, sizeof (ListMenuData));
-	  
+
 	  FREE_MEMORY ((UBYTE *)network_data.pplmn,(network_data.pplmn_mem.maxRcd) * sizeof (T_MFW_NETWORK_STRUCT));
 
   }
 
-  
+
 }
 
 /*******************************************************************************
@@ -2783,11 +2783,11 @@
  $Function:    	network_mobile_list_cb
 
  $Description:	Callback function international list dialog.
-    	     
- $Returns:		
-
- $Arguments:	
- 
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 static void network_mobile_list_cb(T_MFW_HND win, ListMenuData * ListData)
 {
@@ -2799,14 +2799,14 @@
     T_MFW_WIN       * win_data = ((T_MFW_HDR *)win)->data;
     T_network_OPT    * data     = (T_network_OPT *)win_data->user;
     T_DISPLAY_DATA display_info;
-    
+
 	TRACE_EVENT ("network_mobile_list_cb()");
 
 
     switch (ListData->Reason)
     {
 		case LISTS_REASON_SELECT: /*  */
-			
+
 			mode =   REPLACE_PREF_PLMN;    /* Overwrite an existing entry  at a given index */
 			/*SPR 2635, use new function to replace preferred PLMN using the longname*/
 			nm_change_pref_plmn_longname(mode,(network_data.Listposition) +1 , 0, data->pplmn_longnames[ListData->ListPosition]);
@@ -2815,7 +2815,7 @@
 			dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, TxtChanged, TxtNull, COLOUR_STATUS_NETWORKS);
 			dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)network_mobile_list_changed_cb, THREE_SECS, 0 );
 
-		    info_dialog (win, &display_info); 
+		    info_dialog (win, &display_info);
 
 	    break;
 		case LISTS_REASON_BACK: /* back to previous menu */
@@ -2842,11 +2842,11 @@
 
  $Description:	Callback from "Changed" message.  Destroys the list and recreates the
  				updated network list.
-    	     
- $Returns:		
-
- $Arguments:	
- 
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 
 void network_mobile_list_changed_cb(T_MFW_HND win , USHORT identifier, UBYTE reason)
@@ -2854,7 +2854,7 @@
     T_MFW_WIN       * win_data = ((T_MFW_HDR *)win)->data;
     T_network_OPT    * data     = (T_network_OPT *)win_data->user;
     /* T_DISPLAY_DATA display_info; */ /* Warning Correction */
-    
+
 	/* destroy the Menu */
     network_MNU_destroy(data->win);
 
@@ -2870,11 +2870,11 @@
  $Function:    	network_start_animation
 
  $Description:	Starts the network animation.
-    	     
- $Returns:		
-
- $Arguments:	
- 
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 static void network_start_animation(void)
 {
@@ -2908,11 +2908,11 @@
  $Function:    	network_start_animation_plmn_selection
 
  $Description:	Starts the plmn selection animation.
-    	     
- $Returns:		
-
- $Arguments:	
- 
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 static void network_start_animation_plmn_selection(int plmn_value)
 {
@@ -2923,7 +2923,7 @@
 
 	dlg_initDisplayData_TextStr( &display_info, TxtNull, TxtNull, "Requesting....", NULL, COLOUR_STATUS_NETWORKS);
 	dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)network_animation_cb, FOREVER, KEY_CLEAR| KEY_RIGHT );
-	
+
   /*
    * Call Info Screen
    */
@@ -2937,11 +2937,11 @@
  $Function:    	network_forbidden_plmn
 
  $Description:	Starts the forbidden plmn data screen.
-    	     
- $Returns:		
-
- $Arguments:	
- 
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 static void network_forbidden_plmn(void)
 {
@@ -2969,11 +2969,11 @@
  $Function:    	network_selected
 
  $Description:	displays info screen on network selected
-    	     
- $Returns:		
-
- $Arguments:	
- 
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 static void network_selected(void)
 {
@@ -2998,11 +2998,11 @@
  $Function:    	network_no_plmns
 
  $Description:	 Indicate Info Screen that the network list is empty.
-    	     
- $Returns:		
-
- $Arguments:	
- 
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 static void network_no_plmns(void)
 {
@@ -3023,11 +3023,11 @@
  $Function:    	network_stop_animation
 
  $Description:	 Stops the network animation.
-    	     
- $Returns:		
-
- $Arguments:	
- 
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 static void network_stop_animation(void)
 {
@@ -3044,11 +3044,11 @@
  $Function:    	network_animation_cb
 
  $Description:	Callback for information dialog (not used)n
-    	     
- $Returns:		
-
- $Arguments:	
- 
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 void network_animation_cb(T_MFW_HND win, UBYTE identifier, UBYTE reason)
 {
@@ -3063,11 +3063,11 @@
  $Function:    	network_select_animation_cb
 
  $Description:	Callback for information dialog "Network Selected".
-    	     
- $Returns:		
-
- $Arguments:	
- 
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 void network_select_animation_cb(T_MFW_HND win, UBYTE identifier, UBYTE reason)
 {
@@ -3076,7 +3076,7 @@
 	network_data.network_search_win = 0;
 	network_data.aborted = TRUE;
 	// Jul 21, 2004        REF: CRR 13348  xvilliva
-	// If "gPhbkMenu" is not NULL, we destroy phonebook menu 
+	// If "gPhbkMenu" is not NULL, we destroy phonebook menu
 	// to return to idle screen.
 	if(gPhbkMenu != NULL)
 	{
@@ -3088,13 +3088,13 @@
 
  $Function:    	network_MNU_start
 
- $Description:	called when the user press the Edit Softkey to enter the 
+ $Description:	called when the user press the Edit Softkey to enter the
                 Option Menu "Select from the list" & "Enter the Network Code" &
                             "Delete"
- $Returns:		
-
- $Arguments:	
- 
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 
 T_MFW_HND network_MNU_start(T_MFW_HND parent_window, MfwMnuAttr *menuAttr)
@@ -3116,11 +3116,11 @@
  $Function:    	network_MNU_create
 
  $Description:	Create the Option window
- 
+
  $Returns:		mfw window handle
 
  $Arguments:	parent_window -parent window handle
- 			
+
 *******************************************************************************/
 
 static T_MFW_HND network_MNU_create(MfwHnd parent_window)
@@ -3134,14 +3134,14 @@
      * Create window handler
      */
 
-    data->win = 
+    data->win =
 	win_create (parent_window, 0, E_WIN_VISIBLE, (T_MFW_CB)network_MNU_win_cb);
     if (data->win EQ NULL)
 	{
 	    return NULL;
 	}
-  
-    /* 
+
+    /*
      * connect the dialog data to the MFW-window
      */
 
@@ -3163,11 +3163,11 @@
  $Function:    	network_MNU_destroy
 
  $Description:	Destroy the Option window
- 
+
  $Returns:		mfw window handle
 
  $Arguments:	own_window - current window
- 			
+
 *******************************************************************************/
 
 static void network_MNU_destroy(MfwHnd own_window)
@@ -3182,7 +3182,7 @@
 	{
 	    win_data = ((T_MFW_HDR *)own_window)->data;
 	    data     = (T_network_OPT *)win_data->user;
-		
+
 	    if (data)
 		{
 			kbd_delete(data->kbd);
@@ -3190,17 +3190,17 @@
 			mnuDelete (data->menu);
 			/*
 		     * Delete WIN handler
-		     */ 
-		       win_delete (data->win); 
+		     */
+		       win_delete (data->win);
 			TRACE_EVENT("END of WIN DELETE");
-			
+
 			if(data->network_list != NULL)
-			{    
-				TRACE_EVENT("START FREE MEMORY"); 
-				
-				/* Free the allocated memory for PLMN list window - OMAPS00061049 - 08-03-2006 */ 
+			{
+				TRACE_EVENT("START FREE MEMORY");
+
+				/* Free the allocated memory for PLMN list window - OMAPS00061049 - 08-03-2006 */
 #ifndef NEPTUNE_BOARD
-				FREE_MEMORY ((UBYTE *)data->network_list->List, MAX_SHOW_OF_PLMN* sizeof (T_MFW_MNU_ITEM)); 
+				FREE_MEMORY ((UBYTE *)data->network_list->List, MAX_SHOW_OF_PLMN* sizeof (T_MFW_MNU_ITEM));
 #else
 				FREE_MEMORY ((UBYTE *)data->network_list->List, Plmn_list_count * sizeof (T_MFW_MNU_ITEM));
 #endif
@@ -3209,14 +3209,14 @@
 
 				/*SPR 2635, free list of pointers to longname atrings*/
 				FREE_MEMORY ((UBYTE *)data->pplmn_longnames,MAX_SHOW_OF_PLMN* sizeof (char*));
-				
+
 				TRACE_EVENT("END of FREE MEMORY");
 			}
-	
-		    /*     
+
+		    /*
 		     * Free Memory
 		     */
-		     
+
 		    FREE_MEMORY ((void *)data, sizeof (T_network_OPT));
 		}
 	    else
@@ -3231,14 +3231,14 @@
  $Function:    	network_MNU_exec_cb
 
  $Description:	Exec callback function for the Option window
- 
+
  $Returns:		none
 
  $Arguments:	win - current window
  				event - event id
  				value - unique id
  				parameter - optional data.
- 			
+
 *******************************************************************************/
 
 void network_MNU_exec_cb (T_MFW_HND win, USHORT event, SHORT value, void * parameter)
@@ -3249,7 +3249,7 @@
   /*  SHORT            l_id;  */ /* Warning Correction */
   /*  T_MFW_HDR        * parent      =  data->parent;  */ /* Warning Correction */
  /*	T_MFW_EVENT         MfwEvents; */  /* Warning Correction */
-	
+
     TRACE_FUNCTION ("network_MNU_exec_cb()");
 
 
@@ -3264,7 +3264,7 @@
     	/* put the (new) dialog window on top of the window stack */
     	mnuUnhide(data->menu);
 	    winShow(win);
-	    
+
 	    break;
 	default:
 	    return;
@@ -3276,7 +3276,7 @@
  $Function:    	network_MNU_mnu_cb
 
  $Description:	Menu callback function for the Option window
- 
+
  $Returns:		none
 
  $Arguments:	e - event id
@@ -3301,7 +3301,7 @@
 	 // request MFW to fill up the pref. PLMN list
 	 nm_pref_plmn_list(network_data.pplmn, network_data.pplmn_mem.maxRcd, 1);
 
-	    
+
 	    break;
 	default: /* in mnuCreate() only E_MNU_ESCAPE has been enabled! */
 	    return MFW_EVENT_REJECTED;
@@ -3314,11 +3314,11 @@
  $Function:    	network_MNU_win_cb
 
  $Description:	Window callback function for the Option window
- 
+
  $Returns:		execution status
 
  $Arguments:	e - event id
- 				w - window handle 
+ 				w - window handle
 *******************************************************************************/
 
 static int network_MNU_win_cb (MfwEvt e, MfwWin *w)
@@ -3343,7 +3343,7 @@
  $Function:    	network_MNU_kbd_cb
 
  $Description:	Exec callback function for the Option window
- 
+
  $Returns:		execution status
 
  $Arguments:	e - event id
@@ -3400,10 +3400,10 @@
  $Function:    	network_request_plnm_list
 
  $Description:	Request existing network list in Mobile
- 
- $Returns:		
-
- $Arguments:	
+
+ $Returns:
+
+ $Arguments:
 
 
  *******************************************************************************/
@@ -3413,7 +3413,7 @@
   /*  T_MFW_WIN        * win_data = ((T_MFW_HDR *)win)->data;  */ /* Warning Correction */
 /*    T_network_OPT    * data     = (T_network_OPT *)win_data->user; */  /* Warning Correction */
 	T_DISPLAY_DATA display_info;
-	
+
 	TRACE_FUNCTION("network_request_plnm_list");
 
 	/* SPR#2354 - SH - Display "Choose Replacement" dialogue,
@@ -3422,7 +3422,7 @@
 	dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, TxtChooseReplacement1, TxtChooseReplacement2, COLOUR_STATUS_NETWORKS);
 	dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)network_request_plmn_list_cb, TWO_SECS, 0 );
 
-    info_dialog (win, &display_info); 
+    info_dialog (win, &display_info);
 
     return 1;
 }
@@ -3432,7 +3432,7 @@
  $Function:    	network_request_plnm_list_cb
 
  $Description:	User has been advised to "choose replacement", now display the list!
- 
+
  $Returns:		None
 
  $Arguments:	Usual info dialogue callback arguments.
@@ -3471,11 +3471,11 @@
 
  $Function:    	network_delete
 
- $Description:	
- 
- $Returns:		
-
- $Arguments:	
+ $Description:
+
+ $Returns:
+
+ $Arguments:
 
 
  *******************************************************************************/
@@ -3489,9 +3489,9 @@
 
 #ifdef NO_ASCIIZ
 	if (network_data.pplmn[network_data.Listposition].network_short.len NEQ 0 )
-#else 
+#else
 	if (strlen((char *)network_data.pplmn[network_data.Listposition].network_short) NEQ 0 )
-#endif	
+#endif
 	{
 		// if the user selected a pref. PLMN
 		// xrashmic 10 Nov, 2004 MMI-SPR-OMAPS00044200-OMAPS00044851
@@ -3508,13 +3508,13 @@
 		network_info_screen (win, TxtEmptyList,(T_VOID_FUNC)network_delete_pref_plnm);
 	}
 
-	// destroy the Menu 
+	// destroy the Menu
 	network_MNU_destroy(win);
 
       /* Warning Correction - BEGIN */
 	return 1;
       /* END */
-	  
+
 
 }
 
@@ -3523,10 +3523,10 @@
  $Function:    	network_delete_pref_plnm
 
  $Description:	Delete the selected pref. PLMN l
- 
- $Returns:		
-
- $Arguments:	
+
+ $Returns:
+
+ $Arguments:
 
 
  *******************************************************************************/
@@ -3540,7 +3540,7 @@
 
 	TRACE_FUNCTION ("network_delete_pref_plnm()");
 
-  
+
 	mode =   DELETE_PREF_PLMN;      /* Delete an entry from the list  */
 
 	//update now the pref. PLMN list
@@ -3554,10 +3554,10 @@
 #ifdef NO_ASCIIZ
 		network_data.pplmn[i].network_long.len = 0;
 		network_data.pplmn[i].network_short.len = 0;
-#else 
+#else
 		memset(network_data.pplmn[i].network_long,   '\0', LONG_NAME);
 		memset(network_data.pplmn[i].network_short,   '\0', SHORT_NAME);
-#endif		
+#endif
 		memset(network_data.pplmn[i].network_numeric, '\0', NUMERIC_LENGTH);
 	}
 
@@ -3572,10 +3572,10 @@
  $Function:    	network_info_screen
 
  $Description:	confirm the deleted PLMN
- 
- $Returns:		
-
- $Arguments:	
+
+ $Returns:
+
+ $Arguments:
 
 // xrashmic 10 Nov, 2004 MMI-SPR-OMAPS00044200-OMAPS00044851
 //Made this as a generic function so that it can be reused to display different messgaes to the user
@@ -3590,7 +3590,7 @@
 	dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, MessageId, TxtNull, COLOUR_STATUS_NETWORKS);
 	dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)funt_ptr, THREE_SECS, 0 );
 
-    info_dialog (win, &display_info); 
+    info_dialog (win, &display_info);
 }
 
 
@@ -3598,12 +3598,12 @@
 
  $Function:    	network_OPT_EDT_start
 
- $Description:	
-
- $Returns:		
-
- $Arguments:	
- 
+ $Description:
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 T_MFW_HND network_EDT_start (MfwMnu* m, MfwMnuItem* i)
 {
@@ -3625,12 +3625,12 @@
 
  $Function:    	network_OPT_EDT_create
 
- $Description:	
-
- $Returns:		
-
- $Arguments:	
- 
+ $Description:
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 static T_MFW_HND network_EDT_create(MfwHnd parent_window)
 {
@@ -3644,13 +3644,13 @@
      */
 
     data->win = win_create (parent_window, 0, 0, NULL);
-    
+
     if (data->win EQ NULL)
 	{
 	    return NULL;
 	}
 
-    /* 
+    /*
      * connect the dialog data to the MFW-window
      */
 
@@ -3673,12 +3673,12 @@
 
  $Function:    	network_EDT_destroy
 
- $Description:	
-
- $Returns:		
-
- $Arguments:	
- 
+ $Description:
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 static void network_EDT_destroy(MfwHnd own_window)
 {
@@ -3697,10 +3697,10 @@
 		{
 		    /*
 		     * Delete WIN handler
-		     */ 
+		     */
 		    win_delete (data->win);
 
-		    /*     
+		    /*
 		     * Free Memory
 		     */
 		    FREE_MEMORY ((void *)data, sizeof (T_network_OPT));
@@ -3717,12 +3717,12 @@
 
  $Function:    	network_EDT_exec_cb
 
- $Description:	
- 
- $Returns:		
-
- $Arguments:	
- 
+ $Description:
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 void network_EDT_exec_cb (T_MFW_HND win, USHORT event, SHORT value, void * parameter)
 {
@@ -3759,7 +3759,7 @@
 	    data->editor_info.editor_attr.controls = 0;
 	    data->editor_info.editor_attr.text     = data->buffer;  /* buffer to be edited */
         data->editor_info.editor_attr.size     = 6;
-	    data->editor_info.LeftSoftKey       = TxtSoftOK;	    
+	    data->editor_info.LeftSoftKey       = TxtSoftOK;
 	    data->editor_info.RightSoftKey      = TxtDelete;
 	    data->editor_info.TextId            = TxtMCCMNC;
 	    data->editor_info.Identifier        = value;  /* optional */
@@ -3773,10 +3773,10 @@
 	    data->editor_info.timeout              = FOREVER;
 
 	    /* create the dialog handler */
-	    editor_start(data->win, &data->editor_info);  /* start the editor */ 
+	    editor_start(data->win, &data->editor_info);  /* start the editor */
 #endif /* NEW_EDITOR */
-	   
-   
+
+
 	    break;
 	case E_ABORT:
 	case E_EXIT: /* defaultreaction */
@@ -3794,27 +3794,27 @@
 
  $Description:	Populates the preffered plmn List.
 
- $Returns:		
-
- $Arguments:	
+ $Returns:
+
+ $Arguments:
  // xrashmic 10 Nov, 2004 MMI-SPR-OMAPS00044200-OMAPS00044851
 *******************************************************************************/
  void network_change_pref_plmn (T_MFW_HND win , USHORT identifier, UBYTE reason)
 {
 
-	nm_pref_plmn_list(network_data.pplmn, network_data.pplmn_mem.maxRcd, 1);			
+	nm_pref_plmn_list(network_data.pplmn, network_data.pplmn_mem.maxRcd, 1);
 
 }
 /*******************************************************************************
 
  $Function:    	network_EDT_editor_cb
 
- $Description:	
-
- $Returns:		
-
- $Arguments:	
- 
+ $Description:
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 static void network_EDT_editor_cb (T_MFW_HND win, USHORT Identifier, USHORT event)
 {
@@ -3831,7 +3831,7 @@
     switch(event)
     	{
 			case INFO_KCD_LEFT:
-  
+
 			mode =   REPLACE_PREF_PLMN;    /* Overwrite an existing entry  at a given index */
 
 			//update now the pref. PLMN list
@@ -3839,18 +3839,18 @@
 			//(network_data.Listposition) "+1" because the zero is counted as well
 			nm_change_pref_plmn(mode, (network_data.Listposition) +1 , 0, (UBYTE*) data->buffer);
 
-			// destroy the Editor 
+			// destroy the Editor
 			network_EDT_destroy(data->win);
 			 // xrashmic 10 Nov, 2004 MMI-SPR-OMAPS00044200-OMAPS00044851
 			//Added this info screen so that sim is updated by nm_change_pref_plmn with the new code
-			//before populating the new list with nm_pref_plmn_list 
+			//before populating the new list with nm_pref_plmn_list
 			network_info_screen (win, TxtPleaseWait,(T_VOID_FUNC)network_change_pref_plmn);
 			// destroy the MENU
 			network_MNU_destroy(l_parent);
 	    break;
 	case INFO_KCD_RIGHT:
 	case INFO_KCD_HUP:
-		// destroy the Editor 
+		// destroy the Editor
 	       network_EDT_destroy(data->win);
 		// destroy the MENU
 		network_MNU_destroy(l_parent);
@@ -3858,7 +3858,7 @@
       //    Nov 02, 2005	REF: omaps00044855   Sumanth Kumar.C
       //    Solution:		Free network_data.pplmn.
 		FREE_MEMORY ((UBYTE *)network_data.pplmn,(network_data.pplmn_mem.maxRcd) * sizeof (T_MFW_NETWORK_STRUCT));
-		
+
 	    break;
 	default:
 	    break;
@@ -3872,11 +3872,11 @@
  $Function:    	nm_abort_network
 
  $Description:	remove the searhing window dialog
-    	     
- $Returns:		
-
- $Arguments:	
- 
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 void nm_abort_network( void )
 {
@@ -3885,7 +3885,7 @@
   dialog_info_destroy (network_data.network_search_win);
   network_data.network_search_win = 0;
   network_data.aborted = TRUE;
-  
+
   return;
 }
 
@@ -3896,19 +3896,19 @@
 
  $Description: Returns the value of roaming_indicator.
 
- $Returns:      TRUE or FALSE based on the roaming status.		
+ $Returns:      TRUE or FALSE based on the roaming status.
 
  $Arguments:	None.
- 
+
 *******************************************************************************/
 #ifdef FF_CPHS
 UBYTE getRoamingStatus()
 {
 
     return network_data.roaming_indicator;
-}  
+}
 #endif
- 
+
 // June 02, 2006    DR: OMAPS00078005 x0021334
 // Descripton: Test for NITZ (Network Identity and Timezone) support - No New time was displayed
 /*******************************************************************************
@@ -3919,8 +3919,8 @@
 
  $Returns:		Result code
 
- $Arguments:	
- 
+ $Arguments:
+
 *******************************************************************************/
 //Dec 13,2006       DR:OMAPS00098351  x0066814 - Added the FF_TIMEZONE flag
 #ifdef FF_TIMEZONE
@@ -3942,10 +3942,10 @@
             // Update RTC with new time info
             mfw_td_set_time(&newTime);
 
-            // Update RTC with new date info            
+            // Update RTC with new date info
             mfw_td_set_date(&newDate);
 
-            // Send IDLE_UPDATE event to force idle screen refresh             
+            // Send IDLE_UPDATE event to force idle screen refresh
             SEND_EVENT(idle_get_window(), IDLE_UPDATE, 0, 0);
             break;
 
@@ -3964,17 +3964,17 @@
 }
 #endif
 
-//Feb 28,,2007       DR:OMAPS00098351  x0066814  
+//Feb 28,,2007       DR:OMAPS00098351  x0066814
  /*******************************************************************************
 
  $Function:    	settingsNITZ
 
  $Description:	 Settings the time update to On, Off or Automatic
-    	     
- $Returns:		
-
- $Arguments:	
- 
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 #ifdef FF_TIMEZONE
 int settingsNITZ (T_MFW_MNU *menu, T_MFW_MNU_ITEM *i)