Ticket #2633: 2633_freebsd_ctrl_o.diff

File 2633_freebsd_ctrl_o.diff, 1.8 KB (added by andrew_b, 8 years ago)

Proposed patch

  • lib/tty/tty-internal.h

    diff --git a/lib/tty/tty-internal.h b/lib/tty/tty-internal.h
    index 77f0062..8543c35 100644
    a b  
    3030/* The mouse is currently: TRUE - enabled, FALSE - disabled */ 
    3131extern gboolean mouse_enabled; 
    3232 
     33#ifndef __FreeBSD__ 
    3334/* terminal ca capabilities */ 
    3435extern char *smcup; 
    3536extern char *rmcup; 
     37#endif 
    3638 
    3739/*** declarations of public functions ************************************************************/ 
    3840 
  • lib/tty/tty.c

    diff --git a/lib/tty/tty.c b/lib/tty/tty.c
    index c33e566..8d838e7 100644
    a b tty_init_xterm_support (gboolean is_xterm) 
    279279    xmouse_seq = tty_tgetstr ("kmous"); 
    280280    if (xmouse_seq == NULL) 
    281281        xmouse_seq = tty_tgetstr ("Km"); 
     282#ifndef __FreeBSD__ 
    282283    smcup = tty_tgetstr ("smcup"); 
    283284    if (smcup == NULL) 
    284285        smcup = tty_tgetstr ("ti"); 
    285286    rmcup = tty_tgetstr ("rmcup"); 
    286287    if (rmcup == NULL) 
    287288        rmcup = tty_tgetstr ("te"); 
     289#endif 
    288290 
    289291    if (strcmp (termvalue, "cygwin") == 0) 
    290292    { 
  • lib/tty/win.c

    diff --git a/lib/tty/win.c b/lib/tty/win.c
    index e7cf59c..3521f15 100644
    a b anything_ready (void) 
    9595void 
    9696do_enter_ca_mode (void) 
    9797{ 
    98     if (mc_global.tty.xterm_flag && smcup != NULL) 
     98    if (mc_global.tty.xterm_flag 
     99#ifndef __FreeBSD__ 
     100        && smcup != NULL 
     101#endif 
     102        ) 
     103 
    99104    { 
    100105        fprintf (stdout, /* ESC_STR ")0" */ ESC_STR "7" ESC_STR "[?47h"); 
    101106        fflush (stdout); 
    do_enter_ca_mode (void) 
    107112void 
    108113do_exit_ca_mode (void) 
    109114{ 
    110     if (mc_global.tty.xterm_flag && rmcup != NULL) 
     115    if (mc_global.tty.xterm_flag 
     116#ifndef __FreeBSD__ 
     117        && rmcup != NULL 
     118#endif 
     119        ) 
    111120    { 
    112121        fprintf (stdout, ESC_STR "[?47l" ESC_STR "8" ESC_STR "[m"); 
    113122        fflush (stdout);