home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 2 / goldfish_vol2_cd2.bin / bbs / gnu / f2c-1993.04.28-src.lha / GNU / src / amiga / f2c-1993.04.28 / libI77 / rewind.c < prev    next >
C/C++ Source or Header  |  1993-04-28  |  408b  |  25 lines

  1. #include "f2c.h"
  2. #include "fio.h"
  3. #ifdef KR_headers
  4. integer f_rew(a) alist *a;
  5. #else
  6. integer f_rew(alist *a)
  7. #endif
  8. {
  9.     unit *b;
  10.     if(a->aunit>=MXUNIT || a->aunit<0)
  11.         err(a->aerr,101,"rewind");
  12.     b = &f__units[a->aunit];
  13.     if(b->ufd == NULL || b->uwrt == 3)
  14.         return(0);
  15.     if(!b->useek)
  16.         err(a->aerr,106,"rewind")
  17.     if(b->uwrt) {
  18.         (void) t_runc(a);
  19.         b->uwrt = 3;
  20.         }
  21.     rewind(b->ufd);
  22.     b->uend=0;
  23.     return(0);
  24. }
  25.