gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog server/vm/ASHandlers.cpp server...


From: Benjamin Wolsey
Subject: [Gnash-commit] gnash ChangeLog server/vm/ASHandlers.cpp server...
Date: Mon, 21 Apr 2008 11:54:33 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Benjamin Wolsey <bwy>   08/04/21 11:54:33

Modified files:
        .              : ChangeLog 
        server/vm      : ASHandlers.cpp ActionExec.cpp 

Log message:
                * server/vm/ActionExec.cpp, server/vm/ASHandlers.cpp: replace
                  SIZET_FMT.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.6336&r2=1.6337
http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/ASHandlers.cpp?cvsroot=gnash&r1=1.227&r2=1.228
http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/ActionExec.cpp?cvsroot=gnash&r1=1.71&r2=1.72

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.6336
retrieving revision 1.6337
diff -u -b -r1.6336 -r1.6337
--- ChangeLog   21 Apr 2008 11:27:41 -0000      1.6336
+++ ChangeLog   21 Apr 2008 11:54:32 -0000      1.6337
@@ -7,6 +7,8 @@
          include gnashconfig.h).
        * libbase/log.h: define LOG_ONCE to replace the ONCE implementations
          in various server/ files.
+       * server/vm/ActionExec.cpp, server/vm/ASHandlers.cpp: replace
+         SIZET_FMT.
 
 2008-04-20 Benjamin Wolsey <address@hidden>
 

Index: server/vm/ASHandlers.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/vm/ASHandlers.cpp,v
retrieving revision 1.227
retrieving revision 1.228
diff -u -b -r1.227 -r1.228
--- server/vm/ASHandlers.cpp    21 Apr 2008 11:27:46 -0000      1.227
+++ server/vm/ASHandlers.cpp    21 Apr 2008 11:54:33 -0000      1.228
@@ -19,7 +19,7 @@
 
 
 #ifdef HAVE_CONFIG_H
-#include "gnashconfig.h" // SIZET_FMT
+#include "gnashconfig.h" // USE_DEBUGGER
 #endif
 
 #include "smart_ptr.h" // GNASH_USE_GC
@@ -638,8 +638,8 @@
        if ( tag_len != 3 )
        {
                IF_VERBOSE_MALFORMED_SWF (
-               log_swferror(_("ActionWaitForFrame (0x%X) tag length == " 
SIZET_FMT
-                           " (expected 3)"), SWF::ACTION_WAITFORFRAME, 
tag_len);
+               log_swferror(_("ActionWaitForFrame (0x%X) tag length == %d "
+                              "(expected 3)"), SWF::ACTION_WAITFORFRAME, 
tag_len);
                );
        }
 
@@ -2038,7 +2038,7 @@
                                                env.push(as_value());
                                                IF_VERBOSE_MALFORMED_SWF(
                                                log_swferror(_("register %d "
-                                                       "out of local registers 
bounds (0.."SIZET_FMT")!"), reg, env.num_local_registers());
+                                                       "out of local registers 
bounds (0..%d)!"), reg, env.num_local_registers());
                                                );
                                        }
                                }
@@ -2123,11 +2123,11 @@
                IF_VERBOSE_ACTION (
                if ( type == pushDict8 || type == pushDict16 )
                {
-                       log_action(_("\t" SIZET_FMT ") type=%s (%d), 
value=%s"), count, pushType[type], id, env.top(0).to_debug_string().c_str());
+                       log_action(_("\t%d) type=%s (%d), value=%s"), count, 
pushType[type], id, env.top(0).to_debug_string().c_str());
                }
                else
                {
-                       log_action(_("\t" SIZET_FMT ") type=%s, value=%s"), 
count, pushType[type], env.top(0).to_debug_string().c_str());
+                       log_action(_("\t%d) type=%s, value=%s"), count, 
pushType[type], env.top(0).to_debug_string().c_str());
                }
                ++count;
                );
@@ -2467,7 +2467,7 @@
                }
                if ( (size_t)ret < len )
                {
-                       log_error("Could only write %d bytes over "SIZET_FMT" 
required to user-provided host requests fd %d",
+                       log_error("Could only write %d bytes over %d required 
to user-provided host requests fd %d",
                                ret, len, hostfd);
                }
                //log_debug("Wrote %d bytes of geturl requests (all needed)", 
ret);
@@ -2564,8 +2564,8 @@
                if (next_pc > stop_pc)
                {
                        IF_VERBOSE_MALFORMED_SWF (
-                       log_swferror(_("branch to offset " SIZET_FMT "  -- "
-                               " this section only runs to " SIZET_FMT),
+                       log_swferror(_("branch to offset %d  -- "
+                               " this section only runs to %d"),
                                next_pc, stop_pc);
                        )
                }
@@ -4052,8 +4052,8 @@
                IF_VERBOSE_MALFORMED_SWF(
                        log_swferror(_("function2 code len (%u) "
                                "overflows DOACTION tag boundaries "
-                               "(DOACTION tag len=" SIZET_FMT
-                               ", function2 code offset=" SIZET_FMT "). "
+                               "(DOACTION tag len=%d"
+                               ", function2 code offset=%d). "
                                "Forcing code len to eat the whole buffer "
                                "(would this work?)."),
                                code_size, actionbuf_size, thread.next_pc);
@@ -4354,7 +4354,7 @@
                else
                {
                        IF_VERBOSE_MALFORMED_SWF(
-                       log_swferror(_("store_register[%d] -- register out of 
local registers bounds (0.." SIZET_FMT ")!"), reg, env.num_local_registers());
+                       log_swferror(_("store_register[%d] -- register out of 
local registers bounds (0..%d)!"), reg, env.num_local_registers());
                        );
                }
        }
@@ -4382,8 +4382,9 @@
 {
        if ( static_cast<size_t>(x) > get_handlers().size() )
        {
-               log_error(_("at SWFHandlers::action_name(%d) call time, 
_handlers size is "
-                         SIZET_FMT), x, get_handlers().size());
+               log_error(_("at SWFHandlers::action_name(%d) call time, "
+                           "_handlers size is %d"),
+                           x, get_handlers().size());
                return NULL;
        }
        else

Index: server/vm/ActionExec.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/vm/ActionExec.cpp,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -b -r1.71 -r1.72
--- server/vm/ActionExec.cpp    21 Apr 2008 11:27:46 -0000      1.71
+++ server/vm/ActionExec.cpp    21 Apr 2008 11:54:33 -0000      1.72
@@ -19,7 +19,7 @@
 
 
 #ifdef HAVE_CONFIG_H
-#include "gnashconfig.h" // SIZET_FMT
+#include "gnashconfig.h" // USE_DEBUGGER
 #endif
 
 #include "ActionExec.h"
@@ -40,6 +40,7 @@
 
 #include <sstream>
 #include <string>
+#include <boost/format.hpp>
 
 #ifndef DEBUG_STACK
 
@@ -171,9 +172,8 @@
 
 #if DEBUG_STACK
        IF_VERBOSE_ACTION (
-               log_action(_("at ActionExec operator() start, pc=" SIZET_FMT
-                          ", stop_pc=" SIZET_FMT ", code.size=" SIZET_FMT
-                          "."),
+               log_action(_("at ActionExec operator() start, pc=%d"
+                          ", stop_pc=%d, code.size=%d."),
                            pc, stop_pc, code.size());
                stringstream ss;
                env.dump_stack(ss, STACK_DUMP_LIMIT);
@@ -311,7 +311,7 @@
 
        IF_VERBOSE_ACTION (
                // FIXME, avoid direct dbglogfile access, use log_action
-               log_action("PC:" SIZET_FMT " - EX: %s", pc, 
code.disasm(pc).c_str());
+               log_action("PC:%d - EX: %s", pc, code.disasm(pc).c_str());
        );
 
        // Set default next_pc offset, control flow action handlers
@@ -327,8 +327,8 @@
                {
                        IF_VERBOSE_MALFORMED_SWF(
                        log_swferror(_("Length %u (%d) of action tag"
-                         " id %u at pc " SIZET_FMT
-                         " overflows actions buffer size " SIZET_FMT),
+                                      " id %u at pc %d"
+                                  " overflows actions buffer size %d"),
                          length, (int)length, (unsigned)action_id, pc,
                          stop_pc);
                        );
@@ -388,7 +388,7 @@
        
 #if DEBUG_STACK
        IF_VERBOSE_ACTION (
-               log_action(_("After execution: PC " SIZET_FMT ", next PC " 
SIZET_FMT ", stack follows"), pc, next_pc);
+               log_action(_("After execution: PC %d, next PC %d, stack 
follows"), pc, next_pc);
                stringstream ss;
                env.dump_stack(ss, STACK_DUMP_LIMIT);
                env.dump_global_registers(ss);
@@ -418,10 +418,10 @@
        {
                if ( ++branchCount > maxBranchCount )
                {
-                       char buf[256];
-                       snprintf(buf, 255, _("Loop iterations count exceeded 
limit of "SIZET_FMT". Last branch was from pc "SIZET_FMT" to "SIZET_FMT"."),
-                               maxBranchCount, oldPc, pc);
-                       throw ActionLimitException(buf);
+                   boost::format fmt(_("Loop iterations count exceeded limit 
of "
+                                       "%d. Last branch was from pc %d to 
%d."));
+                       fmt % maxBranchCount % oldPc % pc;
+                       throw ActionLimitException(fmt.str());
                }
                //log_debug("Branch count: %u", branchCount);
        }
@@ -466,7 +466,7 @@
                {
        // We can argue this would be an "size-optimized" SWF instead...
        IF_VERBOSE_MALFORMED_SWF(
-           log_swferror(_(SIZET_FMT " elements left on the stack after block 
execution.  "
+           log_swferror(_("%d elements left on the stack after block 
execution.  "
                    "Cleaning up"), env.stack_size()-_initial_stack_size);
            );
                }
@@ -491,8 +491,8 @@
            if ( next_pc >= stop_pc ) {
                IF_VERBOSE_MALFORMED_SWF (
                log_swferror(_("End of DoAction block hit while skipping "
-                         SIZET_FMT " action tags (pc:" SIZET_FMT
-                         ", stop_pc:" SIZET_FMT ") "
+                         "%d action tags (pc:%d"
+                         ", stop_pc:%d) "
                          "(WaitForFrame, probably)"), offset, next_pc,
                          stop_pc);
                )
@@ -527,9 +527,9 @@
        if (with_stack.size() >= _with_stack_limit)
        {
            IF_VERBOSE_ASCODING_ERRORS (
-           log_aserror(_("'With' stack depth (" SIZET_FMT ") "
+           log_aserror(_("'With' stack depth (%d) "
                        "exceeds the allowed limit for current SWF "
-                       "target version (" SIZET_FMT " for version %d)."
+                       "target version (%d for version %d)."
                        " Don't expect this movie to work with all players."),
                        with_stack.size()+1, _with_stack_limit,
                        env.get_version());
@@ -610,9 +610,9 @@
 
        // FIXME, the IF_VERBOSE used to be commented out.  strk, know why?
        IF_VERBOSE_ASCODING_ERRORS(
-       log_aserror(_("Stack underrun: " SIZET_FMT " elements required, "
-               SIZET_FMT "/" SIZET_FMT " available. "
-               "Fixing by inserting " SIZET_FMT " undefined values on the"
+       log_aserror(_("Stack underrun: %d elements required, "
+               "%d/%d available. "
+               "Fixing by inserting %d undefined values on the"
                " missing slots."),
                required, _initial_stack_size, env.stack_size(),
                missing);




reply via email to

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