home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / ENTERPRS / CPM / UTILS / S / SMC21LIB.LZH / CTELL.C < prev    next >
Text File  |  2000-06-30  |  512b  |  22 lines

  1.  
  2. #define NOCCARGC
  3. #include stdio.h
  4. #include clib.def
  5. extern int _fcbptr[], _chrpos[];
  6. /*
  7. ** Return offset to current 128-byte record
  8. */
  9. ctell(fd) int fd; {
  10.   int *rrn;
  11.   if(!_mode(fd) || isatty(fd)) return (-1);
  12.   rrn=_fcbptr[fd]+RRNOFF;
  13.   return (*rrn);
  14.   }
  15. /*
  16. ** Return offset to next character in current buffer.
  17. */
  18. ctellc(fd) int fd; {
  19.   return (_chrpos[fd]);
  20.   }
  21.  
  22.