diff src/ui/bmi/mmiSatInput.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 6b740edabc07
line wrap: on
line diff
--- a/src/ui/bmi/mmiSatInput.c	Sun Nov 08 05:12:05 2020 +0000
+++ b/src/ui/bmi/mmiSatInput.c	Sun Nov 08 06:39:16 2020 +0000
@@ -2,55 +2,55 @@
 
 					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                                                            
+ $Project name:	Basic MMI
+ $Project code:	BMI
  $Module:		SMS
  $File:		    mmiSatInput.c
- $Revision:		1.0                                                       
-                                                                              
- $Author:		Condat(UK)                                                         
- $Date:		    25/10/00                                                      
-                                                                               
+ $Revision:		1.0
+
+ $Author:		Condat(UK)
+ $Date:		    25/10/00
+
 ********************************************************************************
-                                                                              
+
  Description:
- 
+
     Implementation of MMI SIM Application Toolkit (SAT)
-                        
+
 ********************************************************************************
 
  $History: mmiSatInput.c
- 
-       Oct 09, 2006 DR: OMAPS00092083 - x0047075 (Archana). 
+
+       Oct 09, 2006 DR: OMAPS00092083 - x0047075 (Archana).
        Description: CT-PTCRB[27.22.4.1.5]-MS  Resets while Icon Display
        Solution : If the sat icon is present which is self explanatory then editor buffer is intialized to blank.
 
        Feb 02, 2006 DR: OMAPS00061468 - x0035544.
-       Description: SAT 27.22.4.22.2 SET UP IDLE MODE TEXT (Icon support) fails 
+       Description: SAT 27.22.4.22.2 SET UP IDLE MODE TEXT (Icon support) fails
        Solution : SAT SET UP IDLE MODE TEXT (Icon) support added.
-       
+
 	Jan 16, 2006 DR: OMAPS00061460 - Shashi Shekar B.S.
 	Description: SAT Icon support
 	Solution : SAT icon support added.
 
  	Nov 09, 2005 REF: OMAPS00043190 - x0018858
 	Description: PTCRB - 27.22.4.1.4 (DISPLAY TEXT (Sustained text) Fails in 1900 DISPLAY TEXT
-			    (Sustained text) 
+			    (Sustained text)
 	Solution: Have added a new global variable to store the handle of the window and then release
-			it when a higher priority call event comes in. 
+			it when a higher priority call event comes in.
 
     a0876501 (Shashi Shekar B.S.) 03-Oct-2005 MMI-SPR-34554:
     Terminal Response for Get Inkey (Yes/No) response correctly sent now.
 
-	25/10/00			Original Condat(UK) BMI version.	
-	21/02/03			removed all calls to function sat_add_unicode_tag_if_needed()   
+	25/10/00			Original Condat(UK) BMI version.
+	21/02/03			removed all calls to function sat_add_unicode_tag_if_needed()
  $End
 
 *******************************************************************************/
@@ -140,7 +140,7 @@
 static void sat_editor_cb (T_MFW_HND win, USHORT Identifier, USHORT event);
 #endif /* NEW_EDITOR */
 
-#ifdef EASY_TEXT_ENABLED 
+#ifdef EASY_TEXT_ENABLED
 #include "MmiChineseInput.h" /* SPR#1700 - DS - Added to implement Chinese Editor support in SAT */
 #endif
 
@@ -163,9 +163,9 @@
 #else
     T_EDITOR_DATA  editor_data;
 #endif
-    char          *edt_buffer; /* buffer for editor */ 
+    char          *edt_buffer; /* buffer for editor */
      T_MFW_HND		kbd;  /* sbh - keyboard handler, so window can be destroyed by user */
-     T_MFW_HND           win_editor; /* SPR#2490 - DS - Store editor window */ 
+     T_MFW_HND           win_editor; /* SPR#2490 - DS - Store editor window */
 } T_sat_get_key;
 
 #if (BOARD==61)
@@ -181,14 +181,14 @@
 
  $Function:    	sat_get_key_create
 
- $Description:	Creation of an instance for the SAT GET KEY dialog.Window must 
+ $Description:	Creation of an instance for the SAT GET KEY dialog.Window must
  				be available after reception of SAT command,only one instance.
 
- 
- $Returns:		mfw window handler 
+
+ $Returns:		mfw window handler
 
  $Arguments:	parent_window - Parent window handler
- 
+
 *******************************************************************************/
 
 T_MFW_HND sat_get_key_create (T_MFW_HND parent_window)
@@ -210,7 +210,7 @@
     win->user                  = (MfwUserDataPtr)data;
 
 	data->kbd      = kbdCreate( data->win, KEY_ALL, (T_MFW_CB) sat_kbd_cb); /* sbh - add keyboard handler */
-	
+
     /*
      * return window handle
      */
@@ -224,11 +224,11 @@
 
  $Description:	Destroy the sat get inkey dialog.
 
- 
+
  $Returns:		none
 
  $Arguments:	own_window - window handler
- 
+
 *******************************************************************************/
 
 static void sat_get_key_destroy (T_MFW_HND own_window)
@@ -258,11 +258,11 @@
 #ifdef FF_MMI_SAT_ICON
 		if (data->editor_data.editor_attr.TitleIcon.data != NULL)
 		{
-			FREE_MEMORY((U8 *)data->editor_data.editor_attr.TitleIcon.data, data->editor_data.editor_attr.TitleIcon.width * 
+			FREE_MEMORY((U8 *)data->editor_data.editor_attr.TitleIcon.data, data->editor_data.editor_attr.TitleIcon.width *
 								data->editor_data.editor_attr.TitleIcon.height);
 			data->editor_data.editor_attr.TitleIcon.data = NULL;
 		}
-#endif			
+#endif
       	  /* SPR#1428 - SH - New Editor changes */
 #ifdef NEW_EDITOR
 			sat_destroy_TEXT_ASCIIZ ((char *)data->editor_data.TitleString); /* label */
@@ -285,14 +285,14 @@
 
  $Description:	Dialog function for sat_get_key_exec window.
 
- 
+
  $Returns:		none
 
  $Arguments:	win - window handler
  				event -window event
  				value - unique id
  				sat_command - Sat command info
- 
+
 *******************************************************************************/
 
 static void sat_get_key_exec (T_MFW_HND win, USHORT event, SHORT value, T_SAT_CMD * sat_command)
@@ -329,7 +329,7 @@
 	/* SPR#1428 - SH - New Editor changes */
 #ifdef NEW_EDITOR
 			/*
-             * Setup an Editor to get a single key 
+             * Setup an Editor to get a single key
              */
 
             AUI_edit_SetDefault(&data->editor_data);
@@ -337,7 +337,7 @@
 
             /* SPR#2490 - DS - Initialise editor window reference */
             data->win_editor = NULL;
-            
+
             if ((sat_command->qual & SAT_M_INKEY_HELP_AVAIL) NEQ 0)
                 {
                     leftSK  = TxtHelp; /* help available */
@@ -353,8 +353,8 @@
                     rightSK  = TxtNo;
                     mode	= ED_MODE_READONLY; /* treat as read-only, thus ignoring normal keys */
                     cursor	= ED_CURSOR_NONE;
-                }                              
-            else                               
+                }
+            else
                 {
                     /* normal single key request */
                     leftSK    = TxtSoftOK;
@@ -382,17 +382,17 @@
             }
 
 		 AUI_edit_SetTextStr(&data->editor_data, leftSK, rightSK, TxtNull, textStr);
-		 
+
             AUI_edit_SetEvents(&data->editor_data, event, FALSE /*SPR#2490 - DS*/, TWENTY_SECS, (T_AUI_EDIT_CB)sat_editor_cb);
 			AUI_edit_SetMode(&data->editor_data, mode, cursor);
-			
+
             if ((sat_command->qual & SAT_M_INKEY_HELP_AVAIL) NEQ 0)
             {
             	AUI_edit_SetAltTextStr(&data->editor_data, 1, TxtHelp, FALSE, TxtNull); /* help available */
             }
 
             /* provide an empty zero terminated buffer */
-            data->edt_buffer[0] = '\0'; 
+            data->edt_buffer[0] = '\0';
 
 			/* SPR#1559 - SH - Set appropriate editor size */
             AUI_edit_SetBuffer(&data->editor_data, ATB_DCS_ASCII, (UBYTE *)data->edt_buffer,  strlen(data->edt_buffer)+1+1 /* SPR#2321 - DS - Display key */);
@@ -402,11 +402,11 @@
 		if(sat_command->c.text.icon.qual != 0xFF)
 		{
 			/* Copy the icon data to the editor attributes*/
-			data->editor_data.editor_attr.TitleIcon.width = sat_command->c.text.iconInfo.width;  
-			data->editor_data.editor_attr.TitleIcon.height = sat_command->c.text.iconInfo.height; 
+			data->editor_data.editor_attr.TitleIcon.width = sat_command->c.text.iconInfo.width;
+			data->editor_data.editor_attr.TitleIcon.height = sat_command->c.text.iconInfo.height;
 
 			icon_length = sat_command->c.text.iconInfo.width * sat_command->c.text.iconInfo.height;
-										
+
 			data->editor_data.editor_attr.TitleIcon.data = (char *)ALLOC_MEMORY (icon_length);
 
 			memcpy(data->editor_data.editor_attr.TitleIcon.data, sat_command->c.text.iconInfo.dst, icon_length);
@@ -418,7 +418,7 @@
 						/* Icon is self-explanatory. Do not display the text*/
 						data->editor_data.editor_attr.TitleIcon.selfExplanatory = TRUE;
 			     	}
-				 
+
 				/* Free the memory of icon data that we got through the SATK command*/
 				 mfwFree((U8 *)sat_command->c.text.iconInfo.dst, icon_length);
 				sat_command->c.text.iconInfo.dst = NULL;
@@ -439,7 +439,7 @@
             }
 #else /* NEW_EDITOR */
             /*
-             * Setup an Editor to get a single key 
+             * Setup an Editor to get a single key
              */
             if ((sat_command->qual & SAT_M_INKEY_HELP_AVAIL) NEQ 0)
                 {
@@ -455,8 +455,8 @@
                     data->editor_data.LeftSoftKey    = TxtYes;
                     data->editor_data.RightSoftKey   = TxtNo;
                     data->editor_data.mode           = E_EDIT_READ_ONLY_MODE; /* treat as read-only, thus ignoring normal keys */
-                }                              
-            else                               
+                }
+            else
                 {
                     /* normal single key request */
                     data->editor_data.LeftSoftKey    = TxtSoftOK;
@@ -481,7 +481,7 @@
                     data->editor_data.TextString     =  NULL; /* no label */
                 }
             data->editor_data.min_enter              = 0; /* get a single key */
-            data->editor_data.timeout                = TWENTY_SECS; 
+            data->editor_data.timeout                = TWENTY_SECS;
             data->editor_data.Identifier             = event;
             if ((sat_command->qual & SAT_M_INKEY_HELP_AVAIL) NEQ 0)
                 {
@@ -491,12 +491,12 @@
                 {
                     data->editor_data.AlternateLeftSoftKey  = 0;       /* no help available */
                 }
-            data->editor_data.hide                   = FALSE; 
+            data->editor_data.hide                   = FALSE;
 
 
             /* provide an empty zero terminated buffer */
-            data->edt_buffer[0] = '\0'; 
-            
+            data->edt_buffer[0] = '\0';
+
             /*
              * Start the Editor
              */
@@ -515,7 +515,7 @@
 			sat_get_key_destroy (data->win);
 			break;
 		/* ...sbh */
-		
+
         default:
             TRACE_EVENT ("sim_get_key_exec() unexpected event");
             break;
@@ -538,17 +538,17 @@
 #else
     T_EDITOR_DATA  editor_data;
 #endif
-    char          *edt_buffer; /* buffer for editor */ 
+    char          *edt_buffer; /* buffer for editor */
     U16            max_chars;
     T_MFW_HND		kbd;  /* sbh - keyboard handler, so window can be destroyed by user */
     T_MFW_HND chinese_edit_win; /* SPR#1700 - DS - Chinese editor window reference */
-    T_MFW_HND           win_editor; /* SPR#2490 - DS - Store editor window */ 
-    
+    T_MFW_HND           win_editor; /* SPR#2490 - DS - Store editor window */
+
 } T_sat_get_string;
 
 typedef struct {
     T_SAT_TXT txt;
-    UBYTE     buffer[1]; /* open array */ 
+    UBYTE     buffer[1]; /* open array */
 } T_sat_get_string_result; /* NOTE: txt and buffer shall be packed */
 
 static void sat_get_string_destroy (T_MFW_HND own_window);
@@ -560,11 +560,11 @@
 
  $Function:    	sat_get_string_create
 
- $Description:	Creation of an instance for the SAT GET STRING dialog.Window must 
+ $Description:	Creation of an instance for the SAT GET STRING dialog.Window must
  				be available after reception of SAT command,only one instance.
 
- 
- $Returns:		window 
+
+ $Returns:		window
 
  $Arguments:	parent_window - parent window
 *******************************************************************************/
@@ -602,7 +602,7 @@
 
  $Description:	Destroy the sat get string dialog.
 
- 
+
  $Returns:		none
 
  $Arguments:	own_window - current window.
@@ -626,7 +626,7 @@
              * Delete WIN Handler
              */
             win_delete (data->win);
-            
+
             /*
              * Free Memory
              */
@@ -634,7 +634,7 @@
 		    && (data->sat_command->qual & SAT_M_INPUT_UCS2)	/* Unicode input requested */
 	          && (Mmi_getCurrentLanguage() == CHINESE_LANGUAGE))
              {
-                FREE_MEMORY ((U8 *)data->edt_buffer, 
+                FREE_MEMORY ((U8 *)data->edt_buffer,
                 (U16)sizeof(U16) + (data->max_chars * sizeof(U16)));
 
                 /* SPR#1700 - DS - Destroy Chinese editor */
@@ -655,7 +655,7 @@
 #ifdef FF_MMI_SAT_ICON
 		if (data->editor_data.editor_attr.TitleIcon.data != NULL)
 		{
-			FREE_MEMORY((U8 *)data->editor_data.editor_attr.TitleIcon.data, data->editor_data.editor_attr.TitleIcon.width * 
+			FREE_MEMORY((U8 *)data->editor_data.editor_attr.TitleIcon.data, data->editor_data.editor_attr.TitleIcon.width *
 								data->editor_data.editor_attr.TitleIcon.height);
 			data->editor_data.editor_attr.TitleIcon.data = NULL;
 		}
@@ -683,7 +683,7 @@
 
  $Description:	Dialog function for sat_get_string window.
 
- 
+
  $Returns:		none
 
  $Arguments:	win - window handle
@@ -718,7 +718,7 @@
 
             /* SPR#1700 - DS - Modifed to handle Chinese/Unicode
              */
-             
+
             data->sat_command = sat_command; /* save a pointer to the parameter for later use in callbacks */
             inp = (T_SAT_INPUT *)&sat_command->c.inp;
 
@@ -732,7 +732,7 @@
 	     {
             data->max_chars = (U16)(inp->rspMax)+1;
 	     }
-            
+
             /* allocate a buffer to hold the edited chars + terminator  */
            if (((data->sat_command->qual & SAT_M_INPUT_ALPHA) == 1) /* 0=digits, 1=alpha */
 		    && (data->sat_command->qual & SAT_M_INPUT_UCS2)	/* Unicode input requested */
@@ -745,7 +745,7 @@
             {
                 data->edt_buffer = (char *)ALLOC_MEMORY (data->max_chars * sizeof(char));
             }
-            
+
 #ifdef TRACE_SAT_STRING
             TRACE_EVENT_P3("rspMax %d, max_chars %d, defRsp.code %02x", inp->rspMax, data->max_chars, inp->defRsp.code);
 #endif /* TRACE_SAT_STRING */
@@ -763,8 +763,8 @@
 
 #ifdef TRACE_SAT_STRING
             TRACE_EVENT_P2("prompt.len %d, defRsp->len %d", inp->prompt.len, defRsp->len);
-#endif /* TRACE_SAT_STRING */              
-                
+#endif /* TRACE_SAT_STRING */
+
             if (defRsp->len > 0) /* default response available? */
             {
                    if (firstDefRespChar != 0x00)
@@ -783,7 +783,7 @@
                 /* no default response: provide an empty buffer */
                 data->edt_buffer[0] = '\0';
             }
-            
+
 		/* SPR#1428 - SH - New Editor changes */
 #ifdef NEW_EDITOR
 
@@ -800,7 +800,7 @@
 		    data->chinese_edit_win = NULL;
 
 		    TRACE_EVENT("Setup Chinese SAT String editor");
-		
+
 		    chinese_data.TextString = (char*) data->edt_buffer;
 
                  if (inp->prompt.len > 0)
@@ -814,7 +814,7 @@
                 {
                     textStr =  NULL; /* no label */
                 }
-			
+
                  /* Setup Chinese editor data */
         	    chinese_data.Callback = (T_AUI_EDIT_CB)sat_editor_cb;
         	    chinese_data.Identifier = event;
@@ -827,14 +827,14 @@
 #endif /* CHINESE_MMI && EASY_TEXT_ENABLED */
             {
                  /*
-                 * Setup an Editor to get a string 
+                 * Setup an Editor to get a string
                  */
                 AUI_edit_SetDefault(&data->editor_data);
-                AUI_edit_SetDisplay(&data->editor_data, ZONE_FULL_SK_TITLE, COLOUR_EDITOR, EDITOR_FONT); 
+                AUI_edit_SetDisplay(&data->editor_data, ZONE_FULL_SK_TITLE, COLOUR_EDITOR, EDITOR_FONT);
 
                 /* SPR#2490 - DS - Initialise editor window reference */
                 data->win_editor = NULL;
-          
+
                 if ((sat_command->qual & SAT_M_INPUT_HELP_AVAIL) NEQ 0)
                 {
                     AUI_edit_SetAltTextStr(&data->editor_data, inp->rspMin, TxtHelp, FALSE, TxtNull); /* help available */
@@ -883,11 +883,11 @@
 		if(sat_command->c.inp.prompt.icon.qual != 0xFF)
 		{
 			/* Copy the icon data to the editor attributes*/
-			data->editor_data.editor_attr.TitleIcon.width = sat_command->c.inp.prompt.iconInfo.width;  
-			data->editor_data.editor_attr.TitleIcon.height = sat_command->c.inp.prompt.iconInfo.height;  
+			data->editor_data.editor_attr.TitleIcon.width = sat_command->c.inp.prompt.iconInfo.width;
+			data->editor_data.editor_attr.TitleIcon.height = sat_command->c.inp.prompt.iconInfo.height;
 
 			icon_length = sat_command->c.inp.prompt.iconInfo.width * sat_command->c.inp.prompt.iconInfo.height;
-										
+
 			data->editor_data.editor_attr.TitleIcon.data = (char *)ALLOC_MEMORY (icon_length);
 
 			memcpy(data->editor_data.editor_attr.TitleIcon.data, sat_command->c.inp.prompt.iconInfo.dst, icon_length);
@@ -904,7 +904,7 @@
 				sat_command->c.inp.prompt.iconInfo.dst = NULL;
 		}
 #endif
-			   
+
                 /*
                  * Start the Editor
                  */
@@ -920,7 +920,7 @@
             }
  #else /* NEW_EDITOR */
             /*
-             * Setup an Editor to get a string 
+             * Setup an Editor to get a string
              */
             data->editor_data.LeftSoftKey            = TxtSoftOK;
             if ((sat_command->qual & SAT_M_INPUT_HELP_AVAIL) NEQ 0)
@@ -952,9 +952,9 @@
                     data->editor_data.TextString     =  NULL; /* no label */
                 }
              data->editor_data.min_enter              = inp->rspMin;
-            data->editor_data.timeout                = TWENTY_SECS; 
+            data->editor_data.timeout                = TWENTY_SECS;
             data->editor_data.Identifier             = event;
- 
+
             /*
              * Start the Editor
              */
@@ -971,7 +971,7 @@
 		/* sbh - all window types are being provided with this event to destroy the window */
 		case SAT_DESTROY_WINDOW:
 
-                    TRACE_EVENT("SAT_DESTROY_WINDOW"); 
+                    TRACE_EVENT("SAT_DESTROY_WINDOW");
 
                     if (data->win)
                     {
@@ -980,7 +980,7 @@
                     }
 			break;
 		/* ...sbh */
-		
+
         default:
             TRACE_EVENT ("sat_get_string_exec() unexpected event");
             break;
@@ -1002,13 +1002,13 @@
 #else
      T_EDITOR_DATA  editor_data;
 #endif
-    char          *info_buffer; /* buffer for info */ 
+    char          *info_buffer; /* buffer for info */
     T_MFW_HND		kbd;  /* sbh - keyboard handler, so window can be destroyed by user */
  } T_sat_display_text;
 
 //Nov 09, 2005 REF: OMAPS00043190 - x0018858
-// Added a globale variable to store the handle since it will not be possible to add structure elements 
-// for all type of windows 
+// Added a globale variable to store the handle since it will not be possible to add structure elements
+// for all type of windows
 T_MFW_HND satDisplayTextWin = NULL;
 
 static void sat_display_text_destroy (T_MFW_HND own_window);
@@ -1018,7 +1018,7 @@
 
  $Function:    	sat_display_text_create
 
- $Description:	Creation of an instance for the SAT DISPLAY TEXT dialog.Window 
+ $Description:	Creation of an instance for the SAT DISPLAY TEXT dialog.Window
  				must be available after reception of SAT command,only one instance.
 
  $Returns:		Window handle
@@ -1047,7 +1047,7 @@
     win->user                  = (MfwUserDataPtr)data;
 
 	data->kbd      = kbdCreate( data->win, KEY_ALL, (T_MFW_CB) sat_kbd_cb); /* sbh - add keyboard handler */
-	
+
     /*
      * return window handle
      */
@@ -1091,12 +1091,12 @@
 #ifdef FF_MMI_SAT_ICON
 		if (data->editor_data.editor_attr.TitleIcon.data != NULL)
 		{
-			FREE_MEMORY((U8 *)data->editor_data.editor_attr.TitleIcon.data, data->editor_data.editor_attr.TitleIcon.width * 
+			FREE_MEMORY((U8 *)data->editor_data.editor_attr.TitleIcon.data, data->editor_data.editor_attr.TitleIcon.width *
 								data->editor_data.editor_attr.TitleIcon.height);
 			data->editor_data.editor_attr.TitleIcon.data = NULL;
 		}
 #endif
-			
+
              sat_destroy_TEXT_ASCIIZ (data->info_buffer); /* displayed text */
              FREE_MEMORY ((U8 *)data, sizeof (T_sat_display_text));
         }
@@ -1139,15 +1139,15 @@
 			/* SPR#1428 - SH - New Editor changes */
 #ifdef NEW_EDITOR
             /*
-             * Setup an Editor to display a string 
+             * Setup an Editor to display a string
              */
             AUI_edit_SetDefault(&data->editor_data);
             /* SPR#1559 - SH - Now use ZONE_FULLSOFTKEYS */
-            AUI_edit_SetDisplay(&data->editor_data, ZONE_FULLSOFTKEYS, COLOUR_EDITOR, EDITOR_FONT);  
+            AUI_edit_SetDisplay(&data->editor_data, ZONE_FULLSOFTKEYS, COLOUR_EDITOR, EDITOR_FONT);
             AUI_edit_SetTextStr(&data->editor_data, TxtSoftOK, TxtSoftBack, TxtNull, NULL);
 
             AUI_edit_SetMode(&data->editor_data, ED_MODE_READONLY, ED_CURSOR_NONE);
-            
+
             if ((data->sat_command->qual & SAT_M_TEXT_WAIT) NEQ 0)
             {
             	AUI_edit_SetEvents(&data->editor_data, SAT_DISPLAY_TEXT_WAIT, TRUE, TWO_MIN, (T_AUI_EDIT_CB)sat_editor_cb);
@@ -1166,7 +1166,7 @@
 			     if(sat_command->c.text.icon.qual == 0x00)
 			     	{
 						/* Icon is self-explanatory. Do not display the text.
-						    Only for SAT commands that use ATB editor directly, 
+						    Only for SAT commands that use ATB editor directly,
 						    we pass NULL as the text string, i.e., there is no Title string.
 						    The string is embedded as part of ATB string in these cases.
 						    For commands using AUI editor for Title string display,
@@ -1180,11 +1180,11 @@
 		            		data->info_buffer = sat_create_TEXT_ASCIIZ (&sat_command->c.text);
 
 				/* Copy the icon data to the editor*/
-				data->editor_data.editor_attr.TitleIcon.width = sat_command->c.text.iconInfo.width;  
-				data->editor_data.editor_attr.TitleIcon.height = sat_command->c.text.iconInfo.height; 
+				data->editor_data.editor_attr.TitleIcon.width = sat_command->c.text.iconInfo.width;
+				data->editor_data.editor_attr.TitleIcon.height = sat_command->c.text.iconInfo.height;
 
 				icon_length = sat_command->c.inp.prompt.iconInfo.width * sat_command->c.inp.prompt.iconInfo.height;
-											
+
 				data->editor_data.editor_attr.TitleIcon.data = (char *)ALLOC_MEMORY (icon_length);
 
 				memcpy(data->editor_data.editor_attr.TitleIcon.data, sat_command->c.inp.prompt.iconInfo.dst, icon_length);
@@ -1208,21 +1208,21 @@
 #if 0 /* SPR#2340 - DS - Trace out buffer contents */
             for (i=0; i<sat_command->c.text.len+2+2 /* include tag+whole string+terminator */; i++)
                 TRACE_EVENT_P2("SAT info_buffer[%d]: 0x%02x", i, data->info_buffer[i]);
-#endif 
-            
+#endif
+
           /*
              * Start the Editor
              */
 
 			/* SPR#1559 - SH - Check for unicode strings */
-			
+
                     /*Oct 09, 2006 DRT: OMAPS00092083 - x0047075(Archana)
                        Descrption:CT-PTCRB[27.22.4.1.5]-MS  Resets while Icon Display
                        Solution : If the sat icon is present which is self explanatory then editor buffer is intialized to blank.*/
                      if(data->info_buffer == NULL)
                     {
                        AUI_edit_SetBuffer(&data->editor_data, ATB_DCS_ASCII, (UBYTE*)"", 1);
-                    }                    
+                    }
 			else if (data->info_buffer[0]== (char)0x80) /* x0039928 - Lint warning fix */
 		      {
 		           /* SPR#2340 - DS - Len is number of characters, NOT number of bytes */
@@ -1235,7 +1235,7 @@
 
 			TRACE_EVENT_P2("Editor len: %d, size: %d", data->editor_data.editor_attr.text.len, data->editor_data.editor_attr.size);
 //Nov 09, 2005 REF: OMAPS00043190 - x0018858
-// Store the handle of the editor in a globale variable for further use. A global variable has to be used here 
+// Store the handle of the editor in a globale variable for further use. A global variable has to be used here
 // since there is no other way to access this element in the other applications.
 			satDisplayTextWin=AUI_edit_Start(win, &data->editor_data);
 			if ( satDisplayTextWin == NULL)
@@ -1248,13 +1248,13 @@
             break;
 #else /* NEW_EDITOR */
             /*
-             * Setup an Editor to display a string 
+             * Setup an Editor to display a string
              */
             data->editor_data.LeftSoftKey            = TxtSoftOK;
-            data->editor_data.AlternateLeftSoftKey   = TxtNull; 
+            data->editor_data.AlternateLeftSoftKey   = TxtNull;
             data->editor_data.RightSoftKey           = TxtSoftBack;
             data->editor_data.hide                   = FALSE;
-            data->editor_data.mode                   = E_EDIT_READ_ONLY_MODE; 
+            data->editor_data.mode                   = E_EDIT_READ_ONLY_MODE;
             data->editor_data.TextId                 = TxtNull;
             data->editor_data.TextString             = NULL; /* no label */
             data->editor_data.min_enter              = 0;
@@ -1289,7 +1289,7 @@
 		case SAT_DESTROY_WINDOW:
 			sat_display_text_destroy (data->win);
 			break;
-		
+
         default:
             TRACE_EVENT ("sim_display_text_exec() unexpected event");
             break;
@@ -1301,13 +1301,13 @@
 
  $Function:    	sat_ASCII_to_TEXT
 
- $Description:	This routine converts an ASCIIZ string into an MFW SAT text 
+ $Description:	This routine converts an ASCIIZ string into an MFW SAT text
  				descriptor the coding scheme is taken accordign to the code in <txt>
 
  $Returns:		none
 
  $Arguments:	txt  - text info
- 				destination - text destination 
+ 				destination - text destination
  				source - text source
 
 *******************************************************************************/
@@ -1315,11 +1315,11 @@
 static void sat_ASCII_to_TEXT (T_SAT_TXT * txt, UBYTE * destination, UBYTE * source)
 {
 	UBYTE * temp_buffer;
-	
+
 	switch (txt->code)
 	{
 	case MFW_DCS_7bits:
-		temp_buffer = (UBYTE *)ALLOC_MEMORY(txt->len+1); 
+		temp_buffer = (UBYTE *)ALLOC_MEMORY(txt->len+1);
 		sat_ascii_to_gsm ((char *)temp_buffer, (char *)source, (U16)(txt->len));
 		utl_cvt8To7 (temp_buffer, txt->len, destination, 0);
 		FREE_MEMORY ((U8 *)temp_buffer, txt->len+1);
@@ -1350,7 +1350,7 @@
  $Returns:		none
 
  $Arguments:	txt  - text info
- 				destination - text destination 
+ 				destination - text destination
  				source - text source
 
 *******************************************************************************/
@@ -1364,9 +1364,9 @@
 	{
 	case MFW_DCS_7bits:
                 size = (source->length/sizeof(wchar_t))+1;
-		temp_buffer = (UBYTE *)ALLOC_MEMORY(size); 
-                string_UCS2_to_GSM( 
-                    MFW_DCS_7bits,	// gsm format 
+		temp_buffer = (UBYTE *)ALLOC_MEMORY(size);
+                string_UCS2_to_GSM(
+                    MFW_DCS_7bits,	// gsm format
                     (wstring_t *)source,// source unicode string, includes own length
                     size,	        // maximum output size
                     temp_buffer,	// destination byte array
@@ -1376,8 +1376,8 @@
 		FREE_MEMORY ((U8 *)temp_buffer, size);
 		break;
 	case MFW_DCS_8bits:
-                string_UCS2_to_GSM( 
-                    MFW_DCS_7bits,	// gsm format 
+                string_UCS2_to_GSM(
+                    MFW_DCS_7bits,	// gsm format
                     (wstring_t *)source,// source unicode string, includes own length
                     size,	        // maximum output size
                     destination,	// destination byte array
@@ -1389,8 +1389,8 @@
 		memcpy(destination, source, txt->len);
 		break;
 	default:
-		string_UCS2_to_GSM( 
-                    MFW_DCS_7bits,	// gsm format 
+		string_UCS2_to_GSM(
+                    MFW_DCS_7bits,	// gsm format
                     (wstring_t *)source,// source unicode string, includes own length
                     size,	        // maximum output size
                     destination,	// destination byte array
@@ -1406,7 +1406,7 @@
 
  $Function:    	sat_get_key_send_result
 
- $Description:	
+ $Description:
 
 
  $Returns:		none
@@ -1420,25 +1420,25 @@
     T_SAT_RES sat_res;
     struct {
         T_SAT_TXT txt;
-        UBYTE      buffer[SAT_GET_KEY_BUFFER_SIZE]; /* buffer for result */ 
+        UBYTE      buffer[SAT_GET_KEY_BUFFER_SIZE]; /* buffer for result */
     } buf; /* NOTE: txt and buffer shall be packed */
 
     /* update the output parameter */
 
 	/* a0876501 (Shashi Shekar B.S.) 03-Oct-2005 MMI-SPR-34554.
 	   Populate Yes/No terminal response.
-	   Ignore the DCS type to be sent if 'SAT_M_INKEY_YES_NO' is ON. 
+	   Ignore the DCS type to be sent if 'SAT_M_INKEY_YES_NO' is ON.
 	   Refer GSM 11.14 Sec 12.6, Get Inkey. */
 	if ((data->sat_command->qual & SAT_M_INKEY_YES_NO) NEQ 0)
 	{
 		/* Data coding scheme is not considered for Yes/No response */
-		buf.txt.code = SAT_M_INKEY_YES_NO; 
+		buf.txt.code = SAT_M_INKEY_YES_NO;
 
 		buf.txt.text = sizeof(T_SAT_TXT);
 		buf.txt.len = 1;
 
 		/* Simply copy the data populated in sat_editor_cb */
-		buf.buffer[0] = (UBYTE)data->edt_buffer[0]; 
+		buf.buffer[0] = (UBYTE)data->edt_buffer[0];
 	}
 	else
 	{
@@ -1451,7 +1451,7 @@
 		{
 			buf.txt.code = MFW_DCS_8bits; /* use the SMS default alphabet */
 		}
-    
+
 		buf.txt.text = sizeof(T_SAT_TXT);
 		buf.txt.len = 1;
 
@@ -1487,7 +1487,7 @@
 
  $Function:    	sat_get_string_send_result
 
- $Description:	
+ $Description:
 
 
  $Returns:		none
@@ -1519,10 +1519,10 @@
         length = strlen(data->edt_buffer);
      }
     size = sizeof(T_sat_get_string_result) + length;
-     buf = (T_sat_get_string_result *) ALLOC_MEMORY(size); 
-	
+     buf = (T_sat_get_string_result *) ALLOC_MEMORY(size);
+
     /* update the output parameter */
-    
+
     /* set the required DCS for the result to be returned */
     if ((data->sat_command->qual & SAT_M_INPUT_UCS2) NEQ 0)
     {
@@ -1532,11 +1532,11 @@
     {
         buf->txt.code = MFW_DCS_7bits; /* use the packed SMS alphabet */
     }
-    else 
+    else
     {
         buf->txt.code = MFW_DCS_8bits; /* use the SMS default alphabet */
     }
-    
+
     buf->txt.text = sizeof(T_SAT_TXT);
     buf->txt.len = length;
 
@@ -1552,9 +1552,9 @@
      {
         sat_ASCII_to_TEXT(&buf->txt, buf->buffer, (UBYTE *)data->edt_buffer);
      }
-     
-     /* SPR#2321 - DS - Check if an icon was supplied with SAT_STRING (Get Input) 
-       * command. If supplied, set the result to 0x04 'Command performed successfully, 
+
+     /* SPR#2321 - DS - Check if an icon was supplied with SAT_STRING (Get Input)
+       * command. If supplied, set the result to 0x04 'Command performed successfully,
        * but requested icon could not be displayed'.
        */
      input = (T_SAT_INPUT*)&data->sat_command->c.inp;
@@ -1592,7 +1592,7 @@
  $Arguments:	win  - window
  				Identifier - unique id
  				event - event id
- 				
+
 *******************************************************************************/
 /* SPR#1428 - SH - New Editor: minor change so function matches callback type */
 #ifdef NEW_EDITOR
@@ -1603,23 +1603,23 @@
 {
     T_MFW_WIN    * win_data = ((T_MFW_HDR *)win)->data;
     T_SAT_RES sat_res;
-    
+
     TRACE_EVENT ("sat_editor_cb()");
-    
+
     TRACE_EVENT_P1("event number %d",event);
-		  
+
     if ((win EQ NULL) || (win_data EQ NULL))
         return;
-    
+
     switch (Identifier)
     {
     case SAT_GET_KEY:
 	{
 	    T_sat_get_key * data = (T_sat_get_key *)win_data->user;
-	    
+
             if (data EQ NULL)
                 return;
-		
+
 	    switch(event)
 	    {
 	    case INFO_KCD_LEFT: /* OK or single digit key or YES */
@@ -1629,7 +1629,7 @@
 		    data->edt_buffer[0] = 0x01; /* means YES */
 		    data->edt_buffer[1] = 0x00; /* means YES */
 		}
-		
+
 		sat_get_key_send_result (data);
 		break;
 	    case INFO_KCD_ALTERNATELEFT: /* help */
@@ -1652,7 +1652,7 @@
 		}
 		break;
 	    case INFO_KCD_CLEAR: /* clear on empty buffer or long clear */
-		case INFO_KCD_HUP:		
+		case INFO_KCD_HUP:
 			sat_res[SAT_ERR_INDEX] = SAT_RES_USER_ABORT;
 			sat_res[SAT_AI_INDEX]  = SatResAiNoCause;
 			sat_done (data->sat_command, sat_res);
@@ -1677,16 +1677,16 @@
     case SAT_GET_STRING:
 	{
 	    T_sat_get_string * data = (T_sat_get_string *)win_data->user;
-	    
+
             if (data EQ NULL)
                 return;
 
 	    switch(event)
 	    {
-	    case INFO_KCD_LEFT: /* OK */	        
+	    case INFO_KCD_LEFT: /* OK */
 	      sat_get_string_send_result (data);
 		SEND_EVENT(data->win, SAT_DESTROY_WINDOW, 0, 0); /* SPR#1700 - DS - Destroy SAT string data */
-             break;		
+             break;
 	    case INFO_KCD_ALTERNATELEFT: /* help */
 		sat_res[SAT_ERR_INDEX] = SAT_RES_USER_HELP;
 		sat_res[SAT_AI_INDEX]  = SatResAiNoCause;
@@ -1697,7 +1697,7 @@
 		sat_res[SAT_AI_INDEX]  = SatResAiNoCause;
 		sat_done (data->sat_command, sat_res);
 		break;
-	    case INFO_KCD_CLEAR: /* clear on empty buffer or long clear */	
+	    case INFO_KCD_CLEAR: /* clear on empty buffer or long clear */
 	    case INFO_KCD_HUP: /* SPR#2321 - DS - Handle hangup keypress */
 		sat_res[SAT_ERR_INDEX] = SAT_RES_USER_ABORT;
 		sat_res[SAT_AI_INDEX]  = SatResAiNoCause;
@@ -1730,7 +1730,7 @@
     case SAT_DISPLAY_TEXT:
         {
             T_sat_display_text   * data     = (T_sat_display_text *)win_data->user;
-            
+
             switch (event)
             {
             case INFO_KCD_RIGHT: /* back */
@@ -1740,8 +1740,8 @@
                 break;
             case INFO_TIMEOUT: /* timeout */
             case INFO_KCD_LEFT: /* OK */
-                 /* SPR#2340 - DS - Check if an icon was supplied with DISPLAY TEXT 
-                   * command. If supplied, set the result to 0x04 'Command performed successfully, 
+                 /* SPR#2340 - DS - Check if an icon was supplied with DISPLAY TEXT
+                   * command. If supplied, set the result to 0x04 'Command performed successfully,
                    * but requested icon could not be displayed'.
                    */
                  if (data->sat_command->c.text.icon.qual == 0xFF &&
@@ -1758,13 +1758,13 @@
 #else
 			/* Icon present but ME cannot display icon */
         		sat_res[SAT_ERR_INDEX] = SatResNoIcon;
-#endif					
+#endif
                 }
                 sat_res[SAT_AI_INDEX]  = SatResAiNoCause;
                 sat_done (data->sat_command, sat_res);
                 break;
             case INFO_KCD_CLEAR: /* abort */
-			case INFO_KCD_HUP:		
+			case INFO_KCD_HUP:
                 sat_res[SAT_ERR_INDEX] = SAT_RES_USER_ABORT;
                 sat_res[SAT_AI_INDEX]  = SatResAiNoCause;
                 sat_done (data->sat_command, sat_res);
@@ -1784,11 +1784,11 @@
 		satDisplayTextWin = NULL;
         }
         break;
-        
+
     case SAT_DISPLAY_TEXT_WAIT:
         {
             T_sat_display_text   * data     = (T_sat_display_text *)win_data->user;
-            
+
             switch (event)
             {
             case INFO_TIMEOUT: /* timeout */
@@ -1797,8 +1797,8 @@
                 sat_done (data->sat_command, sat_res);
                 break;
             case INFO_KCD_LEFT: /* OK */
-                /* SPR#2340 - DS - Check if an icon was supplied with DISPLAY TEXT 
-                   * command. If supplied, set the result to 0x04 'Command performed successfully, 
+                /* SPR#2340 - DS - Check if an icon was supplied with DISPLAY TEXT
+                   * command. If supplied, set the result to 0x04 'Command performed successfully,
                    * but requested icon could not be displayed'.
                    */
                  if (data->sat_command->c.text.icon.qual == 0xFF &&
@@ -1815,7 +1815,7 @@
 #else
 			/* Icon present but ME cannot display icon */
         		sat_res[SAT_ERR_INDEX] = SatResNoIcon;
-#endif					
+#endif
                 }
                 sat_res[SAT_AI_INDEX]  = SatResAiNoCause;
                 sat_done (data->sat_command, sat_res);
@@ -1826,7 +1826,7 @@
                 sat_done (data->sat_command, sat_res);
                 break;
             case INFO_KCD_CLEAR: /* abort */
-			case INFO_KCD_HUP:		
+			case INFO_KCD_HUP:
                 sat_res[SAT_ERR_INDEX] = SAT_RES_USER_ABORT;
                 sat_res[SAT_AI_INDEX]  = SatResAiNoCause;
                 sat_done (data->sat_command, sat_res);