Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!uc!cs.umn.edu!dmshq!com50!pai!erc From: erc@pai.UUCP (Eric Johnson) Newsgroups: comp.sys.hp Subject: tell() equivalent on Hp 800? Keywords: lseek() Message-ID: <1367@pai.UUCP> Date: 26 Jul 90 13:27:16 GMT Organization: Boulware Technologies, Inc., Burnsville, MN Lines: 44 We've just got an HP 800 (834?) in house, and I've been porting our industrial automation software to it. We're running HP-UX 7.0. The only difference between the 800 series HP-UX 7.0 and the 300 series is that tell() does not appear to be available on the 800. Is this correct? (We're much more familiar with the 300 line.) tell() returns a long int that "tells" where you are in a file, sort of like the analog to ftell() if you use open() instead of fopen(). Below is my hack for a tell() replacement. Do you see any problems with this approach? I'm basically doing a seek zero bytes from the current position (which I hope should still be the current position). #ifndef SEEK_CUR #define SEEK_CUR 1 #endif /* -- SEEK_CUR */ long etell( fd ) int fd; { /* -- function etell */ return( lseek( fd, 0, SEEK_CUR ) ); } /* -- function etell */ Are there any other "gotchas" on the 800 series that we should be aware of? So far, I haven't had any real problems migrating to the 800, and I like HP-UX 7.0 much better than any previous HP operating system--they seem to have come a long way in the last few years. Thanks, -Eric -- Eric F. Johnson phone: +1 612 894 0313 BTI: Industrial Boulware Technologies, Inc. fax: +1 612 894 0316 automation systems 415 W. Travelers Trail email: erc@pai.mn.org and services Burnsville, MN 55337 USA