|
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: 342 (0x156) Types: TextFile Notes: UNIX file Names: »ftell.c«
└─⟦f27320a65⟧ Bits:30001972 Commodore 900 hard disk image with partial source code └─⟦f4b8d8c84⟧ UNIX Filesystem └─ ⟦this⟧ »libc/stdio/ftell.c«
/* * Standard I/O Library * Tell logical (vs physical) file position * in units compatible with fseek */ #include <stdio.h> long ftell(fp) register FILE *fp; { extern long lseek(); long offset; if ((offset=lseek(fileno(fp), 0L, 1)) == -1L) return (-1L); else if (fp->_bp!=NULL) offset += fp->_cp - fp->_dp; return (offset); }