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

Diff for /src/usr.bin/tmux/cmd-queue.c between version 1.67 and 1.68

version 1.67, 2019/05/20 11:46:06 version 1.68, 2019/05/23 11:13:30
Line 175 
Line 175 
         free(item);          free(item);
 }  }
   
 /* Set command group. */  
 static u_int  
 cmdq_next_group(void)  
 {  
         static u_int    group;  
   
         return (++group);  
 }  
   
 /* Remove all subsequent items that match this item's group. */  /* Remove all subsequent items that match this item's group. */
 static void  static void
 cmdq_remove_group(struct cmdq_item *item)  cmdq_remove_group(struct cmdq_item *item)
Line 206 
Line 197 
 {  {
         struct cmdq_item        *item, *first = NULL, *last = NULL;          struct cmdq_item        *item, *first = NULL, *last = NULL;
         struct cmd              *cmd;          struct cmd              *cmd;
         u_int                    group = cmdq_next_group();  
         struct cmdq_shared      *shared;          struct cmdq_shared      *shared;
   
         shared = xcalloc(1, sizeof *shared);          shared = xcalloc(1, sizeof *shared);
Line 222 
Line 212 
                 xasprintf(&item->name, "[%s/%p]", cmd->entry->name, item);                  xasprintf(&item->name, "[%s/%p]", cmd->entry->name, item);
                 item->type = CMDQ_COMMAND;                  item->type = CMDQ_COMMAND;
   
                 item->group = group;                  item->group = cmd->group;
                 item->flags = flags;                  item->flags = flags;
   
                 item->shared = shared;                  item->shared = shared;
                 item->cmdlist = cmdlist;                  item->cmdlist = cmdlist;
                 item->cmd = cmd;                  item->cmd = cmd;
   
                   log_debug("%s: %s group %u", __func__, item->name, item->group);
   
                 shared->references++;                  shared->references++;
                 cmdlist->references++;                  cmdlist->references++;

Legend:
Removed from v.1.67  
changed lines
  Added in v.1.68