[BACK]Return to tty-features.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/tty-features.c between version 1.8 and 1.9

version 1.8, 2020/05/16 14:26:33 version 1.9, 2020/05/16 14:30:17
Line 201 
Line 201 
         char                             *next, *loop, *copy;          char                             *next, *loop, *copy;
         u_int                             i;          u_int                             i;
   
         log_debug("%s: %s", __func__, s);          log_debug("adding terminal features %s", s);
   
         loop = copy = xstrdup(s);          loop = copy = xstrdup(s);
         while ((next = strsep(&loop, separators)) != NULL) {          while ((next = strsep(&loop, separators)) != NULL) {
Line 274 
Line 274 
                 return (0);                  return (0);
         term->features |= feat;          term->features |= feat;
         return (1);          return (1);
   }
   
   void
   tty_default_features(int *feat, const char *name, u_int version)
   {
           static struct {
                   const char      *name;
                   u_int            version;
                   const char      *features;
           } table[] = {
                   { .name = "mintty",
                     .features = "256,RGB,ccolour,clipboard,cstyle,margins,overline,title"
                   },
                   { .name = "tmux",
                     .features = "256,RGB,ccolour,clipboard,cstyle,overline,title,usstyle"
                   },
                   { .name = "rxvt-unicode",
                     .features = "256,title"
                   },
                   { .name = "iTerm2",
                     .features = "256,RGB,clipboard,cstyle,margins,sync,title"
                   },
                   { .name = "XTerm",
                     .features = "256,RGB,ccolour,clipboard,cstyle,margins,rectfill,title"
                   }
           };
           u_int   i;
   
           for (i = 0; i < nitems(table); i++) {
                   if (strcmp(table[i].name, name) != 0)
                           continue;
                   if (version != 0 && version < table[i].version)
                           continue;
                   tty_add_features(feat, table[i].features, ",");
           }
   
 }  }

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9