Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 (MU) 9/23/84; site pyramids.OZ Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!munnari!basser!neology!nestor!pyramids!dave From: dave@pyramids.OZ (Dave Horsfall) Newsgroups: net.sources Subject: Re: Printing a file backwards Message-ID: <122@pyramids.OZ> Date: Tue, 15-Oct-85 22:05:02 EDT Article-I.D.: pyramids.122 Posted: Tue Oct 15 22:05:02 1985 Date-Received: Fri, 18-Oct-85 00:39:28 EDT References: <1213@hpda.UUCP> Distribution: net Organization: Pyramid Technology Australia Lines: 21 > with the lines in the reverse order. It 'fgetc()'s its way through > the file to count the number of characters, then backs up, spiting > > scott dawkins > {hplabs|ucbvax}!hpda!sdawkins > > /* find out how many characters are in the file */ > for (count = 0; (c = fgetc(in_file)) != EOF; ++count) > ; > --count; > What's wrong with "stat" ? Or isn't that "portable"? (Yes - I know, KRE - we don't export net.sources back to the yanks. This is a sincere request for information no matter who can answer it.) -- Dave Horsfall VK2KFU ISD: +61 2 438-1266 VTL: 248181000 Lionel Singer Group STD: (02) 438-1266 20 Waltham St ARPA: munnari!pyramids.oz!dave@SEISMO Artarmon NSW 2064 UUCP: seismo!munnari!pyramids.oz!dave AUSTRALIA ACS: dave@pyramids, dave@elecvax, dave@runx "V7 was the last Unix"