diff src/ui/bmi/AUITextEntry.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 70ea7526b59e
line wrap: on
line diff
--- a/src/ui/bmi/AUITextEntry.c	Sun Nov 08 05:12:05 2020 +0000
+++ b/src/ui/bmi/AUITextEntry.c	Sun Nov 08 06:39:16 2020 +0000
@@ -27,7 +27,7 @@
 ********************************************************************************
 
  $History: AUITextEntry.c
- 
+
   31/01/02      Original Condat(UK) BMI version.
  $End
 
@@ -100,7 +100,7 @@
  STATIC DATA
 
 ********************************************************************************/
-/*SPR 2175, increased KEY_PAD_MAX and changed tables to allow entry of some 
+/*SPR 2175, increased KEY_PAD_MAX and changed tables to allow entry of some
 accented characters*/
 #define KEY_PAD_MAX 6
 
@@ -108,10 +108,10 @@
 /* API - 01/09/03 - SPR2371 - Move the new character to the end of the multitap sequence */
 /* Alpha mode characters for multi-tap - lower case */
 
-static UBYTE editAlpha [12][KEY_PAD_MAX] =          
+static UBYTE editAlpha [12][KEY_PAD_MAX] =
 {
-    {'.',	',',		'+',		'-',		'=',		'0'},	/*Key 0*/				
-    
+    {'.',	',',		'+',		'-',		'=',		'0'},	/*Key 0*/
+
     {' '	,'?',		'!',		';',		':',		'1'},	/*Key 1*/
     /*    										a grave		a umlaut*/
     {'a', 	'b',		'c',		'2',		'\x85', 	'\x84'}, 	/*Key 2*/
@@ -122,45 +122,45 @@
     /**/
     {'j',	'k',		'l',		'5',		'&', 		'*'}, 	/*Key 5*/
     /*											o-grave		o-umlaut*/
-    {'m',	'n',		'o', 		'6',		'\x95',		'\x94'},    /*Key 6*/ 
+    {'m',	'n',		'o', 		'6',		'\x95',		'\x94'},    /*Key 6*/
     /*														SS*/
 	{'p',	'q',		'r',		's',		'7',		'\xe1'}, 	/*Key 7*/
 	/*											u-grave		u-umlaut*/
 	{'t',	'u',		'v',		'8',		'\x97',		'\x82'}, 	/*Key 8*/
 	/**/
 	{'w',	'x',		'y',		'z',		'9',		'#'},    /*Key 9*/
-	
+
 	{'*',	'*',		'*',		'*',		'*',		'*'}, 	/*Key star, not actually used for multitap*/
-	
+
 	{'#',	'#',		'#',		'#',		'#',		'#'}	/*Key hash, not actually used for multitap*/
 };
 
 /* Alpha mode characters for multi-tap - upper case */
- 
-static UBYTE editAlphaU [12][KEY_PAD_MAX] =      
+
+static UBYTE editAlphaU [12][KEY_PAD_MAX] =
 {
 	{'.',	',',		'+',		'-',		'=',		'0'}, /*Key 0*/
-		
+
     {' ',	'?',		'!',		';',		':', 		'1'}, /*Key 1*/
 /*												A-umlaut	cedilla*/
     {'A',	'B',		'C',		'2',		'\x8e', 	'\x81'}, /*Key 2*/
 /*												E-acute*/
     {'D',	'E',		'F',		'3',		'\x90',		' '}, /*Key 3*/
-    
+
     {'G',	'H',		'I',		'4',		'@', 		' '}, /*Key 4*/
-    
+
     {'J',	'K',		'L',		'5',		'&',		'*'}, /*Key 5*/
 /*												O-umlaut */
-    {'M',	'N',		'O',		'6',		'\x99',		' '},  /*Key 6*/  
+    {'M',	'N',		'O',		'6',		'\x99',		' '},  /*Key 6*/
      /*														SS*/
 	{'P',	'Q',		'R',		'S',		'7',		'\xe1'}, /*Key 7*/
 /*												U-umlaut*/
 	{'T',	'U',		'V',		'8',		'\x9A',		' '}, /*Key 8*/
-	
+
 	{'W',	'X',		'Y',		'Z',		'9', 		'#'}, /*Key 9*/
-	
+
 	{'*',	'*',		'*'			,'*',		'*', 		'*'}, /*Key star, not actually used for multitap*/
-	
+
 	{'#',	'#',		'#',		'#',		'#',		'#'}  /*Key hash, not actually used for multitap*/
 };
 
@@ -179,7 +179,7 @@
 
 /*******************************************************************************
 
- $Function:		AUI_entry_Create  
+ $Function:		AUI_entry_Create
 
  $Description:	Initialises the text entry data.  Allocates memory.  Creates the timer.
 
@@ -188,13 +188,13 @@
  $Arguments:	win		- The window in which the editor is displayed
  				editor	- The editor
  				update	- The event to be sent to the window in order to update it
- 
+
 *******************************************************************************/
 
 T_AUI_ENTRY_DATA *AUI_entry_Create(T_MFW_HND win, T_ED_DATA *editor, U32 update)
 {
 	T_AUI_ENTRY_DATA *entry_data = (T_AUI_ENTRY_DATA *)mfwAlloc(sizeof(T_AUI_ENTRY_DATA));
-	
+
 	entry_data->win			= win;
 	entry_data->update		= update;
 	entry_data->editor		= editor;
@@ -210,13 +210,13 @@
 /*******************************************************************************
 
  $Function:		AUI_entry_Destroy
- 
+
  $Description:	Frees memory associated with text entry.
 
  $Returns:		none.
 
  $Arguments:	entry_data	- The text entry data
- 
+
 *******************************************************************************/
 
 void AUI_entry_Destroy(T_AUI_ENTRY_DATA *entry_data)
@@ -233,7 +233,7 @@
 
 /*******************************************************************************
 
- $Function:		AUI_entry_EditChar 
+ $Function:		AUI_entry_EditChar
 
  $Description:	Sends a character to the text editor.
 
@@ -243,7 +243,7 @@
  				alphachar	- Character to be inserted, or NULL if key tables are to
  							be used
  				multitap	- TRUE if multitap is in progress
- 
+
 *******************************************************************************/
 
 USHORT AUI_entry_EditChar (T_AUI_ENTRY_DATA *entry_data, USHORT alphachar, BOOL multitap)
@@ -278,7 +278,7 @@
 
  $Arguments:	data		- The editor data
  				code		- The key code of the digit to be inserted
- 
+
 *******************************************************************************/
 
 USHORT AUI_entry_EditDigit (T_AUI_ENTRY_DATA *entry_data, UBYTE code)
@@ -289,7 +289,7 @@
 	TRACE_FUNCTION("AUITextEntry: AUI_entry_EditDigit()");
 
 	alphachar = ATB_char_Unicode(editControls[code]);
-	
+
 	ATB_edit_MultiTap(editor, alphachar, FALSE);
 
     return alphachar;
@@ -298,14 +298,14 @@
 
 /*******************************************************************************
 
- $Function:  AUI_entry_Timer  
+ $Function:  AUI_entry_Timer
 
  $Description:	 executes the timer event from the edit component
 
  $Returns:		none.
 
- $Arguments:	
- 
+ $Arguments:
+
 *******************************************************************************/
 
 static int AUI_entry_Timer (MfwEvt event, MfwTim *timer)
@@ -321,29 +321,29 @@
 	    if (ATB_edit_Mode(entry_data->editor, ED_MODE_ALPHA))
 	    {
 		    AUI_entry_EditChar(entry_data, NULL, FALSE);
-			
+
 		    entry_data->Level = KEY_PAD_MAX-1;
 		    entry_data->Key = KCD_MAX;
 	    }
 
 	    SEND_EVENT(entry_data->win, entry_data->update,0,0);
 	}
-	
+
     return 1;
 }
 
 
 /*******************************************************************************
 
- $Function:  	AUI_entry_StopMultitap  
+ $Function:  	AUI_entry_StopMultitap
 
  $Description:	Stops a multitap operation going on, cancelling the timer
 				SPR#2174 - SH - Added
-				
+
  $Returns:		none.
 
  $Arguments:	entry_data - The entry data
- 
+
 *******************************************************************************/
 
 void AUI_entry_StopMultitap(T_AUI_ENTRY_DATA *entry_data)
@@ -353,24 +353,24 @@
 	timStop(entry_data->editTim);
 
     entry_data->editor->multitap = FALSE;
-    
+
     entry_data->Level = KEY_PAD_MAX-1;
-	entry_data->Key = KCD_MAX; 
-	
+	entry_data->Key = KCD_MAX;
+
     return;
 }
 
 
 /*******************************************************************************
 
- $Function:		AUI_entry_EventKey  
+ $Function:		AUI_entry_EventKey
 
  $Description:	Process a keypress event.
 
  $Returns:		The character that is entered, or NULL.
 
- $Arguments:	
- 
+ $Arguments:
+
 *******************************************************************************/
 
 USHORT AUI_entry_EventKey (T_AUI_ENTRY_DATA *entry_data, MfwEvt event, MfwKbd *key)
@@ -379,25 +379,25 @@
 	USHORT			alphachar;												// The character entered
 
 	TRACE_FUNCTION("AUIEditor: AUI_entry_EventKey");
-	
+
 	alphachar = AUI_entry_Keypress(entry_data, event, key);
 
 	ATB_edit_Refresh(editor);
-	
+
 	return alphachar;
 }
 
 
 /*******************************************************************************
 
- $Function:		AUI_entry_Keypress  
+ $Function:		AUI_entry_Keypress
 
  $Description:	Process a keypress event
 
  $Returns:		The character that is entered, or NULL.
 
- $Arguments:	
- 
+ $Arguments:
+
 *******************************************************************************/
 
 static USHORT AUI_entry_Keypress(T_AUI_ENTRY_DATA *entry_data, MfwEvt event, MfwKbd *key)
@@ -407,11 +407,11 @@
 	T_ED_CASE_PREF	casePref;
 
 	TRACE_FUNCTION("AUIEditor: AUI_entry_KeypressFormat()");
-	
+
 	alphachar = NULL;
-			
+
 	if (key->code!=KCD_HUP && editor->cursor.pos<(editor->attr->size-1)) /* SPR#1995 - SH */
-	{		       
+	{
 		/* Multi-tap: The user presses a different key, meaning the previous character must be entered */
 
     	if (entry_data->Key != KCD_MAX && entry_data->Key != key->code)
@@ -424,15 +424,15 @@
 		}
 
 		casePref = ATB_edit_GetCasePref(editor);	/* Work out the format character that will govern the format of this keypress */
-			
+
         if (editor->cursor.pos < (editor->attr->size-1) && casePref!=ED_CASEPREF_NONE) /* SPR#1995 - SH */					// Make sure we can still show a character
-        { 	
+        {
 			if (key->code <= KCD_HASH)						/* SPR#1788 - SH - Now accept 0-9, * and # */
 			{
 				entry_data->Key = key->code;										// Store the key pressed
-				
+
 				/* Numeric */
-				
+
 				if (casePref==ED_CASEPREF_NUM)												// A numeric digit is expected
 				{
 					alphachar = AUI_entry_GetKeyChar(entry_data, casePref);
@@ -446,11 +446,11 @@
 	  			else										// Valid format codes
 	  			{
 		          	alphachar = NULL;
-		          	
+
 					entry_data->Level++;												// Increment through list of symbols
 					if (entry_data->Level > (KEY_PAD_MAX-1))							// List wraps round
 						entry_data->Level = 0;
-					
+
 		    		alphachar = AUI_entry_GetKeyChar(entry_data, casePref);
 
 					if (alphachar!=NULL)				// If we've found a character, and string isn't max size
@@ -481,7 +481,7 @@
 
  $Arguments:	case		- the preference for the case of the output
 
- 
+
 *******************************************************************************/
 
 USHORT AUI_entry_GetKeyChar(T_AUI_ENTRY_DATA *entry_data, T_ED_CASE_PREF casePref)
@@ -495,7 +495,7 @@
     UBYTE			caseSel = ATB_edit_GetCase(editor);	/* The case selected by the user */
 
 	TRACE_FUNCTION("AUI_entry_GetKeyChar");
-	
+
 	if (casePref==ED_CASEPREF_NUM || (casePref==ED_CASEPREF_ALPHANUM && caseSel==ED_CASE_NUM))
 	{
 		alphachar = editControls[entry_data->Key];
@@ -507,7 +507,7 @@
 		valid = FALSE;
 		alphachar = NULL;
 		safetycounter = 0;
-		
+
 		while (!valid && safetycounter<KEY_PAD_MAX)
 		{
 			upper = (USHORT)editAlphaU[entry_data->Key][entry_data->Level];
@@ -522,7 +522,7 @@
 						alphachar = lower;
 					valid = TRUE;
 					break;
-					
+
 				case ED_CASEPREF_ALPHANUM_UC:
 					alphachar = upper;
 					valid = TRUE;
@@ -537,7 +537,7 @@
 					alphachar = upper;
 					valid = !ATB_char_IsNumeric(alphachar);
 					break;
-					
+
 				case ED_CASEPREF_ALPHA_LC:
 					alphachar = lower;
 					valid = !ATB_char_IsNumeric(alphachar);
@@ -555,9 +555,9 @@
 		}
 
 		alphachar = ATB_char_Unicode(alphachar);	/* SPR#2342 - SH - Convert from unicode properly */
-	}	
+	}
 
 	TRACE_EVENT_P1(">>> alphachar = %d", alphachar);
-	
+
 	return alphachar;
 }