Mail Archives: djgpp/1995/08/18/14:14:40
Date sent: Mon, 14 Aug 95 15:18 MDT
From: mat AT ardi DOT com (Mat Hostetter)
To: bertung AT gab DOT unt DOT edu (Bora Ertung )
Subject: Re: BUG IN V2??
>>>>> "Bora" == Bora Ertung <bertung AT gab DOT unt DOT edu> writes:
Bora> wowww..It is not suppose to be a bug at all. Because it
Bora> works fine with gcc for unix. But, 'fopen' may return 'null'
Bora> if 'filename' is 'null' instead of saying 'Abort!' because
Bora> of the 'null' filename. And of course it is pretty logical
Bora> to catch null pointer assingments. But, It was working with
Bora> official version of the djgpp.May be I am just dreaming.
fopen(NULL, "r") is a programming error, period.
^^^^^^^
-Mat
I wasnt abnactious in my posting. But lemme try to tell why I thougth
it could be a bug for fopen. First of all this is not a programming
error ,but you look so high about saying that. fopen is a library
function , is not a keyword like (for, while, etc.) so anything
that you do with it could not be a programming error.It could be a
function call error. Second, I could pass NULL to a pointer if I want.
If function denies that this is not my problem, this is the function's
problem. I could assign pointers as NULL in a function argument.
Function may not act that NULL is an unexpected argument input. All
commercial compilers and gcc for unix and also djgpp official accepts
fopen(NULL,"r").
^^^^ you know(?) this is a pointer like FILE *something;
and you said that something=NULL is a programming error :).
P.S. If you dont know the answer quite well, better not try to answer
it. I understand the egos of human nature about being so high to
answer anything in his so called knowledge about it. NO OFFENCE.
Bora Ertung
UNT advanced visualization and computation lab.
- Raw text -