diff src/ui/bmi/mmiEm.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 24ea5d2ad89b
line wrap: on
line diff
--- a/src/ui/bmi/mmiEm.c	Sun Nov 08 05:12:05 2020 +0000
+++ b/src/ui/bmi/mmiEm.c	Sun Nov 08 06:39:16 2020 +0000
@@ -2,28 +2,28 @@
 
 					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:		    MmiEm.c
- $Revision:		1.0                                                       
-                                                                              
- $Author:		Condat(UK)                                                         
- $Date:		    23/09/02                                                      
-                                                                               
+ $Revision:		1.0
+
+ $Author:		Condat(UK)
+ $Date:		    23/09/02
+
 ********************************************************************************
-                                                                              
+
  Description:
 
     MMI engineering mode handling
-                        
+
 ********************************************************************************
  $History: MmiEm.c
 
@@ -33,17 +33,17 @@
     requirements.
 
 
-	23/09/02			Original Condat(UK) BMI version.	
-	   
+	23/09/02			Original Condat(UK) BMI version.
+
  $End
 
 
 
 
 *******************************************************************************
-                                                                              
+
                                 Include Files
-                                                                              
+
 *******************************************************************************/
 #define ENTITY_MFW
 
@@ -125,7 +125,7 @@
 
 #ifdef NEPTUNE_BOARD
 #include "ffs.h"
-#endif 
+#endif
 
 #define EM_UPDATE_RATE 1000
 
@@ -147,7 +147,7 @@
 EXTERN unsigned long *picture_col;
 EXTERN UBYTE RssiVal;
 
-int EmRequest = NULL; 
+int EmRequest = NULL;
 #endif
 
 /*
@@ -190,7 +190,7 @@
 void Mmi_em_destroy(T_MFW_HND own_window); //Deallocate window data and delete window.
 int Mmi_em_kbd_cb(T_MFW_EVENT event,T_MFW_KBD *  kc ); //Handles key presses in the display window
 int Mmi_em_win_cb(T_MFW_EVENT event,T_MFW_WIN * win );// Handles the information display.
-void Mmi_em_tim_cb(T_MFW_EVENT event,T_MFW_TIM * t); //Handles the timer events.  
+void Mmi_em_tim_cb(T_MFW_EVENT event,T_MFW_TIM * t); //Handles the timer events.
 
 
 
@@ -205,11 +205,11 @@
  $Function:    	mmi_em_init()
 
  $Description:	initialise Engineering Mode module
- 
+
  $Returns:		None
 
  $Arguments:	None
- 
+
 *******************************************************************************/
 void mmi_em_init(void)
 {
@@ -222,11 +222,11 @@
  $Function:    	mmi_em_enit()
 
  $Description:	exit Engineering Mode module
- 
+
  $Returns:		None
 
  $Arguments:	None
- 
+
 *******************************************************************************/
 void mmi_em_exit(void)
 {
@@ -240,14 +240,14 @@
  $Function:    	mmi_em_start_eng_mode_menus()
 
  $Description:	starts the emergency mode menu
- 
+
  $Returns:		None
 
  $Arguments:	parent window
- 
+
 *******************************************************************************/
 void mmi_em_start_eng_mode_menus(T_MFW_HND parent)
-{	
+{
 	TRACE_EVENT("mmi_em_start_eng_mode_menus");
 	bookMenuStart(parent, EngModeAttributes(), NULL);
 
@@ -261,11 +261,11 @@
  $Function:    	Mmi_em_display_mobile_info_data()
 
  $Description:	Called from menu; begins process to display Mobile Information
- 
+
  $Returns:		status integer
 
  $Arguments:	menu and item (not used)
- 
+
 *******************************************************************************/
 
 
@@ -274,7 +274,7 @@
 	TRACE_EVENT_P1("Mmi_em_display_mobile_info(), parent win %d", parent);
 	TRACE_EVENT_P1("Memory left:%d", mfwCheckMemoryLeft());
 	Mmi_em_create(parent, EM_MOBILE_INFO);
-	
+
 	return MFW_EVENT_CONSUMED;
 }
 /*******************************************************************************
@@ -282,18 +282,18 @@
  $Function:    	Mmi_em_display_serving_cell_params()
 
  $Description:	Called from menu; begins process to display Serving Cell parameters
- 
+
  $Returns:		status integer
 
  $Arguments:	menu and item (not used)
- 
+
 *******************************************************************************/
 
 int Mmi_em_display_serving_cell_params(MfwMnu* m, MfwMnuItem* i)
 {	T_MFW_HND		parent	     = mfwParent( mfw_header());
 	TRACE_EVENT_P1("MMiEm, Memory left:%d", mfwCheckMemoryLeft());
 	Mmi_em_create(parent, EM_SERVING_CELL_PARAMS);
-	
+
 	return MFW_EVENT_CONSUMED;
 }
 /*******************************************************************************
@@ -301,17 +301,17 @@
  $Function:    	Mmi_em_display_neighbour_cell_params()
 
  $Description:	Called from menu; begins process to display Neighbouring Cell parameters
- 
+
  $Returns:		status integer
 
  $Arguments:	menu and item (not used)
- 
-*******************************************************************************/ 
+
+*******************************************************************************/
 int Mmi_em_display_neighbour_cell_params(MfwMnu* m, MfwMnuItem* i)
 {	T_MFW_HND		parent	     = mfwParent( mfw_header());
 	TRACE_EVENT_P1("MMiEm, Memory left:%d", mfwCheckMemoryLeft());
 	Mmi_em_create(parent, EM_NEIGHBOURING_CELL_PARAMS);
-	
+
 	return MFW_EVENT_CONSUMED;
 }
 
@@ -320,17 +320,17 @@
  $Function:    	Mmi_em_display_location_params()
 
  $Description:	Called from menu; begins process to display Locationparameters
- 
+
  $Returns:		status integer
 
  $Arguments:	menu and item (not used)
- 
-*******************************************************************************/ 
+
+*******************************************************************************/
 int Mmi_em_display_location_params(MfwMnu* m, MfwMnuItem*i )
 {	T_MFW_HND		parent	     = mfwParent( mfw_header());
 
 	Mmi_em_create(parent, EM_LOCATION_PARAMS);
-	
+
 	return MFW_EVENT_CONSUMED;
 }
 
@@ -340,17 +340,17 @@
 
  $Description:	Called from menu; begins process to display Ciphering, hopping and
  discontinuous transmission parameters
- 
+
  $Returns:		status integer
 
  $Arguments:	menu and item (not used)
- 
+
 *******************************************************************************/
 int Mmi_em_display_ciph_hop_DTX_params(MfwMnu* m, MfwMnuItem* i)
 {	T_MFW_HND		parent	     = mfwParent( mfw_header());
 	TRACE_EVENT_P1("MMiEm, Memory left:%d", mfwCheckMemoryLeft());
 	Mmi_em_create(parent, EM_CIPH_HOP_DTX_PARAMS);
-	
+
 	return MFW_EVENT_CONSUMED;
 }
 
@@ -359,18 +359,18 @@
  $Function:    	Mmi_em_display_GPRS_params()
 
  $Description:	Called from menu; begins process to display GPRS specific parameters
- 
+
  $Returns:		status integer
 
  $Arguments:	menu and item (not used)
- 
+
 *******************************************************************************/
 
 int Mmi_em_display_GPRS_params(MfwMnu* m, MfwMnuItem* i)
 {	T_MFW_HND		parent	     = mfwParent( mfw_header());
 	TRACE_EVENT_P1("MMiEm, Memory left:%d", mfwCheckMemoryLeft());
 	Mmi_em_create(parent, EM_GPRS_PARAMS);
-	
+
 	return MFW_EVENT_CONSUMED;
 }
 
@@ -383,7 +383,7 @@
     TRACE_EVENT_P1("Memory left:%d", mfwCheckMemoryLeft());
 
     TRACE_EVENT_P1("Selected item: %d", m->lCursor[m->level]);
-    
+
     Mmi_em_create(parent, m->lCursor[m->level]);
 
     if(!EmRequest)
@@ -392,7 +392,7 @@
         sAT_PercentEINFO(CMD_SRC_LCL,TIMER_ONE_SEC);
     }
     EmRequest = SAT_REQUEST_SENT;
-    
+
     return MFW_EVENT_CONSUMED;
 }
 
@@ -407,11 +407,11 @@
  $Function:    	Mmi_em_create()
 
  $Description:	Creates emergency mode display window
- 
+
  $Returns:		window handle
 
  $Arguments:	parent window, kind of data to be displayed
- 
+
 *******************************************************************************/
 
 T_MFW_HND Mmi_em_create(T_MFW_HND parent_window, MfwEmDataType data_type)
@@ -483,15 +483,15 @@
 
  $Function:    	Mmi_em_event_cb()
 
- $Description:	Handles events coming from the MFW 
- 
+ $Description:	Handles events coming from the MFW
+
  $Returns:		status integer
 
  $Arguments:	event type, pointer to data
- 
+
 *******************************************************************************/
 int Mmi_em_event_cb(T_MFW_EVENT event,void* para)
-{ 
+{
     T_MFW_HND       win  = mfw_parent (mfw_header());
     T_MFW_WIN     * win_data = ((T_MFW_HDR *)win)->data;
     tEmData * data = (tEmData *)win_data->user;
@@ -511,10 +511,10 @@
 #endif
 
     char *temp_buffer=NULL;
-    
+
 #ifdef NEW_EDITOR
     T_ATB_TEXT temp_text;/*SPR 1757*/
-#endif 
+#endif
     TRACE_EVENT_P1("Mmi_em_event_cb(), event:%d", event);
     temp_buffer=(char*)malloc(EM_EDITOR_SIZE*2*sizeof(char)); /*a0393213 lint warnings removal - dynamically allocated*/
     if(temp_buffer==NULL)
@@ -537,8 +537,8 @@
 
     sprintf(timeAndDate, "%s  %s\n", mfw_td_get_clock_str(), mfw_td_get_date_str());
     ffs_write(fd, timeAndDate, strlen(timeAndDate));
-                
-#endif                
+
+#endif
 
 
     /*if event matches current window type*/
@@ -547,13 +547,13 @@
         switch (event)
         {
 #ifndef NEPTUNE_BOARD         /*EngMode */
-        
+
             case EM_MOBILE_INFO:
             {
                             mob_info = (MFW_EM_Mobile_Info*)para;/*cast parameter to appropriate type*/
                             /*copy data to editor buffer*/
-                            /*MC, SPR 1554 Added all SW versions to editor string*/ 
-                            sprintf(temp_buffer, "SIM_VERSION:%s CC_VERSION:%s SS_VERSION:%s SMS_VERSION:%s MM_VERSION:%s RR_VERSION:%s DL_VERSION:%s ALR_VERSION:%s  IMEI:%s IMSI:%s TMSI:%u", 
+                            /*MC, SPR 1554 Added all SW versions to editor string*/
+                            sprintf(temp_buffer, "SIM_VERSION:%s CC_VERSION:%s SS_VERSION:%s SMS_VERSION:%s MM_VERSION:%s RR_VERSION:%s DL_VERSION:%s ALR_VERSION:%s  IMEI:%s IMSI:%s TMSI:%u",
                             mob_info->SIM_version, mob_info->CC_version,  mob_info->SS_version,
                             mob_info->SMS_version, mob_info->MM_version, mob_info->RR_version,
                             mob_info->DL_version, mob_info->ALR_version,mob_info->IMEI, mob_info->IMSI,
@@ -576,17 +576,17 @@
 			}
 			break;
 #endif
-            
+
 			case EM_SERVING_CELL_PARAMS:
 			{
-#ifndef NEPTUNE_BOARD                
+#ifndef NEPTUNE_BOARD
 				sc_info = (MFW_EM_Serving_Cell_Parameters*)para;/*cast parameter to appropriate type*/
 				sprintf(temp_buffer, "ARFCN:%d RSSI:%d RXQ:%d RLT:%d C1:%d C2:%d LAC:%d BSIC:%d TAV:%d",\
           sc_info->arfcn, sc_info->RSSI, sc_info->RXQ, sc_info->RLT, sc_info->C1, sc_info->C2,\
           sc_info->LAC, sc_info->BSIC, sc_info->TAV);
 #else
             sprintf (temp_buffer, "AFRCN = %u   Cell ID = %u \nMCC<>: = %u    %u    %u\nMNC<>: %u    %u    %u\nLAC<> = %u    %u\nRAC = %u\nMultiframe period = %u \nTMSI<> = %u   %u   %u   %u \nMax retransmission = %u  \nCall re establishment status flag = %u \nMax o/p pw on common control channel = %u \nMinimum signal level for access = %u",
-                Eng_Info_Req->info_rr.gsm_info.gsm_info_idle.pccch_info.pccch_channel.gsm_channel_static.arfcn, 
+                Eng_Info_Req->info_rr.gsm_info.gsm_info_idle.pccch_info.pccch_channel.gsm_channel_static.arfcn,
                 Eng_Info_Req->info_rr.gsm_info.gsm_info_idle.gsm_cell_id,
                 Eng_Info_Static_Req->info_mm.mm_cmd_info.user_selected_plmn.mcc[0],
                 Eng_Info_Static_Req->info_mm.mm_cmd_info.user_selected_plmn.mcc[1],
@@ -612,7 +612,7 @@
                 ffs_write(fd, temp_buffer, strlen(temp_buffer));
 
 #endif
-    
+
 	/* SPR#1428 - SH - New Editor - string has changed, update word wrap */
 #ifdef NEW_EDITOR
 				/*SPR 1757 Insert temp buffer into editor*/
@@ -630,10 +630,10 @@
 				win_show(data->win);
 			}
 			break;
-            
-			case EM_NEIGHBOURING_CELL_PARAMS:	
+
+			case EM_NEIGHBOURING_CELL_PARAMS:
 			{
-#ifndef NEPTUNE_BOARD                
+#ifndef NEPTUNE_BOARD
                     nc_info = (MFW_EM_Neighbour_Cell_Parameters*)para;/*cast parameter to appropriate type*/
 				/*copy data to editor buffer*/
 				sprintf(temp_buffer, "NUM:%d\nARFCN:RSSI:C2:LAC:BSIC\n %5d%5d%5d%6d%5d\n %5d%5d%5d%6d%5d\n %5d%5d%5d%6d%5d\n %5d%5d%5d%6d%5d\n %5d%5d%5d%6d%5d\n %5d%5d%5d%6d%5d\n SC%4d%5d%5d%6d%5d",\
@@ -653,7 +653,7 @@
                 sprintf (temp_buffer, "NEIGHBOURING CELL\nNUM : %d\nBCCH <>  %d  \nBSIC <>  %d  %d  %d  %d  %d  %d \nRXLEV <>  %d  %d  %d  %d  %d  %d\nC1 <>  %d  %d  %d  %d  %d  %d\nC2 <>  %d  %d  %d  %d  %d  %d\nC31 <>  %d  %d  %d  %d  %d  %d\nC32 <>  %d  %d  %d  %d  %d  %d\nARFCN <>  %d  %d  %d  %d  %d  %d\nFRAME OFFSET <>  %d  %d  %d  %d  %d  %d\nTIME ALIGN <>  %d  %d  %d  %d  %d  %d",
                         Eng_Info_Req->info_rr.c_gsm_bba_cell,
                         Eng_Info_Req->info_rr.gsm_info.gsm_info_active.gsm_info_dedicated.bcch_channel,
-                        
+
 
                         Eng_Info_Req->info_rr.gsm_bba_cell[1].gsm_cell_info.gsm_cell_info_pbcch.bsic_match,
                         Eng_Info_Req->info_rr.gsm_bba_cell[2].gsm_cell_info.gsm_cell_info_pbcch.bsic_match,
@@ -726,17 +726,17 @@
 				ATB_edit_Refresh(data->editor);
 #else /* !NEW_EDITOR */
 				strncpy(data->edtBuffer, temp_buffer, EM_EDITOR_SIZE);/*SPR 1757*/
-#endif			
+#endif
                         win_show(data->win);
 			}
 			break;
 
-#ifndef NEPTUNE_BOARD                
+#ifndef NEPTUNE_BOARD
                     case EM_LOCATION_PARAMS:
 			{
                         loc_info = (MFW_EM_Location_Parameters*)para;/*cast parameter to appropriate type*/
 				/*copy data to editor buffer*/
-				/*MC, SPR 1554 Removed Cell id from editor string*/ 
+				/*MC, SPR 1554 Removed Cell id from editor string*/
 				sprintf(temp_buffer, "LUP:%d MCC:%s MNC:%s LAC:%d ", loc_info->LUP, loc_info->MCC, loc_info->MNC, loc_info->LAC);
 	/* SPR#1428 - SH - New Editor - string has changed, update word wrap */
 #ifdef NEW_EDITOR
@@ -751,18 +751,18 @@
 				ATB_edit_Refresh(data->editor);
 #else /* !NEW_EDITOR */
 				strncpy(data->edtBuffer, temp_buffer, EM_EDITOR_SIZE);/*SPR 1757*/
-#endif	
+#endif
 				/*show the window*/
 				win_show(data->win);
 			}
 			break;
 #endif
 
-#ifndef NEPTUNE_BOARD                
+#ifndef NEPTUNE_BOARD
 			case EM_CIPH_HOP_DTX_PARAMS:
 			{
                             ciph_hop_dtx_info = (MFW_EM_Ciph_hop_DTX_Parameters*)para;/*cast parameter to appropriate type*/
-				/*convert DTX status to string*/ 
+				/*convert DTX status to string*/
 				if (ciph_hop_dtx_info->DTX_status == FALSE)
 					DTX_Status = "Off";
 				else
@@ -789,11 +789,11 @@
 			break;
 #endif
 
-#ifndef NEPTUNE_BOARD                
+#ifndef NEPTUNE_BOARD
 			case EM_GPRS_PARAMS:
 			{
                             gprs_info = (MFW_EM_GPRS_Parameter*)para;//cast parameter to appropriate type
-				/*MC, SPR 1554 Changed ediotr string to show Network Mode of Operation*/ 
+				/*MC, SPR 1554 Changed ediotr string to show Network Mode of Operation*/
 				sprintf(temp_buffer, "NMO:%d  NDTS:%d  RAC:%d  C31:%d  C32:%d",\
           gprs_info->NMO, gprs_info->NDTS, gprs_info->RAC, gprs_info->C31, gprs_info->C32);
 				//show the window
@@ -815,7 +815,7 @@
 			}
 			break;
 #endif
-            
+
 
 #ifdef NEPTUNE_BOARD
             case EM_SERVING_CELL_RF_PARAMS:
@@ -898,7 +898,7 @@
                     );
 
                 ffs_write(fd, "Serving AMR info\n",20 );
-                ffs_write(fd, temp_buffer, strlen(temp_buffer));                
+                ffs_write(fd, temp_buffer, strlen(temp_buffer));
 
                         /* SPR#1428 - SH - New Editor - string has changed, update word wrap */
                 #ifdef NEW_EDITOR
@@ -932,7 +932,7 @@
                         );
 
                     ffs_write(fd, "Serving SNDCP info\n",21 );
-                    ffs_write(fd, temp_buffer, strlen(temp_buffer));                    
+                    ffs_write(fd, temp_buffer, strlen(temp_buffer));
 
                         /* SPR#1428 - SH - New Editor - string has changed, update word wrap */
                 #ifdef NEW_EDITOR
@@ -951,7 +951,7 @@
                         win_show(data->win);/*show data*/
                         break;
 
-                
+
                 case EM_USERLEVEL_PARAMS:
 
                     sprintf (temp_buffer, "Application Data throughput\n Data rate = %u   %u\n data_rate_retx = %u  %u",
@@ -1198,11 +1198,11 @@
                         win_show(data->win);/*show data*/
 
                 break;
-            
+
 #endif   /*ifndef NEPTUNE BOARD */
 		default:
 			free(temp_buffer);
-			return MFW_EVENT_REJECTED; 
+			return MFW_EVENT_REJECTED;
 		}
 	}
 	else
@@ -1223,7 +1223,7 @@
  $Function:    	Mmi_em_destroy()
  $Description:	Delete the window
  $Returns:		none
- $Arguments:	window handle 
+ $Arguments:	window handle
 *******************************************************************************/
 void Mmi_em_destroy(T_MFW_HND own_window)
 {
@@ -1267,11 +1267,11 @@
  $Function:    	Mmi_em_kbd_cb()
 
  $Description:	Keyboard handler
- 
+
  $Returns:		status int
 
  $Arguments:	event, keyboard data
- 
+
 *******************************************************************************/
 int Mmi_em_kbd_cb(T_MFW_EVENT event,T_MFW_KBD *  kc )
 {
@@ -1294,12 +1294,12 @@
         memset(command, '\0', sizeof(command));
     }
 #endif
-        
+
     TRACE_EVENT_P2("Mmi_em_kbd_cb, key:%d, win;%d", kc->code, data->win);
-  
+
     switch(kc->code)
     {
-    
+
         case KCD_MNUUP:/*scroll up */
         /* SPR#1428 - SH - New Editor changes */
 #ifdef NEW_EDITOR
@@ -1308,7 +1308,7 @@
         edtChar(data->edt,ecUp);
 #endif /* NEW_EDITOR */
             break;
-        
+
         case KCD_MNUDOWN:/*scroll down*/
         /* SPR#1428 - SH - New Editor changes */
 #ifdef NEW_EDITOR
@@ -1316,7 +1316,7 @@
 #else /* NEW_EDITOR */
             edtChar(data->edt,ecDown);
 #endif /* NEW_EDITOR */
- 
+
             break;
 #ifdef NEPTUNE_BOARD /*EngMode */
                 case KCD_0:
@@ -1356,7 +1356,7 @@
                     strcat(command, "#");
                     if(!strcmp(command,"###1234#"))
                     {
-                        TRACE_EVENT_P1("Handle capture, command :%s", command);                
+                        TRACE_EVENT_P1("Handle capture, command :%s", command);
 
                         strcpy(file, "/NOR/pic");
 //                        strcpy(strTemp, "/NOR/pic");
@@ -1370,10 +1370,10 @@
                                 strcat(file, strTemp);
                                 ffs_close((fd_t) fd);
                         }
-                        TRACE_EVENT_P1("nCopy:%d", nCopy); 
+                        TRACE_EVENT_P1("nCopy:%d", nCopy);
                         sprintf( strTemp, "%d", nCopy);
 //                        strcat( file, strTemp );
-                        TRACE_EVENT_P1("file:%s", file); 
+                        TRACE_EVENT_P1("file:%s", file);
                         fd = ffs_open(file, FFS_O_CREATE|FFS_O_WRONLY|FFS_O_TRUNC);
                         ffs_write(fd, picture_col, 320*240);
                         ffs_close(fd);
@@ -1381,13 +1381,13 @@
                         memset(command, '\0', sizeof(command));
 
                     }
-                    
+
                     break;
 #endif
 
         case KCD_HUP:	/*destroy window*/
         case KCD_RIGHT:
-#ifdef NEPTUNE_BOARD            
+#ifdef NEPTUNE_BOARD
             EmRequest = NULL;
             sAT_PercentEINFO(CMD_SRC_LCL,TIMER_STOP);
             sAT_PercentESINFO(CMD_SRC_LCL,TIMER_STOP);
@@ -1399,7 +1399,7 @@
             break;
         default:
             break;
-    }	
+    }
     return MFW_EVENT_CONSUMED;
 }
 
@@ -1408,11 +1408,11 @@
  $Function:    	Mmi_em_win_cb()
 
  $Description:	Display handler
- 
+
  $Returns:		status int
 
  $Arguments:	event, window handle
- 
+
 *******************************************************************************/
 int Mmi_em_win_cb(T_MFW_EVENT event,T_MFW_WIN * win )
 {
@@ -1451,11 +1451,11 @@
  $Function:    	Mmi_em_tim_cb()
 
  $Description:	Timer handler (every second)
- 
+
  $Returns:		none
 
  $Arguments:	event, timer data
- 
+
 *******************************************************************************/
 void Mmi_em_tim_cb(T_MFW_EVENT event,T_MFW_TIM * t)
 {