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

Diff for /src/usr.bin/tmux/Attic/cmd-list.c between version 1.1 and 1.2

version 1.1, 2009/06/01 22:58:49 version 1.2, 2009/07/26 12:58:44
Line 87 
Line 87 
 }  }
   
 void  void
 cmd_list_send(struct cmd_list *cmdlist, struct buffer *b)  
 {  
         struct cmd      *cmd;  
         u_int            n;  
   
         n = 0;  
         TAILQ_FOREACH(cmd, cmdlist, qentry)  
                 n++;  
   
         buffer_write(b, &n, sizeof n);  
         TAILQ_FOREACH(cmd, cmdlist, qentry)  
                 cmd_send(cmd, b);  
 }  
   
 struct cmd_list *  
 cmd_list_recv(struct buffer *b)  
 {  
         struct cmd_list *cmdlist;  
         struct cmd      *cmd;  
         u_int            n;  
   
         buffer_read(b, &n, sizeof n);  
   
         cmdlist = xmalloc(sizeof *cmdlist);  
         TAILQ_INIT(cmdlist);  
   
         while (n-- > 0) {  
                 cmd = cmd_recv(b);  
                 TAILQ_INSERT_TAIL(cmdlist, cmd, qentry);  
         }  
   
         return (cmdlist);  
 }  
   
 void  
 cmd_list_free(struct cmd_list *cmdlist)  cmd_list_free(struct cmd_list *cmdlist)
 {  {
         struct cmd      *cmd;          struct cmd      *cmd;

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2