diff src/ui/bmi/mmiBookController.c @ 142:ec9f955fc487

mmiBook*.c: bogotab fixes
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 14 Nov 2020 08:43:59 +0000
parents c0052fe355d3
children
line wrap: on
line diff
--- a/src/ui/bmi/mmiBookController.c	Sat Nov 14 04:29:03 2020 +0000
+++ b/src/ui/bmi/mmiBookController.c	Sat Nov 14 08:43:59 2020 +0000
@@ -11,12 +11,12 @@
 
  $Project name: Basic MMI
  $Project code: BMI (6349)
- $Module:   PhoneBook
- $File:       MmiBookController.c
- $Revision:   1.0
+ $Module:       PhoneBook
+ $File:         MmiBookController.c
+ $Revision:     1.0
 
- $Author:   Condat(UK)
- $Date:       25/10/00
+ $Author:       Condat(UK)
+ $Date:         25/10/00
 
 ********************************************************************************
 
@@ -30,47 +30,46 @@
 
  $History: MmiBookController.c
 
-	Nov 10, 2006   DRT: OMAPS000103354  x0039928
-	Description: Delete all failure in LDN Phonebook
-	Solution: phb_delete_all is called with the proper phone book as input.
+    Nov 10, 2006   DRT: OMAPS000103354  x0039928
+    Description: Delete all failure in LDN Phonebook
+    Solution: phb_delete_all is called with the proper phone book as input.
 
-	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.
+    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.
 
-	July 21,2006 REF:DR OMAPS00085695 x0047075
-	Description:Fail to delete the correct entry in LDN, LRN and LMN with Locosto.
-	Solution:After deleting any entry in the LDN,LRN,LMN book,we highlight the first entry as the
-	current selected entry.
+    July 21,2006 REF:DR OMAPS00085695 x0047075
+    Description:Fail to delete the correct entry in LDN, LRN and LMN with Locosto.
+    Solution:After deleting any entry in the LDN,LRN,LMN book,we highlight the first entry as the
+    current selected entry.
 
-       Jun 13, 2005	REF: SPR 31705 x0021308
+       Jun 13, 2005 REF: SPR 31705 x0021308
        Description: Once  maximum limit of the My Number is exceeded, display info : Phonebook full,
        expected is MyNumber Full
        Solution: Replaced the Return tag in function Protected Menu Handler(booksetownNumber) from
        Phonebookfull with MyNumberfull.
 
-       Jun 13, 2005	REF: SPR 31710 x0021308
- 	Description: Once  maximum limit of the FDN Number  is exceeded, display info : Phonebook full,
+       Jun 13, 2005 REF: SPR 31710 x0021308
+    Description: Once  maximum limit of the FDN Number  is exceeded, display info : Phonebook full,
        expected is FDNList Full
        Solution: Replaced the Return tag in function Protected Menu Handler(booksetownNumber) from
        Phonebookfull with FDNListfull While checking whether in FDNMenu is active using MenuFDN global
        variable.
 
 
-   	Sep 22, 2004        REF: CRR 21392  xvilliva
-	Bug:		PIN2 Screen is not displaying, While Adding FDN Number thru
-			Recent call Menu.
-	Fix:	 	We add the "bookRepRedNameEnter" to "ProtectedActions" array.
-			If FDN is enabled, Pin2 will be asked.
+    Sep 22, 2004        REF: CRR 21392  xvilliva
+    Bug:        PIN2 Screen is not displaying, While Adding FDN Number thru
+            Recent call Menu.
+    Fix:        We add the "bookRepRedNameEnter" to "ProtectedActions" array.
+            If FDN is enabled, Pin2 will be asked.
 
-	June 26, 2006	     REF : OMAPS00083148  x0023848
-	Bug:		SMS send is failed when trying through missed call list
-	Fix:		Assignemnt of SmsData.called_from_reply_item to FALSE is Added
+    June 26, 2006        REF : OMAPS00083148  x0023848
+    Bug:        SMS send is failed when trying through missed call list
+    Fix:        Assignemnt of SmsData.called_from_reply_item to FALSE is Added
 
   25/10/00      Original Condat(UK) BMI version.
 
 
-
  $End
 
  // Issue Number : MMI-FIX-12161 on 07/04/04 by Nishikant Kulkarni/Ajith K.P
@@ -143,7 +142,6 @@
 #include "MmiLists.h"
 
 
-
 #include "MmiMenu.h"
 #include "mmiCall.h"
 #include "Mmiicons.h"
@@ -242,7 +240,7 @@
   NULL };
 
 //    May 3, 2004        REF: CRR MMI-SPR-18555  Rashmi C N(Sasken)
-//	This flag will indicate when we are in FDN menu
+//  This flag will indicate when we are in FDN menu
 int menuFDN;
 extern T_call call_data;
 
@@ -286,10 +284,10 @@
    // for phonebook is internal phone book, we avoid asking Pin2 accordingly.
    if(menuFDN == 0 && bookActiveBook(WRITE) == PHB_IPB)
    {
-   	//Do nothing.
+    //Do nothing.
    }
 // May 3, 2004        REF: CRR MMI-SPR-18555  Rashmi C N(Sasken)
-//	Pin2 should be prompted when user does FDN related operations in FDN menu
+//  Pin2 should be prompted when user does FDN related operations in FDN menu
 //   In FDN menu, receie an active call and FDN is disabled, pin2 should not be prompted for in call addressbook operations
   else if ( phb_get_mode() == PHB_RESTRICTED || (menuFDN && (call_data.calls.numCalls==0)))
   {
@@ -335,26 +333,26 @@
 */
 static int Pin2Rqd( tProtectFunction FunTag, tProtectFunction FunPtr, tBookMfwMenu *Menu, tBookMfwMenuItem *Item )
 {
-	pBookMfwWin    win_data = (pBookMfwWin) bookWindowData();
-	pBookPhonebook book     = ((pBookStandard)win_data->user)->phbk;
-//	int i;   // RAVI
+    pBookMfwWin    win_data = (pBookMfwWin) bookWindowData();
+    pBookPhonebook book     = ((pBookStandard)win_data->user)->phbk;
+//  int i;   // RAVI
 
-	/* Yup, so we need to store the pending action for
-	this window, this will be invoked by the checking
-	operation, indirectly, if the check is successful
-	*/
-	book->pin2_next = (T_VOID_FUNC) FunPtr;
+    /* Yup, so we need to store the pending action for
+    this window, this will be invoked by the checking
+    operation, indirectly, if the check is successful
+    */
+    book->pin2_next = (T_VOID_FUNC) FunPtr;
 
-	//We're cheating and passing the current window to the
-	//handler via the unused menu parameter -- MC
-	book->menu = (tBookMfwMenu*) bookCurrentWindow();
-	book->item = Item;
+    //We're cheating and passing the current window to the
+    //handler via the unused menu parameter -- MC
+    book->menu = (tBookMfwMenu*) bookCurrentWindow();
+    book->item = Item;
 
-	/* Call out to get the pin2 number checked, this will
-	respond with a message back to this object, which
-	we will deal with on receipt
-	*/
-	return pin2_check( bookCurrentWindow());
+    /* Call out to get the pin2 number checked, this will
+    respond with a message back to this object, which
+    we will deal with on receipt
+    */
+    return pin2_check( bookCurrentWindow());
 }
 
 /*******************************************************************************
@@ -415,14 +413,14 @@
   if (Phbk->UpdateAction!=ADD_FROM_IDLE)
       memset( Phbk->phbk->edt_buf_number, '\0', PHB_MAX_LEN );
   /*MC SPR 1257, replacing PHB_MAX_LEN with MAX_ALPHA_LEN for name strings*/
-  	  memset( Phbk->phbk->edt_buf_name,   '\0', MAX_ALPHA_LEN );
+      memset( Phbk->phbk->edt_buf_name,   '\0', MAX_ALPHA_LEN );
     /* Indicate this is an additional entry being created
     */
     Phbk->UpdateAction = CREATE_ENTRY;
 
-	// May 3, 2004        REF: CRR MMI-SPR-18555  Rashmi C N(Sasken)
-	//	As the book is being changed for FDN menu operations, we need to
-	//    get back the current book for the normal phonbook operations
+    // May 3, 2004        REF: CRR MMI-SPR-18555  Rashmi C N(Sasken)
+    //  As the book is being changed for FDN menu operations, we need to
+    //    get back the current book for the normal phonbook operations
     Phbk->current.status.book = bookActiveBook(READ);
 
     /* Determine if we have room to add any new entries
@@ -442,17 +440,17 @@
         */
 
         /*If FDN menu active and no room for entries, then display FDN list full */
-	tIndexTagNames Tag ;
+    tIndexTagNames Tag ;
         if(menuFDN)
-        	{
-        	 Tag = ( Phbk->phbk->current.status.used_entries )
-        	    ? TxtFDNListFull : TxtOperationNotAvail;          //SPR 31710 x0021308:RamG
-        	}
+            {
+             Tag = ( Phbk->phbk->current.status.used_entries )
+                ? TxtFDNListFull : TxtOperationNotAvail;          //SPR 31710 x0021308:RamG
+            }
          else
-		{
-		 Tag = ( Phbk->phbk->current.status.used_entries )
+        {
+         Tag = ( Phbk->phbk->current.status.used_entries )
             ? TxtPhbkFull : TxtOperationNotAvail;
-	      	}
+            }
         bookShowInformation( win, Tag,NULL, NULL );
 
 
@@ -489,56 +487,56 @@
     /* Indicate this is an edit of a current entry
     */
     Phbk->UpdateAction = MODIFY_EXISTING;
-	/*MC SPR 1327, if UPN don't change phonebook type*/
+    /*MC SPR 1327, if UPN don't change phonebook type*/
     if (data->phbk->current.status.book != PHB_UPN)
-		data->phbk->current.status.book = bookActiveBook(READ);
+        data->phbk->current.status.book = bookActiveBook(READ);
 
-	/*api - clear buffers before edit
-	*/
-	memset( Phbk->phbk->edt_buf_number, '\0', PHB_MAX_LEN );
-  	memset( Phbk->phbk->edt_buf_name,   '\0', MAX_ALPHA_LEN );
+    /*api - clear buffers before edit
+    */
+    memset( Phbk->phbk->edt_buf_number, '\0', PHB_MAX_LEN );
+    memset( Phbk->phbk->edt_buf_name,   '\0', MAX_ALPHA_LEN );
 
 TRACE_EVENT_P2("current phbk is = %d and current entry is = %d", data->phbk->current.status.book,data->phbk->current.entry[ data->phbk->current.selectedName ].book);
 
-	if(data->phbk->current.status.book == PHB_ADN_FDN)
-	{
-		if(data->phbk->current.entry[ data->phbk->current.selectedName ].book==PHB_FDN)
-		{
-			bookActivateFDN((T_MFW_HND)Menu);
-		}
-		else
-		{
-		    	/* And populate the buffers with the information to be modified
-    			*/
-				#ifdef NO_ASCIIZ
-				/*MC , SPR 1242 copy whole name, merged from b-sample build*/
-				  memcpy( Phbk->phbk->edt_buf_name,   Phbk->current.entry[ Phbk->current.selectedName ].name.data, MAX_ALPHA_LEN /*Phbk->current.entry[ Phbk->current.selectedName ].name.len*/);
-				#else
-				  memcpy( Phbk->phbk->edt_buf_name,   Phbk->current.entry[ Phbk->current.selectedName ].name, MAX_ALPHA_LEN );
-				#endif
-			    memcpy( Phbk->phbk->edt_buf_number, Phbk->current.entry[ Phbk->current.selectedName ].number, PHB_MAX_LEN );
+    if(data->phbk->current.status.book == PHB_ADN_FDN)
+    {
+        if(data->phbk->current.entry[ data->phbk->current.selectedName ].book==PHB_FDN)
+        {
+            bookActivateFDN((T_MFW_HND)Menu);
+        }
+        else
+        {
+                /* And populate the buffers with the information to be modified
+                */
+                #ifdef NO_ASCIIZ
+                /*MC , SPR 1242 copy whole name, merged from b-sample build*/
+                  memcpy( Phbk->phbk->edt_buf_name,   Phbk->current.entry[ Phbk->current.selectedName ].name.data, MAX_ALPHA_LEN /*Phbk->current.entry[ Phbk->current.selectedName ].name.len*/);
+                #else
+                  memcpy( Phbk->phbk->edt_buf_name,   Phbk->current.entry[ Phbk->current.selectedName ].name, MAX_ALPHA_LEN );
+                #endif
+                memcpy( Phbk->phbk->edt_buf_number, Phbk->current.entry[ Phbk->current.selectedName ].number, PHB_MAX_LEN );
 
-			    /* And edit the entry we currently have active
-			    */
-			    Phbk->input_number_win = bookInputStartNumberEditor( win, Phbk->edt_buf_number );
-		}
-	}
+                /* And edit the entry we currently have active
+                */
+                Phbk->input_number_win = bookInputStartNumberEditor( win, Phbk->edt_buf_number );
+        }
+    }
     else
-    	{
-		    /* And populate the buffers with the information to be modified
-    		*/
-			#ifdef NO_ASCIIZ
-			/*MC , SPR 1242 copy whole name, merged from b-sample build*/
-			  memcpy( Phbk->phbk->edt_buf_name,   Phbk->current.entry[ Phbk->current.selectedName ].name.data, MAX_ALPHA_LEN/*Phbk->current.entry[ Phbk->current.selectedName ].name.len*/);
-			#else
-			  memcpy( Phbk->phbk->edt_buf_name,   Phbk->current.entry[ Phbk->current.selectedName ].name, MAX_ALPHA_LEN );
-			#endif
-		    memcpy( Phbk->phbk->edt_buf_number, Phbk->current.entry[ Phbk->current.selectedName ].number, PHB_MAX_LEN );
+        {
+            /* And populate the buffers with the information to be modified
+            */
+            #ifdef NO_ASCIIZ
+            /*MC , SPR 1242 copy whole name, merged from b-sample build*/
+              memcpy( Phbk->phbk->edt_buf_name,   Phbk->current.entry[ Phbk->current.selectedName ].name.data, MAX_ALPHA_LEN/*Phbk->current.entry[ Phbk->current.selectedName ].name.len*/);
+            #else
+              memcpy( Phbk->phbk->edt_buf_name,   Phbk->current.entry[ Phbk->current.selectedName ].name, MAX_ALPHA_LEN );
+            #endif
+            memcpy( Phbk->phbk->edt_buf_number, Phbk->current.entry[ Phbk->current.selectedName ].number, PHB_MAX_LEN );
 
-		    /* And edit the entry we currently have active
-		    */
-		   Phbk->input_number_win = bookInputStartNumberEditor( win, Phbk->edt_buf_number );
-    	}
+            /* And edit the entry we currently have active
+            */
+           Phbk->input_number_win = bookInputStartNumberEditor( win, Phbk->edt_buf_number );
+        }
     /* Always return event consumed
     */
     return MFW_EVENT_CONSUMED;
@@ -562,25 +560,25 @@
 PROTECTED_MENU_HANDLER( bookNameDelete )
 {
 
-	//recast the menu parameter as the current window -- MC
-	//and pass it on
-	//when ADN_FDN phonebook in use check if current entry is FDN
-	//is so then call information screen or allow entry to be deleted. --- AP 23/01/02
-	//Issue 1944 MZ  Allow an entry in FDN list to be deleted.
+    //recast the menu parameter as the current window -- MC
+    //and pass it on
+    //when ADN_FDN phonebook in use check if current entry is FDN
+    //is so then call information screen or allow entry to be deleted. --- AP 23/01/02
+    //Issue 1944 MZ  Allow an entry in FDN list to be deleted.
     T_MFW_HND       win         = (T_MFW_HND)Menu;
     T_MFW_WIN       *win_data   = ( (T_MFW_HDR *) win )->data;
     tBookStandard   *data         = (tBookStandard *) win_data->user;
 
-	 /*MC SPR 1327, if UPN don't change phonebook type*/
+     /*MC SPR 1327, if UPN don't change phonebook type*/
      if (data->phbk->current.status.book != PHB_UPN)
-			data->phbk->current.status.book = bookActiveBook(READ);
-	if(data->phbk->current.status.book == PHB_ADN_FDN)
-		if(data->phbk->current.entry[ data->phbk->current.selectedName ].book==PHB_FDN)
-			bookActivateFDN((T_MFW_HND)Menu);
-		else
-			bookDeleteEntry((T_MFW_HND)Menu);
-	else
-		bookDeleteEntry((T_MFW_HND)Menu);
+            data->phbk->current.status.book = bookActiveBook(READ);
+    if(data->phbk->current.status.book == PHB_ADN_FDN)
+        if(data->phbk->current.entry[ data->phbk->current.selectedName ].book==PHB_FDN)
+            bookActivateFDN((T_MFW_HND)Menu);
+        else
+            bookDeleteEntry((T_MFW_HND)Menu);
+    else
+        bookDeleteEntry((T_MFW_HND)Menu);
 
     return MFW_EVENT_CONSUMED;
 }
@@ -605,7 +603,7 @@
     tBookStandard   *data       = (tBookStandard *) win_data->user;
     T_phbk          *Phbk       = data->phbk;
 
-  callNumber( Phbk->current.entry[ Phbk->current.selectedName ].number );
+    callNumber( Phbk->current.entry[ Phbk->current.selectedName ].number );
     return MFW_EVENT_CONSUMED;
 }
 
@@ -670,7 +668,7 @@
   {
          MmiBookSetCurrentText(TxtFailed);
          bookShowInformation( Phbk->win, MmiBookCurrentText(),NULL, NULL );
-  	  bookPhonebookDestroy(Phbk->win);
+      bookPhonebookDestroy(Phbk->win);
   }
 
     return MFW_EVENT_CONSUMED;
@@ -697,14 +695,13 @@
     tBookStandard   *data       = (tBookStandard *) win_data->user;
 
     data->phbk->current.KindOfSearch = SEARCH_BY_NAME;
-  data->phbk->current.status.book = bookActiveBook(READ);
-  data->phbk->search_win = bookSearchStart( data->phbk->win );
+    data->phbk->current.status.book = bookActiveBook(READ);
+    data->phbk->search_win = bookSearchStart( data->phbk->win );
 
     return MFW_EVENT_CONSUMED;
 }
 
 
-
 /*******************************************************************************
 
  $Function:     bookNumberSearch
@@ -726,8 +723,8 @@
     tBookStandard   *data       = (tBookStandard *) win_data->user;
 
     data->phbk->current.KindOfSearch = SEARCH_BY_NUMBER;
-  data->phbk->current.status.book = bookActiveBook(READ);
-  data->phbk->search_win = bookSearchStart( data->phbk->win );
+    data->phbk->current.status.book = bookActiveBook(READ);
+    data->phbk->search_win = bookSearchStart( data->phbk->win );
 
     return MFW_EVENT_CONSUMED;
 }
@@ -755,8 +752,8 @@
     tBookStandard   *data       = (tBookStandard *) win_data->user;
 
     data->phbk->current.KindOfSearch = SEARCH_BY_LOCATION;
-  data->phbk->current.status.book = bookActiveBook(READ);
-  data->phbk->search_win = bookSearchStart( data->phbk->win );
+    data->phbk->current.status.book = bookActiveBook(READ);
+    data->phbk->search_win = bookSearchStart( data->phbk->win );
 
     return MFW_EVENT_CONSUMED;
 }
@@ -778,12 +775,10 @@
 
 PROTECTED_MENU_HANDLER( bookNameDeleteAll )
 {
-return NULL;
+	return NULL;
 }
 
 
-
-
 /*******************************************************************************
 
  $Function:     bookNameMessage
@@ -847,8 +842,8 @@
 
 
     data->phbk->current.KindOfSearch = SEARCH_BY_NAME;
-  data->phbk->current.status.book = PHB_UPN;
-  data->phbk->search_win = bookSearchStart( data->phbk->win );
+    data->phbk->current.status.book = PHB_UPN;
+    data->phbk->search_win = bookSearchStart( data->phbk->win );
 
     return MFW_EVENT_CONSUMED;
 }
@@ -877,13 +872,13 @@
     /* Clear the input editor structures before we go any further
     */
     /*MC SPR 1257, replacing PHB_MAX_LEN with MAX_ALPHA_LEN for name strings*/
-  memset( Phbk->phbk->edt_buf_name,   '\0', MAX_ALPHA_LEN );
+    memset( Phbk->phbk->edt_buf_name,   '\0', MAX_ALPHA_LEN );
     memset( Phbk->phbk->edt_buf_number, '\0', PHB_MAX_LEN );
 
     /* Indicate this is an additional entry being created
     */
     Phbk->UpdateAction = CREATE_ENTRY;
-  data->phbk->current.status.book = PHB_UPN;
+    data->phbk->current.status.book = PHB_UPN;
     /* Determine if we have room to add any new entries
     */
   bookGetCurrentStatus( &Phbk->phbk->current.status );
@@ -935,9 +930,9 @@
     char*     selected_number;
 
   selected_number = (char*)data->phbk->current.entry[data->phbk->current.selectedName].number;
-	// Sep 22, 2004        REF: CRR 21392  xvilliva
-	// We get the exact book that is selected.
-	data->phbk->current.status.book  = bookActiveBook(WRITE);
+    // Sep 22, 2004        REF: CRR 21392  xvilliva
+    // We get the exact book that is selected.
+    data->phbk->current.status.book  = bookActiveBook(WRITE);
 
   Phbk->UpdateAction = CREATE_ENTRY;
   bookGetCurrentStatus( &Phbk->phbk->current.status );
@@ -985,14 +980,13 @@
     T_phbk          *Phbk       = data->phbk;
 
 
-
   deleteFromFile(Phbk,Phbk->current.status.book);
   bookShowInformation( Phbk->win, MmiBookCurrentText(),NULL, NULL );
   bookMenuDestroy(Phbk->menu_call_options_win);
 // July 21, 2006    REF:DR OMAPS00085695  x0047075
     // Fix : Always sending the CALLS_LIST_INIT event whenever we delete an entry from LDN ,LRN,LMN phonebook.
 //  if(Phbk->current.status.used_entries > 0)
-//	  SEND_EVENT(Phbk->calls_list_win, SEARCH_SCROLL_UP, 0, 0 );
+//    SEND_EVENT(Phbk->calls_list_win, SEARCH_SCROLL_UP, 0, 0 );
   SEND_EVENT(Phbk->calls_list_win, CALLS_LIST_INIT, 0, (void*)Phbk->current.status.book );
   return 1;
 }
@@ -1019,13 +1013,11 @@
     tBookStandard   *data       = (tBookStandard *) win_data->user;
     T_phbk          *Phbk       = data->phbk;
 
-  bookCallDetailsStart( Phbk->win);
-  return 1;
-
+    bookCallDetailsStart( Phbk->win);
+    return 1;
 }
 
 
-
 /*******************************************************************************
 
  $Function:     bookServiceNumbers
@@ -1047,8 +1039,8 @@
     tBookStandard   *data       = (tBookStandard *) win_data->user;
 
     data->phbk->current.KindOfSearch = SEARCH_BY_NAME;
-  data->phbk->current.status.book = PHB_SDN;
-  data->phbk->search_win = bookSearchStart( data->phbk->win );
+    data->phbk->current.status.book = PHB_SDN;
+    data->phbk->search_win = bookSearchStart( data->phbk->win );
 
     return MFW_EVENT_CONSUMED;
 }
@@ -1073,7 +1065,7 @@
     /* This performs the memory view functions, and returns MFW_EVENT_CONSUMED
        in all cases.
     */
-  bookMemoryView();
+    bookMemoryView();
     return MFW_EVENT_CONSUMED;
 }
 
@@ -1137,7 +1129,7 @@
 {
     T_MFW_HND     win         = mfwParent( mfw_header() );
 
-  bookPhonebookStart(win,PhbkRedialListNormal);
+    bookPhonebookStart(win,PhbkRedialListNormal);
     return MFW_EVENT_CONSUMED;
 }
 /*******************************************************************************
@@ -1158,7 +1150,7 @@
 {
     T_MFW_HND     win         = mfwParent( mfw_header() );
 
-  bookPhonebookStart(win,PhbkReplyListNormal);
+    bookPhonebookStart(win,PhbkReplyListNormal);
     return MFW_EVENT_CONSUMED;
 }
 
@@ -1209,24 +1201,24 @@
 PROTECTED_MENU_HANDLER( bookSelectBook )
 {
     T_MFW_HND     win         = mfwParent( mfw_header() );
-	T_MFW_WIN     *win_data   = ( (T_MFW_HDR *) win )->data;
+    T_MFW_WIN     *win_data   = ( (T_MFW_HDR *) win )->data;
     tBookStandard   *data       = (tBookStandard *) win_data->user;
     T_phbk          *Phbk       = data->phbk;
-	T_MFW_HND		menu_win;
-	UBYTE			selectedBook;
+    T_MFW_HND       menu_win;
+    UBYTE           selectedBook;
 
-	TRACE_FUNCTION("bookSelectBook");
+    TRACE_FUNCTION("bookSelectBook");
 
-	if (bookGetBookAvailable())
-	{
-		selectedBook = (UBYTE)bookGetBookSelected();
-		menu_win = bookMenuStart(Phbk->win, SelectBookAttributes(), 0);
-		SEND_EVENT(menu_win, DEFAULT_OPTION, NULL, (void *)&selectedBook); // Add our own callback
-	}
-	else
-	{
-		bookShowInformation( Phbk->win, TxtNotAvailable, NULL, NULL);
-	}
+    if (bookGetBookAvailable())
+    {
+        selectedBook = (UBYTE)bookGetBookSelected();
+        menu_win = bookMenuStart(Phbk->win, SelectBookAttributes(), 0);
+        SEND_EVENT(menu_win, DEFAULT_OPTION, NULL, (void *)&selectedBook); // Add our own callback
+    }
+    else
+    {
+        bookShowInformation( Phbk->win, TxtNotAvailable, NULL, NULL);
+    }
 
     return MFW_EVENT_CONSUMED;
 }
@@ -1247,17 +1239,17 @@
 PROTECTED_MENU_HANDLER( bookSelectBookSIM )
 {
     T_MFW_HND     win         = mfwParent( mfw_header() );
-	T_MFW_WIN     *win_data   = ( (T_MFW_HDR *) win )->data;
+    T_MFW_WIN     *win_data   = ( (T_MFW_HDR *) win )->data;
     tBookStandard   *data       = (tBookStandard *) win_data->user;
     T_phbk          *Phbk       = data->phbk;
 
-	if (bookGetBookAvailable())
-	{
-		bookSetBookSelected(FALSE);
-		bookShowInfoScreen( Phbk->win, TxtPleaseWait, NULL, (T_VOID_FUNC)bookChangePB, (USHORT)bookGetBookSelected(), 100);
-	}
-	else
-		bookShowInfoScreen( Phbk->win, TxtPhonebook, TxtChanged, NULL, NULL, 3000);
+    if (bookGetBookAvailable())
+    {
+        bookSetBookSelected(FALSE);
+        bookShowInfoScreen( Phbk->win, TxtPleaseWait, NULL, (T_VOID_FUNC)bookChangePB, (USHORT)bookGetBookSelected(), 100);
+    }
+    else
+        bookShowInfoScreen( Phbk->win, TxtPhonebook, TxtChanged, NULL, NULL, 3000);
 
     return MFW_EVENT_CONSUMED;
 }
@@ -1277,20 +1269,20 @@
 
 PROTECTED_MENU_HANDLER( bookSelectBookPhone )
 {
-    T_MFW_HND		win			= mfwParent( mfw_header() );
-	T_MFW_WIN		*win_data	= ( (T_MFW_HDR *) win )->data;
-    tBookStandard	*data		= (tBookStandard *) win_data->user;
-    T_phbk          *Phbk		= data->phbk;
+    T_MFW_HND       win         = mfwParent( mfw_header() );
+    T_MFW_WIN       *win_data   = ( (T_MFW_HDR *) win )->data;
+    tBookStandard   *data       = (tBookStandard *) win_data->user;
+    T_phbk          *Phbk       = data->phbk;
 
-	if (bookGetBookAvailable())
-	{
-		bookSetBookSelected(TRUE);
-		bookShowInfoScreen( Phbk->win, TxtPleaseWait, NULL, (T_VOID_FUNC)bookChangePB, (USHORT)bookGetBookSelected(), 100);
-	}
-	else
-	{
-		bookShowInformation( Phbk->win, TxtNotAvailable,NULL, NULL );
-	}
+    if (bookGetBookAvailable())
+    {
+        bookSetBookSelected(TRUE);
+        bookShowInfoScreen( Phbk->win, TxtPleaseWait, NULL, (T_VOID_FUNC)bookChangePB, (USHORT)bookGetBookSelected(), 100);
+    }
+    else
+    {
+        bookShowInformation( Phbk->win, TxtNotAvailable,NULL, NULL );
+    }
 
     return MFW_EVENT_CONSUMED;
 }
@@ -1309,23 +1301,23 @@
 
 PROTECTED_MENU_HANDLER( bookCopyEntry )
 {
-	T_MFW_HND			win         = mfwParent( mfw_header() );
-	T_MFW_WIN			*win_data   = ( (T_MFW_HDR *) win )->data;
-    tBookStandard		*data       = (tBookStandard *) win_data->user;
-    T_phbk				*Phbk       = data->phbk;
+    T_MFW_HND           win         = mfwParent( mfw_header() );
+    T_MFW_WIN           *win_data   = ( (T_MFW_HDR *) win )->data;
+    tBookStandard       *data       = (tBookStandard *) win_data->user;
+    T_phbk              *Phbk       = data->phbk;
 
-  	TRACE_FUNCTION( "bookCopyEntry()" );
+    TRACE_FUNCTION( "bookCopyEntry()" );
 
-	if (bookGetBookAvailable())
-	{
-	    /* Show Please Wait dialog briefly, then call copy function
-	    */
-	    bookShowInfoScreen( Phbk->win, TxtPleaseWait, NULL, (T_VOID_FUNC)bookCopySingle, (USHORT)FALSE, 100);
-	}
-	else
-	{
-		bookShowInformation( Phbk->win, TxtNotAvailable, NULL, NULL);
-	}
+    if (bookGetBookAvailable())
+    {
+        /* Show Please Wait dialog briefly, then call copy function
+        */
+        bookShowInfoScreen( Phbk->win, TxtPleaseWait, NULL, (T_VOID_FUNC)bookCopySingle, (USHORT)FALSE, 100);
+    }
+    else
+    {
+        bookShowInformation( Phbk->win, TxtNotAvailable, NULL, NULL);
+    }
 
     return MFW_EVENT_CONSUMED;
 }
@@ -1344,23 +1336,23 @@
 
 PROTECTED_MENU_HANDLER( bookCopyAll )
 {
-	T_MFW_HND			win         = mfwParent( mfw_header() );
-	T_MFW_WIN			*win_data   = ( (T_MFW_HDR *) win )->data;
-    tBookStandard		*data       = (tBookStandard *) win_data->user;
-    T_phbk				*Phbk       = data->phbk;
+    T_MFW_HND           win         = mfwParent( mfw_header() );
+    T_MFW_WIN           *win_data   = ( (T_MFW_HDR *) win )->data;
+    tBookStandard       *data       = (tBookStandard *) win_data->user;
+    T_phbk              *Phbk       = data->phbk;
 
-  	TRACE_FUNCTION( "bookCopyAll()" );
+    TRACE_FUNCTION( "bookCopyAll()" );
 
-	if (bookGetBookAvailable())
-	{
-	    /* Copy
-	    */
-	    bookCopyMultiple(Phbk->win, FALSE, 0);
-	}
-	else
-	{
-		bookShowInformation( Phbk->win, TxtNotAvailable, NULL, NULL);
-	}
+    if (bookGetBookAvailable())
+    {
+        /* Copy
+        */
+        bookCopyMultiple(Phbk->win, FALSE, 0);
+    }
+    else
+    {
+        bookShowInformation( Phbk->win, TxtNotAvailable, NULL, NULL);
+    }
 
     return MFW_EVENT_CONSUMED;
 }
@@ -1379,23 +1371,23 @@
 
 PROTECTED_MENU_HANDLER( bookMoveEntry )
 {
-  	T_MFW_HND			win         = mfwParent( mfw_header() );
-	T_MFW_WIN			*win_data   = ( (T_MFW_HDR *) win )->data;
-    tBookStandard		*data       = (tBookStandard *) win_data->user;
-    T_phbk				*Phbk       = data->phbk;
+    T_MFW_HND           win         = mfwParent( mfw_header() );
+    T_MFW_WIN           *win_data   = ( (T_MFW_HDR *) win )->data;
+    tBookStandard       *data       = (tBookStandard *) win_data->user;
+    T_phbk              *Phbk       = data->phbk;
 
-  	TRACE_FUNCTION( "bookMoveEntry()" );
+    TRACE_FUNCTION( "bookMoveEntry()" );
 
-	if (bookGetBookAvailable())
-	{
-	    /* Show Please Wait dialog briefly, then call move function
-	    */
-	    bookShowInfoScreen( Phbk->win, TxtPleaseWait, NULL, (T_VOID_FUNC)bookCopySingle, (USHORT)TRUE, 100);
-	}
-	else
-	{
-		bookShowInformation( Phbk->win, TxtNotAvailable, NULL, NULL);
-	}
+    if (bookGetBookAvailable())
+    {
+        /* Show Please Wait dialog briefly, then call move function
+        */
+        bookShowInfoScreen( Phbk->win, TxtPleaseWait, NULL, (T_VOID_FUNC)bookCopySingle, (USHORT)TRUE, 100);
+    }
+    else
+    {
+        bookShowInformation( Phbk->win, TxtNotAvailable, NULL, NULL);
+    }
 
     return MFW_EVENT_CONSUMED;
 }
@@ -1414,23 +1406,23 @@
 
 PROTECTED_MENU_HANDLER( bookMoveAll )
 {
-	T_MFW_HND			win         = mfwParent( mfw_header() );
-	T_MFW_WIN			*win_data   = ( (T_MFW_HDR *) win )->data;
-    tBookStandard		*data       = (tBookStandard *) win_data->user;
-    T_phbk				*Phbk       = data->phbk;
+    T_MFW_HND           win         = mfwParent( mfw_header() );
+    T_MFW_WIN           *win_data   = ( (T_MFW_HDR *) win )->data;
+    tBookStandard       *data       = (tBookStandard *) win_data->user;
+    T_phbk              *Phbk       = data->phbk;
 
-  	TRACE_FUNCTION( "bookMoveAll()" );
+    TRACE_FUNCTION( "bookMoveAll()" );
 
-	if (bookGetBookAvailable())
-	{
-	    /* Show Please Wait dialog briefly, then call copy function
-	    */
-	    bookCopyMultiple(Phbk->win, TRUE, 0);
-	}
-	else
-	{
-		bookShowInformation( Phbk->win, TxtNotAvailable, NULL, NULL);
-	}
+    if (bookGetBookAvailable())
+    {
+        /* Show Please Wait dialog briefly, then call copy function
+        */
+        bookCopyMultiple(Phbk->win, TRUE, 0);
+    }
+    else
+    {
+        bookShowInformation( Phbk->win, TxtNotAvailable, NULL, NULL);
+    }
 
     return MFW_EVENT_CONSUMED;
 }
@@ -1439,18 +1431,15 @@
 
 PIN2RQD_MENU_HANDLER( CphsAlsLock )
 {
-	return cphs_lock_als( Menu, Item );
+    return cphs_lock_als( Menu, Item );
 }
 
 PIN2RQD_MENU_HANDLER( CphsAlsUnlock )
 {
-	return cphs_unlock_als( Menu, Item );
+    return cphs_unlock_als( Menu, Item );
 }
 /*******************************************************************************
 
                                 End of File
 
 *******************************************************************************/
-
-
-