Xref: utzoo comp.lang.c:30243 comp.os.vms:27816 Path: utzoo!utgpu!watserv1!watmath!att!rutgers!uwm.edu!spool!8099PIERZINA@vmsd.csd.mu.edu From: 8099pierzina@vmsd.csd.mu.edu (Todd Pierzina) Newsgroups: comp.lang.c,comp.os.vms Subject: fseek in VAX C Message-ID: <0093978E.33625920@vmsd.csd.mu.edu> Date: 10 Jul 90 20:57:37 GMT Sender: news@spool.mu.edu Reply-To: 8099pierzina@vmsd.csd.mu.edu (Todd Pierzina) Followup-To: comp.lang.c Organization: Marquette University - Computer Services Lines: 27 I need help. I am using VAX C, and I want to move backward through a data (record, not stream!) file. I am trying to use fseek. I have RTFMed, and it is very ambiguous as far as fseek and record files go. The Unix version would be (void) fseek(fp, (long)-sizeof(record_type), L_INCR); where fp is the file pointer. In VAX C, the RTL manual says that using fseek with a value not obtained from ftell is very unpredictable. No sh*t. I could set up a stack of ftell values going forward, then when I need to go back, pop the locations off and feed them to fseek directly. I think. So my questions(s): Is there an EASY way to move backward? Will my stack method work? I do not understand how fseek/ftell work with record files; the manual is VERY confusing. Please reply directly to me, as I am not subscribed to these lists. Todd Pierzina Student Programmer Marquette University 8099PIER@MUCSD (BITNET) 8099pierzina@vmsd.csd.mu.edu (Internet)