summaryrefslogtreecommitdiffstats
path: root/contrib/syslinux-4.02/com32/lib/sys/ftell.c
blob: 5c1a94428ca28a651b2571a8fa863613b7060e2e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/*
 * 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;
}