[BACK]Return to setterm.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libcurses

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/lib/libcurses/setterm.c between version 1.49 and 1.50

version 1.49, 2012/04/21 12:27:28 version 1.50, 2013/05/05 14:24:05
Line 49  __RCSID("$NetBSD$");
Line 49  __RCSID("$NetBSD$");
 #include "curses_private.h"  #include "curses_private.h"
   
 static int does_esc_m(const char *cap);  static int does_esc_m(const char *cap);
 static int does_ctrl_o(const char *cap);  static int does_ctrl_o(const char *exit_cap, const char *acs_cap);
   
 attr_t   __mask_op, __mask_me, __mask_ue, __mask_se;  attr_t   __mask_op, __mask_me, __mask_ue, __mask_se;
   
Line 172  _cursesi_setterm(char *type, SCREEN *scr
Line 172  _cursesi_setterm(char *type, SCREEN *scr
          * It might turn off ACS, so check for that.           * It might turn off ACS, so check for that.
          */           */
         if (t_exit_attribute_mode(screen->term) != NULL &&          if (t_exit_attribute_mode(screen->term) != NULL &&
             does_ctrl_o(t_exit_attribute_mode(screen->term)))              does_ctrl_o(t_exit_attribute_mode(screen->term),
               t_exit_alt_charset_mode(screen->term)))
                 screen->mask_me = 0;                  screen->mask_me = 0;
         else          else
                 screen->mask_me = __ALTCHARSET;                  screen->mask_me = __ALTCHARSET;
Line 330  does_esc_m(const char *cap)
Line 331  does_esc_m(const char *cap)
 /*  /*
  * does_ctrl_o --   * does_ctrl_o --
  * A hack for vt100/xterm-like terminals where the "me" capability also   * A hack for vt100/xterm-like terminals where the "me" capability also
  * unsets acs (i.e. it contains the character '\017').   * unsets acs.
  */   */
 static int  static int
 does_ctrl_o(const char *cap)  does_ctrl_o(const char *exit_cap, const char *acs_cap)
 {  {
         const char *capptr = cap;          const char *eptr = exit_cap, *aptr = acs_cap;
           int l;
   
 #ifdef DEBUG  #ifdef DEBUG
         __CTRACE(__CTRACE_INIT, "does_ctrl_o: Looping on %s\n", capptr);          __CTRACE(__CTRACE_INIT, "does_ctrl_o: Testing %s for %s\n", eptr, aptr);
 #endif  #endif
         while (*capptr != 0) {          l = strlen(acs_cap);
                 if (*capptr == '\x0f')          while (*eptr != 0) {
                   if (!strncmp(eptr, aptr, l))
                         return 1;                          return 1;
                 capptr++;                  eptr++;
         }          }
         return 0;          return 0;
 }  }

Legend:
Removed from v.1.49  
changed lines
  Added in v.1.50

CVSweb <webmaster@jp.NetBSD.org>