140865Sbostic /*- 2*62096Sbostic * Copyright (c) 1979, 1993 3*62096Sbostic * The Regents of the University of California. All rights reserved. 440865Sbostic * 540865Sbostic * %sccs.include.redist.c% 640865Sbostic */ 72193Smckusick 840865Sbostic #ifndef lint 9*62096Sbostic static char sccsid[] = "@(#)TELL.c 8.1 (Berkeley) 06/06/93"; 1040865Sbostic #endif /* not lint */ 112193Smckusick 122193Smckusick #include "h00vars.h" 132193Smckusick 142193Smckusick /* 152193Smckusick * Find current location 162193Smckusick */ 173904Smckusic struct seekptr TELL(curfile)182193SmckusickTELL(curfile) 192193Smckusick 202193Smckusick register struct iorec *curfile; 212193Smckusick { 223904Smckusic struct seekptr loc; 232193Smckusick 243904Smckusic if ((curfile->funit & FREAD) && (curfile->funit & SYNC) == 0) { 253904Smckusic fseek(curfile->fbuf, -curfile->fsize, 1); 263904Smckusic curfile->funit |= SYNC; 273904Smckusic } 283904Smckusic loc.cnt = ftell(curfile->fbuf); 292193Smckusick return loc; 302193Smckusick } 31