Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!sunybcs!boulder!hao!oddjob!gargoyle!ihnp4!homxb!mtuxo!mtune!codas!killer!academ!uhnix1!sugar!peter From: peter@sugar.UUCP Newsgroups: comp.lang.c Subject: Re: pointer alignment when int != char * Message-ID: <728@sugar.UUCP> Date: Mon, 14-Sep-87 18:15:02 EDT Article-I.D.: sugar.728 Posted: Mon Sep 14 18:15:02 1987 Date-Received: Sat, 19-Sep-87 08:02:29 EDT References: <493@its63b.ed.ac.uk> <6061@brl-smoke.ARPA> <3812@spool.WISC.EDU> <27824@sun.uucp> Organization: Sugar Land UNIX - Houston, TX Lines: 23 > OK, who *does* permit "lseek" to use a magic cookie? Certainly not the ANSI C > draft standard, as that doesn't contain any description of "lseek". Nobody official. Just a couple of implementations. I thought I remembered this was official, but of course what I was thinking of the standard IO library document's description of fseek. Sigh. > > Or you implement a byte-oriented one and return an error > > code when you use it incorrectly. Lseek is permitted to fail on non-seekable > > files. Even UNIX has these (pipes, terminals...) > > What does "use it incorrectly" mean here? Use it on any text file? Use it on > any file that doesn't support it? By the time you're done, it's not clear > you'd have anything better than what you have now. I mean "use it on any file which doesn't support it". If text files support it, that's great. If they don't, you'll get an error return from lseek. You do check your error returns, don't you? (Smileyface. I should really do that more myself. Should I say a few "Not a Terminal"s and a couple of "Error 0"s in penance? In the meantime do as I say, not as I do). -- -- Peter da Silva `-_-' ...!hoptoad!academ!uhnix1!sugar!peter -- 'U` ^^^^^^^^^^^^^^ Not seismo!soma (blush)