www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/08/18/14:14:40

From: Bora Ertung <BERTUNG AT gab DOT unt DOT edu>
Organization: University of North Texas
To: mat AT ardi DOT com (Mat Hostetter)
Date: Fri, 18 Aug 1995 12:39:00 CST6CDT
Subject: Re: BUG IN V2??
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019