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

Diff for /src/usr.bin/aucat/Attic/safile.c between version 1.20 and 1.21

version 1.20, 2010/01/10 21:47:41 version 1.21, 2010/01/11 13:06:32
Line 210 
Line 210 
         struct safile *f = (struct safile *)file;          struct safile *f = (struct safile *)file;
         unsigned n;          unsigned n;
   
         n = sio_read(f->hdl, data, count);          n = f->started ? sio_read(f->hdl, data, count) : 0;
         if (n == 0) {          if (n == 0) {
                 f->file.state &= ~FILE_ROK;                  f->file.state &= ~FILE_ROK;
                 if (sio_eof(f->hdl)) {                  if (sio_eof(f->hdl)) {
Line 239 
Line 239 
         struct safile *f = (struct safile *)file;          struct safile *f = (struct safile *)file;
         unsigned n;          unsigned n;
   
         n = sio_write(f->hdl, data, count);          n = f->started ? sio_write(f->hdl, data, count) : 0;
         if (n == 0) {          if (n == 0) {
                 f->file.state &= ~FILE_WOK;                  f->file.state &= ~FILE_WOK;
                 if (sio_eof(f->hdl)) {                  if (sio_eof(f->hdl)) {
Line 270 
Line 270 
 int  int
 safile_pollfd(struct file *file, struct pollfd *pfd, int events)  safile_pollfd(struct file *file, struct pollfd *pfd, int events)
 {  {
           struct safile *f = (struct safile *)file;
   
           if (!f->started)
                   events &= ~(POLLIN | POLLOUT);
         return sio_pollfd(((struct safile *)file)->hdl, pfd, events);          return sio_pollfd(((struct safile *)file)->hdl, pfd, events);
 }  }
   

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