1 /*- 2 * Copyright (c) 1979, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * %sccs.include.redist.c% 6 */ 7 8 #ifndef lint 9 static char sccsid[] = "@(#)TELL.c 8.1 (Berkeley) 06/06/93"; 10 #endif /* not lint */ 11 12 #include "h00vars.h" 13 14 /* 15 * Find current location 16 */ 17 struct seekptr 18 TELL(curfile) 19 20 register struct iorec *curfile; 21 { 22 struct seekptr loc; 23 24 if ((curfile->funit & FREAD) && (curfile->funit & SYNC) == 0) { 25 fseek(curfile->fbuf, -curfile->fsize, 1); 26 curfile->funit |= SYNC; 27 } 28 loc.cnt = ftell(curfile->fbuf); 29 return loc; 30 } 31