[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.9 and 1.10

version 1.9, 2008/12/29 17:59:08 version 1.10, 2009/01/23 17:38:15
Line 34 
Line 34 
 struct safile {  struct safile {
         struct file file;          struct file file;
         struct sio_hdl *hdl;          struct sio_hdl *hdl;
 #ifdef DEBUG  #ifdef DEBUG
         struct timeval itv, otv;          struct timeval itv, otv;
 #endif  #endif
 };  };
Line 160 
Line 160 
   
 void  void
 safile_start(struct file *file)  safile_start(struct file *file)
 {  {
         struct safile *f = (struct safile *)file;          struct safile *f = (struct safile *)file;
   
         if (!sio_start(f->hdl)) {          if (!sio_start(f->hdl)) {
Line 214 
Line 214 
 #ifdef DEBUG  #ifdef DEBUG
         gettimeofday(&tv1, NULL);          gettimeofday(&tv1, NULL);
         timersub(&tv1, &tv0, &dtv);          timersub(&tv1, &tv0, &dtv);
         us = dtv.tv_sec * 1000000 + dtv.tv_usec;          us = dtv.tv_sec * 1000000 + dtv.tv_usec;
         DPRINTFN(us < 5000 ? 4 : 1,          DPRINTFN(us < 5000 ? 4 : 1,
             "safile_read: %s: got %d bytes in %uus\n",              "safile_read: %s: got %d bytes in %uus\n",
             f->file.name, n, us);              f->file.name, n, us);
 #endif  #endif
         return n;          return n;
Line 231 
Line 231 
 #ifdef DEBUG  #ifdef DEBUG
         struct timeval tv0, tv1, dtv;          struct timeval tv0, tv1, dtv;
         unsigned us;          unsigned us;
   
         if (!(f->file.state & FILE_WOK)) {          if (!(f->file.state & FILE_WOK)) {
                 DPRINTF("safile_write: %s: bad state\n", f->file.name);                  DPRINTF("safile_write: %s: bad state\n", f->file.name);
                 abort();                  abort();
Line 253 
Line 253 
 #ifdef DEBUG  #ifdef DEBUG
         gettimeofday(&tv1, NULL);          gettimeofday(&tv1, NULL);
         timersub(&tv1, &tv0, &dtv);          timersub(&tv1, &tv0, &dtv);
         us = dtv.tv_sec * 1000000 + dtv.tv_usec;          us = dtv.tv_sec * 1000000 + dtv.tv_usec;
         DPRINTFN(us < 5000 ? 4 : 1,          DPRINTFN(us < 5000 ? 4 : 1,
             "safile_write: %s: wrote %d bytes in %uus\n",              "safile_write: %s: wrote %d bytes in %uus\n",
             f->file.name, n, us);              f->file.name, n, us);

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10