gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog doc/C/gnashrc.xml libbase/rc.cp...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog doc/C/gnashrc.xml libbase/rc.cp...
Date: Fri, 25 May 2007 16:04:11 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/05/25 16:04:11

Modified files:
        .              : ChangeLog 
        doc/C          : gnashrc.xml 
        libbase        : rc.cpp rc.h 
        server/asobj   : Global.cpp 

Log message:
                * doc/C/gnashrc.xml: document new EnableExtensions gnashrc
                  variable
                * libbase/rc.{cpp,h}: add support for EnableExtensions variable,
                  defaults to OFF. Cleanup const-correctness and static methods.
                * server/asobj/Global.cpp: Don't load extensions if disabled
                  by gnashrc.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3356&r2=1.3357
http://cvs.savannah.gnu.org/viewcvs/gnash/doc/C/gnashrc.xml?cvsroot=gnash&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/rc.cpp?cvsroot=gnash&r1=1.22&r2=1.23
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/rc.h?cvsroot=gnash&r1=1.15&r2=1.16
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Global.cpp?cvsroot=gnash&r1=1.60&r2=1.61

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3356
retrieving revision 1.3357
diff -u -b -r1.3356 -r1.3357
--- ChangeLog   25 May 2007 15:18:04 -0000      1.3356
+++ ChangeLog   25 May 2007 16:04:10 -0000      1.3357
@@ -1,5 +1,14 @@
 2007-05-25 Sandro Santilli <address@hidden>
 
+       * doc/C/gnashrc.xml: document new EnableExtensions gnashrc
+         variable
+       * libbase/rc.{cpp,h}: add support for EnableExtensions variable,
+         defaults to OFF. Cleanup const-correctness and static methods.
+       * server/asobj/Global.cpp: Don't load extensions if disabled 
+         by gnashrc.
+
+2007-05-25 Sandro Santilli <address@hidden>
+
        * libgeometry/snappingrange.h: add intersects(Range2d)
        * testsuite/misc-ming.all/: Makefile.am,
          loop_test2.c, loop_test2runner.cpp: Add a visual test

Index: doc/C/gnashrc.xml
===================================================================
RCS file: /sources/gnash/gnash/doc/C/gnashrc.xml,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- doc/C/gnashrc.xml   13 Dec 2006 12:00:05 -0000      1.6
+++ doc/C/gnashrc.xml   25 May 2007 16:04:11 -0000      1.7
@@ -160,6 +160,16 @@
          </para>
        </listitem>
       </varlistentry>
+
+      <varlistentry>
+       <term>EnableExtensions</term>
+       <listitem>
+         <para>
+           Set to ``on'' to enable extensions. Off by default.
+         </para>
+       </listitem>
+      </varlistentry>
+
    </variablelist>
 
   <para>

Index: libbase/rc.cpp
===================================================================
RCS file: /sources/gnash/gnash/libbase/rc.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- libbase/rc.cpp      14 May 2007 09:44:21 -0000      1.22
+++ libbase/rc.cpp      25 May 2007 16:04:11 -0000      1.23
@@ -59,7 +59,8 @@
                            _localdomain_only(false),
                            _localhost_only(false),
                            _sound(true),
-                           _plugin_sound(true)
+                           _plugin_sound(true),
+                          _extensionsEnabled(false)
 {
 //    GNASH_REPORT_FUNCTION;
     loadFiles();
@@ -180,6 +181,7 @@
                 extractSetting(&_plugin_sound, "pluginsound", variable, value);
                 extractSetting(&_verboseASCodingErrors, 
"ASCodingErrorsVerbosity", variable, value);
                 extractSetting(&_verboseMalformedSWF, "MalformedSWFVerbosity", 
variable, value);
+                extractSetting(&_extensionsEnabled, "EnableExtensions", 
variable, value);
                 
                 extractNumber(&_delay, "delay", variable, value);
                 extractNumber(&_verbosity, "verbosity", variable, value);
@@ -317,6 +319,8 @@
          << ((_sound)?"enabled":"disabled") << endl;
     cerr << "\tEnable Plugin sound: "
          << ((_plugin_sound)?"enabled":"disabled") << endl;
+    cerr << "\tEnable Extensions: "
+         << ((_extensionsEnabled)?"enabled":"disabled") << endl;
     if (_log.size()) {
         cerr << "\tDebug Log name is: " << _log << endl;
     }

Index: libbase/rc.h
===================================================================
RCS file: /sources/gnash/gnash/libbase/rc.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- libbase/rc.h        13 Dec 2006 12:00:06 -0000      1.15
+++ libbase/rc.h        25 May 2007 16:04:11 -0000      1.16
@@ -45,58 +45,63 @@
     bool parseFile(const std::string& filespec);
     bool updateFile(const std::string& filespec);
     
-    bool useSplashScreen() { return _splash_screen; }
+    bool useSplashScreen() const { return _splash_screen; }
     void useSplashScreen(bool value);
 
-    bool useActionDump() { return _actiondump; }
+    bool useActionDump() const { return _actiondump; }
     void useActionDump(bool value);
 
-    bool useParserDump() { return _parserdump; }
+    bool useParserDump() const { return _parserdump; }
     void useParserDump(bool value);
 
-    bool useWriteLog() { return _writelog; }
+    bool useWriteLog() const { return _writelog; }
     void useWriteLog(bool value);
 
-    int getTimerDelay() { return _delay; }
+    int getTimerDelay() const { return _delay; }
     void setTimerDelay(int x) { _delay = x; }
 
-    bool showASCodingErrors() { return _verboseASCodingErrors; }
+    bool showASCodingErrors() const { return _verboseASCodingErrors; }
     void showASCodingErrors(bool value);
 
-    bool showMalformedSWFErrors() { return _verboseMalformedSWF; }
+    bool showMalformedSWFErrors() const { return _verboseMalformedSWF; }
     void showMalformedSWFErrors(bool value);
     
-    int verbosityLevel() { return _verbosity; }
+    bool enableExtensions() const { return _extensionsEnabled; }
+    //void enableExtension(bool mode) { _extensionsEnabled=mode; }
+    
+    int verbosityLevel() const { return _verbosity; }
     void verbosityLevel(int value) { _verbosity = value; }
     
-    std::string getDebugLog() { return _log; }
+    std::string getDebugLog() const { return _log; }
     std::string getDocumentRoot() { return _wwwroot; }
     
-    bool useDebugger() { return _debugger; }
+    bool useDebugger() const { return _debugger; }
     void useDebugger(bool value) { _debugger = value; }
 
-    bool useSound() { return _sound; }
+    bool useSound() const { return _sound; }
     void useSound(bool value) { _sound = value; }
 
-    bool usePluginSound() { return _plugin_sound; }
+    // strk: I'd drop this, and allow an -f switch to select
+    //       the gnashrc file to use instead
+    bool usePluginSound() const { return _plugin_sound; }
     void usePluginSound(bool value) { _plugin_sound = value; }
 
-    bool useLocalDomain() { return _localdomain_only; }
+    bool useLocalDomain() const { return _localdomain_only; }
     void useLocalDomain(bool value);
     
-    bool useLocalHost() { return _localhost_only; }
+    bool useLocalHost() const { return _localhost_only; }
     void useLocalHost(bool value);
 
-    bool extractSetting(bool *var, const char *pattern, std::string &variable,
+    static bool extractSetting(bool *var, const char *pattern, std::string 
&variable,
                         std::string &value);
     
-    int extractNumber(int *num, const char *pattern, std::string &variable,
+    static int extractNumber(int *num, const char *pattern, std::string 
&variable,
                         std::string &value);
     
-    std::vector<std::string> getWhiteList() { return _whitelist; }
-    std::vector<std::string> getBlackList() { return _blacklist; }
+    const std::vector<std::string>& getWhiteList() const { return _whitelist; }
+    const std::vector<std::string>& getBlackList() const { return _blacklist; }
 
-    int getRetries() { return _retries; }
+    int getRetries() const { return _retries; }
     void setRetries(int x) { _retries = x; }
 
     void dump();
@@ -132,6 +137,8 @@
     int _retries;               // the number of retries for a thread
     bool _sound;               // whether sound is enable or not
     bool _plugin_sound;                // whether sound is desired for the 
plugin
+
+    bool _extensionsEnabled;
 };
 
 //extern DSOEXPORT RcInitFile rcfile;

Index: server/asobj/Global.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/Global.cpp,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -b -r1.60 -r1.61
--- server/asobj/Global.cpp     18 Apr 2007 13:47:24 -0000      1.60
+++ server/asobj/Global.cpp     25 May 2007 16:04:11 -0000      1.61
@@ -17,7 +17,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-/* $Id: Global.cpp,v 1.60 2007/04/18 13:47:24 martinwguy Exp $ */
+/* $Id: Global.cpp,v 1.61 2007/05/25 16:04:11 strk Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -63,6 +63,7 @@
 #include "URL.h" // for URL::encode and URL::decode (escape/unescape)
 #include "builtin_function.h"
 #include "edit_text_character.h"
+#include "rc.h"
 
 #include "fn_call.h"
 #include "sprite_instance.h"
@@ -477,18 +478,27 @@
        // SWF8
        //-----------------------
 
+extscan: 
+
        //-----------------------
        // Extensions
        //-----------------------
-extscan: 
-
         // Scan the plugin directories for all plugins, and load them now.
         // FIXME: this should actually be done dynamically, and only
         // if a plugin defines a class that a movie actually wants to
         // use.
 #ifdef USE_EXTENSIONS
-//        et.scanDir("/usr/local/lib/gnash/plugins");
+
+       if ( RcInitFile::getDefaultInstance().enableExtensions() )
+       {
+               log_security("Extensions enabled, scanning plugin dir for 
load");
+               //et.scanDir("/usr/local/lib/gnash/plugins");
         et.scanAndLoad(*this);
+       }
+       else
+       {
+               log_security("Extensions disabled");
+       }
 #else
        return;
 #endif




reply via email to

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