Hi,

Just looking at some code.

I noticed this:

    #ifndef WIN32
            mode = "r";
    #else
            mode = "rb";
    #endif
        } else {
    #ifndef WIN32
            mode = "r+";
    #else
            mode = "rb+";
    #endif

According to my manual:

       The mode string can also include the letter  ``b''  either
       as  a last character or as a character between the charac-
       ters in any of the two-character strings described  above.
       This  is  strictly for compatibility with ANSI X3.159-1989
       (``ANSI C'') and has no effect; the ``b''  is  ignored  on
       all  POSIX  conforming  systems,  including Linux.  (Other
       systems may treat text files and binary files differently,
       and adding the ``b'' may be a good idea if you do I/O to a
       binary file and expect that your program may be ported  to
       non-Unix environments.)

So I'm wondering if this piece of code (and possibly other code)
shouldn't just read:

            mode = "rb";
        } else {
            mode = "rb+";

which looks nicer, and should in theory be better anyway (...good idea...)

Anyone knows why it isn't just asking for binary mode in any case?

cheers
-- 
   __________________________________________________________________
 / [EMAIL PROTECTED]                  [EMAIL PROTECTED] \
| work                                                         private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+
| Technical questions sent directly to me will be nuked. Use the list. | 
+----------------------------------------------------------------------+
| http://faq.mrtg.org/                                                 |
| http://rrdtool.eu.org  --> tutorial                                  |
+----------------------------------------------------------------------+

--
Unsubscribe mailto:[EMAIL PROTECTED]
Help        mailto:[EMAIL PROTECTED]
Archive     http://www.ee.ethz.ch/~slist/rrd-developers
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

Reply via email to