changeset 180:6b5d787d9ade

mmiTimers.c: formatting fixes
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 19 Jan 2021 04:34:50 +0000
parents d0a2eaf41733
children 8f6e2ae69a6b
files src/ui/bmi/mmiTimers.c
diffstat 1 files changed, 43 insertions(+), 66 deletions(-) [+]
line wrap: on
line diff
--- a/src/ui/bmi/mmiTimers.c	Tue Jan 19 04:26:17 2021 +0000
+++ b/src/ui/bmi/mmiTimers.c	Tue Jan 19 04:34:50 2021 +0000
@@ -11,12 +11,12 @@
 
  $Project name: Basic MMI
  $Project code: BMI (6349)
- $Module:   MMI
- $File:       MmiTimers.c
- $Revision:   1.0
+ $Module:       MMI
+ $File:         MmiTimers.c
+ $Revision:     1.0
 
- $Author:   Condat(UK)
- $Date:       22/02/01
+ $Author:       Condat(UK)
+ $Date:         22/02/01
 
 ********************************************************************************
 
@@ -161,19 +161,16 @@
 *******************************************************************************/
 void setLastCallDuration(long call_time, T_MFW_CM_CALL_DIR call_direction)
 {
-
-  TRACE_FUNCTION("setLastCallDuration()");
+    TRACE_FUNCTION("setLastCallDuration()");
 
-  FFS_flashData.last_call_duration = call_time;
-
-
+    FFS_flashData.last_call_duration = call_time;
 
     if (call_direction == MFW_CM_MTC)
       setIncomingCallsDuration(call_time);
     if (call_direction == MFW_CM_MOC)
       setOutgoingCallsDuration(call_time);
 
-  return;
+    return;
 }
 
 /*******************************************************************************
@@ -187,29 +184,27 @@
 
 *******************************************************************************/
 int timerLastCall(MfwMnu* m, MfwMnuItem* i)
-{ T_MFW_HND       parent        = mfwParent( mfw_header() );
+{
+    T_MFW_HND       parent        = mfwParent( mfw_header() );
 
     T_DISPLAY_DATA display_info;
 
-
-  memset(timeString,'\0',sizeof(timeString));
+    memset(timeString,'\0',sizeof(timeString));
 
-  timer_type = LAST_CALL;
+    timer_type = LAST_CALL;
 
-  TRACE_FUNCTION("timerLastCall()");
+    TRACE_FUNCTION("timerLastCall()");
     getTimerString((int)getLastCallDuration(), (char*)timeString);
 
-	dlg_initDisplayData_TextStr( &display_info, TxtSoftOK, TxtReset, timeString,  NULL, COLOUR_STATUS_OKRESET);
-	dlg_initDisplayData_events( &display_info, (T_VOID_FUNC) timer_cb, SIX_SECS, KEY_CLEAR|KEY_LEFT|KEY_RIGHT );
+    dlg_initDisplayData_TextStr( &display_info, TxtSoftOK, TxtReset, timeString,  NULL, COLOUR_STATUS_OKRESET);
+    dlg_initDisplayData_events( &display_info, (T_VOID_FUNC) timer_cb, SIX_SECS, KEY_CLEAR|KEY_LEFT|KEY_RIGHT );
 
     /* Call Info Screen
     */
 
     info_dialog( parent, &display_info );
 
-
     return MFW_EVENT_CONSUMED;
-
 }
 
 /*******************************************************************************
@@ -223,25 +218,24 @@
 
 *******************************************************************************/
 int timerIncomingCalls(MfwMnu* m, MfwMnuItem* i)
-{ T_MFW_HND       parent        = mfwParent( mfw_header() );
+{
+    T_MFW_HND       parent        = mfwParent( mfw_header() );
     T_DISPLAY_DATA display_info;
 
     //clear the editor-buffer before
 
     timer_type = INCOMING_CALLS;
-  TRACE_FUNCTION("timerLastCall()");
+    TRACE_FUNCTION("timerLastCall()");
     getTimerString((int)getIncomingCallsDuration(), (char*)timeString);
 
-	dlg_initDisplayData_TextStr( &display_info, TxtSoftOK, TxtReset, timeString,  NULL, COLOUR_STATUS_OKRESET);
-	dlg_initDisplayData_events( &display_info, (T_VOID_FUNC) timer_cb, SIX_SECS, KEY_CLEAR|KEY_LEFT|KEY_RIGHT );
+    dlg_initDisplayData_TextStr( &display_info, TxtSoftOK, TxtReset, timeString,  NULL, COLOUR_STATUS_OKRESET);
+    dlg_initDisplayData_events( &display_info, (T_VOID_FUNC) timer_cb, SIX_SECS, KEY_CLEAR|KEY_LEFT|KEY_RIGHT );
 
     /* Call Info Screen
     */
     info_dialog( parent, &display_info );
 
-
     return MFW_EVENT_CONSUMED;
-
 }
 
 /*******************************************************************************
@@ -255,34 +249,30 @@
 
 *******************************************************************************/
 int timerOutgoingCalls(MfwMnu* m, MfwMnuItem* i)
-{ T_MFW_HND       parent        = mfwParent( mfw_header() );
+{
+    T_MFW_HND       parent        = mfwParent( mfw_header() );
 
     T_DISPLAY_DATA display_info;
 
     //clear the editor-buffer before
-  memset(timeString,'\0',sizeof(timeString));
+    memset(timeString,'\0',sizeof(timeString));
 
-  timer_type = OUTGOING_CALLS;
+    timer_type = OUTGOING_CALLS;
 
-  TRACE_EVENT("timerLastCall()");
+    TRACE_EVENT("timerLastCall()");
     getTimerString((int)getOutgoingCallsDuration(), (char*)timeString);
 
-	dlg_initDisplayData_TextStr( &display_info, TxtSoftOK, TxtReset, timeString,  NULL, COLOUR_STATUS_OKRESET);
-	dlg_initDisplayData_events( &display_info, (T_VOID_FUNC) timer_cb, SIX_SECS, KEY_CLEAR|KEY_LEFT|KEY_RIGHT );
+    dlg_initDisplayData_TextStr( &display_info, TxtSoftOK, TxtReset, timeString,  NULL, COLOUR_STATUS_OKRESET);
+    dlg_initDisplayData_events( &display_info, (T_VOID_FUNC) timer_cb, SIX_SECS, KEY_CLEAR|KEY_LEFT|KEY_RIGHT );
 
     /* Call Info Screen
     */
     info_dialog( parent, &display_info );
 
-
     return MFW_EVENT_CONSUMED;
-
 }
 
 
-
-
-
 /*******************************************************************************
 
  $Function:     timer_cb
@@ -296,11 +286,9 @@
 *******************************************************************************/
 static int timer_cb(T_MFW_HND win, USHORT Identifier, USHORT Reason)
 {
-
   switch (Reason)
   {
     case INFO_KCD_LEFT:
-
     	break;
 
     case INFO_KCD_RIGHT:
@@ -324,7 +312,7 @@
 
 void setIncomingCallsDuration(long call_time)
 {
-  TRACE_FUNCTION("setIncomingCallsDuration()");
+    TRACE_FUNCTION("setIncomingCallsDuration()");
 
     //add call time to existing call time
     call_time = call_time + getIncomingCallsDuration();
@@ -332,7 +320,7 @@
     FFS_flashData.incoming_calls_duration = call_time;
     flash_write();
 
-  return;
+    return;
 }
 
 /*******************************************************************************
@@ -347,17 +335,14 @@
 *******************************************************************************/
 void setOutgoingCallsDuration(long call_time)
 {
-
-  TRACE_FUNCTION("setOutgoingCallsDuration()");
-  //add call time to current total
+    TRACE_FUNCTION("setOutgoingCallsDuration()");
+    //add call time to current total
     call_time = call_time + getOutgoingCallsDuration();
     FFS_flashData.outgoing_calls_duration = call_time;
     //write to flash
     flash_write();
 
-
-  return;
-
+    return;
 }
 
 
@@ -373,11 +358,10 @@
 *******************************************************************************/
 void reset_timer_OK(T_MFW_HND parent, UBYTE identifier)
 {
-  T_DISPLAY_DATA display_info;
-
+    T_DISPLAY_DATA display_info;
 
-	dlg_initDisplayData_TextId( &display_info, TxtSoftOK, TxtCancel, TxtPressOk, TxtReset, COLOUR_STATUS);
-	dlg_initDisplayData_events( &display_info, (T_VOID_FUNC) timer_reset_OK_cb, FOUR_SECS, KEY_CLEAR|KEY_LEFT|KEY_RIGHT );
+    dlg_initDisplayData_TextId( &display_info, TxtSoftOK, TxtCancel, TxtPressOk, TxtReset, COLOUR_STATUS);
+    dlg_initDisplayData_events( &display_info, (T_VOID_FUNC) timer_reset_OK_cb, FOUR_SECS, KEY_CLEAR|KEY_LEFT|KEY_RIGHT );
     display_info.Identifier = identifier;
 
     info_dialog( parent, &display_info );
@@ -445,10 +429,10 @@
 *******************************************************************************/
 void reset_timer(T_MFW_HND parent)
 {
-  T_DISPLAY_DATA display_info;
+    T_DISPLAY_DATA display_info;
 
-	dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, TxtTimerReset, TxtNull, COLOUR_STATUS);
-	dlg_initDisplayData_events( &display_info, (T_VOID_FUNC) NULL, THREE_SECS, KEY_CLEAR|KEY_LEFT|KEY_RIGHT );
+    dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, TxtTimerReset, TxtNull, COLOUR_STATUS);
+    dlg_initDisplayData_events( &display_info, (T_VOID_FUNC) NULL, THREE_SECS, KEY_CLEAR|KEY_LEFT|KEY_RIGHT );
 
     info_dialog( parent, &display_info );
 }
@@ -463,13 +447,12 @@
  $Arguments:  none
 
 *******************************************************************************/
- void resetIncomingCallsDuration( void )
+void resetIncomingCallsDuration( void )
 {
   TRACE_FUNCTION("resetIncomingCallsDuration()");
   FFS_flashData.incoming_calls_duration =0;
   flash_write();
-
- }
+}
 
 
 /*******************************************************************************
@@ -482,15 +465,14 @@
  $Arguments:  none
 
 *******************************************************************************/
-  void resetOutgoingCallsDuration( void )
+void resetOutgoingCallsDuration( void )
 {
-
-  TRACE_FUNCTION("resetOutgoingCallsDuration()");
+    TRACE_FUNCTION("resetOutgoingCallsDuration()");
 
     FFS_flashData.outgoing_calls_duration = 0;
     flash_write();
 
-  return;
+    return;
 }
 
 /*******************************************************************************
@@ -505,7 +487,6 @@
 *******************************************************************************/
 unsigned long getLastCallDuration()
 {
-
     return FFS_flashData.last_call_duration; /* x0039928 - Lint warning fix */
 }
 
@@ -521,7 +502,6 @@
 *******************************************************************************/
 unsigned long getIncomingCallsDuration()
 {
-
     return FFS_flashData.incoming_calls_duration;
 }
 
@@ -537,7 +517,6 @@
 *******************************************************************************/
 unsigned long getOutgoingCallsDuration()
 {
-
     return FFS_flashData.outgoing_calls_duration;
 }
 
@@ -565,6 +544,4 @@
   if (hour > 999999)
     hour = 999999;
   sprintf(timeString,"%02d:%02d:%02d",hour,min,sec);
-
 }
-