home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / enterprs / cpm / utils / s / smc21lib.lzh / CTELL.C < prev    next >
Encoding:
C/C++ Source or Header  |  1993-03-25  |  512 b   |  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.