Commit | Line | Data |
---|---|---|
0f913343 KM |
1 | /* Copyright (c) 1979 Regents of the University of California */ |
2 | ||
9aa5f780 | 3 | static char sccsid[] = "@(#)TELL.c 1.3 %G%"; |
0f913343 KM |
4 | |
5 | #include "h00vars.h" | |
6 | ||
7 | /* | |
8 | * Find current location | |
9 | */ | |
9aa5f780 | 10 | struct seekptr |
0f913343 KM |
11 | TELL(curfile) |
12 | ||
13 | register struct iorec *curfile; | |
14 | { | |
9aa5f780 | 15 | struct seekptr loc; |
0f913343 | 16 | |
9aa5f780 KM |
17 | if ((curfile->funit & FREAD) && (curfile->funit & SYNC) == 0) { |
18 | fseek(curfile->fbuf, -curfile->fsize, 1); | |
19 | curfile->funit |= SYNC; | |
20 | } | |
21 | loc.cnt = ftell(curfile->fbuf); | |
0f913343 KM |
22 | return loc; |
23 | } |