Path: utzoo!utgpu!attcan!uunet!husc6!rutgers!ucsd!ucbvax!VENUS.YCC.YALE.EDU!LEICHTER From: LEICHTER@VENUS.YCC.YALE.EDU ("Jerry Leichter ", LEICHTER-JERRY@CS.YALE.EDU) Newsgroups: comp.os.vms Subject: re: ftell & fseek Message-ID: <8808031204.AA26428@ucbvax.berkeley.edu> Date: 31 Jul 88 20:13:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 17 I was working on adapting a C program, currently running under UNIX, to VMS. I had some problems with the use of "ftell" and "fseek" . After a call to "fseek" and a number 'n' of calls to "fgetc" are done, the next "ftell" don't return the actual position ( n bytes after the last "fseek"), but return the position of the last "fseek". I think that could be some problems into the implementation of "fseek" and "getc" so that the pointer to the position into the file is not correctly handled by this functions. On VMS, files may be record- or stream-oriented. A record-oriented file, which is what you get by default, permits seeking only to the beginning of a record. This is fully discussed in the VAX C documentation. -- Jerry