From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 11 22:05:43 2011 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06A18106566B for ; Fri, 11 Feb 2011 22:05:43 +0000 (UTC) (envelope-from jhs@berklix.com) Received: from tower.berklix.org (tower.berklix.org [83.236.223.114]) by mx1.freebsd.org (Postfix) with ESMTP id 777548FC12 for ; Fri, 11 Feb 2011 22:05:42 +0000 (UTC) Received: from park.js.berklix.net (p5B22F7C3.dip.t-dialin.net [91.34.247.195]) (authenticated bits=0) by tower.berklix.org (8.14.2/8.14.2) with ESMTP id p1BM5ePi021049 for ; Fri, 11 Feb 2011 22:05:41 GMT (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (fire.js.berklix.net [192.168.91.41]) by park.js.berklix.net (8.13.8/8.13.8) with ESMTP id p1BM61lI012436 for ; Fri, 11 Feb 2011 23:06:01 +0100 (CET) (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (localhost [127.0.0.1]) by fire.js.berklix.net (8.14.3/8.14.3) with ESMTP id p1BM5ti6071257 for ; Fri, 11 Feb 2011 23:06:00 +0100 (CET) (envelope-from jhs@fire.js.berklix.net) Message-Id: <201102112206.p1BM5ti6071257@fire.js.berklix.net> to: hackers@freebsd.org From: "Julian H. Stacey" Organization: http://www.berklix.com BSD Unix Linux Consultancy, Munich Germany User-agent: EXMH on FreeBSD http://www.berklix.com/free/ X-URL: http://www.berklix.com In-reply-to: Your message "Fri, 11 Feb 2011 22:32:46 +0100." <201102112132.p1BLWkiP003000@fire.js.berklix.net> Date: Fri, 11 Feb 2011 23:05:55 +0100 Sender: jhs@berklix.com Cc: Subject: Re: reverse of getchar() read() open() fopen() ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Feb 2011 22:05:43 -0000 > 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 ? PS I'm not looking for a program that reverses chars in lines ( eg like my http://berklix.com/~jhs/src/bsd/jhs/bin/local/rev/ ), instead I'm wondering if we have functions that read binary backwards, \0 & \n not special. Cheers, Julian -- Julian Stacey, BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com Mail plain text; Not quoted-printable, Not HTML, Not base 64. Reply below text sections not at top, to avoid breaking cumulative context.