Re: reverse of getchar() read() open() fopen() ?

看板FB_hackers作者時間15年前 (2011/02/12 06:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串4/4 (看更多)
On Fri, Feb 11, 2011 at 10:32:46PM +0100, Julian H. Stacey wrote: > Hi hackers@, > Do we have C libraries with reverse of getchar() [ & maybe read() > ] & fopen() [ & maybe open() ] etc, to read from end of file toward > beginning ? I dont see anything in the See Also sections. I'm not > looking to write, just read. I'm looking for something that returns > last char in file as first etc, I'm not interested in wchars etc, > I could write some C functions, with seek etc & probably will, if > none exist, but no point if they already exist ? Use lseek() to position yourself, iterate over the file, copying into a small buffer, then iterate over your buffer in reverse? Maybe I misunderstood you... > Cheers, > Julian -- Brian Reichert <reichert@numachi.com> 55 Crystal Ave. #286 Derry NH 03038-1725 USA BSD admin/developer at large _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
文章代碼(AID): #1DLRZYFb (FB_hackers)
文章代碼(AID): #1DLRZYFb (FB_hackers)