Article View: alt.msdos.programmer
Article #47file positioning with buffered/unbuffered I/O
From: Jerry Nettleton
Date: Sun, 02 Aug 1992 08:01
Date: Sun, 02 Aug 1992 08:01
17 lines
1120 bytes
1120 bytes
A program I'm working reads a text file to load a database. When an
error is encountered in the text, I need to go backwards in the file
to a saved location and print the text and error messages. I've tried
to use 'ftell/fseek' and 'fgetpos/fsetpos', but these functions don't
work reliably when buffered I/O is enabled. They return multiples of
0x0200 (BUFSIZ). I've also tried to open the twice, one file pointer
to read lines and parse the info and the other one for generating
error messages. Unbuffered I/O slows down the conversion process
significantly...
Any ideas?
--
Jerry Nettleton
email: nett@technix.mn.org
...!uunet!cs.umn.edu!kksys!edgar!technix!nett
Technical Details
Message-ID:
<1992Aug02.080128.18475@technix.mn.org>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!doug.cae.wisc.edu!umn.edu!kksys.com!edgar!technix!nettShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!doug.cae.wisc.edu!umn.edu!kksys.com!edgar!technix!nett From: nett@technix.mn.org (Jerry Nettleton) Newsgroups: alt.msdos.programmer,comp.lang.c,comp.os.msdos.programmer Subject: file positioning with buffered/unbuffered I/O Message-ID: <1992Aug02.080128.18475@technix.mn.org> Date: 2 Aug 92 08:01:28 GMT Organization: Technix, Inc. Lines: 17