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

Diff for /src/usr.bin/m4/Attic/serv.c between version 1.3 and 1.4

version 1.3, 1996/06/26 05:36:16 version 1.4, 1996/07/01 20:40:29
Line 337 
Line 337 
 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 ((fd = open(m4temp, O_RDWR|O_EXECL|O_CREAT, 0666)) == -1 ||                  if ((outfile[n] = fopen(m4temp, "w")) == NULL)
                     (outfile[n] = fdopen(fd, "w")) == NULL) {  
                         if (fd != -1)  
                                 close(fd);  
                         error("m4: cannot divert.");                          error("m4: cannot divert.");
                 }  
         }          }
         oindex = n;          oindex = n;
         active = outfile[n];          active = outfile[n];

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