According to Jim Cole: > Gilles Detillieux's bits of Thu, 5 Sep 2002 translated to: > >Yes, this was reported just a few weeks ago, and a patch was provided. > >See ftp://ftp.ccsf.org/htdig-patches/3.1.6/ > > Sorry. I somehow missed that post. However, even with the patch I > believe the code in both 3.1.6 and 3.2.x is incorrect. If the > name of a non-existent file was provided, the same problem with > infinite looping could occur. As I understand the standard, the > check of in.bad() is of no use with regard to whether the file > was opened successfully. If on the other hand in.good() is > checked, then it would ensure that neither badbit nor failbit is > set.
This is what I really hate about C++! So many of the so-called standard classes aren't really that standard, and vary from one implementation to another, and one release to another. How intuitive is this? bad() is not to be taken as an antonym of good()? If what you're saying is true, then 3.1.x's htlib/Configuration.cc code will also bomb if it can't open the config file. So, just how standard is the behaviour you describe? If we start using in.good() in htnotify.cc and Configuration.cc, instead of !in.bad(), will the code work correctly on all supported platforms, or will it start to bomb on some of the systems where !in.bad() used to work fine? Do we need configure tests for all this nonsense? On the g++ implementations I have on two different Red Hat Linux systems, good() seems to represent the absence of eofbit, badbit and failbit, but I can't find any information on what the distinction is between badbit and failbit. Is this consistent across all platforms? If so, why haven't we had a flurry of bug reports about htdig 3.1.x bombing when the config file can't be opened? -- Gilles R. Detillieux E-mail: <[EMAIL PROTECTED]> Spinal Cord Research Centre WWW: http://www.scrc.umanitoba.ca/ Dept. Physiology, U. of Manitoba Winnipeg, MB R3E 3J7 (Canada) ------------------------------------------------------- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 _______________________________________________ htdig-dev mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/htdig-dev