gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog libbase/rc.cpp


From: Benjamin Wolsey
Subject: [Gnash-commit] gnash ChangeLog libbase/rc.cpp
Date: Thu, 31 Jan 2008 15:17:11 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Benjamin Wolsey <bwy>   08/01/31 15:17:11

Modified files:
        .              : ChangeLog 
        libbase        : rc.cpp 

Log message:
                * libbase/rc.cpp: fix write of LCShmKey.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5536&r2=1.5537
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/rc.cpp?cvsroot=gnash&r1=1.57&r2=1.58

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5536
retrieving revision 1.5537
diff -u -b -r1.5536 -r1.5537
--- ChangeLog   31 Jan 2008 14:26:18 -0000      1.5536
+++ ChangeLog   31 Jan 2008 15:17:09 -0000      1.5537
@@ -1,3 +1,7 @@
+2008-01-31 Benjamin Wolsey <address@hidden>
+
+       * libbase/rc.cpp: fix write of LCShmKey.
+
 2008-01-31 Sandro Santilli <address@hidden>
 
        * server/font.cpp: don't assign 0 to std::strings... actually simplify

Index: libbase/rc.cpp
===================================================================
RCS file: /sources/gnash/gnash/libbase/rc.cpp,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -b -r1.57 -r1.58
--- libbase/rc.cpp      23 Jan 2008 12:10:22 -0000      1.57
+++ libbase/rc.cpp      31 Jan 2008 15:17:10 -0000      1.58
@@ -170,8 +170,8 @@
     return *var;
 }
 
-uint32_t
-RcInitFile::extractNumber(uint32_t *num, const char *pattern, std::string 
&variable,
+boost::uint32_t
+RcInitFile::extractNumber(boost::uint32_t *num, const char *pattern, 
std::string &variable,
                            std::string &value)
 {      
 //    GNASH_REPORT_FUNCTION;
@@ -487,7 +487,7 @@
                                value);
                      extractSetting(&_lctrace, "LCTrace", variable,
                                value);
-                     extractNumber((uint32_t *)&_lcshmkey, "LCShmkey", 
variable, value);
+                     extractNumber((boost::uint32_t *)&_lcshmkey, "LCShmkey", 
variable, value);
                }
             }
         } while (!in.eof());
@@ -556,10 +556,11 @@
         return false;
     }
 
-    std::string cmd = "set ";
+    const std::string cmd = "set ";
 
-    // Bools and numbers. We want boolean values written as words.
-    out << std::boolalpha << 
+    // Bools and numbers. We want boolean values written as words, hex values
+    // prefixed with '0x'.
+    out << std::boolalpha << std::showbase <<
     _("# Generated by Gnash. Manual changes to this file may be overridden.") 
<< endl <<
     cmd << "splash_screen " << _splashScreen << endl <<
     cmd << "localHost " << _localhostOnly << endl <<
@@ -582,41 +583,23 @@
     cmd << "solReadOnly " << _solreadonly << endl <<
     cmd << "localConnection " << _lcdisabled << endl <<
     cmd << "LCTrace " << _lctrace << endl <<
-    cmd << "LCShmkey " << _lcshmkey << endl;
+    cmd << "LCShmkey " << std::hex << (boost::uint32_t) _lcshmkey << endl <<
    
     // Strings.
-    // VM.cpp checks whether flashSystemOS is set in order to decide
-    // whether to send the detected value, so it's best not to write
-    // them at all if they are set to "". Gnash then defaults to the
-    // values set in the constructor.
+
+    // If a string is empty, Gnash defaults to the values set in the
+    // constructor.
     
     // This might be irritating for users who, for instance, set
     // debuglog to nothing, only to find it returns to "gnash-debug.log"
     // at the next run (even though that's not the way to use it...)
     
-    if (_log != "") {
-        out << cmd << "debuglog " << _log << endl;
-    }
-
-    if (_wwwroot != "") {
-        out << cmd << "documentroot " << _wwwroot << endl;
-    }
-    
-    if (_flashSystemOS != "") {
-        out << cmd << "flashSystemOS " << _flashSystemOS << endl;
-    }
-
-    if (_flashVersionString != "") {
-        out << cmd << "flashVersionString " << _flashVersionString << endl;
-    }
-
-    if (_urlOpenerFormat != "") {
-        out << cmd << "urlOpenerFormat " << _urlOpenerFormat << endl;
-    }
-
-    if (_solsandbox != "") {
-        out << cmd << "SOLSafeDir " << _solsandbox << endl;
-    }
+    cmd << "debuglog " << _log << endl <<
+    cmd << "documentroot " << _wwwroot << endl <<
+    cmd << "flashSystemOS " << _flashSystemOS << endl <<
+    cmd << "flashVersionString " << _flashVersionString << endl <<
+    cmd << "urlOpenerFormat " << _urlOpenerFormat << endl <<
+    cmd << "SOLSafeDir " << _solsandbox << endl;
 
     // Lists. These can't be handled very well at the moment. The main
     // inconvenience would be that disabling a list makes it an empty




reply via email to

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