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

Diff for /src/usr.bin/m4/eval.c between version 1.5 and 1.6

version 1.5, 1996/07/01 20:40:27 version 1.6, 1996/09/15 18:59:07
Line 57 
Line 57 
 #include <stdio.h>  #include <stdio.h>
 #include <stdlib.h>  #include <stdlib.h>
 #include <string.h>  #include <string.h>
   #include <fcntl.h>
 #include "mdef.h"  #include "mdef.h"
 #include "stdd.h"  #include "stdd.h"
 #include "extern.h"  #include "extern.h"
Line 664 
Line 665 
 dodiv(n)  dodiv(n)
 register int n;  register int n;
 {  {
           int fd;
   
         if (n < 0 || n >= MAXOUT)          if (n < 0 || n >= MAXOUT)
                 n = 0;                 /* bitbucket */                  n = 0;                 /* bitbucket */
         if (outfile[n] == NULL) {          if (outfile[n] == NULL) {
                 m4temp[UNIQUE] = n + '0';                  m4temp[UNIQUE] = n + '0';
                 if ((outfile[n] = fopen(m4temp, "w")) == NULL)                  if ((fd = open(m4temp, O_CREAT|O_EXCL|O_WRONLY, 0600)) < 0 ||
                       (outfile[n] = fdopen(fd, "w")) == NULL)
                         oops("%s: cannot divert.", m4temp);                          oops("%s: cannot divert.", m4temp);
         }          }
         oindex = n;          oindex = n;

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6