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

Diff for /src/usr.bin/tmux/format.c between version 1.138 and 1.139

version 1.138, 2017/05/12 22:43:15 version 1.139, 2017/05/29 15:43:48
Line 21 
Line 21 
   
 #include <ctype.h>  #include <ctype.h>
 #include <errno.h>  #include <errno.h>
   #include <fnmatch.h>
 #include <libgen.h>  #include <libgen.h>
 #include <netdb.h>  #include <netdb.h>
 #include <stdarg.h>  #include <stdarg.h>
Line 868 
Line 869 
   
         /* Is there a length limit or whatnot? */          /* Is there a length limit or whatnot? */
         switch (copy[0]) {          switch (copy[0]) {
           case 'm':
                   if (copy[1] != ':')
                           break;
                   compare = -2;
                   copy += 2;
                   break;
         case '!':          case '!':
                 if (copy[1] == '=' && copy[2] == ':') {                  if (copy[1] == '=' && copy[2] == ':') {
                         compare = -1;                          compare = -1;
Line 942 
Line 949 
                 if (compare == 1 && strcmp(left, right) == 0)                  if (compare == 1 && strcmp(left, right) == 0)
                         value = xstrdup("1");                          value = xstrdup("1");
                 else if (compare == -1 && strcmp(left, right) != 0)                  else if (compare == -1 && strcmp(left, right) != 0)
                           value = xstrdup("1");
                   else if (compare == -2 && fnmatch(left, right, 0) == 0)
                         value = xstrdup("1");                          value = xstrdup("1");
                 else                  else
                         value = xstrdup("0");                          value = xstrdup("0");

Legend:
Removed from v.1.138  
changed lines
  Added in v.1.139