Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!uunet!mcsun!ukc!icdoc!qmw-cs!liam From: liam@cs.qmw.ac.uk (William Roberts) Newsgroups: comp.unix.aux Subject: Re: stat(), lstat() again. Message-ID: <2842@sequent.cs.qmw.ac.uk> Date: 20 Sep 90 19:48:04 GMT References: <4038@ursa-major.SPDCC.COM> <3430@dftsrv.gsfc.nasa.gov> <4062@ursa-major.SPDCC.COM> <3434@dftsrv.gsfc.nasa.gov> Organization: Computer Science Dept, QMW, University of London, UK. Lines: 52 In <3434@dftsrv.gsfc.nasa.gov> jim@jagmac2.gsfc.nasa.gov (Jim Jagielski) writes: >In article <4062@ursa-major.SPDCC.COM> dyer@ursa-major.spdcc.com.spdcc.COM (Steve Dyer) writes: >> > Some compilers WON'T let > you pass structures to functions as is canon K&R. True, but not particularly relevant. Such a compiler should be associated with a version of lint that also insists on this, and none of your examples did this anyway. > Some compilers WILL, > when you tell the pointer to point to NULL, have the pointer point to > space which is big enuff for whatever the pointer is a pointer to. This is > a fact. Hang on a minute - name one such compiler! You were the one who started talking about "canon K&R" and XJwhatever committee numbers. > What the problem was was that I was looking at the code without > THINKING about the code... I guess someone as perfect as you has never done > THAT before. As far as you thinking I don't understand C, well, I beg to > differ. Everyone has off days with C and can't recall what they wrote or > what they mean, except of course yourself. I've written a bunch of C code, > dude and it hasn't been all 100% perfect, but no one's is, except yours, > of course. Your making the EtherPort II stuff available is appreciated (I may soon have something to add to your distribution - we have 50 of the old EtherPort II cards so I am putting work into making they coexist with A/UX 2.0 as well as possible). Your flame about the mild criticisms your pointer-confusion has earned is wildly out of proportion. You cannot both quote ANSI documents AND say that "some compilers do ***horrid thing omitted***". Do you now accept that 1) the stat and lstat functions require a pointer to a statbuf structure 2) the stat and lstat functions don't do memory allocation for that structure 3) NULL is not a good choice of random address for a structure 4) You should be using &statbuf regardless of the fact that some compiler/machine/architecture combinations let you get away with what you were doing before. Making mistakes is forgiveable - insisting that they aren't mistakes is not. -- William Roberts ARPA: liam@cs.qmw.ac.uk Queen Mary & Westfield College UUCP: liam@qmw-cs.UUCP Mile End Road AppleLink: UK0087 LONDON, E1 4NS, UK Tel: 071-975 5250 (Fax: 081-980 6533)