"   TERMINAL DEFINITION FILE FOR MACINTOSH                                    "
"   running Control Data CONNECT V2.1 or Desktop/VE V1.2                      "

"   MAC_HOST_ECHO_21                                           MARCH, 1994    "
"   To change the full screen line count for larger screens, make following   "
"   modifications to this Terminal Definition source before recompiling:      "
"     Replace Full_Screen_Line_Count variable value 24 with full screen line  "
"       count (24 to 100) defined in CONNECT or Desktop/VE Terminal Settings. "
"     Replace rows = 24 in set_size definitions with full screen line count.  "
"     Replace model_name value with unique terminal name such as              "
"       FULL_DUPLEX_MAC_XX where XX is the full screen line count (24 to 100)."


"   VARIABLES                                                                 "
    Full_Screen_Line_Count    = ('24')        "sets Mac Full_Screen_Line_Count"
    clear_all_tabs            = (ESC '[3g')
    set_80_cols               = (ESC '[?3l')
    set_132_cols              = (ESC '[?3h')
    start_bold                = (ESC '[1m')
    start_inverse             = (ESC '[7m')
    start_underline           = (ESC '[4m')
    stop_bold                 = (ESC '[21m')
    stop_inverse              = (ESC '[27m')
    stop_underline            = (ESC '[24m')
    set_graphics              = (ESC '(B' ESC ')0' SI)
    enable_auto_tab           = (ESC '[=3h')
    enable_auto_wrap          = (ESC '[?7h')
    enable_insertion          = (ESC '[4h')
    disable_insertion         = (ESC '[4l')
    global_protect_on         = (ESC '[=1h')
    global_protect_off        = (ESC '[=1l')
    cursor_pos_normal         = (ESC '[=6l')
    reset_terminal            = (ESC 'c')
    enter_screen_mode         = (ESC '[=5h')
    enter_line_mode           = (ESC '[=5l')
    set_echo_on               = (ESC '[12l')
    set_echo_off              = (ESC '[12h')
    NOSVE_host                = (ESC '[1t')
    set_screen_size           = (ESC '[' Full_Screen_Line_Count ';80z')
    redo_set_screen_mode      = (NOSVE_host global_protect_on ..
                                clear_all_tabs  set_graphics  enable_auto_wrap  ..
                                enable_auto_tab  cursor_pos_normal)
    redo_set_line_mode        = (global_protect_off set_graphics)

"   MODEL NAME AND COMMUNICATION TYPE                                         "
    model_name          value = 'MAC_HOST_ECHO_21'
    communications      type  = asynch
    application_string  name  = 'vt100_scrolling'  out = 'true'
    application_string  name='DRIVER_PROCEDURE' out= 'tup$host_echo_mac_boot'

"   END OF INFORMATION SPECIFICATION                                          "
    end_of_information  in    = (0)

"   CURSOR POSITIONING INFORMATION                                            "
    cursor_pos_encoding      bias  = (1)   type = ansi_cursor
    cursor_pos_column_first  value = FALSE
    cursor_pos_column_length value = (0)
    cursor_pos_row_length    value = (0)
    cursor_pos_begin         out   = (ESC '[')
    cursor_pos_second        out   = (';')
    cursor_pos_third         out   = ('H')

"   CURSOR MOVEMENT INFORMATION                                               "
    cursor_home              inout = (ESC '[H')  label='Option H'
    cursor_up                inout = (ESC '[A')  label='up arrow'
    cursor_down              inout = (ESC '[B')  label='down arrow'
    cursor_right             inout = (ESC '[C')  label='right arrow'
    cursor_left              inout = (ESC '[D')  label='left arrow'

"   CURSOR BEHAVIOR (for cursor movement keys)                                "
    move_past_right          type  = wrap_adjacent_next
    move_past_left           type  = wrap_adjacent_next
    move_past_top            type  = stop_next
    move_past_bottom         type  = stop_next

"   CURSOR BEHAVIOR (for character keys)                                      "
    char_past_left           type = wrap_adjacent_next
    char_past_right          type = wrap_adjacent_next
    char_past_last_position  type = wrap_adjacent_next

"   TERMINAL ATTRIBUTES                                                       "
    clears_when_change_size  value = TRUE            "For 80/132 column change"
    function_key_leaves_mark value = 0
    has_hidden               value = TRUE            "Full duplex supports hidden"
    has_protect              value = TRUE
    home_at_top              value = TRUE
    multiple_sizes           value = TRUE
    tabs_to_home             value = FALSE
    tabs_to_tab_stops        value = TRUE
    tabs_to_unprotected      value = TRUE
    type_ahead               value = TRUE
    automatic_tabbing        value = TRUE

"   SCREEN SIZES                                                              "
    set_size  rows = 24  columns = 80   out = (set_80_cols)
    set_size  rows = 24  columns = 132  out = (set_132_cols)

"   TERMINAL CAPABILITIES                                                     "
    insert_char         inout = (ESC '[@')   label='Option Space'
    insert_line_bol     inout = (ESC '[L')   label='Option Shift Space'
    delete_char         inout = (ESC '[P')   label='Option Delete'
    delete_line_bol     inout = (ESC '[M')   label='Option Shift Delete'
    erase_end_of_line   inout = (ESC '[K')   label='Option Clear'
    erase_line_stay     inout = (ESC '[2K')
    erase_end_of_field  inout = (ESC '[N')
    erase_field_stay    inout = (ESC '[2N')
    erase_page_stay     inout = (ESC '[2J')  label='Clear'
    backspace           in = (BS)            label='Delete'
    tab_forward         inout = (HT)         label='Tab'
    tab_backward        inout = (ESC '[Z')   label='Option Tab'
    tab_clear_all       inout = (clear_all_tabs)
    tab_set             inout = (ESC 'H')
    tab_clear           inout = (ESC '[g')
    insert_mode_begin   inout = (enable_insertion)
    insert_mode_end     inout = (disable_insertion)

"   SCREEN AND LINE MODE TRANSITION                                           "
    set_screen_mode out = (NOSVE_host  enter_screen_mode  ..
                           clear_all_tabs  set_graphics  enable_auto_wrap  ..
                           enable_auto_tab  cursor_pos_normal  set_screen_size)

    set_line_mode   out = (enter_line_mode  set_graphics reset_terminal)

"   MISCELLANEOUS TERMINAL SEQUENCES                                          "
    protect_begin       out = (ESC 'V')
    protect_end         out = (ESC 'W')
    protect_all         out = (ESC '[1p')
    output_begin        out = (global_protect_off disable_insertion)
    output_end          out = (global_protect_on)
    bell_nak            out = (BEL)

"   CDC STANDARD FUNCTION KEY INPUT INFORMATION                               "
    next      in = (CR)              label='Return'
    data      in = (ESC 'O' 27(16))  label='Option "'
    data_s    in = (ESC 'O' 22(16))  label='Option Shift "'
    back      in = (ESC 'O;')        label='Option ;'
    back_s    in = (ESC 'O:')        label='Option Shift ;'
    help      in = (ESC 'O/')        label='Option ?'
    help_s    in = (ESC 'O?')        label='Option Shift ?'
    edit      in = (ESC 'O.')        label='Option .'
    edit_s    in = (ESC 'O>')        label='Option Shift .'
    down      in = (ESC 'O+')        label='Option D'
    down_s    in = (ESC 'O-')        label='Option Shift D'
    up        in = (ESC 'O(')        label='Option U'
    up_s      in = (ESC 'O)')        label='Option Shift U'
    fwd       in = (ESC 'OX')        label='Option F'
    fwd_s     in = (ESC 'Oo')        label='Option Shift F'
    bkw       in = (ESC 'OW')        label='Option B'
    bkw_s     in = (ESC 'Of')        label='Option Shift B'
    undo      in = (ESC 'Ou')        label='F5  Option 5'
    undo_s    in = (ESC 'Om')        label='    Option Shift 5'
    stop      in = (ESC 'Ov')        label='F6  Option 6'
    stop_s    in = (ESC 'Ol')        label='    Option Shift 6'

"   PROGRAMMABLE FUNCTION KEY INPUT INFORMATION                               "
    f1        in = (ESC 'Oq')        label='F1  Option 1'
    f2        in = (ESC 'Or')        label='F2  Option 2'
    f3        in = (ESC 'Os')        label='F3  Option 3'
    f4        in = (ESC 'Ot')        label='F4  Option 4'
    f5        in = (ESC 'Ou')        label='F5  Option 5'
    f6        in = (ESC 'Ov')        label='F6  Option 6'
    f7        in = (ESC 'Ow')        label='F7  Option 7'
    f8        in = (ESC 'Ox')        label='F8  Option 8'
    f9        in = (ESC 'Oy')        label='F9  Option 9'
    f10       in = (ESC 'Oz')        label='10  Option 0'
    f11       in = (ESC 'O{')        label='11  Option Q'
    f12       in = (ESC 'O|')        label='12  Option W'
    f13       in = (ESC 'O}')        label='13  Option E'
    f14       in = (ESC 'O~')        label='14  Option R'
    f15       in = (ESC 'O_')        label='15  Option T'
    f16       in = (ESC 'OU')        label='16  Option Y'
    f1_s      in = (ESC 'Og')        label='    Option Shift 1'
    f2_s      in = (ESC 'Oh')        label='    Option Shift 2'
    f3_s      in = (ESC 'Oi')        label='    Option Shift 3'
    f4_s      in = (ESC 'Oj')        label='    Option Shift 4'
    f5_s      in = (ESC 'Om')        label='    Option Shift 5'
    f6_s      in = (ESC 'Ol')        label='    Option Shift 6'
    f7_s      in = (ESC 'OM')        label='    Option Shift 7'
    f8_s      in = (ESC 'On')        label='    Option Shift 8'
    f9_s      in = (ESC 'Op')        label='    Option Shift 9'
    f10_s     in = (ESC 'OO')        label='    Option Shift 0'
    f11_s     in = (ESC 'Oa')        label='    Option Shift Q'
    f12_s     in = (ESC 'Ob')        label='    Option Shift W'
    f13_s     in = (ESC 'Oc')        label='    Option Shift E'
    f14_s     in = (ESC 'Od')        label='    Option Shift R'
    f15_s     in = (ESC 'Oe')        label='    Option Shift T'
    f16_s     in = (ESC 'OV')        label='    Option Shift Y'

"   TERMINAL VIDEO ATTRIBUTES                                                 "
    alt_begin           out = (start_bold)
    alt_end             out = (stop_bold)
    blink_begin         out = ()                   "not supported"
    blink_end           out = ()                   "not supported"
    hidden_begin        out = ()
    hidden_end          out = ()
    inverse_begin       out = (start_inverse)
    inverse_end         out = (stop_inverse)
    underline_begin     out = (start_underline)
    underline_end       out = (stop_underline)

"   LOGICAL ATTRIBUTE SPECIFICATIONS                                          "
    error_begin         out = (start_bold)
    error_end           out = (stop_bold)
    input_text_begin    out = (start_underline)
    input_text_end      out = (stop_underline)
    italic_begin        out = (start_inverse)
    italic_end          out = (stop_inverse)

"   LINE DRAWING CHARACTER SPECIFICATION                                      "
    ld_fine_begin            out = (SO)
    ld_fine_end              out = (SI)
    ld_fine_horizontal       out = (71(16))
    ld_fine_vertical         out = (78(16))
    ld_fine_upper_left       out = (6C(16))
    ld_fine_upper_right      out = (6B(16))
    ld_fine_lower_left       out = (6D(16))
    ld_fine_lower_right      out = (6A(16))
    ld_fine_up_t             out = (77(16))
    ld_fine_down_t           out = (76(16))
    ld_fine_left_t           out = (74(16))
    ld_fine_right_t          out = (75(16))
    ld_fine_cross            out = (6E(16))

    ld_medium_begin          out = (SO start_bold)
    ld_medium_end            out = (SI stop_bold)
    ld_medium_horizontal     out = (71(16))
    ld_medium_vertical       out = (78(16))
    ld_medium_upper_left     out = (6C(16))
    ld_medium_upper_right    out = (6B(16))
    ld_medium_lower_left     out = (6D(16))
    ld_medium_lower_right    out = (6A(16))
    ld_medium_up_t           out = (77(16))
    ld_medium_down_t         out = (76(16))
    ld_medium_left_t         out = (74(16))
    ld_medium_right_t        out = (75(16))
    ld_medium_cross          out = (6E(16))

    ld_bold_begin            out = (start_inverse)
    ld_bold_end              out = (stop_inverse)
    ld_bold_horizontal       out = (' ')
    ld_bold_vertical         out = (' ')
    ld_bold_upper_left       out = (' ')
    ld_bold_upper_right      out = (' ')
    ld_bold_lower_left       out = (' ')
    ld_bold_lower_right      out = (' ')
    ld_bold_up_t             out = (' ')
    ld_bold_down_t           out = (' ')
    ld_bold_left_t           out = (' ')
    ld_bold_right_t          out = (' ')
    ld_bold_cross            out = (' ')

    application_string name='REDO_SET_SCREEN_MODE' out=(redo_set_screen_mode)
    application_string name='REDO_SET_LINE_MODE' out=(redo_set_line_mode)

"   END OF TERMINAL DEFINITION FILE FOR MAC_HOST_ECHO_21                            "
