diff src/ui/mfw/mfw_sat.c @ 188:92abb46dc1ba

src/ui/mfw/*.[ch]: rm trailing white space
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 19 Jan 2021 06:10:27 +0000
parents 67bfe9f274f6
children
line wrap: on
line diff
--- a/src/ui/mfw/mfw_sat.c	Tue Jan 19 05:41:26 2021 +0000
+++ b/src/ui/mfw/mfw_sat.c	Tue Jan 19 06:10:27 2021 +0000
@@ -14,11 +14,11 @@
 
    TO DO   :
 
-   $History:: mfw_sat.c 
+   $History:: mfw_sat.c
       Apr 18, 2006 Ref:OMAPS00116309 R.Prabakar (a0393213)
       CT-GCF[27.22.4.7.1]- MMI crashes on REFERSH seq 1.2
       Solution : Data type mismatch between ACI and MMI sorted out
-      
+
 	Nov 07, 2006 ER:OMAPS00070661 R.Prabakar(a0393213)
 	R99 network compliancy : Implemented Language Notification and Provide Local Information (Language setting)
 	SAT proactive commands and Language Selection SAT event
@@ -38,7 +38,7 @@
 
        Shashi Shekar B.S., a0876501, 16 Mar, 2006, OMAPS00061462
        Icon support for SetupMenu & Select item.
-   
+
    	Mar 11, 2006   REF:DR:OMAPS00061467  x0035544
 	Description:   27.22.4.13.3 SET UP CALL (display of icons) fails.
 	Solution: SAT icon is supported for the SAT CALL SETUP.
@@ -52,15 +52,15 @@
        Solution:	  Added the stub function 'rAT_PercentSIMEF()'.
 
 	July 26, 2005    REF: SPR 29520   x0018858
-	Issue: 27.22.4.5 Proactive SIM Command: PLAY TONE fails 
+	Issue: 27.22.4.5 Proactive SIM Command: PLAY TONE fails
 	Solution: The window which used to come up "Please wait" was not getting destroyed.
 	Care has been taken to check this.
 
 	Jun 16, 2005    REF: CRR 31543   x0021334
 	Issue: SATK: cannot get TR for send ussd command
-	Solution: When the user presses "Hang up" key when the SAT USSD session is in progress,  
+	Solution: When the user presses "Hang up" key when the SAT USSD session is in progress,
 	              a call is made to function 'sAT_end_ussd()' to end the USSD session.
-   
+
 	Aug 16, 2004    REF: CRR 24323   Deepa M.D
 	Bug:Clenup of sprintf used for tracing
 	Fix:Replace the char buf[]; sprintf (buf, "...", ...); TRACE_EVENT (buf); statements by TRACE_EVENT_PX                                        $
@@ -270,14 +270,14 @@
     /*10 Jul 2006, Ref OMAPS00077654, R.Prabakar(a0393213)
   	 Description : Cyrillic character support in MMI to pass GCF/PTCRB  UCS2 TC (SATK)
   	 Solution     : UCS2 Display added to terminal profile*/
-        
+
     (SAT_TP2_CMD_RES | SAT_TP2_CC | SAT_TP2_MOSMC | SAT_TP2_ALPHA_ID| SAT_TP2_UCS2_DSPL),
 
     (SAT_TP3_DSPL_TXT | SAT_TP3_GET_INKEY | SAT_TP3_GET_INPUT|
      SAT_TP3_PLAY_TONE | SAT_TP3_REFRESH),
 
      /* 26-05-2006, x0045876 (OMAPS00076094 - Changed the order of bits) */
-    (SAT_TP4_SEL_ITEM | SAT_TP4_SEND_SMS | SAT_TP4_SEND_SS 
+    (SAT_TP4_SEL_ITEM | SAT_TP4_SEND_SMS | SAT_TP4_SEND_SS
     | SAT_TP4_SEND_USSD | SAT_TP4_SETUP_CALL | SAT_TP4_SETUP_MENU),
 
     (SAT_TP5_EVENT_LIST | SAT_TP5_USER_ACT | SAT_TP5_SCR_AVAIL),
@@ -288,7 +288,7 @@
 #endif
 
     0x0,
-    
+
     (SAT_TP8_BIN_GET_INKEY | SAT_TP8_IDLE_TXT | SAT_TP8_AI2_SETUP_CALL),
 
 #if defined(FF_WAP)
@@ -296,26 +296,26 @@
     /*OMAPS00070661 R.Prabakar(a0393213) Language Notification and Local Information(language setting)*/
     (SAT_TP9_SUST_DSPL_TXT|SAT_TP9_LAUNCH_BROWSER | SAT_TP9_PLI_LANG | SAT_TP9_LANG_NOTIFY),
 #else
-    (SAT_TP9_SUST_DSPL_TXT|SAT_TP9_LAUNCH_BROWSER), 
+    (SAT_TP9_SUST_DSPL_TXT|SAT_TP9_LAUNCH_BROWSER),
 #endif
 #else
 #ifdef FF_MMI_R99_SAT_LANG
-    (SAT_TP9_SUST_DSPL_TXT | SAT_TP9_PLI_LANG | SAT_TP9_LANG_NOTIFY) ,   
+    (SAT_TP9_SUST_DSPL_TXT | SAT_TP9_PLI_LANG | SAT_TP9_LANG_NOTIFY) ,
 #else
-    SAT_TP9_SUST_DSPL_TXT, 
+    SAT_TP9_SUST_DSPL_TXT,
 #endif
 #endif /*FF_WAP*/
 
      /* 26-05-2006, x0045876 (OMAPS00076094 - Added Softkeys) */
-    0x03, 
-    
+    0x03,
+
     0x0,
-    
+
     (SAT_TP12_OPEN_CHANNEL | SAT_TP12_CLOSE_CHANNEL | SAT_TP12_RECEIVE_DATA |
     SAT_TP12_SEND_DATA),
-    
+
     (SAT_TP13_CSD_SUPP_BY_ME | SAT_TP13_GPRS_SUPP_BY_ME)
-    
+
 #else
 
 #ifdef FF_2TO1_PS
@@ -370,7 +370,7 @@
     mfwCommand[MfwTypSat] = (MfwCb) satCommand;
     satNoResponse = 0;
     mfwSatMoAccepted = 0;
-	mfwSATLPRefresh = 0;	
+	mfwSATLPRefresh = 0;
 	eventList= 0;
 	fu_aborted = FALSE;
 #ifdef FF_2TO1_PS
@@ -430,16 +430,16 @@
     MfwSat *sat = (MfwSat*) mfwAlloc(sizeof(MfwSat));
     MfwHdr *hdr = (MfwHdr *)mfwAlloc(sizeof(MfwHdr));
 	MfwHdr *insert_status =0;
-	
+
     if (!hdr || !sat)
     {
     	TRACE_ERROR("ERROR: satCreate() Mem Alloc Failed.");
-			
+
 	   	if(hdr)
    			mfwFree((U8*)hdr,sizeof(MfwHdr));
    		if(sat)
-   			mfwFree((U8*)sat,sizeof(MfwSat));	
-   		
+   			mfwFree((U8*)sat,sizeof(MfwSat));
+
 	   	return 0;
   	}
 
@@ -637,7 +637,7 @@
 | STATE   : code                        ROUTINE : satLocalInfo            |
 +--------------------------------------------------------------------+
 
-  PURPOSE : send terminal response for local info 
+  PURPOSE : send terminal response for local info
 
   SPR#2121 - DS - Dynamically allocate memory for Terminal Response.
 
@@ -689,7 +689,7 @@
 	          trmResponse[ti++] = *info++;     /* result data              */
 
     	}
-    
+
    sAT_PercentSATR(CMD_SRC_LCL,ti,trmResponse);
 
     /* Deallocate memory used for Terminal Response buffer */
@@ -814,7 +814,7 @@
       	if (!(eventList&evtFlags))	/*Only send registered events */
       {
         TRACE_ERROR("ERROR: evtFlags not registered in eventList");
-        
+
          /* Deallocate memory used for Terminal Response buffer */
         if (trmResponse != NULL)
         {
@@ -845,7 +845,7 @@
 
 	eventList&=(~evtFlags);				  /* Deregister event	   */
 
-     
+
 
     trmResponse[ti++] = 0xD6;           /* event download tag       */
     trmResponse[ti++] = 0;              /* length (filled later)    */
@@ -888,13 +888,13 @@
     U8* trmResponse = NULL;
 
     TRACE_FUNCTION("satLanguageSelected");
-	
+
     if (!(eventList&SatEvtLangSelectActivated))	/*Only send registered events */
     {
         TRACE_ERROR("ERROR: language selection not registered in eventList");
         return MfwResErr;
     }
-	
+
     /* Allocate memory for Terminal Response buffer */
     trmResponse = (U8*)mfwAlloc(TRM_RSP_LEN);
 
@@ -904,7 +904,7 @@
         TRACE_ERROR("ERROR: Failed to allocate memory for TR buffer");
         return MfwResNoMem;
     }
-    /*Fill up envelope*/  
+    /*Fill up envelope*/
     trmResponse[ti++] = 0xD6;           /* event download tag       */
     trmResponse[ti++] = 0;              /* length (filled later)    */
     trmResponse[ti++] = 0x19;           /* --event list--           */
@@ -914,7 +914,7 @@
     trmResponse[ti++] = 0x02;           /* length                   */
     trmResponse[ti++] = SatDevME;       /* source                   */
     trmResponse[ti++] = SatDevSIM;           /* destination: SIM         */
-    trmResponse[ti++] = 0x2D;		  /* Language tag */	
+    trmResponse[ti++] = 0x2D;		  /* Language tag */
     trmResponse[ti++] = 0x02;   	  /* Language length*/
     switch(language)
     	{
@@ -939,7 +939,7 @@
        	    }
 		    return MfwResErr;
 
-		
+
     	}
     trmResponse[1] = ti - 2;            /* length of event download */
 
@@ -973,7 +973,7 @@
 int satEvtRegistered (int evt)
 {
     TRACE_FUNCTION("satEvtRegistered()");
-    
+
     if (eventList & evt)
     {
         return TRUE;
@@ -1001,7 +1001,7 @@
 {
     S16 ti;
     U8 response = *res;
-    U8* trmResponse = NULL;   
+    U8* trmResponse = NULL;
 
     if (satNoResponse)                  /* no response, if ...      */
     {
@@ -1151,7 +1151,7 @@
         if (mfwFocus)
             if (sigExec(mfwFocus,evt,data))
 			{
-				dspl_Enable(temp);            
+				dspl_Enable(temp);
 				return;
 			}
         if (mfwRoot)
@@ -1169,12 +1169,12 @@
         {
             if (sigExec(h,evt,data))
 			{
-				dspl_Enable(temp);            
+				dspl_Enable(temp);
 				return;
 			}
             if (h == mfwRoot)
 			{
-				dspl_Enable(temp);            
+				dspl_Enable(temp);
 				return;
 			}
             h = mfwParent(mfwParent(h));
@@ -1184,7 +1184,7 @@
         sigExec (mfwRoot,evt,data);
     }
 
-	dspl_Enable(temp);            
+	dspl_Enable(temp);
 	return;
 }
 
@@ -1231,7 +1231,7 @@
 static void satResponse (U8 res)
 {
     U8* trmResponse = NULL;
-    
+
     TRACE_FUNCTION("satResponse()");
 
     if (satNoResponse)                  /* no response, if ...      */
@@ -1320,7 +1320,7 @@
     U8 tl, partial = 0;
 
     TRACE_EVENT_P3("decTLV(%02x,%d,%s)",tagWanted,mandatory,id);
-	
+
     while (len > 0)
     {
         tl = getTLValue(sc);
@@ -1356,7 +1356,7 @@
        //July 26, 2005    REF: SPR 29520   x0018858
        //Value modified from integer to hex.
 		 *curVal = 0x10;
-	  
+
       return 2;
     }
     if(!strcmp(id,"Duration"))
@@ -1489,7 +1489,7 @@
             t->len = 0;
         else
             t->len = curLen - 1;            /* text len (not dcs)       */
-        
+
         if (t->len)
             t->code = *curVal;          /* data coding scheme       */
         else
@@ -1499,8 +1499,8 @@
         t->text = (U16) (curData - (U8*) t); /* save the offset     */
 
         TRACE_EVENT_P2("len %d, code(dcs) %d", t->len, t->code);
-        
-        return 1;      
+
+        return 1;
     }
 
     return res;
@@ -1851,12 +1851,12 @@
     if (res > 1)
     {
 	 *dur++ = *curVal++;             /* duration unit            */
-	  
+
         *dur++ = *curVal;               /* duration value           */
 	 if(*curVal ==0x00)
 	 {
 	 	TRACE_EVENT_P1("Duration value is %d",*curVal);
-		
+
 		satResponse(SatResUnknownData);
 		return 0;
 	 }
@@ -1920,11 +1920,11 @@
         TRACE_EVENT_P2("decRespLen: Min=%d Max=%d",cmd.c.inp.rspMin,cmd.c.inp.rspMax);
         if ( cmd.c.inp.rspMin > cmd.c.inp.rspMax )
         {
-          satResponse(SatResUnknownData); /* send TR(32), prms not understood  */ 
-          return 0; 
+          satResponse(SatResUnknownData); /* send TR(32), prms not understood  */
+          return 0;
         }
         /* end of MMI-SPR-16296: [mdf] verify the parameters as expected by GSM 11.14 */
-        
+
         return 1;
     }
 
@@ -1990,7 +1990,7 @@
 
        TRACE_FUNCTION("simReadIconData()");
 
-	/* Check if the SIM card supports EF(IMG) & read the contents. 
+	/* Check if the SIM card supports EF(IMG) & read the contents.
 	   Ideally we should be using SRV_RFU3 which corresponds to number 39
 	   but, the calls from MMI are using the number directly */
 	if (sim_serv_table_check(39)
@@ -2050,7 +2050,7 @@
 			icon_image.image_instance.image_instance_file_id = *efimg << 8;
 			efimg++;
 			icon_image.image_instance.image_instance_file_id |= *efimg;
-			efimg++;	
+			efimg++;
 
 			/* Offset to Image instance file identifier*/
 			icon_image.image_instance.image_offset = *efimg << 8;
@@ -2058,14 +2058,14 @@
 			icon_image.image_instance.image_offset |= *efimg;
 			efimg++;
 
-			/* Lenght of the Image instance file identifier. 
-			Do not completely depend on this length as this doesn't include the Palette length, 
+			/* Lenght of the Image instance file identifier.
+			Do not completely depend on this length as this doesn't include the Palette length,
 			so Color image decoding goes wrong!!!*/
 			icon_image.image_instance.image_instance_length = *efimg << 8;
 			efimg++;
 			icon_image.image_instance.image_instance_length |= *efimg;
 			efimg++;
-			
+
 			read_image_instance_file = TRUE;
 
 			sim_read_sim(icon_image.image_instance.image_instance_file_id, MAX_SIM_EF_SIZE, MAX_SIM_EF_SIZE);
@@ -2119,7 +2119,7 @@
 				satResponse(SatResImpossible);
 				read_image_instance_file = FALSE;
 				isAlphaIdIconPresent = FALSE;
-				return; 
+				return;
 			}
 			/* B&W Converter function*/
 			convert_11_image(width, height, (char *)data, dst);
@@ -2133,7 +2133,7 @@
 			data++;
 			depth = *data;
 			data++;
-			
+
 			data++;
 			CLUT_offset = (*data) << 8; /* HIGH: offset of CLUT */
 			data++;
@@ -2161,8 +2161,8 @@
 	        case SatCmdDispText:  iconDataUpdate(&cmd.c.text, width, height, dst);    break;
 	        case SatCmdGetKey:    iconDataUpdate(&cmd.c.text, width, height, dst);    break;
 	        case SatCmdGetString: iconDataUpdate(&cmd.c.inp.prompt, width, height, dst); break;
-	        case SatCmdSetMenu: 				
-	        case SatCmdSelItem:   
+	        case SatCmdSetMenu:
+	        case SatCmdSelItem:
 				{
 					if(isAlphaIdIconPresent)
 					{
@@ -2174,7 +2174,7 @@
 					/* We have to read the icons present for each menu item now.
 					    We safely assume that the icons for each menu item is the same.
 					    Since the SAT Icon display is only for demo, we are not checking
-					    if separate icons has to be read for each item. 
+					    if separate icons has to be read for each item.
 					*/
 						if(isItemIconPresent)
 						{
@@ -2185,7 +2185,7 @@
 							isAlphaIdIconPresent = TRUE;
 							isItemIconPresent = FALSE;
 						}
-						
+
 					    if (!isAlphaIdIconPresent)
 					    {
 					       /* If the icon is present for menu items also, go ahead & read it. */
@@ -2208,16 +2208,16 @@
 	        case SatCmdCall:             //x0035544 Feb 06, 2006 DR:OMAPS00061467
 				                        //check if icon data is present for the first alpha identifier then update it. also check if icon data is present for alpha id2
 				                        if(cmd.c.call.info.icon.qual != 0xFF)
-				                        	{				                        				
-				                                iconDataUpdate(&cmd.c.call.info, width, height, dst);							           
-					              	}		 
+				                        	{
+				                                iconDataUpdate(&cmd.c.call.info, width, height, dst);
+					              	}
 			                               if(cmd.c.call.info2.icon.qual != 0xFF)
 			                               	{
 			                               	// check if icon id for both the alpha identifiers is same or not. if so then get the same icon data.
-			                               	if(cmd.c.call.info2.icon.id == cmd.c.call.info.icon.id) 
-						                iconDataUpdate(&cmd.c.call.info2, width, height, dst);								  
+			                               	if(cmd.c.call.info2.icon.id == cmd.c.call.info.icon.id)
+						                iconDataUpdate(&cmd.c.call.info2, width, height, dst);
 							      //else part is not implemented as it is just for demonstration
-			                               	}  
+			                               	}
 				                         break;
 	        case SatCmdIdleText:  iconDataUpdate(&cmd.c.text, width, height, dst);  break;
 	        case SatCmdExecAT:          break;
@@ -2226,8 +2226,8 @@
 	            TRACE_ERROR("unknown command");
 	            satResponse(SatResUnknownType);
 	            return;
-	    }	
-		
+	    }
+
 	}
 
     if (curSATCmd && isAlphaIdIconPresent)
@@ -2235,9 +2235,9 @@
         	satSignal(curSATCmd,&cmd);
 		read_image_instance_file = FALSE;
 		isAlphaIdIconPresent = FALSE;
-		
+
 	}
-//x0035544 Mar 11, 2006 DR:OMAPS00061467	
+//x0035544 Mar 11, 2006 DR:OMAPS00061467
 //Aafter SAT_SETUP_CALL event is executed then only send MfwSatCcAlert event
 	if(setupCall_Executed == TRUE)
 	{
@@ -2290,7 +2290,7 @@
     USHORT     R, G, B;
 
     TRACE_FUNCTION("convert_21_image()");
-	
+
     src_offset = 0;
     dst_offset = 0;
 
@@ -2321,7 +2321,7 @@
             dst_offset++;
         }
     }
-    
+
 }
 
 /*
@@ -2415,7 +2415,7 @@
 static U32 decLangNotify(void)
 {
 
-     
+
      /* Need to decode and get the language selected in SIM */
      TRACE_FUNCTION("decLangNotify ()");
 
@@ -2435,10 +2435,10 @@
         }
         partialCompr = 1;
     }
-	
+
      if (!decLang(&cmd.c.language,0x2D,0))
         return 0;
-    
+
      return MfwSatLangNotify;
 }
 #endif
@@ -2477,7 +2477,7 @@
 
     if (!decIconId(&cmd.c.text.icon,0))
         return 0;                       /* fatal error              */
-  
+
     if (!decRespFlag(&cmd.c.text.responseFlag,0))
         return 0;                       /* fatal error              */
 
@@ -2497,7 +2497,7 @@
     {
       /* Initialise the icon data members*/
 	cmd.c.text.iconInfo.width = 0;
-	cmd.c.text.iconInfo.height = 0; 
+	cmd.c.text.iconInfo.height = 0;
 	cmd.c.text.iconInfo.dst = NULL;
     	simReadIconData(cmd.c.text.icon.id);
     }
@@ -2549,11 +2549,11 @@
     {
       /* Initialise the icon data members*/
 	cmd.c.text.iconInfo.width = 0;
-	cmd.c.text.iconInfo.height = 0; 
+	cmd.c.text.iconInfo.height = 0;
 	cmd.c.text.iconInfo.dst = NULL;
     	simReadIconData(cmd.c.text.icon.id);
     }
-#endif	
+#endif
     return MfwSatGetKey;
 }
 
@@ -2610,11 +2610,11 @@
     {
       /* Initialise the icon data members*/
 	cmd.c.inp.prompt.iconInfo.width = 0;
-	cmd.c.inp.prompt.iconInfo.height = 0; 
+	cmd.c.inp.prompt.iconInfo.height = 0;
 	cmd.c.inp.prompt.iconInfo.dst = NULL;
     	simReadIconData(cmd.c.inp.prompt.icon.id);
     }
-#endif	
+#endif
     return MfwSatGetString;
 }
 
@@ -2739,21 +2739,21 @@
     {
       /* Initialise the icon data members*/
 	cmd.c.menu.header.iconInfo.width = 0;
-	cmd.c.menu.header.iconInfo.height = 0; 
+	cmd.c.menu.header.iconInfo.height = 0;
 	cmd.c.menu.header.iconInfo.dst = NULL;
     	simReadIconData(cmd.c.menu.header.icon.id);
     }
-	
+
 /* We have to read theicons present for each menu item now.
     We safely assume that the icons for each menu item is the same.
     Since the SAT Icon display is only for demo, we are not checking
-    if separate icons has to be read for each item. 
+    if separate icons has to be read for each item.
 */
     if (cmd.c.menu.itemIconQual != 0xFF)
     {
       /* Initialise the icon data members*/
 	cmd.c.menu.items[0].iconInfo.width = 0;
-	cmd.c.menu.items[0].iconInfo.height = 0; 
+	cmd.c.menu.items[0].iconInfo.height = 0;
 	cmd.c.menu.items[0].iconInfo.dst = NULL;
     }
 #endif
@@ -2840,21 +2840,21 @@
     {
       /* Initialise the icon data members*/
 	cmd.c.menu.header.iconInfo.width = 0;
-	cmd.c.menu.header.iconInfo.height = 0; 
+	cmd.c.menu.header.iconInfo.height = 0;
 	cmd.c.menu.header.iconInfo.dst = NULL;
     	simReadIconData(cmd.c.menu.header.icon.id);
     }
-	
+
 /* We have to read theicons present for each menu item now.
     We safely assume that the icons for each menu item is the same.
     Since the SAT Icon display is only for demo, we are not checking
-    if separate icons has to be read for each item. 
+    if separate icons has to be read for each item.
 */
     if (cmd.c.menu.itemIconQual != 0xFF)
     {
       /* Initialise the icon data members*/
 	cmd.c.menu.items[0].iconInfo.width = 0;
-	cmd.c.menu.items[0].iconInfo.height = 0; 
+	cmd.c.menu.items[0].iconInfo.height = 0;
 	cmd.c.menu.items[0].iconInfo.dst = NULL;
     }
 #endif
@@ -2919,7 +2919,7 @@
     {
       /* Initialise the icon data members*/
 	cmd.c.sms.info.iconInfo.width = 0;
-	cmd.c.sms.info.iconInfo.height = 0; 
+	cmd.c.sms.info.iconInfo.height = 0;
 	cmd.c.sms.info.iconInfo.dst = NULL;
     	simReadIconData(cmd.c.sms.info.icon.id);
     }
@@ -2978,7 +2978,7 @@
     {
       /* Initialise the icon data members*/
 	cmd.c.ss.info.iconInfo.width = 0;
-	cmd.c.ss.info.iconInfo.height = 0; 
+	cmd.c.ss.info.iconInfo.height = 0;
 	cmd.c.ss.info.iconInfo.dst = NULL;
     	simReadIconData(cmd.c.ss.info.icon.id);
     }
@@ -3037,7 +3037,7 @@
     {
       /* Initialise the icon data members*/
 	cmd.c.ss.info.iconInfo.width = 0;
-	cmd.c.ss.info.iconInfo.height = 0; 
+	cmd.c.ss.info.iconInfo.height = 0;
 	cmd.c.ss.info.iconInfo.dst = NULL;
     	simReadIconData(cmd.c.ss.info.icon.id);
     }
@@ -3114,18 +3114,18 @@
 
     if (!decIconId(&cmd.c.call.info2.icon,0)) /* icon for info 2    */
         return 0;
-    //Sudha.V x0035544, feb 06, 2006 DR:OMAPS00061467 	
-   #ifdef FF_MMI_SAT_ICON   
+    //Sudha.V x0035544, feb 06, 2006 DR:OMAPS00061467
+   #ifdef FF_MMI_SAT_ICON
 	/* Check if the icon data is present for alpha identifier 1 & needs to be read*/
     if (cmd.c.call.info.icon.qual != 0xFF)
     {
-		/* Since we have two icons present, if second Alpha id is present, 
+		/* Since we have two icons present, if second Alpha id is present,
 		set the isAlphaIdIconPresent to TRUE explicitly since the second Alpha icon will
 		reset this flag if not present & we wont enter the icon decoder*/
 	isAlphaIdIconPresent = TRUE;
       /* Initialise the icon data members*/
 	cmd.c.call.info.iconInfo.width = 0;
-	cmd.c.call.info.iconInfo.height = 0; 
+	cmd.c.call.info.iconInfo.height = 0;
 	cmd.c.call.info.iconInfo.dst = NULL;
     	simReadIconData(cmd.c.call.info.icon.id);
     }
@@ -3135,9 +3135,9 @@
     {
       // Initialise the icon data members
 	cmd.c.call.info2.iconInfo.width = 0;
-	cmd.c.call.info2.iconInfo.height = 0; 
-	cmd.c.call.info2.iconInfo.dst = NULL; 
-    }    	
+	cmd.c.call.info2.iconInfo.height = 0;
+	cmd.c.call.info2.iconInfo.dst = NULL;
+    }
 #endif
 
     return MfwSatCall;
@@ -3245,7 +3245,7 @@
     {
       /* Initialise the icon data members*/
 	cmd.c.cmd.info.iconInfo.width = 0;
-	cmd.c.cmd.info.iconInfo.height = 0; 
+	cmd.c.cmd.info.iconInfo.height = 0;
 	cmd.c.cmd.info.iconInfo.dst = NULL;
     	simReadIconData(cmd.c.cmd.info.icon.id);
     }
@@ -3269,7 +3269,7 @@
     TRACE_FUNCTION("decCcRes()");
 
     cmd.c.ccres.addr.ton = 0;  /* set default values       *//*a0393213 warnings removal - -1 changed to 0 for all items*/
-    cmd.c.ccres.addr.len = 0; 
+    cmd.c.ccres.addr.len = 0;
     cmd.c.ccres.addr.number = 0;
     cmd.c.ccres.addr2.ton = 0;         /* set on SMS result        */
     cmd.c.ccres.addr2.len = 0;
@@ -3418,7 +3418,7 @@
     {
         ep = &cmd.c.events.elem[0];
         while (curLen--)
-        {            
+        {
             switch (*curVal)
             {
 				case SatEvtUserAction:
@@ -3439,7 +3439,7 @@
 						cmd.c.events.len++;     /* number of events         */
 					}
 					break;
-					
+
  				case SatEvtIdleScreen:
 					if (eventList & SatEvtIdleScreenActivated)
 					{
@@ -3458,10 +3458,10 @@
 						cmd.c.events.len++;     /* number of events         */
 					}
 					break;
-					
-/* ACI-SPR-18200: - this event is not completely implemented 
+
+/* ACI-SPR-18200: - this event is not completely implemented
                   "Not supported" stated in TERMINAL PROFILE */
-#if 0 
+#if 0
  				case SatEvtBrowserTermination:
 					if (eventList & SatEvtBrowserTerminateActivated)
 					{
@@ -3500,7 +3500,7 @@
 						cmd.c.events.len++;     /* number of events         */
 					}
 					break;
-#endif					
+#endif
  				default:
  					/* CQ16435 : If there is an unsupported event, then the entire list fails,
  					**                 reset the eventList to zero and return the response "Beyond ME Capabilities"
@@ -3511,7 +3511,7 @@
 			}
             curVal++;
         }
-									
+
       sat_res[0] = SatResSuccess;	/*Terminal response always sent if there are elements */
 	  sat_res[1]  = SatResAiNoCause;  /* even if they are not MMI 				 */
       TRACE_EVENT_P1("MFW event list %x",eventList);
@@ -3569,7 +3569,7 @@
     {
       /* Initialise the icon data members*/
 	cmd.c.text.iconInfo.width = 0;
-	cmd.c.text.iconInfo.height = 0; 
+	cmd.c.text.iconInfo.height = 0;
 	cmd.c.text.iconInfo.dst = NULL;
     	simReadIconData(cmd.c.text.icon.id);
     }
@@ -3591,7 +3591,7 @@
 {
     SatAddress addr;
     SatData subaddr;
-    
+
     TRACE_FUNCTION("decOpenChannel()");
 
     while (curCmdLen > 0)
@@ -3614,7 +3614,7 @@
     /* Decode alpha idenitifier if present */
     cmd.c.open.alpha_id.code = 0;            /* set default values       */
     cmd.c.open.alpha_id.len = 0;  /* optional info if absent  *//*a0393213 warnings removal - -1 changed to 0*/
-    cmd.c.open.alpha_id.text = 0;  
+    cmd.c.open.alpha_id.text = 0;
     if (!decAlpha(&cmd.c.open.alpha_id,0))
         return 0;
 
@@ -3626,7 +3626,7 @@
     /* If address is present then channel type is CSD */
     addr.ton = 0;             /* set default values       */
     addr.len = 0;
-    addr.number = 0;  
+    addr.number = 0;
     if (!decAddrSS(&addr,0x06,0))
         return 0;
 
@@ -3666,7 +3666,7 @@
 {
 
     /*a0393213 compiler warnings removal - removed alpha_res*/
-    
+
     TRACE_FUNCTION("decCloseChannel()");
 
     while (curCmdLen > 0)
@@ -3697,7 +3697,7 @@
     cmd.c.close.alpha_id.code = 0;            /* set default values       */
     cmd.c.close.alpha_id.len = 0; /* optional info if absent  *//*a0393213 warnings removal - -1 changed to 0*/
     cmd.c.close.alpha_id.text = 0;
-    
+
     if (!decAlpha(&cmd.c.close.alpha_id,0))
         return 0;
 
@@ -3751,7 +3751,7 @@
     cmd.c.send.alpha_id.code = 0;            /* set default values       */
     cmd.c.send.alpha_id.len = 0;   /* optional info if absent  *//*a0393213 warnings removal - -1 changed to 0*/
     cmd.c.send.alpha_id.text = 0;
-    
+
     if (!decAlpha(&cmd.c.send.alpha_id,0))
         return 0;
 
@@ -3805,7 +3805,7 @@
     cmd.c.receive.alpha_id.code = 0;            /* set default values       */
     cmd.c.receive.alpha_id.len = 0; /* optional info if absent  *//*a0393213 warnings removal - -1 changed to 0*/
     cmd.c.receive.alpha_id.text = 0;
-    
+
     if (!decAlpha(&cmd.c.send.alpha_id,0))
         return 0;
 
@@ -3863,16 +3863,16 @@
         case SatCmdReceiveData:     evt = decRecvData(); break;
 
         case SatCmdEOS:       evt = MfwSatSessionEnd; break;
-#ifdef FF_MMI_R99_SAT_LANG	
+#ifdef FF_MMI_R99_SAT_LANG
         case SatCmdLangNotify: evt = decLangNotify(); break; /*OMAPS00070661 (SAT-Lang notify & Local info) R.Prabakar(a0393213)*/
         case SatCmdLocalInf: evt = MfwSatLocalInfo; break;
-#endif		
+#endif
         default:
             TRACE_ERROR("unknown command");
             satResponse(SatResUnknownType);
             return;
     }
-	
+
     if (evt == MfwSatOpenChannel)
     {
     	/* SPR#2321 - DS - Store command details so rAT_PercentSATA
@@ -3885,9 +3885,9 @@
 		TRACE_EVENT("Save Open Channel command details");
 		memcpy(sat_cmd_saved, &cmd, sizeof(cmd));
 	}
-	
+
         /* Event is sent from rAT_PercentSATA */
-	
+
         return;
     }
 // Shashi Shekar B.S., a0876501, Jan 16, 2006, DR: OMAPS00061460
@@ -3941,7 +3941,7 @@
     curCmdLen = len;
     curData = (U8 *) &cmd + sizeof(SatCmd);/* end of command buffer */
     *(curData - 1) = 0x07;
-   
+
     tl = getTLValue(sc);
     if (!tl)                            /* length error             */
         return;                         /* ignore message           */
@@ -3977,7 +3977,7 @@
             }
             /*SPR#2121 - DS - Copy command specific details into global buffer defCmdDetails */
             memcpy(defCmdDetails, curCmd-2, 5);
-            
+
             curCmd += curLen;
             curCmdLen -= curLen;        /* length of value bytes    */
             cmdDecode();                /* do specific decoding     */
@@ -4088,7 +4088,7 @@
   PURPOSE : Alert indication by ACI for SAT commands
 
 */
-#if defined (TI_PS_FF_SATE) || defined (FF_SAT_E) 
+#if defined (TI_PS_FF_SATE) || defined (FF_SAT_E)
 void rAT_PercentSATA (S16 cId, S32 rdlTimeout_ms,T_ACI_SATA_ADD *addParm)
 #else
 void rAT_PercentSATA (S16 cId, S32 rdlTimeout_ms)
@@ -4096,7 +4096,7 @@
 {
     TRACE_FUNCTION("rAT_PercentSATA()");
 
-    TRACE_EVENT_P1("Redial Time %d",rdlTimeout_ms); 
+    TRACE_EVENT_P1("Redial Time %d",rdlTimeout_ms);
 
     /* Store call details */
     cmd.c.ccres.redialTime = rdlTimeout_ms;
@@ -4106,11 +4106,11 @@
     {
 	cm_set_redial(CM_REDIAL_AUTO);
     }
-#if defined (TI_PS_FF_SATE) || defined (FF_SAT_E) 
+#if defined (TI_PS_FF_SATE) || defined (FF_SAT_E)
     /* No Channel information available, therefore treat as normal Voice call */
     if (addParm == NULL)
     {
-#endif /* TI_PS_FF_SATE */ 
+#endif /* TI_PS_FF_SATE */
 //x0035544 Mar 11, 2006. DR:OMAPS00061467
 //unless SAT_SETUP_CALL event is executed, dont send MfwSatCcAlert event to BMI
     #ifdef FF_MMI_SAT_ICON
@@ -4122,10 +4122,10 @@
 	  	satSignal(MfwSatCcAlert,&cmd);
 #else
 	satSignal(MfwSatCcAlert,&cmd);
-#endif 	
+#endif
         return;
-		
-#if defined (TI_PS_FF_SATE) || defined (FF_SAT_E) 
+
+#if defined (TI_PS_FF_SATE) || defined (FF_SAT_E)
     }
     else /* Store channel information in command structure */
     {
@@ -4141,10 +4141,10 @@
             satSignal(MfwSatCcAlert,&cmd);
             break;
         case    MFW_SAT_CHN_CSD:
-        case    MFW_SAT_CHN_GPRS: 
+        case    MFW_SAT_CHN_GPRS:
 
 	     /* SPR#2321 - DS - Copy the saved Open Channel details to cmd in case a Call
-	      * Control result command was received (therefore overwriting the Open Channel 
+	      * Control result command was received (therefore overwriting the Open Channel
 	      * data) between the original MfwSatOpenChannel command and this alert indication
 	      */
 	     if (sat_cmd_saved != NULL)
@@ -4167,7 +4167,7 @@
 	  	TRACE_ERROR("Error with SATA channle type!");
 		break;
     }
-#endif /* TI_PS_FF_SATE */    
+#endif /* TI_PS_FF_SATE */
 }
 
 
@@ -4202,9 +4202,9 @@
 void rAT_PercentSATBROW (T_LAUNCH_BROWSER *browser_command) //To be change to T_LAUNCH_BROWSER
 {
    int i;
-   T_prov_file_ref* current_prov_file; 
-  
-   TRACE_FUNCTION("rAT_PercentSATBROW()"); 
+   T_prov_file_ref* current_prov_file;
+
+   TRACE_FUNCTION("rAT_PercentSATBROW()");
 
    cmd.c.browser.identity = browser_command->browser_id.browser;
    cmd.c.browser.url = (U8*) browser_command->url.url_value;
@@ -4217,7 +4217,7 @@
       cmd.c.browser.prov_file_ref[i].prov_file_id_len = current_prov_file->c_prov_file_id;
       cmd.c.browser.prov_file_ref[i].prov_file_id = (U8*)current_prov_file->prov_file_id;
       current_prov_file++;
-   }     
+   }
    cmd.c.browser.text_string.icon.qual = browser_command->icon.icon_qu;
    cmd.c.browser.text_string.icon.id = browser_command->icon.icon_id;
 /* Copy the text string into the cmd buffer */
@@ -4233,10 +4233,10 @@
 /* Copy the alpha id */
    cmd.c.browser.alpha_len = browser_command->c_alpha_id;
    cmd.c.browser.alpha_id = (U8*)browser_command->alpha_id;
-   
+
 
    satSignal(MfwSatLaunchBrowser, &cmd); /*Send the event to MMI */
-	
+
 
 }
 
@@ -4602,7 +4602,7 @@
   /*
    * x0047685 Due to R99 SIM Interface changes, file_id[i] has been
    * replaced by file_info[i].datafield.
-   * Also removed FF_2TO1_PS flag, since in both cases we need to 
+   * Also removed FF_2TO1_PS flag, since in both cases we need to
    * access EF using file_info and not file_id.
    */
     /*a0393213 OMAPS00116309 Data type of 'files' changed from U16* to T_file_info*
@@ -4623,7 +4623,7 @@
 	else
 	{
     /*a0393213 OMAPS00116309 Data type of 'files' changed from U16* to T_file_info*
-	because of R99 change in ACI*/	
+	because of R99 change in ACI*/
     cmd.c.refFiles.files = updateInd->file_info;
 		cmd.c.refFiles.files_nr = updateInd->val_nr;
 		cmd.c.refFiles.status = ref;
@@ -4660,7 +4660,7 @@
 
   PURPOSE : downloads the Browser termination event to the SAT.
 
-  Cause can be, 
+  Cause can be,
 
 		 SatBrowserTerminCauseUser 0x00
 		 SatBrowserTerminCauseError 0x01
@@ -4697,7 +4697,7 @@
     trmResponse[ti++] = 0x02;           /* length                   */
     trmResponse[ti++] = SatDevME;       /* source                   */
     trmResponse[ti++] = 0x81;           /* destination: SIM         */
-    trmResponse[ti++] = 0x34;		  /* Browser Termination Cause tag */	
+    trmResponse[ti++] = 0x34;		  /* Browser Termination Cause tag */
     trmResponse[ti++] = 0x01;   	  /* Browser Termination length*/
     trmResponse[ti++] = cause;         /* termination cause   */
     trmResponse[1] = ti - 2;            /* length of event download */
@@ -4763,7 +4763,7 @@
 	T_ACI_RETURN result;
 
 	TRACE_FUNCTION("satHangup()");
-	
+
 	result = sAT_end_ussd(sId); // end the USSD session
 	return ((result EQ AT_CMPL) ? MFW_SS_OK : MFW_SS_FAIL);
 }