gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] libvob/src/util Debug.cxx


From: Tuomas J. Lukka
Subject: [Gzz-commits] libvob/src/util Debug.cxx
Date: Sun, 20 Apr 2003 07:08:27 -0400

CVSROOT:        /cvsroot/libvob
Module name:    libvob
Changes by:     Tuomas J. Lukka <address@hidden>        03/04/20 07:08:27

Modified files:
        src/util       : Debug.cxx 

Log message:
        Only do once

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/src/util/Debug.cxx.diff?tr1=1.5&tr2=1.6&r1=text&r2=text

Patches:
Index: libvob/src/util/Debug.cxx
diff -u libvob/src/util/Debug.cxx:1.5 libvob/src/util/Debug.cxx:1.6
--- libvob/src/util/Debug.cxx:1.5       Sun Apr 20 06:51:38 2003
+++ libvob/src/util/Debug.cxx   Sun Apr 20 07:08:27 2003
@@ -38,11 +38,13 @@
 namespace Debug {
     
     std::ostream *debugStream() {
-       const char *str = std::getenv("VOBLOG");
+       static const char *str = std::getenv("VOBLOG");
        static std::ostream *dbgstream = 
            (str ? new std::ofstream(str) : &std::cout);
-       if(str) {
+       static bool setbufyet = false;
+       if(!setbufyet && str) {
            dbgstream->rdbuf()->pubsetbuf(0,0);
+           setbufyet = true;
        }
        return &std::cout;
     }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]