12193Smckusick /* Copyright (c) 1979 Regents of the University of California */ 22193Smckusick 3*3904Smckusic static char sccsid[] = "@(#)TELL.c 1.3 06/17/81"; 42193Smckusick 52193Smckusick #include "h00vars.h" 62193Smckusick 72193Smckusick /* 82193Smckusick * Find current location 92193Smckusick */ 10*3904Smckusic struct seekptr 112193Smckusick TELL(curfile) 122193Smckusick 132193Smckusick register struct iorec *curfile; 142193Smckusick { 15*3904Smckusic struct seekptr loc; 162193Smckusick 17*3904Smckusic if ((curfile->funit & FREAD) && (curfile->funit & SYNC) == 0) { 18*3904Smckusic fseek(curfile->fbuf, -curfile->fsize, 1); 19*3904Smckusic curfile->funit |= SYNC; 20*3904Smckusic } 21*3904Smckusic loc.cnt = ftell(curfile->fbuf); 222193Smckusick return loc; 232193Smckusick } 24