|
DataMuseum.dkPresents historical artifacts from the history of: Commodore CBM-900 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Commodore CBM-900 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 416 (0x1a0) Types: TextFile Notes: UNIX file Names: »fseek.c«
└─⟦f27320a65⟧ Bits:30001972 Commodore 900 hard disk image with partial source code └─⟦f4b8d8c84⟧ UNIX Filesystem └─ ⟦this⟧ »libc/stdio/fseek.c«
/* * Standard I/O Library * Seek; first ensure buffer is clean; afterwards put ptrs at right place */ #include <stdio.h> int fseek(fp, offset, origin) register FILE *fp; long offset; int origin; { long lseek(); if (_fpseek(fp)==EOF) return (EOF); if ((offset=lseek(fileno(fp), offset, origin)) == -1L) return (EOF); if (fp->_bp!=NULL) fp->_dp = fp->_cp = fp->_bp + (int)offset%BUFSIZ; return (0); }