|
|
1.1 root 1: /*
2: char id_ftell[] = "@(#)ftell_.c 1.2";
3: *
4: * return current file position
5: *
6: * calling sequence:
7: * integer curpos, ftell
8: * curpos = ftell(lunit)
9: * where:
10: * lunit is an open logical unit
11: * curpos will be the current offset in bytes from the start of the
12: * file associated with that logical unit
13: * or a (negative) system error code.
14: */
15:
16: #include "../libI77/fiodefs.h"
17: #include "../libI77/f_errno.h"
18:
19: extern unit units[];
20:
21: long ftell_(lu)
22: long *lu;
23: {
24: if (*lu < 0 || *lu >= MXUNIT)
25: return(-(long)(errno=F_ERUNIT));
26: if (!units[*lu].ufd)
27: return(-(long)(errno=F_ERNOPEN));
28: return(ftell(units[*lu].ufd));
29: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.