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/log.h...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog doc/C/gnashrc.xml libbase/log.h...
Date: Wed, 13 Dec 2006 12:00:07 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  06/12/13 12:00:06

Modified files:
        .              : ChangeLog 
        doc/C          : gnashrc.xml 
        libbase        : log.h rc.cpp rc.h 
        server         : character.cpp 

Log message:
                * doc/C/gnashrc.xml, libbase/log.h, libbase/rc.cpp, 
libbase/rc.h:
                  Add 'ASCodingErrorsVerbosity' and 'MalformedSWFVerbosity'
                  settings in gnashrc, IF_VERBOSE_MALFORMED_SWF() and
                  IF_VERBOSE_ASCODING_ERRORS() now use these settings
                  (not overridable from command line).
                * server/character.cpp (get_relative_target_commont):
                  don't warn about refenrecing on-up from root movie
                  unless verbose ascoding errors are requested.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.1931&r2=1.1932
http://cvs.savannah.gnu.org/viewcvs/gnash/doc/C/gnashrc.xml?cvsroot=gnash&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/log.h?cvsroot=gnash&r1=1.37&r2=1.38
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/rc.cpp?cvsroot=gnash&r1=1.19&r2=1.20
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/rc.h?cvsroot=gnash&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/gnash/server/character.cpp?cvsroot=gnash&r1=1.14&r2=1.15

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.1931
retrieving revision 1.1932
diff -u -b -r1.1931 -r1.1932
--- ChangeLog   13 Dec 2006 11:09:12 -0000      1.1931
+++ ChangeLog   13 Dec 2006 12:00:05 -0000      1.1932
@@ -1,5 +1,16 @@
 2006-12-13 Sandro Santilli <address@hidden>
 
+       * doc/C/gnashrc.xml, libbase/log.h, libbase/rc.cpp, libbase/rc.h:
+         Add 'ASCodingErrorsVerbosity' and 'MalformedSWFVerbosity'
+         settings in gnashrc, IF_VERBOSE_MALFORMED_SWF() and
+         IF_VERBOSE_ASCODING_ERRORS() now use these settings
+         (not overridable from command line).
+       * server/character.cpp (get_relative_target_commont):
+         don't warn about refenrecing on-up from root movie
+         unless verbose ascoding errors are requested.
+
+2006-12-13 Sandro Santilli <address@hidden>
+
        * server/as_environment.cpp: added debugging lines for
          find_target (compile-time enablable).
        * server/vm/ASHandlers.{h,cpp}: added CommonSetTarget().

Index: doc/C/gnashrc.xml
===================================================================
RCS file: /sources/gnash/gnash/doc/C/gnashrc.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- doc/C/gnashrc.xml   7 Dec 2006 11:57:23 -0000       1.5
+++ doc/C/gnashrc.xml   13 Dec 2006 12:00:05 -0000      1.6
@@ -89,6 +89,30 @@
       </varlistentry>
 
       <varlistentry>
+       <term>MalformedSWFVerbosity</term>
+       <listitem>
+         <para>
+           This value can be set to either <emphasis>on</emphasis> or
+           <emphasis>off</emphasis>, and controls whether malformed SWF errors 
should
+           be printed. If set to true, verbosity level is automatically 
incremented.
+           Set 'verbosity' to 0 afterwards to hush.
+         </para>
+       </listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>ASCodingErrorsVerbosity</term>
+       <listitem>
+         <para>
+           This value can be set to either <emphasis>on</emphasis> or
+           <emphasis>off</emphasis>, and controls whether ActionScript coding
+           errors should be printed. If set to true, verbosity level is
+           automatically incremented.  Set 'verbosity' to 0 afterwards to hush.
+         </para>
+       </listitem>
+      </varlistentry>
+
+      <varlistentry>
        <term>debuglog</term>
        <listitem>
          <para>
@@ -167,6 +191,12 @@
     # The default verbosity level
     set verbosity 1
 
+    # Be verbose about malformed SWF
+    set MalformedSWFVerbosity true
+
+    # Be verbose about AS coding errors
+    set ASCodingErrorsVerbosity true
+
     # The full path to the debug log
     set debuglog ~/gnash-dbg.log
 

Index: libbase/log.h
===================================================================
RCS file: /sources/gnash/gnash/libbase/log.h,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -b -r1.37 -r1.38
--- libbase/log.h       8 Dec 2006 12:56:29 -0000       1.37
+++ libbase/log.h       13 Dec 2006 12:00:06 -0000      1.38
@@ -17,7 +17,7 @@
 // 
 //
 
-/* $Id: log.h,v 1.37 2006/12/08 12:56:29 strk Exp $ */
+/* $Id: log.h,v 1.38 2006/12/13 12:00:06 strk Exp $ */
 
 #ifndef GNASH_LOG_H
 #define GNASH_LOG_H
@@ -26,6 +26,7 @@
 #include "config.h"
 #endif
 
+#include "rc.h" // for IF_VERBOSE_* implementation
 #include "tu_config.h"
 
 #include <fstream>
@@ -199,11 +200,11 @@
 // Undefine this to completely remove action debugging at compile-time
 #define VERBOSE_ACTION 1
 
-// Undefine this to remove ActionScript errors verbosity
-//#define VERBOSE_ASCODING_ERRORS 
+// Undefine this to remove ActionScript errors verbosity at compile-time
+#define VERBOSE_ASCODING_ERRORS  1
 
-// Undefine this to remove invalid SWF verbosity
-#define VERBOSE_MALFORMED_SWF
+// Undefine this to remove invalid SWF verbosity at compile-time
+#define VERBOSE_MALFORMED_SWF 1
 
 
 #ifdef VERBOSE_PARSE
@@ -220,14 +221,14 @@
 
 #ifdef VERBOSE_ASCODING_ERRORS
 // TODO: add a getActionDebug() method to LogFile and use it
-#define IF_VERBOSE_ASCODING_ERRORS(x) {x}
+#define IF_VERBOSE_ASCODING_ERRORS(x) { if ( 
RcInitFile::getDefaultInstance().showASCodingErrors() ) { x; } } while (0);
 #else
 #define IF_VERBOSE_ASCODING_ERRORS(x)
 #endif
 
 #ifdef VERBOSE_MALFORMED_SWF
 // TODO: add a getSWFDebug() method to LogFile and use it
-#define IF_VERBOSE_MALFORMED_SWF(x) {x}
+#define IF_VERBOSE_MALFORMED_SWF(x) { if ( 
RcInitFile::getDefaultInstance().showMalformedSWFErrors() ) { x; } } while (0);
 #else
 #define IF_VERBOSE_MALFORMED_SWF(x)
 #endif

Index: libbase/rc.cpp
===================================================================
RCS file: /sources/gnash/gnash/libbase/rc.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- libbase/rc.cpp      6 Dec 2006 10:58:34 -0000       1.19
+++ libbase/rc.cpp      13 Dec 2006 12:00:06 -0000      1.20
@@ -54,6 +54,8 @@
                            _verbosity(-1),
                            _actiondump(false),
                            _parserdump(false),
+                          _verboseASCodingErrors(false),
+                          _verboseMalformedSWF(false),
                            _splash_screen(true),
                            _localdomain_only(false),
                            _localhost_only(false),
@@ -99,16 +101,16 @@
                            std::string &value)
 {
 //    GNASH_REPORT_FUNCTION;
-//    dbglogfile << variable << ": " << value << endl;
+    //dbglogfile << variable << ": " << value << endl;
     
        StringNoCaseEqual noCaseCompare;
     if ( noCaseCompare(variable, pattern) ) {
         if ( noCaseCompare(value, "on") || noCaseCompare(value, "yes") || 
noCaseCompare(value, "true")) {
-//            dbglogfile << variable << ": Enabled " << endl;
+            //dbglogfile << variable << ": Enabled " << endl;
             *var = true;
         }
         if (noCaseCompare(value, "off") || noCaseCompare(value, "no") || 
noCaseCompare(value, "false")) {
-//            dbglogfile << variable << ": Disabled " << endl;
+            //dbglogfile << variable << ": Disabled " << endl;
             *var = false;
         }
     }
@@ -177,6 +179,8 @@
                 extractSetting(&_writelog, "writelog", variable, value);
                 extractSetting(&_sound, "sound", variable, value);
                 extractSetting(&_plugin_sound, "pluginsound", variable, value);
+                extractSetting(&_verboseASCodingErrors, 
"ASCodingErrorsVerbosity", variable, value);
+                extractSetting(&_verboseMalformedSWF, "MalformedSWFVerbosity", 
variable, value);
                 
                 extractNumber(&_delay, "delay", variable, value);
                 extractNumber(&_verbosity, "verbosity", variable, value);
@@ -257,6 +261,17 @@
 }
 
 void
+RcInitFile::showASCodingErrors(bool value)
+{
+//    GNASH_REPORT_FUNCTION;
+    
+    _verboseASCodingErrors = value;
+    if (value) {
+        _verbosity++;
+    }
+}
+
+void
 RcInitFile::useParserDump(bool value)
 {
 //    GNASH_REPORT_FUNCTION;
@@ -287,6 +302,10 @@
          << ((_actiondump)?"enabled":"disabled") << endl;
     cerr << "\tDump parser info: "
          << ((_parserdump)?"enabled":"disabled") << endl;
+    cerr << "\tActionScript coding errors verbosity: "
+         << ((_verboseASCodingErrors)?"enabled":"disabled") << endl;
+    cerr << "\tMalformed SWF verbosity: "
+         << ((_verboseASCodingErrors)?"enabled":"disabled") << endl;
     cerr << "\tUse Splash Screen: "
          << ((_splash_screen)?"enabled":"disabled") << endl;
     cerr << "\tUse Local Domain Only: "

Index: libbase/rc.h
===================================================================
RCS file: /sources/gnash/gnash/libbase/rc.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- libbase/rc.h        25 Nov 2006 11:56:39 -0000      1.14
+++ libbase/rc.h        13 Dec 2006 12:00:06 -0000      1.15
@@ -60,6 +60,12 @@
     int getTimerDelay() { return _delay; }
     void setTimerDelay(int x) { _delay = x; }
     
+    bool showASCodingErrors() { return _verboseASCodingErrors; }
+    void showASCodingErrors(bool value);
+
+    bool showMalformedSWFErrors() { return _verboseMalformedSWF; }
+    void showMalformedSWFErrors(bool value);
+    
     int verbosityLevel() { return _verbosity; }
     void verbosityLevel(int value) { _verbosity = value; }
     
@@ -104,6 +110,13 @@
     bool _actiondump;           // enable dumping actionscript classes
     bool _parserdump;           // enable dumping parser data
     
+    /// Enable ActionScript errors verbosity
+    bool _verboseASCodingErrors;
+
+    /// Enable Malformed SWF verbosity
+    bool _verboseMalformedSWF;
+    
+    
     // End user Features
     bool _splash_screen;        // display a splash screen when
                                 // loading a movie

Index: server/character.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/character.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- server/character.cpp        6 Dec 2006 12:48:51 -0000       1.14
+++ server/character.cpp        13 Dec 2006 12:00:06 -0000      1.15
@@ -18,7 +18,7 @@
 //
 //
 
-/* $Id: character.cpp,v 1.14 2006/12/06 12:48:51 strk Exp $ */
+/* $Id: character.cpp,v 1.15 2006/12/13 12:00:06 strk Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -142,10 +142,18 @@
                character* parent = get_parent();
                if ( ! parent )
                {
+                       IF_VERBOSE_ASCODING_ERRORS(
                        // AS code trying to access something before the root
-                       log_warning("ActionScript code trying to refrence"
-                               " before the root MovieClip");
-                       parent = this;
+                       log_warning("ActionScript code trying to reference"
+                               " an unexistent parent with '..' "
+                               " (an unexistent parent probably only "
+                               "occurs in the root MovieClip)."
+                               " Returning a reference to top parent "
+                               "(probably the root clip).");
+                       );
+                       //parent = this;
+                       assert(this == get_root_movie());
+                       return this;
                }
                return parent;
        }




reply via email to

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