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

Diff for /src/usr.bin/yacc/main.c between version 1.21 and 1.22

version 1.21, 2008/05/17 23:31:52 version 1.22, 2009/05/01 10:41:05
Line 323 
Line 323 
 }  }
   
   
 FILE *  
 fsopen(char *name, char *mode)  
 {  
     FILE *fp = NULL;  
     int fd, mod = O_RDONLY;  
   
     if (strchr(mode, 'w'))  
         mod = O_RDWR;  
     if ((fd = open(name, mod | O_EXCL|O_CREAT, 0666)) == -1 ||  
         (fp = fdopen(fd, mode)) == NULL) {  
         if (fd != -1)  
             close(fd);  
     }  
     return (fp);  
 }  
   
 void  void
 open_files(void)  open_files(void)
 {  {

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22