home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / f2c / i77lib / ilnw.c < prev    next >
C/C++ Source or Header  |  2000-06-22  |  1KB  |  76 lines

  1. #include "f2c.h"
  2. #include "fio.h"
  3. #include "lio.h"
  4. extern char *f__icptr;
  5. extern char *f__icend;
  6. extern icilist *f__svic;
  7. extern int f__icnum;
  8. #ifdef KR_headers
  9. extern int z_putc();
  10. #else
  11. extern int z_putc(int);
  12. #endif
  13.  
  14.  static int
  15. z_wSL(Void)
  16. {
  17.     while(f__recpos < f__svic->icirlen)
  18.         z_putc(' ');
  19.     return z_rnew();
  20.     }
  21.  
  22.  VOID
  23. #ifdef KR_headers
  24. c_liw(a) icilist *a;
  25. #else
  26. c_liw(icilist *a)
  27. #endif
  28. {
  29.     f__reading = 0;
  30.     f__external = 0;
  31.     f__formatted = 1;
  32.     f__putn = z_putc;
  33.     L_len = a->icirlen;
  34.     f__donewrec = z_wSL;
  35.     f__svic = a;
  36.     f__icnum = f__recpos = 0;
  37.     f__cursor = 0;
  38.     f__cf = 0;
  39.     f__curunit = 0;
  40.     f__icptr = a->iciunit;
  41.     f__icend = f__icptr + a->icirlen*a->icirnum;
  42.     f__elist = (cilist *)a;
  43.     }
  44.  
  45. #ifdef KR_headers
  46. s_wsni(a) icilist *a;
  47. #else
  48. s_wsni(icilist *a)
  49. #endif
  50. {
  51.     cilist ca;
  52.  
  53.     c_liw(a);
  54.     ca.cifmt = a->icifmt;
  55.     x_wsne(&ca);
  56.     z_wSL();
  57.     return 0;
  58.     }
  59.  
  60. #ifdef KR_headers
  61. integer s_wsli(a) icilist *a;
  62. #else
  63. integer s_wsli(icilist *a)
  64. #endif
  65. {
  66.     f__lioproc = l_write;
  67.     c_liw(a);
  68.     return(0);
  69.     }
  70.  
  71. integer e_wsli(Void)
  72. {
  73.     z_wSL();
  74.     return(0);
  75.     }
  76.