diff src/ui/mfw/mfw_phb.c @ 188:92abb46dc1ba

src/ui/mfw/*.[ch]: rm trailing white space
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 19 Jan 2021 06:10:27 +0000
parents 67bfe9f274f6
children
line wrap: on
line diff
--- a/src/ui/mfw/mfw_phb.c	Tue Jan 19 05:41:26 2021 +0000
+++ b/src/ui/mfw/mfw_phb.c	Tue Jan 19 06:10:27 2021 +0000
@@ -15,14 +15,14 @@
 	June 05, 2007 DR:OMAPS00133241 x0061560(sateeshg)
        Description:ASTEC29607,SIM:The sim card should not return 9240 still.
        Solution     :New enum MFW_PHB_EXCT been sent while the command AT_EXCT is in progress
-	
+
       Nov 03, 2006 DR:OMAPS00097209 a0393213(R.Prabakar)
       API Needed for Maximum Length Of Each Phonebook Category In SIM
       Solution: The interface of pb_read_sizes() changed. While calling the function it should be taken care of.
-      
+
 	Aug 18, 2006   ER: OMAPS00089840  x0039928
 	Description: Changes to be made in MMI for the functionality "Delete all" ADN entries
-	Solution: A new menu item "Delete All" is added in the phone book menu 
+	Solution: A new menu item "Delete All" is added in the phone book menu
 	to delete all the sim entries
 
 	July  17, 2006  DR: OMAPS00082792  x0039928
@@ -30,22 +30,22 @@
 	Solution: Added condition to check for AT_EXCT return for sAT_PlusCPBW
 
       Oct 27, 2005	REF: OMAPS 48881 b-nekkare
-      Description: PhoneBook: The modify option under phonebook doesn't 
+      Description: PhoneBook: The modify option under phonebook doesn't
                         work as expected.
        Solution: In case of SIM storage,deleted the previous 2nd comparision
-                     with TON as then it would be TRUE if the previous saved 
-                     number had a preceding'+'. So currently only checking for 
+                     with TON as then it would be TRUE if the previous saved
+                     number had a preceding'+'. So currently only checking for
                      '+' to figure out the TON.
 
 
 	Apr 14, 2005	REF: CRR 29991   xpradipg
-	Description:	Optimisation 5: Remove the static allocation and use dynamic 
+	Description:	Optimisation 5: Remove the static allocation and use dynamic
 					allocation/ deallocation for pb_list and black_list
 	Solution:	The static definition is removed and replaced with the dynamic
 					allocation
 
 
-       March 1 ,2004   REF: CRR 27832   x0012852 
+       March 1 ,2004   REF: CRR 27832   x0012852
 	Bug:SIM PIN2 related Actions are displying wrong Error Response.
 	Fix:MFW calls sAT_PlusCPBS() with third parameter as NULL.
 */
@@ -119,7 +119,7 @@
 #ifdef INT_PHONEBOOK
 #include "ATBPbGI.h"
 #endif
-    
+
 /*************** MACRO definition ***********************************/
 //   Apr 14, 2005	REF: CRR 29991   xpradipg
 //	MACRO to allocate and deallocate memory for pb_list
@@ -132,11 +132,11 @@
 	if(ptr)\
 		mfwFree((U8*)ptr, size);
 #define PB_LIST_SIZE (sizeof(T_ACI_PB_ENTR)*PHB_MAX_ENTRY_NUM)
-		
+
 #else
 #define PB_LIST_ALLOC(ptr, size)
 #define PB_LIST_DEALLOC(ptr, size)
-#endif			
+#endif
 /********* current define *******************************************/
 //   Apr 14, 2005	REF: CRR 29991   xpradipg
 //	remove the static allocation
@@ -175,7 +175,7 @@
   T_MFW_HDR *hdr;
   T_MFW_PHB  *phb_para;
   MfwHdr *insert_status =0;
-  
+
   TRACE_FUNCTION ("phb_create()");
 
   hdr      = (T_MFW_HDR *) mfwAlloc(sizeof (T_MFW_HDR));
@@ -184,12 +184,12 @@
   if (!hdr OR !phb_para)
   	{
     	TRACE_ERROR("ERROR: phb_create() Mem Alloc Failed.");
-			
+
 	   	if(hdr)
    			mfwFree((U8*)hdr,sizeof(MfwHdr));
    		if(phb_para)
-   			mfwFree((U8*)phb_para,sizeof(T_MFW_PHB));	
-   		
+   			mfwFree((U8*)phb_para,sizeof(T_MFW_PHB));
+
 	   	return FALSE;
   	}
 
@@ -231,7 +231,7 @@
 T_MFW_RES phb_delete(T_MFW_HND h)
 {
   TRACE_FUNCTION ("phb_delete()");
-  
+
   if (!h OR !((T_MFW_HDR *)h)->data)
     return MFW_RES_ILL_HND;
 
@@ -256,10 +256,10 @@
 */
 
 void phb_signal(T_MFW_EVENT event, void * para)
-{/*MC, SPR 1389, we have to enable the display whenever 
+{/*MC, SPR 1389, we have to enable the display whenever
 	we send an event up to the MMI*/
 UBYTE temp = dspl_Enable(0);
-	
+
   TRACE_FUNCTION ("phb_signal()");
 if (mfwSignallingMethod EQ 0)
   {
@@ -545,10 +545,10 @@
 #ifdef FF_2TO1_PS
     case NPI_Ermes:         return MFW_NPI_M_ERMES;
     case NPI_Cts:           return MFW_NPI_M_CTS;
-#else                            
+#else
     case NPI_ERMES:         return MFW_NPI_M_ERMES;
     case NPI_CTS:           return MFW_NPI_M_CTS;
-#endif                            
+#endif
 		default: return MFW_NPI_UNKNOWN;/*a0393213 warnings removal-npi changed to MFW_NPI_UNKNOWN*/
 	}
 }
@@ -629,7 +629,7 @@
 void phb_init()
 {
   TRACE_FUNCTION ("phb_init()");
-  
+
   return;
 }
 
@@ -659,7 +659,7 @@
 //	Define the local pointer since it occupies close to 650 bytes
 #ifdef FF_MMI_OPTIM
   T_ACI_PB_ENTR *pb_list;
-#endif  
+#endif
   TRACE_FUNCTION ("phb_read_entries()");
   TRACE_EVENT_P4("book%d index%d mode%d num%d", book, index, mode, num_entries);
 
@@ -730,10 +730,10 @@
   if (sAT_PlusCPBS(CMD_SRC_LCL, phb_codePhbType ((T_MFW_PHB_TYPE) book ), NULL) NEQ AT_CMPL)
   return MFW_PHB_FAIL;
 
-//     March 1 ,2004   REF: CRR 27832   x0012852 
+//     March 1 ,2004   REF: CRR 27832   x0012852
 //     Bug:SIM PIN2 related Actions are displying wrong Error Response.
 //     Fix:MFW calls sAT_PlusCPBS() with third parameter as NULL.
-    
+
      /* Read entries */
   entries->book = book;
   rcd_num = 0;
@@ -741,7 +741,7 @@
   stop_ind  = index + (num_entries - 1);
 //  Apr 14, 2005	REF: CRR 29991   xpradipg
 //	dynamic allocation
-	PB_LIST_ALLOC(pb_list,PB_LIST_SIZE);	
+	PB_LIST_ALLOC(pb_list,PB_LIST_SIZE);
   while (num_entries > 0)
   {
     for (i=0; i<PHB_MAX_ENTRY_NUM; i++)
@@ -836,7 +836,7 @@
 
 /* SPR#1727 - DS - Merged updated version from 1.6 branch. */
 
-/* Test that the last 6 digits match. 
+/* Test that the last 6 digits match.
 If there are less than 6 numbers - its probably not a phone number.
 GW- For emergency calls check a full exact match for the full (but short) length
 */
@@ -905,7 +905,7 @@
 //	local pointer definition
 #ifdef FF_MMI_OPTIM
 	T_ACI_PB_ENTR *pb_list;
-#endif	
+#endif
   TRACE_FUNCTION ("phb_find_entries()");
 
    /* SPR#1112 - SH - Internal phonebook */
@@ -956,8 +956,8 @@
   /* select phonebook */
   if (sAT_PlusCPBS(CMD_SRC_LCL, phb_codePhbType ((T_MFW_PHB_TYPE) book ), NULL) NEQ AT_CMPL)
   return MFW_PHB_FAIL;
-       
-//   March 1 ,2004   REF: CRR 27832   x0012852 
+
+//   March 1 ,2004   REF: CRR 27832   x0012852
 //	Bug:SIM PIN2 related Actions are displying wrong Error Response.
 //	Fix:MFW calls sAT_PlusCPBS() with third parameter as NULL.
 
@@ -983,7 +983,7 @@
     }
     else
     {
-      findText.len = MINIMUM(search_pattern->len,  MAX_PHB_NUM_LEN-1); //GW -SPR#762 
+      findText.len = MINIMUM(search_pattern->len,  MAX_PHB_NUM_LEN-1); //GW -SPR#762
       strncpy((char *)findText.data, (char *)search_pattern->data, findText.len);
       findText.data[findText.len] = '\0';
     }
@@ -992,12 +992,12 @@
                         &findText,
                         sr_type,
                         search_mode,
-/*ADDED BY RAVI - ACI CHANGES - 5-10-2005*/                        
+/*ADDED BY RAVI - ACI CHANGES - 5-10-2005*/
 #if (defined(FF_2TO1_PS) && BOARD != 61)
                         (UBYTE *)index,
 #else
                         index,
-#endif                        
+#endif
 /*END ADDITION - RAVI - 5-10-2005*/
                         &found,
                         pb_list) EQ AT_CMPL)
@@ -1009,7 +1009,7 @@
         {
   TRACE_FUNCTION ("phb_find_entries()-found entry");
 /*SPR 2102, removed traces which were causing a crash for long phone numbers*/
-  
+
 	        if (numbersMatch((char*)pb_list[i].number,(char*)search_pattern->data))
 	        {
   TRACE_FUNCTION ("phb_find_entries()-numbers match");
@@ -1038,7 +1038,7 @@
         entries->num_entries = (U16)found;
 #else
         entries->num_entries = found;
-#endif        
+#endif
         search_mode = CPBF_MOD_NextSearch;
       }
     }
@@ -1129,11 +1129,11 @@
   /* select phonebook */
   if (sAT_PlusCPBS(CMD_SRC_LCL, phb_codePhbType ( (T_MFW_PHB_TYPE)book ), NULL) NEQ AT_CMPL)
   return MFW_PHB_FAIL;
-  
-//   March 1 ,2004   REF: CRR 27832   x0012852 
+
+//   March 1 ,2004   REF: CRR 27832   x0012852
 //	Bug:SIM PIN2 related Actions are displying wrong Error Response.
 //	Fix:MFW calls sAT_PlusCPBS() with third parameter as NULL.
-         
+
   entries->book = book;
   rcd_num = 0;
   sum     = num_entries;
@@ -1153,12 +1153,12 @@
                         &findText,
                         sr_type,
                         search_mode,
-/*ADDED BY RAVI - ACI CHANGES - 5-10-2005 */                        
+/*ADDED BY RAVI - ACI CHANGES - 5-10-2005 */
 #if (defined(FF_2TO1_PS) && BOARD != 61)
                         (UBYTE *)index,
 #else
                         index,
-#endif                        
+#endif
 /*END ADDITION - RAVI - 5-10-2005 */
                         &found,
                         pb_list) EQ AT_CMPL)
@@ -1190,7 +1190,7 @@
         entries->num_entries = (U16)found;
 #else
         entries->num_entries = found;
-#endif        
+#endif
         search_mode = CPBF_MOD_NextSearch;
       }
     }
@@ -1236,7 +1236,7 @@
   SHORT            used;
   SHORT            total;
   SHORT			   avail;
-#endif  
+#endif
 // END ADDITION - RAVI - 5-10-2005
 #ifdef TI_PS_FFS_PHB
   UBYTE            nlength;
@@ -1282,8 +1282,8 @@
   /* select phonebook */
   if (sAT_PlusCPBS(CMD_SRC_LCL, phb_codePhbType ((T_MFW_PHB_TYPE) book ), NULL) NEQ AT_CMPL)
   return MFW_PHB_FAIL;
-     
-//    March 1 ,2004   REF: CRR 27832   x0012852 
+
+//    March 1 ,2004   REF: CRR 27832   x0012852
 //    Bug:SIM PIN2 related Actions are displying wrong Error Response.
 //    Fix:MFW calls sAT_PlusCPBS() with third parameter as NULL.
 
@@ -1343,8 +1343,8 @@
     status->max_entries = total;
     status->used_entries = used;
     status->avail_entries = avail;
-#endif    
-//x0061560 Date May17,07 (sateeshg) OMAPS00133241 
+#endif
+//x0061560 Date May17,07 (sateeshg) OMAPS00133241
 return MFW_PHB_OK;
 case AT_EXCT:
 #ifndef TI_PS_FFS_PHB // Flushing not necessary with FFS based SIM PHB
@@ -1357,7 +1357,7 @@
   }
 #endif
 
-//x0061560 Date May16,07 (sateeshg) OMAPS00133241 
+//x0061560 Date May16,07 (sateeshg) OMAPS00133241
 return MFW_PHB_EXCT;
 
  default:
@@ -1386,7 +1386,7 @@
   SHORT            used;
   SHORT            total;
   SHORT			   avail;
-#endif  
+#endif
 // END ADDITION BY RAVI - 5-10-2005
 #ifdef TI_PS_FFS_PHB
   UBYTE            nlength;
@@ -1431,10 +1431,10 @@
   if (sAT_PlusCPBS(CMD_SRC_LCL, phb_codePhbType ( (T_MFW_PHB_TYPE)book ), NULL) NEQ AT_CMPL)
   return MFW_PHB_FAIL;
 
-//    March 1 ,2004   REF: CRR 27832   x0012852 
+//    March 1 ,2004   REF: CRR 27832   x0012852
 //    Bug:SIM PIN2 related Actions are displying wrong Error Response.
 //    Fix:MFW calls sAT_PlusCPBS() with third parameter as NULL.
-   
+
 
   memset(&dt, 0, sizeof(T_ACI_VP_ABS));
 
@@ -1462,7 +1462,7 @@
     status->max_entries = total;
     status->used_entries = used;
     status->avail_entries = avail;
-#endif    
+#endif
     case AT_EXCT:
  	return MFW_PHB_OK;
  default:
@@ -1491,7 +1491,7 @@
                    (char *)passwd, CLASS_VceDatFaxSms, MFW_PHB) != MFW_SS_OK)
     {
       return MFW_PHB_FAIL;
-    }  
+    }
   }
   if (book EQ PHB_ADN)
   {
@@ -1583,7 +1583,7 @@
     ton_npi.ton = TON_Unknown;
 
     ton_npi.npi = NPI_IsdnTelephony;
-  cmhPHB_toaMrg ( &ton_npi, &toa );                      
+  cmhPHB_toaMrg ( &ton_npi, &toa );
 
 /* --->>>--- */
 #if defined(FF_2TO1_PS)
@@ -1593,8 +1593,8 @@
     return PHB_FDN;
 
 #else
-  /* The old pb_check_fdn() either delivered PHB_OK and found == 1 or 
-   * PHB_FAIL and found == 0. Other combintations were not possibe, 
+  /* The old pb_check_fdn() either delivered PHB_OK and found == 1 or
+   * PHB_FAIL and found == 0. Other combintations were not possibe,
    * especially PHB_OK and found == 0. Some unreachable / dead code here.
    * Found on g23m S621 by HM 21-Sep-2005 */
   if (pb_check_fdn(toa, number) NEQ PHB_OK)
@@ -1608,12 +1608,12 @@
   T_ACI_PB_ENTR *pb_list;
   if (sAT_PlusCPBS(CMD_SRC_LCL, PB_STOR_Bd, NULL) NEQ AT_CMPL)
   return MFW_PHB_FAIL;
-    
- 
+
+
  //   March 1 ,2004   REF: CRR 27832   x0012852 SELIM
  //   Bug:SIM PIN2 related Actions are displying wrong Error Response.
  //   Fix:MFW calls sAT_PlusCPBS() with third parameter as NULL.
-    
+
   text.len = MINIMUM(strlen((char *)number), PHB_MAX_LEN-1); //GW -SPR#762 - was MAX_ALPHA_LEN-1);
   strncpy((char *)text.data, (char *)number, text.len);
   text.data[text.len] = '\0';
@@ -1644,7 +1644,7 @@
 	PB_LIST_DEALLOC(pb_list, PB_LIST_SIZE);
   return PHB_OK;
 }
-#endif 
+#endif
 
 }
 
@@ -1670,7 +1670,7 @@
   SHORT          used;
   SHORT          total;
   SHORT			 avail;
-#endif  
+#endif
 
 // END ADDITION BY RAVI - 5-10-2005
   T_PHB_TYPE			 type;/*a0393213 warnings removal-data type of 'type' changed from UBYTE*/
@@ -1689,7 +1689,7 @@
  /* SPR#1112 - SH - Internal phonebook */
 #ifdef INT_PHONEBOOK
   if (status->book EQ PHB_IPB)
-  {   
+  {
     GI_pb_Info(status);
     return MFW_PHB_OK;
   }
@@ -1738,7 +1738,7 @@
 	                &tag_len, &avail,&used_ext, &total_ext) == PHB_FAIL)
 	return MFW_PHB_FAIL;
 #else
-  if (pb_read_sizes (type, &total, &used, &num_len, &tag_len, 
+  if (pb_read_sizes (type, &total, &used, &num_len, &tag_len,
                      &used_ext, &total_ext) == PHB_FAIL) /*a0393213 OMAPS00097209 - interface of pb_read_sizes has been changed in ACI side*/
     return MFW_PHB_FAIL;
   avail = total - used;
@@ -1753,7 +1753,7 @@
   status->max_entries  = total;
   status->used_entries = used;
   status->avail_entries = avail;
-#endif  
+#endif
   return MFW_PHB_OK;
 }
 
@@ -1836,8 +1836,8 @@
 
   {
 #ifdef TI_PS_FFS_PHB
-    /* 
-     * When we're returning MFW_PHB_OK and the book is a SIM book 
+    /*
+     * When we're returning MFW_PHB_OK and the book is a SIM book
      * normally we're not really finished with the operation here
      * as the synchronization to the SIM is still ongoing.
      */
@@ -2054,7 +2054,7 @@
     }
 
 #ifdef PCM_2_FFS
-	if (ffs_ReadRecord((UBYTE *)PSPDF_UPN_ID, (UBYTE *)&efupn, 
+	if (ffs_ReadRecord((UBYTE *)PSPDF_UPN_ID, (UBYTE *)&efupn,
 		sizeof( T_PSPDF_UPN ) , (USHORT)(i+1), 1 ) ==  sizeof( T_PSPDF_UPN ) )
 #else
     pcm_ReadRecord((UBYTE *)EF_UPN_ID,
@@ -2068,7 +2068,7 @@
     for (i=0; i<max_rcd; i++)
     {
 #ifdef PCM_2_FFS
-	if (ffs_ReadRecord((UBYTE *)PSPDF_UPN_ID, (UBYTE *)&efupn, 
+	if (ffs_ReadRecord((UBYTE *)PSPDF_UPN_ID, (UBYTE *)&efupn,
 		sizeof( T_PSPDF_UPN ) , (USHORT)(i+1), 1 ) ==  sizeof( T_PSPDF_UPN )  )
 #else
 	    if (pcm_ReadRecord((UBYTE *)EF_UPN_ID,
@@ -2129,7 +2129,7 @@
 void phb_get_upn(void)
 {
     /*a0393213 compiler warnings removal - removed variables phb_entry, phb_list*/
-    
+
     T_MFW_PHB_STATUS status;
     int i;
     SHORT           start_ind;
@@ -2139,11 +2139,11 @@
 //	local pointer definition
 #ifdef FF_MMI_OPTIM
 	T_ACI_PB_ENTR *pb_list;
-#endif	
+#endif
 
     TRACE_FUNCTION("phb_get_upn()");
 
-    
+
 
     memset(&status, 0, sizeof(status));
     status.book = PHB_UPN;
@@ -2153,10 +2153,10 @@
     /* select phonebook */
     if (sAT_PlusCPBS(CMD_SRC_LCL, phb_codePhbType ( PHB_UPN ), NULL) NEQ AT_CMPL)
 
-//    March 1 ,2004   REF: CRR 27832   x0012852 
+//    March 1 ,2004   REF: CRR 27832   x0012852
 //    Bug:SIM PIN2 related Actions are displying wrong Error Response.
 //    Fix:MFW calls sAT_PlusCPBS() with third parameter as NULL.
-        
+
       phb_signal(E_PHB_UPN_LIST, &upn_list);
 
     start_ind = 1;
@@ -2168,7 +2168,7 @@
 	pb_list = (T_ACI_PB_ENTR*)mfwAlloc(PB_LIST_SIZE);
 	if(NULL == pb_list)
 		return;
-#endif		
+#endif
     for (i=0; i<status.used_entries; i++)
     {