summaryrefslogtreecommitdiff
path: root/com32/lib/sys/ftell.c
blob: 3db2814ff1158bb18e6535439b3c9445121d6347 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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;
}