Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.sys.hp Subject: Re: tell() equivalent on Series 800 Message-ID: <3841@auspex.auspex.com> Date: 7 Aug 90 17:43:12 GMT References: <5570457@hpfcdc.HP.COM> Organization: Auspex Systems, Santa Clara Lines: 29 >I need to know the history of tell(). I cannot find it in the AT&T, BSD >or HP-UX references. Would you tell me how you knew about it in order to >use it in your original application? You have indeed used it correctly, >I'm just trying to figure out how! I can't speak for the original poster, but *I* first knew about "tell()" when it showed up in what you might call a "post-V6" V6 release - two of them, actually, PWB/UNIX 1.0 and the "50 changes to UNIX" stuff, which was a set of "diff"s or somesuch sent out by Ken Thomson that changed a bunch of stuff in the kernel (and maybe elsewhere). V6 had "seek()" (don't ask) but not "tell()", so you could set the seek pointer but you couldn't find out where it was; "tell()" was subsequently added, showed up in the "50 changes" and in PWB 1.0. I think when "lseek()" showed up as a library routine atop "seek()", it also used "tell()" and returned the new value of the seek pointer, but it's been so long since I had anything to do with V6-vintage systems, so this may not be correct. In any case, by V7 "lseek()" was the official interface for both the functionality of "seek()" (which was gone in V7, its system call number being given to "lseek()") and "tell()". >I would make the suggestion that you change your code to use > > lseek(fildes, SEEK_CUR, (off_t)0) I'll second, third, and fourth that suggestion; "tell()" is really crufty and old and obsolete, and not in all systems (as has been demonstrated), and not in POSIX or the SVID or any of the other standards, so you shouldn't use it.