Files
Digital-Research-Source-Code/CPM OPERATING SYSTEMS/CPM 68K/1.2 SOURCE/4/SEEK.C
Sepp J Morris 31738079c4 Upload
Digital Research
2020-11-06 18:50:37 +01:00

33 lines
992 B
C
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* Seek.c -- Whitesmith's equivalent of V6 seek
*/
long lseek();
seek(fildes,offset,ptrname)
int fildes; /* UNIX / WS file descriptor */
int offset; /* File offset, bytes */
int ptrname; /* Sense variable */
{
offset &= 0xffff; /* Clear sign extension problems*/
if(ptrname > 2) /* Not byte sense seek */
{ /* */
offset = offset << 9; /* Multiply by 512 */
ptrname -= 3; /* reset to range 0 .. 2 */
} /********************************/
return(lseek(fildes,(long)offset,ptrname));
}
-= 3; /* reset to range 0 .. 2 */
} /********************************/
return(lseek(fildes,(ong)offset,ptrname));
}
-= 3; /* reset to range 0 .. 2 */
} /********************************/
return(lseek(fildes,(ong)offset,ptrname));
}
-= 3; /* reset to range 0 .. 2 */
} /********************************/
return(lseek(fildes,(ong)offset,ptrname));
}
-= 3; /* reset to range 0 .. 2 */
} /********************************/
return(lseek(fildes,(