#define RADIO_LENGTH 17
#define RADIO_LENGTHY 28
#define VFOA 0
#define VFOB 1
#define RM_FT1000 0
#define RM_FT950 1
#define RM_FT5000 2
static gint radio_model = 0;
struct radio_control_vars
{
  gint kbd_band_change;
  gint radio_split;
  gint ready;
  gdouble radio_freq;
};
static struct radio_control_vars rcv = {.kbd_band_change = FALSE,
                                        .radio_split = 0,
                                        .ready = FALSE,
                                        .radio_freq = 0.0};
struct radio_control_settings
{
  gchar co_onoff[12][8];
  gchar co_value[12][8];
  gchar na[12][6];
  gchar sh[12][7];
  gchar is[12][10];
  gchar rf[12][6];
  gchar gt[12][6];
  gchar ra[12][6];
  gchar pa[12][6];
};
static struct radio_control_settings rcs[2] = {
  [0].co_onoff =
   {"CO0000;", "CO0000;", "CO0000;", "CO0000;", "CO0000;", "CO0000;",
    "CO0001;", "CO0001;", "CO0001;", "CO0001;", "CO0001;", "CO0001;"},
  [0].co_value =
   {"CO0000;", "CO0000;", "CO0000;", "CO0000;", "CO0000;", "CO0000;",
    "CO0103;", "CO0103;", "CO0103;", "CO0103;", "CO0103;", "CO0103;"},
  [0].na =
   {"NA01;", "NA01;", "NA01;", "NA01;", "NA01;", "NA01;",
    "NA00;", "NA00;", "NA00;", "NA00;", "NA00;", "NA00;"},
  [0].sh =
   {"SH006;", "SH006;", "SH006;", "SH006;", "SH006;", "SH006;",
    "SH013;", "SH013;", "SH013;", "SH013;", "SH013;", "SH013;"},
  [0].is =
   {"IS0+0000;", "IS0+0000;", "IS0+0000;", "IS0+0000;",
    "IS0+0000;", "IS0+0000;", "IS0+0050;", "IS0+0050;",
    "IS0+0050;", "IS0+0050;", "IS0+0050;", "IS0+0050;"},
  [0].rf =
   {"RF00;", "RF00;", "RF00;", "RF00;", "RF00;", "RF00;",
    "RF03;", "RF03;", "RF03;", "RF03;", "RF03;", "RF03;"},
  [0].gt =
   {"GT02;", "GT02;", "GT02;", "GT02;", "GT02;", "GT02;",
    "GT03;", "GT03;", "GT03;", "GT03;", "GT03;", "GT03;"},
  [0].ra =
   {"RA01;", "RA01;", "RA00;", "RA00;", "RA00;", "RA00;",
    "RA01;", "RA01;", "RA00;", "RA00;", "RA00;", "RA00;"},
  [0].pa =
   {"PA00;", "PA00;", "PA00;", "PA01;", "PA02;", "PA02;",
    "PA00;", "PA00;", "PA00;", "PA01;", "PA02;", "PA02;"}
};
struct split_freq_box_vars
{
  gint row1;
  gint cursor_col;
  gint col1;
  gint field_length;
  gchar field_line[8];
  guint key_handler_id;
  gint done;
};
typedef struct split_freq_box_vars SFBVars;
static void set_radio_port(gint set_rp);
static void change_radio_frequency(const gchar *new_freq, gint vfo);
static void change_radio_mode(gint vfo);
static gint process_frequency_command(const gchar *new_freq);
static gdouble convert_frequency(const gchar *new_freq);
static void read_radio_port(gint iadd);
static void change_radio_split(gint split);
static void split_freq_box(void);
static gint sfb_key_handler(GtkWidget *widget, GdkEventKey *event,
                            gpointer data);
static gint sfb_cursor(gpointer data);
static void radio_split_ind(gpointer widget, gint iadd);
static void change_radio_rxparams(void);
static void get_cat_filename(gchar *filnam);
