/**---------------------------------------------------------------------------
 ** 
 ** view_nbr.h -- 
 ** 
 ** Author          : Pierre Jaccard
 ** Created On      : 1999/07/27 12:52:31
 ** Last Modified By: Pierre Jaccard
 ** Last Modified On: 1999/07/30 10:59:04
 ** Update Count    : 11
 ** Directory       : /pcdata1/jaccard/codas3c/gfi/src/apps/nbr/
 ** Version         : 0.0
 ** Status          : Unknown
 ** ---------------------------------------------------------------------- ** 
 ** DESCRIPTION: 
 ** 
 **    Undocumented.
 ** 
 ** ---------------------------------------------------------------------- ** 
 ** REVISIONS: 
 ** ---------------------------------------------------------------------- ** 
 ** CHANGES: 
 **------------------------------------------------------------------------**/

#include "geninc.h"
#include "dbsource.h"
#include "gfimisc.h"
#include "gfinbr.h"

/* ------------------------------------------------------------------
   Content of previous keyboard.h file
   ------------------------------------------------------------------ */

#ifndef   keyboard_already_included
#define   keyboard_already_included

/*
#include <stdio.h>
#include <string.h>
*/

/* 
	 -Extended Characters:

	 All characters are considered extended with a length of
	 [[EXTENDED_CHAR_LENGTH]]. Non-exetended or 'less-extended' characters are
	 prefixed with '\000' bytes.
	 */

#define EXTENDED_CHAR_LENGTH 4

/*
	-Keyboard Type:

	This type defines a structure for holding the values of all bytes. A string
	is also provided for the name of the character. A keyboard table must end
	with all 	characters [[\000]] and the name [[empty_char]].  
	*/

typedef struct {
	char ext[EXTENDED_CHAR_LENGTH];
	char name[30];
} KBD_CHAR_TYPE;

/*
	-Keyboard Definitions:

	The following variable defines byte sequences for basic keyboard inputs.
	*/

static KBD_CHAR_TYPE kbd_table[]=
{
	{{'\000', '\033', '\133', '\101'}, "north"},
	{{'\000', '\033', '\133', '\102'}, "south"},
	{{'\000', '\033', '\133', '\103'}, "east"},
	{{'\000', '\033', '\133', '\104'}, "west"},
	{{'\033', '\133', '\062', '\176'}, "insert"},
	{{'\000', '\033', '\133', '\110'}, "home"},
	{{'\033', '\133', '\065', '\176'}, "page_up"},
	{{'\000', '\033', '\133', '\106'}, "end"},
	{{'\033', '\133', '\066', '\176'}, "page_down"},
	{{'\000', '\000', '\000', '\000'}, "empty_char"}  /* Must be the last one in
																											 the list*/
};

/*
	-Translation Table:

	The next type is for keyborad translation tables. These allow to define
	equivalences 	between different keyboard inputs. 
	*/

typedef struct {
	char name[30];
	char c;
} KBD_TRANSLATION_TABLE_TYPE;

/*
	-Function Declarations:
	*/

#if PROTOTYPE_ALLOWED
int key_name(KBD_CHAR_TYPE *kbd_char);
#else
int key_name();
#endif

#if PROTOTYPE_ALLOWED
int translate_key(KBD_CHAR_TYPE *kbd_char, 
									KBD_TRANSLATION_TABLE_TYPE *kbd_table);
#else
int translate_key();
#endif

#if PROTOTYPE_ALLOWED
int read_key(KBD_TRANSLATION_TABLE_TYPE *trans_table);
#else
int read_key();
#endif

#endif /* keyboard_already_included */

/* ------------------------------------------------------------------
   Content of previous menu.h file
   ------------------------------------------------------------------ */

#ifndef   menu_already_included
#define  menu_already_included

/*
#include <stdio.h>
#include <string.h>
*/

#define MENU_START_CHAR '<'
#define MENU_END_CHAR		'>'

/*
	-Function Declarations:
	*/

#if PROTOTYPE_ALLOWED
int print_menu(char *menu_file, char *menu_name);
#else
int print_menu();
#endif


#endif /* menu_already_included */

/* ##################################################################
	 -Type Definitions:
	 ################################################################## */

/* ------------------------------------------------------------------
	 --View Information:

	 The following structure is used to keep track about which buffers and bins
	 should displayed to screen
	 ------------------------------------------------------------------ */

typedef struct
{
	char  code;       /* value code used for user input selections */
	char *name;       /* unique name of buffer                     */
	SHORT first_bin;  /* number of first bin to display            */
} VIEW_INFO_TYPE;

/* ------------------------------------------------------------------
	 --Output List:

	 The following structure is used to define how data should be output for
	 each variable. It is used by [[update_output]] and [[update_view]].
	 ------------------------------------------------------------------ */

typedef struct
{
	char *fmt;      /* Format string                              */
	char *ptr;      /* Pointer to data                            */
	SHORT code;     /* code to specify type of data               */
	ULONG bits;     /* presence bit to test prior to display      */
	SHORT nbins;    /* increment value for successive data values */
} VIEW_OUTPUT_LIST_TYPE; 

/* ##################################################################
	 -Global Variables:
	 ################################################################## */

/* ------------------------------------------------------------------
	 --Menu File:

	 The fact of using text files for menus makes it more flexible for correcting
	 menus text. However, it is a constrain because the program must know where
	 to find the menu file.
	 ------------------------------------------------------------------ */

static FILE_NAME_TYPE menu_file
	 ="/data1/jaccard/codas3/gfi/etc/view_nbr.mnu";

/* ------------------------------------------------------------------
	 --List of Files:

	 The next variable is for the name of the file containing the list of file
	 names to read.
	 ------------------------------------------------------------------ 

static FILE_NAME_TYPE file_list;
*/
														
/* ------------------------------------------------------------------
	--Display:
	------------------------------------------------------------------ */

#define NB_BINS_PER_PAGE 32		/* Number of bins to display per screen page 
																 A value 0f 32 means 4 pages if 128 bins   */


/* ------------------------------------------------------------------
	 --Initialization of View Information:
	 ------------------------------------------------------------------ */

static VIEW_INFO_TYPE vinfo[]=
{
	{'1', "HEADER", 0},
	{'2', "LEADER", 0},
	{'3', "RAW VELOCITY", 0},
	{'4', "SPECTRAL WIDTH", 0},
	{'5', "ECHO INTENSITY", 0},
	{'6', "PERCENT GOOD", 0},
	{'7', "RAW STATUS", 0},
	{'8', "CONVERTED VELOCITY", 0},
	{'9', "CONVERTED STATUS", 0},
	{'\0', "", 0}
};

/* ------------------------------------------------------------------
	 --Initialization of Output List:

	 A global variable to contain a complete ensemble data set is necessary for
	 initialization of the output list.

	 Each buffer that can be displayed must begin with a format containing the
	 corresponding name defined in the the view information above. An entry with
	 a [[NULL]] format| closes the list for current buffer.

	 An entry with a negative code value closes the list.

	 See [[update_view]] function for more information.
	 ------------------------------------------------------------------ */
	 
static NBR_ENSEMBLE_TYPE tmp_ens;
static VIEW_OUTPUT_LIST_TYPE output_list[]=
{
	/* ----------- Header Data ----------- */
	{"HEADER: buffer sizes:\n\n", (char *) NULL, 0, 0, 0},
	{   "Output         : %04Xh *** %6dd\n", 
			(char *) &(tmp_ens.header.output_buffer_size), 
			USHORT_VALUE_CODE, HEADER_PRESENT, 1},
	{   "Leader         : %04Xh *** %6dd\n",
			(char *) &(tmp_ens.header.leader_buffer_size), 
			USHORT_VALUE_CODE, HEADER_PRESENT, 1},
	{   "Velocity       : %04Xh *** %6dd\n",
			(char *) &(tmp_ens.header.velocity_buffer_size), 
			USHORT_VALUE_CODE, HEADER_PRESENT, 1}, 
	{   "Spectral Width : %04Xh *** %6dd\n",
			(char *) &(tmp_ens.header.spectral_width_buffer_size),
			USHORT_VALUE_CODE, HEADER_PRESENT, 1},
	{   "Echo Instensity: %04Xh *** %6dd\n",
			(char *) &(tmp_ens.header.echo_intensity_buffer_size),
			USHORT_VALUE_CODE, HEADER_PRESENT, 1},
	{   "Percent Good   : %04Xh *** %6dd\n",
			(char *) &(tmp_ens.header.percent_good_buffer_size), 
			USHORT_VALUE_CODE, HEADER_PRESENT, 1},
	{   "Status         : %04Xh *** %6dd\n",
			(char *) &(tmp_ens.header.status_buffer_size), 
			USHORT_VALUE_CODE, HEADER_PRESENT, 1},
	{   "CHECKSUM       : %04Xh *** %6dd\n",
			(char *) &(tmp_ens.checksum), USHORT_VALUE_CODE, HEADER_PRESENT, 1},
	/* ----------------------------------- */
	{(char *) NULL, (char *) NULL, 0, 0, 0}, 
	/* ----------- Leader Data ----------- */
	{"***** LEADER: Raw Data *****\n", (char *) NULL, 0, 0, 0},
	{   "Time between ensembles:            %02d",
			(char *) &(tmp_ens.leader.time_between_pings.minutes), 
			UBYTE_VALUE_CODE, LEADER_PRESENT, 1}, 
	{   ":%02d",
			(char *) &(tmp_ens.leader.time_between_pings.seconds), 
			UBYTE_VALUE_CODE, LEADER_PRESENT, 1},
	{   ".%02d s\n",
			(char *) &(tmp_ens.leader.time_between_pings.hundredths), 
			UBYTE_VALUE_CODE, LEADER_PRESENT, 1},
	{   "Pings per Ensemble:                %04Xh %06ud\n",
			(char *) &(tmp_ens.leader.pings_per_ensemble), 
			USHORT_VALUE_CODE, LEADER_PRESENT, 1},
	{   "Number of Bins:                    %02Xh %03ud\n", 
			(char *) &(tmp_ens.leader.number_of_bins), 
			UBYTE_VALUE_CODE, LEADER_PRESENT, 1},
	{   "Raw Bin Length:                    %02Xh %03ud (power of 2)\n",
			(char *) &(tmp_ens.leader.raw_bin_length), 
			UBYTE_VALUE_CODE, LEADER_PRESENT, 1},
	{   "XMT Pulse length:                  %02Xh %03ud m\n",
			(char *) &(tmp_ens.leader.xmt_pulse_length), 
			UBYTE_VALUE_CODE, LEADER_PRESENT, 1},
	{   "Blank After XMT:                   %02Xh %03ud m\n",
			(char *) &(tmp_ens.leader.blank_after_xmt), 
			UBYTE_VALUE_CODE, LEADER_PRESENT, 1}, 
	{   "Delay After Blank:                 %02Xh %03ud m\n",
			(char *) &(tmp_ens.leader.delay_after_blank), 
			UBYTE_VALUE_CODE, LEADER_PRESENT, 1},
	{   "Bit Status:                        %02Xh\n", 
			(char *) &(tmp_ens.leader.bit_status), 
			UBYTE_VALUE_CODE, LEADER_PRESENT, 1},
	{   "ADCP Config:                       %02Xh\n", 
			(char *) &(tmp_ens.leader.adcp_config), 
			UBYTE_VALUE_CODE, LEADER_PRESENT, 1},
	{   "Signal/Noise Threshold:            %02Xh %03ud\n",
			(char *) &(tmp_ens.leader.signal_noise_threshold), 
			UBYTE_VALUE_CODE, LEADER_PRESENT, 1},  
	{   "Percent Good Threshold:            %02Xh %03ud\n",
			(char *) &(tmp_ens.leader.percent_good_threshold), 
			UBYTE_VALUE_CODE, LEADER_PRESENT, 1},
	{   "Pitch Tilt:                        %04Xh %06du\n",
			(char *) &(tmp_ens.leader.pitch_tilt), 
			SHORT_VALUE_CODE, LEADER_PRESENT, 1}, 
	{   "Roll Tilt:                         %04Xh %06ud\n", 
			(char *) &(tmp_ens.leader.roll_tilt), 
			SHORT_VALUE_CODE, LEADER_PRESENT, 1}, 
	{   "Heading Tilt:                      %04Xh %06ud\n", 
			(char *) &(tmp_ens.leader.heading), 
			USHORT_VALUE_CODE, LEADER_PRESENT, 1},
	{   "ADCP Temperature:                  %04Xh %06ud\n", 
			(char *) &(tmp_ens.leader.adcp_temp), 
			USHORT_VALUE_CODE, LEADER_PRESENT, 1}, 
	{   "High Voltage In:                   %02Xh %03ud\n",
			(char *) &(tmp_ens.leader.high_voltage_in), 
			UBYTE_VALUE_CODE, LEADER_PRESENT, 1}, 
	{   "XMT Current:                       %02Xh %03ud\n",
			(char *) &(tmp_ens.leader.xmt_current), 
			UBYTE_VALUE_CODE, LEADER_PRESENT, 1},
	{   "Low Voltage In:                    %02Xh %03ud\n",
			(char *) &(tmp_ens.leader.low_voltage_in), 
			UBYTE_VALUE_CODE, LEADER_PRESENT, 1},
	{   "CTD Conductivity Count:      (MSB) %02Xh %02Xh %02Xh (LSB)\n",
			(char *) (tmp_ens.leader.raw_ctd_conductivity_count), 
			UBYTE_VALUE_CODE, LEADER_PRESENT, 3},
	{   "CTD Temperature Count:       (MSB) %02Xh %02Xh %02Xh (LSB)\n",
			(char *) (tmp_ens.leader.raw_ctd_temperature_count), 
			UBYTE_VALUE_CODE, LEADER_PRESENT, 3},
	{   "CTD Depth Count:             (MSB) %02Xh %02Xh %02Xh (LSB)\n",
			(char *) (tmp_ens.leader.raw_ctd_depth_count), 
			UBYTE_VALUE_CODE, LEADER_PRESENT, 3},
	{   "Raw Bottom Track Velocities: (MSB) %02Xh %02Xh %02Xh %02Xh %02Xh %02Xh (LSB) \n", 
			(char *) (tmp_ens.leader.raw_bottom_track_velocities), 
			UBYTE_VALUE_CODE, LEADER_PRESENT, 6},
	{   "Bottom Track Range:                  %04Xh   %04Xh   %04Xh   %04Xh\n",
			(char *) (tmp_ens.leader.bottom_track_range), 
			USHORT_VALUE_CODE, LEADER_PRESENT, 4}, 
	{   "                                   %06ud %06ud %06ud %06ud\n",
			(char *) (tmp_ens.leader.bottom_track_range), 
			USHORT_VALUE_CODE, LEADER_PRESENT, 4},
	{   "Pitch Standard Deviation:          %02Xh %06ud\n",
			(char *) &(tmp_ens.leader.pitch_std_dev), 
			UBYTE_VALUE_CODE, LEADER_PRESENT, 1},
	{   "Roll Standard Deviation:           %02Xh %06ud\n",
			(char *) &(tmp_ens.leader.roll_std_dev), 
			UBYTE_VALUE_CODE, LEADER_PRESENT, 1},
	{   "Heading Standard Deviation:        %02Xh %06ud\n",
			(char *) &(tmp_ens.leader.heading_std_dev), 
			UBYTE_VALUE_CODE, LEADER_PRESENT, 1},
	{   "CTD Measurement Interval:    (MSB) %02Xh %02Xh %02Xh (LSB)\n",
			(char *) (tmp_ens.leader.raw_ctd_measurement_interval), 
			UBYTE_VALUE_CODE, LEADER_PRESENT, 3},
	{   "Raw Bottom Track Percent Good:     %02Xh %02Xh\n",
			(char *) (tmp_ens.leader.raw_bottom_track_percent_good), 
			UBYTE_VALUE_CODE, LEADER_PRESENT, 2},
	{"\n***** Converted Data *****\n", (char *) NULL, 0, 0, 0},
	{   "Bin Length:                        %02ud\n", 
			(char *) &(tmp_ens.bin_length), 
			UBYTE_VALUE_CODE, LEADER_PRESENT, 1}, 
	{   "Bottom Track Velocity:                %04Xh    %04Xh    %04Xh    %04Xh\n",
			(char *) (tmp_ens.bottom_track_velocity), 
			USHORT_VALUE_CODE, LEADER_PRESENT, 4},
  {   "                                   %+07dd %+07dd %+07dd %+07dd\n",
			(char *) (tmp_ens.bottom_track_velocity), 
			SHORT_VALUE_CODE, LEADER_PRESENT, 4},
	{   "Bottom Track Percent Good:          %02Xh  %02Xh  %02Xh  %02Xh\n",
			(char *) (tmp_ens.bottom_track_percent_good), 
			UBYTE_VALUE_CODE, LEADER_PRESENT, 4},
  {   "                                   %03ud %03ud %03ud %03ud\n",
			(char *) (tmp_ens.bottom_track_percent_good), 
			UBYTE_VALUE_CODE, LEADER_PRESENT, 4},
	{   "CTD Conductivity Count:            %08Xh %012ud\n",
			(char *) &(tmp_ens.ctd_conductivity_count), 
			ULONG_VALUE_CODE, LEADER_PRESENT, 1},
	{   "CTD Temperature Count:             %08Xh %012ud\n",
			(char *) &(tmp_ens.ctd_temperature_count), 
			ULONG_VALUE_CODE, LEADER_PRESENT, 1},
	{   "CTD Depth Count:                   %08Xh %012ud\n",
			(char *) &(tmp_ens.ctd_depth_count), 
			ULONG_VALUE_CODE, LEADER_PRESENT, 1},
	{   "CTD Measurement Interval Count:    %08Xh %012ud\n",
			(char *) &(tmp_ens.ctd_measurement_interval), 
			ULONG_VALUE_CODE, LEADER_PRESENT, 1},
	/* ----------------------------------------- */
	{(char *) NULL, (char *) NULL, 0, 0, 0},
	/* ----------- Raw Velocity Data ----------- */
	{"***** RAW VELOCITY *****\n\n", (char *) NULL, 0, 0, 0},
	{   "  bin  byte #1  byte #2  byte #3  byte #4  byte #5  byte #6\n",
			(char *) NULL, 0, VELOCITY_PRESENT, 0},
	{   "  ---------------------------------------------------------\n",
			(char *) NULL, 0, VELOCITY_PRESENT, 0},
	{   "      %02Xh      %02Xh      %02Xh      %02Xh      %02Xh      %02Xh\n",
			(char *) &(tmp_ens.raw_velocity[0][0]), 
			UBYTE_VALUE_CODE, VELOCITY_PRESENT, 6}, 
	/* ----------------------------------------- */
	{(char *) NULL, (char *) NULL, 0, 0, 0},
	/* ----------- Spectral Width Data ----------- */
	{"***** SPECTRAL WIDTH *****\n\n", (char *) NULL, 0, 0, 0},
	{   "  bin  beam #1  beam #2  beam #3  beam #4", 
			(char *) NULL, 0, SPECTRAL_WIDTH_PRESENT, 0},
	{   "  beam #1  beam #2  beam #3  beam #4\n",
			(char *) NULL, 0, SPECTRAL_WIDTH_PRESENT, 0},
	{   "  ---------------------------------------",
			(char *) NULL, 0, SPECTRAL_WIDTH_PRESENT, 0},
	{   "------------------------------------\n",
			(char *) NULL, 0, SPECTRAL_WIDTH_PRESENT, 0}, 
	{   "      %02Xh      %02Xh      %02Xh      %02Xh     %03dd     %03dd     %03dd     %03dd\n",
			(char *) &(tmp_ens.spectral_width[0][0]), 
			UBYTE_VALUE_CODE, SPECTRAL_WIDTH_PRESENT, 4},
	/* ----------------------------------------- */
	{(char *) NULL, (char *) NULL, 0, 0, 0},
	/* ----------- Echo Intensity Data ----------- */
	{"***** ECHO INTENSITY *****\n\n", (char *) NULL, 0, 0, 0},
	{   "  bin  beam #1  beam #2  beam #3  beam #4", 
			(char *) NULL, 0, ECHO_INTENSITY_PRESENT, 0},
	{   "  beam #1  beam #2  beam #3  beam #4\n",
			(char *) NULL, 0, ECHO_INTENSITY_PRESENT, 0}, 
	{   "  ---------------------------------------",
			(char *) NULL, 0, ECHO_INTENSITY_PRESENT, 0},
	{   "------------------------------------\n",
			(char *) NULL, 0, ECHO_INTENSITY_PRESENT, 0},
	{   "      %02Xh      %02Xh      %02Xh      %02Xh     %03dd     %03dd     %03dd     %03dd\n",
			(char *) &(tmp_ens.echo_intensity[0][0]), 
			UBYTE_VALUE_CODE, ECHO_INTENSITY_PRESENT, 4},
	/* ----------------------------------------- */
	{(char *) NULL, (char *) NULL, 0, 0, 0},
	/* ----------- Percent Good Data ----------- */
	{"***** PERCENT GOOD *****\n\n", (char *) NULL, 0, 0, 0},
	{   "  bin  beam #1  beam #2  beam #3  beam #4", 
			(char *) NULL, 0, PERCENT_GOOD_PRESENT, 0},
	{   "  beam #1  beam #2  beam #3  beam #4\n",
			(char *) NULL, 0, PERCENT_GOOD_PRESENT, 0},
	{   "  ---------------------------------------",
			(char *) NULL, 0, PERCENT_GOOD_PRESENT, 0},
	{   "------------------------------------\n",
			(char *) NULL, 0, PERCENT_GOOD_PRESENT, 0}, 
	{   "      %02Xh      %02Xh      %02Xh      %02Xh     %03dd     %03dd     %03dd     %03dd\n",
			(char *) &(tmp_ens.percent_good[0][0]), 
			UBYTE_VALUE_CODE, PERCENT_GOOD_PRESENT, 4},
	/* ----------------------------------------- */
	{(char *) NULL, (char *) NULL, 0, 0, 0},
	/* ----------- Raw Status Data ----------- */
	{"***** RAW STATUS *****\n\n", (char *) NULL, 0, 0, 0},
	{   "  bin  byte #1  byte #2\n",
			(char *) NULL, 0, STATUS_PRESENT, 0},
	{   "  ---------------------\n",
			(char *) NULL, 0, STATUS_PRESENT, 0},
	{   "      %02Xh      %02Xh\n",
			(char *) &(tmp_ens.raw_status[0][0]), 
			UBYTE_VALUE_CODE, STATUS_PRESENT, 2},
	/* ----------------------------------------- */
	{(char *) NULL, (char *) NULL, 0, 0, 0},
	/* ----------- Velocity Data ----------- */
	{"***** CONVERTED VELOCITY *****\n\n", (char *) NULL, 0, 0, 0},
	{   "  bin  beam #1  beam #2  beam #3  beam #4", 
			(char *) NULL, 0, VELOCITY_PRESENT, 0},
	{   "  beam #1  beam #2  beam #3  beam #4\n",
			(char *) NULL, 0, VELOCITY_PRESENT, 0},
	{   "  ---------------------------------------",
			(char *) NULL, 0, VELOCITY_PRESENT, 0},
	{   "------------------------------------\n",
			(char *) NULL, 0, VELOCITY_PRESENT, 0},
	{   "    %04Xh    %04Xh    %04Xh    %04Xh  %06dd  %06dd  %06dd  %06dd\n",
			(char *) &(tmp_ens.velocity[0][0]), 
			USHORT_VALUE_CODE, VELOCITY_PRESENT, 4}, 
	/* ----------------------------------------- */
	{(char *) NULL, (char *) NULL, 0, 0, 0}, 
	/* ----------- Status Data ----------- */
	{"***** CONVERTED STATUS *****\n\n", (char *) NULL, 0, 0, 0}, 
	{   "  bin  beam #1  beam #2  beam #3  beam #4", 
			(char *) NULL, 0, STATUS_PRESENT, 0}, 
	{   "  beam #1  beam #2  beam #3  beam #4\n",
			(char *) NULL, 0, STATUS_PRESENT, 0}, 
	{   "  ---------------------------------------",
			(char *) NULL, 0, STATUS_PRESENT, 0}, 
	{   "------------------------------------\n",
			(char *) NULL, 0, STATUS_PRESENT, 0},  
	{   "      %02Xh      %02Xh      %02Xh      %02Xh     %03dd     %03dd     %03dd     %03dd\n",
			(char *) &(tmp_ens.status[0][0]), 
			UBYTE_VALUE_CODE, STATUS_PRESENT, 4}, 
	/* ----------------------------------------- */
	{(char *) NULL, (char *) NULL, 0, 0, 0}, 
	{(char *) NULL, (char *) NULL, -1, -1, -1} 
};

/* ------------------------------------------------------------------
	 -Keyboard Inputs:

	 Defined according to [[view_nbr.mnu]] inputs. Here, the [[undef_char]] is
	 not set to allow input of any single character also (So we don't need to
	 redifine them in [[keyboard.h]]).
	 ------------------------------------------------------------------ */

KBD_TRANSLATION_TABLE_TYPE trans_table[]=
{
	{"empty_char", '\000'},
	{"north"     , 'U'},
	{"south"     , 'D'},
	{"east"      , 'N'},
	{"west"      , 'P'},
	{"home"      , 'F'},
	{"page_up"   , 'U'},
	{"page_down" , 'D'},
	{"NULL"      , '\000'}
};








