home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Trees / V7 / usr / src / libc / v6 / lseek.c < prev    next >
Encoding:
Text File  |  1979-01-10  |  231 b   |  15 lines

  1. lseek(fd, off, ptr)
  2. int fd, ptr;
  3. long off;
  4. {
  5.     unsigned a;
  6.  
  7.     a = off;
  8.  
  9.     if (a == off)
  10.         return (syscall(19, fd, 0, a, ptr, 0));
  11.     a = off/512;
  12.     syscall(19, fd, 0, a, ptr+3, 0);
  13.     return(syscall(19, fd, 0, (int) (off%512), ptr, 0));
  14. }
  15.