diff options
| author | hpa <hpa> | 2005-01-10 02:44:17 +0000 |
|---|---|---|
| committer | hpa <hpa> | 2005-01-10 02:44:17 +0000 |
| commit | f8edb0e82019cd36dc20abafda23ca523ccc0c13 (patch) | |
| tree | 5a05bf13f7a02fdf589a1f29ba62a5358c6af8c8 /com32 | |
| parent | 8e1e02217fdefffc00be9d444d94f0f2c8ebdc6e (diff) | |
| download | syslinux-3.06-pre1.tar.gz | |
ftell() operationsyslinux-3.06-pre1
Diffstat (limited to 'com32')
| -rw-r--r-- | com32/lib/sys/ftell.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/com32/lib/sys/ftell.c b/com32/lib/sys/ftell.c new file mode 100644 index 00000000..3db2814f --- /dev/null +++ b/com32/lib/sys/ftell.c @@ -0,0 +1,18 @@ +/* + * sys/ftell.c + * + * We can't seek, but we can at least tell... + */ + +#include <stdio.h> +#include "sys/file.h" + +long ftell(FILE *stream) +{ + int fd = fileno(stream); + struct file_info *fp = &__file_info[fd]; + + return fp->i.offset; +} + + |
