[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.4 and 1.5

version 1.4, 1996/07/01 20:40:29 version 1.5, 1996/09/15 19:05:09
Line 59 
Line 59 
 #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 "extr.h"  #include "extr.h"
 #include "pathnames.h"  #include "pathnames.h"
Line 337 
Line 338 
 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)
                         error("m4: cannot divert.");                          error("m4: cannot divert.");
         }          }
         oindex = n;          oindex = n;

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