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

Diff for /src/usr.bin/tmux/Attic/hooks.c between version 1.3 and 1.4

version 1.3, 2015/12/15 13:43:07 version 1.4, 2015/12/16 21:50:37
Line 43 
Line 43 
 }  }
   
 struct hooks *  struct hooks *
   hooks_get(struct session *s)
   {
           if (s != NULL)
                   return (s->hooks);
           return (global_hooks);
   }
   
   struct hooks *
 hooks_create(struct hooks *parent)  hooks_create(struct hooks *parent)
 {  {
         struct hooks    *hooks;          struct hooks    *hooks;
Line 148 
Line 156 
 }  }
   
 int  int
 hooks_run(struct hooks *hooks, struct client *c, const char *fmt, ...)  hooks_run(struct hooks *hooks, struct client *c, struct cmd_find_state *fs,
       const char *fmt, ...)
 {  {
         struct hook     *hook;          struct hook     *hook;
         struct cmd_q    *hooks_cmdq;          struct cmd_q    *hooks_cmdq;
Line 169 
Line 178 
   
         hooks_cmdq = cmdq_new(c);          hooks_cmdq = cmdq_new(c);
         hooks_cmdq->flags |= CMD_Q_NOHOOKS;          hooks_cmdq->flags |= CMD_Q_NOHOOKS;
   
           if (fs != NULL)
                   cmd_find_copy_state(&hooks_cmdq->current, fs);
         hooks_cmdq->parent = NULL;          hooks_cmdq->parent = NULL;
   
         cmdq_run(hooks_cmdq, hook->cmdlist, NULL);          cmdq_run(hooks_cmdq, hook->cmdlist, NULL);
Line 177 
Line 189 
 }  }
   
 int  int
 hooks_wait(struct hooks *hooks, struct cmd_q *cmdq, const char *fmt, ...)  hooks_wait(struct hooks *hooks, struct cmd_q *cmdq, struct cmd_find_state *fs,
       const char *fmt, ...)
 {  {
         struct hook     *hook;          struct hook     *hook;
         struct cmd_q    *hooks_cmdq;          struct cmd_q    *hooks_cmdq;
Line 198 
Line 211 
   
         hooks_cmdq = cmdq_new(cmdq->client);          hooks_cmdq = cmdq_new(cmdq->client);
         hooks_cmdq->flags |= CMD_Q_NOHOOKS;          hooks_cmdq->flags |= CMD_Q_NOHOOKS;
   
           if (fs != NULL)
                   cmd_find_copy_state(&hooks_cmdq->current, fs);
         hooks_cmdq->parent = cmdq;          hooks_cmdq->parent = cmdq;
   
         hooks_cmdq->emptyfn = hooks_emptyfn;          hooks_cmdq->emptyfn = hooks_emptyfn;

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4