Newsgroups: comp.lang.c
Path: utzoo!henry
From: henry@zoo.toronto.edu (Henry Spencer)
Subject: Re: How to FSEEK previous line of text?
Message-ID: <1991May8.154638.21318@zoo.toronto.edu>
Date: Wed, 8 May 1991 15:46:38 GMT
References: <4508.28269613@iccgcc.decnet.ab.com>
Organization: U of Toronto Zoology

In article <4508.28269613@iccgcc.decnet.ab.com> maslar@iccgcc.decnet.ab.com writes:
>Does anyone know of a function or technique that is similar to FSEEK
>that will allow me to go back to the previous line? ...

There is no provision for this in the standard libraries, because it can
be arbitrarily hard to implement on systems that store text files in odd
ways.  You can build it yourself, however, by simply using ftell() to keep
track of the location of the previous line, and fseek()ing there on demand.
-- 
And the bean-counter replied,           | Henry Spencer @ U of Toronto Zoology
"beans are more important".             |  henry@zoo.toronto.edu  utzoo!henry
