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

Diff for /src/usr.bin/tmux/job.c between version 1.1 and 1.2

version 1.1, 2009/10/10 15:03:01 version 1.2, 2009/10/10 18:42:14
Line 30 
Line 30 
  * output.   * output.
  */   */
   
   /* All jobs list. */
   struct joblist  all_jobs = SLIST_HEAD_INITIALIZER(&all_jobs);
   
 RB_GENERATE(jobs, job, entry, job_cmp);  RB_GENERATE(jobs, job, entry, job_cmp);
   
 int  int
Line 67 
Line 70 
         while (!RB_EMPTY(jobs)) {          while (!RB_EMPTY(jobs)) {
                 job = RB_ROOT(jobs);                  job = RB_ROOT(jobs);
                 RB_REMOVE(jobs, jobs, job);                  RB_REMOVE(jobs, jobs, job);
                   SLIST_REMOVE(&all_jobs, job, job, lentry);
                 job_free(job);                  job_free(job);
         }          }
 }  }
Line 90 
Line 94 
   
         job = xmalloc(sizeof *job);          job = xmalloc(sizeof *job);
         job->cmd = xstrdup(cmd);          job->cmd = xstrdup(cmd);
           job->pid = -1;
   
         job->client = c;          job->client = c;
   
Line 101 
Line 106 
         job->data = data;          job->data = data;
   
         RB_INSERT(jobs, jobs, job);          RB_INSERT(jobs, jobs, job);
           SLIST_INSERT_HEAD(&all_jobs, job, lentry);
   
         return (job);          return (job);
 }  }

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