Ticket #1974: mc-4.7.5.5.patch

File mc-4.7.5.5.patch, 1.5 KB (added by mirkobau, 13 years ago)

Patch for xterm-alike putty TERMs / mc-4.7.5.5

  • lib/tty/key.c

    diff --strip-trailing-cr -w -Naur mc-4.7.5.5/lib/tty/key.c mc-4.7.5.5.patched/lib/tty/key.c
    old new  
    12261226        || (term != NULL 
    12271227            && (strncmp (term, "iris-ansi", 9) == 0 
    12281228                || strncmp (term, "xterm", 5) == 0 
    1229                 || strncmp (term, "rxvt", 4) == 0 || strcmp (term, "screen") == 0))) 
     1229                || strncmp (term, "putty", 5) == 0 // http://www.midnight-commander.org/ticket/1974 
     1230                || strncmp (term, "rxvt", 4) == 0 
     1231                || strcmp (term, "screen") == 0))) 
    12301232        define_sequences (xterm_key_defines); 
    12311233 
    12321234    /* load some additional keys (e.g. direct Alt-? support) */ 
  • lib/tty/tty.c

    diff --strip-trailing-cr -w -Naur mc-4.7.5.5/lib/tty/tty.c mc-4.7.5.5.patched/lib/tty/tty.c
    old new  
    101101        exit (EXIT_FAILURE); 
    102102    } 
    103103 
    104     return force_xterm || strncmp (termvalue, "xterm", 5) == 0 
     104    return force_xterm 
     105       || strncmp (termvalue, "xterm", 5) == 0 
     106       || strncmp (termvalue, "putty", 5) == 0 // http://www.midnight-commander.org/ticket/1974 
    105107        || strncmp (termvalue, "konsole", 7) == 0 
    106108        || strncmp (termvalue, "rxvt", 4) == 0 
    107109        || strcmp (termvalue, "Eterm") == 0 || strcmp (termvalue, "dtterm") == 0;