diff src/ui/bmi/mmiTimeDate.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 d0a2eaf41733
line wrap: on
line diff
--- a/src/ui/bmi/mmiTimeDate.c	Sun Nov 08 05:12:05 2020 +0000
+++ b/src/ui/bmi/mmiTimeDate.c	Sun Nov 08 06:39:16 2020 +0000
@@ -2,27 +2,27 @@
 
 					CONDAT (UK)
 
-********************************************************************************                                                                              
+********************************************************************************
 
  This software product is the property of Condat (UK) Ltd and may not be
- disclosed to any third party without the express permission of the owner.                                 
-                                                                              
+ disclosed to any third party without the express permission of the owner.
+
 ********************************************************************************
 
- $Project name:	Basic MMI                                                      
- $Project code:	BMI (6349)                                                           
+ $Project name:	Basic MMI
+ $Project code:	BMI (6349)
  $Module:		MMI
  $File:		    MmiTimeDate.c
- $Revision:		1.0                                                       
-                                                                              
- $Author:		Condat(UK)                                                         
- $Date:		    22/02/01                                                      
-                                                                               
+ $Revision:		1.0
+
+ $Author:		Condat(UK)
+ $Date:		    22/02/01
+
 ********************************************************************************
-                                                                              
+
  Description:
 
-  
+
 
 ********************************************************************************
 
@@ -31,7 +31,7 @@
     Apr 03, 2007    REF: OMAPS00123995  x0039928
     Description:   Alarm is playing midi or imelody files only once.
     Solution: Loop parameter is changed from FALSE to TRUE
-    
+
     Aug 10, 2006    REF: OMAPS00076372  x0039928
     Description:   Incoming Alram with midi ringer during voice call
     Solution: Beep tone is played when alarm expires during the call
@@ -41,7 +41,7 @@
     return to Idle screen, the date is not the input date. (for example: input the date "01/01/2110" then saved,
     it will indicate "saved", but the date in Idle is "01/01/2010" instead.)
     Solution   : Validation for the date was wrong. Upperbound was not included. It is included.
- 
+
     Apr 04, 2006    REF:OMAPS00073057 Prabakar R (a0393213)
     Description: When the time format is 12hr, user can not set current time to be 12 hour.
     After user set the current time to be 12 hour and return the idle screen, the current time isn't 12 hour
@@ -51,24 +51,24 @@
 	Description:   Mp3 Ringer Implementation
 	Solution: The Midi Ringer application has been enhanced to support mp3 as ringer.
 	The interface  function names have been modified.
-	
+
 	Apr 05, 2005    REF: ENH 29994 xdeepadh
    	Description: Implementation of Generic Midi Ringer and Modification of existing Midi Test Application
   	Solution: Generic Midi Ringer and Midi Test Application were implemented.
-  	
+
 	Jan 06,2004 REF: CRR 27859 xkundadu
 	Description:  Clock: Alarm does not go off even if timer times out.
-	Solution: If the mfw_td_set_alarm() function fails, display the 
+	Solution: If the mfw_td_set_alarm() function fails, display the
 	'Write Failed" message.
 
  	Oct 14, 2004    REF: CRR 25756 xnkulkar
 	Description: Alarm setting not allowed
-	Solution:	We are checking the time format (12/24 Hour) and accordingly setting the 
+	Solution:	We are checking the time format (12/24 Hour) and accordingly setting the
 			format flag. Also the conversion of time from 24 to 12 or 12 to 24 hour format is done
 			before displaying it on the alarm editor screen.
 
-	25/10/00			Original Condat(UK) BMI version.	
-	   
+	25/10/00			Original Condat(UK) BMI version.
+
  $End
 
 *******************************************************************************/
@@ -132,9 +132,9 @@
 
 //x0pleela 22 May, 2007 DR: OMAPS00127483
 #ifdef FF_PHONE_LOCK
-#ifdef FF_MIDI_RINGER  
+#ifdef FF_MIDI_RINGER
 #include "mfw_midi.h"
-#endif //FF_MIDI_RINGER 
+#endif //FF_MIDI_RINGER
 #endif /* FF_PHONE_LOCK */
 
 #include "dspl.h"
@@ -166,7 +166,7 @@
 #endif
 
 // Apr 05, 2005    REF: ENH 29994 xdeepadh
-#ifdef FF_MIDI_RINGER  
+#ifdef FF_MIDI_RINGER
 #include "mmiCall.h"
 #include "mfw_midi.h"
 extern T_call call_data;
@@ -178,12 +178,12 @@
 
 //x0pleela 22 May, 2007 DR: OMAPS00127483
 #include "MmiSounds.h"
-extern int 			phlock_alarm;				/* flag to check whether alarm event has occured or not 	*/ 
+extern int 			phlock_alarm;				/* flag to check whether alarm event has occured or not 	*/
 
 //x0pleela 22 May, 2007 DR: OMAPS00127483
 extern T_MFW_HND	phlock_win_handle;			/* to hold the win handle of phone unlock editor window 	*/
 #ifdef FF_MMI_AUDIO_PROFILE
-extern UBYTE mfwAudPlay;//flag for audio 
+extern UBYTE mfwAudPlay;//flag for audio
 #endif
 
 #endif //FF_PHONE_LOCK
@@ -199,7 +199,7 @@
 /* SPR#1428 - SH - New Editor changes.
  * Time and date module pretty much rewritten to use new formatted input of editor.
  */
- 
+
 #ifdef NEW_EDITOR
 
 /* LOCAL FUNCTION PROTOTYPES */
@@ -310,7 +310,7 @@
  $Returns:		none.
 
  $Arguments:	none
- 
+
 *******************************************************************************/
 void time_date_init()
 {	mfw_td_init();
@@ -321,12 +321,12 @@
 
  $Function:  time_date_init
 
- $Description:	 deletes mfw td 
+ $Description:	 deletes mfw td
 
  $Returns:		none.
 
  $Arguments:	none
- 
+
 *******************************************************************************/
 void time_date_delete()
 {
@@ -342,7 +342,7 @@
  $Returns:		none.
 
  $Arguments:	none
- 
+
 *******************************************************************************/
 int time_date_cb(T_MFW_EVENT event,void* para)
 {	TRACE_EVENT_P1("time_date_cb():%d",event);
@@ -361,29 +361,29 @@
  $Returns:		none.
 
  $Arguments:	window handle, identifier, reason(key pressed)
- 
+
 *******************************************************************************/
 void alarm_screen_cb(T_MFW_HND win, USHORT identifier, UBYTE reason)
-{	
+{
 TRACE_FUNCTION("alarm_screen_cb()");
 // Apr 05, 2005    REF: ENH 29994 xdeepadh
 //Nov 02, 2005    REF:ER OMAPS00039044  xdeepadh
 /*get current alarm id*/
 
-//x0pleela 22 May, 2007 DR: OMAPS00127483 
+//x0pleela 22 May, 2007 DR: OMAPS00127483
 //Stopping the alarm ringer based on the MfwAudPlay flag
 #ifdef FF_PHONE_LOCK
-#ifdef FF_MMI_AUDIO_PROFILE				
+#ifdef FF_MMI_AUDIO_PROFILE
 	if( mfwAudPlay)
 #endif
 	{
 #endif // FF_PHONE_LOCK
 /*stop alarm*/
-#ifdef FF_MIDI_RINGER  
+#ifdef FF_MIDI_RINGER
 	mfw_ringer_stop(sounds_midi_ringer_stop_cb);
-#else  	
+#else
   #ifdef FF_MMI_RINGTONE /*MSL Stop */
-     audio_StopSoundbyID( AUDIO_BUZZER, ALARMTONE_SELECT); 
+     audio_StopSoundbyID( AUDIO_BUZZER, ALARMTONE_SELECT);
   #else
   	{
   	UBYTE currentAlarm;
@@ -392,16 +392,16 @@
   	}
   #endif
 #endif
-//x0pleela 22 May, 2007  DR: OMAPS00127483 
+//x0pleela 22 May, 2007  DR: OMAPS00127483
 #ifdef FF_PHONE_LOCK
 	}
 #endif // FF_PHONE_LOCK
 	//x0pleela 05 Apr, 2007  ER: OMAPS00122561
 #ifdef FF_PHONE_LOCK
-	if( phlock_alarm) 
+	if( phlock_alarm)
 		phlock_alarm = FALSE;
 #endif //FF_PHONE_LOCK
-		
+
 }
 
 
@@ -414,7 +414,7 @@
  $Returns:		none.
 
  $Arguments:	none
- 
+
 *******************************************************************************/
 void alarm_screen(void)
 {
@@ -422,10 +422,10 @@
 	T_DISPLAY_DATA display_info;
 	T_MFW_TIME* time;
     static char text[25];
-	
-    
+
+
     TRACE_FUNCTION("alarm_screen()");
-    
+
   	/*SPR 2639, convert function to use new MFW functions*/
   	time = mfw_td_get_time();
 
@@ -434,7 +434,7 @@
 /*SPR 2639 get current alarm id and play it*/
 //Nov 02, 2005    REF:ER OMAPS00039044  xdeepadh
 //If Alarm is recieved , while in call screen,dont play the tone.
-#ifdef FF_MIDI_RINGER  
+#ifdef FF_MIDI_RINGER
 if((!(call_data.calls.numCalls)))
 {
 	/* Apr 03, 2007    REF: OMAPS00123995  x0039928 */
@@ -458,20 +458,20 @@
 #endif
   	/*SPR 2639 end*/
 
-  	
+
 	dlg_initDisplayData_TextId( &display_info, TxtSoftOK, TxtNull, TxtAlarm, TxtNull , COLOUR_STATUS);
-		
+
 	dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)alarm_screen_cb, FOREVER, KEY_CLEAR|KEY_LEFT|KEY_RIGHT );
     display_info.TextString2  = text;
 //x0pleela 05 Apr, 2007  ER: OMAPS00122561
 #ifdef FF_PHONE_LOCK
-	//x0pleela 22 May, 2007  DR: OMAPS00127483 
+	//x0pleela 22 May, 2007  DR: OMAPS00127483
 	//Instead of querying sec driver for the status of phone lock, we are checking for the phock password entry window
 	//When ringer for alarm is playing in phone locked state, Audio usues the DMA channels
 	//which will be active. The DMA channels will be available only after the audio file is fully played.
-	//This will cause that process to be blocked until the DMA channel becomes in-active and in turn if we try to 
+	//This will cause that process to be blocked until the DMA channel becomes in-active and in turn if we try to
 	//query or access secure driver we are blocked until the audio file is completely played.
-	//Since this is a hardware constraint, we found a workaround for this issue and are stopping the ringer  
+	//Since this is a hardware constraint, we found a workaround for this issue and are stopping the ringer
 	//for alarm before accessing secure driver for enabling or disbaling the phone lock.
 	if( phlock_win_handle )
 	{
@@ -492,26 +492,26 @@
 
 /*******************************************************************************
 
- $Function:  clear_alarm 
+ $Function:  clear_alarm
 
  $Description:	 handles menu option to cancel any existing alarm setting
 
  $Returns:		status int
 
  $Arguments:	menu and item (not used)
- 
+
 *******************************************************************************/
 int clear_alarm(MfwMnu* m, MfwMnuItem* i)
 {	T_MFW_HND win =  mfwParent( mfw_header() );
 	T_DISPLAY_DATA display_info;
 
-	
+
 	/*SPR 2639, changed to use new MFW functions*/
 	mfw_td_cancel_alarm();
-		
+
 	dlg_initDisplayData_TextId( &display_info, TxtSoftOK, TxtNull, TxtAlarm, TxtCancelled , COLOUR_STATUS);
 	dlg_initDisplayData_events( &display_info, NULL, THREE_SECS, KEY_CLEAR|KEY_LEFT|KEY_RIGHT );
-	
+
     /* Call Info Screen
     */
     info_dialog( win, &display_info );
@@ -531,15 +531,15 @@
  $Returns:		status int
 
  $Arguments:	menu and item (not used)
- 
+
 *******************************************************************************/
 int twelve_hour_clock(MfwMnu* m, MfwMnuItem* i)
 {	T_MFW_HND win =  mfwParent( mfw_header() );
 	T_DISPLAY_DATA display_info;
    // char text[25];  // RAVI
-  	
+
   	setClockFormat(MFW_TIME_FORMAT_12HOUR);/*SPR 2639*/
-  	
+
 	dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, TxtClockSetTo, TxtTwelveHour, COLOUR_STATUS);
 	dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)NULL, THREE_SECS, KEY_CLEAR|KEY_LEFT|KEY_RIGHT );
 
@@ -564,9 +564,9 @@
 {	T_MFW_HND win =  mfwParent( mfw_header() );
 	T_DISPLAY_DATA display_info;
   //  char text[25];  // RAVI
-  	
+
   	setClockFormat(MFW_TIME_FORMAT_24HOUR);/*SPR 2639*/
-  	
+
 	dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, TxtClockSetTo, TxtTwentyfourHour, COLOUR_STATUS);
 	dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)NULL, THREE_SECS, KEY_CLEAR|KEY_LEFT|KEY_RIGHT );
 
@@ -581,15 +581,15 @@
 
 /*******************************************************************************
 
- $Function:  alarmTimeDate  
+ $Function:  alarmTimeDate
 
  $Description:	Called when user selects alarm in menu.  Begins editor to enter
  				desired alarm time and date.
 
- $Returns:		status int 
+ $Returns:		status int
 
  $Arguments:	menu and item (not used)
- 
+
 *******************************************************************************/
 int alarmTimeDate(MfwMnu* m, MfwMnuItem* i)
 {
@@ -602,7 +602,7 @@
   T_tida		*data		= (T_tida *)win_data->user;
 
   TRACE_FUNCTION ("MmiTimeDate:alarmTimeDate()");
-  
+
   if(data->win)
   {
 	  SEND_EVENT(data->win, TIDA_ALARMDATE,0,0);
@@ -631,14 +631,14 @@
 
 /*******************************************************************************
 
- $Function:  	settingsTimeDate  
+ $Function:  	settingsTimeDate
 
  $Description:	 settings date and time menu function
 
  $Returns:		none.
 
- $Arguments:	
- 
+ $Arguments:
+
 *******************************************************************************/
 int settingsTimeDate(MfwMnu* m, MfwMnuItem* i)
 {
@@ -651,7 +651,7 @@
   T_tida		*data		= (T_tida *)win_data->user;
 
   TRACE_FUNCTION ("MmiTimeDate:settingsTimeDate()");
-  
+
   if(data->win)
   {
 	  SEND_EVENT(data->win, TIDA_DATE,0,0);
@@ -668,7 +668,7 @@
 
   tida_data->state = DATE_ENTRY;
   DateTimeEntryMode = SETTING;
-  
+
   if(tida_data->tida_win)
   {
 	  SEND_EVENT(tida_data->tida_win,DATE_ENTRY,0,tida_data);
@@ -682,19 +682,19 @@
 
 /* SPR#1428 - SH - New Editor changes
  * New time/date code below.  Uses tida_exec_cb as main "object". */
- 
+
 #ifdef NEW_EDITOR
 
 /*******************************************************************************
 
- $Function:		tida_create 
+ $Function:		tida_create
 
  $Description:	Create the main time/date window
 
  $Returns:		The window handle
 
  $Arguments:	parent_win	- The parent window
- 
+
 *******************************************************************************/
 
 T_MFW_HND tida_create(T_MFW_HND parent_win)
@@ -736,7 +736,7 @@
  $Returns:		None
 
  $Arguments:	win		- The main time/date window
- 
+
 *******************************************************************************/
 
 T_MFW_HND tida_destroy(T_MFW_HND win)
@@ -754,27 +754,27 @@
 	{
 		win_delete(data->win);
 	}
-	
+
 	if (data)
 	{
 		FREE_MEMORY((void *)data, sizeof(T_tida));
 	}
 
-	return NULL; /*a0393213 warnings removal-NULL is returned*/   
+	return NULL; /*a0393213 warnings removal-NULL is returned*/
 }
 
 
 /*******************************************************************************
 
- $Function:		tida_win_cb  
+ $Function:		tida_win_cb
 
  $Description:	Window callback function for time and date.  This is a non-displaying
  				window, so does nothing!
 
  $Returns:		None.
 
- $Arguments:	
- 
+ $Arguments:
+
 *******************************************************************************/
 
 static int tida_win_cb (T_MFW_EVENT event, T_MFW_WIN * win)
@@ -787,14 +787,14 @@
 
 /*******************************************************************************
 
- $Function:		tida_exec_cb  
+ $Function:		tida_exec_cb
 
  $Description:	Main dialog function for time and date
 
  $Returns:		None.
 
- $Arguments:	
- 
+ $Arguments:
+
 *******************************************************************************/
 
 static void tida_exec_cb(T_MFW_HND win, USHORT event, SHORT value, void * parameter)
@@ -804,17 +804,17 @@
 
 	T_MFW_TIME* currclock; /*SPR 2639*/
 	T_MFW_DATE* currdate;
-	
+
 	TRACE_FUNCTION("MmiTimeDate:tida_main");
 
-	
-	
-	
+
+
+
 	 switch(event)
 	 {
 	 	case TIDA_INIT:
 	 		break;
-	 		
+
 	 	case TIDA_DATE:
 	 		/*SPR 2639*/
 	 		currdate = mfw_td_get_date();
@@ -828,17 +828,17 @@
        		{
 				sprintf(data->buffer, "%02.02d/%02d/%04d", currdate->day, currdate->month, currdate->year);
 			}
-	
+
 	 		data->edit_win = tida_edit_create(win, event, TxtEnterDate, data->buffer, "NN\\/NN\\/NNNN");
 	 		break;
-	 		
+
 	 	case TIDA_TIME:
 	 		currclock = mfw_td_get_time();/*SPR 2639*/
 			// Issue Number : MMI-SPR-12159 on 07/04/04 by Rashmi C N and Deepa M D
 			// change by Sasken ( Rashmi C N  and Deepa M D) on April 07th 2004
 			// Bug : In 12 hour fomrat the AM and PM was not being set
 			// Solution : Displaying the am/pm for editing in the time edit screen.
-			
+
 			if(currclock->format==RTC_TIME_FORMAT_12HOUR)
 			{
 				if(currclock->PM_flag)
@@ -846,7 +846,7 @@
 				else
 					sprintf(data->buffer, "%02d:%02d am", currclock->hour, currclock->minute);
 		 		data->edit_win = tida_edit_create(win, event, TxtEnterTime, data->buffer, "NN\\:NN\\aa");
-			}	
+			}
 			else
 			{
 				sprintf(data->buffer, "%02d:%02d", mfw_td_convert_to_24_hour(currclock), currclock->minute);
@@ -875,7 +875,7 @@
        		{/*SPR 2639*/
 				sprintf(data->buffer, "%02d/%02d/%04d", alarmDate.day, alarmDate.month, alarmDate.year);
 			}
-	
+
 	 		data->edit_win = tida_edit_create(win, event, TxtEnterDate, data->buffer, "NN\\/NN\\/NNNN");
 	 		break;
 
@@ -885,7 +885,7 @@
 	 		//data->edit_win = tida_edit_create(win, event, TxtEnterTime, data->buffer, "NN\\:NN");
 
 	 		// xnkulkar SPR-25756: Alarm setting not allowed
-	 		// Check the time format set and accordingly convert the time before displaying on 
+	 		// Check the time format set and accordingly convert the time before displaying on
 	 		// the editor screen.
 	 		currclock = mfw_td_get_time();
 			if(alarmTime.format!= currclock->format)
@@ -898,7 +898,7 @@
 						alarmTime.PM_flag=0;
 					}
 					else
-					{	//if after noon					
+					{	//if after noon
 						alarmTime.PM_flag=1;
 						alarmTime.hour = alarmTime.hour-12;
 					}
@@ -927,7 +927,7 @@
 				else
 					sprintf(data->buffer, "%02d:%02d am", alarmTime.hour, alarmTime.minute);
 		 		data->edit_win = tida_edit_create(win, event, TxtEnterTime, data->buffer, "NN\\:NN\\aa");
-			}	
+			}
 			else
 			{
 	 			sprintf(data->buffer,"%02d:%02d", mfw_td_convert_to_24_hour(&alarmTime), alarmTime.minute);
@@ -939,10 +939,10 @@
 	 		tida_show_dlg(win, TxtSaved, TxtNull);
 	 		AUI_edit_Destroy(data->edit_win);
 			tida_destroy(data->win);
-			break;			
+			break;
 //	Jan 06,2004 REF: CRR 27859 xkundadu
 //	Description:  Clock: Alarm does not go off even if timer times out.
-//	Solution: If the mfw_td_set_alarm() function fails, display the 
+//	Solution: If the mfw_td_set_alarm() function fails, display the
 //	'Write Failed" message.
 
 		//Could not write the alarm details to FFS.
@@ -958,7 +958,7 @@
 
 /*******************************************************************************
 
- $Function:		tida_edit_create  
+ $Function:		tida_edit_create
 
  $Description:	Creates an editor with the supplied properties
 
@@ -969,7 +969,7 @@
  				TitleId		- The title of the editor
  				buffer		- The text buffer
  				formatString  - The formatting that governs the input
- 
+
 *******************************************************************************/
 
 T_MFW_HND tida_edit_create(T_MFW_HND parent, USHORT Identifier, USHORT TitleId, char *buffer, char *formatString)
@@ -988,7 +988,7 @@
 
 /*******************************************************************************
 
- $Function:		tida_edit_cb  
+ $Function:		tida_edit_cb
 
  $Description:	Callback function for editor
 
@@ -997,7 +997,7 @@
  $Arguments:	win			- The main time/date window
  				Identifier	- ID used in callback to identify type of editor
  				value		- What prompted the callback
- 
+
 *******************************************************************************/
 
 void tida_edit_cb(T_MFW_HND win, USHORT Identifier, SHORT value)
@@ -1010,10 +1010,10 @@
 
 	T_MFW_TIME* currclock;      /*SPR 2639*/    //, *tempclock;   // RAVI
 	T_MFW_DATE* currdate;
-	
-
-	
-	
+
+
+
+
 	switch(value)
 	{
 		/* Terminate editor */
@@ -1077,22 +1077,22 @@
 						// change by Sasken ( Rashmi C N  and Deepa M D) on April 07th 2004
 						// Bug : In 12 hour fomrat the AM and PM was not being set
 						// Solution : Setting the PM flag of the rtc.
-						
+
 						if(pmFlag=='p')
-						{							
-							currclock->PM_flag=1; 
+						{
+							currclock->PM_flag=1;
 						}
 						else
 						{
-							currclock->PM_flag=0; 
+							currclock->PM_flag=0;
 						}
-						
+
 						// Issue Number : MMI-SPR-12159 on 07/04/04 by Rashmi C N and Deepa M D
 						// change by Sasken ( Rashmi C N  and Deepa M D) on April 07th 2004
 						// Bug : The AM PM for 12 hour fomrat was not being shown, Also there were some bugs with the 12 hour fomat
-						// Solution : The following line was commented, to take the time format from the rtc instead of 
+						// Solution : The following line was commented, to take the time format from the rtc instead of
 						//setting it to 24 hour format
-					
+
 						//currclock->format = MFW_TIME_FORMAT_24HOUR;
 						mfw_td_set_time(currclock);/*SPR 2639*/
 						mfw_td_set_time_format(current_format);
@@ -1113,7 +1113,7 @@
 						alarmDate.year = (USHORT)year;
 						AUI_edit_Destroy(data->edit_win);
 						SEND_EVENT(data->win, TIDA_ALARMTIME, 0, 0);/*SPR2639*/
-						
+
 					}
 					else
 					{
@@ -1123,7 +1123,7 @@
 
 				case TIDA_ALARMTIME:
 					if (tida_check_time(data->buffer))
-					{ 	
+					{
 						// xnkulkar SPR-25756: Alarm setting not allowed
 						// get the current time and format and set the time format flag acordingly
 						currclock = mfw_td_get_time();
@@ -1137,25 +1137,25 @@
 						alarmTime.minute = (UBYTE)minute;
 						alarmTime.second = 0;
 						alarmTime.format =  currclock->format;
-					
+
 						// xnkulkar SPR-25756: Alarm setting not allowed
-						// Depending on the current time format (12/24 Hour), 
+						// Depending on the current time format (12/24 Hour),
 						// set the PM_flag.
 						if(pmFlag=='p')
-						{							
-							alarmTime.PM_flag=1; 
+						{
+							alarmTime.PM_flag=1;
 						}
 						else
 						{
-							alarmTime.PM_flag=0; 
+							alarmTime.PM_flag=0;
 						}
 						// Now that we have the required info, set the alarm
-						
+
 						//	Jan 06,2004 REF: CRR 27859 xkundadu
 						//	Description:  Clock: Alarm does not go off even if timer times out.
-						//	Solution: If the mfw_td_set_alarm() function fails, display the 
+						//	Solution: If the mfw_td_set_alarm() function fails, display the
 						//	'Write Failed" message.
-			
+
 						if(mfw_td_set_alarm(&alarmTime, &alarmDate) == MfwResOk)
 						{
 
@@ -1220,7 +1220,7 @@
  $Returns:		TRUE if it's valid, FALSE otherwise
 
  $Arguments:	datestring	- The date string
- 
+
 *******************************************************************************/
 
 UBYTE tida_check_date(char *datestring)
@@ -1235,18 +1235,18 @@
 	TRACE_EVENT_P3("Day: %d, Month: %d, Year: %d", day, month, year);
 
 	/* Check for quick fails... */
-	
+
 	//Apr 18, 2006    REF:OMAPS00075303 Prabakar R (a0393213)
     //Description: The valid date field is 01/01/2000 to 31/12/2099, when input invalid date it will indicate "saved" but
     //return to Idle screen, the date is not the input date. (for example: input the date "01/01/2110" then saved,
     //it will indicate "saved", but the date in Idle is "01/01/2010" instead.)
     //Solution   : Validation for the date was wrong. Upperbound was not included. It is included.
-    
+
 	if (year<2000 || year>2099 || day<1 || day>31 || month<1 || month>12)
 		return FALSE;
 
 	/* Check 'day' */
-	
+
 	switch(month)
 	{
 		case 4: /* Apr */
@@ -1256,7 +1256,7 @@
 			if (day>30)
 				return FALSE;
 			break;
-			
+
 		case 2: /* Feb */
 			/* Leap year... */
 			if ((year%4==0) && (year%400!=0))
@@ -1271,7 +1271,7 @@
 			}
 			break;
 	}
-	
+
 	return TRUE;
 }
 
@@ -1279,13 +1279,13 @@
 /*******************************************************************************
 
  $Function:  	tida_check_time
- 
+
  $Description:	Checks a time to see if it's valid
 
  $Returns:		TRUE if it's valid, FALSE otherwise
 
  $Arguments:	timestring	- The time string
- 
+
 *******************************************************************************/
 
 UBYTE tida_check_time(char *timestring)
@@ -1308,14 +1308,14 @@
 
 	// Issue Number : OMAPS00073057 on 04/04/06 by Prabakar R
 	// Bug          : When the time format is 12hr, user can not set current time to be 12 hour.
-	//                After user set the current time to be 12 hour and return the idle screen, 
+	//                After user set the current time to be 12 hour and return the idle screen,
 	//                the current time isn't 12 hour
 	// Solution     : Validation for 12 hour format was wrong. Corrected.
 	if (((getClockFormat() == MFW_TIME_FORMAT_24HOUR) && (hour<0 || hour>23 || minute<0 || minute>59))
 	     ||((getClockFormat()== MFW_TIME_FORMAT_12HOUR) && (hour<1 || hour>12 || minute<0 || minute>59 || ( ampmFlag!='p' && ampmFlag!='a')))
 	   )
 		return FALSE;
-		
+
 	return TRUE;
 }
 
@@ -1325,14 +1325,14 @@
 
 /*******************************************************************************
 
- $Function:  date_time_create  
+ $Function:  date_time_create
 
  $Description:	create main dialog for time and date (SINGLE_DYNAMIC)
 
  $Returns:		none.
 
- $Arguments:	
- 
+ $Arguments:
+
 *******************************************************************************/
 T_MFW_HND date_time_create (T_MFW_HND parent_window)
 {
@@ -1340,7 +1340,7 @@
 
   T_tida * data = (T_tida *)ALLOC_MEMORY (sizeof (T_tida));
   data->tida_win = win_create (parent_window, 0, MfwWinVisible, (T_MFW_CB)tida_win_cb);
-   
+
    TRACE_FUNCTION("MmiTimeDate:date_time_create");
 
   if (data->tida_win EQ 0)
@@ -1354,7 +1354,7 @@
   data->parent_win = parent_window;
   win                         = ((T_MFW_HDR *)data->tida_win)->data;
   win->user                   = (void *) data;
- 
+
 
   /*
    * return window handle
@@ -1363,19 +1363,19 @@
 	mfwSetSignallingMethod(1);
 	winShow(data->tida_win);
 
-	
+
   return data->tida_win;
 }
 /*******************************************************************************
 
- $Function:  date_time_destroy  
+ $Function:  date_time_destroy
 
  $Description:	 destroy main dialog for time and date
 
  $Returns:		none.
 
- $Arguments:	
- 
+ $Arguments:
+
 *******************************************************************************/
 void date_time_destroy  (T_MFW_HND own_window)
 {
@@ -1397,14 +1397,14 @@
 }
 /*******************************************************************************
 
- $Function:  date_time_edt_create  
+ $Function:  date_time_edt_create
 
  $Description:	 create editor dialog for time and date(SINGLE_DYNAMIC)
 
  $Returns:		none.
 
- $Arguments:	
- 
+ $Arguments:
+
 *******************************************************************************/
 T_MFW_HND date_time_edt_create(T_MFW_HND parent_window)
 {
@@ -1443,14 +1443,14 @@
 }
 /*******************************************************************************
 
- $Function:  date_time_edt_destroy  
+ $Function:  date_time_edt_destroy
 
  $Description:	destroy editor dialog for time and date
 
  $Returns:		none.
 
- $Arguments:	
- 
+ $Arguments:
+
 *******************************************************************************/
 void date_time_edt_destroy  (T_MFW_HND own_window)
 {
@@ -1474,14 +1474,14 @@
 }
 /*******************************************************************************
 
- $Function:  tida_main  
+ $Function:  tida_main
 
  $Description:	 main dialog function for time and date
 
  $Returns:		none.
 
- $Arguments:	
- 
+ $Arguments:
+
 *******************************************************************************/
 static void tida_main(T_MFW_HND win, USHORT event, SHORT value, void * parameter)
 {
@@ -1547,14 +1547,14 @@
 }
 /*******************************************************************************
 
- $Function:  tida_info_cb  
+ $Function:  tida_info_cb
 
  $Description:	 callback function from info dialog for time and date
 
  $Returns:		none.
 
- $Arguments:	
- 
+ $Arguments:
+
 *******************************************************************************/
 void tida_info_cb(T_MFW_HND win, USHORT identifier, UBYTE reasons)
 {
@@ -1575,14 +1575,14 @@
 
 /*******************************************************************************
 
- $Function:  tida_win_cb  
+ $Function:  tida_win_cb
 
  $Description:	 windows main callback function for time and date
 
  $Returns:		none.
 
- $Arguments:	
- 
+ $Arguments:
+
 *******************************************************************************/
 static int tida_win_cb (T_MFW_EVENT event, T_MFW_WIN * win)
 {
@@ -1599,14 +1599,14 @@
 }
 /*******************************************************************************
 
- $Function:  tida_edt_win_cb  
+ $Function:  tida_edt_win_cb
 
  $Description:	 windows callback function for editor for time and date
 
  $Returns:		none.
 
- $Arguments:	
- 
+ $Arguments:
+
 *******************************************************************************/
 static int tida_edt_win_cb  (T_MFW_EVENT event,T_MFW_WIN * win)
 {
@@ -1620,11 +1620,11 @@
   	T_MFW_TIME* currclock; /*SPR 2639*/
 	T_MFW_DATE* currdate;
 	//T_MFW_TIME alarmTime; /*SPR 2639*/
-	
+
 
 	currclock = mfw_td_get_time(&currclock);/*SPR 2639*/
 	currdate = mfw_td_get_date(&currdate);
-	
+
 
   TRACE_FUNCTION ("MmiTimeDate:tida_edt_win_cb");
 
@@ -1645,7 +1645,7 @@
 		}
 		else
 			sprintf(lin1,"%02d/%02d/%04d",alarmDate.day,alarmDate.month,alarmDate.year);
-			
+
 		strncpy(edt_data->edtbuf1,lin1,MAX_LEN_DATE);
 		edtShow(edt_data->editor_handle);
 	}
@@ -1658,7 +1658,7 @@
 				sprintf(lin1,"%02d/%02d/%04d",currdate->day,currdate->month,currdate->year);
 		}
 		else
-		{	
+		{
 			sprintf(lin1,"%02d/%02d/%04d",alarmDate.day,alarmDate.month,alarmDate.year);
 		}
 		strncpy(edt_data->edtbuf1,lin1,MAX_LEN_DATE);
@@ -1688,18 +1688,18 @@
     return 1;
   }
   return 0;
-  
+
 }
 /*******************************************************************************
 
- $Function:  tida_editor  
+ $Function:  tida_editor
 
  $Description:	 dialog function for editor for time and date
 
  $Returns:		none.
 
- $Arguments:	
- 
+ $Arguments:
+
 *******************************************************************************/
 static void tida_editor(T_MFW_HND win, USHORT event, SHORT value, void * parameter)
 {
@@ -1734,14 +1734,14 @@
 }
 /*******************************************************************************
 
- $Function:  tida_edt_kbd_cb  
+ $Function:  tida_edt_kbd_cb
 
  $Description:	 keyboard event handler for time and date
 
  $Returns:		none.
 
- $Arguments:	
- 
+ $Arguments:
+
 *******************************************************************************/
 static int tida_edt_kbd_cb (MfwEvt e, MfwKbd *kc)
 {
@@ -1758,7 +1758,7 @@
    char lin2[MAX_LEN_TIME];
 	T_MFW_TIME* currclock; /*SPR 2639*/
 	currclock = mfw_td_get_time();/*SPR 2639*/
-	
+
    TRACE_FUNCTION ("MmiTimeDate: tida_edt_kbd_cb");
 
 		switch(kc->code)
@@ -1943,14 +1943,14 @@
 
 /*******************************************************************************
 
- $Function:  check_date  
+ $Function:  check_date
 
  $Description:	 check date after date entering
 
  $Returns:		none.
 
- $Arguments:	
- 
+ $Arguments:
+
 *******************************************************************************/
 static int check_date (T_MFW_HND win, void * edt_dat)
 {
@@ -1968,11 +1968,11 @@
  	T_MFW_TIME* currclock; /*SPR 2639*/
 	T_MFW_DATE* currdate;
 	//T_MFW_TIME alarmTime; /*SPR 2639*/
-	
+
 
 	 currclock= mfw_td_get_time();/*SPR 2639*/
 	currdate =mfw_td_get_date();
-	
+
     TRACE_FUNCTION ("MmiTimeDate:check_date");
 
 	memset(internday, '\0', sizeof(internday));/* initial string  */
@@ -2026,14 +2026,14 @@
 		if(!(tempdate.year%4) || (tempdate.year EQ 2000))
         {
 			if(DateTimeEntryMode == ALARM)
-			{			
+			{
 				alarmDate.day = tempdate.day;
 				alarmDate.month = tempdate.month;
 				alarmDate.year = tempdate.year;
 			}
 			else
-			{	
-			
+			{
+
 				currdate->day = tempdate.day;
 				currdate->month = tempdate.month;
 				currdate->year = tempdate.year;
@@ -2048,15 +2048,15 @@
 	{
 		if(DateTimeEntryMode == ALARM)
 		{
-			
-						
+
+
 			alarmDate.day = tempdate.day;
 			alarmDate.month = tempdate.month;
 			alarmDate.year = tempdate.year;
-			
+
 		}
 		else
-		{					
+		{
 			currdate->day = tempdate.day;
 			currdate->month = tempdate.month;
 			currdate->year = tempdate.year;
@@ -2067,14 +2067,14 @@
 }
 /*******************************************************************************
 
- $Function:  check_time  
+ $Function:  check_time
 
  $Description:	check time after time entering
 
  $Returns:		none.
 
- $Arguments:	
- 
+ $Arguments:
+
 *******************************************************************************/
 static int check_time (T_MFW_HND win, void * edt_dat)
 {
@@ -2089,10 +2089,10 @@
 	T_MFW_DATE* currdate;
 	T_MFW_TIME_FORMAT current_format;
 	//T_MFW_TIME alarmTime; /*SPR 2639*/
-	
+
 	currclock = mfw_td_get_time();/*SPR 2639*/
 	currdate = mfw_td_get_date();
-	
+
 	current_format = currclock->format;
 	memset(internmin, '\0', sizeof(internmin));/* initial string  */
 	memset(internhour, '\0', sizeof(internhour));
@@ -2110,35 +2110,35 @@
 	if(tempclock.minute >59)
 		return FALSE;
 	if (DateTimeEntryMode == ALARM)
-	{	
+	{
 		alarmTime.hour = tempclock.hour;		/*SPR 2639*/
 		alarmTime.minute = tempclock.minute;
 		alarmTime.format = MFW_TIME_FORMAT_24HOUR;
 		mfw_td_set_alarm(&alarmTime, &alarmDate);
 	}
 	else
-	{	
-		
-	
+	{
+
+
 		currclock->hour = tempclock.hour;
 		currclock->minute = tempclock.minute;
 		currclock->format = MFW_TIME_FORMAT_24HOUR;
 		mfw_td_set_time(currclock);/*SPR 2639*/
 		mfw_td_set_time_format(current_format);
 	}
-	
+
 	return TRUE;
 }
 /*******************************************************************************
 
- $Function:  tida_edt_tim_out_cb  
+ $Function:  tida_edt_tim_out_cb
 
  $Description:	 Callback function for timer for time and date
 
  $Returns:		none.
 
- $Arguments:	
- 
+ $Arguments:
+
 *******************************************************************************/
 static void tida_edt_tim_out_cb(T_MFW_EVENT event,T_MFW_TIM * t)
 {
@@ -2156,14 +2156,14 @@
 }
 /*******************************************************************************
 
- $Function:  tida_edt_kbd_long_cb  
+ $Function:  tida_edt_kbd_long_cb
 
  $Description:	 keyboard long event handler for time and date
 
  $Returns:		none.
 
- $Arguments:	
- 
+ $Arguments:
+
 *******************************************************************************/
 static int tida_edt_kbd_long_cb (MfwEvt e, MfwKbd *kc)
 {