changeset 174:6838be2e9067

mmiSmsSend.c: formatting fixes and dead code elimination
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 19 Jan 2021 03:09:30 +0000
parents 0a0d54877239
children 717f87d300ae
files src/ui/bmi/mmiSmsSend.c
diffstat 1 files changed, 225 insertions(+), 317 deletions(-) [+]
line wrap: on
line diff
--- a/src/ui/bmi/mmiSmsSend.c	Mon Jan 18 03:46:02 2021 +0000
+++ b/src/ui/bmi/mmiSmsSend.c	Tue Jan 19 03:09:30 2021 +0000
@@ -1,6 +1,6 @@
 /*******************************************************************************
 
-					CONDAT (UK)
+			CONDAT (UK)
 
 ********************************************************************************
 
@@ -11,12 +11,12 @@
 
  $Project name:	Basic MMI
  $Project code:	BMI
- $Module:		SMS
- $File:		    MmiSmsSend.c
- $Revision:		1.0
-
- $Author:		Condat(UK)
- $Date:		    25/10/00
+ $Module:	SMS
+ $File:		MmiSmsSend.c
+ $Revision:	1.0
+
+ $Author:	Condat(UK)
+ $Date:		25/10/00
 
 ********************************************************************************
 
@@ -75,15 +75,13 @@
 	when memory is full and saving a message fails.
 
 
-
-
 	Jul 13, 2004    REF: CRR 21615  Deepa M.D
 	Bug:Message once entered into message editor not storing in memory.
 	Fix:When a SMS is typed in the Editor, it is stored in a temporary buffer.
 	When the user accesses the editor,the temporary buffer is copied into the
 	Editor back.
 
-	25/10/00			Original Condat(UK) BMI version.
+	25/10/00		Original Condat(UK) BMI version.
 
  $End
 
@@ -184,7 +182,7 @@
 /*********************************************************************
 **********************************************************************
 
-				 DYNAMIC MENU WINDOW. DECLARATION
+		 DYNAMIC MENU WINDOW. DECLARATION
 
 *********************************************************************
 **********************************************************************/
@@ -196,7 +194,7 @@
 static int  SmsSend_standard_dialog_cb(T_MFW_HND win, USHORT Identifier, USHORT Reason);
 /* SPR#1428 - SH - New Editor: no longer required */
 #ifndef NEW_EDITOR
-void		SmsSend_loadEditDefault(T_EDITOR_DATA * edit_info);
+void	    SmsSend_loadEditDefault(T_EDITOR_DATA * edit_info);
 static void SmsSend_loadUCS2EditDefault(T_EDITOR_DATA *editor_data);
 #endif
 
@@ -214,9 +212,9 @@
 static void      SmsSend_CENTREEDIT_exec_cb (T_MFW_HND win, USHORT event, void * parameter);
 
 // Callback functions of the various editors
-static void		SmsSend_TEXTEDIT_edit_cb (T_MFW_HND win, USHORT Identifier, SHORT reason);
-static void		SmsSend_NBEDIT_edit_cb (T_MFW_HND win, USHORT Identifier, SHORT reason);
-static void		SmsSend_CENTREEDIT_edit_cb (T_MFW_HND win, USHORT Identifier, SHORT reason);
+static void	SmsSend_TEXTEDIT_edit_cb (T_MFW_HND win, USHORT Identifier, SHORT reason);
+static void	SmsSend_NBEDIT_edit_cb (T_MFW_HND win, USHORT Identifier, SHORT reason);
+static void	SmsSend_CENTREEDIT_edit_cb (T_MFW_HND win, USHORT Identifier, SHORT reason);
 
 // Callback function for the MFW events
 static int       SmsSend_SEND_mfw_cb  (MfwEvt event, void *data);
@@ -234,9 +232,9 @@
 extern UBYTE reply_path_bit ;
 
 /***************************************************
-****											****
-****		MANAGEMENT OF SMS OPTIONS			****
-****											****
+****						****
+****	MANAGEMENT OF SMS OPTIONS		****
+****						****
 ***************************************************/
 
 
@@ -261,9 +259,9 @@
 
     /* !!! **************************************** modify here **************************************** !!!*/
     BOOL            answer; /* TRUE == YES, FALSE == NO */
-	T_MFW_HND		sms;
+    T_MFW_HND	    sms;
     T_MFW_HND       dialog_win;
-	T_SEND			*parent_data;
+    T_SEND	    *parent_data;
 /* !!! **************************************** end modify here **************************************** !!! */
 } T_SMSSEND_R_OPT;
 
@@ -278,13 +276,13 @@
 	T_MFW_HND       sms_handler;
 	SHORT           id;
 	/*SPR1991, removed edt_data: not needed*/
-	   					/* will call from idle or phonebook  */
+	/* will call from idle or phonebook  */
 } T_SAVE;
 
 static T_MFW_HND	SmsSend_SAVE_create  (T_MFW_HND parent);
-static void				SmsSend_SAVE_destroy (T_MFW_HND window);
-static void				SmsSend_SAVE_exec_cb (T_MFW_HND win, USHORT event, SHORT value, void * parameter);
-static int				SmsSend_SAVE_mfw_cb (MfwEvt event, void *info);
+static void		SmsSend_SAVE_destroy (T_MFW_HND window);
+static void		SmsSend_SAVE_exec_cb (T_MFW_HND win, USHORT event, SHORT value, void * parameter);
+static int		SmsSend_SAVE_mfw_cb (MfwEvt event, void *info);
 
 static T_MFW_HND SmsSend_R_OPT_create (T_MFW_HND parent);
 static void SmsSend_R_OPT_destroy (T_MFW_HND window);
@@ -303,11 +301,10 @@
 /* !!! **************************************** end modify here **************************************** !!! */
 
 
-
 /*********************************************************************
 **********************************************************************
 
-			     DYNAMIC MENU WINDOW. CONTENTS DECLARATION
+	     DYNAMIC MENU WINDOW. CONTENTS DECLARATION
 
 *********************************************************************
 **********************************************************************/
@@ -331,19 +328,17 @@
     MNU_LEFT | MNU_LIST | MNU_CUR_LINE, /* centered page menu       */
     /* x0045876, 14-Aug-2006 (WR - integer conversion resulted in a change of sign) */
     (UBYTE) -1,                                 /* use default font         */
-    (MfwMnuItem*)SmsSend_R_OPTItems,                      /* with these items         */
+    (MfwMnuItem*)SmsSend_R_OPTItems,            /* with these items         */
     sizeof(SmsSend_R_OPTItems)/sizeof(MfwMnuItem), /* number of items     */
     COLOUR_LIST_SMS,	TxtNull, NULL, MNUATTRSPARE
-
 };
 
 
 /*JVJ SPR1298 added a new output parameter to avoid stack overload */
 void convertToUnicodeForOutput( UBYTE * ipText,UBYTE* outText, USHORT* outLen)
 {
-
 	int i;
-    UBYTE* temp_conv_buffer = outText;
+	UBYTE* temp_conv_buffer = outText;
 
 	if (ipText[0] == 0x80)
 	{	//skip first 2 chars
@@ -353,9 +348,6 @@
 			temp_conv_buffer[i*2+1] =  ipText[i*2+2+1];
 			temp_conv_buffer[i*2] =ipText[i*2+2];
 
-
-
-
 			if ((*outLen ==0) &&
 				(temp_conv_buffer[i*2] == 0x00) &&
 				(temp_conv_buffer[i*2+1] == 0x00))
@@ -366,11 +358,8 @@
 			*outLen = MAX_MSG_LEN;
 			temp_conv_buffer[MAX_MSG_LEN-2] = 0x00;
 			temp_conv_buffer[MAX_MSG_LEN-1] = 0x00;
-
-
 		}
 		return;
-
 	}
 	else
 	{
@@ -388,22 +377,21 @@
 
  $Description:	Start the creation of the main window for SMS Send.
 
- $Returns:		none
+ $Returns:	none
 
  $Arguments:	m - Menu handle
- 				i - Menu item selected.
+		i - Menu item selected.
 
 *******************************************************************************/
 
 static int SmsSend_R_OPTExeSend(MfwMnu* m, MfwMnuItem* i)
 {
-    T_MFW_HND     	   win      = mfwParent(mfw_header());
+    T_MFW_HND  	       win      = mfwParent(mfw_header());
     T_MFW_WIN        * win_data = ((T_MFW_HDR *)win)->data;
     T_SMSSEND_R_OPT  * data     = (T_SMSSEND_R_OPT *)win_data->user;
-	/* access to data from parent   */
+    /* access to data from parent   */
     T_SEND  * parent_data =  (T_SEND *)data->parent_data;
 
-
 #ifdef NEW_EDITOR
 	T_AUI_EDITOR_DATA editor_data;	/* SPR#1428 - SH - New Editor data */
 #else
@@ -444,7 +432,6 @@
 			parent_data->number_editor = editor_start(parent_data->win, &editor_data);  /* start the editor */
 #endif /* NEW_EDITOR */
 	return 1;  // ADDED BY RAVI - 28-11-2005
-
 }
 
 /*******************************************************************************
@@ -453,19 +440,19 @@
 
  $Description:
 
- $Returns:		execution status
+ $Returns:	execution status
 
  $Arguments:	m - Menu handle
- 				i - Menu item selected.
+		i - Menu item selected.
 
 *******************************************************************************/
 
 static int SmsSend_R_OPTExeDiscard(MfwMnu* m, MfwMnuItem* i)
 {
-    T_MFW_HND     	   win      = mfwParent(mfw_header());
+    T_MFW_HND          win      = mfwParent(mfw_header());
     T_MFW_WIN        * win_data = ((T_MFW_HDR *)win)->data;
     T_SMSSEND_R_OPT  * data     = (T_SMSSEND_R_OPT *)win_data->user;
-	/* access to data from parent   */
+    /* access to data from parent   */
     T_SEND  * parent_data =  (T_SEND *)data->parent_data;
 
 	TRACE_EVENT("SmsSend_R_OPTExeDiscard");
@@ -490,7 +477,6 @@
 	parent_data->text_editor = 0;
 	SmsSend_SEND_destroy(parent_data->win);
 
-
 	return 1;
 }
 
@@ -501,10 +487,10 @@
 
  $Description:	called when the user press Call sender in the Option menu
 
- $Returns:		execution status
+ $Returns:	execution status
 
  $Arguments:	m - Menu handle
- 				i - Menu item selected.
+		i - Menu item selected.
 
 *******************************************************************************/
 
@@ -538,10 +524,10 @@
 
  $Description:	called when the user press Call sender in the Option menu
 
- $Returns:		execution status
+ $Returns:	execution status
 
  $Arguments:	parent_window -parent window handle
- 				menuAttr - Menu attributes.
+		menuAttr - Menu attributes.
 
 *******************************************************************************/
 
@@ -554,9 +540,9 @@
     win = SmsSend_R_OPT_create (parent_window);
 
     if (win NEQ NULL)
-	{
-	    SEND_EVENT (win, E_INIT, NULL, (void *)menuAttr);
-	}
+    {
+	SEND_EVENT (win, E_INIT, NULL, (void *)menuAttr);
+    }
     return win;
 }
 
@@ -566,7 +552,7 @@
 
  $Description:	Create the Option window
 
- $Returns:		mfw window handle
+ $Returns:	mfw window handle
 
  $Arguments:	parent_window -parent window handle
 
@@ -586,13 +572,13 @@
     data->win =
 	win_create (parent_window, 0, E_WIN_VISIBLE, (T_MFW_CB)SmsSend_R_OPT_win_cb);
     if (data->win EQ NULL)
-	{
-	    return NULL;
-	}
+    {
+	return NULL;
+    }
+
     /*
      * connect the dialog data to the MFW-window
      */
-
     data->mmi_control.dialog = (T_DIALOG_FUNC)SmsSend_R_OPT_exec_cb;
     data->mmi_control.data   = data;
     win                      = ((T_MFW_HDR *)data->win)->data;
@@ -612,7 +598,7 @@
 
  $Description:	Destroy the Option window
 
- $Returns:		mfw window handle
+ $Returns:	mfw window handle
 
  $Arguments:	own_window - current window
 
@@ -626,28 +612,28 @@
     TRACE_FUNCTION ("SmsSend_R_OPT_destroy()");
 
     if (own_window)
+    {
+	win_data = ((T_MFW_HDR *)own_window)->data;
+	data = (T_SMSSEND_R_OPT *)win_data->user;
+
+	if (data)
 	{
-	    win_data = ((T_MFW_HDR *)own_window)->data;
-	    data = (T_SMSSEND_R_OPT *)win_data->user;
-
-	    if (data)
-		{
-		    /*
-		     * Delete WIN handler
-		     */
-			data->parent_data->options_win = 0;
-		    win_delete (data->win);
-
-		    /*
-		     * Free Memory
-		     */
-		    FREE_MEMORY ((void *)data, sizeof (T_SMSSEND_R_OPT));
-		}
-	    else
-		{
-		    TRACE_EVENT ("SmsSend_R_OPT_destroy() called twice");
-		}
+	    /*
+	     * Delete WIN handler
+	     */
+	    data->parent_data->options_win = 0;
+	    win_delete (data->win);
+
+	    /*
+	     * Free Memory
+	     */
+	    FREE_MEMORY ((void *)data, sizeof (T_SMSSEND_R_OPT));
 	}
+	else
+	{
+	    TRACE_EVENT ("SmsSend_R_OPT_destroy() called twice");
+	}
+    }
 }
 
 /*******************************************************************************
@@ -656,12 +642,12 @@
 
  $Description:	Exec callback function for the Option window
 
- $Returns:		none
+ $Returns:	none
 
  $Arguments:	win - current window
- 				event - event id
- 				value - unique id
- 				parameter - optional data.
+		event - event id
+		value - unique id
+		parameter - optional data.
 
 *******************************************************************************/
 
@@ -673,14 +659,13 @@
 //    T_MFW_HND      * l_parent;   // RAVI
  //   SHORT            l_id;              // RAVI
     T_MFW_HDR    * parent      =  data->parent;
-   	T_MFW_WIN    * win_data2   =  ((T_MFW_HDR *)parent)->data;
+    T_MFW_WIN    * win_data2   =  ((T_MFW_HDR *)parent)->data;
     T_SEND  * parent_data =  (T_SEND *)win_data2->user;
 
 //	T_MFW_EVENT         MfwEvents;   // RAVI
 
     TRACE_FUNCTION ("SmsSend_R_OPT_exec_cb()");
 
-
     switch (event)
 	{
 	case E_INIT:
@@ -708,14 +693,13 @@
 
  $Description:	Menu callback function for the Option window
 
- $Returns:		none
+ $Returns:	none
 
  $Arguments:	e - event id
- 				m - menu handle
+		m - menu handle
 *******************************************************************************/
 
 static int SmsSend_R_OPT_mnu_cb (MfwEvt e, MfwMnu *m)
-
 {
     T_MFW_HND    win  = mfwParent(mfw_header());
     T_MFW_WIN  * win_data = ((T_MFW_HDR *)win)->data;
@@ -742,10 +726,10 @@
 
  $Description:	Window callback function for the Option window
 
- $Returns:		execution status
+ $Returns:	execution status
 
  $Arguments:	e - event id
- 				w - window handle
+		w - window handle
 *******************************************************************************/
 
 static int SmsSend_R_OPT_win_cb (MfwEvt e, MfwWin *w)
@@ -755,7 +739,7 @@
     switch (e)
 	{
         case MfwWinVisible:  /* window is visible  */
-		dspl_ClearAll();
+	    dspl_ClearAll();
 	    displaySoftKeys(TxtSoftSelect,TxtSoftBack);
 	    break;
 	case MfwWinFocussed: /* input focus / selected   */
@@ -772,10 +756,10 @@
 
  $Description:	Exec callback function for the Option window
 
- $Returns:		execution status
+ $Returns:	execution status
 
  $Arguments:	e - event id
- 				k - keyboard info
+		k - keyboard info
 *******************************************************************************/
 
 static int SmsSend_R_OPT_kbd_cb (MfwEvt e, MfwKbd *k)
@@ -831,10 +815,10 @@
 
  $Description:	Create SMS send window
 
- $Returns:		execution status
+ $Returns:	execution status
 
  $Arguments:	parent_window - parent window.
- 				UserData - SMS data
+		UserData - SMS data
 *******************************************************************************/
 
 T_MFW_HND SmsSend_SEND_start(T_MFW_HND parent_window, T_SmsUserData *UserData)
@@ -859,7 +843,7 @@
 
  $Description:	Create a window for entering the text
 
- $Returns:		window handle
+ $Returns:	window handle
 
  $Arguments:	parent_window - parent window.
 
@@ -885,7 +869,7 @@
 	win                      = ((T_MFW_HDR *)data->win)->data;
 	win->user                = (MfwUserDataPtr)data;
 	data->parent             = parent_window;
-	data->id								 = SEND_ID;
+	data->id		 = SEND_ID;
 
 	winShow(data->win);
 	return data->win;
@@ -897,7 +881,7 @@
 
  $Description:	Destroy the windows for entering the text
 
- $Returns:		none
+ $Returns:	none
 
  $Arguments:	own_window - window.
 
@@ -905,49 +889,45 @@
 
 static void SmsSend_SEND_destroy(MfwHnd own_window)
 {
-  T_MFW_WIN * win_data;
-  T_SEND    * data = NULL;
-
-  TRACE_FUNCTION ("SmsSend_SEND_destroy()");
-
-  if (own_window)
+    T_MFW_WIN * win_data;
+    T_SEND    * data = NULL;
+
+    TRACE_FUNCTION ("SmsSend_SEND_destroy()");
+
+    if (own_window)
+    {
+	win_data = ((T_MFW_HDR *)own_window)->data;
+	if (win_data != NULL)
+		data = (T_SEND *)win_data->user;
+
+	if (data)
 	{
-	  win_data = ((T_MFW_HDR *)own_window)->data;
-		if (win_data != NULL)
-			data = (T_SEND *)win_data->user;
-
-	  if (data)
+		// Delete sms handle
+		if (data->sms_handler != NULL)
+			sms_delete(data->sms_handler);
+
+		if (data->child_dialog != NULL)
 		{
-
-			// Delete sms handle
-			if (data->sms_handler != NULL)
-				sms_delete(data->sms_handler);
-
-			if (data->child_dialog != NULL)
-			{
-				TRACE_EVENT("child_dialog not deleted?");
-			}
-
-			if (data->text_editor != NULL)
-			{
-				TRACE_EVENT("current_editor not deleted?");
-
-
-			}
-
-
-			// Delete WIN handler
-		  win_delete (data->win);
-
-		  // Free Memory
-			FREE_MEMORY ((void *)data, sizeof (T_SEND));
-			//win_data->user = NULL;
+			TRACE_EVENT("child_dialog not deleted?");
+		}
+
+		if (data->text_editor != NULL)
+		{
+			TRACE_EVENT("current_editor not deleted?");
 		}
-	  else
-		{
-			TRACE_EVENT ("SmsSend_SEND_destroy() called twice");
-		}
+
+		// Delete WIN handler
+		win_delete (data->win);
+
+		// Free Memory
+		FREE_MEMORY ((void *)data, sizeof (T_SEND));
+		//win_data->user = NULL;
 	}
+	else
+	{
+		TRACE_EVENT ("SmsSend_SEND_destroy() called twice");
+	}
+    }
 }
 
 /*******************************************************************************
@@ -956,12 +936,12 @@
 
  $Description:	Main callback handler for events sent to to trigger execution
 
- $Returns:		none
+ $Returns:	none
 
  $Arguments:	win - current window
- 				event - event id
- 				identifier - unique id
- 				parameter - optional data.
+		event - event id
+		identifier - unique id
+		parameter - optional data.
 *******************************************************************************/
 
 static void SmsSend_main_exec_cb (T_MFW_HND win, USHORT event, SHORT identifier, void * parameter)
@@ -1004,11 +984,11 @@
 
  $Description:	Callback handler for events sent by the window itself
 
- $Returns:		none
+ $Returns:	none
 
  $Arguments:	win - current window
- 				event - event id
- 				parameter - optional data.
+		event - event id
+		parameter - optional data.
 *******************************************************************************/
 
 static void SmsSend_SEND_exec_cb(T_MFW_HND win, USHORT event, void *parameter)
@@ -1280,11 +1260,11 @@
 
  $Description:	Callback handler for events sent by the phonebook window
 
- $Returns:		none
+ $Returns:	none
 
  $Arguments:	win - current window
- 				event - event id
- 				parameter - optional data.
+		event - event id
+		parameter - optional data.
 *******************************************************************************/
 
 static void SmsSend_PHBK_exec_cb(T_MFW_HND win, USHORT event, void *parameter)
@@ -1331,11 +1311,11 @@
 
  $Description:	Callback handler for events sent by the TEXTEDIT editor
 
- $Returns:		none
+ $Returns:	none
 
  $Arguments:	win - current window
- 				event - event id
- 				parameter - optional data.
+		event - event id
+		parameter - optional data.
 *******************************************************************************/
 
 static void SmsSend_TEXTEDIT_exec_cb(T_MFW_HND win, USHORT event, void *parameter)
@@ -1360,22 +1340,22 @@
 
  $Description:	Callback handler for events sent by the NBEDIT editor
 
- $Returns:		none
+ $Returns:	none
 
  $Arguments:	win - current window
- 				event - event id
- 				parameter - optional data.
+		event - event id
+		parameter - optional data.
 *******************************************************************************/
 
 static void SmsSend_NBEDIT_exec_cb(T_MFW_HND win, USHORT event, void *parameter)
 {
     T_MFW_WIN      * win_data = ((T_MFW_HDR *) win)->data;
     T_SEND         * data = (T_SEND *)win_data->user;
-	T_MFW_SMS_INFO sms_parameter;
+    T_MFW_SMS_INFO sms_parameter;
 #ifdef NEW_EDITOR
-	T_AUI_EDITOR_DATA editor_data;	/* SPR#1428 - SH - New Editor data */
+    T_AUI_EDITOR_DATA editor_data;	/* SPR#1428 - SH - New Editor data */
 #else
-	T_EDITOR_DATA editor_data;
+    T_EDITOR_DATA editor_data;
 #endif
 
 	TRACE_FUNCTION ("SmsSend_NBEDIT_exec_cb()");
@@ -1463,11 +1443,11 @@
 
  $Description:	Callback handler for events sent by the CENTREEDIT editor
 
- $Returns:		none
+ $Returns:	none
 
  $Arguments:	win - current window
- 				event - event id
- 				parameter - optional data.
+		event - event id
+		parameter - optional data.
 *******************************************************************************/
 
 static void SmsSend_CENTREEDIT_exec_cb(T_MFW_HND win, USHORT event, void *parameter)
@@ -1531,11 +1511,11 @@
 
  $Description:	Callback function for the text editor
 
- $Returns:		none
+ $Returns:	none
 
  $Arguments:	win - current window
- 				Identifier - unique id
- 				reason - event cause
+		Identifier - unique id
+		reason - event cause
 *******************************************************************************/
 
 static void SmsSend_TEXTEDIT_edit_cb (T_MFW_HND win, USHORT Identifier, SHORT reason)
@@ -1593,11 +1573,11 @@
 
  $Description:	Callback function for the number editor
 
- $Returns:		none
+ $Returns:	none
 
  $Arguments:	win - current window
- 				Identifier - unique id
- 				reason - event cause
+		Identifier - unique id
+		reason - event cause
 *******************************************************************************/
 
 static void SmsSend_NBEDIT_edit_cb (T_MFW_HND win, USHORT Identifier, SHORT reason)
@@ -1610,7 +1590,6 @@
 
 	TRACE_FUNCTION ("SmsSend_NBEDIT_edit_cb()");
 
-
 	switch (reason)
 	{
 		case INFO_KCD_LEFT:
@@ -1716,11 +1695,11 @@
 
  $Description:	Callback function for the center number editor
 
- $Returns:		none
+ $Returns:	none
 
  $Arguments:	win - current window
- 				Identifier - unique id
- 				reason - event cause
+		Identifier - unique id
+		reason - event cause
 *******************************************************************************/
 
 static void SmsSend_CENTREEDIT_edit_cb (T_MFW_HND win, USHORT Identifier, SHORT reason)
@@ -1759,11 +1738,11 @@
 
  $Description:	Callback functyion for handling SMS events from the MFW.
 
- $Returns:		execution status
+ $Returns:	execution status
 
  $Arguments:	event - window event id
- 				info -  optional info
- 				reason - event cause
+		info -  optional info
+		reason - event cause
 *******************************************************************************/
 
 static int SmsSend_SEND_mfw_cb (MfwEvt event, void *info)
@@ -1773,7 +1752,6 @@
 	T_MFW_WIN  * win_data = ((T_MFW_HDR *)win)->data;
 	T_SEND     * data     = (T_SEND *)win_data->user;
 
-
 	TRACE_FUNCTION ("SmsSend_SEND_mfw_cb()");
 
 	switch (event)
@@ -1838,10 +1816,10 @@
 
  $Description:	Create the Save SMS text window.
 
- $Returns:		mfw window handle
+ $Returns:	mfw window handle
 
  $Arguments:	parent_window - parent window
- 				UserData - SMS info
+		UserData - SMS info
 
 *******************************************************************************/
 
@@ -1854,9 +1832,9 @@
     win = SmsSend_SAVE_create (parent_window);
 
     if (win NEQ NULL)
-	{
-	    SEND_EVENT (win, E_INIT, 0, (void *)UserData);
-	}
+    {
+	SEND_EVENT (win, E_INIT, 0, (void *)UserData);
+    }
     return win;
 }
 
@@ -1866,7 +1844,7 @@
 
  $Description:	Create a window for info dialog
 
- $Returns:		mfw window handle
+ $Returns:	mfw window handle
 
  $Arguments:	parent_window - parent window
 
@@ -1896,7 +1874,7 @@
 	win                      = ((T_MFW_HDR *)data->win)->data;
 	win->user                = (MfwUserDataPtr)data;
 	data->parent             = parent_window;
-	data->id				 = SAVE_ID;
+	data->id		 = SAVE_ID;
 
 	winShow(data->win);
 	return data->win;
@@ -1908,7 +1886,7 @@
 
  $Description:	Destroy the windows for info dialog
 
- $Returns:		none
+ $Returns:	none
 
  $Arguments:	own_window - current window
 
@@ -1916,40 +1894,39 @@
 
 static void SmsSend_SAVE_destroy(MfwHnd own_window)
 {
-  T_MFW_WIN * win_data;
-  T_SAVE    * data = NULL;
-
-  TRACE_FUNCTION ("SmsSend_SAVE_destroy()");
-
-  if (own_window)
-	{
-	  win_data = ((T_MFW_HDR *)own_window)->data;
-		if (win_data)
+    T_MFW_WIN * win_data;
+    T_SAVE    * data = NULL;
+
+    TRACE_FUNCTION ("SmsSend_SAVE_destroy()");
+
+    if (own_window)
+    {
+	win_data = ((T_MFW_HDR *)own_window)->data;
+	if (win_data)
 	    data = (T_SAVE *)win_data->user;
 
-	  if (data)
-		{
-			// Delete sms handle
-			if (data->sms_handler != NULL)
-				sms_delete(data->sms_handler);
-
-			if (data->child_dialog != NULL)
-			{
-				TRACE_EVENT("child_dialog not deleted?");
-			}
-
-			// Delete WIN handler
-		  win_delete (data->win);
-
-		  // Free Memory
-		  FREE_MEMORY ((void *)data, sizeof (T_SAVE));
-
-		}
-	  else
-		{
-		    TRACE_EVENT ("SmsSend_SAVE_destroy() called twice");
-		}
+	if (data)
+	{
+	    // Delete sms handle
+	    if (data->sms_handler != NULL)
+		sms_delete(data->sms_handler);
+
+	    if (data->child_dialog != NULL)
+	    {
+		TRACE_EVENT("child_dialog not deleted?");
+	    }
+
+	    // Delete WIN handler
+	    win_delete (data->win);
+
+	    // Free Memory
+	    FREE_MEMORY ((void *)data, sizeof (T_SAVE));
 	}
+	else
+	{
+	    TRACE_EVENT ("SmsSend_SAVE_destroy() called twice");
+	}
+    }
 }
 
 /*******************************************************************************
@@ -1958,7 +1935,7 @@
 
  $Description:	Callback handler for events sent to to trigger execution
 
- $Returns:		none
+ $Returns:	none
 
  $Arguments:	own_window - current window
 
@@ -2086,10 +2063,10 @@
 
  $Description:	Handles SMS events from the MFW.
 
- $Returns:		none
+ $Returns:	none
 
  $Arguments:	event - event id
- 				info - optional info
+		info - optional info
 
 *******************************************************************************/
 
@@ -2194,7 +2171,7 @@
 
  $Description:	This function sends a SMS message.
 
- $Returns:		execution status
+ $Returns:	execution status
 
  $Arguments:	event - current window
 
@@ -2205,9 +2182,9 @@
 
 static int SmsSend_send_to_mfw (T_MFW_HND win)
 {
-	T_MFW_WIN				* win_data = ((T_MFW_HDR *)win)->data;
-	T_SEND					* data     = (T_SEND *)win_data->user;
-	T_MFW						submit_status;   /* Result of SMS send operation. */
+	T_MFW_WIN	* win_data = ((T_MFW_HDR *)win)->data;
+	T_SEND		* data     = (T_SEND *)win_data->user;
+	T_MFW		submit_status;   /* Result of SMS send operation. */
 	T_MFW_SMS_INFO	sms_parameter;
 
 	USHORT outLen;
@@ -2228,8 +2205,6 @@
 	SmsSend_set_dcs_number (&sms_parameter);
 	/* Send the SMS */
 
-
-
 	#ifdef NO_ASCIIZ
 	{
 
@@ -2261,14 +2236,11 @@
 				outLen,								// sbh - added this, see function definition
                 (char *)data->edt_data.CentreBuffer);/* sevice center num. */
 
-
 		#endif
 
 	}
 	#endif
 
-
-
 	/*  display "Please wait" for sent sms */
 	if (submit_status EQ MFW_SMS_OK)
 	{
@@ -2306,7 +2278,7 @@
 
  $Description:	Called by external processes to read SMS PP config data.
 
- $Returns:		execution status
+ $Returns:	execution status
 
  $Arguments:	config_data - SMS info
 
@@ -2316,8 +2288,8 @@
 {
 	T_MFW Submit_Status;   /* store theh result of SMS send operation. */
 
-  TRACE_FUNCTION ("SmsSend_get_config_data()");
-  // get the current config data from SIM
+	TRACE_FUNCTION ("SmsSend_get_config_data()");
+	// get the current config data from SIM
 	Submit_Status = sms_parameter(config_data, TRUE);
 
 	if (Submit_Status == MFW_SMS_FAIL)
@@ -2337,7 +2309,7 @@
 
  $Description:	Called by external processes to write/Set SMS PP config data.
 
- $Returns:		execution status
+ $Returns:	execution status
 
  $Arguments:	config_data - SMS info
 
@@ -2347,8 +2319,8 @@
 {
 	T_MFW Submit_Status;   /* store theh result of SMS send operation. */
 
-  TRACE_FUNCTION ("SmsSend_set_SrvCntr_number()");
-  // get the current config data from SIM
+	TRACE_FUNCTION ("SmsSend_set_SrvCntr_number()");
+	// get the current config data from SIM
 	Submit_Status = sms_set_SrvCntr_number(config_data);
 
 	if (Submit_Status == MFW_SMS_FAIL)
@@ -2362,12 +2334,13 @@
 		return TRUE;
 	}
 }
+
 UBYTE SmsSend_set_dcs_number (T_MFW_SMS_INFO *config_data)
 {
 	T_MFW Submit_Status;   /* store theh result of SMS send operation. */
 
-  TRACE_EVENT ("SmsSend_set_dcs_number()");
-  // get the current config data from SIM
+	TRACE_EVENT ("SmsSend_set_dcs_number()");
+	// get the current config data from SIM
 	Submit_Status = sms_set_dcs_number(config_data);
 
 	if (Submit_Status == MFW_SMS_FAIL)
@@ -2382,92 +2355,31 @@
 	}
 }
 
-/* SPR#1428 - SH - New Editor: no longer required */
-#ifndef NEW_EDITOR
-/*******************************************************************************
-
- $Function:    	SmsSend_loadEditDefault
-
- $Description:	Configure T_EDITOR_DATA structure with default editor settings.
-
- $Returns:		none
-
- $Arguments:	editor_data - editor data.
-
-*******************************************************************************/
-
-void SmsSend_loadEditDefault(T_EDITOR_DATA *editor_data)
-{
-	    TRACE_FUNCTION ("SmsSend_loadEditDefault()");
-
-		editor_attr_init(&editor_data->editor_attr, NULL, edtCurBar1, 0, 0, 0, COLOUR_EDITOR);
-		editor_data_init(editor_data, NULL, TxtSoftSelect, TxtSoftBack, 0, 1, ALPHA_MODE, FOREVER);
-		editor_data->hide									= FALSE;
-		editor_data->AlternateLeftSoftKey = TxtNull;
-		editor_data->Identifier           =  0;
-		editor_data->TextString           = NULL;
-		editor_data->destroyEditor        = TRUE ;
-}
-
-
-/*******************************************************************************
-
- $Function:    	SmsSend_loadUCS2EditDefault
-
- $Description:	Configure T_EDITOR2_DATA structure with default editor settings.
-
- $Returns:		none
-
- $Arguments:	editor_data - editor data.
-
-*******************************************************************************/
-
-static void SmsSend_loadUCS2EditDefault(T_EDITOR_DATA *editor_data)
-{
-	TRACE_FUNCTION ("SmsSend_loadUCS2EditDefault()");
-
-	memset(editor_data, 0, sizeof(T_EDITOR_DATA));
-	editor_data->hide							= FALSE;
-	editor_data->LeftSoftKey					= TxtSend;
-	editor_data->AlternateLeftSoftKey			= TxtSend;
-	editor_data->RightSoftKey					= TxtSave;
-	editor_data->Identifier						= SMSSEND_ID_TEXTEDIT;
-	editor_data->mode							= ALPHA_MODE;
-	editor_data->min_enter						= 0;
-	editor_data->timeout						= FOREVER;
-	editor_data->Callback						= (T_EDIT_CB)SmsSend_TEXTEDIT_edit_cb;
-}
-#endif /* NEW_EDITOR */
-
-
 /*******************************************************************************
 
  $Function:    	SmsSend_standard_dialog_cb
 
  $Description:	Callback function for standard dialogs in smssend module
 
- $Returns:		none
+ $Returns:	none
 
  $Arguments:	win - current window
- 				Identifier - unique id
- 				Reason - event id
+		Identifier - unique id
+		Reason - event id
 
 *******************************************************************************/
 
 static int SmsSend_standard_dialog_cb(T_MFW_HND win, USHORT Identifier, USHORT Reason)
 {
 	T_MFW_WIN   * win_data		= ((T_MFW_HDR *) win)->data;
-	T_SAVE		  * save_data		= NULL;
-	T_SEND			* send_data		= NULL;
-  	T_MFW_HND   * l_parent		= NULL;
-
-    TRACE_FUNCTION ("SmsSend_standard_dialog_cb()");
-
-
+	T_SAVE	    * save_data		= NULL;
+	T_SEND	    * send_data		= NULL;
+	T_MFW_HND   * l_parent		= NULL;
+
+	TRACE_FUNCTION ("SmsSend_standard_dialog_cb()");
 
 	switch (Identifier)
 	{
-
 		case SMSSEND_ID_SAVE_NOT_READY:
 		case SMSSEND_ID_SC_NOT_READY:
 			// SEND an event to recreate the text editor
@@ -2527,7 +2439,6 @@
 			}
 			break;
 
-
 		default:
 			TRACE_EVENT("MFW_EVENT_REJECTED");
 			return MFW_EVENT_REJECTED;
@@ -2540,16 +2451,16 @@
  $Function:    	SmsSend_convert_to_inter
 
  $Description:	Transform a phone number in T_MFW_SMS_ADDR format to a string
- 				with a '+' character if international number
-
- $Returns:		none
+		with a '+' character if international number
+
+ $Returns:	none
 
  $Arguments:	source_number - calling number
- 				dest_number - called number
+		dest_number - called number
 *******************************************************************************/
 
 void SmsSend_convert_to_inter(T_MFW_SMS_ADDR *source_number,	// The number to convert
-							  char *dest_number)				// The dest number with a '+' if needed
+	char *dest_number)	// The dest number with a '+' if needed
 {
 	USHORT nb_char;
 	USHORT i = 0;
@@ -2575,10 +2486,10 @@
 
  $Description:	Create editor for entering the Service center number.
 
- $Returns:		none
+ $Returns:	none
 
  $Arguments:	m - menu handler
- 				i - menu item selected.
+		i - menu item selected.
 *******************************************************************************/
 
 
@@ -2595,11 +2506,11 @@
 
  $Description:	Callback function for the SC number editor.
 
- $Returns:		none
+ $Returns:	none
 
  $Arguments:	win - current window
- 				Identifier - unique id
- 				reason - event cause
+		Identifier - unique id
+		reason - event cause
 *******************************************************************************/
 
 static void SmsSend_SCNBEDIT_edit_cb (T_MFW_HND win, USHORT Identifier, SHORT reason)
@@ -2609,10 +2520,8 @@
 
 	T_MFW_SMS_INFO	sms_parameter;
 
-
 	TRACE_FUNCTION ("SmsSend_SCNBEDIT_edit_cb()");
 
-
 	switch (reason)
 	{
 		case INFO_KCD_LEFT:
@@ -2681,7 +2590,7 @@
 
  $Function:    	mmi_dialog_information_screen_save_sms
 
- $Description:	 Function to display SMS "Saved" info screen
+ $Description:	Function to display SMS "Saved" info screen
 
  $Returns:	info_dialog
 
@@ -2696,7 +2605,6 @@
 	display_info.TextString2   = text;
 	display_info.Identifier   = identifier;
 	return info_dialog(parent_win,&display_info); //information screen
-
 }
 
 #undef MMI_SMSSEND_C