From MAILER-DAEMON Mon Jan 01 20:51:08 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H1Yo0-0006a2-Nq for mharc-gnash-commit@gnu.org; Mon, 01 Jan 2007 20:51:08 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H1Ynz-0006Zc-BN for gnash-commit@gnu.org; Mon, 01 Jan 2007 20:51:07 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H1Ynx-0006Yo-OB for gnash-commit@gnu.org; Mon, 01 Jan 2007 20:51:06 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H1Ynx-0006Yi-Id for gnash-commit@gnu.org; Mon, 01 Jan 2007 20:51:05 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H1Ynx-0001mI-5m for gnash-commit@gnu.org; Mon, 01 Jan 2007 20:51:05 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H1Ynp-00086n-Bv for gnash-commit@gnu.org; Tue, 02 Jan 2007 01:50:57 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H1Ynp-00086k-0N for gnash-commit@gnu.org; Tue, 02 Jan 2007 01:50:57 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Tue, 02 Jan 2007 01:50:57 +0000 Subject: [Gnash-commit] gnash ChangeLog server/as_function.cpp server/s... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2007 01:51:07 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/02 01:50:56 Modified files: . : ChangeLog server : as_function.cpp swf_function.cpp swf_function.h testsuite/actionscript.all: Inheritance.as Log message: * server/as_function.cpp (getPrototype): added check for 'prototype' member overwrite (debugging). * server/swf_function.{h,cpp}: provide variable 'super' in function1 and 2 contexts (local variable or register); fixed the 'this' variable-or-register in function2 contexts to point * testsuite/actionscript.all/Inheritance.as: don't expect a failure in using the 'super' variable (not function2!) CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2026&r2=1.2027 http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_function.cpp?cvsroot=gnash&r1=1.14&r2=1.15 http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf_function.cpp?cvsroot=gnash&r1=1.11&r2=1.12 http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf_function.h?cvsroot=gnash&r1=1.5&r2=1.6 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Inheritance.as?cvsroot=gnash&r1=1.12&r2=1.13 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2026 retrieving revision 1.2027 diff -u -b -r1.2026 -r1.2027 --- ChangeLog 31 Dec 2006 14:44:53 -0000 1.2026 +++ ChangeLog 2 Jan 2007 01:50:56 -0000 1.2027 @@ -1,3 +1,14 @@ +2007-01-01 Sandro Santilli + + * server/as_function.cpp (getPrototype): + added check for 'prototype' member overwrite (debugging). + * server/swf_function.{h,cpp}: provide variable 'super' in + function1 and 2 contexts (local variable or register); + fixed the 'this' variable-or-register in function2 contexts + to point + * testsuite/actionscript.all/Inheritance.as: don't expect + a failure in using the 'super' variable (not function2!) + 2006-12-31 Sandro Santilli * server/as_function.cpp: allow Function construction Index: server/as_function.cpp =================================================================== RCS file: /sources/gnash/gnash/server/as_function.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -u -b -r1.14 -r1.15 --- server/as_function.cpp 31 Dec 2006 14:44:53 -0000 1.14 +++ server/as_function.cpp 2 Jan 2007 01:50:56 -0000 1.15 @@ -125,6 +125,15 @@ as_function::getPrototype() { // TODO: create if not available ? + // TODO WARNING: what if user overwrites the 'prototype' member ?! + // this function should likely return the *new* + // prototype, not the old !! + as_value proto; + get_member("prototype", &proto); + if ( proto.to_object() != _properties ) + { + log_warning("Exported interface of function %p has been overwritten (from %p to %p)!", this, _properties, proto.to_object()); + } return _properties; } Index: server/swf_function.cpp =================================================================== RCS file: /sources/gnash/gnash/server/swf_function.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -u -b -r1.11 -r1.12 --- server/swf_function.cpp 31 Dec 2006 14:02:36 -0000 1.11 +++ server/swf_function.cpp 2 Jan 2007 01:50:56 -0000 1.12 @@ -76,6 +76,73 @@ //set_member("prototype", as_value(proto)); } +/*private static*/ +as_object* +swf_function::getSuper(as_object& obj) +{ + // Super class prototype is : obj.__proto__.constructor.prototype + as_object* proto = obj.m_prototype; + if ( ! proto ) + { +#ifdef GNASH_DEBUG_GETSUPER + log_msg("Object %p doesn't have a __proto__", &obj); +#endif + return NULL; + } + + // TODO: add a getConstructor() method to as_object + // returning an as_function ? + // + as_value ctor; + bool ret = proto->get_member("constructor", &ctor); + if ( ! ret ) + { +#ifdef GNASH_DEBUG_GETSUPER + log_msg("Object.__proto__ %p doesn't have a constructor", proto); +#endif + return NULL; + } + + // TODO: if we cast ctor to an as_function and call getPrototype on it, + // it is possible that the returned object is NOT the current + // 'prototype' member, as as_function caches it ? + // + as_object* ctor_obj = ctor.to_object(); + if ( ! ctor_obj ) + { +#ifdef GNASH_DEBUG_GETSUPER + log_msg("Object.__proto__.constructor doesn't cast to an object"); +#endif + return NULL; + } + +#ifdef GNASH_DEBUG_GETSUPER + log_msg("ctor_obj is %p", ctor_obj); +#endif + + as_value ctor_proto; + ret = ctor_obj->get_member("prototype", &ctor_proto); + if ( ! ret ) + { +#ifdef GNASH_DEBUG_GETSUPER + log_msg("Object.__proto__.constructor %p doesn't have a prototype", ctor_obj); +#endif + return NULL; + } + + as_object* super = ctor_proto.to_object(); + if ( ! super ) + { +#ifdef GNASH_DEBUG_GETSUPER + log_msg("Object.__proto__.constructor.prototype doesn't cast to an object"); +#endif + return NULL; + } + + return super; + +} + // Dispatch. void swf_function::operator()(const fn_call& fn) @@ -111,6 +178,10 @@ assert(fn.this_ptr); our_env->set_local("this", fn.this_ptr); + + // Add 'super' + as_object* super = getSuper(*(fn.this_ptr)); + our_env->set_local("super", super); } else { @@ -143,7 +214,10 @@ if (m_function2_flags & 0x01) { // preload 'this' into a register. + // TODO FIXME: shouldn't this be 'fn.this_ptr' rather then our_env->get_target() ? + // see implementation for function1.. We need a testcase! our_env->local_register(current_reg).set_as_object(our_env->get_target()); + log_warning("UNTESTED: 'this' in function2 dispatch (register)"); current_reg++; } @@ -154,7 +228,10 @@ else { // Put 'this' in a local var. + // TODO FIXME: shouldn't this be 'fn.this_ptr' rather then our_env->get_target() ? + // see implementation for function1.. We need a testcase! our_env->add_local("this", as_value(our_env->get_target())); + log_warning("UNTESTED: 'this' in function2 dispatch (local var)"); } // Init arguments array, if it's going to be needed. @@ -191,8 +268,8 @@ if (m_function2_flags & 0x10) { // Put 'super' in a register. - our_env->local_register(current_reg).set_as_object(m_prototype); - log_warning("TESTING: implement 'super' in function2 dispatch (reg)\n"); + our_env->local_register(current_reg).set_as_object(getSuper(*(fn.this_ptr))); + log_warning("UNTESTED: 'super' in function2 dispatch (register)"); current_reg++; } @@ -204,8 +281,8 @@ else { // Put 'super' in a local var. - our_env->add_local("super", as_value(m_prototype)); - log_warning("TESTING: implement 'super' in function2 dispatch (var)\n"); + our_env->add_local("super", as_value(getSuper(*(fn.this_ptr)))); + log_warning("UNTESTED: 'super' in function2 dispatch (local var)"); } if (m_function2_flags & 0x40) Index: server/swf_function.h =================================================================== RCS file: /sources/gnash/gnash/server/swf_function.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -b -r1.5 -r1.6 --- server/swf_function.h 31 Dec 2006 14:02:36 -0000 1.5 +++ server/swf_function.h 2 Jan 2007 01:50:56 -0000 1.6 @@ -80,6 +80,17 @@ /// arg register assignments uint16 m_function2_flags; + /// Return a pointer to the given object's superclass interface + // + /// Super class prototype is : obj.__proto__.constructor.prototype + /// If any of the above element is undefined NULL is returned. + /// + /// TODO: cleanup and optimize this function, probably delegating + /// parts of it to the as_object class + /// (getConstructor, for example) + /// + static as_object* getSuper(as_object& obj); + public: ~swf_function(); Index: testsuite/actionscript.all/Inheritance.as =================================================================== RCS file: /sources/gnash/gnash/testsuite/actionscript.all/Inheritance.as,v retrieving revision 1.12 retrieving revision 1.13 diff -u -b -r1.12 -r1.13 --- testsuite/actionscript.all/Inheritance.as 31 Dec 2006 14:44:53 -0000 1.12 +++ testsuite/actionscript.all/Inheritance.as 2 Jan 2007 01:50:56 -0000 1.13 @@ -20,7 +20,7 @@ // compile this test case with Ming makeswf, and then // execute it like this gnash -1 -r 0 -v out.swf -rcsid="$Id: Inheritance.as,v 1.12 2006/12/31 14:44:53 strk Exp $"; +rcsid="$Id: Inheritance.as,v 1.13 2007/01/02 01:50:56 strk Exp $"; #include "check.as" @@ -130,7 +130,7 @@ }; var derived = new DerivedClass(); var greeting = derived.saySuperHello(); -xcheck_equals(greeting, "Hello from BaseClass"); +check_equals(greeting, "Hello from BaseClass"); #endif // OUTPUT_VERSION > 5 check_equals(super, undefined); From MAILER-DAEMON Mon Jan 01 22:43:18 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H1aYX-0002jR-UZ for mharc-gnash-commit@gnu.org; Mon, 01 Jan 2007 22:43:17 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H1aYW-0002ii-B8 for gnash-commit@gnu.org; Mon, 01 Jan 2007 22:43:16 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H1aYV-0002hi-Aa for gnash-commit@gnu.org; Mon, 01 Jan 2007 22:43:16 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H1aYV-0002hU-3N for gnash-commit@gnu.org; Mon, 01 Jan 2007 22:43:15 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H1aYU-0002Ry-Nt for gnash-commit@gnu.org; Mon, 01 Jan 2007 22:43:14 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H1aYT-0006Ud-Ba for gnash-commit@gnu.org; Tue, 02 Jan 2007 03:43:13 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H1aYS-0006Ua-Vw for gnash-commit@gnu.org; Tue, 02 Jan 2007 03:43:13 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Tue, 02 Jan 2007 03:43:12 +0000 Subject: [Gnash-commit] gnash ChangeLog server/dlist.cpp server/dlist.h... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2007 03:43:16 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/02 03:43:12 Modified files: . : ChangeLog server : dlist.cpp dlist.h sprite_instance.cpp sprite_instance.h testsuite/misc-ming.all: place_and_remove_object_test.c Log message: * server/dlist.{h,cpp}: added clear_except() function to remove all but a specified set of character instances from the list; deprecated clear_unaffected() method. * server/sprite_instance.{h,cpp}: take note of which character instances are created by execution of first frame tags and exclude them from the DisplayList cleanup performed at each restart. Simplifies the advance_sprite pretty much. * testsuite/misc-ming.all/place_and_remove_object_test.c: don't expect any failure. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2027&r2=1.2028 http://cvs.savannah.gnu.org/viewcvs/gnash/server/dlist.cpp?cvsroot=gnash&r1=1.41&r2=1.42 http://cvs.savannah.gnu.org/viewcvs/gnash/server/dlist.h?cvsroot=gnash&r1=1.20&r2=1.21 http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.117&r2=1.118 http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.h?cvsroot=gnash&r1=1.52&r2=1.53 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/place_and_remove_object_test.c?cvsroot=gnash&r1=1.3&r2=1.4 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2027 retrieving revision 1.2028 diff -u -b -r1.2027 -r1.2028 --- ChangeLog 2 Jan 2007 01:50:56 -0000 1.2027 +++ ChangeLog 2 Jan 2007 03:43:12 -0000 1.2028 @@ -1,5 +1,19 @@ 2007-01-01 Sandro Santilli + * server/dlist.{h,cpp}: added clear_except() function + to remove all but a specified set of character + instances from the list; deprecated clear_unaffected() + method. + * server/sprite_instance.{h,cpp}: take note of which + character instances are created by execution of first + frame tags and exclude them from the DisplayList cleanup + performed at each restart. Simplifies the advance_sprite + pretty much. + * testsuite/misc-ming.all/place_and_remove_object_test.c: + don't expect any failure. + +2007-01-01 Sandro Santilli + * server/as_function.cpp (getPrototype): added check for 'prototype' member overwrite (debugging). * server/swf_function.{h,cpp}: provide variable 'super' in Index: server/dlist.cpp =================================================================== RCS file: /sources/gnash/gnash/server/dlist.cpp,v retrieving revision 1.41 retrieving revision 1.42 diff -u -b -r1.41 -r1.42 --- server/dlist.cpp 9 Dec 2006 22:59:53 -0000 1.41 +++ server/dlist.cpp 2 Jan 2007 03:43:12 -0000 1.42 @@ -427,6 +427,35 @@ } } +void +DisplayList::clear_except(std::vector& exclude) +{ + //GNASH_REPORT_FUNCTION; + + for (iterator it = _characters.begin(), itEnd = _characters.end(); it != itEnd; ) + { + DisplayItem& di = *it; + + bool is_affected = false; + for (size_t i=0, n=exclude.size(); ion_event(event_id::UNLOAD); + it = _characters.erase(it); + continue; + } + it++; + } +} + // reset the references to the display list. void DisplayList::reset() Index: server/dlist.h =================================================================== RCS file: /sources/gnash/gnash/server/dlist.h,v retrieving revision 1.20 retrieving revision 1.21 diff -u -b -r1.20 -r1.21 --- server/dlist.h 1 Dec 2006 10:22:58 -0000 1.20 +++ server/dlist.h 2 Jan 2007 03:43:12 -0000 1.21 @@ -127,6 +127,17 @@ /// on each item still present void clear(); + /// \brief + /// Clear all characters in the display list except the ones + /// contained in the given vector. + // + /// @param exclude + /// A vector containing character instances to keep. + /// Any instance not found in the vector will be removed + /// from the displaylist. + /// + void clear_except(std::vector& exclude); + // It is executed only before the second and the subsequent // execution of execute_frame_tags(0) for sprite_instance // with frame count > 1. @@ -134,6 +145,11 @@ // of frames 2,... and not displayed in the 1-st frame. // Macromedia Flash does not call remove display object tag // for 1-st frame + // + // @deprecated + // + // TODO: remove this method + // void clear_unaffected(std::vector& affected_depths); /// \brief Index: server/sprite_instance.cpp =================================================================== RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v retrieving revision 1.117 retrieving revision 1.118 diff -u -b -r1.117 -r1.118 --- server/sprite_instance.cpp 28 Dec 2006 01:44:09 -0000 1.117 +++ server/sprite_instance.cpp 2 Jan 2007 03:43:12 -0000 1.118 @@ -1093,6 +1093,11 @@ //------------------------------------------------ +/// A DisplayList visitor used to compute its overall height. +// +/// TODO: this seems bogus actually, as it will just return +/// the height of the tallest character in the list !! +/// class HeightFinder { public: float _h; @@ -1110,6 +1115,11 @@ } }; +/// A DisplayList visitor used to compute its overall width. +// +/// TODO: this seems bogus actually, as it will just return +/// the width of the widest character in the list !! +/// class WidthFinder { public: float _w; @@ -1127,6 +1137,31 @@ } }; +/// A DisplayList visitor used to collect character pointers into a vector +// +class CharsAdder { + + std::vector& _chars; + +public: + + /// Initialize by passing the vector to be initialized + // + /// Consider using DisplayList::size() to reserve the + /// appropriate number of slots in the vector ! + /// + CharsAdder(std::vector& chars) + : + _chars(chars) + {} + + bool operator() (character* ch) + { + _chars.push_back(ch); + return true; + } +}; + //------------------------------------------------ // sprite_instance //------------------------------------------------ @@ -2082,42 +2117,7 @@ // First time execute_frame_tags(0) executed in dlist.cpp(child) or movie_def_impl(root) if (m_current_frame != (size_t)prev_frame) { - // Macromedia Flash does not call remove display object tag - // for 1-st frame therefore we should do it for it :-) - if (m_current_frame == 0 && frame_count > 1) - { - set_invalidated(); - - // affected depths - const PlayList& playlist = m_def->get_playlist(0); - std::vector affected_depths; - for (unsigned int i = 0; i < playlist.size(); i++) - { - uint16 depth = (playlist[i]->get_depth_id_of_replace_or_add_tag()) >> 16; - if (depth != 0) - { - affected_depths.push_back(depth); - } - } - - if (affected_depths.size() > 0) - { - m_display_list.clear_unaffected(affected_depths); - } - else - { - m_display_list.clear(); - } - - } - // TODO: fix this: - // removing the 'else' here fixes elvis.swf, - // keeping it in fixes testsuite/samples/loop_test.swf - // AND bombgame.swf - //else - //{ execute_frame_tags(m_current_frame); - //} } } #ifdef GNASH_DEBUG @@ -2201,6 +2201,11 @@ assert(frame < m_def->get_frame_count()); + if ( frame == 0 && has_looped() ) + { + m_display_list.clear_except(_init_chars); + } + // Execute this frame's init actions, if necessary. if (m_init_actions_executed[frame] == false) { @@ -2253,6 +2258,16 @@ std::bind2nd(std::mem_fun(&execute_tag::execute), this)); } + if ( frame == 0 && ! has_looped() ) + { + _init_chars.reserve(m_display_list.size()); + CharsAdder adder(_init_chars); + // the const_cast is just to avoid defining a const version + // of DisplayList::visitForward, CharsAdder will NOT + // modify the DisplayList elements in any way + const_cast(m_display_list).visitForward(adder); + } + testInvariant(); } Index: server/sprite_instance.h =================================================================== RCS file: /sources/gnash/gnash/server/sprite_instance.h,v retrieving revision 1.52 retrieving revision 1.53 diff -u -b -r1.52 -r1.53 --- server/sprite_instance.h 28 Dec 2006 01:44:09 -0000 1.52 +++ server/sprite_instance.h 2 Jan 2007 03:43:12 -0000 1.53 @@ -17,7 +17,7 @@ // // -/* $Id: sprite_instance.h,v 1.52 2006/12/28 01:44:09 strk Exp $ */ +/* $Id: sprite_instance.h,v 1.53 2007/01/02 03:43:12 strk Exp $ */ // Stateful live Sprite instance @@ -226,7 +226,24 @@ virtual void advance_sprite(float delta_time); /// Execute the tags associated with the specified frame. - /// frame is 0-based + // + /// Execution of 1st frame tags is specially handled: + /// + /// - After executing them for the first time + /// the _init_chars vector is initialized. + /// + /// - Before subsequent executions (loop mode) + /// the DisplayList is cleared of all but chars + /// in the _init_chars vector. + /// + /// @param frame + /// Frame number. 0-based + /// + /// @param state_only + /// If false (the default), all tags are executed. + /// If true, only 'state' tags are executed (place,move,replace). + /// Note that 'action' tags are NOT 'state' tags. + /// void execute_frame_tags(size_t frame, bool state_only = false); @@ -662,6 +679,14 @@ /// static bool sameEvents(const Events& eventsMap, const SWFEventsVector& eventsVect); + /// \brief + /// Characters placed to the DisplayList by control tags in first frame. + // + /// These are the only ones that do not get automatically removed from + /// the DisplayList on restart. See execute_frame_tags. + /// + std::vector _init_chars; + protected: /// \brief Index: testsuite/misc-ming.all/place_and_remove_object_test.c =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/place_and_remove_object_test.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -b -r1.3 -r1.4 --- testsuite/misc-ming.all/place_and_remove_object_test.c 31 Dec 2006 00:29:39 -0000 1.3 +++ testsuite/misc-ming.all/place_and_remove_object_test.c 2 Jan 2007 03:43:12 -0000 1.4 @@ -73,8 +73,8 @@ it = SWFMovie_add(mo, (SWFBlock)sh1); //add a red square to the 1st frame at depth 3 SWFDisplayItem_setDepth(it, 3); SWFDisplayItem_setName(it, "sh1"); - xcheck(mo, "_root.sh1 != undefined"); - xcheck_equals(mo, "_root.sh2", "undefined"); + check(mo, "_root.sh1 != undefined"); + check_equals(mo, "_root.sh2", "undefined"); SWFMovie_nextFrame(mo); SWFMovie_remove(mo, it); //remove the red square at the 2nd frame From MAILER-DAEMON Tue Jan 02 07:47:46 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H1j3R-0006Rn-SL for mharc-gnash-commit@gnu.org; Tue, 02 Jan 2007 07:47:45 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H1j3P-0006O2-Ja for gnash-commit@gnu.org; Tue, 02 Jan 2007 07:47:43 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H1j3O-0006Mi-MD for gnash-commit@gnu.org; Tue, 02 Jan 2007 07:47:42 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H1j3O-0006MQ-Gi for gnash-commit@gnu.org; Tue, 02 Jan 2007 07:47:42 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H1j3O-0008Sr-5B for gnash-commit@gnu.org; Tue, 02 Jan 2007 07:47:42 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H1j3H-0008Av-E3 for gnash-commit@gnu.org; Tue, 02 Jan 2007 12:47:35 +0000 Received: from bjacques by savannah.gnu.org with local (Exim 4.50) id 1H1j3G-0008Am-R5 for gnash-commit@gnu.org; Tue, 02 Jan 2007 12:47:35 +0000 To: gnash-commit@gnu.org Message-Id: From: Bastiaan Jacques Date: Tue, 02 Jan 2007 12:47:34 +0000 Subject: [Gnash-commit] gnash ChangeLog gui/gtk.cpp X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2007 12:47:44 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Bastiaan Jacques 07/01/02 12:47:34 Modified files: . : ChangeLog gui : gtk.cpp Log message: * gui/gtk.cpp: I've commented out the GTK file chooser code because: - It doesn't actually make Gnash open the file. - It requires GTK >= 2.4, and we want to preserve compatibility - with GTK 2.2 for embedded, old and thin systems. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2028&r2=1.2029 http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gtk.cpp?cvsroot=gnash&r1=1.56&r2=1.57 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2028 retrieving revision 1.2029 diff -u -b -r1.2028 -r1.2029 --- ChangeLog 2 Jan 2007 03:43:12 -0000 1.2028 +++ ChangeLog 2 Jan 2007 12:47:34 -0000 1.2029 @@ -1,3 +1,10 @@ +2007-01-02 Bastiaan Jacques + + * gui/gtk.cpp: I've commented out the GTK file chooser code because: + - It doesn't actually make Gnash open the file. + - It requires GTK >= 2.4, and we want to preserve compatibility + - with GTK 2.2 for embedded, old and thin systems. + 2007-01-01 Sandro Santilli * server/dlist.{h,cpp}: added clear_except() function Index: gui/gtk.cpp =================================================================== RCS file: /sources/gnash/gnash/gui/gtk.cpp,v retrieving revision 1.56 retrieving revision 1.57 diff -u -b -r1.56 -r1.57 --- gui/gtk.cpp 29 Dec 2006 18:54:00 -0000 1.56 +++ gui/gtk.cpp 2 Jan 2007 12:47:34 -0000 1.57 @@ -349,6 +349,15 @@ void GtkGui::menuitem_openfile_callback(GtkMenuItem* /*menuitem*/, gpointer /*data*/) { +#if 0 + /* + * There are two problems with this code: + * 1) It doesn't actually make Gnash open the file. + * 2) It requires GTK >= 2.4, and we want to preserve compatibility + * with GTK 2.2 for embedded, old and thin systems. + */ + + GtkWidget *dialog; dbglogfile << "Executant fileselectiondialog! " << endl; @@ -371,6 +380,7 @@ gtk_widget_destroy (dialog); // return filechooserdialog1; +#endif } /// \brief Show gnash preferences window From MAILER-DAEMON Tue Jan 02 07:51:37 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H1j7B-0003Ym-D2 for mharc-gnash-commit@gnu.org; Tue, 02 Jan 2007 07:51:37 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H1j79-0003XH-C9 for gnash-commit@gnu.org; Tue, 02 Jan 2007 07:51:35 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H1j78-0003WN-E6 for gnash-commit@gnu.org; Tue, 02 Jan 2007 07:51:34 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H1j78-0003WE-8Z for gnash-commit@gnu.org; Tue, 02 Jan 2007 07:51:34 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H1j77-0000cH-RP for gnash-commit@gnu.org; Tue, 02 Jan 2007 07:51:34 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H1j77-0008St-5s for gnash-commit@gnu.org; Tue, 02 Jan 2007 12:51:33 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H1j76-0008Sq-Ma for gnash-commit@gnu.org; Tue, 02 Jan 2007 12:51:33 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Tue, 02 Jan 2007 12:51:32 +0000 Subject: [Gnash-commit] gnash ChangeLog server/as_function.cpp server/a... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2007 12:51:35 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/02 12:51:32 Modified files: . : ChangeLog server : as_function.cpp as_function.h as_object.cpp as_object.h swf_function.cpp server/vm : ASHandlers.cpp Log message: * server/as_function.{h,cpp}: _properties member kept by intrusive_ptr to simplify implementation (never directly call add_ref/drop_ref); added private setPrototype() method for possible future use to keep "prototype" AS member in sync with _properties class member; Added extends() method. * server/as_object.{h,cpp}: m_prototype member kept by intrusive_ptr to simplify implementation (never directly call add_ref/drop_ref) and made private; provided get_prototype() accessor to it. * server/swf_function.cpp: updated accesses of as_object::m_prototype. * server/vm/ASHandlers.cpp (ActionExtends): implemented (needs more testcases). CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2029&r2=1.2030 http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_function.cpp?cvsroot=gnash&r1=1.15&r2=1.16 http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_function.h?cvsroot=gnash&r1=1.6&r2=1.7 http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_object.cpp?cvsroot=gnash&r1=1.22&r2=1.23 http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_object.h?cvsroot=gnash&r1=1.28&r2=1.29 http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf_function.cpp?cvsroot=gnash&r1=1.12&r2=1.13 http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/ASHandlers.cpp?cvsroot=gnash&r1=1.22&r2=1.23 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2029 retrieving revision 1.2030 diff -u -b -r1.2029 -r1.2030 --- ChangeLog 2 Jan 2007 12:47:34 -0000 1.2029 +++ ChangeLog 2 Jan 2007 12:51:32 -0000 1.2030 @@ -1,3 +1,20 @@ +2007-01-02 Sandro Santilli + + * server/as_function.{h,cpp}: _properties member kept by + intrusive_ptr to simplify implementation (never + directly call add_ref/drop_ref); added private + setPrototype() method for possible future use + to keep "prototype" AS member in sync with + _properties class member; Added extends() method. + * server/as_object.{h,cpp}: m_prototype member kept + by intrusive_ptr to simplify implementation (never + directly call add_ref/drop_ref) and made private; + provided get_prototype() accessor to it. + * server/swf_function.cpp: updated accesses + of as_object::m_prototype. + * server/vm/ASHandlers.cpp (ActionExtends): implemented + (needs more testcases). + 2007-01-02 Bastiaan Jacques * gui/gtk.cpp: I've commented out the GTK file chooser code because: Index: server/as_function.cpp =================================================================== RCS file: /sources/gnash/gnash/server/as_function.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -u -b -r1.15 -r1.16 --- server/as_function.cpp 2 Jan 2007 01:50:56 -0000 1.15 +++ server/as_function.cpp 2 Jan 2007 12:51:32 -0000 1.16 @@ -110,15 +110,25 @@ { _properties = new as_object(); } - _properties->add_ref(); _properties->set_member("constructor", this); _properties->set_member_flags("constructor", 1); - set_member("prototype", as_value(_properties)); + set_member("prototype", as_value(_properties.get())); } -as_function::~as_function() +void +as_function::setPrototype(as_object* proto) +{ + _properties = proto; + set_member("prototype", as_value(_properties.get())); +} + +void +as_function::extends(as_function& superclass) { - if ( _properties ) _properties->drop_ref(); + _properties = new as_object(superclass.getPrototype()); + _properties->set_member("constructor", &superclass); + _properties->set_member_flags("constructor", 1); + set_member("prototype", as_value(_properties.get())); } as_object* @@ -130,11 +140,11 @@ // prototype, not the old !! as_value proto; get_member("prototype", &proto); - if ( proto.to_object() != _properties ) + if ( proto.to_object() != _properties.get() ) { - log_warning("Exported interface of function %p has been overwritten (from %p to %p)!", this, _properties, proto.to_object()); + log_warning("Exported interface of function %p has been overwritten (from %p to %p)!", this, _properties.get(), proto.to_object()); } - return _properties; + return _properties.get(); } /* Index: server/as_function.h =================================================================== RCS file: /sources/gnash/gnash/server/as_function.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -b -r1.6 -r1.7 --- server/as_function.h 24 Nov 2006 14:50:30 -0000 1.6 +++ server/as_function.h 2 Jan 2007 12:51:32 -0000 1.7 @@ -69,7 +69,7 @@ public: /// Decrement refcount on the exported interface. - virtual ~as_function(); + virtual ~as_function() {} /// Dispatch. virtual void operator()(const fn_call& fn)=0; @@ -81,6 +81,8 @@ /// as_object* getPrototype(); + /// Make this function a subclass of the given as_function + void extends(as_function& superclass); /// Return true if this is a built-in class. virtual bool isBuiltin() { return false; } @@ -107,7 +109,11 @@ /// to be inherited by instances of this /// "Function" (class) /// - as_object* _properties; + boost::intrusive_ptr _properties; + +private: + + void setPrototype(as_object* proto); }; /// Initialize the global Function constructor Index: server/as_object.cpp =================================================================== RCS file: /sources/gnash/gnash/server/as_object.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -u -b -r1.22 -r1.23 --- server/as_object.cpp 21 Dec 2006 11:34:49 -0000 1.22 +++ server/as_object.cpp 2 Jan 2007 12:51:32 -0000 1.23 @@ -81,12 +81,12 @@ // if (namei == "__proto__") { - if ( m_prototype == NULL ) + if ( ! m_prototype ) { log_msg("as_object %p has no prototype\n", (void*)this); return false; } - val->set_as_object(m_prototype); + val->set_as_object(m_prototype.get()); return true; } @@ -111,7 +111,7 @@ { Property* prop = obj->_members.getProperty(key); if ( prop ) return prop; - else obj = obj->m_prototype; + else obj = obj->m_prototype.get(); } // No Property found @@ -137,7 +137,7 @@ // NOT a getter/setter ? return prop; } - obj = obj->m_prototype; + obj = obj->m_prototype.get(); } // No Getter/Setter property found @@ -155,9 +155,7 @@ void as_object::set_prototype(as_object* proto) { - if (m_prototype) m_prototype->drop_ref(); m_prototype = proto; - if (m_prototype) m_prototype->add_ref(); } void @@ -224,17 +222,13 @@ as_object::clear() { _members.clear(); - if (m_prototype) - { - m_prototype->drop_ref(); m_prototype = NULL; - } } bool as_object::instanceOf(as_function* ctor) { - as_object* proto=m_prototype; + as_object* proto=m_prototype.get(); do { if ( proto == ctor->getPrototype() ) return true; proto = ctor->getPrototype(); @@ -312,7 +306,7 @@ // Are we sure we need to descend to __proto__ ? // should we recurse then ? - if (m_prototype != NULL) + if (m_prototype) { m_prototype->_members.setFlagsAll(set_true, set_false); } @@ -344,7 +338,7 @@ while ( obj && visited.insert(obj).second ) { obj->_members.enumerateValues(env); - obj = obj->m_prototype; + obj = obj->m_prototype.get(); } if ( obj ) log_warning("prototype loop during Enumeration"); @@ -353,33 +347,26 @@ as_object::as_object() : _members(), - m_prototype(NULL), - _vm(VM::get()) + _vm(VM::get()), + m_prototype(NULL) { } as_object::as_object(as_object* proto) : _members(), - m_prototype(proto), - _vm(VM::get()) + _vm(VM::get()), + m_prototype(proto) { - if (m_prototype) m_prototype->add_ref(); } as_object::as_object(const as_object& other) : ref_counted(), _members(other._members), - m_prototype(other.m_prototype), - _vm(VM::get()) -{ - if (m_prototype) m_prototype->add_ref(); -} - -as_object::~as_object() + _vm(VM::get()), + m_prototype(other.m_prototype) { - if (m_prototype) m_prototype->drop_ref(); } std::pair Index: server/as_object.h =================================================================== RCS file: /sources/gnash/gnash/server/as_object.h,v retrieving revision 1.28 retrieving revision 1.29 diff -u -b -r1.28 -r1.29 --- server/as_object.h 30 Dec 2006 23:34:09 -0000 1.28 +++ server/as_object.h 2 Jan 2007 12:51:32 -0000 1.29 @@ -30,6 +30,7 @@ #include "ref_counted.h" // for inheritance #include "PropertyList.h" #include "as_value.h" // for return of get_primitive_value +#include "smart_ptr.h" #include #include // for std::pair @@ -94,10 +95,6 @@ /// void dump_members(); - /// Reference to this object's '__proto__' - // TODO: make private (or protected) - as_object* m_prototype; - /// Construct an ActionScript object with no prototype associated. as_object(); @@ -112,10 +109,11 @@ /// as_object(const as_object& other); - /// \brief /// Default destructor for ActionScript objects. + // /// Drops reference on prototype member, if any. - virtual ~as_object(); + /// + virtual ~as_object() {} /// Return a text representation for this object virtual const char* get_text_value() const { return NULL; } @@ -277,6 +275,15 @@ bool add_property(const std::string& key, as_function& getter, as_function& setter); + /// Return this object '__proto__' member. + // + /// The __proto__ member is the exported interface ('prototype') + /// of the class this object is an instance of. + /// + as_object* get_prototype() { + return m_prototype.get(); + } + protected: /// Get a property value by name @@ -335,6 +342,12 @@ /// The Virtual Machine used to create this object VM& _vm; + +private: + + /// Reference to this object's '__proto__' + boost::intrusive_ptr m_prototype; + }; } // namespace gnash Index: server/swf_function.cpp =================================================================== RCS file: /sources/gnash/gnash/server/swf_function.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -u -b -r1.12 -r1.13 --- server/swf_function.cpp 2 Jan 2007 01:50:56 -0000 1.12 +++ server/swf_function.cpp 2 Jan 2007 12:51:32 -0000 1.13 @@ -81,7 +81,7 @@ swf_function::getSuper(as_object& obj) { // Super class prototype is : obj.__proto__.constructor.prototype - as_object* proto = obj.m_prototype; + as_object* proto = obj.get_prototype(); if ( ! proto ) { #ifdef GNASH_DEBUG_GETSUPER Index: server/vm/ASHandlers.cpp =================================================================== RCS file: /sources/gnash/gnash/server/vm/ASHandlers.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -u -b -r1.22 -r1.23 --- server/vm/ASHandlers.cpp 21 Dec 2006 11:34:49 -0000 1.22 +++ server/vm/ASHandlers.cpp 2 Jan 2007 12:51:32 -0000 1.23 @@ -16,7 +16,7 @@ // -/* $Id: ASHandlers.cpp,v 1.22 2006/12/21 11:34:49 strk Exp $ */ +/* $Id: ASHandlers.cpp,v 1.23 2007/01/02 12:51:32 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -2907,10 +2907,39 @@ } void -SWFHandlers::ActionExtends(ActionExec& /*thread*/) +SWFHandlers::ActionExtends(ActionExec& thread) { // GNASH_REPORT_FUNCTION; - dbglogfile << __PRETTY_FUNCTION__ << ": unimplemented!" << endl; + + as_environment& env = thread.env; + ensure_stack(env, 2); // super, sub + + as_function* super = env.top(0).to_as_function(); + as_function* sub = env.top(1).to_as_function(); + + if ( ! super ) + { + IF_VERBOSE_ASCODING_ERRORS + ( + if ( ! super ) + { + log_warning("Super is not an as_function (%s)", + env.top(0).to_string()); + } + if ( ! sub ) + { + log_warning("Sub is not an as_function (%s)", + env.top(1).to_string()); + } + ); + env.drop(2); + return; + } + env.drop(2); + + sub->extends(*super); + + dbglogfile << __PRETTY_FUNCTION__ << ": testing!" << endl; } void From MAILER-DAEMON Tue Jan 02 10:10:08 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H1lHE-0002OC-B8 for mharc-gnash-commit@gnu.org; Tue, 02 Jan 2007 10:10:08 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H1lHC-0002MK-Jy for gnash-commit@gnu.org; Tue, 02 Jan 2007 10:10:06 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H1lHB-0002Kv-7N for gnash-commit@gnu.org; Tue, 02 Jan 2007 10:10:05 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H1lHA-0002Kf-VT for gnash-commit@gnu.org; Tue, 02 Jan 2007 10:10:05 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H1lHA-0003eq-MK for gnash-commit@gnu.org; Tue, 02 Jan 2007 10:10:04 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H1lH9-0006g9-1b for gnash-commit@gnu.org; Tue, 02 Jan 2007 15:10:03 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H1lH8-0006g6-Ou for gnash-commit@gnu.org; Tue, 02 Jan 2007 15:10:02 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Tue, 02 Jan 2007 15:10:02 +0000 Subject: [Gnash-commit] gnash macros/ming.m4 Makefile.am configure.ac X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2007 15:10:06 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/02 15:10:02 Modified files: macros : ming.m4 . : Makefile.am configure.ac Log message: * macros/ming.m4: synced with the version in Ming repository. Basically add MING_VERSION and MING_VERSION_CODE variable, we'll use them to detect wheter 'asm' or specific features are supported. * Makefile.am: show Ming stuff on 'make dumpconfig' * configure.ac: print Ming stuff on summary, properly invoke the Ming macro (renamed from GNASH_PATH_MING to AC_PATH_MING). CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/macros/ming.m4?cvsroot=gnash&r1=1.8&r2=1.9 http://cvs.savannah.gnu.org/viewcvs/gnash/Makefile.am?cvsroot=gnash&r1=1.55&r2=1.56 http://cvs.savannah.gnu.org/viewcvs/gnash/configure.ac?cvsroot=gnash&r1=1.226&r2=1.227 Patches: Index: macros/ming.m4 =================================================================== RCS file: /sources/gnash/gnash/macros/ming.m4,v retrieving revision 1.8 retrieving revision 1.9 diff -u -b -r1.8 -r1.9 --- macros/ming.m4 29 Oct 2006 18:34:10 -0000 1.8 +++ macros/ming.m4 2 Jan 2007 15:10:02 -0000 1.9 @@ -13,33 +13,34 @@ dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - dnl dnl # Configure paths for Ming -# Sandro Santilli 2006-01-24 +# Author: Sandro Santilli # # This macro uses ming-config, which was -# not available as for Ming 0.3beta1 -# +# not available as of Ming 0.3beta1 # # # Use: # AC_PATH_MING # # Provides: +# MING_VERSION - Ming version string (example: "0.4.1" or "0.4.0.beta2") +# MING_VERSION_CODE - a 8digits number encoding Major, Minor, Patch and Beta numbers. +# examples: 00040002 (0.4.0.beta2) 00040100 (0.4.1) # MING_CFLAGS # MING_LIBS # MAKESWF # -AC_DEFUN([GNASH_PATH_MING], +AC_DEFUN([AC_PATH_MING], [ MING_CFLAGS="" MING_LIBS="" - AC_ARG_WITH(ming, AC_HELP_STRING([--with-ming=[]], [Use ming to build tests]), + AC_ARG_WITH(ming,[ --with-ming=[] Path to the ming-config command], [ case "${withval}" in yes|no) @@ -54,6 +55,15 @@ fi if test x"$MING_CONFIG" != "x"; then + MING_VERSION=`$MING_CONFIG --version` + major=`echo $MING_VERSION | \ + sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` + minor=`echo $MING_VERSION | \ + sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'` + micro=`echo $MING_VERSION | \ + sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'` + beta=`echo $MING_VERSION | sed -e 's/.*beta\([[0-9]]*\).*/\1/'` + MING_VERSION_CODE=`printf %2.2d%2.2d%2.2d%2.2d $major $minor $micro $beta` MING_CFLAGS=`$MING_CONFIG --cflags` MING_LIBS=`$MING_CONFIG --libs` MING_PATH=`$MING_CONFIG --bindir` @@ -61,6 +71,8 @@ fi + AC_SUBST(MING_VERSION_CODE) + AC_SUBST(MING_VERSION) AC_SUBST(MING_CFLAGS) AC_SUBST(MING_LIBS) AC_SUBST(MAKESWF) Index: Makefile.am =================================================================== RCS file: /sources/gnash/gnash/Makefile.am,v retrieving revision 1.55 retrieving revision 1.56 diff -u -b -r1.55 -r1.56 --- Makefile.am 28 Dec 2006 02:39:18 -0000 1.55 +++ Makefile.am 2 Jan 2007 15:10:02 -0000 1.56 @@ -15,7 +15,7 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -# $Id: Makefile.am,v 1.55 2006/12/28 02:39:18 strk Exp $ +# $Id: Makefile.am,v 1.56 2007/01/02 15:10:02 strk Exp $ ## Process this file with automake to produce Makefile.in AUTOMAKE_OPTIONS = 1.6.0 @@ -190,6 +190,10 @@ @echo "AGG_LIBS is $(AGG_LIBS)" @echo "INCLTDL $(INCLTDL) " @echo "LIBLTDL $(LIBLTDL) " + @echo "MING_VERSION_CODE $(MING_VERSION_CODE) " + @echo "MING_LIBS $(MING_LIBS) " + @echo "MING_CFLAGS $(MING_CFLAGS) " + @echo "MAKESWF $(MAKESWF) " @echo "A blank value for CFLAGS means the header is installed in the" @echo "default system header location. All the LIBS should have a" @echo "legit value" Index: configure.ac =================================================================== RCS file: /sources/gnash/gnash/configure.ac,v retrieving revision 1.226 retrieving revision 1.227 diff -u -b -r1.226 -r1.227 --- configure.ac 17 Dec 2006 20:24:57 -0000 1.226 +++ configure.ac 2 Jan 2007 15:10:02 -0000 1.227 @@ -15,7 +15,7 @@ dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA dnl -dnl $Id: configure.ac,v 1.226 2006/12/17 20:24:57 rsavoye Exp $ +dnl $Id: configure.ac,v 1.227 2007/01/02 15:10:02 strk Exp $ AC_PREREQ(2.50) AC_INIT(gnash, cvs) @@ -454,8 +454,9 @@ dnl currently unused dnl GNASH_PKG_FIND(png, [png.h], [playing oggs], ogg_sync_init) -GNASH_PATH_MING +AC_PATH_MING AM_CONDITIONAL(ENABLE_MING, [ test x"$MAKESWF" != x ]) + AC_PATH_PROG(DOXYGEN, doxygen) AM_CONDITIONAL(ENABLE_DOXYGEN, [ test x"$DOXYGEN" != x ]) @@ -1329,6 +1330,18 @@ nogo=true fi +if test x"$MING_LIBS" != x; then + echo " MING version code is $MING_VERSION_CODE" + echo " MING flags are $MING_CFLAGS" + echo " MING libs are $MING_LIBS" + echo " MAKESWF is $MAKESWF" +else + echo "Warning: \ + You need to have the Ming development and utilities packages installed \ + to run most of the tests in Gnash testsuite. Some of the tests will be \ + run anyway." +fi + # If anything critical is missing, don't bother to continue if test x"$nogo" = x"true"; then echo "" From MAILER-DAEMON Tue Jan 02 10:10:38 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H1lHh-00035u-Np for mharc-gnash-commit@gnu.org; Tue, 02 Jan 2007 10:10:37 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H1lHg-00033j-CE for gnash-commit@gnu.org; Tue, 02 Jan 2007 10:10:36 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H1lHf-00032u-QJ for gnash-commit@gnu.org; Tue, 02 Jan 2007 10:10:35 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H1lHf-00032g-NZ for gnash-commit@gnu.org; Tue, 02 Jan 2007 10:10:35 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H1lHf-0003kz-G7 for gnash-commit@gnu.org; Tue, 02 Jan 2007 10:10:35 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H1lHf-0006gv-1x for gnash-commit@gnu.org; Tue, 02 Jan 2007 15:10:35 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H1lHe-0006gr-Mv for gnash-commit@gnu.org; Tue, 02 Jan 2007 15:10:34 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Tue, 02 Jan 2007 15:10:34 +0000 Subject: [Gnash-commit] gnash ChangeLog X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2007 15:10:36 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/02 15:10:34 Modified files: . : ChangeLog Log message: Oops, forgot this CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2030&r2=1.2031 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2030 retrieving revision 1.2031 diff -u -b -r1.2030 -r1.2031 --- ChangeLog 2 Jan 2007 12:51:32 -0000 1.2030 +++ ChangeLog 2 Jan 2007 15:10:34 -0000 1.2031 @@ -1,5 +1,15 @@ 2007-01-02 Sandro Santilli + * macros/ming.m4: synced with the version in Ming repository. + Basically add MING_VERSION and MING_VERSION_CODE variable, + we'll use them to detect wheter 'asm' or specific features + are supported. + * Makefile.am: show Ming stuff on 'make dumpconfig' + * configure.ac: print Ming stuff on summary, properly invoke + the Ming macro (renamed from GNASH_PATH_MING to AC_PATH_MING). + +2007-01-02 Sandro Santilli + * server/as_function.{h,cpp}: _properties member kept by intrusive_ptr to simplify implementation (never directly call add_ref/drop_ref); added private From MAILER-DAEMON Tue Jan 02 10:43:47 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H1lnn-0004Fp-5M for mharc-gnash-commit@gnu.org; Tue, 02 Jan 2007 10:43:47 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H1lnl-0004Fk-QT for gnash-commit@gnu.org; Tue, 02 Jan 2007 10:43:45 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H1lnl-0004FR-0e for gnash-commit@gnu.org; Tue, 02 Jan 2007 10:43:45 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H1lnk-0004FN-SP for gnash-commit@gnu.org; Tue, 02 Jan 2007 10:43:44 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H1lnk-0002GP-Hb for gnash-commit@gnu.org; Tue, 02 Jan 2007 10:43:44 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H1lnj-0000bM-Fp for gnash-commit@gnu.org; Tue, 02 Jan 2007 15:43:43 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H1lnj-0000bH-55 for gnash-commit@gnu.org; Tue, 02 Jan 2007 15:43:43 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Tue, 02 Jan 2007 15:43:43 +0000 Subject: [Gnash-commit] gnash ChangeLog testsuite/actionscript.all/Inhe... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2007 15:43:45 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/02 15:43:43 Modified files: . : ChangeLog testsuite/actionscript.all: Inheritance.as Makefile.am String.as check.as Log message: * testsuite/actionscript.all/Makefile.am: provide MING_VERSION_CODE define. * testsuite/actionscript.all/check.as: toggle define MING_SUPPORTS_ASM and MING_SUPPORT_ASM_EXTEND based on MING_VERSION_CODE * testsuite/actionscript.all/String.as: don't assume that ming supports ASM, rely on the define set in check.as instead. * testsuite/actionscript.all/Inheritance.as: Add test for ActionExtend (optionally enabled based on MING_SUPPORTS_ASM_EXTENDS define) CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2031&r2=1.2032 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Inheritance.as?cvsroot=gnash&r1=1.13&r2=1.14 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Makefile.am?cvsroot=gnash&r1=1.57&r2=1.58 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/String.as?cvsroot=gnash&r1=1.9&r2=1.10 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/check.as?cvsroot=gnash&r1=1.17&r2=1.18 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2031 retrieving revision 1.2032 diff -u -b -r1.2031 -r1.2032 --- ChangeLog 2 Jan 2007 15:10:34 -0000 1.2031 +++ ChangeLog 2 Jan 2007 15:43:42 -0000 1.2032 @@ -1,5 +1,19 @@ 2007-01-02 Sandro Santilli + * testsuite/actionscript.all/Makefile.am: provide + MING_VERSION_CODE define. + * testsuite/actionscript.all/check.as: toggle define + MING_SUPPORTS_ASM and MING_SUPPORT_ASM_EXTEND based + on MING_VERSION_CODE + * testsuite/actionscript.all/String.as: don't assume + that ming supports ASM, rely on the define set in + check.as instead. + * testsuite/actionscript.all/Inheritance.as: + Add test for ActionExtend (optionally enabled + based on MING_SUPPORTS_ASM_EXTENDS define) + +2007-01-02 Sandro Santilli + * macros/ming.m4: synced with the version in Ming repository. Basically add MING_VERSION and MING_VERSION_CODE variable, we'll use them to detect wheter 'asm' or specific features Index: testsuite/actionscript.all/Inheritance.as =================================================================== RCS file: /sources/gnash/gnash/testsuite/actionscript.all/Inheritance.as,v retrieving revision 1.13 retrieving revision 1.14 diff -u -b -r1.13 -r1.14 --- testsuite/actionscript.all/Inheritance.as 2 Jan 2007 01:50:56 -0000 1.13 +++ testsuite/actionscript.all/Inheritance.as 2 Jan 2007 15:43:42 -0000 1.14 @@ -20,7 +20,7 @@ // compile this test case with Ming makeswf, and then // execute it like this gnash -1 -r 0 -v out.swf -rcsid="$Id: Inheritance.as,v 1.13 2007/01/02 01:50:56 strk Exp $"; +rcsid="$Id: Inheritance.as,v 1.14 2007/01/02 15:43:42 strk Exp $"; #include "check.as" @@ -168,3 +168,26 @@ check_equals(SubObj1.prototype.constructor.__proto__.constructor, Function); +//------------------------------------------------ +// Test the 'extends' tag (require ming > 0.4.0.beta3) +//------------------------------------------------ + +// see check.as +#ifdef MING_SUPPORTS_ASM_EXTENDS + +function BaseClass1() {} +function DerivedClass1() {} +asm { + push "DerivedClass1" + getvariable + push "BaseClass1" + getvariable + extends +}; +var obj = new DerivedClass1; +check(obj instanceOf DerivedClass1); +check(obj instanceOf BaseClass1); +check_equals(obj.__proto__, DerivedClass1.prototype); +check_equals(DerivedClass1.prototype.constructor, BaseClass1); + +#endif // MING_SUPPORTS_ASM_EXTENDS Index: testsuite/actionscript.all/Makefile.am =================================================================== RCS file: /sources/gnash/gnash/testsuite/actionscript.all/Makefile.am,v retrieving revision 1.57 retrieving revision 1.58 diff -u -b -r1.57 -r1.58 --- testsuite/actionscript.all/Makefile.am 28 Dec 2006 02:39:18 -0000 1.57 +++ testsuite/actionscript.all/Makefile.am 2 Jan 2007 15:43:42 -0000 1.58 @@ -16,7 +16,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# $Id: Makefile.am,v 1.57 2006/12/28 02:39:18 strk Exp $ +# $Id: Makefile.am,v 1.58 2007/01/02 15:43:42 strk Exp $ AUTOMAKE_OPTIONS = dejagnu @@ -26,6 +26,8 @@ # so I take responsibility of dropping that for the moment... if ENABLE_MING +DEF_MAKESWF_FLAGS=-DMING_VERSION_CODE=$(MING_VERSION_CODE) + check_SCRIPTS = \ astests-v5-Runner \ astests-v6-Runner \ @@ -216,10 +218,11 @@ # takes to the Dejagnu.swf shared library we'll get visual traces, # otherwise normal traces will be used. .as.swf: - @$(MAKESWF) \ + $(MAKESWF) \ -i$(DEJAGNU_SO_URL):dejagnu \ -DUSE_DEJAGNU_MODULE \ -DOUTPUT_VERSION=$(SWFVERSION) -v$(SWFVERSION) \ + $(DEF_MAKESWF_FLAGS) \ $(MAKESWF_FLAGS) \ -o $@ \ $(srcdir)/dejagnu_so_init.as \ @@ -235,6 +238,7 @@ -i$(DEJAGNU_SO_URL):dejagnu \ -DUSE_DEJAGNU_MODULE \ -DOUTPUT_VERSION=$(SWFVERSION) -v$(SWFVERSION) \ + $(DEF_MAKESWF_FLAGS) \ $(MAKESWF_FLAGS) \ -o $@ \ $(srcdir)/dejagnu_so_init.as \ Index: testsuite/actionscript.all/String.as =================================================================== RCS file: /sources/gnash/gnash/testsuite/actionscript.all/String.as,v retrieving revision 1.9 retrieving revision 1.10 diff -u -b -r1.9 -r1.10 --- testsuite/actionscript.all/String.as 21 Dec 2006 11:34:49 -0000 1.9 +++ testsuite/actionscript.all/String.as 2 Jan 2007 15:43:42 -0000 1.10 @@ -1,7 +1,7 @@ // Mike Carlson's test program for actionscript strings // June 19th, 2006 -rcsid="$Id: String.as,v 1.9 2006/12/21 11:34:49 strk Exp $"; +rcsid="$Id: String.as,v 1.10 2007/01/02 15:43:42 strk Exp $"; #include "check.as" @@ -55,8 +55,9 @@ check_equals ( b.substring(3, 6), "4"); check_equals ( b.substr(3, 6), "4"); -#define MING_SUPPORTS_ASM +// see check.as #ifdef MING_SUPPORTS_ASM + // We need ming-0.4.0beta2 or later for this to work... // This is the only way to generate an SWFACTION_SUBSTRING // tag (the calls above generate a CALLMETHOD tag) Index: testsuite/actionscript.all/check.as =================================================================== RCS file: /sources/gnash/gnash/testsuite/actionscript.all/check.as,v retrieving revision 1.17 retrieving revision 1.18 diff -u -b -r1.17 -r1.18 --- testsuite/actionscript.all/check.as 23 Nov 2006 14:34:32 -0000 1.17 +++ testsuite/actionscript.all/check.as 2 Jan 2007 15:43:42 -0000 1.18 @@ -21,6 +21,14 @@ #ifndef _CHECK_AS_ #define _CHECK_AS_ +#if MING_VERSION_CODE >= 00040002 +# define MING_SUPPORTS_ASM +# if MING_VERSION_CODE >= 00040004 +# define MING_SUPPORTS_ASM_EXTENDS +# endif +#endif + + // ONLINE mode uses DEJAGNU module #ifdef ONLINE # define USE_DEJAGNU_MODULE From MAILER-DAEMON Tue Jan 02 10:55:51 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H1lzT-0003R0-K1 for mharc-gnash-commit@gnu.org; Tue, 02 Jan 2007 10:55:51 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H1lzS-0003QN-FM for gnash-commit@gnu.org; Tue, 02 Jan 2007 10:55:50 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H1lzQ-0003P9-TP for gnash-commit@gnu.org; Tue, 02 Jan 2007 10:55:49 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H1lzQ-0003Ol-FL for gnash-commit@gnu.org; Tue, 02 Jan 2007 10:55:48 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H1lzP-00042e-QS for gnash-commit@gnu.org; Tue, 02 Jan 2007 10:55:47 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H1lzO-00010O-PR for gnash-commit@gnu.org; Tue, 02 Jan 2007 15:55:46 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H1lzO-00010K-Hq for gnash-commit@gnu.org; Tue, 02 Jan 2007 15:55:46 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Tue, 02 Jan 2007 15:55:46 +0000 Subject: [Gnash-commit] gnash/server as_environment.cpp X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2007 15:55:50 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/02 15:55:46 Modified files: server : as_environment.cpp Log message: commented out unconditioned debugging output in find_target CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_environment.cpp?cvsroot=gnash&r1=1.48&r2=1.49 Patches: Index: as_environment.cpp =================================================================== RCS file: /sources/gnash/gnash/server/as_environment.cpp,v retrieving revision 1.48 retrieving revision 1.49 diff -u -b -r1.48 -r1.49 --- as_environment.cpp 21 Dec 2006 11:34:49 -0000 1.48 +++ as_environment.cpp 2 Jan 2007 15:55:46 -0000 1.49 @@ -16,7 +16,7 @@ // -/* $Id: as_environment.cpp,v 1.48 2006/12/21 11:34:49 strk Exp $ */ +/* $Id: as_environment.cpp,v 1.49 2007/01/02 15:55:46 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -427,7 +427,7 @@ as_object* obj = val.to_object(); assert (obj); character* s=dynamic_cast(obj); - log_msg("find_target is a character, returning it"); + //log_msg("find_target is a character, returning it"); return s; // might be NULL } else if ( val.is_string() ) From MAILER-DAEMON Tue Jan 02 11:51:04 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H1mqu-0007LU-AT for mharc-gnash-commit@gnu.org; Tue, 02 Jan 2007 11:51:04 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H1mqs-0007K8-KD for gnash-commit@gnu.org; Tue, 02 Jan 2007 11:51:02 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H1mqr-0007Jd-RO for gnash-commit@gnu.org; Tue, 02 Jan 2007 11:51:02 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H1mqr-0007JO-GE for gnash-commit@gnu.org; Tue, 02 Jan 2007 11:51:01 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H1mqr-0006Wl-4U for gnash-commit@gnu.org; Tue, 02 Jan 2007 11:51:01 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H1mqq-0003yY-Ix for gnash-commit@gnu.org; Tue, 02 Jan 2007 16:51:00 +0000 Received: from ann by savannah.gnu.org with local (Exim 4.50) id 1H1mqq-0003yV-8e for gnash-commit@gnu.org; Tue, 02 Jan 2007 16:51:00 +0000 To: gnash-commit@gnu.org Message-Id: From: Ann Barcomb Date: Tue, 02 Jan 2007 16:51:00 +0000 Subject: [Gnash-commit] gnash ChangeLog doc/C/sources.xml testsuite/mov... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2007 16:51:03 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Ann Barcomb 07/01/02 16:51:00 Modified files: . : ChangeLog doc/C : sources.xml testsuite/movies.all: README Removed files: testsuite/movies.all: zoomhenge.mbox Log message: The file 'zoomhenge.mbox' was removed. This file had correspondence on the licensing of the zoomhenge movie. This was abstracted into README. This change was made based upon discussion with Rob and Bastiaan; having the complete file in the current repository didn't really match with the format we are trying to use for licensing. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2032&r2=1.2033 http://cvs.savannah.gnu.org/viewcvs/gnash/doc/C/sources.xml?cvsroot=gnash&only_with_tag=testing-documentation-refactor&r1=1.25.2.10&r2=1.25.2.11 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/movies.all/README?cvsroot=gnash&r1=1.7&r2=1.8 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/movies.all/zoomhenge.mbox?cvsroot=gnash&r1=1.1&r2=0 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2032 retrieving revision 1.2033 diff -u -b -r1.2032 -r1.2033 --- ChangeLog 2 Jan 2007 15:43:42 -0000 1.2032 +++ ChangeLog 2 Jan 2007 16:50:59 -0000 1.2033 @@ -1,3 +1,8 @@ +2007-01-02 Ann Barcomb + + * Removed zoomhenge.mbox; information abstracted to + README. + 2007-01-02 Sandro Santilli * testsuite/actionscript.all/Makefile.am: provide Index: doc/C/sources.xml =================================================================== RCS file: /sources/gnash/gnash/doc/C/sources.xml,v retrieving revision 1.25.2.10 retrieving revision 1.25.2.11 diff -u -b -r1.25.2.10 -r1.25.2.11 --- doc/C/sources.xml 20 Dec 2006 22:54:37 -0000 1.25.2.10 +++ doc/C/sources.xml 2 Jan 2007 16:51:00 -0000 1.25.2.11 @@ -1415,7 +1415,8 @@ compiled test file. - Some tests rely on testsuite/Dejagnu.swf. + Some tests rely on testsuite/Dejagnu.swf, + which in turn relies on Ming. This file is created when you run 'make check' for the entire testsuite, and can also be created on demand: Index: testsuite/movies.all/README =================================================================== RCS file: /sources/gnash/gnash/testsuite/movies.all/README,v retrieving revision 1.7 retrieving revision 1.8 diff -u -b -r1.7 -r1.8 --- testsuite/movies.all/README 20 Dec 2006 09:09:26 -0000 1.7 +++ testsuite/movies.all/README 2 Jan 2007 16:51:00 -0000 1.8 @@ -61,7 +61,8 @@ == Origin == -Contributed by Russ Taber. See zoomhenge.mbox. +Contributed by Russ Taber of RT Ideas, 1952 Cleveland Ave SW, +Wyoming, MI 49509-1455. The request was made by Greg Trounson. == Description == Index: testsuite/movies.all/zoomhenge.mbox =================================================================== RCS file: testsuite/movies.all/zoomhenge.mbox diff -N testsuite/movies.all/zoomhenge.mbox --- testsuite/movies.all/zoomhenge.mbox 18 Sep 2006 12:07:29 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,91 +0,0 @@ -Return-Path: -X-Original-To: gregt@maths.otago.ac.nz -Delivered-To: gregt@maths.otago.ac.nz -Received: from mailhub4.otago.ac.nz (mailhub4.otago.ac.nz [139.80.64.117]) - by emmy.otago.ac.nz (Postfix) with ESMTP id 233EA2B8003 - for ; Thu, 24 Aug 2006 01:06:21 +1200 (NZST) -Received: from smtp101.sbc.mail.re2.yahoo.com (smtp101.sbc.mail.re2.yahoo.com [68.142.229.104]) - by mailhub4.otago.ac.nz (8.13.7/8.13.7) with SMTP id k7ND6IrZ000395 - for ; Thu, 24 Aug 2006 01:06:19 +1200 -Received: (qmail 24619 invoked from network); 23 Aug 2006 13:06:17 -0000 -Received: from unknown (HELO ?192.168.1.191?) (rtideas@sbcglobal.net@69.221.248.159 with plain) - by smtp101.sbc.mail.re2.yahoo.com with SMTP; 23 Aug 2006 13:06:16 -0000 -Mime-Version: 1.0 (Apple Message framework v752.2) -In-Reply-To: <44EBCED0.4000704@maths.otago.ac.nz> -References: <44EBCED0.4000704@maths.otago.ac.nz> -Content-Type: multipart/alternative; boundary=Apple-Mail-22--209967866 -Message-Id: <63E797E2-60C9-4C0B-B16F-57D7A0F6E627@rtideas.com> -From: Russ Taber -Subject: Re: Zoomhenge -Date: Wed, 23 Aug 2006 09:06:14 -0400 -To: Greg Trounson -X-Mailer: Apple Mail (2.752.2) -X-PMX-Version: 5.2.0.264296, Antispam-Engine: 2.4.0.264935, Antispam-Data: 2006.8.23.54942 -X-PerlMx-Spam: Gauge=IIIIIII, Probability=7%, Report='HTML_50_70 0.1, __C230066_P5 0, __CT 0, __CTYPE_HAS_BOUNDARY 0, __CTYPE_MULTIPART 0, __CTYPE_MULTIPART_ALT 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __MIME_HTML 0, __MIME_VERSION 0, __SANE_MSGID 0, __TAG_EXISTS_HTML 0' - - ---Apple-Mail-22--209967866 -Content-Transfer-Encoding: 7bit -Content-Type: text/plain; - charset=US-ASCII; - delsp=yes; - format=flowed - -Hi Greg, - -I'd be honored. If it is being distributed at a profit , I would -expect a minimal royalty, albeit miniscule. But since it is an Open -Source project, I assume no profit motive at this time. That said, -Hell yeah! Include it. - -Another concern is that is a Flash 5 swf. Would you need a Flash 8 -version as well? - -Not certain of the verbiage needed for such licensing. Do you have a -"standard" agreement I might me able to tailor to this request? - -Let me know your thoughts. - -Thanks, - -Russ Taber -RT Ideas -1952 Cleveland Ave SW -Wyoming, MI 49509-1455 -616-245-3830 - - - - -On Aug 22, 2006, at 11:43 PM, Greg Trounson wrote: - -> Hello, -> -> I am involved in testing for the Gnash project, an Open Source -> effort to implement the Macromedia Flash format. As this is a very -> active project, with the code changing pretty much daily, -> considerable testing with Flash content is necessary to gauge the -> projects' development. -> -> One of the pages I have found to be a good test is your excellent -> Zoomhenge demo. It's good for testing many aspects of Flash, -> including graphics manipulation, cursor placement, sound and mouse -> clicks. -> -> I believe it would be of benefit to the Gnash project if we could -> distribute the Zoomhenge demo (the swf file) as a part of the test -> suite to allow testing of the standalone binary as well as the web -> browser plugin. -> -> Would you be agreeable to this, and if so what licensing terms -> would apply? -> -> Greg -> -> -- -> -- Greg Trounson -------------------------- -> Analyst Programmer / System Administrator -> Department of Mathematics and Statistics -> University of Otago, Dunedin, New Zealand -> +64-3-479-7739 -> -------=[ gregt@maths.otago.ac.nz ]=------- From MAILER-DAEMON Tue Jan 02 12:25:05 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H1nNp-0008Fu-QF for mharc-gnash-commit@gnu.org; Tue, 02 Jan 2007 12:25:05 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H1nNo-0008FZ-Pc for gnash-commit@gnu.org; Tue, 02 Jan 2007 12:25:04 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H1nNn-0008FN-Dv for gnash-commit@gnu.org; Tue, 02 Jan 2007 12:25:03 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H1nNn-0008FK-8a for gnash-commit@gnu.org; Tue, 02 Jan 2007 12:25:03 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H1nNm-0005RW-UO for gnash-commit@gnu.org; Tue, 02 Jan 2007 12:25:03 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H1nNm-0004lm-Dw for gnash-commit@gnu.org; Tue, 02 Jan 2007 17:25:02 +0000 Received: from ann by savannah.gnu.org with local (Exim 4.50) id 1H1nNm-0004lj-A6 for gnash-commit@gnu.org; Tue, 02 Jan 2007 17:25:02 +0000 To: gnash-commit@gnu.org Message-Id: From: Ann Barcomb Date: Tue, 02 Jan 2007 17:25:02 +0000 Subject: [Gnash-commit] gnash/devtools X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2007 17:25:05 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Ann Barcomb 07/01/02 17:25:02 New directory: devtools CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/devtools/?cvsroot=gnash From MAILER-DAEMON Tue Jan 02 12:29:28 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H1nS4-0002JH-BK for mharc-gnash-commit@gnu.org; Tue, 02 Jan 2007 12:29:28 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H1nS3-0002J3-60 for gnash-commit@gnu.org; Tue, 02 Jan 2007 12:29:27 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H1nS2-0002Hn-5M for gnash-commit@gnu.org; Tue, 02 Jan 2007 12:29:26 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H1nS2-0002Hc-2p for gnash-commit@gnu.org; Tue, 02 Jan 2007 12:29:26 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H1nS1-0006Zs-Sc for gnash-commit@gnu.org; Tue, 02 Jan 2007 12:29:25 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H1nS1-0004s2-DW for gnash-commit@gnu.org; Tue, 02 Jan 2007 17:29:25 +0000 Received: from ann by savannah.gnu.org with local (Exim 4.50) id 1H1nS0-0004rz-Vp for gnash-commit@gnu.org; Tue, 02 Jan 2007 17:29:25 +0000 To: gnash-commit@gnu.org Message-Id: From: Ann Barcomb Date: Tue, 02 Jan 2007 17:29:24 +0000 Subject: [Gnash-commit] gnash ChangeLog X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2007 17:29:27 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Ann Barcomb 07/01/02 17:29:24 Modified files: . : ChangeLog Log message: Relates to previous commit. I forgot that directories don't require a commit, just an add in CVS. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2033&r2=1.2034 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2033 retrieving revision 1.2034 diff -u -b -r1.2033 -r1.2034 --- ChangeLog 2 Jan 2007 16:50:59 -0000 1.2033 +++ ChangeLog 2 Jan 2007 17:29:24 -0000 1.2034 @@ -1,5 +1,11 @@ 2007-01-02 Ann Barcomb + * Created directory devtools, which will contain + things like editor styles, tests for style conformity, + server-side CVS hooks, etc. + +2007-01-02 Ann Barcomb + * Removed zoomhenge.mbox; information abstracted to README. From MAILER-DAEMON Tue Jan 02 16:11:24 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H1quq-0001BA-7S for mharc-gnash-commit@gnu.org; Tue, 02 Jan 2007 16:11:24 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H1qun-00017t-P2 for gnash-commit@gnu.org; Tue, 02 Jan 2007 16:11:22 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H1quj-00013J-40 for gnash-commit@gnu.org; Tue, 02 Jan 2007 16:11:18 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H1qui-000136-Oi for gnash-commit@gnu.org; Tue, 02 Jan 2007 16:11:16 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H1qui-0003N0-Cu for gnash-commit@gnu.org; Tue, 02 Jan 2007 16:11:16 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H1quh-0008Hw-Sv for gnash-commit@gnu.org; Tue, 02 Jan 2007 21:11:15 +0000 Received: from ann by savannah.gnu.org with local (Exim 4.50) id 1H1quh-0008Ht-Fp for gnash-commit@gnu.org; Tue, 02 Jan 2007 21:11:15 +0000 To: gnash-commit@gnu.org Message-Id: From: Ann Barcomb Date: Tue, 02 Jan 2007 21:11:15 +0000 Subject: [Gnash-commit] gnash ChangeLog X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2007 21:11:22 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Ann Barcomb 07/01/02 21:11:15 Modified files: . : ChangeLog Log message: Whitespace correction. I had used spaces, and should have used tabs. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2034&r2=1.2035 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2034 retrieving revision 1.2035 diff -u -b -r1.2034 -r1.2035 From MAILER-DAEMON Tue Jan 02 16:18:03 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H1r1G-0007fx-T9 for mharc-gnash-commit@gnu.org; Tue, 02 Jan 2007 16:18:02 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H1r1D-0007dl-Jl for gnash-commit@gnu.org; Tue, 02 Jan 2007 16:18:00 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H1r1A-0007b9-8a for gnash-commit@gnu.org; Tue, 02 Jan 2007 16:17:57 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H1r19-0007aP-Fu for gnash-commit@gnu.org; Tue, 02 Jan 2007 16:17:55 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H1r19-0005AF-5W for gnash-commit@gnu.org; Tue, 02 Jan 2007 16:17:55 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H1r18-0008V9-Ob for gnash-commit@gnu.org; Tue, 02 Jan 2007 21:17:54 +0000 Received: from ann by savannah.gnu.org with local (Exim 4.50) id 1H1r18-0008V6-Iu for gnash-commit@gnu.org; Tue, 02 Jan 2007 21:17:54 +0000 To: gnash-commit@gnu.org Message-Id: From: Ann Barcomb Date: Tue, 02 Jan 2007 21:17:54 +0000 Subject: [Gnash-commit] gnash/devtools/testsuite X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2007 21:18:01 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Ann Barcomb 07/01/02 21:17:54 New directory: devtools/testsuite CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/devtools/testsuite/?cvsroot=gnash From MAILER-DAEMON Tue Jan 02 17:04:43 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H1rkR-0005i7-FZ for mharc-gnash-commit@gnu.org; Tue, 02 Jan 2007 17:04:43 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H1rkP-0005g4-QJ for gnash-commit@gnu.org; Tue, 02 Jan 2007 17:04:41 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H1rkO-0005dN-6z for gnash-commit@gnu.org; Tue, 02 Jan 2007 17:04:41 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H1rkO-0005dH-0i for gnash-commit@gnu.org; Tue, 02 Jan 2007 17:04:40 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H1rkN-0005tr-BM for gnash-commit@gnu.org; Tue, 02 Jan 2007 17:04:39 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H1rkL-0002xv-FO for gnash-commit@gnu.org; Tue, 02 Jan 2007 22:04:37 +0000 Received: from nihilus by savannah.gnu.org with local (Exim 4.50) id 1H1rkL-0002xs-4L for gnash-commit@gnu.org; Tue, 02 Jan 2007 22:04:37 +0000 To: gnash-commit@gnu.org Message-Id: From: Markus Gothe Date: Tue, 02 Jan 2007 22:04:37 +0000 Subject: [Gnash-commit] gnash ChangeLog utilities/processor.cpp X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2007 22:04:42 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Markus Gothe 07/01/02 22:04:37 Modified files: . : ChangeLog utilities : processor.cpp Log message: Declare optarg as 'extern' on non-GCC systems. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2035&r2=1.2036 http://cvs.savannah.gnu.org/viewcvs/gnash/utilities/processor.cpp?cvsroot=gnash&r1=1.44&r2=1.45 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2035 retrieving revision 1.2036 diff -u -b -r1.2035 -r1.2036 --- ChangeLog 2 Jan 2007 21:11:15 -0000 1.2035 +++ ChangeLog 2 Jan 2007 22:04:36 -0000 1.2036 @@ -1,3 +1,7 @@ +2002-01-02 Markus Gothe + + * utilities/processor.cpp if not GCC define optarg as extern. + 2007-01-02 Ann Barcomb * Created directory devtools, which will contain Index: utilities/processor.cpp =================================================================== RCS file: /sources/gnash/gnash/utilities/processor.cpp,v retrieving revision 1.44 retrieving revision 1.45 diff -u -b -r1.44 -r1.45 --- utilities/processor.cpp 30 Dec 2006 21:57:56 -0000 1.44 +++ utilities/processor.cpp 2 Jan 2007 22:04:36 -0000 1.45 @@ -17,7 +17,7 @@ // // -/* $Id: processor.cpp,v 1.44 2006/12/30 21:57:56 strk Exp $ */ +/* $Id: processor.cpp,v 1.45 2007/01/02 22:04:36 nihilus Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -43,6 +43,7 @@ #include #endif #ifndef __GNUC__ + extern char *optarg; extern int optind, getopt(int, char *const *, const char *); #endif } From MAILER-DAEMON Tue Jan 02 17:27:16 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H1s6G-0003Y9-Cv for mharc-gnash-commit@gnu.org; Tue, 02 Jan 2007 17:27:16 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H1s6F-0003Wp-Bl for gnash-commit@gnu.org; Tue, 02 Jan 2007 17:27:15 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H1s6E-0003VF-85 for gnash-commit@gnu.org; Tue, 02 Jan 2007 17:27:14 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H1s6D-0003V8-Q9 for gnash-commit@gnu.org; Tue, 02 Jan 2007 17:27:13 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H1s6D-0001lV-FU for gnash-commit@gnu.org; Tue, 02 Jan 2007 17:27:13 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H1s6C-0003pK-D7 for gnash-commit@gnu.org; Tue, 02 Jan 2007 22:27:12 +0000 Received: from nihilus by savannah.gnu.org with local (Exim 4.50) id 1H1s6C-0003pG-0B for gnash-commit@gnu.org; Tue, 02 Jan 2007 22:27:12 +0000 To: gnash-commit@gnu.org Message-Id: From: Markus Gothe Date: Tue, 02 Jan 2007 22:27:12 +0000 Subject: [Gnash-commit] gnash ChangeLog server/asobj/NetStreamFfmpeg.cpp X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2007 22:27:15 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Markus Gothe 07/01/02 22:27:11 Modified files: . : ChangeLog server/asobj : NetStreamFfmpeg.cpp Log message: Static_cast'ing AV_NOPTS_VALUE to unsigned long and dynamic allocate 'buffer'. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2036&r2=1.2037 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStreamFfmpeg.cpp?cvsroot=gnash&r1=1.2&r2=1.3 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2036 retrieving revision 1.2037 diff -u -b -r1.2036 -r1.2037 --- ChangeLog 2 Jan 2007 22:04:36 -0000 1.2036 +++ ChangeLog 2 Jan 2007 22:27:11 -0000 1.2037 @@ -1,6 +1,9 @@ 2002-01-02 Markus Gothe * utilities/processor.cpp if not GCC define optarg as extern. + * server/asobjs/NetStreamFfmpeg.cpp: Fixed static_cast of + AV_NOPTS_VALUE. Dynamic allocation of the buffer, since it's wasn't + valid ISO C++ before. 2007-01-02 Ann Barcomb Index: server/asobj/NetStreamFfmpeg.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/NetStreamFfmpeg.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- server/asobj/NetStreamFfmpeg.cpp 21 Dec 2006 17:24:57 -0000 1.2 +++ server/asobj/NetStreamFfmpeg.cpp 2 Jan 2007 22:27:11 -0000 1.3 @@ -14,9 +14,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -// -// -// +/* $Id: NetStreamFfmpeg.cpp,v 1.3 2007/01/02 22:27:11 nihilus Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -545,11 +543,12 @@ } else if (videoFrameFormat == render::RGB && m_VCodecCtx->pix_fmt != PIX_FMT_RGB24) { AVFrame* frameRGB = avcodec_alloc_frame(); unsigned int numBytes = avpicture_get_size(PIX_FMT_RGB24, m_VCodecCtx->width, m_VCodecCtx->height); - uint8_t buffer[numBytes]; + uint8_t *buffer = new uint8_t[numBytes]; avpicture_fill((AVPicture *)frameRGB, buffer, PIX_FMT_RGB24, m_VCodecCtx->width, m_VCodecCtx->height); img_convert((AVPicture*) frameRGB, PIX_FMT_RGB24, (AVPicture*) m_Frame, m_VCodecCtx->pix_fmt, m_VCodecCtx->width, m_VCodecCtx->height); av_free(m_Frame); m_Frame = frameRGB; + delete [] buffer; } raw_videodata_t* video = new raw_videodata_t; @@ -564,7 +563,7 @@ video->m_stream_index = m_video_index; // set presentation timestamp - if (packet.dts != AV_NOPTS_VALUE) + if (packet.dts != static_cast(AV_NOPTS_VALUE)) { video->m_pts = as_double(m_video_stream->time_base) * packet.dts; } From MAILER-DAEMON Tue Jan 02 19:56:37 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H1uQm-0001Zv-Tj for mharc-gnash-commit@gnu.org; Tue, 02 Jan 2007 19:56:36 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H1uQl-0001ZZ-8l for gnash-commit@gnu.org; Tue, 02 Jan 2007 19:56:35 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H1uQk-0001ZN-GM for gnash-commit@gnu.org; Tue, 02 Jan 2007 19:56:34 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H1uQk-0001ZK-CH for gnash-commit@gnu.org; Tue, 02 Jan 2007 19:56:34 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H1uQk-0004sk-2k for gnash-commit@gnu.org; Tue, 02 Jan 2007 19:56:34 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H1uQi-00056N-KJ for gnash-commit@gnu.org; Wed, 03 Jan 2007 00:56:32 +0000 Received: from nihilus by savannah.gnu.org with local (Exim 4.50) id 1H1uQi-00056J-7v for gnash-commit@gnu.org; Wed, 03 Jan 2007 00:56:32 +0000 To: gnash-commit@gnu.org Message-Id: From: Markus Gothe Date: Wed, 03 Jan 2007 00:56:32 +0000 Subject: [Gnash-commit] gnash ChangeLog cygnal/http.cpp X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2007 00:56:35 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Markus Gothe 07/01/03 00:56:32 Modified files: . : ChangeLog cygnal : http.cpp Log message: Removed extra ';'. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2037&r2=1.2038 http://cvs.savannah.gnu.org/viewcvs/gnash/cygnal/http.cpp?cvsroot=gnash&r1=1.3&r2=1.4 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2037 retrieving revision 1.2038 diff -u -b -r1.2037 -r1.2038 --- ChangeLog 2 Jan 2007 22:27:11 -0000 1.2037 +++ ChangeLog 3 Jan 2007 00:56:31 -0000 1.2038 @@ -1,3 +1,7 @@ +2002-01-03 Markus Gothe + + * cygnal/http.cpp: removed extra ';'. + 2002-01-02 Markus Gothe * utilities/processor.cpp if not GCC define optarg as extern. Index: cygnal/http.cpp =================================================================== RCS file: /sources/gnash/gnash/cygnal/http.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -b -r1.3 -r1.4 --- cygnal/http.cpp 17 Dec 2006 23:55:50 -0000 1.3 +++ cygnal/http.cpp 3 Jan 2007 00:56:32 -0000 1.4 @@ -15,7 +15,7 @@ // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // -/* $Id: http.cpp,v 1.3 2006/12/17 23:55:50 nihilus Exp $ */ +/* $Id: http.cpp,v 1.4 2007/01/03 00:56:32 nihilus Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -197,7 +197,7 @@ _referer = body.substr(start+pattern.size(), end-start-1); return _referer; -}; +} string HTTP::extractConnection(const char *data) { From MAILER-DAEMON Tue Jan 02 20:04:55 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H1uYp-0007Pa-N8 for mharc-gnash-commit@gnu.org; Tue, 02 Jan 2007 20:04:55 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H1uYn-0007PL-QY for gnash-commit@gnu.org; Tue, 02 Jan 2007 20:04:53 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H1uYn-0007Oq-B3 for gnash-commit@gnu.org; Tue, 02 Jan 2007 20:04:53 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H1uYm-0007Og-PM for gnash-commit@gnu.org; Tue, 02 Jan 2007 20:04:53 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H1uYm-0006Wf-99 for gnash-commit@gnu.org; Tue, 02 Jan 2007 20:04:52 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H1uYl-0005MS-12 for gnash-commit@gnu.org; Wed, 03 Jan 2007 01:04:51 +0000 Received: from nihilus by savannah.gnu.org with local (Exim 4.50) id 1H1uYk-0005MO-Lf for gnash-commit@gnu.org; Wed, 03 Jan 2007 01:04:50 +0000 To: gnash-commit@gnu.org Message-Id: From: Markus Gothe Date: Wed, 03 Jan 2007 01:04:50 +0000 Subject: [Gnash-commit] gnash ChangeLog cygnal/alloc.cpp X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2007 01:04:54 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Markus Gothe 07/01/03 01:04:50 Modified files: . : ChangeLog cygnal : alloc.cpp Log message: Throw stuff as declaration i . CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2038&r2=1.2039 http://cvs.savannah.gnu.org/viewcvs/gnash/cygnal/alloc.cpp?cvsroot=gnash&r1=1.1&r2=1.2 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2038 retrieving revision 1.2039 diff -u -b -r1.2038 -r1.2039 --- ChangeLog 3 Jan 2007 00:56:31 -0000 1.2038 +++ ChangeLog 3 Jan 2007 01:04:50 -0000 1.2039 @@ -1,6 +1,7 @@ 2002-01-03 Markus Gothe * cygnal/http.cpp: removed extra ';'. + * cygnal/alloc.cpp: throw stuff. 2002-01-02 Markus Gothe Index: cygnal/alloc.cpp =================================================================== RCS file: /sources/gnash/gnash/cygnal/alloc.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -b -r1.1 -r1.2 --- cygnal/alloc.cpp 17 Dec 2006 02:34:58 -0000 1.1 +++ cygnal/alloc.cpp 3 Jan 2007 01:04:50 -0000 1.2 @@ -27,7 +27,7 @@ // Wrap new in a mutex, because it is not thread safe. void * -operator new (std::size_t bytes) { +operator new (std::size_t bytes) throw (std::bad_alloc) { boost::mutex::scoped_lock lock(mem_mutex); void *ptr = malloc (bytes); return ptr; @@ -35,7 +35,7 @@ // Wrap delete in a mutex, because it is not thread safe. void -operator delete (void* vptr) { +operator delete (void* vptr) throw () { boost::mutex::scoped_lock lock(mem_mutex); free (vptr); } From MAILER-DAEMON Tue Jan 02 20:52:12 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H1vIa-0002xd-Or for mharc-gnash-commit@gnu.org; Tue, 02 Jan 2007 20:52:12 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H1vIZ-0002wh-1y for gnash-commit@gnu.org; Tue, 02 Jan 2007 20:52:11 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H1vIX-0002wN-AS for gnash-commit@gnu.org; Tue, 02 Jan 2007 20:52:09 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H1vIX-0002wK-1o for gnash-commit@gnu.org; Tue, 02 Jan 2007 20:52:09 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H1vIW-00078b-MF for gnash-commit@gnu.org; Tue, 02 Jan 2007 20:52:08 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H1vIV-0007eO-8A for gnash-commit@gnu.org; Wed, 03 Jan 2007 01:52:07 +0000 Received: from nihilus by savannah.gnu.org with local (Exim 4.50) id 1H1vIV-0007eF-1D for gnash-commit@gnu.org; Wed, 03 Jan 2007 01:52:07 +0000 To: gnash-commit@gnu.org Message-Id: From: Markus Gothe Date: Wed, 03 Jan 2007 01:52:07 +0000 Subject: [Gnash-commit] gnash/cygnal http.cpp netstats.cpp X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2007 01:52:11 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Markus Gothe 07/01/03 01:52:06 Modified files: cygnal : http.cpp netstats.cpp Log message: Removed duplicate includes... CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/cygnal/http.cpp?cvsroot=gnash&r1=1.4&r2=1.5 http://cvs.savannah.gnu.org/viewcvs/gnash/cygnal/netstats.cpp?cvsroot=gnash&r1=1.1&r2=1.2 Patches: Index: http.cpp =================================================================== RCS file: /sources/gnash/gnash/cygnal/http.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- http.cpp 3 Jan 2007 00:56:32 -0000 1.4 +++ http.cpp 3 Jan 2007 01:52:06 -0000 1.5 @@ -15,13 +15,12 @@ // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // -/* $Id: http.cpp,v 1.4 2007/01/03 00:56:32 nihilus Exp $ */ +/* $Id: http.cpp,v 1.5 2007/01/03 01:52:06 nihilus Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" #endif -#include #include #include #include Index: netstats.cpp =================================================================== RCS file: /sources/gnash/gnash/cygnal/netstats.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -b -r1.1 -r1.2 --- netstats.cpp 17 Dec 2006 02:34:58 -0000 1.1 +++ netstats.cpp 3 Jan 2007 01:52:06 -0000 1.2 @@ -15,11 +15,12 @@ // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // +/* $Id: netstats.cpp,v 1.2 2007/01/03 01:52:06 nihilus Exp $ */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif -#include #include "netstats.h" #include "log.h" From MAILER-DAEMON Tue Jan 02 20:54:16 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H1vKa-0003rD-KP for mharc-gnash-commit@gnu.org; Tue, 02 Jan 2007 20:54:16 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H1vKY-0003qr-HB for gnash-commit@gnu.org; Tue, 02 Jan 2007 20:54:14 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H1vKX-0003qT-T0 for gnash-commit@gnu.org; Tue, 02 Jan 2007 20:54:14 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H1vKX-0003qN-LI for gnash-commit@gnu.org; Tue, 02 Jan 2007 20:54:13 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H1vKW-0007ck-UH for gnash-commit@gnu.org; Tue, 02 Jan 2007 20:54:13 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H1vKW-0007gD-Db for gnash-commit@gnu.org; Wed, 03 Jan 2007 01:54:12 +0000 Received: from nihilus by savannah.gnu.org with local (Exim 4.50) id 1H1vKW-0007gA-5s for gnash-commit@gnu.org; Wed, 03 Jan 2007 01:54:12 +0000 To: gnash-commit@gnu.org Message-Id: From: Markus Gothe Date: Wed, 03 Jan 2007 01:54:12 +0000 Subject: [Gnash-commit] gnash/cygnal http.h X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2007 01:54:15 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Markus Gothe 07/01/03 01:54:12 Modified files: cygnal : http.h Log message: ... CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/cygnal/http.h?cvsroot=gnash&r1=1.1&r2=1.2 Patches: Index: http.h =================================================================== RCS file: /sources/gnash/gnash/cygnal/http.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -b -r1.1 -r1.2 --- http.h 17 Dec 2006 02:34:58 -0000 1.1 +++ http.h 3 Jan 2007 01:54:12 -0000 1.2 @@ -22,6 +22,8 @@ #include "config.h" #endif +#include //include all types plus i/o + #include #include #include "network.h" From MAILER-DAEMON Tue Jan 02 21:09:19 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H1vZ9-0004ud-9F for mharc-gnash-commit@gnu.org; Tue, 02 Jan 2007 21:09:19 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H1vZ7-0004ti-DD for gnash-commit@gnu.org; Tue, 02 Jan 2007 21:09:17 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H1vZ5-0004s5-3U for gnash-commit@gnu.org; Tue, 02 Jan 2007 21:09:16 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H1vZ4-0004rr-PZ for gnash-commit@gnu.org; Tue, 02 Jan 2007 21:09:14 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H1vZ3-0002IQ-7D for gnash-commit@gnu.org; Tue, 02 Jan 2007 21:09:13 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H1vZ2-00085y-3Z for gnash-commit@gnu.org; Wed, 03 Jan 2007 02:09:12 +0000 Received: from nihilus by savannah.gnu.org with local (Exim 4.50) id 1H1vZ1-00085v-TR for gnash-commit@gnu.org; Wed, 03 Jan 2007 02:09:12 +0000 To: gnash-commit@gnu.org Message-Id: From: Markus Gothe Date: Wed, 03 Jan 2007 02:09:11 +0000 Subject: [Gnash-commit] gnash/cygnal Makefile.am X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2007 02:09:18 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Markus Gothe 07/01/03 02:09:11 Modified files: cygnal : Makefile.am Log message: Removed duplicate CFLAGS. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/cygnal/Makefile.am?cvsroot=gnash&r1=1.1&r2=1.2 Patches: Index: Makefile.am =================================================================== RCS file: /sources/gnash/gnash/cygnal/Makefile.am,v retrieving revision 1.1 retrieving revision 1.2 diff -u -b -r1.1 -r1.2 --- Makefile.am 17 Dec 2006 02:34:58 -0000 1.1 +++ Makefile.am 3 Jan 2007 02:09:11 -0000 1.2 @@ -16,6 +16,8 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # +# $Id: Makefile.am,v 1.2 2007/01/03 02:09:11 nihilus Exp $ + ## Process this file with automake to generate Makefile.in AUTOMAKE_OPTIONS = dejagnu @@ -39,7 +41,6 @@ -I$(top_srcdir)/libbase \ -I$(top_srcdir)/server \ $(LIBXML_CFLAGS) \ - $(LIBXML_CFLAGS) \ $(DMALLOC_CFLAGS) \ $(CURL_CFLAGS) \ $(BOOST_CFLAGS) \ From MAILER-DAEMON Wed Jan 03 07:30:45 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H25GX-0003L4-JI for mharc-gnash-commit@gnu.org; Wed, 03 Jan 2007 07:30:45 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H25GW-0003KU-2J for gnash-commit@gnu.org; Wed, 03 Jan 2007 07:30:44 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H25GV-0003K3-Bu for gnash-commit@gnu.org; Wed, 03 Jan 2007 07:30:43 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H25GV-0003Js-3M for gnash-commit@gnu.org; Wed, 03 Jan 2007 07:30:43 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H25GU-0001Iw-Sb for gnash-commit@gnu.org; Wed, 03 Jan 2007 07:30:42 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H25GU-0002DP-8o for gnash-commit@gnu.org; Wed, 03 Jan 2007 12:30:42 +0000 Received: from ann by savannah.gnu.org with local (Exim 4.50) id 1H25GT-0002DG-Qd for gnash-commit@gnu.org; Wed, 03 Jan 2007 12:30:42 +0000 To: gnash-commit@gnu.org Message-Id: From: Ann Barcomb Date: Wed, 03 Jan 2007 12:30:41 +0000 Subject: [Gnash-commit] gnash/doc/C internals.xml X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2007 12:30:44 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Ann Barcomb 07/01/03 12:30:41 Modified files: doc/C : internals.xml Log message: The minimum version number of Firefox was corrected from 1.5 to 1.05. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/doc/C/internals.xml?cvsroot=gnash&r1=1.49&r2=1.50 Patches: Index: internals.xml =================================================================== RCS file: /sources/gnash/gnash/doc/C/internals.xml,v retrieving revision 1.49 retrieving revision 1.50 diff -u -b -r1.49 -r1.50 --- internals.xml 30 Dec 2006 23:55:04 -0000 1.49 +++ internals.xml 3 Jan 2007 12:30:41 -0000 1.50 @@ -170,7 +170,7 @@ One future thought for the plugin is to use the new Firefox - 1.5 or greater version of Firefox. This version has added a + 1.05 or greater version of Firefox. This version has added a drawable canvas window that supports hardware acceleration, and is designed to support things like rendering directly into the canvas without needing OpenGL. From MAILER-DAEMON Wed Jan 03 10:11:59 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H27mZ-0004qc-5y for mharc-gnash-commit@gnu.org; Wed, 03 Jan 2007 10:11:59 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H27mX-0004pl-F4 for gnash-commit@gnu.org; Wed, 03 Jan 2007 10:11:57 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H27mV-0004nr-MY for gnash-commit@gnu.org; Wed, 03 Jan 2007 10:11:56 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H27mV-0004nd-DV for gnash-commit@gnu.org; Wed, 03 Jan 2007 10:11:55 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H27mV-0001D5-4V for gnash-commit@gnu.org; Wed, 03 Jan 2007 10:11:55 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H27mU-0001aM-NT for gnash-commit@gnu.org; Wed, 03 Jan 2007 15:11:54 +0000 Received: from ann by savannah.gnu.org with local (Exim 4.50) id 1H27mU-0001aJ-HS for gnash-commit@gnu.org; Wed, 03 Jan 2007 15:11:54 +0000 To: gnash-commit@gnu.org Message-Id: From: Ann Barcomb Date: Wed, 03 Jan 2007 15:11:54 +0000 Subject: [Gnash-commit] gnash/doc/C internals.xml X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2007 15:11:57 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Ann Barcomb 07/01/03 15:11:54 Modified files: doc/C : internals.xml Log message: Corrected Firefox version thanks to dolphinling pointing out the missing decimal point. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/doc/C/internals.xml?cvsroot=gnash&r1=1.50&r2=1.51 Patches: Index: internals.xml =================================================================== RCS file: /sources/gnash/gnash/doc/C/internals.xml,v retrieving revision 1.50 retrieving revision 1.51 diff -u -b -r1.50 -r1.51 --- internals.xml 3 Jan 2007 12:30:41 -0000 1.50 +++ internals.xml 3 Jan 2007 15:11:54 -0000 1.51 @@ -170,7 +170,7 @@ One future thought for the plugin is to use the new Firefox - 1.05 or greater version of Firefox. This version has added a + 1.0.5 or greater version of Firefox. This version has added a drawable canvas window that supports hardware acceleration, and is designed to support things like rendering directly into the canvas without needing OpenGL. From MAILER-DAEMON Wed Jan 03 10:18:39 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H27t1-0000Wd-2b for mharc-gnash-commit@gnu.org; Wed, 03 Jan 2007 10:18:39 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H27sz-0000VA-5k for gnash-commit@gnu.org; Wed, 03 Jan 2007 10:18:37 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H27sy-0000Ut-NG for gnash-commit@gnu.org; Wed, 03 Jan 2007 10:18:36 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H27sy-0000Up-HA for gnash-commit@gnu.org; Wed, 03 Jan 2007 10:18:36 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H27sy-0002E4-57 for gnash-commit@gnu.org; Wed, 03 Jan 2007 10:18:36 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H27sx-0001k0-Gi for gnash-commit@gnu.org; Wed, 03 Jan 2007 15:18:35 +0000 Received: from ann by savannah.gnu.org with local (Exim 4.50) id 1H27sx-0001jx-AJ for gnash-commit@gnu.org; Wed, 03 Jan 2007 15:18:35 +0000 To: gnash-commit@gnu.org Message-Id: From: Ann Barcomb Date: Wed, 03 Jan 2007 15:18:35 +0000 Subject: [Gnash-commit] gnash ChangeLog doc/C/internals.xml X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2007 15:18:37 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Ann Barcomb 07/01/03 15:18:35 Modified files: . : ChangeLog doc/C : internals.xml Log message: Rob clarified that 'canvas' was being used in a generic sense, before the actual Firefox canvas was created. Bastiaan confirmed that the text now makes sense. Thanks to dolphinling for pointing out this error. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2039&r2=1.2040 http://cvs.savannah.gnu.org/viewcvs/gnash/doc/C/internals.xml?cvsroot=gnash&r1=1.51&r2=1.52 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2039 retrieving revision 1.2040 diff -u -b -r1.2039 -r1.2040 --- ChangeLog 3 Jan 2007 01:04:50 -0000 1.2039 +++ ChangeLog 3 Jan 2007 15:18:35 -0000 1.2040 @@ -1,3 +1,8 @@ +2007-01-03 Ann Barcomb + + * Corrected Firefox version and canvas information + in internals.xml + 2002-01-03 Markus Gothe * cygnal/http.cpp: removed extra ';'. Index: doc/C/internals.xml =================================================================== RCS file: /sources/gnash/gnash/doc/C/internals.xml,v retrieving revision 1.51 retrieving revision 1.52 diff -u -b -r1.51 -r1.52 --- doc/C/internals.xml 3 Jan 2007 15:11:54 -0000 1.51 +++ doc/C/internals.xml 3 Jan 2007 15:18:35 -0000 1.52 @@ -171,9 +171,9 @@ One future thought for the plugin is to use the new Firefox 1.0.5 or greater version of Firefox. This version has added a - drawable canvas window that supports hardware acceleration, and + GTK drawable window which supports hardware acceleration, and is designed to support things like rendering directly into the - canvas without needing OpenGL. + window without needing OpenGL. From MAILER-DAEMON Wed Jan 03 11:46:13 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H29Fl-0002cq-Na for mharc-gnash-commit@gnu.org; Wed, 03 Jan 2007 11:46:13 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H29Fj-0002c8-Sv for gnash-commit@gnu.org; Wed, 03 Jan 2007 11:46:11 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H29Fi-0002bn-2X for gnash-commit@gnu.org; Wed, 03 Jan 2007 11:46:11 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H29Fh-0002bk-UG for gnash-commit@gnu.org; Wed, 03 Jan 2007 11:46:09 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H29Fh-0002DG-EH for gnash-commit@gnu.org; Wed, 03 Jan 2007 11:46:09 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H29FW-00079d-Ul for gnash-commit@gnu.org; Wed, 03 Jan 2007 16:45:59 +0000 Received: from bjacques by savannah.gnu.org with local (Exim 4.50) id 1H29FW-00079a-It for gnash-commit@gnu.org; Wed, 03 Jan 2007 16:45:58 +0000 To: gnash-commit@gnu.org Message-Id: From: Bastiaan Jacques Date: Wed, 03 Jan 2007 16:45:58 +0000 Subject: [Gnash-commit] gnash ChangeLog libbase/tu_opengl_includes.h X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2007 16:46:12 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Bastiaan Jacques 07/01/03 16:45:58 Modified files: . : ChangeLog libbase : tu_opengl_includes.h Log message: Make building against X11/OpenGL work even when we're using MACH, i.e. on OSX, but only when the GTK GUI is used. (Because there's a good chance we're using X11 when GTK is involved; however, there is an experimental GTK/Cocoa port, so this is not a definitive fix and we may have to revisit this issue some day.) To do this, all we have to do is to make sure GL/glx.h is included. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2040&r2=1.2041 http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/tu_opengl_includes.h?cvsroot=gnash&r1=1.12&r2=1.13 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2040 retrieving revision 1.2041 diff -u -b -r1.2040 -r1.2041 --- ChangeLog 3 Jan 2007 15:18:35 -0000 1.2040 +++ ChangeLog 3 Jan 2007 16:45:58 -0000 1.2041 @@ -1,3 +1,13 @@ +2007-01-03 Bastiaan Jacques + + * libbase/tu_opengl_includes.h: Make building against X11/OpenGL work + even when we're using MACH, i.e. on OSX, but only when the GTK GUI + is used. (Because there's a good chance we're using X11 when GTK is + involved; however, there is an experimental GTK/Cocoa port, so this + is not a definitive fix and we may have to revisit this issue some + day.) To do this, all we have to do is to make sure GL/glx.h is + included. + 2007-01-03 Ann Barcomb * Corrected Firefox version and canvas information Index: libbase/tu_opengl_includes.h =================================================================== RCS file: /sources/gnash/gnash/libbase/tu_opengl_includes.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -b -r1.12 -r1.13 --- libbase/tu_opengl_includes.h 29 Oct 2006 23:42:56 -0000 1.12 +++ libbase/tu_opengl_includes.h 3 Jan 2007 16:45:58 -0000 1.13 @@ -66,7 +66,7 @@ # define APIENTRY #endif // __MACH__ -#if !defined(WIN32) && !defined(__MACH__) +#if !defined(WIN32) && (!defined(__MACH__) || defined(GUI_GTK)) # define GL_GLEXT_PROTOTYPES # include # include From MAILER-DAEMON Wed Jan 03 12:18:11 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H29kh-0008S9-P3 for mharc-gnash-commit@gnu.org; Wed, 03 Jan 2007 12:18:11 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H29kg-0008Rb-Ba for gnash-commit@gnu.org; Wed, 03 Jan 2007 12:18:10 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H29kf-0008Qm-Cw for gnash-commit@gnu.org; Wed, 03 Jan 2007 12:18:09 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H29kf-0008QY-8L for gnash-commit@gnu.org; Wed, 03 Jan 2007 12:18:09 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H29ke-0000N7-EH for gnash-commit@gnu.org; Wed, 03 Jan 2007 12:18:09 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H29kd-0007s7-N1 for gnash-commit@gnu.org; Wed, 03 Jan 2007 17:18:07 +0000 Received: from ann by savannah.gnu.org with local (Exim 4.50) id 1H29kd-0007s4-Ed for gnash-commit@gnu.org; Wed, 03 Jan 2007 17:18:07 +0000 To: gnash-commit@gnu.org Message-Id: From: Ann Barcomb Date: Wed, 03 Jan 2007 17:18:07 +0000 Subject: [Gnash-commit] gnash ChangeLog doc/C/internals.xml doc/C/confo... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2007 17:18:10 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Ann Barcomb 07/01/03 17:18:07 Modified files: . : ChangeLog doc/C : internals.xml Added files: doc/C : conformance.xml Log message: Removed 'Level of Conformance' from doc/C/internals.xml. This information will go in the wiki. Temporarily created conformance.xml in the same directory which contains the removed material. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2041&r2=1.2042 http://cvs.savannah.gnu.org/viewcvs/gnash/doc/C/internals.xml?cvsroot=gnash&r1=1.52&r2=1.53 http://cvs.savannah.gnu.org/viewcvs/gnash/doc/C/conformance.xml?cvsroot=gnash&rev=1.1 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2041 retrieving revision 1.2042 diff -u -b -r1.2041 -r1.2042 --- ChangeLog 3 Jan 2007 16:45:58 -0000 1.2041 +++ ChangeLog 3 Jan 2007 17:18:07 -0000 1.2042 @@ -1,3 +1,9 @@ +2007-01-03 Ann Barcomb + * Removed 'Level of Conformance' from doc/C/internals.xml. + This information will go in the wiki. Temporarily created + conformance.xml in the same directory which contains the + removed material. + 2007-01-03 Bastiaan Jacques * libbase/tu_opengl_includes.h: Make building against X11/OpenGL work @@ -11,7 +17,7 @@ 2007-01-03 Ann Barcomb * Corrected Firefox version and canvas information - in internals.xml + in doc/C/internals.xml 2002-01-03 Markus Gothe Index: doc/C/internals.xml =================================================================== RCS file: /sources/gnash/gnash/doc/C/internals.xml,v retrieving revision 1.52 retrieving revision 1.53 diff -u -b -r1.52 -r1.53 --- doc/C/internals.xml 3 Jan 2007 15:18:35 -0000 1.52 +++ doc/C/internals.xml 3 Jan 2007 17:18:07 -0000 1.53 @@ -773,656 +773,6 @@ - - - Level of Conformance - - - Gnash is a capable of reading SWF v7 files and opcodes. Not - all ActionScript classes are implemented yet, but all of the - most heavily used ones are. Many ActionScript classes are - partially implemented; there is support for all of the - commonly used methods of each class. - - - - This is a quick list of what is currently implemented in Gnash - as of January, 2006. - - - - - - - - - - - Class Name - - - When Added - - - Conformance - - - - - - - _global - - - - - - - - Partially implemented. - - - - - - Accessibility - - - - swf v7 ??? - - - - - Unimplemented. - - - - - - Array - - - - swf v6 - - - - - Partially Implemented. - - - - - - Boolean - - - - swf v5 - - - - - Fully implemented. - - - - - - - Button - - - - swf v6 - - - - - Most of the functionality is implemented. - - - - - - - Camera - - - - swf v6 - - - - - Unimplemented. - - - - - - - Color - - - - swf v5 - - - - - Unknown status. - - - - - - - ContextMenu - - - - swf v7 - - - - - Unimplemented. - - - - - - CustomActions - - - - swf v6 - - - - - Unimplemented. - - - - - - - Date - - - - swf v5 - - - - - Partially implemented. - - - - - - Error - - - - swf v7 - - - - - Unimplemented. - - - - - - - - Function - - - - swf v6 - - - - - Unimplemented. - - - - - - - Key - - - - swf v6 - - - - - Fully implemented. - - - - - - - LoadVars - - - - swf v6 - - - - - Unimplemented. - - - - - - - LocalConnection - - - - swf v6 - - - - - Partially implemented. - - - - - - - Math - - - - swf v4 - - - - - Fully implemented. - - - - - - - Microphone - - - - swf v6 - - - - - Unimplemented. - - - - - - - Mouse - - - - swf v5 - - - - - Most of the functionality is implemented. - - - - - - - MovieClip - - - - swf v3 - - - - - Partially implemented. - - - - - - - MovieClipLoader - - - - swf v7 - - - - - Barely implemented. - - - - - - - NetConnection - - - - swf v7 - - - - - Partially implemented. - - - - - - - NetStream - - - - swf v7 - - - - - Unimplemented. - - - - - - - Number - - - - swf v5 - - - - - Partially implemented. - - - - - - - Object - - - - swf v5 - - - - - Partially implemented. - - - - - - - Selection - - - - swf v5 - - - - - Unimplemented. - - - - - - - SharedObject - - - - swf v6 - - - - - Unimplemented. - - - - - - - Sound - - - - swf v5 - - - - - Partially implemented. - - - - - - - Stage - - - - swf v6 - - - - - Unimplemented. - - - - - - - String - - - - swf v5 - - - - - Partially implemented. - - - - - - - System - - - - swf v6 - - - - - Unimplemented. - - - - - - - TextField - - - - swf v6 - - - - - Partially implemented. - - - - - - - TextFormat - - - - swf v6 - - - - - Partially implemented. - - - - - - - Video - - - - swf v6 - - - - - Unimplemented. - - - - - - - XML - - - - swf v5 - - - - - Almost fully implemented. - - - - - - - XMLNode - - - - swf v5 - - - - - Almost fully implemented. - - - - - - - XMLSocket - - - - swf v5 - - - - - Almost fully implemented. - - - - - - - - - - &asaccessibility; - &asarray; - &asboolean; - &asbutton; - &ascamera; - &ascolor; - &ascontextmenu; - &asmath; - &asnetconnection; - &asnumber; - &asstring; - &ascustomactions; - &asdate; - &aserror; - &asfunction; - &askey; - &asloadvars; - &aslocalconnection; - &asmicrophone; - &asmouse; - &asmovieclip; - &asmoviecliploader; - &asnetstream; - &asobject; - &asselection; - &assharedobject; - &assound; - &asstage; - &assystem; - &astextfield; - &astextformat; - &astextsnapshot; - &asvideo; - &asxmlnode; - &asxml; - &asxmlsocket; - - &opcodes; Index: doc/C/conformance.xml =================================================================== RCS file: doc/C/conformance.xml diff -N doc/C/conformance.xml --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ doc/C/conformance.xml 3 Jan 2007 17:18:07 -0000 1.1 @@ -0,0 +1,649 @@ + + Level of Conformance + + + Gnash is a capable of reading SWF v7 files and opcodes. Not + all ActionScript classes are implemented yet, but all of the + most heavily used ones are. Many ActionScript classes are + partially implemented; there is support for all of the + commonly used methods of each class. + + + + This is a quick list of what is currently implemented in Gnash + as of January, 2006. + + + + + + + + + + + Class Name + + + When Added + + + Conformance + + + + + + + _global + + + + + + + + Partially implemented. + + + + + + Accessibility + + + + swf v7 ??? + + + + + Unimplemented. + + + + + + Array + + + + swf v6 + + + + + Partially Implemented. + + + + + + Boolean + + + + swf v5 + + + + + Fully implemented. + + + + + + + Button + + + + swf v6 + + + + + Most of the functionality is implemented. + + + + + + + Camera + + + + swf v6 + + + + + Unimplemented. + + + + + + + Color + + + + swf v5 + + + + + Unknown status. + + + + + + + ContextMenu + + + + swf v7 + + + + + Unimplemented. + + + + + + CustomActions + + + + swf v6 + + + + + Unimplemented. + + + + + + + Date + + + + swf v5 + + + + + Partially implemented. + + + + + + Error + + + + swf v7 + + + + + Unimplemented. + + + + + + + + Function + + + + swf v6 + + + + + Unimplemented. + + + + + + + Key + + + + swf v6 + + + + + Fully implemented. + + + + + + + LoadVars + + + + swf v6 + + + + + Unimplemented. + + + + + + + LocalConnection + + + + swf v6 + + + + + Partially implemented. + + + + + + + Math + + + + swf v4 + + + + + Fully implemented. + + + + + + + Microphone + + + + swf v6 + + + + + Unimplemented. + + + + + + + Mouse + + + + swf v5 + + + + + Most of the functionality is implemented. + + + + + + + MovieClip + + + + swf v3 + + + + + Partially implemented. + + + + + + + MovieClipLoader + + + + swf v7 + + + + + Barely implemented. + + + + + + + NetConnection + + + + swf v7 + + + + + Partially implemented. + + + + + + + NetStream + + + + swf v7 + + + + + Unimplemented. + + + + + + + Number + + + + swf v5 + + + + + Partially implemented. + + + + + + + Object + + + + swf v5 + + + + + Partially implemented. + + + + + + + Selection + + + + swf v5 + + + + + Unimplemented. + + + + + + + SharedObject + + + + swf v6 + + + + + Unimplemented. + + + + + + + Sound + + + + swf v5 + + + + + Partially implemented. + + + + + + + Stage + + + + swf v6 + + + + + Unimplemented. + + + + + + + String + + + + swf v5 + + + + + Partially implemented. + + + + + + + System + + + + swf v6 + + + + + Unimplemented. + + + + + + + TextField + + + + swf v6 + + + + + Partially implemented. + + + + + + + TextFormat + + + + swf v6 + + + + + Partially implemented. + + + + + + + Video + + + + swf v6 + + + + + Unimplemented. + + + + + + + XML + + + + swf v5 + + + + + Almost fully implemented. + + + + + + + XMLNode + + + + swf v5 + + + + + Almost fully implemented. + + + + + + + XMLSocket + + + + swf v5 + + + + + Almost fully implemented. + + + + + + + + + + &asaccessibility; + &asarray; + &asboolean; + &asbutton; + &ascamera; + &ascolor; + &ascontextmenu; + &asmath; + &asnetconnection; + &asnumber; + &asstring; + &ascustomactions; + &asdate; + &aserror; + &asfunction; + &askey; + &asloadvars; + &aslocalconnection; + &asmicrophone; + &asmouse; + &asmovieclip; + &asmoviecliploader; + &asnetstream; + &asobject; + &asselection; + &assharedobject; + &assound; + &asstage; + &assystem; + &astextfield; + &astextformat; + &astextsnapshot; + &asvideo; + &asxmlnode; + &asxml; + &asxmlsocket; + + From MAILER-DAEMON Wed Jan 03 12:22:36 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H29oy-0002LL-DG for mharc-gnash-commit@gnu.org; Wed, 03 Jan 2007 12:22:36 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H29ow-0002KD-4h for gnash-commit@gnu.org; Wed, 03 Jan 2007 12:22:34 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H29ov-0002Jq-HQ for gnash-commit@gnu.org; Wed, 03 Jan 2007 12:22:33 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H29ov-0002Je-9A for gnash-commit@gnu.org; Wed, 03 Jan 2007 12:22:33 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H29ou-00017F-QC for gnash-commit@gnu.org; Wed, 03 Jan 2007 12:22:32 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H29ou-0007y3-AH for gnash-commit@gnu.org; Wed, 03 Jan 2007 17:22:32 +0000 Received: from ann by savannah.gnu.org with local (Exim 4.50) id 1H29ou-0007y0-3z for gnash-commit@gnu.org; Wed, 03 Jan 2007 17:22:32 +0000 To: gnash-commit@gnu.org Message-Id: From: Ann Barcomb Date: Wed, 03 Jan 2007 17:22:32 +0000 Subject: [Gnash-commit] gnash/doc/C gnash.xml X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2007 17:22:34 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Ann Barcomb 07/01/03 17:22:32 Modified files: doc/C : gnash.xml Log message: It is now 2007, so our copyright notice has been modified to include that year. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/doc/C/gnash.xml?cvsroot=gnash&r1=1.35&r2=1.36 Patches: Index: gnash.xml =================================================================== RCS file: /sources/gnash/gnash/doc/C/gnash.xml,v retrieving revision 1.35 retrieving revision 1.36 diff -u -b -r1.35 -r1.36 --- gnash.xml 11 Dec 2006 11:32:24 -0000 1.35 +++ gnash.xml 3 Jan 2007 17:22:32 -0000 1.36 @@ -64,7 +64,7 @@ &app; Manual V&manrevision; - 2005, 2006 + 2005, 2006, 2007 Rob Savoye root, .. --> parent, . --> this, other == character + + if (next_dot == NULL) { + break; + } + + p = next_dot + 1; + ++depth; + } + return env; +} + +as_object* +as_environment::find_object_slashsyntax(const std::string& path) const +{ +#ifdef DEBUG_TARGET_FINDING + log_msg("find_object_slashsyntax(%s) called", path.c_str()); +#endif + + if (path.length() <= 0) { +#ifdef DEBUG_TARGET_FINDING + log_msg("Returning m_target (empty path)"); +#endif + return m_target; + } + + // we'd have returned m_target in this case + //assert(path.length() > 0); + + as_object* env = m_target; + assert(env); + + const char* p = path.c_str(); + + if (*p == '/') { + // Absolute path. Start at the *absolute* root. + // TODO: should this be VM::get().getRoot().get_root_movie() ? + env = m_target->get_root_movie(); +#ifdef DEBUG_TARGET_FINDING + log_msg("Absolute path, start at the root (%p)", (void*)env); +#endif + p++; + } + + if (*p == '\0') { +#ifdef DEBUG_TARGET_FINDING + log_msg("Null path, returning m_target"); +#endif + return env; + } + + unsigned int depth=0; // number of iterations + while (env) { + std::string subpart; + const char* next_slash = find_next_slash(p); // TODO: use std::string::find + subpart = p; + if (next_slash == p) { + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("invalid path '%s'", path.c_str()); + ); + return NULL; // TODO: check me + //break; + } else if (next_slash) { + // Cut off the slash and everything after it. + subpart.resize(next_slash - p); + } + +#ifdef DEBUG_TARGET_FINDING + log_msg("Subpart == %s", subpart.c_str()); +#endif + + // No more components to scan + if ( subpart.empty() ) + { +#ifdef DEBUG_TARGET_FINDING + log_msg("No more subparts, env is %p", (void*)env); +#endif + break; + } + + if ( subpart == ".." ) + { + character* ch = dynamic_cast(env); + if ( ! ch ) { + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("'..' element in path '%s' follows a non-character object %p", + path.c_str(), env); + ); + return NULL; + } + env = ch->get_parent(); + if ( ! env ) // root movie doesn't have a parent + { + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("'..' in path '%s' follows a character with no parent (%s : %p) (root is %p)", + path.c_str(), ch->get_text_value(), ch, VM::get().getRoot().get_root_movie()); + ); + // if we override env, getvariable.as fails [line 57] + //env = ch; + } + } + else + { + +#ifdef DEBUG_TARGET_FINDING + log_msg("Invoking get_member(%s) on object %p", subpart.c_str(), (void *)env); +#endif + as_value tmp; + // TODO: make sure sprite_instances know about ".." + if ( ! env->get_member(subpart.c_str(), &tmp) ) + { + // Try _global, but only at first iteration... + if ( depth > 0 ) + { + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("Member %s for object %p not found", subpart.c_str(), env); + ); + return NULL; + } + + if ( ! VM::get().getGlobal()->get_member(subpart.c_str(), &tmp) ) + { + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("Element '%s' of variable '%s' not found in object %p nor in _global", + subpart.c_str(), path.c_str(), env); + ); + return NULL; + } + } + + as_object* newenv = tmp.to_object(); + // Debugging only: + if ( newenv == NULL ) { + log_msg("Member %s for object %p found but doesn't cast to an as_object", subpart.c_str(), env); + return NULL; + } + + env = newenv; + } + + //@@ _level0 --> root, .. --> parent, . --> this, other == character + + if (next_slash == NULL) { + break; + } + + p = next_slash + 1; + ++depth; + } + return env; +} + int as_environment::get_version() const { Index: server/as_environment.h =================================================================== RCS file: /sources/gnash/gnash/server/as_environment.h,v retrieving revision 1.37 retrieving revision 1.38 diff -u -b -r1.37 -r1.38 --- server/as_environment.h 9 Jan 2007 01:55:24 -0000 1.37 +++ server/as_environment.h 15 Jan 2007 00:06:59 -0000 1.38 @@ -18,7 +18,7 @@ // // -/* $Id: as_environment.h,v 1.37 2007/01/09 01:55:24 strk Exp $ */ +/* $Id: as_environment.h,v 1.38 2007/01/15 00:06:59 strk Exp $ */ #ifndef GNASH_AS_ENVIRONMENT_H #define GNASH_AS_ENVIRONMENT_H @@ -327,6 +327,9 @@ // /// The value might be a reference to the object itself, or a /// string giving a relative path name to the object. + /// + /// @@ make private ? --strk; + /// character* find_target(const as_value& val) const; /// Dump content of the stack to a std::ostream @@ -378,8 +381,14 @@ // // If no colon or dot, returns false and leaves *path & *var alone. // + /// @param is_slash_based + /// If not null gets set to true if path is slash-based + /// (path/to/:variable), and to false if path is dot-based + /// (path.to.variable). + /// + /// TODO: return an integer: 0 not a path, 1 a slash-based path, 2 a dot-based path static bool parse_path(const std::string& var_path, std::string& path, - std::string& var); + std::string& var, bool* is_slash_based=NULL); /// The variables container (case-insensitive) @@ -451,6 +460,22 @@ return m_local_frames.begin(); } + /// Find an object referenced by the given path (slash syntax). + // + /// Supports /slash/syntax + /// + /// Return NULL if path doesn't point to an object. + /// + as_object* find_object_slashsyntax(const std::string& path) const; + + /// Find an object referenced by the given path (dot syntax). + // + /// Supports dot.syntax + /// + /// Return NULL if path doesn't point to an object. + /// + as_object* find_object_dotsyntax(const std::string& path) const; + }; Index: server/sprite_instance.cpp =================================================================== RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v retrieving revision 1.123 retrieving revision 1.124 diff -u -b -r1.123 -r1.124 --- server/sprite_instance.cpp 11 Jan 2007 21:24:42 -0000 1.123 +++ server/sprite_instance.cpp 15 Jan 2007 00:06:59 -0000 1.124 @@ -1211,10 +1211,31 @@ // Set *val to the value of the named member and // return true, if we have the named member. // Otherwise leave *val alone and return false. -bool sprite_instance::get_member(const tu_stringi& name, as_value* val) +bool sprite_instance::get_member(const tu_stringi& name_, as_value* val) { + // TODO: take a std::string directly !! + std::string name = name_.c_str(); + + if ( name == "_root" ) + { + // TODO: handle lockroot + val->set_as_object( VM::get().getRoot().get_root_movie() ); + return true; + } + if ( name == "_level0" ) + { + // TODO: handle _level# (any level) + val->set_as_object( VM::get().getRoot().get_root_movie() ); + return true; + } + if ( name == "this" ) + { + val->set_as_object( this ); + return true; + } + // FIXME: use addProperty interface for these !! - as_standard_member std_member = get_standard_member(name); + as_standard_member std_member = get_standard_member(name.c_str()); switch (std_member) { default: @@ -1451,7 +1472,7 @@ } // end switch // Try variables. - if (m_as_environment.get_member(std::string(name.c_str()), val)) + if ( m_as_environment.get_member(name, val) ) { return true; } @@ -1459,7 +1480,9 @@ // Try object members, BEFORE display list items! // (see testcase VarAndCharClash.swf in testsuite/misc-ming.all) // - if ( get_member_default(name, val) ) + // TODO: simplify the next line when get_member_default takes + // a std::string + if ( get_member_default(name.c_str(), val) ) { // ... trying to be useful to Flash coders ... @@ -1470,7 +1493,7 @@ //#define CHECK_FOR_NAME_CLASHES 1 #ifdef CHECK_FOR_NAME_CLASHES IF_VERBOSE_ASCODING_ERRORS( - if ( m_display_list.get_character_by_name_i(std::string(name.c_str())) ) + if ( m_display_list.get_character_by_name_i(name) ) { log_warning("A sprite member (%s) clashes with " "the name of an existing character " @@ -1486,7 +1509,7 @@ // Try items on our display list. - character* ch = m_display_list.get_character_by_name_i(std::string(name.c_str())); + character* ch = m_display_list.get_character_by_name_i(name); if (ch) { // Found object. @@ -1495,7 +1518,7 @@ } // Try textfield variables - edit_text_character* etc = get_textfield_variable(name.c_str()); + edit_text_character* etc = get_textfield_variable(name); if ( etc ) { val->set_string(etc->get_text_value()); Index: server/vm/ASHandlers.cpp =================================================================== RCS file: /sources/gnash/gnash/server/vm/ASHandlers.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -u -b -r1.27 -r1.28 --- server/vm/ASHandlers.cpp 12 Jan 2007 12:03:41 -0000 1.27 +++ server/vm/ASHandlers.cpp 15 Jan 2007 00:06:59 -0000 1.28 @@ -16,7 +16,7 @@ // -/* $Id: ASHandlers.cpp,v 1.27 2007/01/12 12:03:41 strk Exp $ */ +/* $Id: ASHandlers.cpp,v 1.28 2007/01/15 00:06:59 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1858,7 +1858,8 @@ if ( target_name.empty() ) { new_target = env.find_target(std::string("/")); } else { - new_target = env.find_target(target_name); + as_value target_val = env.get_variable(target_name); + new_target = target_val.to_sprite(); } if (new_target == NULL) Index: server/vm/ActionExec.cpp =================================================================== RCS file: /sources/gnash/gnash/server/vm/ActionExec.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -b -r1.10 -r1.11 --- server/vm/ActionExec.cpp 12 Jan 2007 10:59:48 -0000 1.10 +++ server/vm/ActionExec.cpp 15 Jan 2007 00:06:59 -0000 1.11 @@ -16,7 +16,7 @@ // -/* $Id: ActionExec.cpp,v 1.10 2007/01/12 10:59:48 strk Exp $ */ +/* $Id: ActionExec.cpp,v 1.11 2007/01/15 00:06:59 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -26,13 +26,14 @@ #include "action_buffer.h" #include "swf_function.h" #include "log.h" -//#include "stream.h" +#include "VM.h" #include "swf.h" #include "ASHandlers.h" #include "as_environment.h" #include +#include #if !defined(_WIN32) && !defined(WIN32) # include @@ -282,18 +283,46 @@ bool ActionExec::delVariable(const std::string& name) { + VM& vm = VM::get(); // cache this ? + if ( vm.getSWFVersion() < 7 ) + { + std::string namei = name; + boost::to_lower(namei, vm.getLocale()); + return env.del_variable_raw(namei, with_stack); + } + else + { return env.del_variable_raw(name, with_stack); + } } void ActionExec::setVariable(const std::string& name, const as_value& val) { + VM& vm = VM::get(); // cache this ? + if ( vm.getSWFVersion() < 7 ) + { + std::string namei = name; + boost::to_lower(namei, vm.getLocale()); + return env.set_variable(namei, val, getWithStack()); + } + else + { return env.set_variable(name, val, getWithStack()); + } } void -ActionExec::setLocalVariable(const std::string& name, const as_value& val) +ActionExec::setLocalVariable(const std::string& name_, const as_value& val) { + VM& vm = VM::get(); // cache this ? + + std::string name = name_; + if ( vm.getSWFVersion() < 7 ) + { + boost::to_lower(name, vm.getLocale()); + } + if ( isFunction() ) { // TODO: set local in the function object? @@ -310,14 +339,19 @@ as_value ActionExec::getVariable(const std::string& name) { -#if 0 - if ( isFunction() && name == "super" ) + VM& vm = VM::get(); + + if ( vm.getSWFVersion() < 7 ) { - log_msg("Should return Base class of current function here... "); - // this is likely NOT the constructor NOR the prototype + std::string namei = name; + boost::to_lower(namei, vm.getLocale()); + return env.get_variable(namei, getWithStack()); } -#endif + else + { return env.get_variable(name, getWithStack()); + } + } } // end of namespace gnash Index: server/vm/ActionExec.h =================================================================== RCS file: /sources/gnash/gnash/server/vm/ActionExec.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -b -r1.6 -r1.7 --- server/vm/ActionExec.h 12 Jan 2007 10:59:48 -0000 1.6 +++ server/vm/ActionExec.h 15 Jan 2007 00:06:59 -0000 1.7 @@ -204,28 +204,38 @@ /// void skip_actions(size_t offset); - /// \brief - /// Delete named variable, seeking for - /// it in the with stack if any + /// Delete named variable, seeking for it in the with stack if any // + /// @param name + /// Name of the variable. Supports slash and dot syntax. + /// Name is converted to lowercase if SWF version is < 7. + /// bool delVariable(const std::string& name); - /// \brief - /// Set a named variable, seeking for - /// it in the with stack if any + /// Set a named variable, seeking for it in the with stack if any. // + /// @param name + /// Name of the variable. Supports slash and dot syntax. + /// Name is converted to lowercase if SWF version is < 7. + /// void setVariable(const std::string& name, const as_value& val); /// \brief /// If in a function context set a local variable, /// otherwise, set a normal variable. // + /// @param name + /// Name of the variable. Supports slash and dot syntax. + /// Name is converted to lowercase if SWF version is < 7. + /// void setLocalVariable(const std::string& name, const as_value& val); - /// \brief - /// Get a named variable, seeking for - /// it in the with stack if any + /// Get a named variable, seeking for it in the with stack if any. // + /// @param name + /// Name of the variable. Supports slash and dot syntax. + /// Name is converted to lowercase if SWF version is < 7. + /// as_value getVariable(const std::string& name); /// Execute. Index: testsuite/actionscript.all/getvariable.as =================================================================== RCS file: /sources/gnash/gnash/testsuite/actionscript.all/getvariable.as,v retrieving revision 1.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- testsuite/actionscript.all/getvariable.as 14 Jan 2007 17:39:06 -0000 1.4 +++ testsuite/actionscript.all/getvariable.as 15 Jan 2007 00:06:59 -0000 1.5 @@ -19,15 +19,18 @@ // compile this test case with Ming makeswf, and then // execute it like this gnash -1 -r 0 -v out.swf -rcsid="$Id: getvariable.as,v 1.4 2007/01/14 17:39:06 strk Exp $"; +rcsid="$Id: getvariable.as,v 1.5 2007/01/15 00:06:59 strk Exp $"; #include "check.as" // see check.as #ifdef MING_SUPPORTS_ASM +_global.globalvar = "gv1"; +_global.globalobj = { m1: 1 }; + //--------------------------------------------------------------------- -// Check 'var' access +// Check access to root variable (simplest case) //--------------------------------------------------------------------- var variable_in_root = 5; @@ -40,18 +43,89 @@ check_equals(checkpoint, 5); //--------------------------------------------------------------------- -// Check '../:var' access -// (expected to fail) +// Check access to root variable trough '_root.varname' //--------------------------------------------------------------------- -var variable_in_root = 5; +var variable_in_root = 5.1; +asm { + push 'checkpoint' + push '_root.variable_in_root' + getvariable + setvariable +}; +check_equals(checkpoint, 5.1); + +//--------------------------------------------------------------------- +// Check access to root variable trough '_level0.varname' +//--------------------------------------------------------------------- + +var variable_in_root = 5.2; +asm { + push 'checkpoint' + push '_level0.variable_in_root' + getvariable + setvariable +}; +check_equals(checkpoint, 5.2); + +//--------------------------------------------------------------------- +// Check access to root variable trough 'this.varname' +//--------------------------------------------------------------------- + +var variable_in_root = 5.3; +asm { + push 'checkpoint' + push 'this.variable_in_root' + getvariable + setvariable +}; +check_equals(checkpoint, 5.3); + +//--------------------------------------------------------------------- +// Check access to root variable trough 'this._root._level0.varname' +// (insane) +//--------------------------------------------------------------------- + +var variable_in_root = 5.4; +asm { + push 'checkpoint' + push 'this._root._level0.variable_in_root' + getvariable + setvariable +}; +check_equals(checkpoint, 5.4); + +//--------------------------------------------------------------------- +// Check access to root variable trough 'THIS.varname' +//--------------------------------------------------------------------- + +var variable_in_root = 5.5; +asm { + push 'checkpoint' + push 'THIS.variable_in_root' + getvariable + setvariable +}; +#if OUTPUT_VERSION > 6 +check_equals(checkpoint, undefined); +#else +check_equals(checkpoint, 5.5); +#endif + + +//--------------------------------------------------------------------- +// Check '../:variable_in_root' access +// (expected to fail, but I'm not sure why) +//--------------------------------------------------------------------- + +var variable_in_root = 6; asm { push 'checkpoint' push '../:variable_in_root' getvariable setvariable }; -xcheck_equals(checkpoint, undefined); +check_equals(checkpoint, undefined); //--------------------------------------------------------------------- // Check '../invalidname' access @@ -67,7 +141,23 @@ getvariable setvariable }; -xcheck_equals(checkpoint, undefined); +check_equals(checkpoint, undefined); + +//--------------------------------------------------------------------- +// Check '/invalidname2' access +// (expected to fail) +//--------------------------------------------------------------------- + +asm { + push '/invalidname2' + push '18' + setvariable + push 'checkpoint' + push '/invalidname' + getvariable + setvariable +}; +check_equals(checkpoint, undefined); //--------------------------------------------------------------------- // Check 'obj.member' access @@ -80,7 +170,36 @@ getvariable setvariable }; -xcheck_equals(objmemb, 3); +check_equals(objmemb, 3); + +//--------------------------------------------------------------------- +// Check 'obj._root.variable_in_root' access +// (expect to fail) +//--------------------------------------------------------------------- + +var variable_in_root = 10.0; +var o = { memb:4 }; +asm { + push 'checkpoint' + push 'o._root.variable_in_root' + getvariable + setvariable +}; +check_equals(checkpoint, undefined); + +//--------------------------------------------------------------------- +// Check 'obj.this.memb' access +// (expect to fail) +//--------------------------------------------------------------------- + +var o = { memb:10.1 }; +asm { + push 'checkpoint' + push 'o.this.memb' + getvariable + setvariable +}; +check_equals(checkpoint, undefined); //--------------------------------------------------------------------- // Check 'obj1.obj2.member' access @@ -94,7 +213,39 @@ getvariable setvariable }; -xcheck_equals(checkpoint, 4); +check_equals(checkpoint, 4); + +//--------------------------------------------------------------------- +// Check 'obj1.globalvar' +// (expect to fail) +//--------------------------------------------------------------------- + +var o3 = { memb:4 }; +asm { + push 'checkpoint' + push 'o3.globalvar' + getvariable + setvariable +}; +check_equals(checkpoint, undefined); + +//--------------------------------------------------------------------- +// Check 'globalobj.m1' +//--------------------------------------------------------------------- + +var o3 = { memb:4 }; +asm { + push 'checkpoint' + push 'globalobj.m1' + getvariable + setvariable +}; +#if OUTPUT_VERSION > 5 +check_equals(checkpoint, 1); +#else // OUTPUT_VERSION < 6 +// _global was added in SWF6 ! +xcheck_equals(checkpoint, undefined); +#endif //----------------------------------------------------------------------- // Check 'obj/:member' access @@ -107,7 +258,7 @@ getvariable setvariable }; -xcheck_equals(objmemb, 3); +check_equals(objmemb, 3); //----------------------------------------------------------------------- // Check 'invalid/name' access From MAILER-DAEMON Mon Jan 15 09:16:16 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H6SdE-0007QF-6P for mharc-gnash-commit@gnu.org; Mon, 15 Jan 2007 09:16:16 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H6SdC-0007MB-Je for gnash-commit@gnu.org; Mon, 15 Jan 2007 09:16:14 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H6Sd9-0007D6-CV for gnash-commit@gnu.org; Mon, 15 Jan 2007 09:16:13 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H6Sd9-0007CI-7A for gnash-commit@gnu.org; Mon, 15 Jan 2007 09:16:11 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H6Sd8-0005HE-JK for gnash-commit@gnu.org; Mon, 15 Jan 2007 09:16:11 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H6Sd5-0001mz-8F for gnash-commit@gnu.org; Mon, 15 Jan 2007 14:16:07 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H6Sd4-0001mw-V1 for gnash-commit@gnu.org; Mon, 15 Jan 2007 14:16:07 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Mon, 15 Jan 2007 14:16:06 +0000 Subject: [Gnash-commit] gnash ChangeLog server/as_environment.cpp serve... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jan 2007 14:16:14 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/15 14:16:06 Modified files: . : ChangeLog server : as_environment.cpp as_environment.h server/vm : ASHandlers.cpp ASHandlers.h ActionExec.cpp ActionExec.h testsuite/actionscript.all: Makefile.am Added files: testsuite/actionscript.all: swap.as Log message: 2007-01-15 Sandro Santilli * server/as_environment.{cpp,h}: added padStack method to help stack underrun fixes. * server/vm/: ASHandlers.{cpp,h}, ActionExec.{cpp,h}: Moved stack underrun handling from ASHandlers to ActionExec, taking "stack frame" in consideration. The fix for stack underron will now insert undefined variables in *front* of the stack frame, not at the end. The effect is that *final* arguments of tags are undefined, not *initial*. * testsuite/actionscript.all/Makefile.am: Enabled build of swap.as testcase. Contribution by Zou Lunkai: * testsuite/actionscript.all/swap.as: new test for stack underrun handling. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2106&r2=1.2107 http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_environment.cpp?cvsroot=gnash&r1=1.53&r2=1.54 http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_environment.h?cvsroot=gnash&r1=1.38&r2=1.39 http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/ASHandlers.cpp?cvsroot=gnash&r1=1.28&r2=1.29 http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/ASHandlers.h?cvsroot=gnash&r1=1.4&r2=1.5 http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/ActionExec.cpp?cvsroot=gnash&r1=1.11&r2=1.12 http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/ActionExec.h?cvsroot=gnash&r1=1.7&r2=1.8 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Makefile.am?cvsroot=gnash&r1=1.62&r2=1.63 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/swap.as?cvsroot=gnash&rev=1.1 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2106 retrieving revision 1.2107 diff -u -b -r1.2106 -r1.2107 --- ChangeLog 15 Jan 2007 00:06:58 -0000 1.2106 +++ ChangeLog 15 Jan 2007 14:16:06 -0000 1.2107 @@ -1,3 +1,22 @@ +2007-01-15 Sandro Santilli + + * server/as_environment.{cpp,h}: added padStack + method to help stack underrun fixes. + * server/vm/: ASHandlers.{cpp,h}, ActionExec.{cpp,h}: + Moved stack underrun handling from ASHandlers to + ActionExec, taking "stack frame" in consideration. + The fix for stack underron will now insert undefined + variables in *front* of the stack frame, not at the + end. The effect is that *final* arguments of tags are + undefined, not *initial*. + * testsuite/actionscript.all/Makefile.am: + Enabled build of swap.as testcase. + +2007-01-15 Zou Lunkai + + * testsuite/actionscript.all/swap.as: new test for + stack underrun handling. + 2007-01-14 Sandro Santilli * server/vm/ActionExec.{cpp,h} (getVariable, setVariable, Index: server/as_environment.cpp =================================================================== RCS file: /sources/gnash/gnash/server/as_environment.cpp,v retrieving revision 1.53 retrieving revision 1.54 diff -u -b -r1.53 -r1.54 --- server/as_environment.cpp 15 Jan 2007 00:06:59 -0000 1.53 +++ server/as_environment.cpp 15 Jan 2007 14:16:06 -0000 1.54 @@ -16,7 +16,7 @@ // -/* $Id: as_environment.cpp,v 1.53 2007/01/15 00:06:59 strk Exp $ */ +/* $Id: as_environment.cpp,v 1.54 2007/01/15 14:16:06 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -916,8 +916,16 @@ return endLocal(); } +void +as_environment::padStack(size_t offset, size_t count) +{ + assert( offset <= m_stack.size() ); + m_stack.insert(m_stack.begin()+offset, count, as_value()); } +} // end of gnash namespace + + // Local Variables: // mode: C++ Index: server/as_environment.h =================================================================== RCS file: /sources/gnash/gnash/server/as_environment.h,v retrieving revision 1.38 retrieving revision 1.39 diff -u -b -r1.38 -r1.39 --- server/as_environment.h 15 Jan 2007 00:06:59 -0000 1.38 +++ server/as_environment.h 15 Jan 2007 14:16:06 -0000 1.39 @@ -18,7 +18,7 @@ // // -/* $Id: as_environment.h,v 1.38 2007/01/15 00:06:59 strk Exp $ */ +/* $Id: as_environment.h,v 1.39 2007/01/15 14:16:06 strk Exp $ */ #ifndef GNASH_AS_ENVIRONMENT_H #define GNASH_AS_ENVIRONMENT_H @@ -80,7 +80,8 @@ character* get_target() { return m_target; } void set_target(character* target) { m_target = target; } - // stack access/manipulation + /// @{ Stack access/manipulation + // @@ TODO do more checking on these template // stack access/manipulation @@ -124,6 +125,13 @@ m_stack.resize(m_stack.size() - count); } + /// Insert 'count' undefined values before 'offset'. + // + /// An offset of 0 will prepend the values, + /// An offset of size() [too far] will append the values. + /// + void padStack(size_t offset, size_t count); + /// Returns index of top stack element // FIXME: what if stack is empty ?? // I'd obsolete this and convert calling code to use @@ -132,6 +140,9 @@ size_t stack_size() const { return m_stack.size(); } + /// @} stack access/manipulation + /// + /// \brief /// Return the (possibly UNDEFINED) value of the named variable // Index: server/vm/ASHandlers.cpp =================================================================== RCS file: /sources/gnash/gnash/server/vm/ASHandlers.cpp,v retrieving revision 1.28 retrieving revision 1.29 diff -u -b -r1.28 -r1.29 --- server/vm/ASHandlers.cpp 15 Jan 2007 00:06:59 -0000 1.28 +++ server/vm/ASHandlers.cpp 15 Jan 2007 14:16:06 -0000 1.29 @@ -16,7 +16,7 @@ // -/* $Id: ASHandlers.cpp,v 1.28 2007/01/15 00:06:59 strk Exp $ */ +/* $Id: ASHandlers.cpp,v 1.29 2007/01/15 14:16:06 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -765,7 +765,7 @@ { // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 2); + thread.ensureStack(2); env.top(1) += env.top(0); env.drop(1); } @@ -775,7 +775,7 @@ { // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 2); + thread.ensureStack(2); env.top(1) -= env.top(0); env.drop(1); } @@ -785,7 +785,7 @@ { // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 2); + thread.ensureStack(2); env.top(1) *= env.top(0); env.drop(1); } @@ -795,7 +795,7 @@ { // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 2); + thread.ensureStack(2); env.top(1) /= env.top(0); env.drop(1); } @@ -808,7 +808,7 @@ assert(thread.code[thread.pc] == SWF::ACTION_EQUAL); // 0x0E - ensure_stack(env, 2); + thread.ensureStack(2); as_value& op1 = env.top(0); as_value& op2 = env.top(1); @@ -828,7 +828,7 @@ { // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 2); + thread.ensureStack(2); env.top(1).set_bool(env.top(1) < env.top(0)); env.drop(1); } @@ -838,7 +838,7 @@ { // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 2); + thread.ensureStack(2); env.top(1).set_bool(env.top(1).to_bool() && env.top(0).to_bool()); env.drop(1); } @@ -848,7 +848,7 @@ { // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 2); + thread.ensureStack(2); env.top(1).set_bool(env.top(1).to_bool() || env.top(0).to_bool()); env.drop(1); } @@ -858,7 +858,7 @@ { // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 1); + thread.ensureStack(1); env.top(0).set_bool(! env.top(0).to_bool()); } @@ -867,7 +867,7 @@ { // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 2); + thread.ensureStack(2); env.top(1).set_bool(env.top(1).to_tu_string() == env.top(0).to_tu_string()); env.drop(1); } @@ -877,7 +877,7 @@ { // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 1); + thread.ensureStack(1); int version = env.get_version(); env.top(0).set_int(env.top(0).to_tu_string_versioned(version).utf8_length()); } @@ -887,7 +887,7 @@ { // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 3); // size, base, string + thread.ensureStack(3); // size, base, string as_value& size_val = env.top(0); as_value& base_val = env.top(1); @@ -979,7 +979,7 @@ // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; // this is an overhead only if SWF is malformed. - ensure_stack(env, 1); + thread.ensureStack(1); env.drop(1); } @@ -988,7 +988,7 @@ { // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 1); + thread.ensureStack(1); env.top(0).set_int(int(floor(env.top(0).to_number()))); } @@ -998,7 +998,7 @@ // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 1); // variable name + thread.ensureStack(1); // variable name as_value& top_value = env.top(0); const char* ptr = top_value.to_string(); @@ -1035,7 +1035,7 @@ as_environment& env = thread.env; // stack must be contain at least two items - ensure_stack(env, 2); + thread.ensureStack(2); assert(env.top(1).to_string()); thread.setVariable(env.top(1).to_std_string(), env.top(0)); @@ -1055,7 +1055,7 @@ as_environment& env = thread.env; - ensure_stack(env, 1); // target name + thread.ensureStack(1); // target name //Vitaly: env.drop(1) remove object on which refers const char * target_name //strk: shouldn't we use env.pop() instead ? No (see above comment) @@ -1073,7 +1073,7 @@ // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 2); // two strings + thread.ensureStack(2); // two strings int version = env.get_version(); env.top(1).convert_to_string_versioned(version); @@ -1087,7 +1087,7 @@ // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 2); // prop num, target + thread.ensureStack(2); // prop num, target as_value& tgt_val = env.top(1); character *target = env.find_target(tgt_val); @@ -1126,7 +1126,7 @@ // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 3); // prop val, prop num, target + thread.ensureStack(3); // prop val, prop num, target character *target = env.find_target(env.top(2)); unsigned int prop_number = (unsigned int)env.top(1).to_number(); @@ -1153,7 +1153,7 @@ // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 3); + thread.ensureStack(3); sprite_instance* si = env.get_target()->to_movie(); if ( ! si ) @@ -1176,7 +1176,7 @@ // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 1); + thread.ensureStack(1); sprite_instance* tgt = env.get_target()->to_movie(); assert(tgt); @@ -1193,7 +1193,7 @@ //// GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 1); + thread.ensureStack(1); // strk: why not using pop() ? dbglogfile << env.top(0).to_string() << endl; @@ -1208,7 +1208,7 @@ assert(thread.code[thread.pc] == SWF::ACTION_STARTDRAGMOVIE); - ensure_stack(env, 3); + thread.ensureStack(3); drag_state st; @@ -1226,7 +1226,7 @@ // strk: this works if we didn't drop any before, in // a contrary case (if we used pop(), which I suggest) // we must remember to updated this as required - ensure_stack(env, 7); // original 3 + 4 for bound + thread.ensureStack(7); // original 3 + 4 for bound // It looks like coordinates of drag bounds are // given as PIXELS : @@ -1283,7 +1283,7 @@ { // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 2); + thread.ensureStack(2); env.top(1).set_bool(env.top(1).to_tu_string() < env.top(0).to_tu_string()); } @@ -1302,7 +1302,7 @@ as_environment& env = thread.env; - ensure_stack(env, 2); // super, instance + thread.ensureStack(2); // super, instance // Get the "super" function as_function* super = env.top(0).to_as_function(); @@ -1352,7 +1352,7 @@ // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 1); // max + thread.ensureStack(1); // max int max = int(env.top(0).to_number()); if (max < 1) max = 1; @@ -1372,7 +1372,7 @@ { // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 1); + thread.ensureStack(1); env.top(0).set_int(env.top(0).to_string()[0]); } @@ -1381,7 +1381,7 @@ { // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 1); + thread.ensureStack(1); char buf[2]; buf[0] = int(env.top(0).to_number()); buf[1] = 0; @@ -1438,7 +1438,7 @@ as_environment& env = thread.env; const action_buffer& code = thread.code; - ensure_stack(env, 1); // expression + thread.ensureStack(1); // expression // how many actions to skip if frame has not been loaded uint8 skip = code[thread.pc+3]; @@ -1526,7 +1526,7 @@ size_t i = pc; size_t count = 0; while (i - pc < static_cast(length)) { - int id; // for dict (constant pool) lookup + int id=0; // for dict (constant pool) lookup // declared here because also used // by verbose action output uint8_t type = code[3 + i]; @@ -1883,7 +1883,7 @@ // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 2); // target, url + thread.ensureStack(2); // target, url const action_buffer& code = thread.code; @@ -1919,7 +1919,7 @@ assert( code[pc] == SWF::ACTION_BRANCHIFTRUE ); - ensure_stack(env, 1); // bool + thread.ensureStack(1); // bool int16_t offset = code.read_int16(pc+3); @@ -1943,7 +1943,7 @@ // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 1); // frame spec + thread.ensureStack(1); // frame spec // Note: no extra data in this instruction! sprite_instance* tgt = env.get_target()->to_movie(); @@ -1959,7 +1959,7 @@ as_environment& env = thread.env; - ensure_stack(env, 1); // expression + thread.ensureStack(1); // expression const action_buffer& code = thread.code; size_t pc = thread.pc; @@ -2114,7 +2114,7 @@ assert(thread.code[thread.pc] == SWF::ACTION_DELETE2); // 0x3B - ensure_stack(env, 1); // var + thread.ensureStack(1); // var // See bug #18482, this works fine now (assuming the bug report is correct) env.top(0) = thread.delVariable(env.top(0).to_std_string()); @@ -2125,7 +2125,7 @@ { // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 2); // value, var + thread.ensureStack(2); // value, var as_value value = env.pop(); as_value varname = env.pop(); @@ -2138,7 +2138,7 @@ //GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 2); // func name, nargs + thread.ensureStack(2); // func name, nargs //cerr << "At ActionCallFunction enter:"<= 0); - ensure_stack(env, (unsigned int)array_size); // array elements + thread.ensureStack((unsigned int)array_size); // array elements //log_msg("xxx init array: size = %d, top of stack = %d", array_size, env.get_top_index());//xxxxx @@ -2310,7 +2310,7 @@ // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 1); // nmembers + thread.ensureStack(1); // nmembers // // SWFACTION_PUSH @@ -2322,7 +2322,7 @@ int nmembers = (int) env.pop().to_number(); - ensure_stack(env, nmembers); // members + thread.ensureStack(nmembers); // members boost::intrusive_ptr new_obj_ptr(init_object_instance().release()); @@ -2350,7 +2350,7 @@ // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 1); + thread.ensureStack(1); env.top(0).set_string(env.top(0).typeOf()); } @@ -2381,7 +2381,7 @@ // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 1); // var_name + thread.ensureStack(1); // var_name // Get the object as_value& var_name = env.top(0); @@ -2414,7 +2414,7 @@ // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 2); + thread.ensureStack(2); int version = env.get_version(); if (env.top(0).is_string() || env.top(1).is_string() ) @@ -2435,7 +2435,7 @@ // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 2); + thread.ensureStack(2); if ( env.top(1).is_string() ) { env.top(1).set_bool(env.top(1).to_tu_string() < env.top(0).to_tu_string()); @@ -2453,7 +2453,7 @@ assert(thread.code[thread.pc] == SWF::ACTION_NEWEQUALS); - ensure_stack(env, 2); + thread.ensureStack(2); /// ECMA-262 abstract equality comparison (sect 11.9.3) env.top(1).set_bool(env.top(1) == env.top(0)); @@ -2465,7 +2465,7 @@ { // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 1); + thread.ensureStack(1); env.top(0).convert_to_number(); } @@ -2474,7 +2474,7 @@ { // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 1); + thread.ensureStack(1); int version = env.get_version(); env.top(0).convert_to_string_versioned(version); } @@ -2484,7 +2484,7 @@ { // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 1); + thread.ensureStack(1); env.push(env.top(0)); } @@ -2493,7 +2493,7 @@ { // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 2); + thread.ensureStack(2); as_value temp = env.top(1); env.top(1) = env.top(0); env.top(0) = temp; @@ -2505,7 +2505,7 @@ // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 2); // member name, target + thread.ensureStack(2); // member name, target // Some corner case behaviors depend on the SWF file version. int version = env.get_version(); @@ -2554,7 +2554,7 @@ // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 3); // value, member, object + thread.ensureStack(3); // value, member, object as_object* obj = env.top(2).to_object(); @@ -2590,7 +2590,7 @@ // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 1); + thread.ensureStack(1); env.top(0) += 1; } @@ -2600,7 +2600,7 @@ { // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 1); + thread.ensureStack(1); env.top(0) -= 1; } @@ -2610,7 +2610,7 @@ // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 3); // method_name, obj, nargs + thread.ensureStack(3); // method_name, obj, nargs as_value result; @@ -2627,7 +2627,7 @@ // Get number of arguments int nargs = static_cast(env.top(2).to_number()); - ensure_stack(env, 3+nargs); // actual args + thread.ensureStack(3+nargs); // actual args IF_VERBOSE_ACTION ( log_action(" method name: %s", method_name.c_str()); @@ -2692,13 +2692,13 @@ assert( thread.code[thread.pc] == SWF::ACTION_NEWMETHOD ); - ensure_stack(env, 3); // method, object, nargs + thread.ensureStack(3); // method, object, nargs as_value method_name = env.pop().to_string(); as_value obj_val = env.pop(); int nargs = (int)env.pop().to_number(); - ensure_stack(env, nargs); // previous 3 entries popped + thread.ensureStack(nargs); // previous 3 entries popped as_object* obj = obj_val.to_object(); if ( ! obj ) @@ -2742,7 +2742,7 @@ // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 2); // super, instance + thread.ensureStack(2); // super, instance // Get the "super" function as_function* super = env.top(0).to_as_function(); @@ -2774,7 +2774,7 @@ as_environment& env = thread.env; - ensure_stack(env, 1); // object + thread.ensureStack(1); // object // Get the object. // Copy it so we can override env.top(0) @@ -2803,7 +2803,7 @@ { // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 2); + thread.ensureStack(2); env.top(1) &= env.top(0); env.drop(1); } @@ -2813,7 +2813,7 @@ { // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 2); + thread.ensureStack(2); env.top(1) |= env.top(0); env.drop(1); } @@ -2823,7 +2823,7 @@ { // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 2); + thread.ensureStack(2); env.top(1) ^= env.top(0); env.drop(1); } @@ -2833,7 +2833,7 @@ { // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 2); + thread.ensureStack(2); env.top(1).asr(env.top(0)); env.drop(1); } @@ -2843,7 +2843,7 @@ { // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 2); + thread.ensureStack(2); env.top(1).lsr(env.top(0)); env.drop(1); } @@ -2853,7 +2853,7 @@ { // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 2); + thread.ensureStack(2); env.top(1).lsr(env.top(0)); env.drop(1); } @@ -2863,7 +2863,7 @@ { // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 2); + thread.ensureStack(2); env.top(1).set_bool(env.top(1).strictly_equals(env.top(0))); env.drop(1); } @@ -2873,7 +2873,7 @@ { // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 2); + thread.ensureStack(2); if (env.top(1).is_string()) { env.top(1).set_bool(env.top(1).to_tu_string() > env.top(0).to_tu_string()); } else { @@ -2887,7 +2887,7 @@ { // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 2); + thread.ensureStack(2); env.top(1).set_bool(env.top(1).to_tu_string() > env.top(0).to_tu_string()); env.drop(1); } @@ -2898,7 +2898,7 @@ // GNASH_REPORT_FUNCTION; as_environment& env = thread.env; - ensure_stack(env, 2); // super, sub + thread.ensureStack(2); // super, sub as_function* super = env.top(0).to_as_function(); as_function* sub = env.top(1).to_as_function(); @@ -3052,7 +3052,7 @@ assert( code[pc] == SWF::ACTION_WITH ); - ensure_stack(env, 1); // the object + thread.ensureStack(1); // the object as_object* with_obj = env.pop().to_object(); const std::vector& with_stack = thread.getWithStack(); @@ -3173,7 +3173,7 @@ as_environment& env = thread.env; - ensure_stack(env, 1); + thread.ensureStack(1); const action_buffer& code = thread.code; @@ -3223,24 +3223,6 @@ } } -/*static private*/ -void -SWFHandlers::fix_stack_underrun(as_environment& env, size_t required) -{ - assert ( env.stack_size() < required ); - - size_t missing = required-env.stack_size(); - - log_error("Stack underrun: " SIZET_FMT " elements required, " SIZET_FMT - " available. Fixing by pushing " SIZET_FMT " undefined values on the" - " missing slots.", required, env.stack_size(), missing); - - for (size_t i=0; i #include #include "action.h" // we should get rid of this probably -#include "as_environment.h" // for ensure_stack inline (must be inlined!) #include "swf.h" @@ -125,23 +124,6 @@ static container_type & get_handlers(); static std::vector & get_property_names(); - // Ensure the stack has at least 'required' elements, fixing - // it if required. - // This is an inline to it can eventually be made a no-op - // when gnash works and input SWFs are known to be valid. - static void ensure_stack(as_environment& env, size_t required) - { - if ( env.stack_size() < required ) - { - fix_stack_underrun(env, required); - } - } - - // Fill all the slots to reach the 'required' stack size - // with undefined values. This method should *only* be - // called by ensure_stack() above. - static void fix_stack_underrun(as_environment& env, size_t required); - /// Common code for ActionGetUrl and ActionGetUrl2 // /// @see http://sswf.sourceforge.net/SWFalexref.html#action_get_url2 Index: server/vm/ActionExec.cpp =================================================================== RCS file: /sources/gnash/gnash/server/vm/ActionExec.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -u -b -r1.11 -r1.12 --- server/vm/ActionExec.cpp 15 Jan 2007 00:06:59 -0000 1.11 +++ server/vm/ActionExec.cpp 15 Jan 2007 14:16:06 -0000 1.12 @@ -16,7 +16,7 @@ // -/* $Id: ActionExec.cpp,v 1.11 2007/01/15 00:06:59 strk Exp $ */ +/* $Id: ActionExec.cpp,v 1.12 2007/01/15 14:16:06 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -122,7 +122,7 @@ character* original_target = env.get_target(); - size_t original_stack_size = env.stack_size(); + _initial_stack_size = env.stack_size(); #if DEBUG_STACK IF_VERBOSE_ACTION ( @@ -198,24 +198,24 @@ env.set_target(original_target); // check if the stack was smashed - if ( original_stack_size > env.stack_size() ) + if ( _initial_stack_size > env.stack_size() ) { log_warning("Stack smashed (ActionScript compiler bug?)." "Fixing by pushing undefined values to the missing slots, " " but don't expect things to work afterwards."); - size_t missing = original_stack_size - env.stack_size(); + size_t missing = _initial_stack_size - env.stack_size(); for (size_t i=0; i // Forward declarations namespace gnash { class action_buffer; - class as_environment; class as_value; class swf_function; } @@ -40,6 +40,8 @@ /// Executor of an action_buffer class ActionExec { +private: + /// the 'with' stack associated with this execution thread std::vector with_stack; @@ -72,8 +74,41 @@ /// const swf_function* _func; + size_t _initial_stack_size; + + /// Warn about a stack underrun and fix it + // + /// The fix is padding the stack with undefined + /// values for the missing slots. + /// + /// @param required + /// Number of items required. + /// + void ActionExec::fixStackUnderrun(size_t required); + public: + /// \brief + /// Ensure the current stack frame has at least 'required' elements, + /// fixing it if required. + // + /// Underruns are fixed by inserting elements at the start of + /// stack frame, so that undefined function arguments are the + /// *last* ones in the list. + /// + void ensureStack(size_t required) + { + // The stack_size() < _initial_stack_size case should + // be handled this by stack smashing checks + assert( env.stack_size() >= _initial_stack_size ); + + size_t slots_left = env.stack_size() - _initial_stack_size; + if ( slots_left < required ) + { + fixStackUnderrun(required); + } + } + /// The actual action buffer // /// TODO: provide a getter and make private Index: testsuite/actionscript.all/Makefile.am =================================================================== RCS file: /sources/gnash/gnash/testsuite/actionscript.all/Makefile.am,v retrieving revision 1.62 retrieving revision 1.63 diff -u -b -r1.62 -r1.63 --- testsuite/actionscript.all/Makefile.am 13 Jan 2007 23:35:56 -0000 1.62 +++ testsuite/actionscript.all/Makefile.am 15 Jan 2007 14:16:06 -0000 1.63 @@ -16,7 +16,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# $Id: Makefile.am,v 1.62 2007/01/13 23:35:56 strk Exp $ +# $Id: Makefile.am,v 1.63 2007/01/15 14:16:06 strk Exp $ AUTOMAKE_OPTIONS = dejagnu @@ -71,6 +71,7 @@ array.as \ delete.as \ getvariable.as \ + swap.as \ Boolean.as \ Camera.as \ Color.as \ Index: testsuite/actionscript.all/swap.as =================================================================== RCS file: testsuite/actionscript.all/swap.as diff -N testsuite/actionscript.all/swap.as --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ testsuite/actionscript.all/swap.as 15 Jan 2007 14:16:06 -0000 1.1 @@ -0,0 +1,45 @@ +// +// Copyright (C) 2005, 2006 Free Software Foundation, Inc. +// +// This program is free software; you can redistribute it and/or modchecky +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; check not, write to the Free Software +// Foundation, Inc., 51 Franklin St, Fcheckth Floor, Boston, MA 02110-1301 USA +// + +/* + * Zou Lunkai, zoulunkai@gmail.com + * Test stack status after action "Swap" + */ + +rcsid="$Id: swap.as,v 1.1 2007/01/15 14:16:06 strk Exp $"; + +#include "check.as" + +// see check.as +#ifdef MING_SUPPORTS_ASM + +var var_x = "init_x"; + +//stack: +asm +{ + push "var_x" //stack: "var_x" + swap //stack: "var_x" undefined + pop //stack: "var_x" + push "hello" //stack: "var_x" "hello" + setvariable //stack: +}; +check_equals(var_x, "hello"); + +#endif + From MAILER-DAEMON Mon Jan 15 09:19:22 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H6SgE-00023b-Jn for mharc-gnash-commit@gnu.org; Mon, 15 Jan 2007 09:19:22 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H6SgC-00021M-3I for gnash-commit@gnu.org; Mon, 15 Jan 2007 09:19:20 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H6SgB-0001zq-2p for gnash-commit@gnu.org; Mon, 15 Jan 2007 09:19:19 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H6SgA-0001zn-VH for gnash-commit@gnu.org; Mon, 15 Jan 2007 09:19:18 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H6SgA-0005f0-Pb for gnash-commit@gnu.org; Mon, 15 Jan 2007 09:19:18 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H6SgA-0001sK-EX for gnash-commit@gnu.org; Mon, 15 Jan 2007 14:19:18 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H6SgA-0001sH-8W for gnash-commit@gnu.org; Mon, 15 Jan 2007 14:19:18 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Mon, 15 Jan 2007 14:19:18 +0000 Subject: [Gnash-commit] gnash ChangeLog testsuite/server/Makefile.am X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jan 2007 14:19:20 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/15 14:19:18 Modified files: . : ChangeLog testsuite/server: Makefile.am Log message: * testsuite/server/Makefile.am: explicitly link to libgnashvm. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2107&r2=1.2108 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/server/Makefile.am?cvsroot=gnash&r1=1.20&r2=1.21 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2107 retrieving revision 1.2108 diff -u -b -r1.2107 -r1.2108 --- ChangeLog 15 Jan 2007 14:16:06 -0000 1.2107 +++ ChangeLog 15 Jan 2007 14:19:17 -0000 1.2108 @@ -1,5 +1,9 @@ 2007-01-15 Sandro Santilli + * testsuite/server/Makefile.am: explicitly link to libgnashvm. + +2007-01-15 Sandro Santilli + * server/as_environment.{cpp,h}: added padStack method to help stack underrun fixes. * server/vm/: ASHandlers.{cpp,h}, ActionExec.{cpp,h}: Index: testsuite/server/Makefile.am =================================================================== RCS file: /sources/gnash/gnash/testsuite/server/Makefile.am,v retrieving revision 1.20 retrieving revision 1.21 diff -u -b -r1.20 -r1.21 --- testsuite/server/Makefile.am 18 Dec 2006 09:31:25 -0000 1.20 +++ testsuite/server/Makefile.am 15 Jan 2007 14:19:18 -0000 1.21 @@ -50,6 +50,7 @@ MatrixTest_SOURCES = MatrixTest.cpp MatrixTest_LDADD = \ $(top_builddir)/server/libgnashserver.la \ + $(top_builddir)/server/vm/libgnashvm.la \ $(top_builddir)/libbase/libgnashbase.la \ $(NULL) @@ -70,6 +71,7 @@ as_prop_flagsTest_SOURCES = as_prop_flagsTest.cpp as_prop_flagsTest_LDADD = \ $(top_builddir)/server/libgnashserver.la \ + $(top_builddir)/server/vm/libgnashvm.la \ $(top_builddir)/libbase/libgnashbase.la \ $(NULL) From MAILER-DAEMON Mon Jan 15 09:46:30 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H6T6T-0004cV-Qx for mharc-gnash-commit@gnu.org; Mon, 15 Jan 2007 09:46:29 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H6T6R-0004Yz-L0 for gnash-commit@gnu.org; Mon, 15 Jan 2007 09:46:27 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H6T6Q-0004Wz-Ec for gnash-commit@gnu.org; Mon, 15 Jan 2007 09:46:26 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H6T6Q-0004Wt-7L for gnash-commit@gnu.org; Mon, 15 Jan 2007 09:46:26 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H6T6P-00034p-Q5 for gnash-commit@gnu.org; Mon, 15 Jan 2007 09:46:25 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H6T6O-0003p1-O6 for gnash-commit@gnu.org; Mon, 15 Jan 2007 14:46:24 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H6T6O-0003oy-Kb for gnash-commit@gnu.org; Mon, 15 Jan 2007 14:46:24 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Mon, 15 Jan 2007 14:46:24 +0000 Subject: [Gnash-commit] gnash ChangeLog server/vm/ASHandlers.cpp X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jan 2007 14:46:28 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/15 14:46:24 Modified files: . : ChangeLog server/vm : ASHandlers.cpp Log message: Patch by Zou Lunkai : * server/vm/ASHandlers.cpp (ActionDefineFunction, ActionDefineFunction2): don't push named function literals on the stack (do it only for anonymous functions). See patch #5685. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2108&r2=1.2109 http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/ASHandlers.cpp?cvsroot=gnash&r1=1.29&r2=1.30 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2108 retrieving revision 1.2109 diff -u -b -r1.2108 -r1.2109 --- ChangeLog 15 Jan 2007 14:19:17 -0000 1.2108 +++ ChangeLog 15 Jan 2007 14:46:24 -0000 1.2109 @@ -1,3 +1,10 @@ +2007-01-15 Zou Lunkai + + * server/vm/ASHandlers.cpp (ActionDefineFunction, + ActionDefineFunction2): don't push named function literals + on the stack (do it only for anonymous functions). + See patch #5685. + 2007-01-15 Sandro Santilli * testsuite/server/Makefile.am: explicitly link to libgnashvm. Index: server/vm/ASHandlers.cpp =================================================================== RCS file: /sources/gnash/gnash/server/vm/ASHandlers.cpp,v retrieving revision 1.29 retrieving revision 1.30 diff -u -b -r1.29 -r1.30 --- server/vm/ASHandlers.cpp 15 Jan 2007 14:16:06 -0000 1.29 +++ server/vm/ASHandlers.cpp 15 Jan 2007 14:46:24 -0000 1.30 @@ -16,7 +16,7 @@ // -/* $Id: ASHandlers.cpp,v 1.29 2007/01/15 14:16:06 strk Exp $ */ +/* $Id: ASHandlers.cpp,v 1.30 2007/01/15 14:46:24 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -3003,7 +3003,7 @@ if ( thread.next_pc+code_size > actionbuf_size ) { IF_VERBOSE_MALFORMED_SWF( - log_warning("Malformed SWF: function2 code len (%u) " + log_swferror("function2 code len (%u) " "overflows DOACTION tag boundaries " "(DOACTION tag len=%u, " "function2 code offset=%u). " @@ -3029,8 +3029,11 @@ thread.setVariable(name, function_value); } - // Also leave it on the stack. + // Otherwise push the function literal on the stack + else + { env.push_val(function_value); + } } void @@ -3159,8 +3162,11 @@ thread.setVariable(name, function_value); } - // Also leave it on the stack. + // Otherwise push the function literal on the stack + else + { env.push_val(function_value); + } //cerr << "After ActionDefineFunction:"< From: Sandro Santilli Date: Mon, 15 Jan 2007 16:08:02 +0000 Subject: [Gnash-commit] gnash/server/vm ActionExec.cpp X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jan 2007 16:08:04 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/15 16:08:02 Modified files: server/vm : ActionExec.cpp Log message: Minor rewording of debugging output CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/ActionExec.cpp?cvsroot=gnash&r1=1.12&r2=1.13 Patches: Index: ActionExec.cpp =================================================================== RCS file: /sources/gnash/gnash/server/vm/ActionExec.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -u -b -r1.12 -r1.13 --- ActionExec.cpp 15 Jan 2007 14:16:06 -0000 1.12 +++ ActionExec.cpp 15 Jan 2007 16:08:02 -0000 1.13 @@ -16,7 +16,7 @@ // -/* $Id: ActionExec.cpp,v 1.12 2007/01/15 14:16:06 strk Exp $ */ +/* $Id: ActionExec.cpp,v 1.13 2007/01/15 16:08:02 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -364,7 +364,7 @@ //IF_VERBOSE_ASCODING_ERRORS( log_warning("Stack underrun: " SIZET_FMT " elements required, " SIZET_FMT "/" SIZET_FMT " available. " - "Fixing by pushing " SIZET_FMT " undefined values on the" + "Fixing by inserting " SIZET_FMT " undefined values on the" " missing slots.", required, _initial_stack_size, env.stack_size(), missing); From MAILER-DAEMON Mon Jan 15 11:36:56 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H6UpM-0000Qo-8d for mharc-gnash-commit@gnu.org; Mon, 15 Jan 2007 11:36:56 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H6UpL-0000Qj-44 for gnash-commit@gnu.org; Mon, 15 Jan 2007 11:36:55 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H6UpK-0000QJ-6l for gnash-commit@gnu.org; Mon, 15 Jan 2007 11:36:54 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H6UpJ-0000QD-Us for gnash-commit@gnu.org; Mon, 15 Jan 2007 11:36:54 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H6UpH-0005Gh-Bt for gnash-commit@gnu.org; Mon, 15 Jan 2007 11:36:51 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H6UpG-0001JI-2I for gnash-commit@gnu.org; Mon, 15 Jan 2007 16:36:50 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H6UpF-0001JD-QY for gnash-commit@gnu.org; Mon, 15 Jan 2007 16:36:49 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Mon, 15 Jan 2007 16:36:49 +0000 Subject: [Gnash-commit] gnash ChangeLog testsuite/actionscript.all/Text... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jan 2007 16:36:55 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/15 16:36:49 Modified files: . : ChangeLog testsuite/actionscript.all: TextSnapshot.as Log message: * testsuite/actionscript.all/TextSnapshot.as: fixed checks taking SWF version into account. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2109&r2=1.2110 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/TextSnapshot.as?cvsroot=gnash&r1=1.6&r2=1.7 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2109 retrieving revision 1.2110 diff -u -b -r1.2109 -r1.2110 --- ChangeLog 15 Jan 2007 14:46:24 -0000 1.2109 +++ ChangeLog 15 Jan 2007 16:36:49 -0000 1.2110 @@ -1,3 +1,8 @@ +2007-01-15 Sandro Santilli + + * testsuite/actionscript.all/TextSnapshot.as: + fixed checks taking SWF version into account. + 2007-01-15 Zou Lunkai * server/vm/ASHandlers.cpp (ActionDefineFunction, Index: testsuite/actionscript.all/TextSnapshot.as =================================================================== RCS file: /sources/gnash/gnash/testsuite/actionscript.all/TextSnapshot.as,v retrieving revision 1.6 retrieving revision 1.7 diff -u -b -r1.6 -r1.7 --- testsuite/actionscript.all/TextSnapshot.as 5 Nov 2006 00:45:27 -0000 1.6 +++ testsuite/actionscript.all/TextSnapshot.as 15 Jan 2007 16:36:49 -0000 1.7 @@ -20,28 +20,41 @@ // compile this test case with Ming makeswf, and then // execute it like this gnash -1 -r 0 -v out.swf -rcsid="$Id: TextSnapshot.as,v 1.6 2006/11/05 00:45:27 rsavoye Exp $"; +rcsid="$Id: TextSnapshot.as,v 1.7 2007/01/15 16:36:49 strk Exp $"; #include "check.as" +#if OUTPUT_VERSION > 5 + +check_equals ( typeof(TextSnapshot), 'function' ); + var textsnapshotObj = new TextSnapshot; // test the TextSnapshot constuctor -check (textsnapshotObj != undefined); +check_equals ( typeof(textsnapshotObj), 'object' ); // test the TextSnapshot::findtext method -check (textsnapshotObj.findtext != undefined); +check_equals (typeof(textsnapshotObj.findText), 'function'); + // test the TextSnapshot::getcount method -check (textsnapshotObj.getcount != undefined); +check_equals (typeof(textsnapshotObj.getCount), 'function'); + // test the TextSnapshot::getselected method -check (textsnapshotObj.getselected != undefined); +check_equals (typeof(textsnapshotObj.getSelected), 'function'); + // test the TextSnapshot::getselectedtext method -check (textsnapshotObj.getselectedtext != undefined); +check_equals (typeof(textsnapshotObj.getSelectedText), 'function'); + // test the TextSnapshot::gettext method -check (textsnapshotObj.gettext != undefined); +check_equals (typeof(textsnapshotObj.getText), 'function'); + // test the TextSnapshot::hittesttextnearpos method -check (textsnapshotObj.hittesttextnearpos != undefined); +check_equals (typeof(textsnapshotObj.hitTestTextNearPos), 'function'); + // test the TextSnapshot::setselectcolor method -check (textsnapshotObj.setselectcolor != undefined); +check_equals (typeof(textsnapshotObj.setSelectColor), 'function'); + // test the TextSnapshot::setselected method -check (textsnapshotObj.setselected != undefined); +check_equals (typeof(textsnapshotObj.setSelected), 'function'); + +#endif // OUTPUT_VERSION > 5 From MAILER-DAEMON Mon Jan 15 12:00:19 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H6VBz-0005qM-Kk for mharc-gnash-commit@gnu.org; Mon, 15 Jan 2007 12:00:19 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H6VBx-0005oy-Fo for gnash-commit@gnu.org; Mon, 15 Jan 2007 12:00:17 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H6VBw-0005oQ-Gz for gnash-commit@gnu.org; Mon, 15 Jan 2007 12:00:16 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H6VBw-0005oH-8w for gnash-commit@gnu.org; Mon, 15 Jan 2007 12:00:16 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H6VBv-0002fo-Tf for gnash-commit@gnu.org; Mon, 15 Jan 2007 12:00:16 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H6VBu-0001p2-TD for gnash-commit@gnu.org; Mon, 15 Jan 2007 17:00:14 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H6VBu-0001oz-LG for gnash-commit@gnu.org; Mon, 15 Jan 2007 17:00:14 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Mon, 15 Jan 2007 17:00:14 +0000 Subject: [Gnash-commit] gnash ChangeLog server/asobj/TextSnapshot.cpp X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jan 2007 17:00:18 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/15 17:00:14 Modified files: . : ChangeLog server/asobj : TextSnapshot.cpp Log message: * server/asobj/TextSnapshot.cpp: fixed methods casing. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2110&r2=1.2111 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/TextSnapshot.cpp?cvsroot=gnash&r1=1.3&r2=1.4 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2110 retrieving revision 1.2111 diff -u -b -r1.2110 -r1.2111 --- ChangeLog 15 Jan 2007 16:36:49 -0000 1.2110 +++ ChangeLog 15 Jan 2007 17:00:14 -0000 1.2111 @@ -1,5 +1,7 @@ 2007-01-15 Sandro Santilli + * server/asobj/TextSnapshot.cpp: fixed methods + casing. * testsuite/actionscript.all/TextSnapshot.as: fixed checks taking SWF version into account. Index: server/asobj/TextSnapshot.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/TextSnapshot.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -b -r1.3 -r1.4 --- server/asobj/TextSnapshot.cpp 20 Nov 2006 21:44:24 -0000 1.3 +++ server/asobj/TextSnapshot.cpp 15 Jan 2007 17:00:14 -0000 1.4 @@ -42,14 +42,14 @@ static void attachTextSnapshotInterface(as_object& o) { - o.set_member("findtext", &textsnapshot_findtext); - o.set_member("getcount", &textsnapshot_getcount); - o.set_member("getselected", &textsnapshot_getselected); - o.set_member("getselectedtext", &textsnapshot_getselectedtext); - o.set_member("gettext", &textsnapshot_gettext); - o.set_member("hittesttextnearpos", &textsnapshot_hittesttextnearpos); - o.set_member("setselectcolor", &textsnapshot_setselectcolor); - o.set_member("setselected", &textsnapshot_setselected); + o.set_member("findText", &textsnapshot_findtext); + o.set_member("getCount", &textsnapshot_getcount); + o.set_member("getSelected", &textsnapshot_getselected); + o.set_member("getSelectedText", &textsnapshot_getselectedtext); + o.set_member("getText", &textsnapshot_gettext); + o.set_member("hitTestTextNearPos", &textsnapshot_hittesttextnearpos); + o.set_member("setSelectColor", &textsnapshot_setselectcolor); + o.set_member("setSelected", &textsnapshot_setselected); } static as_object* From MAILER-DAEMON Mon Jan 15 13:07:45 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H6WFF-0003Jv-Jy for mharc-gnash-commit@gnu.org; Mon, 15 Jan 2007 13:07:45 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H6WFE-0003JD-Jp for gnash-commit@gnu.org; Mon, 15 Jan 2007 13:07:44 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H6WFC-0003IB-Us for gnash-commit@gnu.org; Mon, 15 Jan 2007 13:07:44 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H6WFC-0003I5-MM for gnash-commit@gnu.org; Mon, 15 Jan 2007 13:07:42 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H6WFC-00034s-E8 for gnash-commit@gnu.org; Mon, 15 Jan 2007 13:07:42 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H6WF9-0004Vw-Om for gnash-commit@gnu.org; Mon, 15 Jan 2007 18:07:39 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H6WF9-0004Vt-IX for gnash-commit@gnu.org; Mon, 15 Jan 2007 18:07:39 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Mon, 15 Jan 2007 18:07:39 +0000 Subject: [Gnash-commit] gnash/server/vm ActionExec.h X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jan 2007 18:07:45 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/15 18:07:39 Modified files: server/vm : ActionExec.h Log message: Remove extra qualiticafion from fixStackUnderrun declaration CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/ActionExec.h?cvsroot=gnash&r1=1.8&r2=1.9 Patches: Index: ActionExec.h =================================================================== RCS file: /sources/gnash/gnash/server/vm/ActionExec.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -b -r1.8 -r1.9 --- ActionExec.h 15 Jan 2007 14:16:06 -0000 1.8 +++ ActionExec.h 15 Jan 2007 18:07:39 -0000 1.9 @@ -84,7 +84,7 @@ /// @param required /// Number of items required. /// - void ActionExec::fixStackUnderrun(size_t required); + void fixStackUnderrun(size_t required); public: From MAILER-DAEMON Mon Jan 15 15:28:55 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H6YRr-0002xO-99 for mharc-gnash-commit@gnu.org; Mon, 15 Jan 2007 15:28:55 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H6YRp-0002vm-NO for gnash-commit@gnu.org; Mon, 15 Jan 2007 15:28:53 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H6YRo-0002uf-LB for gnash-commit@gnu.org; Mon, 15 Jan 2007 15:28:52 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H6YRo-0002ua-Dn for gnash-commit@gnu.org; Mon, 15 Jan 2007 15:28:52 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H6YRo-0005y8-4h for gnash-commit@gnu.org; Mon, 15 Jan 2007 15:28:52 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H6YRk-0002fj-Ut for gnash-commit@gnu.org; Mon, 15 Jan 2007 20:28:49 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H6YRk-0002ff-JS for gnash-commit@gnu.org; Mon, 15 Jan 2007 20:28:48 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Mon, 15 Jan 2007 20:28:48 +0000 Subject: [Gnash-commit] gnash ChangeLog server/font.h X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jan 2007 20:28:54 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/15 20:28:48 Modified files: . : ChangeLog server : font.h Log message: * server/font.h: proper include to avoid undefined references to drop_ref(). CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2111&r2=1.2112 http://cvs.savannah.gnu.org/viewcvs/gnash/server/font.h?cvsroot=gnash&r1=1.18&r2=1.19 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2111 retrieving revision 1.2112 diff -u -b -r1.2111 -r1.2112 --- ChangeLog 15 Jan 2007 17:00:14 -0000 1.2111 +++ ChangeLog 15 Jan 2007 20:28:47 -0000 1.2112 @@ -1,5 +1,10 @@ 2007-01-15 Sandro Santilli + * server/font.h: proper include to avoid undefined + references to drop_ref(). + +2007-01-15 Sandro Santilli + * server/asobj/TextSnapshot.cpp: fixed methods casing. * testsuite/actionscript.all/TextSnapshot.as: Index: server/font.h =================================================================== RCS file: /sources/gnash/gnash/server/font.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -b -r1.18 -r1.19 --- server/font.h 6 Dec 2006 10:58:34 -0000 1.18 +++ server/font.h 15 Jan 2007 20:28:48 -0000 1.19 @@ -16,6 +16,7 @@ #include "resource.h" // for inheritance of font #include "ref_counted.h" // for inheritance of texture_glyph #include "swf.h" // for tag_type definition +#include "bitmap_info.h" // for dtor visibility by smart pointer #include @@ -25,7 +26,6 @@ class movie; class shape_character_def; class stream; - class bitmap_info; /// class for holding (cached) textured glyph info. From MAILER-DAEMON Mon Jan 15 15:59:03 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H6Yv1-0005UN-Ap for mharc-gnash-commit@gnu.org; Mon, 15 Jan 2007 15:59:03 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H6Yuz-0005SP-GF for gnash-commit@gnu.org; Mon, 15 Jan 2007 15:59:01 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H6Yuy-0005RH-5q for gnash-commit@gnu.org; Mon, 15 Jan 2007 15:59:00 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H6Yuy-0005Qz-07 for gnash-commit@gnu.org; Mon, 15 Jan 2007 15:59:00 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H6Yux-000541-3a for gnash-commit@gnu.org; Mon, 15 Jan 2007 15:58:59 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H6Yuw-0005Nx-DF for gnash-commit@gnu.org; Mon, 15 Jan 2007 20:58:58 +0000 Received: from tgc by savannah.gnu.org with local (Exim 4.50) id 1H6Yuv-0005Nu-QZ for gnash-commit@gnu.org; Mon, 15 Jan 2007 20:58:58 +0000 To: gnash-commit@gnu.org Message-Id: From: Tomas Groth Date: Mon, 15 Jan 2007 20:58:57 +0000 Subject: [Gnash-commit] gnash ChangeLog libbase/gstgnashsrc.c libbase/g... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jan 2007 20:59:01 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Tomas Groth 07/01/15 20:58:56 Modified files: . : ChangeLog libbase : gstgnashsrc.c gstgnashsrc.h server/asobj : NetStreamGst.cpp NetStreamGst.h Removed files: server : video_yuv.cpp testsuite/movies.all: yapc2006.swf Log message: * libbase/gstgnashsrc.{c,h}: Fixed some warnings. * server/asobj/NetStreamGst.{cpp,h}: Fixed some warnings, and removed some unused code. * server/video_yuv.cpp: Removed since it function has been moved to image::yuv. * testsuite/movies.all/yapc2006.swf: Removed since it's just too big! CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2112&r2=1.2113 http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/gstgnashsrc.c?cvsroot=gnash&r1=1.2&r2=1.3 http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/gstgnashsrc.h?cvsroot=gnash&r1=1.2&r2=1.3 http://cvs.savannah.gnu.org/viewcvs/gnash/server/video_yuv.cpp?cvsroot=gnash&r1=1.2&r2=0 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStreamGst.cpp?cvsroot=gnash&r1=1.2&r2=1.3 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStreamGst.h?cvsroot=gnash&r1=1.2&r2=1.3 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/movies.all/yapc2006.swf?cvsroot=gnash&r1=1.1&r2=0 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2112 retrieving revision 1.2113 diff -u -b -r1.2112 -r1.2113 --- ChangeLog 15 Jan 2007 20:28:47 -0000 1.2112 +++ ChangeLog 15 Jan 2007 20:58:52 -0000 1.2113 @@ -1,3 +1,12 @@ +2007-01-15 Tomas Groth Christensen + + * libbase/gstgnashsrc.{c,h}: Fixed some warnings. + * server/asobj/NetStreamGst.{cpp,h}: Fixed some warnings, and removed + some unused code. + * server/video_yuv.cpp: Removed since it function has been moved to + image::yuv. + * testsuite/movies.all/yapc2006.swf: Removed since it's just too big! + 2007-01-15 Sandro Santilli * server/font.h: proper include to avoid undefined Index: libbase/gstgnashsrc.c =================================================================== RCS file: /sources/gnash/gnash/libbase/gstgnashsrc.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- libbase/gstgnashsrc.c 13 Jan 2007 20:09:25 -0000 1.2 +++ libbase/gstgnashsrc.c 15 Jan 2007 20:58:53 -0000 1.3 @@ -76,6 +76,7 @@ static void _do_init (GType gnashsrc_type) { + UNUSEDPAR(gnashsrc_type); /* static const GInterfaceInfo urihandler_info = { gst_gnash_src_uri_handler_init, NULL, @@ -134,7 +135,7 @@ static void gst_gnash_src_init (GstGnashSrc * src, GstGnashSrcClass * g_class) { - + UNUSEDPAR(g_class); src->data = NULL; src->callbacks = NULL; src->read_position = 0; @@ -179,7 +180,7 @@ GParamSpec * pspec) { GstGnashSrc *src; - + UNUSEDPAR(value); g_return_if_fail (GST_IS_GNASH_SRC (object)); src = GST_GNASH_SRC (object); @@ -277,7 +278,6 @@ static gboolean gst_gnash_src_get_size (GstBaseSrc * basesrc, guint64 * size) { - struct stat stat_results; GstGnashSrc *src; src = GST_GNASH_SRC (basesrc); @@ -301,7 +301,6 @@ gst_gnash_src_start (GstBaseSrc * basesrc) { GstGnashSrc *src = GST_GNASH_SRC (basesrc); - struct stat stat_results; if (src->data == NULL || src->callbacks == NULL) { GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND,(("No data or callback struct supplied.")), (NULL)); @@ -323,7 +322,7 @@ gst_gnash_src_stop (GstBaseSrc * basesrc) { GstGnashSrc *src = GST_GNASH_SRC (basesrc); - + UNUSEDPAR(src); return TRUE; } Index: libbase/gstgnashsrc.h =================================================================== RCS file: /sources/gnash/gnash/libbase/gstgnashsrc.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- libbase/gstgnashsrc.h 13 Jan 2007 20:09:25 -0000 1.2 +++ libbase/gstgnashsrc.h 15 Jan 2007 20:58:53 -0000 1.3 @@ -22,6 +22,9 @@ #ifndef __GST_GNASH_SRC_H__ #define __GST_GNASH_SRC_H__ +#define UNUSEDPAR(x) { x = x; } + + #include #include @@ -80,7 +83,7 @@ return gst_element_register (plugin, "gnashsrc", GST_RANK_NONE, GST_TYPE_GNASH_SRC); } -static GstPluginDesc gnash_plugin_desc = { +GstPluginDesc gnash_plugin_desc = { 0, // GST_VERSION_MAJOR 10, // GST_VERSION_MINOR "gnashsrc", Index: server/asobj/NetStreamGst.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/NetStreamGst.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- server/asobj/NetStreamGst.cpp 13 Jan 2007 20:09:25 -0000 1.2 +++ server/asobj/NetStreamGst.cpp 15 Jan 2007 20:58:53 -0000 1.3 @@ -51,9 +51,7 @@ m_go(false), m_imageframe(NULL), - m_video_clock(0), m_pause(false), - //m_unqueued_data(NULL), inputPos(0), videowidth(0), videoheight(0) @@ -93,11 +91,7 @@ { if (m_go) { - // terminate thread m_go = false; - - // wait till thread is complete before main continues - //pthread_join(m_thread, NULL); } gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_NULL); @@ -105,12 +99,6 @@ if (m_imageframe) delete m_imageframe; - while (m_qvideo.size() > 0) - { - delete m_qvideo.front(); - m_qvideo.pop(); - } - } Index: server/asobj/NetStreamGst.h =================================================================== RCS file: /sources/gnash/gnash/server/asobj/NetStreamGst.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- server/asobj/NetStreamGst.h 13 Jan 2007 20:09:25 -0000 1.2 +++ server/asobj/NetStreamGst.h 15 Jan 2007 20:58:53 -0000 1.3 @@ -25,125 +25,14 @@ #ifdef SOUND_GST -#include #include #include "impl.h" #include "video_stream_instance.h" #include #include "image.h" -#include "StreamProvider.h" namespace gnash { -struct raw_videodata_t -{ - raw_videodata_t(): - m_stream_index(-1), - m_size(0), - m_data(NULL), - m_ptr(NULL), - m_pts(0) - { - }; - - ~raw_videodata_t() - { - if (m_data) - { - delete m_data; - } - }; - - int m_stream_index; - uint32_t m_size; - uint8_t* m_data; - uint8_t* m_ptr; - double m_pts; // presentation timestamp in sec -}; - -template -class multithread_queue -{ - public: - - multithread_queue() - { - pthread_mutex_init(&m_mutex, NULL); - }; - - ~multithread_queue() - { - lock(); - while (m_queue.size() > 0) - { - T x = m_queue.front(); - m_queue.pop(); - delete x; - } - unlock(); - - pthread_mutex_destroy(&m_mutex); - } - - size_t size() - { - lock(); - size_t n = m_queue.size(); - unlock(); - return n; - } - - bool push(T member) - { - bool rc = false; - lock(); - if (m_queue.size() < 20) // hack - { - m_queue.push(member); - rc = true; - } - unlock(); - return rc; - } - - T front() - { - lock(); - T member = NULL; - if (m_queue.size() > 0) - { - member = m_queue.front(); - } - unlock(); - return member; - } - - void pop() - { - lock(); - if (m_queue.size() > 0) - { - m_queue.pop(); - } - unlock(); - } - - private: - - inline void lock() - { - pthread_mutex_lock(&m_mutex); - } - - inline void unlock() - { - pthread_mutex_unlock(&m_mutex); - } - - pthread_mutex_t m_mutex; - std::queue < T > m_queue; -}; - class netstream_as_object; class NetStreamGst { @@ -175,7 +64,6 @@ } static void* startPlayback(void* arg); - //static void callback_input (GstElement* /*c*/, GstBuffer *buffer, GstPad* /*pad*/, gpointer user_data); static void callback_output (GstElement* /*c*/, GstBuffer *buffer, GstPad* /*pad*/, gpointer user_data); static void callback_newpad (GstElement *decodebin, GstPad *pad, gboolean last, gpointer data); private: @@ -201,30 +89,21 @@ GstElement *videoflip; GstElement *audioconv; - // video info - int videowidth; - int videoheight; - volatile bool m_go; - unsigned int runtime; image::image_base* m_imageframe; - double m_video_clock; - - pthread_t m_thread; pthread_t startThread; - multithread_queue m_qvideo; bool m_pause; -// double m_start_clock; netstream_as_object* m_netstream_object; -// raw_videodata_t* m_unqueued_data; as_object* netCon; - tu_file* input; long inputPos; - StreamProvider streamProvider; std::string url; + + // video info + int videowidth; + int videoheight; }; } // gnash namespace Index: server/video_yuv.cpp =================================================================== RCS file: server/video_yuv.cpp diff -N server/video_yuv.cpp --- server/video_yuv.cpp 29 Oct 2006 18:34:11 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,109 +0,0 @@ -// -// Copyright (C) 2005, 2006 Free Software Foundation, Inc. -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -// -// - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "gnash.h" - -namespace gnash { - -enum {Y, U, V, T, NB_TEXS}; - -YUV_video::YUV_video(int w, int h): - m_width(w), - m_height(h) -{ - planes[Y].w = m_width; - planes[Y].h = m_height; - planes[Y].size = m_width * m_height; - planes[Y].offset = 0; - - planes[U] = planes[Y]; - planes[U].w >>= 1; - planes[U].h >>= 1; - planes[U].size >>= 2; - planes[U].offset = planes[Y].size; - - planes[V] = planes[U]; - planes[V].offset += planes[U].size; - - m_size = planes[Y].size + (planes[U].size << 1); - - for (int i = 0; i < 3; ++i) - { - planes[i].id = 0; //texids[i]; - - unsigned int ww = planes[i].w; - unsigned int hh = planes[i].h; - planes[i].unit = 0; // i[units]; - planes[i].p2w = (ww & (ww - 1)) ? video_nlpo2(ww) : ww; - planes[i].p2h = (hh & (hh - 1)) ? video_nlpo2(hh) : hh; - float tw = (double) ww / planes[i].p2w; - float th = (double) hh / planes[i].p2h; - - planes[i].coords[0][0] = 0.0; - planes[i].coords[0][1] = 0.0; - planes[i].coords[1][0] = tw; - planes[i].coords[1][1] = 0.0; - planes[i].coords[2][0] = tw; - planes[i].coords[2][1] = th; - planes[i].coords[3][0] = 0.0; - planes[i].coords[3][1] = th; - } - - m_data = new uint8_t[m_size]; - -// m_bounds->m_x_min = 0.0f; -// m_bounds->m_x_max = 1.0f; -// m_bounds->m_y_min = 0.0f; -// m_bounds->m_y_max = 1.0f; -} - -YUV_video::~YUV_video() -{ - if (m_data) delete [] m_data; -} - -unsigned int YUV_video::video_nlpo2(unsigned int x) const -{ - x |= (x >> 1); - x |= (x >> 2); - x |= (x >> 4); - x |= (x >> 8); - x |= (x >> 16); - return x + 1; -} - -void YUV_video::update(uint8_t* data) -{ - memcpy(m_data, data, m_size); -} - -int YUV_video::size() const -{ - return m_size; -} - -void YUV_video::display(const matrix* m, const rect* bounds) -{ -} - -} // namespace gnash Index: testsuite/movies.all/yapc2006.swf =================================================================== RCS file: testsuite/movies.all/yapc2006.swf diff -N testsuite/movies.all/yapc2006.swf Binary files /tmp/cvs9F3kDU and /dev/null differ From MAILER-DAEMON Tue Jan 16 09:03:07 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H6ou3-0002aQ-8P for mharc-gnash-commit@gnu.org; Tue, 16 Jan 2007 09:03:07 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H6ou0-0002ZC-1v for gnash-commit@gnu.org; Tue, 16 Jan 2007 09:03:04 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H6oty-0002YP-F1 for gnash-commit@gnu.org; Tue, 16 Jan 2007 09:03:03 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H6oty-0002YK-9W for gnash-commit@gnu.org; Tue, 16 Jan 2007 09:03:02 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H6otx-0006q1-EQ for gnash-commit@gnu.org; Tue, 16 Jan 2007 09:03:01 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H6oth-0000gZ-QS for gnash-commit@gnu.org; Tue, 16 Jan 2007 14:02:45 +0000 Received: from bjacques by savannah.gnu.org with local (Exim 4.50) id 1H6oth-0000gW-IU for gnash-commit@gnu.org; Tue, 16 Jan 2007 14:02:45 +0000 To: gnash-commit@gnu.org Message-Id: From: Bastiaan Jacques Date: Tue, 16 Jan 2007 14:02:45 +0000 Subject: [Gnash-commit] gnash ChangeLog Makefile.am configure.ac gui/Ma... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jan 2007 14:03:04 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Bastiaan Jacques 07/01/16 14:02:45 Modified files: . : ChangeLog Makefile.am configure.ac gui : Makefile.am fltk.cpp fltk_glue_agg.cpp fltk_glue_agg.h fltksup.h Log message: * configure.ac, Makefile.am, gui/Makefile.am: Stop abusing gnashpkgtool.m4 and use GNASH_PKG_FIND. Update the users of the FLTK compiler and linker flags to use FLTK2_flag. * gui/fltk.cpp: Code cleanups. Fix the menu rendering bug by moving drawing calls into draw(). Actually enable the region rendering code. Redraw the whole window when it is moved. * gui/{fltk_glue_agg.h, fltk_glue_agg.cpp, fltksup.h}: Trivial code cleanups. * gui/fltksup.h: Remove the Mozilla exception. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2113&r2=1.2114 http://cvs.savannah.gnu.org/viewcvs/gnash/Makefile.am?cvsroot=gnash&r1=1.57&r2=1.58 http://cvs.savannah.gnu.org/viewcvs/gnash/configure.ac?cvsroot=gnash&r1=1.233&r2=1.234 http://cvs.savannah.gnu.org/viewcvs/gnash/gui/Makefile.am?cvsroot=gnash&r1=1.55&r2=1.56 http://cvs.savannah.gnu.org/viewcvs/gnash/gui/fltk.cpp?cvsroot=gnash&r1=1.2&r2=1.3 http://cvs.savannah.gnu.org/viewcvs/gnash/gui/fltk_glue_agg.cpp?cvsroot=gnash&r1=1.2&r2=1.3 http://cvs.savannah.gnu.org/viewcvs/gnash/gui/fltk_glue_agg.h?cvsroot=gnash&r1=1.2&r2=1.3 http://cvs.savannah.gnu.org/viewcvs/gnash/gui/fltksup.h?cvsroot=gnash&r1=1.1&r2=1.2 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2113 retrieving revision 1.2114 diff -u -b -r1.2113 -r1.2114 --- ChangeLog 15 Jan 2007 20:58:52 -0000 1.2113 +++ ChangeLog 16 Jan 2007 14:02:45 -0000 1.2114 @@ -1,3 +1,15 @@ +2007-01-16 Bastiaan Jacques + + * configure.ac, Makefile.am, gui/Makefile.am: Stop abusing + gnashpkgtool.m4 and use GNASH_PKG_FIND. Update the users of the FLTK + compiler and linker flags to use FLTK2_flag. + * gui/fltk.cpp: Code cleanups. Fix the menu rendering bug by moving + drawing calls into draw(). Actually enable the region rendering code. + Redraw the whole window when it is moved. + * gui/{fltk_glue_agg.h, fltk_glue_agg.cpp, fltksup.h}: Trivial code + cleanups. + * gui/fltksup.h: Remove the Mozilla exception. + 2007-01-15 Tomas Groth Christensen * libbase/gstgnashsrc.{c,h}: Fixed some warnings. Index: Makefile.am =================================================================== RCS file: /sources/gnash/gnash/Makefile.am,v retrieving revision 1.57 retrieving revision 1.58 diff -u -b -r1.57 -r1.58 --- Makefile.am 9 Jan 2007 00:43:43 -0000 1.57 +++ Makefile.am 16 Jan 2007 14:02:45 -0000 1.58 @@ -15,7 +15,7 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -# $Id: Makefile.am,v 1.57 2007/01/09 00:43:43 rsavoye Exp $ +# $Id: Makefile.am,v 1.58 2007/01/16 14:02:45 bjacques Exp $ ## Process this file with automake to produce Makefile.in AUTOMAKE_OPTIONS = 1.6.0 @@ -156,8 +156,8 @@ @echo "GLEXT_LIBS is $(GLEXT_LIBS)" @echo "GTK2_CFLAGS is $(GTK2_CFLAGS)" @echo "GTK2_LIBS is $(GTK2_LIBS)" - @echo "FLTK_CFLAGS is $(FLTK_CFLAGS)" - @echo "FLTK_LIBS is $(FLTK_LIBS)" + @echo "FLTK2_CFLAGS is $(FLTK2_CFLAGS)" + @echo "FLTK2_LIBS is $(FLTK2_LIBS)" @echo "XFT_CFLAGS is $(XFT_CFLAGS)" @echo "XFT_LIBS is $(XFT_LIBS)" @echo "PANGO_CFLAGS is $(PANGO_CFLAGS)" Index: configure.ac =================================================================== RCS file: /sources/gnash/gnash/configure.ac,v retrieving revision 1.233 retrieving revision 1.234 diff -u -b -r1.233 -r1.234 --- configure.ac 11 Jan 2007 09:58:04 -0000 1.233 +++ configure.ac 16 Jan 2007 14:02:45 -0000 1.234 @@ -15,7 +15,7 @@ dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA dnl -dnl $Id: configure.ac,v 1.233 2007/01/11 09:58:04 strk Exp $ +dnl $Id: configure.ac,v 1.234 2007/01/16 14:02:45 bjacques Exp $ AC_PREREQ(2.50) AC_INIT(gnash, cvs) @@ -668,16 +668,10 @@ AM_CONDITIONAL(HAVE_GST, test x$sound_handler = xgst) if test x$gui = xfltk; then - dnl Because the fltk2 include directory is called fltk, whereas the library - dnl is called libfltk2, we call the PKG macros separately. - GNASH_PKG_INCLUDES(fltk, [FL_API.h], [Fast Light Toolkit]) - GNASH_PKG_LIBS(fltk2, fl_window_flush, [Fast Light Toolkit]) - - FLTK_LIBS="$FLTK2_LIBS" - AC_SUBST(FLTK_LIBS) + GNASH_PKG_FIND(fltk2, [fltk/FL_API.h], [Fast Light Toolkit], fl_window_flush) fi -AM_CONDITIONAL(HAS_FLTK, [ test x$has_fltk = xyes ]) +AM_CONDITIONAL(HAS_FLTK2, [ test x$has_fltk2 = xyes ]) AM_CONDITIONAL(HAS_XFT, [ test x$has_xft = xyes ]) @@ -1214,13 +1208,13 @@ fi if test x$gui = xfltk; then - if test x"$FLTK_LIBS" != x; then - if test x"$FLTK_CFLAGS" != x; then - echo " Fltk flags are: $FLTK_CFLAGS" + if test x"$FLTK2_LIBS" != x; then + if test x"$FLTK2_CFLAGS" != x; then + echo " Fltk flags are: $FLTK2_CFLAGS" else echo " Fltk flags are: default include path" fi - echo " Fltk libs are: $FLTK_LIBS" + echo " Fltk libs are: $FLTK2_LIBS" else echo "ERROR: No Fltk2 development package installed!\ You need to have the fltk2 development package installed\ Index: gui/Makefile.am =================================================================== RCS file: /sources/gnash/gnash/gui/Makefile.am,v retrieving revision 1.55 retrieving revision 1.56 diff -u -b -r1.55 -r1.56 --- gui/Makefile.am 10 Jan 2007 19:21:14 -0000 1.55 +++ gui/Makefile.am 16 Jan 2007 14:02:45 -0000 1.56 @@ -17,7 +17,7 @@ # -# $Id: Makefile.am,v 1.55 2007/01/10 19:21:14 bjacques Exp $ +# $Id: Makefile.am,v 1.56 2007/01/16 14:02:45 bjacques Exp $ AUTOMAKE_OPTIONS = @@ -166,8 +166,8 @@ if USE_GUI_FLTK FLTK_SRCS = fltk.cpp fltksup.h $(FLTK_AGG_SRCS) $(FLTK_CAIRO_SRCS) - AM_CPPFLAGS += $(FLTK_CFLAGS) - AM_LDFLAGS += $(FLTK_LIBS) + AM_CPPFLAGS += $(FLTK2_CFLAGS) + AM_LDFLAGS += $(FLTK2_LIBS) else FLTK_SRCS = endif Index: gui/fltk.cpp =================================================================== RCS file: /sources/gnash/gnash/gui/fltk.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- gui/fltk.cpp 10 Jan 2007 19:27:35 -0000 1.2 +++ gui/fltk.cpp 16 Jan 2007 14:02:45 -0000 1.3 @@ -19,27 +19,15 @@ #endif #include -#include -#include -#include -#include +#include +#include #include #include -#include -#include -#include -#include -#include -#include #include - - - - +#include #include "fltksup.h" #include "gnash.h" -#include "log.h" #include "gui.h" #include "VM.h" @@ -53,15 +41,13 @@ FltkGui::FltkGui(unsigned long xid, float scale, bool loop, unsigned int depth) - : Window(100,100,"Gnash"), + : Window(0, 0), Gui(xid, scale, loop, depth) { } FltkGui::~FltkGui() { - GNASH_REPORT_FUNCTION; - delete _popup_menu; } @@ -69,32 +55,33 @@ void FltkGui::renderBuffer() { - GNASH_REPORT_FUNCTION; - _glue.draw(); redraw(); } +// All drawing operations (i.e., the drawing calls the renderer makes) must take +// place in draw(). void FltkGui::draw() { - GNASH_REPORT_FUNCTION; -#if 0 - if (! (damage() & DAMAGE_EXPOSE) || damage) { - return; - } -#endif - rect draw_bounds(-1e10f, -1e10f, +1e10f, +1e10f); + // FLTK has a nice mechanism where you can set damage() to whatever you want + // so in draw() you can check what exactly you want to redraw. But + // unfortunately it doesn't seem to remember what bits you turn on. So I'll + // just do it the old-fashioned way. + static bool firstRun = true; + if (firstRun) { + // Redraw the whole rendering area. + rect draw_bounds(-1e10f, -1e10f, +1e10f, +1e10f); set_invalidated_region(draw_bounds); + firstRun = false; + } - renderBuffer(); + _glue.draw(); } int FltkGui::handle(int event) { - GNASH_REPORT_FUNCTION; - switch (event) { case TIMEOUT: advance_movie(this); @@ -119,8 +106,7 @@ handleKey(event_key()); return true; default: - // cout << "Captured unknown event: " << event << std::endl; - return true; //Window::handle(event); + return Window::handle(event); } } @@ -159,7 +145,7 @@ { NumLockKey, gnash::key::NUM_LOCK }, { SubtractKey, gnash::key::MINUS }, { DivideKey, gnash::key::SLASH }, - { 0, gnash::key::INVALID } // Terminator + { 0, gnash::key::INVALID } #if 0 // These appear to be unavailable in fltk { bracketleft, gnash::key::LEFT_BRACKET }, @@ -183,18 +169,14 @@ bool FltkGui::run() { - GNASH_REPORT_FUNCTION; - fltk::run(); - return false; + return true; } bool FltkGui::init(int argc, char **argv[]) { - GNASH_REPORT_FUNCTION; - _renderer = _glue.createRenderHandler(); set_render_handler(_renderer); @@ -211,7 +193,7 @@ void FltkGui::create() { - // XXX ensure _xid is set before this function is called + // TODO: make the set_xid() call conditional on the availability of X11. if (_xid) { CreatedWindow::set_xid(this, _xid); } else { @@ -222,8 +204,6 @@ bool FltkGui::createWindow(const char* title, int width, int height) { - GNASH_REPORT_FUNCTION; - resize(width, height); _glue.initBuffer(width, height); @@ -233,7 +213,8 @@ createMenu(); end(); - size_range (1, 1); // XXX + // The minimum size of the window is 1x1 pixels. + size_range (1, 1); show(); @@ -243,28 +224,24 @@ bool FltkGui::createMenu() { - GNASH_REPORT_FUNCTION; - _popup_menu = new PopupMenu(0, 0, w(), h()); _popup_menu->type(PopupMenu::POPUP3); _popup_menu->begin(); - new Item("Play Movie", 0, reinterpret_cast(menu_play)); - new Item("Pause Movie", 0, reinterpret_cast(menu_pause)); - new Item("Stop Movie", 0, reinterpret_cast(menu_stop)); - new Item("Restart Movie", 0, - reinterpret_cast(menu_restart)); - new Item("Step Forward Frame", 0, - reinterpret_cast(menu_step_forward)); - new Item("Step Backward Frame", 0, - reinterpret_cast(menu_step_backward)); - new Item("Jump Forward 10 Frames", 0, - reinterpret_cast(menu_jump_forward)); - new Item("Jump Backward 10 Frames", 0, - reinterpret_cast(menu_jump_backward)); - new Item("Toggle Sound", 0, - reinterpret_cast(menu_toggle_sound)); - new Item("Quit", 0, reinterpret_cast(menu_quit)); + +#define callback_cast(ptr) reinterpret_cast(ptr) + new Item("Play Movie", 0, callback_cast(menu_play)); + new Item("Pause Movie", 0, callback_cast(menu_pause)); + new Item("Stop Movie", 0, callback_cast(menu_stop)); + new Item("Restart Movie", 0, callback_cast(menu_restart)); + new Item("Step Forward Frame", 0, callback_cast(menu_step_forward)); + new Item("Step Backward Frame", 0, callback_cast(menu_step_backward)); + new Item("Jump Forward 10 Frames", 0, callback_cast(menu_jump_forward)); + new Item("Jump Backward 10 Frames", 0, callback_cast(menu_jump_backward)); + new Item("Toggle Sound", 0, callback_cast(menu_toggle_sound)); + new Item("Quit", 0, callback_cast(menu_quit)); +#undef callback_cast + _popup_menu->end(); return true; @@ -273,36 +250,33 @@ void FltkGui::layout() { - GNASH_REPORT_FUNCTION; - if (!(layout_damage() & ~LAYOUT_WH)) { - // We're only interested in size changes. - // return; - } -#if 0 - if (!get_current_root()) { - + if ((layout_damage() & LAYOUT_CHILD )) { + // We're not interested in children. Sorry. return; } -#endif if (!VM::isInitialized()) { // No movie yet; don't bother resizing anything. return; } + // Let FLTK update the window borders, etc. Window::layout(); + if ((layout_damage() & LAYOUT_WH)) { _glue.resize(w(), h()); resize_view(w(), h()); + } - redraw(); + // Invalidate the whole drawing area. + rect draw_bounds(-1e10f, -1e10f, +1e10f, +1e10f); + set_invalidated_region(draw_bounds); + redraw(); } void FltkGui::setCursor(gnash_cursor_type newcursor) { - //GNASH_REPORT_FUNCTION; - fltk::Cursor* cursortype; switch(newcursor) { Index: gui/fltk_glue_agg.cpp =================================================================== RCS file: /sources/gnash/gnash/gui/fltk_glue_agg.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- gui/fltk_glue_agg.cpp 10 Jan 2007 19:27:35 -0000 1.2 +++ gui/fltk_glue_agg.cpp 16 Jan 2007 14:02:45 -0000 1.3 @@ -18,35 +18,17 @@ #include "config.h" #endif -#include -#include -#include -#include -#include -#include -#include -#include -#include #include -#include -#include -#include -#include - -#include "fltksup.h" #include "fltk_glue_agg.h" #include "gnash.h" -#include "log.h" -#include "gui.h" #include "render_handler.h" #include "render_handler_agg.h" using namespace std; -//using namespace fltk; namespace gnash { Index: gui/fltk_glue_agg.h =================================================================== RCS file: /sources/gnash/gnash/gui/fltk_glue_agg.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- gui/fltk_glue_agg.h 10 Jan 2007 19:27:35 -0000 1.2 +++ gui/fltk_glue_agg.h 16 Jan 2007 14:02:45 -0000 1.3 @@ -21,25 +21,6 @@ #include "config.h" #endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - - - -#include "fltksup.h" #include "gnash.h" #include "log.h" #include "gui.h" Index: gui/fltksup.h =================================================================== RCS file: /sources/gnash/gnash/gui/fltksup.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -b -r1.1 -r1.2 --- gui/fltksup.h 10 Jan 2007 19:21:14 -0000 1.1 +++ gui/fltksup.h 16 Jan 2007 14:02:45 -0000 1.2 @@ -14,27 +14,6 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -// Linking Gnash statically or dynamically with other modules is making a -// combined work based on Gnash. Thus, the terms and conditions of the GNU -// General Public License cover the whole combination. -// -// As a special exception, the copyright holders of Gnash give you -// permission to combine Gnash with free software programs or libraries -// that are released under the GNU LGPL and with code included in any -// release of Talkback distributed by the Mozilla Foundation. You may -// copy and distribute such a system following the terms of the GNU GPL -// for all but the LGPL-covered parts and Talkback, and following the -// LGPL for the LGPL-covered parts. -// -// Note that people who make modified versions of Gnash are not obligated -// to grant this special exception for their modified versions; it is their -// choice whether to do so. The GNU General Public License gives permission -// to release a modified version without this exception; this exception -// also makes it possible to release a modified version which carries -// forward this exception. -// -// - #ifndef __FLTKSUP_H__ #define __FLTKSUP_H__ @@ -46,21 +25,8 @@ #include "log.h" #include "gui.h" -#if 0 -#include -#include -#include -#include -#endif - -#include -#include #include #include -#include -#include -#include -#include #ifdef RENDERER_AGG # include "fltk_glue_agg.h" @@ -107,8 +73,6 @@ #endif }; -// end of namespace gnash -} +} // end of namespace gnash -// end of __FLTKSUP_H__ -#endif +#endif // end of __FLTKSUP_H__ From MAILER-DAEMON Tue Jan 16 14:12:14 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H6tjC-0006CD-Oj for mharc-gnash-commit@gnu.org; Tue, 16 Jan 2007 14:12:14 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H6tjB-0006Bz-VW for gnash-commit@gnu.org; Tue, 16 Jan 2007 14:12:13 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H6tjB-0006Bb-G4 for gnash-commit@gnu.org; Tue, 16 Jan 2007 14:12:13 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H6tjB-0006BR-65 for gnash-commit@gnu.org; Tue, 16 Jan 2007 14:12:13 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H6tjA-0005eO-Rh for gnash-commit@gnu.org; Tue, 16 Jan 2007 14:12:12 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H6tjA-0008HJ-HM for gnash-commit@gnu.org; Tue, 16 Jan 2007 19:12:12 +0000 Received: from bjacques by savannah.gnu.org with local (Exim 4.50) id 1H6tjA-0008HE-EL for gnash-commit@gnu.org; Tue, 16 Jan 2007 19:12:12 +0000 To: gnash-commit@gnu.org Message-Id: From: Bastiaan Jacques Date: Tue, 16 Jan 2007 19:12:12 +0000 Subject: [Gnash-commit] gnash ChangeLog macros/sdl.m4 X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jan 2007 19:12:14 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Bastiaan Jacques 07/01/16 19:12:12 Modified files: . : ChangeLog macros : sdl.m4 Log message: Fix typos CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2114&r2=1.2115 http://cvs.savannah.gnu.org/viewcvs/gnash/macros/sdl.m4?cvsroot=gnash&r1=1.36&r2=1.37 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2114 retrieving revision 1.2115 diff -u -b -r1.2114 -r1.2115 --- ChangeLog 16 Jan 2007 14:02:45 -0000 1.2114 +++ ChangeLog 16 Jan 2007 19:12:11 -0000 1.2115 @@ -9,6 +9,7 @@ * gui/{fltk_glue_agg.h, fltk_glue_agg.cpp, fltksup.h}: Trivial code cleanups. * gui/fltksup.h: Remove the Mozilla exception. + * macros/sdl.m4: Fix typos. 2007-01-15 Tomas Groth Christensen Index: macros/sdl.m4 =================================================================== RCS file: /sources/gnash/gnash/macros/sdl.m4,v retrieving revision 1.36 retrieving revision 1.37 diff -u -b -r1.36 -r1.37 --- macros/sdl.m4 9 Jan 2007 00:51:35 -0000 1.36 +++ macros/sdl.m4 16 Jan 2007 19:12:12 -0000 1.37 @@ -14,7 +14,7 @@ dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -dnl $Id: sdl.m4,v 1.36 2007/01/09 00:51:35 rsavoye Exp $ +dnl $Id: sdl.m4,v 1.37 2007/01/16 19:12:12 bjacques Exp $ AC_DEFUN([GNASH_PATH_SDL], [ has_sdl=no @@ -94,10 +94,10 @@ dnl AC_MSG_CHECKING([for sdl library]) AC_CACHE_VAL(ac_cv_path_sdl_lib, [ if test x"${with_sdl_lib}" != x ; then - if test -f ${with_sdl_libs}/libSDL.a -o -f ${with_sdl_lib}/libSDL.so; then + if test -f ${with_sdl_lib}/libSDL.a -o -f ${with_sdl_lib}/libSDL.so; then ac_cv_path_sdl_lib="-L`(cd ${with_sdl_lib}; pwd)` -lSDL" else - if test -f ${with_sdl_libs}/libSDL-1.1.a -o -f ${with_sdl_lib}/libSDL-1.1.so; then + if test -f ${with_sdl_lib}/libSDL-1.1.a -o -f ${with_sdl_lib}/libSDL-1.1.so; then ac_cv_path_sdl_lib="-L`(cd ${with_sdl_lib}; pwd)` -lSDL" else AC_MSG_ERROR([${with_sdl_lib} directory doesn't contain libSDL]) From MAILER-DAEMON Tue Jan 16 18:53:29 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H6y7N-0006h8-IJ for mharc-gnash-commit@gnu.org; Tue, 16 Jan 2007 18:53:29 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H6y7L-0006fs-PA for gnash-commit@gnu.org; Tue, 16 Jan 2007 18:53:27 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H6y7K-0006eb-PT for gnash-commit@gnu.org; Tue, 16 Jan 2007 18:53:27 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H6y7K-0006eA-71 for gnash-commit@gnu.org; Tue, 16 Jan 2007 18:53:26 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H6y7J-0000Lb-VT for gnash-commit@gnu.org; Tue, 16 Jan 2007 18:53:26 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H6y7I-0004IO-2q for gnash-commit@gnu.org; Tue, 16 Jan 2007 23:53:24 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H6y7H-0004IL-Sn for gnash-commit@gnu.org; Tue, 16 Jan 2007 23:53:24 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Tue, 16 Jan 2007 23:53:23 +0000 Subject: [Gnash-commit] gnash ChangeLog libbase/zlib_adapter.cpp X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jan 2007 23:53:28 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/16 23:53:23 Modified files: . : ChangeLog libbase : zlib_adapter.cpp Log message: * libbase/zlib_adapter.cpp: fix build for !TU_CONFIG_LINK_TO_ZLIB. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2115&r2=1.2116 http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/zlib_adapter.cpp?cvsroot=gnash&r1=1.10&r2=1.11 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2115 retrieving revision 1.2116 diff -u -b -r1.2115 -r1.2116 --- ChangeLog 16 Jan 2007 19:12:11 -0000 1.2115 +++ ChangeLog 16 Jan 2007 23:53:23 -0000 1.2116 @@ -1,3 +1,8 @@ +2007-01-17 Sandro Santilli + + * libbase/zlib_adapter.cpp: fix build for !TU_CONFIG_LINK_TO_ZLIB. + + 2007-01-16 Bastiaan Jacques * configure.ac, Makefile.am, gui/Makefile.am: Stop abusing Index: libbase/zlib_adapter.cpp =================================================================== RCS file: /sources/gnash/gnash/libbase/zlib_adapter.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -b -r1.10 -r1.11 --- libbase/zlib_adapter.cpp 10 Jan 2007 17:28:49 -0000 1.10 +++ libbase/zlib_adapter.cpp 16 Jan 2007 23:53:23 -0000 1.11 @@ -20,8 +20,16 @@ // Stubs, in case client doesn't want to link to zlib. namespace zlib_adapter { - std_auto_ptr make_inflater(std::auto_ptr in) { return NULL; } - tu_file* make_deflater(tu_file* out) { return NULL; } + std::auto_ptr make_inflater(std::auto_ptr /*in*/) + { + assert(0); // callers should check this themselves + return std::auto_ptr(NULL); + } + tu_file* make_deflater(tu_file* /*out*/) + { + assert(0); // callers should check this themselves + return NULL; + } } From MAILER-DAEMON Tue Jan 16 19:10:24 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H6yNk-0007qs-QO for mharc-gnash-commit@gnu.org; Tue, 16 Jan 2007 19:10:24 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H6yNj-0007qn-Vs for gnash-commit@gnu.org; Tue, 16 Jan 2007 19:10:24 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H6yNj-0007qa-C6 for gnash-commit@gnu.org; Tue, 16 Jan 2007 19:10:23 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H6yNj-0007qX-9f for gnash-commit@gnu.org; Tue, 16 Jan 2007 19:10:23 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H6yNi-0003Iz-VM for gnash-commit@gnu.org; Tue, 16 Jan 2007 19:10:23 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H6yNh-0004fB-Uk for gnash-commit@gnu.org; Wed, 17 Jan 2007 00:10:22 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H6yNh-0004f8-Qq for gnash-commit@gnu.org; Wed, 17 Jan 2007 00:10:21 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Wed, 17 Jan 2007 00:10:21 +0000 Subject: [Gnash-commit] gnash ChangeLog testsuite/libbase/Makefile.am X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jan 2007 00:10:24 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/17 00:10:21 Modified files: . : ChangeLog testsuite/libbase: Makefile.am Log message: * testsuite/libbase/Makefile.am: don't attempt to run Curl test if no curl is enabled. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2116&r2=1.2117 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/libbase/Makefile.am?cvsroot=gnash&r1=1.25&r2=1.26 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2116 retrieving revision 1.2117 diff -u -b -r1.2116 -r1.2117 --- ChangeLog 16 Jan 2007 23:53:23 -0000 1.2116 +++ ChangeLog 17 Jan 2007 00:10:21 -0000 1.2117 @@ -1,8 +1,9 @@ 2007-01-17 Sandro Santilli + * testsuite/libbase/Makefile.am: don't attempt to run Curl test + if no curl is enabled. * libbase/zlib_adapter.cpp: fix build for !TU_CONFIG_LINK_TO_ZLIB. - 2007-01-16 Bastiaan Jacques * configure.ac, Makefile.am, gui/Makefile.am: Stop abusing Index: testsuite/libbase/Makefile.am =================================================================== RCS file: /sources/gnash/gnash/testsuite/libbase/Makefile.am,v retrieving revision 1.25 retrieving revision 1.26 diff -u -b -r1.25 -r1.26 --- testsuite/libbase/Makefile.am 1 Dec 2006 16:51:08 -0000 1.25 +++ testsuite/libbase/Makefile.am 17 Jan 2007 00:10:21 -0000 1.26 @@ -40,11 +40,14 @@ abs_builddir=`(cd $(top_builddir)/testsuite/libbase; pwd)` check_PROGRAMS = \ - CurlStreamTest \ NoSeekFileTest \ URLTest \ RcTest +if CURL +check_PROGRAMS += CurlStreamTest +endif + CLEANFILES = \ testrun.sum \ testrun.log \ From MAILER-DAEMON Wed Jan 17 03:56:39 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H76b1-0008JI-81 for mharc-gnash-commit@gnu.org; Wed, 17 Jan 2007 03:56:39 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H76b0-0008J5-HB for gnash-commit@gnu.org; Wed, 17 Jan 2007 03:56:38 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H76az-0008Is-2j for gnash-commit@gnu.org; Wed, 17 Jan 2007 03:56:38 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H76ay-0008Ip-Ul for gnash-commit@gnu.org; Wed, 17 Jan 2007 03:56:37 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H76ay-0006DU-HW for gnash-commit@gnu.org; Wed, 17 Jan 2007 03:56:36 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H76aw-0001fA-TM for gnash-commit@gnu.org; Wed, 17 Jan 2007 08:56:34 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H76aw-0001f7-GI for gnash-commit@gnu.org; Wed, 17 Jan 2007 08:56:34 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Wed, 17 Jan 2007 08:56:34 +0000 Subject: [Gnash-commit] gnash .cvsignore ChangeLog testsuite/actionscri... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jan 2007 08:56:38 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/17 08:56:34 Modified files: . : .cvsignore ChangeLog testsuite/actionscript.all: .cvsignore testsuite/misc-ming.all: .cvsignore testsuite/movies.all: .cvsignore testsuite/samples: .cvsignore testsuite/server: .cvsignore Added files: cygnal : .cvsignore extensions/mysql: .cvsignore Log message: More ignores CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/.cvsignore?cvsroot=gnash&r1=1.5&r2=1.6 http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2117&r2=1.2118 http://cvs.savannah.gnu.org/viewcvs/gnash/cygnal/.cvsignore?cvsroot=gnash&rev=1.1 http://cvs.savannah.gnu.org/viewcvs/gnash/extensions/mysql/.cvsignore?cvsroot=gnash&rev=1.1 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/.cvsignore?cvsroot=gnash&r1=1.6&r2=1.7 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/.cvsignore?cvsroot=gnash&r1=1.2&r2=1.3 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/movies.all/.cvsignore?cvsroot=gnash&r1=1.1&r2=1.2 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/samples/.cvsignore?cvsroot=gnash&r1=1.2&r2=1.3 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/server/.cvsignore?cvsroot=gnash&r1=1.2&r2=1.3 Patches: Index: .cvsignore =================================================================== RCS file: /sources/gnash/gnash/.cvsignore,v retrieving revision 1.5 retrieving revision 1.6 diff -u -b -r1.5 -r1.6 --- .cvsignore 5 Dec 2006 19:51:53 -0000 1.5 +++ .cvsignore 17 Jan 2007 08:56:33 -0000 1.6 @@ -16,3 +16,4 @@ ltmain.sh config.guess config.sub +gnash-dbg.log Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2117 retrieving revision 1.2118 diff -u -b -r1.2117 -r1.2118 --- ChangeLog 17 Jan 2007 00:10:21 -0000 1.2117 +++ ChangeLog 17 Jan 2007 08:56:33 -0000 1.2118 @@ -1,5 +1,11 @@ 2007-01-17 Sandro Santilli + * .cvsignore, cygnal/.cvsignore, extensions/mysql/.cvsignore, + testsuite/actionscript.all/.cvsignore, + testsuite/misc-ming.all/.cvsignore, + testsuite/movies.all/.cvsignore, testsuite/samples/.cvsignore, + testsuite/server/.cvsignore: + Ignore generated files. * testsuite/libbase/Makefile.am: don't attempt to run Curl test if no curl is enabled. * libbase/zlib_adapter.cpp: fix build for !TU_CONFIG_LINK_TO_ZLIB. Index: testsuite/actionscript.all/.cvsignore =================================================================== RCS file: /sources/gnash/gnash/testsuite/actionscript.all/.cvsignore,v retrieving revision 1.6 retrieving revision 1.7 diff -u -b -r1.6 -r1.7 --- testsuite/actionscript.all/.cvsignore 29 Nov 2006 09:08:21 -0000 1.6 +++ testsuite/actionscript.all/.cvsignore 17 Jan 2007 08:56:33 -0000 1.7 @@ -6,3 +6,15 @@ *.pp online-tests require-ming +alltests-v5-Runner +alltests-v6-Runner +alltests-v7-Runner +alltests-v8-Runner +astests-v5-Runner +astests-v6-Runner +astests-v7-Runner +astests-v8-Runner +gnash-dbg.log +site.exp +testrun.log +testrun.sum Index: testsuite/misc-ming.all/.cvsignore =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/.cvsignore,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- testsuite/misc-ming.all/.cvsignore 5 Dec 2006 20:01:56 -0000 1.2 +++ testsuite/misc-ming.all/.cvsignore 17 Jan 2007 08:56:34 -0000 1.3 @@ -8,3 +8,30 @@ defineedittext spritehier Dejagnu +ButtonEventsTest +ButtonEventsTest-Runner +DefineEditTextTest +DefineEditTextVariableNameTest +DefineEditTextVariableNameTest-Runner +PlaceObject2Test +RemoveObject2Test +RollOverOutTest +RollOverOutTest-Runner +VarAndCharClashTest-Runner +VarAndCharClashTest.swf.frame2.pp +gnash-dbg.log +loop_test +loop_test-Runner +place_and_remove_object_insane_test +place_and_remove_object_insane_testrunner +place_and_remove_object_test +place_and_remove_object_testrunner +place_object_test +place_object_testrunner +root_stop_test +root_stop_testrunner +site.exp +testrun.log +testrun.sum +timeline_var_test +timeline_var_test-Runner Index: testsuite/movies.all/.cvsignore =================================================================== RCS file: /sources/gnash/gnash/testsuite/movies.all/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -u -b -r1.1 -r1.2 --- testsuite/movies.all/.cvsignore 3 Nov 2006 14:10:10 -0000 1.1 +++ testsuite/movies.all/.cvsignore 17 Jan 2007 08:56:34 -0000 1.2 @@ -2,3 +2,8 @@ Makefile.in .deps .libs +gnash-dbg.log +gravity_embedded-TestRunner +site.exp +testrun.log +testrun.sum Index: testsuite/samples/.cvsignore =================================================================== RCS file: /sources/gnash/gnash/testsuite/samples/.cvsignore,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- testsuite/samples/.cvsignore 30 Nov 2006 14:11:40 -0000 1.2 +++ testsuite/samples/.cvsignore 17 Jan 2007 08:56:34 -0000 1.3 @@ -9,3 +9,4 @@ gnash-dbg.log clip_as_button2-TestRunner *.bak +site.exp Index: testsuite/server/.cvsignore =================================================================== RCS file: /sources/gnash/gnash/testsuite/server/.cvsignore,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- testsuite/server/.cvsignore 5 Dec 2006 20:01:56 -0000 1.2 +++ testsuite/server/.cvsignore 17 Jan 2007 08:56:34 -0000 1.3 @@ -2,10 +2,11 @@ Makefile.in .deps .libs -GetterSetterTest -MatrixTest -PropertyListTest gnash-dbg.log site.exp testrun.log testrun.sum +GetterSetterTest +MatrixTest +PropertyListTest +as_prop_flagsTest Index: cygnal/.cvsignore =================================================================== RCS file: cygnal/.cvsignore diff -N cygnal/.cvsignore --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ cygnal/.cvsignore 17 Jan 2007 08:56:33 -0000 1.1 @@ -0,0 +1,10 @@ +.deps +.libs +Makefile +Makefile.in +*.lo +*.la +cygnal +gnash.log +gnash.sum +site.exp Index: extensions/mysql/.cvsignore =================================================================== RCS file: extensions/mysql/.cvsignore diff -N extensions/mysql/.cvsignore --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ extensions/mysql/.cvsignore 17 Jan 2007 08:56:33 -0000 1.1 @@ -0,0 +1,6 @@ +.deps +.libs +Makefile +Makefile.in +*.lo +*.la From MAILER-DAEMON Wed Jan 17 04:53:31 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H77U3-00042d-B1 for mharc-gnash-commit@gnu.org; Wed, 17 Jan 2007 04:53:31 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H77U0-00041E-EB for gnash-commit@gnu.org; Wed, 17 Jan 2007 04:53:28 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H77Ty-00040u-Rp for gnash-commit@gnu.org; Wed, 17 Jan 2007 04:53:27 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H77Ty-00040q-Eo for gnash-commit@gnu.org; Wed, 17 Jan 2007 04:53:26 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H77Tx-0005sS-75 for gnash-commit@gnu.org; Wed, 17 Jan 2007 04:53:25 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H77Tv-00046l-S7 for gnash-commit@gnu.org; Wed, 17 Jan 2007 09:53:23 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H77Tv-00046i-If for gnash-commit@gnu.org; Wed, 17 Jan 2007 09:53:23 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Wed, 17 Jan 2007 09:53:23 +0000 Subject: [Gnash-commit] gnash ChangeLog testsuite/samples/clip_as_butto... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jan 2007 09:53:29 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/17 09:53:23 Modified files: . : ChangeLog testsuite/samples: clip_as_button2-TestRunner.cpp Log message: * testsuite/samples/clip_as_button2-TestRunner.cpp: enable verbosity *before* attempting to load the movie, to know more about why the movie could not be loaded. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2118&r2=1.2119 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/samples/clip_as_button2-TestRunner.cpp?cvsroot=gnash&r1=1.4&r2=1.5 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2118 retrieving revision 1.2119 diff -u -b -r1.2118 -r1.2119 --- ChangeLog 17 Jan 2007 08:56:33 -0000 1.2118 +++ ChangeLog 17 Jan 2007 09:53:23 -0000 1.2119 @@ -1,5 +1,8 @@ 2007-01-17 Sandro Santilli + * testsuite/samples/clip_as_button2-TestRunner.cpp: enable + verbosity *before* attempting to load the movie, to know + more about why the movie could not be loaded. * .cvsignore, cygnal/.cvsignore, extensions/mysql/.cvsignore, testsuite/actionscript.all/.cvsignore, testsuite/misc-ming.all/.cvsignore, Index: testsuite/samples/clip_as_button2-TestRunner.cpp =================================================================== RCS file: /sources/gnash/gnash/testsuite/samples/clip_as_button2-TestRunner.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- testsuite/samples/clip_as_button2-TestRunner.cpp 20 Dec 2006 20:09:07 -0000 1.4 +++ testsuite/samples/clip_as_button2-TestRunner.cpp 17 Jan 2007 09:53:23 -0000 1.5 @@ -40,6 +40,9 @@ string filename = string(SRCDIR) + string("/") + string(INPUT_FILENAME); auto_ptr t; + gnash::LogFile& dbglogfile = gnash::LogFile::getDefaultInstance(); + dbglogfile.setVerbosity(1); + try { t.reset(new MovieTester(filename)); @@ -56,9 +59,6 @@ // I wouldn't want the first advance to be needed tester.advance(); - gnash::LogFile& dbglogfile = gnash::LogFile::getDefaultInstance(); - dbglogfile.setVerbosity(1); - sprite_instance* root = tester.getRootMovie(); assert(root); From MAILER-DAEMON Wed Jan 17 06:08:21 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H78eT-0003Ph-8u for mharc-gnash-commit@gnu.org; Wed, 17 Jan 2007 06:08:21 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H78eQ-0003Ls-Tq for gnash-commit@gnu.org; Wed, 17 Jan 2007 06:08:19 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H78eO-0003JZ-DZ for gnash-commit@gnu.org; Wed, 17 Jan 2007 06:08:16 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H78eO-0003JL-7S for gnash-commit@gnu.org; Wed, 17 Jan 2007 06:08:16 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H78eN-0000iQ-OU for gnash-commit@gnu.org; Wed, 17 Jan 2007 06:08:15 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H78eM-0007EJ-Kg for gnash-commit@gnu.org; Wed, 17 Jan 2007 11:08:14 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H78eM-0007EG-ES for gnash-commit@gnu.org; Wed, 17 Jan 2007 11:08:14 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Wed, 17 Jan 2007 11:08:14 +0000 Subject: [Gnash-commit] gnash ChangeLog macros/gnashpkgtool.m4 X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jan 2007 11:08:19 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/17 11:08:14 Modified files: . : ChangeLog macros : gnashpkgtool.m4 Log message: * macros/gnashpkgtool.m4: make sure to define HAVE_header when a package header is found. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2119&r2=1.2120 http://cvs.savannah.gnu.org/viewcvs/gnash/macros/gnashpkgtool.m4?cvsroot=gnash&r1=1.33&r2=1.34 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2119 retrieving revision 1.2120 diff -u -b -r1.2119 -r1.2120 --- ChangeLog 17 Jan 2007 09:53:23 -0000 1.2119 +++ ChangeLog 17 Jan 2007 11:08:14 -0000 1.2120 @@ -1,5 +1,7 @@ 2007-01-17 Sandro Santilli + * macros/gnashpkgtool.m4: make sure to define HAVE_header when + a package header is found. * testsuite/samples/clip_as_button2-TestRunner.cpp: enable verbosity *before* attempting to load the movie, to know more about why the movie could not be loaded. Index: macros/gnashpkgtool.m4 =================================================================== RCS file: /sources/gnash/gnash/macros/gnashpkgtool.m4,v retrieving revision 1.33 retrieving revision 1.34 diff -u -b -r1.33 -r1.34 --- macros/gnashpkgtool.m4 9 Jan 2007 00:43:43 -0000 1.33 +++ macros/gnashpkgtool.m4 17 Jan 2007 11:08:14 -0000 1.34 @@ -14,20 +14,25 @@ dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -dnl $Id: gnashpkgtool.m4,v 1.33 2007/01/09 00:43:43 rsavoye Exp $ +dnl $Id: gnashpkgtool.m4,v 1.34 2007/01/17 11:08:14 strk Exp $ dnl Generic macros for finding and setting include-paths and library-path dnl for packages. Implements GNASH_PKG_INCLUDES() and GNASH_PKG_LIBS(). dnl dnl TODO: +dnl dnl - always run AC_CHECK_HEADERS and AC_CHECK_LIB so that config.h end dnl up with correct information about what's available and what not dnl and every provided info is verified before acceptance. +dnl +dnl - Document the interface of the macro !! +dnl AC_DEFUN([GNASH_PKG_INCLUDES], [ pushdef([UP], translit([$1], [a-z], [A-Z]))dnl Uppercase pushdef([DOWN], translit([$1], [A-Z], [a-z]))dnl Lowercase + pushdef([UPHEADER], translit([$2], [a-z./], [A-Z__]))dnl Uppercase header AC_ARG_ENABLE($1, AC_HELP_STRING([--enable-$1], [Enable support for $3.]), [ case "${enableval}" in @@ -68,13 +73,14 @@ dnl If the path hasn't been specified, go look for it. if test x"${ac_cv_path_$1_incl}" = x; then - AC_CHECK_HEADER($2, [ac_cv_path_$1_incl=""], [ - AC_CHECK_HEADER($1/$2, [ac_cv_path_$1_incl="-I/usr/include/$1"], [ - AC_CHECK_HEADER($name/$2, [ac_cv_path_$1_incl="-I/usr/include/$name"], [ - AC_CHECK_HEADER($2, [ac_cv_path_$1_incl="-I/usr/include/$2"], [ + AC_CHECK_HEADER($2, [ac_cv_path_$1_incl=""; found_$1_incl="yes"], [ + AC_CHECK_HEADER($1/$2, [ac_cv_path_$1_incl="-I/usr/include/$1"; found_$1_incl="yes"], [ + AC_CHECK_HEADER($name/$2, [ac_cv_path_$1_incl="-I/usr/include/$name"; found_$1_incl="yes"], [ + AC_CHECK_HEADER($2, [ac_cv_path_$1_incl="-I/usr/include/$2"; found_$1_incl="yes"], [ if test x"${ac_cv_path_$1_incl}" = x; then for i in $incllist; do if test -f $i/$name; then + found_$1_incl="yes" if test x"$i" != x"/usr/include"; then ac_cv_path_$1_incl="-I$i" break @@ -84,10 +90,12 @@ fi else if test -f $i/$name/$2; then + found_$1_incl="yes" ac_cv_path_$1_incl="-I$i/$name" break else if test -f $i/$2; then + found_$1_incl="yes" ac_cv_path_$1_incl="-I$i" break fi @@ -101,16 +109,25 @@ ]) fi + if test x"${found_$1_incl}" = "xyes"; then + + dnl It seems we need to explicitly call AC_DEFINE as AC_CHECK_HEADER doesn't + dnl do this automatically. AC_CHECK_HEADERS (not the final S) would do it. + AC_DEFINE([HAVE_]UPHEADER, 1, [Define if you have the $2 header]) + if test x"${ac_cv_path_$1_incl}" != x ; then UP[]_CFLAGS="${ac_cv_path_$1_incl}" else UP[]_CFLAGS="" fi + + fi fi AC_SUBST(UP[]_CFLAGS) popdef([UP]) popdef([DOWN]) + popdef([UPHEADER]) ]) AC_DEFUN([GNASH_PKG_LIBS], dnl GNASH_PKG_LIBS(cairo, cairo_status, [cairo render library.]) From MAILER-DAEMON Wed Jan 17 06:22:03 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H78ri-00028O-TV for mharc-gnash-commit@gnu.org; Wed, 17 Jan 2007 06:22:03 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H78rh-000287-AR for gnash-commit@gnu.org; Wed, 17 Jan 2007 06:22:01 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H78rg-00027v-2r for gnash-commit@gnu.org; Wed, 17 Jan 2007 06:22:00 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H78rf-00027s-Uk for gnash-commit@gnu.org; Wed, 17 Jan 2007 06:21:59 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H78rf-0003Rq-Mp for gnash-commit@gnu.org; Wed, 17 Jan 2007 06:21:59 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H78re-00088X-NM for gnash-commit@gnu.org; Wed, 17 Jan 2007 11:21:58 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H78re-00088S-Az for gnash-commit@gnu.org; Wed, 17 Jan 2007 11:21:58 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Wed, 17 Jan 2007 11:21:58 +0000 Subject: [Gnash-commit] gnash ChangeLog configure.ac X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jan 2007 11:22:01 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/17 11:21:58 Modified files: . : ChangeLog configure.ac Log message: * configure.ac: include ZLIB vars in summary. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2120&r2=1.2121 http://cvs.savannah.gnu.org/viewcvs/gnash/configure.ac?cvsroot=gnash&r1=1.234&r2=1.235 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2120 retrieving revision 1.2121 diff -u -b -r1.2120 -r1.2121 --- ChangeLog 17 Jan 2007 11:08:14 -0000 1.2120 +++ ChangeLog 17 Jan 2007 11:21:58 -0000 1.2121 @@ -1,5 +1,6 @@ 2007-01-17 Sandro Santilli + * configure.ac: include ZLIB vars in summary. * macros/gnashpkgtool.m4: make sure to define HAVE_header when a package header is found. * testsuite/samples/clip_as_button2-TestRunner.cpp: enable Index: configure.ac =================================================================== RCS file: /sources/gnash/gnash/configure.ac,v retrieving revision 1.234 retrieving revision 1.235 diff -u -b -r1.234 -r1.235 --- configure.ac 16 Jan 2007 14:02:45 -0000 1.234 +++ configure.ac 17 Jan 2007 11:21:58 -0000 1.235 @@ -15,7 +15,7 @@ dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA dnl -dnl $Id: configure.ac,v 1.234 2007/01/16 14:02:45 bjacques Exp $ +dnl $Id: configure.ac,v 1.235 2007/01/17 11:21:58 strk Exp $ AC_PREREQ(2.50) AC_INIT(gnash, cvs) @@ -1365,6 +1365,19 @@ run anyway." fi +if test x"$Z_LIBS" != x; then + if test x"$Z_CFLAGS" != x; then + echo " Z flags are: $Z_CFLAGS" + else + echo " Z flags are: default include path" + fi + echo " Z libs are: $Z_LIBS" +else + echo "Warning: \ + You need to have the zlib development packages installed \ + to play compressed SWF (most of them from version 6 up). " +fi + # If anything critical is missing, don't bother to continue if test x"$nogo" = x"true"; then echo "" From MAILER-DAEMON Wed Jan 17 06:50:19 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H79J5-0003oK-Dj for mharc-gnash-commit@gnu.org; Wed, 17 Jan 2007 06:50:19 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H79J2-0003na-QT for gnash-commit@gnu.org; Wed, 17 Jan 2007 06:50:16 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H79J1-0003mp-Gt for gnash-commit@gnu.org; Wed, 17 Jan 2007 06:50:15 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H79J1-0003ma-Ak for gnash-commit@gnu.org; Wed, 17 Jan 2007 06:50:15 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H79J1-00009Y-0F for gnash-commit@gnu.org; Wed, 17 Jan 2007 06:50:15 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H79Iz-0001sB-Pg for gnash-commit@gnu.org; Wed, 17 Jan 2007 11:50:13 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H79Iz-0001s8-Eq for gnash-commit@gnu.org; Wed, 17 Jan 2007 11:50:13 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Wed, 17 Jan 2007 11:50:13 +0000 Subject: [Gnash-commit] gnash ChangeLog backend/Makefile.am libbase/Mak... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jan 2007 11:50:17 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/17 11:50:13 Modified files: . : ChangeLog backend : Makefile.am libbase : Makefile.am Log message: ZLIB_CFLAGS => Z_CFLAGS, ZLIB_LIBS => Z_LIBS CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2121&r2=1.2122 http://cvs.savannah.gnu.org/viewcvs/gnash/backend/Makefile.am?cvsroot=gnash&r1=1.49&r2=1.50 http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/Makefile.am?cvsroot=gnash&r1=1.54&r2=1.55 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2121 retrieving revision 1.2122 diff -u -b -r1.2121 -r1.2122 --- ChangeLog 17 Jan 2007 11:21:58 -0000 1.2121 +++ ChangeLog 17 Jan 2007 11:50:12 -0000 1.2122 @@ -1,5 +1,7 @@ 2007-01-17 Sandro Santilli + * backend/Makefile.am, libbase/Makefile.am: + ZLIB_CFLAGS => Z_CFLAGS, ZLIB_LIBS => Z_LIBS * configure.ac: include ZLIB vars in summary. * macros/gnashpkgtool.m4: make sure to define HAVE_header when a package header is found. Index: backend/Makefile.am =================================================================== RCS file: /sources/gnash/gnash/backend/Makefile.am,v retrieving revision 1.49 retrieving revision 1.50 diff -u -b -r1.49 -r1.50 --- backend/Makefile.am 29 Nov 2006 23:20:17 -0000 1.49 +++ backend/Makefile.am 17 Jan 2007 11:50:13 -0000 1.50 @@ -29,7 +29,7 @@ $(JPEG_LIBS) \ $(PNG_LIBS) \ $(OGG_LIBS) \ - $(ZLIB_LIBS) \ + $(Z_LIBS) \ $(SDL_LIBS) \ $(PANGO_LIBS) \ $(ATK_LIBS) \ Index: libbase/Makefile.am =================================================================== RCS file: /sources/gnash/gnash/libbase/Makefile.am,v retrieving revision 1.54 retrieving revision 1.55 diff -u -b -r1.54 -r1.55 --- libbase/Makefile.am 13 Jan 2007 20:06:17 -0000 1.54 +++ libbase/Makefile.am 17 Jan 2007 11:50:13 -0000 1.55 @@ -33,7 +33,7 @@ $(PNG_CFLAGS) \ $(SDL_CFLAGS) \ $(CURL_CFLAGS) \ - $(ZLIB_CFLAGS) \ + $(Z_CFLAGS) \ $(JPEG_CFLAGS) \ $(BOOST_CFLAGS) \ $(INCLTDL) \ @@ -49,7 +49,7 @@ libgnashbase_la_LIBADD = \ $(JPEG_LIBS) \ - $(ZLIB_LIBS) \ + $(Z_LIBS) \ $(CURL_LIBS) \ $(OPENGL_LIBS) \ $(PTHREAD_LIBS) \ From MAILER-DAEMON Wed Jan 17 07:16:34 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H79iU-0003ZK-28 for mharc-gnash-commit@gnu.org; Wed, 17 Jan 2007 07:16:34 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H79iS-0003YP-3c for gnash-commit@gnu.org; Wed, 17 Jan 2007 07:16:32 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H79iR-0003Wn-5m for gnash-commit@gnu.org; Wed, 17 Jan 2007 07:16:31 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H79iR-0003Wk-2r for gnash-commit@gnu.org; Wed, 17 Jan 2007 07:16:31 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H79iQ-0005nk-Ks for gnash-commit@gnu.org; Wed, 17 Jan 2007 07:16:31 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H79iP-0002Tk-Qp for gnash-commit@gnu.org; Wed, 17 Jan 2007 12:16:30 +0000 Received: from bjacques by savannah.gnu.org with local (Exim 4.50) id 1H79iP-0002Th-3r for gnash-commit@gnu.org; Wed, 17 Jan 2007 12:16:29 +0000 To: gnash-commit@gnu.org Message-Id: From: Bastiaan Jacques Date: Wed, 17 Jan 2007 12:16:29 +0000 Subject: [Gnash-commit] gnash ChangeLog plugin/klash/Makefile.am plugin... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jan 2007 12:16:32 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Bastiaan Jacques 07/01/17 12:16:28 Modified files: . : ChangeLog plugin/klash : Makefile.am klash_part.cpp gui : Makefile.am kde.cpp kdesup.h Log message: * gui/Makefile.am: Stop calling the KDE GUI executable Klash; use gnash instead. * gui/kde{.cpp, sup.h}: Make a new class named qwidget derived from QGLWidget. This allows us to create the QApplication before instantiating an object derived from QWidget, thereby fulfilling QT requirements. And, this way, we can also pass it argv and argc. * plugin/klash/Makefile.am: Stop building the klash binary. The klash code is obsolete and hasn't compiled for a while. * plugin/klash/klash_part.cpp: Use the gnash binary instead of klash. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2122&r2=1.2123 http://cvs.savannah.gnu.org/viewcvs/gnash/plugin/klash/Makefile.am?cvsroot=gnash&r1=1.21&r2=1.22 http://cvs.savannah.gnu.org/viewcvs/gnash/plugin/klash/klash_part.cpp?cvsroot=gnash&r1=1.8&r2=1.9 http://cvs.savannah.gnu.org/viewcvs/gnash/gui/Makefile.am?cvsroot=gnash&r1=1.56&r2=1.57 http://cvs.savannah.gnu.org/viewcvs/gnash/gui/kde.cpp?cvsroot=gnash&r1=1.7&r2=1.8 http://cvs.savannah.gnu.org/viewcvs/gnash/gui/kdesup.h?cvsroot=gnash&r1=1.10&r2=1.11 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2122 retrieving revision 1.2123 diff -u -b -r1.2122 -r1.2123 --- ChangeLog 17 Jan 2007 11:50:12 -0000 1.2122 +++ ChangeLog 17 Jan 2007 12:16:28 -0000 1.2123 @@ -1,3 +1,15 @@ +2007-01-17 Bastiaan Jacques + + * gui/Makefile.am: Stop calling the KDE GUI executable Klash; use + gnash instead. + * gui/kde{.cpp, sup.h}: Make a new class named qwidget derived from + QGLWidget. This allows us to create the QApplication before + instantiating an object derived from QWidget, thereby fulfilling + QT requirements. And, this way, we can also pass it argv and argc. + * plugin/klash/Makefile.am: Stop building the klash binary. The klash + code is obsolete and hasn't compiled for a while. + * plugin/klash/klash_part.cpp: Use the gnash binary instead of klash. + 2007-01-17 Sandro Santilli * backend/Makefile.am, libbase/Makefile.am: Index: plugin/klash/Makefile.am =================================================================== RCS file: /sources/gnash/gnash/plugin/klash/Makefile.am,v retrieving revision 1.21 retrieving revision 1.22 diff -u -b -r1.21 -r1.22 --- plugin/klash/Makefile.am 5 Dec 2006 19:49:00 -0000 1.21 +++ plugin/klash/Makefile.am 17 Jan 2007 12:16:28 -0000 1.22 @@ -17,7 +17,7 @@ # -# $Id: Makefile.am,v 1.21 2006/12/05 19:49:00 strk Exp $ +# $Id: Makefile.am,v 1.22 2007/01/17 12:16:28 bjacques Exp $ AUTOMAKE_OPTIONS = @@ -65,7 +65,7 @@ $(XGETTEXT) *.cpp -o $(podir)/klash.pot if KLASH -bin_PROGRAMS = klash +#bin_PROGRAMS = klash klash_SOURCES = klash.cpp klash_CPPFLAGS = \ Index: plugin/klash/klash_part.cpp =================================================================== RCS file: /sources/gnash/gnash/plugin/klash/klash_part.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -b -r1.8 -r1.9 --- plugin/klash/klash_part.cpp 29 Oct 2006 18:34:17 -0000 1.8 +++ plugin/klash/klash_part.cpp 17 Jan 2007 12:16:28 -0000 1.9 @@ -166,7 +166,7 @@ if (m_width > 0 && m_height > 0) dim = QString ("-j ") + QString::number (m_width) + QString (" -k ") + QString::number (m_height); - QString cmd = QString ("klash -x ") + + QString cmd = QString ("gnash -x ") + QString::number (static_cast (widget ())->embedId()) + QChar (' ') + dim + QChar (' ') + KProcess::quote (m_src_url); Index: gui/Makefile.am =================================================================== RCS file: /sources/gnash/gnash/gui/Makefile.am,v retrieving revision 1.56 retrieving revision 1.57 diff -u -b -r1.56 -r1.57 --- gui/Makefile.am 16 Jan 2007 14:02:45 -0000 1.56 +++ gui/Makefile.am 17 Jan 2007 12:16:28 -0000 1.57 @@ -17,7 +17,7 @@ # -# $Id: Makefile.am,v 1.56 2007/01/16 14:02:45 bjacques Exp $ +# $Id: Makefile.am,v 1.57 2007/01/17 12:16:28 bjacques Exp $ AUTOMAKE_OPTIONS = @@ -205,7 +205,7 @@ $(AM_LDFLAGS) if USE_GUI_KDE -bin_PROGRAMS = gnash klash +bin_PROGRAMS = gnash # klash else bin_PROGRAMS = gnash endif @@ -240,19 +240,20 @@ $(GNASH_LIBS) # $(LIBLTDL) "-dlopen" self "-dlopen" -klash_SOURCES = gnash.cpp -klash_CPPFLAGS = \ - $(KDE_INCLS) \ - -DUSE_KDE +#klash_SOURCES = gnash.cpp +#klash_CPPFLAGS = \ +# $(KDE_INCLS) \ +# -DUSE_KDE \ +# $(AM_CPPFLAGS) # export our symbols so they can be used by Gnash plugins -klash_LDFLAGS = -export-dynamic -klash_LDADD = \ - $(LIB_KDECORE) \ - $(LIB_KDEUI) \ - $(GNASH_LIBS) +#klash_LDFLAGS = -export-dynamic +#klash_LDADD = \ +# $(LIB_KDECORE) \ +# $(LIB_KDEUI) \ +# $(GNASH_LIBS) -klash_DEPENDENCIES = \ - $(GNASH_LIBS) +#klash_DEPENDENCIES = \ +# $(GNASH_LIBS) # $(LIBLTDL) "-dlopen" self "-dlopen" CLEANFILES = klash.moc Index: gui/kde.cpp =================================================================== RCS file: /sources/gnash/gnash/gui/kde.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -b -r1.7 -r1.8 --- gui/kde.cpp 29 Oct 2006 18:34:10 -0000 1.7 +++ gui/kde.cpp 17 Jan 2007 12:16:28 -0000 1.8 @@ -13,19 +13,20 @@ // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - // // + #ifdef HAVE_CONFIG_H #include "config.h" #endif -#include + #include #include #include -#include +#include +#include #include "gnash.h" #include "movie_definition.h" @@ -40,64 +41,35 @@ using namespace std; -// XXX ugly hack: qapp must be created before KdeGui (which inherits from -// QGLWidget) can be created. This is a QT requirement. -static QApplication* qapp = new QApplication (0, NULL); - -namespace gnash -{ - -KdeGui::KdeGui(WId embed) -{ -// GNASH_REPORT_FUNCTION; - create (embed); - _qwidget = this; - _qmenu = new QPopupMenu(this); - _qmenu->insertItem("Play Movie", this, SLOT(menuitem_play_callback())); - _qmenu->insertItem("Pause Movie", this, SLOT(menuitem_pause_callback())); - _qmenu->insertItem("Stop Movie", this, SLOT(menuitem_stop_callback())); - _qmenu->insertItem("Restart Movie", this, SLOT(menuitem_restart_callback())); - _qmenu->insertItem("Step Forward", this, SLOT(menuitem_step_forward_callback())); - _qmenu->insertItem("Step Backward", this, SLOT( menuitem_step_backward_callback())); - _qmenu->insertItem("Jump Forward", this, SLOT(menuitem_jump_forward_callback())); - _qmenu->insertItem("Jump Backward", this, SLOT(menuitem_jump_backward_callback())); - _qmenu->insertItem("Quit Gnash", this, SLOT(menuitem_quit_callback())); - - +namespace { +gnash::LogFile& dbglogfile = gnash::LogFile::getDefaultInstance(); } -void -KdeGui::contextMenuEvent(QContextMenuEvent*) -{ -// GNASH_REPORT_FUNCTION; -// printf("Got Right Click!\n"); - _qmenu->exec(); -} - -void -KdeGui::about() +namespace gnash { -// GNASH_REPORT_FUNCTION; - QMessageBox::about(this, "Klash", "The Gnash Flash player for KDE.\n"); -} KdeGui::~KdeGui() { // GNASH_REPORT_FUNCTION; + delete _qwidget; } + KdeGui::KdeGui(unsigned long xid, float scale, bool loop, unsigned int depth) : Gui(xid, scale, loop, depth) { -// GNASH_REPORT_FUNCTION; -} + GNASH_REPORT_FUNCTION; +} + bool KdeGui::init(int argc, char **argv[]) { + _qapp = new QApplication(argc, *argv); + _qwidget = new qwidget(_xid, this); + // GNASH_REPORT_FUNCTION; - _qapp = qapp; _glue.init (argc, argv); return true; @@ -106,11 +78,11 @@ bool KdeGui::createWindow(const char* /*windowtitle*/, int width, int height) { -// GNASH_REPORT_FUNCTION; + GNASH_REPORT_FUNCTION; - _qwidget = new KdeGui(_xid); _qwidget->makeCurrent(); _qwidget->setGeometry(0, 0, width, height); + _qapp->setMainWidget(_qwidget); _qwidget->show(); _glue.prepDrawingArea(_qwidget); @@ -140,36 +112,16 @@ void KdeGui::setInterval(unsigned int interval) { -// GNASH_REPORT_FUNCTION; - _interval = interval; - - _timer = new QTimer(this); - connect(_timer, SIGNAL(timeout()), this, SLOT(timer_advance_movie())); - _timer->start(200); -} - -void -KdeGui::timer_advance_movie() -{ -// GNASH_REPORT_FUNCTION; - this->advance_movie(static_cast(this)); -} + GNASH_REPORT_FUNCTION; + _qwidget->setInterval(interval); -void -KdeGui::timerEvent(QTimerEvent *event) -{ -// GNASH_REPORT_FUNCTION; - if (event->timerId() == _timer->timerId()) { - // advance the movie - } else { - QWidget::timerEvent(event); - } } bool KdeGui::run() { - connect(_qapp, SIGNAL(lastWindowClosed()), _qapp, SLOT(quit())); + GNASH_REPORT_FUNCTION; + // _qwidget->connect(&_qapp, SIGNAL(lastWindowClosed()), &_qapp, SLOT(quit())); _qapp->exec(); @@ -195,118 +147,156 @@ /// \brief restart the movie from the beginning void -KdeGui::menuitem_restart_callback() +qwidget::menuitem_restart_callback() { // GNASH_REPORT_FUNCTION; - menu_restart(); + Gui::menu_restart(); } /// \brief quit complete, and close the application void -KdeGui::menuitem_quit_callback() +qwidget::menuitem_quit_callback() { // GNASH_REPORT_FUNCTION; +#if 0 _qapp->closeAllWindows(); _qapp->quit(); + #endif + + exit(0); } /// \brief Start the movie playing from the current frame. void -KdeGui::menuitem_play_callback() +qwidget::menuitem_play_callback() { // GNASH_REPORT_FUNCTION; - menu_play(); + Gui::menu_play(); } /// \brief toggle that's playing or paused. void -KdeGui::menuitem_pause_callback() +qwidget::menuitem_pause_callback() { // GNASH_REPORT_FUNCTION; - menu_pause(); + Gui::menu_pause(); } /// \brief stop the movie that's playing. void -KdeGui::menuitem_stop_callback() +qwidget::menuitem_stop_callback() { // GNASH_REPORT_FUNCTION; - menu_stop(); + Gui::menu_stop(); } /// \brief step forward 1 frame void -KdeGui::menuitem_step_forward_callback() +qwidget::menuitem_step_forward_callback() { // GNASH_REPORT_FUNCTION; - menu_step_forward(); + Gui::menu_step_forward(); } /// \brief step backward 1 frame void -KdeGui::menuitem_step_backward_callback() +qwidget::menuitem_step_backward_callback() { // GNASH_REPORT_FUNCTION; - menu_step_backward(); + Gui::menu_step_backward(); } /// \brief jump forward 10 frames void -KdeGui::menuitem_jump_forward_callback() +qwidget::menuitem_jump_forward_callback() { // GNASH_REPORT_FUNCTION; - menu_jump_forward(); + Gui::menu_jump_forward(); } /// \brief jump backward 10 frames void -KdeGui::menuitem_jump_backward_callback() +qwidget::menuitem_jump_backward_callback() { // GNASH_REPORT_FUNCTION; - menu_jump_backward(); + Gui::menu_jump_backward(); } // // Event handlers // + + void -KdeGui::resizeEvent(QResizeEvent *event) +qwidget::mouseMoveEvent(QMouseEvent *event) { -// GNASH_REPORT_FUNCTION; - resize_view(int(event->size().width()), int(event->size().height())); + GNASH_REPORT_FUNCTION; + assert(_godfather); + QPoint position = event->pos(); + + _godfather->notify_mouse_moved(position.x(), position.y()); +} + +qwidget::qwidget(WId embed, KdeGui* godfather) + : QGLWidget(0, "hi") +{ + create (embed); + + _qmenu.insertItem("Play Movie", this, SLOT(menuitem_play_callback())); + _qmenu.insertItem("Pause Movie", this, SLOT(menuitem_pause_callback())); + _qmenu.insertItem("Stop Movie", this, SLOT(menuitem_stop_callback())); + _qmenu.insertItem("Restart Movie", this, SLOT(menuitem_restart_callback())); + _qmenu.insertItem("Step Forward", this, SLOT(menuitem_step_forward_callback())); + _qmenu.insertItem("Step Backward", this, SLOT( menuitem_step_backward_callback())); + _qmenu.insertItem("Jump Forward", this, SLOT(menuitem_jump_forward_callback())); + _qmenu.insertItem("Jump Backward", this, SLOT(menuitem_jump_backward_callback())); + _qmenu.insertItem("Quit Gnash", this, SLOT(menuitem_quit_callback())); + + _godfather = godfather; + setMouseTracking(true); } void -KdeGui::mouseMoveEvent(QMouseEvent *event) +qwidget::setInterval(unsigned int interval) { - GNASH_REPORT_FUNCTION; -// mouseHandle(event->pos()); + startTimer(interval); } void -KdeGui::mousePressEvent(QMouseEvent *event) +qwidget::timerEvent(QTimerEvent *) { - GNASH_REPORT_FUNCTION; -// if (event->button() == QMouseEvent::LeftButton) { -// mouseHandle( event->pos() ); -// } + Gui::advance_movie(_godfather); } void -KdeGui::mouseHandle(const QPoint &pos) +qwidget::contextMenuEvent(QContextMenuEvent*) { - GNASH_REPORT_FUNCTION; + _qmenu.exec(QCursor::pos()); +} -// int i = pos2index(pos.x() ); -// int j = pos2index(pos.y() ); -// setPoint( i, j ); +void +qwidget::mousePressEvent(QMouseEvent *event) +{ + _godfather->notify_mouse_clicked(true, 1); +} + +void +qwidget::mouseReleaseEvent(QMouseEvent *event) +{ + _godfather->notify_mouse_clicked(false, 1); } +void +qwidget::resizeEvent(QResizeEvent *event) +{ + _godfather->resize_view(int(event->size().width()), int(event->size().height())); +} // end of namespace gnash } + Index: gui/kdesup.h =================================================================== RCS file: /sources/gnash/gnash/gui/kdesup.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -b -r1.10 -r1.11 --- gui/kdesup.h 6 Dec 2006 10:58:34 -0000 1.10 +++ gui/kdesup.h 17 Jan 2007 12:16:28 -0000 1.11 @@ -27,17 +27,22 @@ #include "tu_config.h" #include "gui.h" +#if 0 #include #include #include -#include + #include #include #include #include #include #include -#include + +#endif + +#include +#include #ifdef RENDERER_OPENGL # include @@ -51,22 +56,22 @@ namespace gnash { -class DSOEXPORT KdeGui : public QGLWidget, public Gui + +class KdeGui; + +class DSOEXPORT qwidget : public QGLWidget { Q_OBJECT public: -// KdeGui(); - KdeGui(WId embed); - KdeGui(unsigned long xid, float scale, bool loop, unsigned int depth); - virtual ~KdeGui(); - virtual bool init(int argc, char **argv[]); - virtual bool createWindow(const char* title, int width, int height); - virtual bool run(); - virtual bool createMenu(); - virtual bool setupEvents(); - virtual void renderBuffer(); - virtual void setInterval(unsigned int interval); - virtual void setTimeout(unsigned int timeout); + qwidget(WId embed, KdeGui* godfather); + void setInterval(unsigned int interval); +protected: + void contextMenuEvent(QContextMenuEvent *event); + void mousePressEvent(QMouseEvent *event); + void mouseReleaseEvent( QMouseEvent * ); + void mouseMoveEvent(QMouseEvent *event); + void timerEvent(QTimerEvent *); + void resizeEvent(QResizeEvent *event); public slots: void menuitem_restart_callback(); void menuitem_quit_callback(); @@ -77,24 +82,31 @@ void menuitem_step_backward_callback(); void menuitem_jump_forward_callback(); void menuitem_jump_backward_callback(); - void timer_advance_movie(); +private: + QPopupMenu _qmenu; + KdeGui* _godfather; +}; - void about(); -protected: - void resizeEvent(QResizeEvent *event); - void timerEvent(QTimerEvent *event); - void contextMenuEvent(QContextMenuEvent *event); - void mouseMoveEvent(QMouseEvent *event); - void mousePressEvent(QMouseEvent *event); - void mouseHandle(const QPoint &pos); -signals: - void explain(const QString&); -private: +class DSOEXPORT KdeGui : public Gui +{ + +public: + KdeGui(unsigned long xid, float scale, bool loop, unsigned int depth); + virtual ~KdeGui(); + virtual bool init(int argc, char **argv[]); + virtual bool createWindow(const char* windowtitle, int width, int height); + virtual bool run(); + virtual bool createMenu(); + virtual bool setupEvents(); + virtual void renderBuffer(); + virtual void setInterval(unsigned int interval); + virtual void setTimeout(unsigned int timeout); + private: + QApplication* _qapp; + qwidget* _qwidget; KdeOpenGLGlue _glue; - QPopupMenu *_qmenu; - QApplication *_qapp; - QGLWidget *_qwidget; + QTimer *_timer; }; From MAILER-DAEMON Wed Jan 17 07:51:01 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H7AFp-0002a0-JH for mharc-gnash-commit@gnu.org; Wed, 17 Jan 2007 07:51:01 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H7AFm-0002Yv-7A for gnash-commit@gnu.org; Wed, 17 Jan 2007 07:50:58 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H7AFl-0002YR-0j for gnash-commit@gnu.org; Wed, 17 Jan 2007 07:50:57 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H7AFk-0002YO-Q2 for gnash-commit@gnu.org; Wed, 17 Jan 2007 07:50:56 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H7AFk-0004ja-IJ for gnash-commit@gnu.org; Wed, 17 Jan 2007 07:50:56 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H7AFj-0004PW-5M for gnash-commit@gnu.org; Wed, 17 Jan 2007 12:50:55 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H7AFi-0004PS-PP for gnash-commit@gnu.org; Wed, 17 Jan 2007 12:50:55 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Wed, 17 Jan 2007 12:50:54 +0000 Subject: [Gnash-commit] gnash ChangeLog macros/ming.m4 X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jan 2007 12:50:58 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/17 12:50:54 Modified files: . : ChangeLog macros : ming.m4 Log message: * macros/ming.m4: prepend MING_PATH to PATH when scanning for 'makeswf'. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2123&r2=1.2124 http://cvs.savannah.gnu.org/viewcvs/gnash/macros/ming.m4?cvsroot=gnash&r1=1.10&r2=1.11 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2123 retrieving revision 1.2124 diff -u -b -r1.2123 -r1.2124 --- ChangeLog 17 Jan 2007 12:16:28 -0000 1.2123 +++ ChangeLog 17 Jan 2007 12:50:54 -0000 1.2124 @@ -1,3 +1,8 @@ +2007-01-17 Sandro Santilli + + * macros/ming.m4: prepend MING_PATH to PATH when + scanning for 'makeswf'. + 2007-01-17 Bastiaan Jacques * gui/Makefile.am: Stop calling the KDE GUI executable Klash; use Index: macros/ming.m4 =================================================================== RCS file: /sources/gnash/gnash/macros/ming.m4,v retrieving revision 1.10 retrieving revision 1.11 diff -u -b -r1.10 -r1.11 --- macros/ming.m4 9 Jan 2007 00:43:43 -0000 1.10 +++ macros/ming.m4 17 Jan 2007 12:50:54 -0000 1.11 @@ -60,7 +60,7 @@ MING_CFLAGS=`$MING_CONFIG --cflags` MING_LIBS=`$MING_CONFIG --libs` MING_PATH=`$MING_CONFIG --bindir` - AC_PATH_PROG([MAKESWF], [makeswf], , [$PATH:$MING_PATH]) + AC_PATH_PROG([MAKESWF], [makeswf], , [$MING_PATH:$PATH]) fi else AC_ARG_WITH(ming_incl, AC_HELP_STRING([--with-ming-incl], [Directory where Ming header is]), with_ming_incl=${withval}) From MAILER-DAEMON Wed Jan 17 09:00:06 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H7BKg-0003bx-EH for mharc-gnash-commit@gnu.org; Wed, 17 Jan 2007 09:00:06 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H7BKe-0003bE-J1 for gnash-commit@gnu.org; Wed, 17 Jan 2007 09:00:04 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H7BKa-0003Zg-SN for gnash-commit@gnu.org; Wed, 17 Jan 2007 09:00:03 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H7BKa-0003ZS-6h for gnash-commit@gnu.org; Wed, 17 Jan 2007 09:00:00 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H7BKZ-0003GX-ID for gnash-commit@gnu.org; Wed, 17 Jan 2007 08:59:59 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H7BKY-0007kx-2S for gnash-commit@gnu.org; Wed, 17 Jan 2007 13:59:58 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H7BKX-0007ku-OE for gnash-commit@gnu.org; Wed, 17 Jan 2007 13:59:57 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Wed, 17 Jan 2007 13:59:57 +0000 Subject: [Gnash-commit] gnash ChangeLog missing X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jan 2007 14:00:05 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/17 13:59:57 Modified files: . : ChangeLog missing Log message: * missing: fix stub for missing 'makeinfo' CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2124&r2=1.2125 http://cvs.savannah.gnu.org/viewcvs/gnash/missing?cvsroot=gnash&r1=1.1&r2=1.2 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2124 retrieving revision 1.2125 diff -u -b -r1.2124 -r1.2125 --- ChangeLog 17 Jan 2007 12:50:54 -0000 1.2124 +++ ChangeLog 17 Jan 2007 13:59:57 -0000 1.2125 @@ -1,5 +1,6 @@ 2007-01-17 Sandro Santilli + * missing: fix stub for missing 'makeinfo' * macros/ming.m4: prepend MING_PATH to PATH when scanning for 'makeswf'. Index: missing =================================================================== RCS file: /sources/gnash/gnash/missing,v retrieving revision 1.1 retrieving revision 1.2 diff -u -b -r1.1 -r1.2 --- missing 20 Dec 2005 21:03:23 -0000 1.1 +++ missing 17 Jan 2007 13:59:57 -0000 1.2 @@ -291,8 +291,11 @@ file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` + # .ext => .info + file=`echo "$file" | sed 's/\.[^\.]*/.info/'` + #file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi + echo "touch $file (cwd $PWD)" touch $file ;; From MAILER-DAEMON Wed Jan 17 09:39:37 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H7Bwv-0002eL-43 for mharc-gnash-commit@gnu.org; Wed, 17 Jan 2007 09:39:37 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H7Bwt-0002dv-TB for gnash-commit@gnu.org; Wed, 17 Jan 2007 09:39:35 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H7Bwt-0002dK-2o for gnash-commit@gnu.org; Wed, 17 Jan 2007 09:39:35 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H7Bws-0002dE-Ub for gnash-commit@gnu.org; Wed, 17 Jan 2007 09:39:34 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H7Bws-0002Gr-Md for gnash-commit@gnu.org; Wed, 17 Jan 2007 09:39:34 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H7Bwq-0001fm-00 for gnash-commit@gnu.org; Wed, 17 Jan 2007 14:39:32 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H7Bwp-0001fj-Nx for gnash-commit@gnu.org; Wed, 17 Jan 2007 14:39:31 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Wed, 17 Jan 2007 14:39:31 +0000 Subject: [Gnash-commit] gnash ChangeLog testsuite/actionscript.all/Make... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jan 2007 14:39:36 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/17 14:39:31 Modified files: . : ChangeLog testsuite/actionscript.all: Makefile.am Log message: * testsuite/actionscript.all/Makefile.am: don't distribute prebuilt test cases. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2125&r2=1.2126 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Makefile.am?cvsroot=gnash&r1=1.63&r2=1.64 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2125 retrieving revision 1.2126 diff -u -b -r1.2125 -r1.2126 --- ChangeLog 17 Jan 2007 13:59:57 -0000 1.2125 +++ ChangeLog 17 Jan 2007 14:39:31 -0000 1.2126 @@ -1,5 +1,7 @@ 2007-01-17 Sandro Santilli + * testsuite/actionscript.all/Makefile.am: don't distribute + prebuilt test cases. * missing: fix stub for missing 'makeinfo' * macros/ming.m4: prepend MING_PATH to PATH when scanning for 'makeswf'. Index: testsuite/actionscript.all/Makefile.am =================================================================== RCS file: /sources/gnash/gnash/testsuite/actionscript.all/Makefile.am,v retrieving revision 1.63 retrieving revision 1.64 diff -u -b -r1.63 -r1.64 --- testsuite/actionscript.all/Makefile.am 15 Jan 2007 14:16:06 -0000 1.63 +++ testsuite/actionscript.all/Makefile.am 17 Jan 2007 14:39:31 -0000 1.64 @@ -16,7 +16,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# $Id: Makefile.am,v 1.63 2007/01/15 14:16:06 strk Exp $ +# $Id: Makefile.am,v 1.64 2007/01/17 14:39:31 strk Exp $ AUTOMAKE_OPTIONS = dejagnu @@ -125,12 +125,6 @@ alltests-v8.swf \ $(NULL) -# The SWF files needed by the 'make check' rule. -# We will distribute them. -GENERATED = \ - $(ASTESTS_VERSIONED_OUT) \ - $(NULL) - EXTRA_DIST = $(ASTESTS) \ check.as \ dejagnu.as \ @@ -141,13 +135,6 @@ dejagnu_so_init.as \ $(NULL) -if ENABLE_MING -TARGET = $(GENERATED) -EXTRA_DIST += $(GENERATED) -else -TARGET = -endif - CLEANFILES = gnash-dbg.log \ *.as.pp *.as.swf *.vswf *swf.frame*.pp \ site.bak site.exp testrun.sum testrun.log out.swf @@ -165,13 +152,11 @@ SWFVERSION = 6 -MAINTAINERCLEANFILES = $(GENERATED) - all: -check-local: $(TARGET) +#check-local: $(TARGET) -swf: $(TARGET) +#swf: $(TARGET) ONLINETEST_RULES = v5-online-tests v6-online-tests v7-online-tests v8-online-tests online-tests vn-online-tests @@ -222,7 +207,7 @@ fi # Dependencies for all generated SWF files -$(GENERATED) $(ASTESTS_OUT) $(ASTESTS_VERSIONED_OUT) $(ONLINETEST_RULES) $(ALLTESTS_VERSIONED_OUT): require-ming dejagnu.as check.as dejagnu_so_init.as dejagnu_so_fini.as $(DEJAGNU_SO_PATH) +$(ASTESTS_OUT) $(ASTESTS_VERSIONED_OUT) $(ONLINETEST_RULES) $(ALLTESTS_VERSIONED_OUT): require-ming dejagnu.as check.as dejagnu_so_init.as dejagnu_so_fini.as $(DEJAGNU_SO_PATH) # Wrap a single .as tests in dejagnu_so importer. # At play time, if the relative url '../ming-misc.all/Dejagnu.swf' From MAILER-DAEMON Wed Jan 17 10:56:00 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H7D8p-0002f0-V9 for mharc-gnash-commit@gnu.org; Wed, 17 Jan 2007 10:55:59 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H7D8o-0002eh-9S for gnash-commit@gnu.org; Wed, 17 Jan 2007 10:55:58 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H7D8m-0002e7-Bb for gnash-commit@gnu.org; Wed, 17 Jan 2007 10:55:56 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H7D8m-0002du-6w for gnash-commit@gnu.org; Wed, 17 Jan 2007 10:55:56 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H7D8l-0002wd-JN for gnash-commit@gnu.org; Wed, 17 Jan 2007 10:55:55 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H7D8k-0005BR-9n for gnash-commit@gnu.org; Wed, 17 Jan 2007 15:55:54 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H7D8k-0005BO-0J for gnash-commit@gnu.org; Wed, 17 Jan 2007 15:55:54 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Wed, 17 Jan 2007 15:55:54 +0000 Subject: [Gnash-commit] gnash ChangeLog macros/gnashpkgtool.m4 X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jan 2007 15:55:58 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/17 15:55:53 Modified files: . : ChangeLog macros : gnashpkgtool.m4 Log message: * macros/gnashpkgtool.m4: accept pkg-config finding for CFLAGS (the bug was introduced by last commit of this file) CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2126&r2=1.2127 http://cvs.savannah.gnu.org/viewcvs/gnash/macros/gnashpkgtool.m4?cvsroot=gnash&r1=1.34&r2=1.35 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2126 retrieving revision 1.2127 diff -u -b -r1.2126 -r1.2127 --- ChangeLog 17 Jan 2007 14:39:31 -0000 1.2126 +++ ChangeLog 17 Jan 2007 15:55:53 -0000 1.2127 @@ -1,5 +1,7 @@ 2007-01-17 Sandro Santilli + * macros/gnashpkgtool.m4: accept pkg-config finding for CFLAGS + (the bug was introduced by last commit of this file) * testsuite/actionscript.all/Makefile.am: don't distribute prebuilt test cases. * missing: fix stub for missing 'makeinfo' Index: macros/gnashpkgtool.m4 =================================================================== RCS file: /sources/gnash/gnash/macros/gnashpkgtool.m4,v retrieving revision 1.34 retrieving revision 1.35 diff -u -b -r1.34 -r1.35 --- macros/gnashpkgtool.m4 17 Jan 2007 11:08:14 -0000 1.34 +++ macros/gnashpkgtool.m4 17 Jan 2007 15:55:53 -0000 1.35 @@ -14,7 +14,7 @@ dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -dnl $Id: gnashpkgtool.m4,v 1.34 2007/01/17 11:08:14 strk Exp $ +dnl $Id: gnashpkgtool.m4,v 1.35 2007/01/17 15:55:53 strk Exp $ dnl Generic macros for finding and setting include-paths and library-path dnl for packages. Implements GNASH_PKG_INCLUDES() and GNASH_PKG_LIBS(). @@ -62,12 +62,17 @@ if test x$cross_compiling = xno; then if test x"$PKG_CONFIG" != x -a x"${ac_cv_path_$1_incl}" = x; then + AC_MSG_CHECKING([for $2 header using pkg-config]) $PKG_CONFIG --exists libDOWN[] && ac_cv_path_$1_lib=`$PKG_CONFIG --cflags libDOWN[]` $PKG_CONFIG --exists DOWN[] && ac_cv_path_$1_incl=`$PKG_CONFIG --cflags DOWN[]` $PKG_CONFIG --exists lib$name && ac_cv_path_$1_lib=`$PKG_CONFIG --cflags lib$name` $PKG_CONFIG --exists $name && ac_cv_path_$1_incl=`$PKG_CONFIG --cflags $name` - AC_MSG_CHECKING([for $2 header]) - AC_MSG_RESULT(${ac_cv_path_$1_incl}) + if test x"${ac_cv_path_$1_incl}" != x; then + AC_MSG_RESULT(${ac_cv_path_$1_incl} - pkg_config) + found_$1_incl="yes" + else + AC_MSG_RESULT(not found) + fi fi fi From MAILER-DAEMON Wed Jan 17 10:57:48 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H7DAa-0004AC-6D for mharc-gnash-commit@gnu.org; Wed, 17 Jan 2007 10:57:48 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H7DAZ-000490-9R for gnash-commit@gnu.org; Wed, 17 Jan 2007 10:57:47 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H7DAY-00047r-IZ for gnash-commit@gnu.org; Wed, 17 Jan 2007 10:57:46 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H7DAY-00047Y-D2 for gnash-commit@gnu.org; Wed, 17 Jan 2007 10:57:46 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H7DAX-0003Bm-F8 for gnash-commit@gnu.org; Wed, 17 Jan 2007 10:57:45 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H7DAW-0005GS-MX for gnash-commit@gnu.org; Wed, 17 Jan 2007 15:57:44 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H7DAW-0005GP-Ew for gnash-commit@gnu.org; Wed, 17 Jan 2007 15:57:44 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Wed, 17 Jan 2007 15:57:44 +0000 Subject: [Gnash-commit] gnash/macros gnashpkgtool.m4 X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jan 2007 15:57:47 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/17 15:57:44 Modified files: macros : gnashpkgtool.m4 Log message: removed spurious debugging output CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/macros/gnashpkgtool.m4?cvsroot=gnash&r1=1.35&r2=1.36 Patches: Index: gnashpkgtool.m4 =================================================================== RCS file: /sources/gnash/gnash/macros/gnashpkgtool.m4,v retrieving revision 1.35 retrieving revision 1.36 diff -u -b -r1.35 -r1.36 --- gnashpkgtool.m4 17 Jan 2007 15:55:53 -0000 1.35 +++ gnashpkgtool.m4 17 Jan 2007 15:57:44 -0000 1.36 @@ -14,7 +14,7 @@ dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -dnl $Id: gnashpkgtool.m4,v 1.35 2007/01/17 15:55:53 strk Exp $ +dnl $Id: gnashpkgtool.m4,v 1.36 2007/01/17 15:57:44 strk Exp $ dnl Generic macros for finding and setting include-paths and library-path dnl for packages. Implements GNASH_PKG_INCLUDES() and GNASH_PKG_LIBS(). @@ -68,7 +68,7 @@ $PKG_CONFIG --exists lib$name && ac_cv_path_$1_lib=`$PKG_CONFIG --cflags lib$name` $PKG_CONFIG --exists $name && ac_cv_path_$1_incl=`$PKG_CONFIG --cflags $name` if test x"${ac_cv_path_$1_incl}" != x; then - AC_MSG_RESULT(${ac_cv_path_$1_incl} - pkg_config) + AC_MSG_RESULT(${ac_cv_path_$1_incl}) found_$1_incl="yes" else AC_MSG_RESULT(not found) From MAILER-DAEMON Wed Jan 17 11:31:42 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H7DhO-0008DW-8X for mharc-gnash-commit@gnu.org; Wed, 17 Jan 2007 11:31:42 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H7DhM-0008AM-75 for gnash-commit@gnu.org; Wed, 17 Jan 2007 11:31:40 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H7DhK-00089f-5N for gnash-commit@gnu.org; Wed, 17 Jan 2007 11:31:39 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H7DhK-00089c-26 for gnash-commit@gnu.org; Wed, 17 Jan 2007 11:31:38 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H7DhJ-0000Dd-Ex for gnash-commit@gnu.org; Wed, 17 Jan 2007 11:31:37 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H7DhC-000794-Uv for gnash-commit@gnu.org; Wed, 17 Jan 2007 16:31:31 +0000 Received: from bjacques by savannah.gnu.org with local (Exim 4.50) id 1H7DhC-00078t-JD for gnash-commit@gnu.org; Wed, 17 Jan 2007 16:31:30 +0000 To: gnash-commit@gnu.org Message-Id: From: Bastiaan Jacques Date: Wed, 17 Jan 2007 16:31:30 +0000 Subject: [Gnash-commit] gnash server/render.cpp server/render.h ChangeL... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jan 2007 16:31:40 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Bastiaan Jacques 07/01/17 16:31:30 Modified files: server : render.cpp render.h . : ChangeLog backend : render_handler.h render_handler_agg.cpp Log message: Video for AGG, part one: * backend/render_handler.h: Add get_scale() method, to retrieve the renderer's current scaling. * backend/render_handler_agg.cpp: Add a better trunc() implementation from Sandro. Implement drawVideoFrame(); scaling is not yet supported. Implement get_scale(). * server/render{.h,.cpp}: initialise s_render_handler to NULL so as to avoid reading uninitialised memory. Add and implement render::get_scale(). CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/server/render.cpp?cvsroot=gnash&r1=1.13&r2=1.14 http://cvs.savannah.gnu.org/viewcvs/gnash/server/render.h?cvsroot=gnash&r1=1.12&r2=1.13 http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2127&r2=1.2128 http://cvs.savannah.gnu.org/viewcvs/gnash/backend/render_handler.h?cvsroot=gnash&r1=1.26&r2=1.27 http://cvs.savannah.gnu.org/viewcvs/gnash/backend/render_handler_agg.cpp?cvsroot=gnash&r1=1.53&r2=1.54 Patches: Index: server/render.cpp =================================================================== RCS file: /sources/gnash/gnash/server/render.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -u -b -r1.13 -r1.14 --- server/render.cpp 6 Dec 2006 10:58:34 -0000 1.13 +++ server/render.cpp 17 Jan 2007 16:31:30 -0000 1.14 @@ -18,7 +18,7 @@ #include namespace gnash { - static render_handler* s_render_handler; + static render_handler* s_render_handler = NULL; void set_render_handler(render_handler* r) { @@ -86,6 +86,15 @@ if (s_render_handler) s_render_handler->delete_bitmap_info(bi); } + void get_scale(point& scale) { + if (s_render_handler) { + s_render_handler->get_scale(scale); + } else { + scale.m_x = 1.0; + scale.m_y = 1.0; + } + } + // Returns the format the current renderer wants videoframes in. int videoFrameFormat() { if (s_render_handler) return s_render_handler->videoFrameFormat(); Index: server/render.h =================================================================== RCS file: /sources/gnash/gnash/server/render.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -b -r1.12 -r1.13 --- server/render.h 5 Dec 2006 14:26:09 -0000 1.12 +++ server/render.h 17 Jan 2007 16:31:30 -0000 1.13 @@ -52,6 +52,8 @@ /// bitmap_info* create_bitmap_info_rgba(image::rgba* im); + void get_scale(point& scale); + /// Delete the given bitmap info struct. void delete_bitmap_info(bitmap_info* bi); Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2127 retrieving revision 1.2128 diff -u -b -r1.2127 -r1.2128 --- ChangeLog 17 Jan 2007 15:55:53 -0000 1.2127 +++ ChangeLog 17 Jan 2007 16:31:30 -0000 1.2128 @@ -19,6 +19,14 @@ * plugin/klash/Makefile.am: Stop building the klash binary. The klash code is obsolete and hasn't compiled for a while. * plugin/klash/klash_part.cpp: Use the gnash binary instead of klash. + * backend/render_handler.h: Add get_scale() method, to retrieve the + renderer's current scaling. + * backend/render_handler_agg.cpp: Add a better trunc() implementation + from Sandro. Implement drawVideoFrame(); scaling is not yet supported. + Implement get_scale(). + * server/render{.h,.cpp}: initialise s_render_handler to NULL so as to + avoid reading uninitialised memory. Add and implement + render::get_scale(). 2007-01-17 Sandro Santilli Index: backend/render_handler.h =================================================================== RCS file: /sources/gnash/gnash/backend/render_handler.h,v retrieving revision 1.26 retrieving revision 1.27 diff -u -b -r1.26 -r1.27 --- backend/render_handler.h 6 Dec 2006 11:10:05 -0000 1.26 +++ backend/render_handler.h 17 Jan 2007 16:31:30 -0000 1.27 @@ -17,7 +17,7 @@ // // -/* $Id: render_handler.h,v 1.26 2006/12/06 11:10:05 strk Exp $ */ +/* $Id: render_handler.h,v 1.27 2007/01/17 16:31:30 bjacques Exp $ */ #ifndef RENDER_HANDLER_H #define RENDER_HANDLER_H @@ -454,6 +454,9 @@ // nop } + virtual void get_scale(point& /*scale*/) { + } + protected: // Cached fill style list with just one entry used for font rendering Index: backend/render_handler_agg.cpp =================================================================== RCS file: /sources/gnash/gnash/backend/render_handler_agg.cpp,v retrieving revision 1.53 retrieving revision 1.54 diff -u -b -r1.53 -r1.54 --- backend/render_handler_agg.cpp 5 Dec 2006 15:56:40 -0000 1.53 +++ backend/render_handler_agg.cpp 17 Jan 2007 16:31:30 -0000 1.54 @@ -16,7 +16,7 @@ -/* $Id: render_handler_agg.cpp,v 1.53 2006/12/05 15:56:40 strk Exp $ */ +/* $Id: render_handler_agg.cpp,v 1.54 2007/01/17 16:31:30 bjacques Exp $ */ // Original version by Udo Giacomozzi and Hannes Mayr, // INDUNET GmbH (www.indunet.it) @@ -169,7 +169,7 @@ #include "render_handler_agg_style.h" #ifndef trunc -#define trunc(a) static_cast(a) +#define trunc(x) ( x < 0 ? -floor(-x) : floor(x) ) #endif using namespace gnash; @@ -411,10 +411,60 @@ return RGB; } - /// Draws the video frames - void drawVideoFrame(image::image_base* baseframe, const matrix* mat, const rect* bounds){ - image::rgb* frame = static_cast(frame); - //TODO: implement! + /** \brief Draws the video frames + * This implementation blits (copies) the RGB buffer provided by the caller + * directly into the Agg render buffer. + * + * @param baseframe The RGB video buffer frame. + * + * @param mat The matrix with world coordinates used to retrieve the x + * and y coordinate of the video object. + * + * @param bounds the width and height fields of this rect are used to + * determine the width and height of the RGB image to be drawn. The x and y + * members of this field are ignored. + */ + void drawVideoFrame(image::image_base* baseframe, const matrix* mat, const rect* bounds) + { + point a; + mat->transform(&a, point(bounds->get_x_min(), bounds->get_y_min())); + + int xpos = round( TWIPS_TO_PIXELS(a.m_x) ); + int ypos = round( TWIPS_TO_PIXELS(a.m_y) ); + + // TODO: handle this by only blitting part of the source RGB image. + if (xpos < 0) { + xpos = 0; + } + if (ypos < 0) { + ypos = 0; + } + + int bytes_per_pixel = 3; + image::rgb* frame = static_cast(baseframe); + + // Note that image::rgb* allocates a buffer with extra padding + // for performance purposes. Therefore, we need to use the + // actual image size so we don't copy padding bytes to the Agg + // buffer. + int frame_width = TWIPS_TO_PIXELS(bounds->width()) * bytes_per_pixel; + unsigned char* rgbbuf_ptr = frame->m_data; + unsigned char* rgbbuf_end = rgbbuf_ptr + frame_width * + frame->m_height; + + unsigned char* aggbuf_ptr = memaddr; + unsigned char* aggbuf_end = memaddr + memsize; + + // Skip the first ypos rows. + aggbuf_ptr += ypos * m_rbuf.stride(); + // Move xpos pixels to the right. + aggbuf_ptr += xpos * bytes_per_pixel; + + while(rgbbuf_ptr <= rgbbuf_end && aggbuf_ptr <= aggbuf_end) { + memcpy(aggbuf_ptr, rgbbuf_ptr, frame_width); + aggbuf_ptr += m_rbuf.stride(); + rgbbuf_ptr += frame->m_pitch; + } } @@ -1424,6 +1474,11 @@ yscale = new_yscale/20.0f; } + virtual void get_scale(point& scale) { + scale.m_x = PIXELS_TO_TWIPS(xscale); + scale.m_y = PIXELS_TO_TWIPS(yscale); + } + private: // private methods /// Returns the cache manager instance of the given character definition. From MAILER-DAEMON Wed Jan 17 18:06:37 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H7JrZ-000258-8u for mharc-gnash-commit@gnu.org; Wed, 17 Jan 2007 18:06:37 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H7JrW-00021X-Do for gnash-commit@gnu.org; Wed, 17 Jan 2007 18:06:34 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H7JrV-000218-7A for gnash-commit@gnu.org; Wed, 17 Jan 2007 18:06:33 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H7JrV-000215-2F for gnash-commit@gnu.org; Wed, 17 Jan 2007 18:06:33 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H7JrU-0001qE-Op for gnash-commit@gnu.org; Wed, 17 Jan 2007 18:06:32 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H7JrM-0000HC-Vq for gnash-commit@gnu.org; Wed, 17 Jan 2007 23:06:25 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H7JrM-0000H9-O0 for gnash-commit@gnu.org; Wed, 17 Jan 2007 23:06:24 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Wed, 17 Jan 2007 23:06:24 +0000 Subject: [Gnash-commit] gnash ChangeLog server/asobj/xml.cpp X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jan 2007 23:06:35 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/17 23:06:24 Modified files: . : ChangeLog server/asobj : xml.cpp Log message: * server/asobj/xml.cpp: use fn_call interface for function arguments access rather then as_environment one. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2128&r2=1.2129 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/xml.cpp?cvsroot=gnash&r1=1.4&r2=1.5 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2128 retrieving revision 1.2129 diff -u -b -r1.2128 -r1.2129 --- ChangeLog 17 Jan 2007 16:31:30 -0000 1.2128 +++ ChangeLog 17 Jan 2007 23:06:24 -0000 1.2129 @@ -1,3 +1,8 @@ +2007-01-18 Sandro Santilli + + * server/asobj/xml.cpp: use fn_call interface for + function arguments access rather then as_environment one. + 2007-01-17 Sandro Santilli * macros/gnashpkgtool.m4: accept pkg-config finding for CFLAGS Index: server/asobj/xml.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/xml.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- server/asobj/xml.cpp 9 Jan 2007 15:14:20 -0000 1.4 +++ server/asobj/xml.cpp 17 Jan 2007 23:06:24 -0000 1.5 @@ -14,7 +14,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -/* $Id: xml.cpp,v 1.4 2007/01/09 15:14:20 rsavoye Exp $ */ +/* $Id: xml.cpp,v 1.5 2007/01/17 23:06:24 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -885,7 +885,7 @@ xml_as_object *xml_obj = (xml_as_object*)fn.this_ptr; - const std::string filespec = fn.env->bottom(fn.first_arg_bottom_index).to_string(); + std::string filespec = fn.arg(0).to_string(); // If the file doesn't exist, don't try to do anything. if (stat(filespec.c_str(), &stats) < 0) { @@ -917,7 +917,7 @@ if (fn.this_ptr->get_member("onLoad", &method)) { // log_msg("FIXME: Found onLoad!\n"); fn.env->set_variable("success", true); - fn.env->bottom(fn.first_arg_bottom_index) = true; + fn.arg(0) = true; as_c_function_ptr func = method.to_c_function(); if (func) { // It's a C function. Call it. @@ -1113,7 +1113,7 @@ xml_as_object* ptr = (xml_as_object*) (as_object*) fn.this_ptr; assert(ptr); - std::string filespec = fn.env->bottom(fn.first_arg_bottom_index).to_string(); + std::string filespec = fn.arg(0).to_string(); //fn.result->set(ptr->obj.loaded()); fn.result->set_bool(ptr->obj.loaded()); } @@ -1147,7 +1147,7 @@ assert(ptr); if (fn.nargs > 0) { - bool deep = fn.env->bottom(fn.first_arg_bottom_index).to_bool(); + bool deep = fn.arg(0).to_bool(); xml_obj = new xmlnode_as_object; xml_obj->set_member("nodeName", as_value().set_null()); xml_obj->set_member("nodeValue", as_value()); @@ -1168,7 +1168,7 @@ const char *text; if (fn.nargs > 0) { - text = fn.env->bottom(fn.first_arg_bottom_index).to_string(); + text = fn.arg(0).to_string(); xml_obj = new xmlnode_as_object; xml_obj->set_member("nodeName", as_value(text)); xml_obj->set_member("nodeValue", as_value()); @@ -1191,7 +1191,7 @@ const char *text; if (fn.nargs > 0) { - text = fn.env->bottom(fn.first_arg_bottom_index).to_string(); + text = fn.arg(0).to_string(); xml_obj = new xmlnode_as_object; xml_obj->set_member("nodeName", as_value().set_null()); xml_obj->set_member("nodeValue", as_value(text)); @@ -1243,16 +1243,16 @@ assert(ptr); if (fn.nargs > 0) { - text = fn.env->bottom(fn.first_arg_bottom_index).to_string(); + text = fn.arg(0).to_string(); ptr->obj.parseXML(text); ptr->obj.setupFrame(ptr, ptr->obj.firstChild(), false); } #if 1 if (fn.this_ptr->get_member("onLoad", &method)) { - // log_msg("FIXME: Found onLoad!\n"); + log_msg("FIXME: Found onLoad!\n"); fn.env->set_variable("success", true); - fn.env->bottom(fn.first_arg_bottom_index) = true; + fn.arg(0) = true; as_c_function_ptr func = method.to_c_function(); if (func) { // It's a C function. Call it. From MAILER-DAEMON Thu Jan 18 06:53:42 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H7Vpu-0006dw-Eo for mharc-gnash-commit@gnu.org; Thu, 18 Jan 2007 06:53:42 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H7Vps-0006bd-Vk for gnash-commit@gnu.org; Thu, 18 Jan 2007 06:53:41 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H7Vps-0006a7-0u for gnash-commit@gnu.org; Thu, 18 Jan 2007 06:53:40 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H7Vpr-0006Zs-Rd for gnash-commit@gnu.org; Thu, 18 Jan 2007 06:53:39 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H7Vpr-0004Mk-Bi for gnash-commit@gnu.org; Thu, 18 Jan 2007 06:53:39 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H7Vpq-000813-9I for gnash-commit@gnu.org; Thu, 18 Jan 2007 11:53:38 +0000 Received: from tgc by savannah.gnu.org with local (Exim 4.50) id 1H7Vpp-000810-Lr for gnash-commit@gnu.org; Thu, 18 Jan 2007 11:53:38 +0000 To: gnash-commit@gnu.org Message-Id: From: Tomas Groth Date: Thu, 18 Jan 2007 11:53:37 +0000 Subject: [Gnash-commit] gnash ChangeLog backend/sound_handler_sdl.cpp b... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jan 2007 11:53:41 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Tomas Groth 07/01/18 11:53:37 Modified files: . : ChangeLog backend : sound_handler_sdl.cpp sound_handler_sdl.h libbase : gstgnashsrc.c gstgnashsrc.h server/asobj : NetConnection.cpp NetConnection.h NetStreamFfmpeg.cpp NetStreamFfmpeg.h Log message: * backend/sound_handler_sdl.cpp: Fixed a bug for 8=>16 bit conversion. * server/asobj/NetConnection.cpp: Removed a printf. * server/asobj/NetStreamFfmpeg.cpp: Stop the decoding thread properly, hopefully fixes bug #18571. * misc: Tried adding some cvs id tags (again)... CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2129&r2=1.2130 http://cvs.savannah.gnu.org/viewcvs/gnash/backend/sound_handler_sdl.cpp?cvsroot=gnash&r1=1.42&r2=1.43 http://cvs.savannah.gnu.org/viewcvs/gnash/backend/sound_handler_sdl.h?cvsroot=gnash&r1=1.13&r2=1.14 http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/gstgnashsrc.c?cvsroot=gnash&r1=1.3&r2=1.4 http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/gstgnashsrc.h?cvsroot=gnash&r1=1.3&r2=1.4 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetConnection.cpp?cvsroot=gnash&r1=1.15&r2=1.16 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetConnection.h?cvsroot=gnash&r1=1.11&r2=1.12 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStreamFfmpeg.cpp?cvsroot=gnash&r1=1.5&r2=1.6 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStreamFfmpeg.h?cvsroot=gnash&r1=1.2&r2=1.3 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2129 retrieving revision 1.2130 diff -u -b -r1.2129 -r1.2130 --- ChangeLog 17 Jan 2007 23:06:24 -0000 1.2129 +++ ChangeLog 18 Jan 2007 11:53:36 -0000 1.2130 @@ -1,3 +1,11 @@ +2007-01-18 Tomas Groth Christensen + + * backend/sound_handler_sdl.cpp: Fixed a bug for 8=>16 bit conversion. + * server/asobj/NetConnection.cpp: Removed a printf. + * server/asobj/NetStreamFfmpeg.cpp: Stop the decoding thread properly, + hopefully fixes bug #18571. + * misc: Tried adding some cvs id tags (again)... + 2007-01-18 Sandro Santilli * server/asobj/xml.cpp: use fn_call interface for Index: backend/sound_handler_sdl.cpp =================================================================== RCS file: /sources/gnash/gnash/backend/sound_handler_sdl.cpp,v retrieving revision 1.42 retrieving revision 1.43 diff -u -b -r1.42 -r1.43 --- backend/sound_handler_sdl.cpp 21 Dec 2006 16:56:47 -0000 1.42 +++ backend/sound_handler_sdl.cpp 18 Jan 2007 11:53:37 -0000 1.43 @@ -18,6 +18,8 @@ // Based on sound_handler_sdl.cpp by Thatcher Ulrich http://tulrich.com 2003 // which has been donated to the Public Domain. +// $Id: sound_handler_sdl.cpp,v 1.43 2007/01/18 11:53:37 tgc Exp $ + #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -592,7 +594,7 @@ { // Expand from 8 bit to 16 bit. uint8_t* in = (uint8_t*) data; - for (int i = 0; i < output_sample_count; i++) + for (int i = 0; i < output_sample_count; i += dup) { uint8_t val = *in; for (int j = 0; j < dup; j++) Index: backend/sound_handler_sdl.h =================================================================== RCS file: /sources/gnash/gnash/backend/sound_handler_sdl.h,v retrieving revision 1.13 retrieving revision 1.14 diff -u -b -r1.13 -r1.14 --- backend/sound_handler_sdl.h 30 Nov 2006 19:54:55 -0000 1.13 +++ backend/sound_handler_sdl.h 18 Jan 2007 11:53:37 -0000 1.14 @@ -14,6 +14,8 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +// $Id: sound_handler_sdl.h,v 1.14 2007/01/18 11:53:37 tgc Exp $ + #ifndef SOUND_HANDLER_SDL_H #define SOUND_HANDLER_SDL_H Index: libbase/gstgnashsrc.c =================================================================== RCS file: /sources/gnash/gnash/libbase/gstgnashsrc.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -b -r1.3 -r1.4 --- libbase/gstgnashsrc.c 15 Jan 2007 20:58:53 -0000 1.3 +++ libbase/gstgnashsrc.c 18 Jan 2007 11:53:37 -0000 1.4 @@ -17,7 +17,7 @@ // Based on the filesrc and fdsrc element in Gstreamer-core. // -/* $id$ */ +/* $Id: gstgnashsrc.c,v 1.4 2007/01/18 11:53:37 tgc Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" Index: libbase/gstgnashsrc.h =================================================================== RCS file: /sources/gnash/gnash/libbase/gstgnashsrc.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -b -r1.3 -r1.4 --- libbase/gstgnashsrc.h 15 Jan 2007 20:58:53 -0000 1.3 +++ libbase/gstgnashsrc.h 18 Jan 2007 11:53:37 -0000 1.4 @@ -17,7 +17,7 @@ // Based on the filesrc and fdsrc element in Gstreamer-core // -/* $id$ */ +/* $Id: gstgnashsrc.h,v 1.4 2007/01/18 11:53:37 tgc Exp $ */ #ifndef __GST_GNASH_SRC_H__ #define __GST_GNASH_SRC_H__ Index: server/asobj/NetConnection.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/NetConnection.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -u -b -r1.15 -r1.16 --- server/asobj/NetConnection.cpp 13 Jan 2007 20:09:25 -0000 1.15 +++ server/asobj/NetConnection.cpp 18 Jan 2007 11:53:37 -0000 1.16 @@ -14,7 +14,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -/* $id$ */ +/* $Id: NetConnection.cpp,v 1.16 2007/01/18 11:53:37 tgc Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -60,7 +60,7 @@ /*static private*/ int NetConnection::progress_callback(void *clientp, double dltotal, - double dlnow, double /*ultotal*/, double /*ulnow*/) + double /*dlnow*/, double /*ultotal*/, double /*ulnow*/) { NetConnection* stream = (NetConnection*)clientp; @@ -69,7 +69,6 @@ stream->netStreamObj->startPlayback(); stream->callback = false; }*/ - printf("\tprogress callback, cached: %lf, totalsize: %lf\n", dlnow, dltotal); return 0; } Index: server/asobj/NetConnection.h =================================================================== RCS file: /sources/gnash/gnash/server/asobj/NetConnection.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -b -r1.11 -r1.12 --- server/asobj/NetConnection.h 13 Jan 2007 20:09:25 -0000 1.11 +++ server/asobj/NetConnection.h 18 Jan 2007 11:53:37 -0000 1.12 @@ -14,7 +14,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -/* $id$ */ +/* $Id: NetConnection.h,v 1.12 2007/01/18 11:53:37 tgc Exp $ */ #ifndef __NETCONNECTION_H__ #define __NETCONNECTION_H__ Index: server/asobj/NetStreamFfmpeg.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/NetStreamFfmpeg.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -b -r1.5 -r1.6 --- server/asobj/NetStreamFfmpeg.cpp 13 Jan 2007 20:06:17 -0000 1.5 +++ server/asobj/NetStreamFfmpeg.cpp 18 Jan 2007 11:53:37 -0000 1.6 @@ -14,7 +14,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -/* $Id: NetStreamFfmpeg.cpp,v 1.5 2007/01/13 20:06:17 tgc Exp $ */ +/* $Id: NetStreamFfmpeg.cpp,v 1.6 2007/01/18 11:53:37 tgc Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -448,8 +448,8 @@ } } } - ns->set_status("NetStream.Play.Stop"); + pthread_exit(0); return 0; } @@ -576,7 +576,7 @@ video->m_stream_index = m_video_index; // set presentation timestamp - if (packet.dts != static_cast(AV_NOPTS_VALUE)) + if (packet.dts != static_cast(AV_NOPTS_VALUE)) { video->m_pts = as_double(m_video_stream->time_base) * packet.dts; } Index: server/asobj/NetStreamFfmpeg.h =================================================================== RCS file: /sources/gnash/gnash/server/asobj/NetStreamFfmpeg.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- server/asobj/NetStreamFfmpeg.h 13 Jan 2007 20:06:17 -0000 1.2 +++ server/asobj/NetStreamFfmpeg.h 18 Jan 2007 11:53:37 -0000 1.3 @@ -14,7 +14,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -/* $id: */ +/* $Id: NetStreamFfmpeg.h,v 1.3 2007/01/18 11:53:37 tgc Exp $ */ #ifndef __NETSTREAMFFMPEG_H__ #define __NETSTREAMFFMPEG_H__ From MAILER-DAEMON Thu Jan 18 08:43:14 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H7XXt-0006fF-Lu for mharc-gnash-commit@gnu.org; Thu, 18 Jan 2007 08:43:13 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H7XXq-0006by-WC for gnash-commit@gnu.org; Thu, 18 Jan 2007 08:43:11 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H7XXp-0006ZI-DD for gnash-commit@gnu.org; Thu, 18 Jan 2007 08:43:10 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H7XXp-0006Z5-4l for gnash-commit@gnu.org; Thu, 18 Jan 2007 08:43:09 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H7XXo-00016Z-EJ for gnash-commit@gnu.org; Thu, 18 Jan 2007 08:43:08 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H7XXn-000547-0N for gnash-commit@gnu.org; Thu, 18 Jan 2007 13:43:07 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H7XXm-000541-Pn for gnash-commit@gnu.org; Thu, 18 Jan 2007 13:43:06 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Thu, 18 Jan 2007 13:43:06 +0000 Subject: [Gnash-commit] gnash ChangeLog server/asobj/Global.cpp server/... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jan 2007 13:43:11 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/18 13:43:06 Modified files: . : ChangeLog server/asobj : Global.cpp xml.cpp xmlnode.cpp xmlnode.h testsuite/actionscript.all: XML.as Log message: * server/asobj/: Global.cpp, xml.cpp, xmlnode.{cpp,h}: Port XMLNode class to current correct architecture. * testsuite/actionscript.all/XML.as: unexpected pass ;) CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2130&r2=1.2131 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Global.cpp?cvsroot=gnash&r1=1.30&r2=1.31 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/xml.cpp?cvsroot=gnash&r1=1.5&r2=1.6 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/xmlnode.cpp?cvsroot=gnash&r1=1.2&r2=1.3 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/xmlnode.h?cvsroot=gnash&r1=1.2&r2=1.3 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/XML.as?cvsroot=gnash&r1=1.13&r2=1.14 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2130 retrieving revision 1.2131 diff -u -b -r1.2130 -r1.2131 --- ChangeLog 18 Jan 2007 11:53:36 -0000 1.2130 +++ ChangeLog 18 Jan 2007 13:43:06 -0000 1.2131 @@ -1,3 +1,9 @@ +2007-01-18 Sandro Santilli + + * server/asobj/: Global.cpp, xml.cpp, xmlnode.{cpp,h}: + Port XMLNode class to current correct architecture. + * testsuite/actionscript.all/XML.as: unexpected pass ;) + 2007-01-18 Tomas Groth Christensen * backend/sound_handler_sdl.cpp: Fixed a bug for 8=>16 bit conversion. Index: server/asobj/Global.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/Global.cpp,v retrieving revision 1.30 retrieving revision 1.31 diff -u -b -r1.30 -r1.31 --- server/asobj/Global.cpp 11 Jan 2007 13:29:32 -0000 1.30 +++ server/asobj/Global.cpp 18 Jan 2007 13:43:06 -0000 1.31 @@ -18,7 +18,7 @@ // Implementation of the Global ActionScript Object -/* $Id: Global.cpp,v 1.30 2007/01/11 13:29:32 strk Exp $ */ +/* $Id: Global.cpp,v 1.31 2007/01/18 13:43:06 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -457,7 +457,7 @@ selection_class_init(*this); // Selection set_member("Sound", as_value(sound_new)); set_member("XML", as_value(xml_new)); - set_member("XMLNode", as_value(xmlnode_new)); + xmlnode_class_init(*this); set_member("XMLSocket", as_value(xmlsocket_new)); set_member("Date", as_value(date_new)); mouse_class_init(*this); Index: server/asobj/xml.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/xml.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -b -r1.5 -r1.6 --- server/asobj/xml.cpp 17 Jan 2007 23:06:24 -0000 1.5 +++ server/asobj/xml.cpp 18 Jan 2007 13:43:06 -0000 1.6 @@ -14,7 +14,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -/* $Id: xml.cpp,v 1.5 2007/01/17 23:06:24 strk Exp $ */ +/* $Id: xml.cpp,v 1.6 2007/01/18 13:43:06 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1149,9 +1149,6 @@ if (fn.nargs > 0) { bool deep = fn.arg(0).to_bool(); xml_obj = new xmlnode_as_object; - xml_obj->set_member("nodeName", as_value().set_null()); - xml_obj->set_member("nodeValue", as_value()); - xml_obj->set_member("appendChild", &xmlnode_appendchild); ptr->obj.cloneNode(xml_obj->obj, deep); fn.result->set_as_object(xml_obj); } else { @@ -1170,10 +1167,7 @@ if (fn.nargs > 0) { text = fn.arg(0).to_string(); xml_obj = new xmlnode_as_object; - xml_obj->set_member("nodeName", as_value(text)); - xml_obj->set_member("nodeValue", as_value()); - xml_obj->set_member("appendChild", &xmlnode_appendchild); -// xml_obj->obj.nodeNameSet((char *)text); + xml_obj->obj.nodeNameSet((char *)text); xml_obj->obj._type = XML_ELEMENT_NODE; fn.result->set_as_object(xml_obj); } else { @@ -1184,19 +1178,19 @@ void xml_createtextnode(const fn_call& fn) { - // log_msg("%s: %d args\n", __PRETTY_FUNCTION__, fn.nargs); - xml_as_object *ptr = (xml_as_object*)fn.this_ptr; - assert(ptr); + log_msg("%s: %d args\n", __PRETTY_FUNCTION__, fn.nargs); + + assert(dynamic_cast(fn.this_ptr)); + xml_as_object *ptr = static_cast(fn.this_ptr); + xmlnode_as_object *xml_obj; const char *text; - if (fn.nargs > 0) { + if (fn.nargs > 0) + { text = fn.arg(0).to_string(); xml_obj = new xmlnode_as_object; - xml_obj->set_member("nodeName", as_value().set_null()); - xml_obj->set_member("nodeValue", as_value(text)); - xml_obj->set_member("appendChild", &xmlnode_appendchild); -// xml_obj->obj.nodeValueSet((char *)text); + xml_obj->obj.nodeValueSet(text); xml_obj->obj._type = XML_TEXT_NODE; fn.result->set_as_object(xml_obj); // log_msg("%s: xml obj is %p\n", __PRETTY_FUNCTION__, xml_obj); Index: server/asobj/xmlnode.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/xmlnode.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- server/asobj/xmlnode.cpp 9 Jan 2007 15:14:20 -0000 1.2 +++ server/asobj/xmlnode.cpp 18 Jan 2007 13:43:06 -0000 1.3 @@ -18,7 +18,7 @@ // // -/* $Id: xmlnode.cpp,v 1.2 2007/01/09 15:14:20 rsavoye Exp $ */ +/* $Id: xmlnode.cpp,v 1.3 2007/01/18 13:43:06 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -29,6 +29,7 @@ #include #include "tu_config.h" #include "fn_call.h" +#include "builtin_function.h" //#define DEBUG_MEMORY_ALLOCATION 1 @@ -48,6 +49,21 @@ namespace gnash { +static void xmlnode_new(const fn_call& fn); +static void xmlnode_haschildren(const fn_call& fn); +static void xmlnode_nodename(const fn_call& fn); +static void xmlnode_nodevalue(const fn_call& fn); +static void xmlnode_nodetype(const fn_call& fn); +static void xmlnode_appendchild(const fn_call& fn); +static void xmlnode_clonenode(const fn_call& fn); +static void xmlnode_haschildnodes(const fn_call& fn); +static void xmlnode_insertbefore(const fn_call& fn); +static void xmlnode_removenode(const fn_call& fn); +static void xmlnode_tostring(const fn_call& fn); +static void do_nothing(const fn_call& fn); +static void xmlnode_nodevalue(const fn_call& fn); +static void xmlnode_nodename(const fn_call& fn); + //std::vector _xmlobjs; // FIXME: hack alert XMLNode::XMLNode() :_name(0), _value(0), _type(XML_ELEMENT_NODE) @@ -99,26 +115,27 @@ } void -XMLNode::nodeNameSet(char *name) +XMLNode::nodeNameSet(const char *name) { int len = strlen(name) + 1; if (!_name) { _name = (char *)new char[len]; memset(_name, 0, len); - strcpy(_name, reinterpret_cast(name)); + strcpy(_name, name); } } void -XMLNode::nodeValueSet(char *value) +XMLNode::nodeValueSet(const char *value) { int len = strlen(value) + 1; if (!_value) { - _value = (char *)new char[len]; + //_value = (char *)new char[len]; + _value = new char[len]; memset(_value, 0, len); - strcpy(_value, reinterpret_cast(value)); + strcpy(_value, value); } } @@ -153,7 +170,7 @@ if (_name) { return _name; } - return "unknown"; + return NULL; } const char * @@ -162,7 +179,7 @@ if (_value) { return _value; } - return "unknown"; + return NULL; } /// \brief append a node the the XMLNode object @@ -279,33 +296,33 @@ } void -xmlnode_new(const fn_call& fn) +attachXMLNodeInterface(as_object& o) { - xmlnode_as_object *xml_obj; - //const char *data; + o.set_member("appendChild", &xmlnode_appendchild); + o.set_member("cloneNode", &xmlnode_clonenode); + o.set_member("hasChildNodes", &xmlnode_haschildnodes); + o.set_member("insertBefore", &xmlnode_insertbefore); + o.set_member("removeNode", &xmlnode_removenode); + o.set_member("toString", &xmlnode_tostring); -// log_msg("%s\n", __PRETTY_FUNCTION__); + // Properties - FIXME: use addProperty ! - xml_obj = new xmlnode_as_object; - // Methods - xml_obj->set_member("appendChild", &xmlnode_appendchild); - xml_obj->set_member("cloneNode", &xmlnode_clonenode); - xml_obj->set_member("hasChildNodes", &xmlnode_haschildnodes); - xml_obj->set_member("insertBefore", &xmlnode_insertbefore); - xml_obj->set_member("removeNode", &xmlnode_removenode); - xml_obj->set_member("toString", &xmlnode_tostring); - - // Properties - xml_obj->set_member("nodeName", as_value("")); - xml_obj->set_member("nodeValue", as_value("")); - xml_obj->set_member("nodeType", as_value("")); + boost::intrusive_ptr getter; + boost::intrusive_ptr setter; - // FIXME: these need real values - // These two return an array of objects - xml_obj->set_member("attributes", as_value("")); - xml_obj->set_member("childNodes", as_value("")); + getter = new builtin_function(&xmlnode_nodevalue, NULL); + setter = new builtin_function(&xmlnode_nodevalue, NULL); + o.add_property("nodeValue", *getter, *setter); + + getter = new builtin_function(&xmlnode_nodename, NULL); + setter = new builtin_function(&xmlnode_nodename, NULL); + o.add_property("nodeName", *getter, *setter); - //These return a reference to an object + o.set_member("nodeType", as_value("")); + + // These two return an array of objects + o.set_member("attributes", as_value("")); + o.set_member("childNodes", as_value("")); /// \fn MLNode::firstChild /// \brief XMLNode::firstChild property @@ -317,8 +334,8 @@ /// node. This is a read-only property and cannot be used to /// manipulate child nodes; use the appendChild(), insertBefore(), /// and removeNode() methods to manipulate child nodes. + o.set_member("firstChild", as_value("")); - xml_obj->set_member("firstChild", as_value("")); /// \fn MLNode::lastChild /// \brief XMLNode::lastChild property /// @@ -328,15 +345,48 @@ /// be used to manipulate child nodes; use the appendChild(), /// insertBefore(), and removeNode() methods to manipulate child /// nodes. - xml_obj->set_member("lastChild", as_value("")); - xml_obj->set_member("nextSibling", as_value("")); - xml_obj->set_member("parentNode", as_value("")); - xml_obj->set_member("previousSibling", as_value("")); + o.set_member("lastChild", as_value("")); + + o.set_member("nextSibling", as_value("")); + + o.set_member("parentNode", as_value("")); + + o.set_member("previousSibling", as_value("")); +} + +static as_object* +getXMLNodeInterface() +{ + static boost::intrusive_ptr o; + if ( o == NULL ) + { + o = new as_object(); + attachXMLNodeInterface(*o); + } + return o.get(); +} + +xmlnode_as_object::xmlnode_as_object() + : + as_object(getXMLNodeInterface()) +{ +} + +static void +xmlnode_new(const fn_call& fn) +{ + xmlnode_as_object *xml_obj; + //const char *data; + +// log_msg("%s\n", __PRETTY_FUNCTION__); + + xml_obj = new xmlnode_as_object; fn.result->set_as_object(xml_obj); } -void xmlnode_appendchild(const fn_call& fn) +static void +xmlnode_appendchild(const fn_call& fn) { xmlnode_as_object *ptr = (xmlnode_as_object*)fn.this_ptr; assert(ptr); @@ -366,7 +416,8 @@ // ptr->obj.nodeValueSet((char *)xmlnode_obj->obj.nodeValue()); } -void xmlnode_clonenode(const fn_call& fn) +static void +xmlnode_clonenode(const fn_call& fn) { log_msg("%s: %d args\n", __PRETTY_FUNCTION__, fn.nargs); xmlnode_as_object *ptr = (xmlnode_as_object*)fn.this_ptr; @@ -384,7 +435,8 @@ } -void xmlnode_insertbefore(const fn_call& fn) +static void +xmlnode_insertbefore(const fn_call& fn) { xmlnode_as_object *ptr = (xmlnode_as_object*)fn.this_ptr; assert(ptr); @@ -393,7 +445,8 @@ // ptr->obj.insertBefore(); log_msg("%s:unimplemented \n", __PRETTY_FUNCTION__); } -void xmlnode_removenode(const fn_call& fn) +static void +xmlnode_removenode(const fn_call& fn) { xmlnode_as_object *ptr = (xmlnode_as_object*)fn.this_ptr; assert(ptr); @@ -401,7 +454,8 @@ // fn.result->set_int(ptr->obj.getAllocated()); ptr->obj.removeNode(); } -void xmlnode_tostring(const fn_call& fn) +static void +xmlnode_tostring(const fn_call& fn) { xmlnode_as_object *ptr = (xmlnode_as_object*)fn.this_ptr; assert(ptr); @@ -409,31 +463,79 @@ fn.result->set_string(ptr->obj.toString()); } -void xmlnode_haschildnodes(const fn_call& fn) +static void +xmlnode_haschildnodes(const fn_call& fn) { xmlnode_as_object *ptr = (xmlnode_as_object*)fn.this_ptr; assert(ptr); fn.result->set_bool(ptr->obj.hasChildNodes()); } -#ifdef ENABLE_TESTING -void xmlnode_nodevalue(const fn_call& fn) +static void +do_nothing(const fn_call& fn) { - log_msg("%s: \n", __PRETTY_FUNCTION__); - xmlnode_as_object *ptr = (xmlnode_as_object*)fn.this_ptr; - assert(ptr); + log_msg("Doing nothing"); +} + +// Both a getter and a setter for nodeValue +static void +xmlnode_nodevalue(const fn_call& fn) +{ + GNASH_REPORT_FUNCTION; - fn.result->set_string(ptr->obj.nodeValue()); + assert(dynamic_cast(fn.this_ptr)); + xmlnode_as_object *ptr = static_cast(fn.this_ptr); + + if ( fn.nargs == 0 ) { + const char* val = ptr->obj.nodeValue(); + if ( val ) { + fn.result->set_string(val); + } else { + fn.result->set_null(); + } + } else { + ptr->obj.nodeValueSet(fn.arg(0).to_string()); + } } -void xmlnode_nodename(const fn_call& fn) + +// Both a getter and a setter for nodeName +static void +xmlnode_nodename(const fn_call& fn) { - log_msg("%s: \n", __PRETTY_FUNCTION__); - xmlnode_as_object *ptr = (xmlnode_as_object*)fn.this_ptr; - assert(ptr); + assert(dynamic_cast(fn.this_ptr)); + xmlnode_as_object *ptr = static_cast(fn.this_ptr); + + if ( fn.nargs == 0 ) { + const char* val = ptr->obj.nodeName(); + if ( val ) { + fn.result->set_string(val); + } else { + fn.result->set_null(); + } + } else { + ptr->obj.nodeNameSet(fn.arg(0).to_string()); + } +} + +// extern (used by Global.cpp) +void xmlnode_class_init(as_object& global) +{ + // This is going to be the global XMLNode "class"/"function" + static boost::intrusive_ptr cl; + + if ( cl == NULL ) + { + cl=new builtin_function(&xmlnode_new, getXMLNodeInterface()); + // replicate all interface to class, to be able to access + // all methods as static functions + attachXMLNodeInterface(*cl); + + } + + // Register _global.String + global.set_member("XMLNode", cl.get()); - fn.result->set_string(ptr->obj.nodeName()); } -#endif } // end of gnash namespace Index: server/asobj/xmlnode.h =================================================================== RCS file: /sources/gnash/gnash/server/asobj/xmlnode.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- server/asobj/xmlnode.h 9 Jan 2007 15:14:20 -0000 1.2 +++ server/asobj/xmlnode.h 18 Jan 2007 13:43:06 -0000 1.3 @@ -58,8 +58,8 @@ // char *valueGet(); - void nodeNameSet(char *name); - void nodeValueSet(char *value); + void nodeNameSet(const char *name); + void nodeValueSet(const char *value); // nodeType XML.nodeType bool hasChildNodes() { @@ -124,6 +124,9 @@ { public: XMLNode obj; + + xmlnode_as_object(); + // int _padding; #ifdef DEBUG_MEMORY_ALLOCATION @@ -137,19 +140,8 @@ #endif }; -DSOEXPORT void xmlnode_new(const fn_call& fn); - -DSOEXPORT void xmlnode_haschildren(const fn_call& fn); -DSOEXPORT void xmlnode_nodename(const fn_call& fn); -DSOEXPORT void xmlnode_nodevalue(const fn_call& fn); -DSOEXPORT void xmlnode_nodetype(const fn_call& fn); - -DSOEXPORT void xmlnode_appendchild(const fn_call& fn); -DSOEXPORT void xmlnode_clonenode(const fn_call& fn); -DSOEXPORT void xmlnode_haschildnodes(const fn_call& fn); -DSOEXPORT void xmlnode_insertbefore(const fn_call& fn); -DSOEXPORT void xmlnode_removenode(const fn_call& fn); -DSOEXPORT void xmlnode_tostring(const fn_call& fn); +// Initialize the global XMLNode class +void xmlnode_class_init(as_object& global); } // end of gnash namespace Index: testsuite/actionscript.all/XML.as =================================================================== RCS file: /sources/gnash/gnash/testsuite/actionscript.all/XML.as,v retrieving revision 1.13 retrieving revision 1.14 diff -u -b -r1.13 -r1.14 --- testsuite/actionscript.all/XML.as 21 Dec 2006 14:12:00 -0000 1.13 +++ testsuite/actionscript.all/XML.as 18 Jan 2007 13:43:06 -0000 1.14 @@ -22,7 +22,7 @@ // compile this test case with Ming makeswf, and then // execute it like this gnash -1 -r 0 -v out.swf -rcsid="$Id: XML.as,v 1.13 2006/12/21 14:12:00 strk Exp $"; +rcsid="$Id: XML.as,v 1.14 2007/01/18 13:43:06 strk Exp $"; #include "dejagnu.as" #include "utils.as" @@ -277,7 +277,7 @@ check(getElement.appendChild); check(textElement); -xcheck_equals(getElement.hasChildNodes(), false); +check_equals(getElement.hasChildNodes(), false); getElement.appendChild(textElement); if ( getElement.hasChildNodes() ) { From MAILER-DAEMON Thu Jan 18 09:23:23 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H7YAl-00027T-DJ for mharc-gnash-commit@gnu.org; Thu, 18 Jan 2007 09:23:23 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H7YAk-00025S-Bd for gnash-commit@gnu.org; Thu, 18 Jan 2007 09:23:22 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H7YAj-00022E-1g for gnash-commit@gnu.org; Thu, 18 Jan 2007 09:23:21 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H7YAi-00021o-Lu for gnash-commit@gnu.org; Thu, 18 Jan 2007 09:23:20 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H7YAh-0000hZ-BZ for gnash-commit@gnu.org; Thu, 18 Jan 2007 09:23:19 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H7YAg-0005sU-4u for gnash-commit@gnu.org; Thu, 18 Jan 2007 14:23:18 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H7YAf-0005sR-Oo for gnash-commit@gnu.org; Thu, 18 Jan 2007 14:23:18 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Thu, 18 Jan 2007 14:23:17 +0000 Subject: [Gnash-commit] gnash ChangeLog server/asobj/xmlnode.cpp server... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jan 2007 14:23:22 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/18 14:23:17 Modified files: . : ChangeLog server/asobj : xmlnode.cpp xmlnode.h testsuite/actionscript.all: XMLNode.as Log message: * server/asobj/xmlnode.{cpp,h}: (nodeValueSet): always replace previous value. (xmlnode_nodevalue, xmlnode_nodename): act both as a setter and a getter. * testsuite/actionscript.all/XMLNode.as: another unexpected success. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2131&r2=1.2132 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/xmlnode.cpp?cvsroot=gnash&r1=1.3&r2=1.4 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/xmlnode.h?cvsroot=gnash&r1=1.3&r2=1.4 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/XMLNode.as?cvsroot=gnash&r1=1.6&r2=1.7 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2131 retrieving revision 1.2132 diff -u -b -r1.2131 -r1.2132 --- ChangeLog 18 Jan 2007 13:43:06 -0000 1.2131 +++ ChangeLog 18 Jan 2007 14:23:17 -0000 1.2132 @@ -1,5 +1,12 @@ 2007-01-18 Sandro Santilli + * server/asobj/xmlnode.{cpp,h}: (nodeValueSet): always replace + previous value. (xmlnode_nodevalue, xmlnode_nodename): act + both as a setter and a getter. + * testsuite/actionscript.all/XMLNode.as: another unexpected success. + +2007-01-18 Sandro Santilli + * server/asobj/: Global.cpp, xml.cpp, xmlnode.{cpp,h}: Port XMLNode class to current correct architecture. * testsuite/actionscript.all/XML.as: unexpected pass ;) Index: server/asobj/xmlnode.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/xmlnode.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -b -r1.3 -r1.4 --- server/asobj/xmlnode.cpp 18 Jan 2007 13:43:06 -0000 1.3 +++ server/asobj/xmlnode.cpp 18 Jan 2007 14:23:17 -0000 1.4 @@ -18,7 +18,7 @@ // // -/* $Id: xmlnode.cpp,v 1.3 2007/01/18 13:43:06 strk Exp $ */ +/* $Id: xmlnode.cpp,v 1.4 2007/01/18 14:23:17 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -60,7 +60,6 @@ static void xmlnode_insertbefore(const fn_call& fn); static void xmlnode_removenode(const fn_call& fn); static void xmlnode_tostring(const fn_call& fn); -static void do_nothing(const fn_call& fn); static void xmlnode_nodevalue(const fn_call& fn); static void xmlnode_nodename(const fn_call& fn); @@ -131,12 +130,11 @@ { int len = strlen(value) + 1; - if (!_value) { - //_value = (char *)new char[len]; + // Should we use std::string here ? + delete [] _value; _value = new char[len]; memset(_value, 0, len); strcpy(_value, value); - } } /// \brief Get the type of an XML Node. @@ -382,6 +380,15 @@ xml_obj = new xmlnode_as_object; + if ( fn.nargs > 0 ) + { + xml_obj->obj.nodeTypeSet(static_cast(fn.arg(0).to_number())); + if ( fn.nargs > 1 ) + { + xml_obj->obj.nodeValueSet(fn.arg(1).to_string()); + } + } + fn.result->set_as_object(xml_obj); } @@ -471,22 +478,18 @@ fn.result->set_bool(ptr->obj.hasChildNodes()); } -static void -do_nothing(const fn_call& fn) -{ - log_msg("Doing nothing"); -} - // Both a getter and a setter for nodeValue static void xmlnode_nodevalue(const fn_call& fn) { - GNASH_REPORT_FUNCTION; + //GNASH_REPORT_FUNCTION; assert(dynamic_cast(fn.this_ptr)); xmlnode_as_object *ptr = static_cast(fn.this_ptr); + //log_msg("xmlnode_nodevalue called with %d args against 'this' = %p", fn.nargs, ptr); if ( fn.nargs == 0 ) { + //log_msg(" nodeValue() returns '%s'", ptr->obj.nodeValue()); const char* val = ptr->obj.nodeValue(); if ( val ) { fn.result->set_string(val); @@ -494,6 +497,7 @@ fn.result->set_null(); } } else { + //log_msg(" arg(0) == '%s'", fn.arg(0).to_string()); ptr->obj.nodeValueSet(fn.arg(0).to_string()); } } Index: server/asobj/xmlnode.h =================================================================== RCS file: /sources/gnash/gnash/server/asobj/xmlnode.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -b -r1.3 -r1.4 --- server/asobj/xmlnode.h 18 Jan 2007 13:43:06 -0000 1.3 +++ server/asobj/xmlnode.h 18 Jan 2007 14:23:17 -0000 1.4 @@ -55,10 +55,19 @@ const char *nodeName(); const char *nodeValue(); int nodeType(); + void nodeTypeSet(xmlElementType type) { + _type = type; + } // char *valueGet(); + /// Set name of this node, but only if it doesn't have a name yet + // + /// TODO: check if this is the correct behaviour + /// void nodeNameSet(const char *name); + + /// Set value of this node, overriding any previous value void nodeValueSet(const char *value); // nodeType XML.nodeType Index: testsuite/actionscript.all/XMLNode.as =================================================================== RCS file: /sources/gnash/gnash/testsuite/actionscript.all/XMLNode.as,v retrieving revision 1.6 retrieving revision 1.7 diff -u -b -r1.6 -r1.7 --- testsuite/actionscript.all/XMLNode.as 27 Nov 2006 09:17:28 -0000 1.6 +++ testsuite/actionscript.all/XMLNode.as 18 Jan 2007 14:23:17 -0000 1.7 @@ -22,7 +22,7 @@ // compile this test case with Ming makeswf, and then // execute it like this gnash -1 -r 0 -v out.swf -rcsid="$Id: XMLNode.as,v 1.6 2006/11/27 09:17:28 strk Exp $"; +rcsid="$Id: XMLNode.as,v 1.7 2007/01/18 14:23:17 strk Exp $"; #include "dejagnu.as" @@ -48,7 +48,7 @@ textnode.nodeName = "foo"; check_equals(textnode.nodeName, "foo"); -xcheck_equals (textnode.nodeValue, "text content"); +check_equals (textnode.nodeValue, "text content"); textnode.nodeValue = "bar"; check_equals (textnode.nodeValue, "bar"); From MAILER-DAEMON Thu Jan 18 10:33:17 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H7ZGP-000201-Ak for mharc-gnash-commit@gnu.org; Thu, 18 Jan 2007 10:33:17 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H7ZGO-0001zQ-0E for gnash-commit@gnu.org; Thu, 18 Jan 2007 10:33:16 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H7ZGM-0001y5-2h for gnash-commit@gnu.org; Thu, 18 Jan 2007 10:33:15 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H7ZGL-0001xx-L3 for gnash-commit@gnu.org; Thu, 18 Jan 2007 10:33:13 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H7ZGA-0004QP-V9 for gnash-commit@gnu.org; Thu, 18 Jan 2007 10:33:03 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H7ZEy-0000IR-Pb for gnash-commit@gnu.org; Thu, 18 Jan 2007 15:31:48 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H7ZEP-0000HH-Kh for gnash-commit@gnu.org; Thu, 18 Jan 2007 15:31:13 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Thu, 18 Jan 2007 15:31:13 +0000 Subject: [Gnash-commit] gnash ChangeLog server/asobj/xml.cpp server/aso... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jan 2007 15:33:16 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/18 15:30:53 Modified files: . : ChangeLog server/asobj : xml.cpp xmlnode.cpp xmlnode.h testsuite/actionscript.all: XMLNode.as Log message: * server/asobj/: xml.cpp, xmlnode.{cpp,h}: drop xmlnode_as_object, making XMLNode a direct subclass of as_object; Implement or stub many properties as actual *properties* (new layout). * testsuite/actionscript.all/XMLNode.as: other unexpected successes. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2132&r2=1.2133 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/xml.cpp?cvsroot=gnash&r1=1.6&r2=1.7 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/xmlnode.cpp?cvsroot=gnash&r1=1.4&r2=1.5 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/xmlnode.h?cvsroot=gnash&r1=1.4&r2=1.5 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/XMLNode.as?cvsroot=gnash&r1=1.7&r2=1.8 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2132 retrieving revision 1.2133 diff -u -b -r1.2132 -r1.2133 --- ChangeLog 18 Jan 2007 14:23:17 -0000 1.2132 +++ ChangeLog 18 Jan 2007 15:30:53 -0000 1.2133 @@ -1,5 +1,12 @@ 2007-01-18 Sandro Santilli + * server/asobj/: xml.cpp, xmlnode.{cpp,h}: drop xmlnode_as_object, + making XMLNode a direct subclass of as_object; Implement or stub + many properties as actual *properties* (new layout). + * testsuite/actionscript.all/XMLNode.as: other unexpected successes. + +2007-01-18 Sandro Santilli + * server/asobj/xmlnode.{cpp,h}: (nodeValueSet): always replace previous value. (xmlnode_nodevalue, xmlnode_nodename): act both as a setter and a getter. Index: server/asobj/xml.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/xml.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -b -r1.6 -r1.7 --- server/asobj/xml.cpp 18 Jan 2007 13:43:06 -0000 1.6 +++ server/asobj/xml.cpp 18 Jan 2007 15:30:53 -0000 1.7 @@ -14,7 +14,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -/* $Id: xml.cpp,v 1.6 2007/01/18 13:43:06 strk Exp $ */ +/* $Id: xml.cpp,v 1.7 2007/01/18 15:30:53 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -594,7 +594,7 @@ int length; as_value inum; XMLNode *childnode; - xmlnode_as_object *xmlchildnode_obj; + XMLNode *xmlchildnode_obj; xmlattr_as_object* attr_obj; //log_msg("\t%s: processing node %s for object %p, mem is %d\n", __FUNCTION__, xml->_name, obj, mem); @@ -652,7 +652,7 @@ inum = 0; for (child=0; childtop(0).to_object(); + XMLNode *xml_obj = (XMLNode*)fn.env->top(0).to_object(); - ptr->obj.appendChild(&(xml_obj->obj)); + ptr->obj.appendChild(xml_obj); } void xml_clonenode(const fn_call& fn) { log_msg("%s: %d args\n", __PRETTY_FUNCTION__, fn.nargs); xml_as_object *ptr = (xml_as_object*)fn.this_ptr; - xmlnode_as_object *xml_obj; + XMLNode *xml_obj; assert(ptr); if (fn.nargs > 0) { bool deep = fn.arg(0).to_bool(); - xml_obj = new xmlnode_as_object; - ptr->obj.cloneNode(xml_obj->obj, deep); + xml_obj = new XMLNode; + ptr->obj.cloneNode(*xml_obj, deep); fn.result->set_as_object(xml_obj); } else { log_msg("ERROR: no Depth paramater!\n"); @@ -1161,14 +1161,14 @@ // log_msg("%s: %d args\n", __PRETTY_FUNCTION__, fn.nargs); xml_as_object *ptr = (xml_as_object*)fn.this_ptr; assert(ptr); - xmlnode_as_object *xml_obj; + XMLNode *xml_obj; const char *text; if (fn.nargs > 0) { text = fn.arg(0).to_string(); - xml_obj = new xmlnode_as_object; - xml_obj->obj.nodeNameSet((char *)text); - xml_obj->obj._type = XML_ELEMENT_NODE; + xml_obj = new XMLNode; + xml_obj->nodeNameSet(text); + xml_obj->nodeTypeSet(XML_ELEMENT_NODE); fn.result->set_as_object(xml_obj); } else { log_msg("ERROR: no text for element creation!\n"); @@ -1180,18 +1180,18 @@ { log_msg("%s: %d args\n", __PRETTY_FUNCTION__, fn.nargs); - assert(dynamic_cast(fn.this_ptr)); - xml_as_object *ptr = static_cast(fn.this_ptr); + //assert(dynamic_cast(fn.this_ptr)); + //xml_as_object *ptr = static_cast(fn.this_ptr); - xmlnode_as_object *xml_obj; + XMLNode *xml_obj; const char *text; if (fn.nargs > 0) { text = fn.arg(0).to_string(); - xml_obj = new xmlnode_as_object; - xml_obj->obj.nodeValueSet(text); - xml_obj->obj._type = XML_TEXT_NODE; + xml_obj = new XMLNode; + xml_obj->nodeValueSet(text); + xml_obj->nodeTypeSet(XML_TEXT_NODE); fn.result->set_as_object(xml_obj); // log_msg("%s: xml obj is %p\n", __PRETTY_FUNCTION__, xml_obj); } else { Index: server/asobj/xmlnode.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/xmlnode.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- server/asobj/xmlnode.cpp 18 Jan 2007 14:23:17 -0000 1.4 +++ server/asobj/xmlnode.cpp 18 Jan 2007 15:30:53 -0000 1.5 @@ -18,7 +18,7 @@ // // -/* $Id: xmlnode.cpp,v 1.4 2007/01/18 14:23:17 strk Exp $ */ +/* $Id: xmlnode.cpp,v 1.5 2007/01/18 15:30:53 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -60,12 +60,22 @@ static void xmlnode_insertbefore(const fn_call& fn); static void xmlnode_removenode(const fn_call& fn); static void xmlnode_tostring(const fn_call& fn); -static void xmlnode_nodevalue(const fn_call& fn); static void xmlnode_nodename(const fn_call& fn); +static void xmlnode_firstchild(const fn_call& fn); +static void xmlnode_lastchild(const fn_call& fn); +static void xmlnode_nextsibling(const fn_call& fn); +static void xmlnode_previoussibling(const fn_call& fn); +static as_object* getXMLNodeInterface(); + //std::vector _xmlobjs; // FIXME: hack alert -XMLNode::XMLNode() :_name(0), _value(0), _type(XML_ELEMENT_NODE) +XMLNode::XMLNode() + : + as_object(getXMLNodeInterface()), + _name(0), + _value(0), + _type(XML_ELEMENT_NODE) { //log_msg("%s: %p \n", __PRETTY_FUNCTION__, this); #ifdef DEBUG_MEMORY_ALLOCATION @@ -191,20 +201,24 @@ /// already exists in another XMLNode tree structure, the appended child /// node is placed in the new tree structure after it is removed from /// its existing parent node. +/// +/// @param as +/// The XMLNode ? +/// +/// @param node +/// same as XMLNode::obj ? +/// void -XMLNode::appendChild(as_object *as, XMLNode *node) +XMLNode::appendChild(XMLNode *node) { // log_msg("%s: %p, as is %d, node is %d\n", -// __PRETTY_FUNCTION__, this, _objects.size(), _children.size()); +// __PRETTY_FUNCTION__, this, _children.size(), _children.size()); +// if (node) { _children.push_back(node); } - if (as) { - _objects.push_back(as); - } - // log_msg("%s: partially unimplemented\n", __PRETTY_FUNCTION__); } @@ -271,24 +285,24 @@ return "Hello World!"; } -as_object * +XMLNode * XMLNode::previousSibling(int x) { log_msg("%s: partially implemented. " SIZET_FMT " objects\n", - __PRETTY_FUNCTION__, _objects.size()); - if (_objects.size() > 0) { - return _objects[x-1]; + __PRETTY_FUNCTION__, _children.size()); + if (_children.size() > 0) { + return _children[x-1]; } return NULL; } -as_object * +XMLNode * XMLNode::nextSibling(int x) { log_msg("%s: unimplemented \n", __PRETTY_FUNCTION__); - if (x < (int) _objects.size()) { - return _objects[x]; + if (x < (int) _children.size()) { + return _children[x]; } return NULL; } @@ -305,18 +319,16 @@ // Properties - FIXME: use addProperty ! - boost::intrusive_ptr getter; - boost::intrusive_ptr setter; + boost::intrusive_ptr gettersetter; - getter = new builtin_function(&xmlnode_nodevalue, NULL); - setter = new builtin_function(&xmlnode_nodevalue, NULL); - o.add_property("nodeValue", *getter, *setter); - - getter = new builtin_function(&xmlnode_nodename, NULL); - setter = new builtin_function(&xmlnode_nodename, NULL); - o.add_property("nodeName", *getter, *setter); + gettersetter = new builtin_function(&xmlnode_nodevalue, NULL); + o.add_property("nodeValue", *gettersetter, *gettersetter); - o.set_member("nodeType", as_value("")); + gettersetter = new builtin_function(&xmlnode_nodename, NULL); + o.add_property("nodeName", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&xmlnode_nodetype, NULL); + o.add_property("nodeType", *gettersetter, *gettersetter); // These two return an array of objects o.set_member("attributes", as_value("")); @@ -332,7 +344,8 @@ /// node. This is a read-only property and cannot be used to /// manipulate child nodes; use the appendChild(), insertBefore(), /// and removeNode() methods to manipulate child nodes. - o.set_member("firstChild", as_value("")); + gettersetter = new builtin_function(&xmlnode_firstchild, NULL); + o.add_property("firstChild", *gettersetter, *gettersetter); /// \fn MLNode::lastChild /// \brief XMLNode::lastChild property @@ -343,13 +356,17 @@ /// be used to manipulate child nodes; use the appendChild(), /// insertBefore(), and removeNode() methods to manipulate child /// nodes. - o.set_member("lastChild", as_value("")); + gettersetter = new builtin_function(&xmlnode_lastchild, NULL); + o.add_property("lastChild", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&xmlnode_nextsibling, NULL); + o.add_property("nextSibling", *gettersetter, *gettersetter); - o.set_member("nextSibling", as_value("")); + gettersetter = new builtin_function(&xmlnode_previoussibling, NULL); + o.add_property("previousSibling", *gettersetter, *gettersetter); - o.set_member("parentNode", as_value("")); + o.set_member("parentNode", as_value().set_null()); - o.set_member("previousSibling", as_value("")); } static as_object* @@ -364,28 +381,22 @@ return o.get(); } -xmlnode_as_object::xmlnode_as_object() - : - as_object(getXMLNodeInterface()) -{ -} - static void xmlnode_new(const fn_call& fn) { - xmlnode_as_object *xml_obj; + XMLNode *xml_obj; //const char *data; // log_msg("%s\n", __PRETTY_FUNCTION__); - xml_obj = new xmlnode_as_object; + xml_obj = new XMLNode; if ( fn.nargs > 0 ) { - xml_obj->obj.nodeTypeSet(static_cast(fn.arg(0).to_number())); + xml_obj->nodeTypeSet(static_cast(fn.arg(0).to_number())); if ( fn.nargs > 1 ) { - xml_obj->obj.nodeValueSet(fn.arg(1).to_string()); + xml_obj->nodeValueSet(fn.arg(1).to_string()); } } @@ -395,29 +406,25 @@ static void xmlnode_appendchild(const fn_call& fn) { - xmlnode_as_object *ptr = (xmlnode_as_object*)fn.this_ptr; + XMLNode *ptr = (XMLNode*)fn.this_ptr; assert(ptr); // log_msg("%s: %p, %d args\n", __PRETTY_FUNCTION__, ptr, fn.nargs); - xmlnode_as_object *xml_obj = (xmlnode_as_object*)fn.env->bottom(fn.first_arg_bottom_index).to_object(); + XMLNode *node = dynamic_cast(fn.arg(0).to_object()); // log_msg("%s: %p \n", __PRETTY_FUNCTION__, xml_obj); - XMLNode *node = &(xml_obj->obj); - if (ptr->obj.hasChildNodes() == false) { - ptr->set_member("firstChild", xml_obj); - } - int length = ptr->obj.length(); + int length = ptr->length(); if (length > 0) { - as_object *ass = xml_obj->obj.previousSibling(length); + XMLNode *ass = node->previousSibling(length); // or is it 'ptr' ?? // FIXME: This shouldn't always be NULL // log_msg("%s: ASS is %p, length is %d\n", __PRETTY_FUNCTION__, // ass, length); - ptr->set_member("previousSibling", ass); + ptr->set_member("previousSibling", ass); // FIXME: don't do this, rely on getter/setter // ptr->set_member("nextSibling", xml_obj->obj.nextSibling(ptr->obj.length())); } - ptr->obj.appendChild((as_object *)xml_obj, node); + ptr->appendChild(node); // The last child in the list is always the one we just appended - ptr->set_member("lastChild", xml_obj); + ptr->set_member("lastChild", node); // FIXME: don't do this, rely on getter/setter // ptr->obj.appendChild(&(xml_obj->obj)); // ptr->obj.nodeValueSet((char *)xmlnode_obj->obj.nodeValue()); @@ -427,14 +434,14 @@ xmlnode_clonenode(const fn_call& fn) { log_msg("%s: %d args\n", __PRETTY_FUNCTION__, fn.nargs); - xmlnode_as_object *ptr = (xmlnode_as_object*)fn.this_ptr; - xmlnode_as_object *xmlnode_obj; + XMLNode *ptr = (XMLNode*)fn.this_ptr; + XMLNode *xmlnode_obj; assert(ptr); if (fn.nargs > 0) { - bool deep = fn.env->bottom(fn.first_arg_bottom_index).to_bool(); - xmlnode_obj = new xmlnode_as_object; - ptr->obj.cloneNode(xmlnode_obj->obj, deep); + bool deep = fn.arg(0).to_bool(); + xmlnode_obj = new XMLNode; + ptr->cloneNode(*xmlnode_obj, deep); fn.result->set_as_object(xmlnode_obj); } else { log_msg("ERROR: no Depth paramater!\n"); @@ -445,7 +452,7 @@ static void xmlnode_insertbefore(const fn_call& fn) { - xmlnode_as_object *ptr = (xmlnode_as_object*)fn.this_ptr; + XMLNode *ptr = (XMLNode*)fn.this_ptr; assert(ptr); // fn.result->set_int(ptr->obj.getAllocated()); @@ -455,27 +462,29 @@ static void xmlnode_removenode(const fn_call& fn) { - xmlnode_as_object *ptr = (xmlnode_as_object*)fn.this_ptr; + XMLNode *ptr = (XMLNode*)fn.this_ptr; assert(ptr); // fn.result->set_int(ptr->obj.getAllocated()); - ptr->obj.removeNode(); + ptr->removeNode(); } + +// TODO: shouldn't overriding get_text_value() be fine ? static void xmlnode_tostring(const fn_call& fn) { - xmlnode_as_object *ptr = (xmlnode_as_object*)fn.this_ptr; + XMLNode *ptr = (XMLNode*)fn.this_ptr; assert(ptr); - fn.result->set_string(ptr->obj.toString()); + fn.result->set_string(ptr->toString()); } static void xmlnode_haschildnodes(const fn_call& fn) { - xmlnode_as_object *ptr = (xmlnode_as_object*)fn.this_ptr; + XMLNode *ptr = (XMLNode*)fn.this_ptr; assert(ptr); - fn.result->set_bool(ptr->obj.hasChildNodes()); + fn.result->set_bool(ptr->hasChildNodes()); } // Both a getter and a setter for nodeValue @@ -484,13 +493,13 @@ { //GNASH_REPORT_FUNCTION; - assert(dynamic_cast(fn.this_ptr)); - xmlnode_as_object *ptr = static_cast(fn.this_ptr); + assert(dynamic_cast(fn.this_ptr)); + XMLNode *ptr = static_cast(fn.this_ptr); //log_msg("xmlnode_nodevalue called with %d args against 'this' = %p", fn.nargs, ptr); if ( fn.nargs == 0 ) { - //log_msg(" nodeValue() returns '%s'", ptr->obj.nodeValue()); - const char* val = ptr->obj.nodeValue(); + //log_msg(" nodeValue() returns '%s'", ptr->nodeValue()); + const char* val = ptr->nodeValue(); if ( val ) { fn.result->set_string(val); } else { @@ -498,7 +507,7 @@ } } else { //log_msg(" arg(0) == '%s'", fn.arg(0).to_string()); - ptr->obj.nodeValueSet(fn.arg(0).to_string()); + ptr->nodeValueSet(fn.arg(0).to_string()); } } @@ -506,18 +515,117 @@ static void xmlnode_nodename(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - xmlnode_as_object *ptr = static_cast(fn.this_ptr); + assert(dynamic_cast(fn.this_ptr)); + XMLNode *ptr = static_cast(fn.this_ptr); if ( fn.nargs == 0 ) { - const char* val = ptr->obj.nodeName(); + const char* val = ptr->nodeName(); if ( val ) { fn.result->set_string(val); } else { fn.result->set_null(); } } else { - ptr->obj.nodeNameSet(fn.arg(0).to_string()); + ptr->nodeNameSet(fn.arg(0).to_string()); + } +} + +// Both a getter and a (do-nothing) setter for nodeType +static void +xmlnode_nodetype(const fn_call& fn) +{ + assert(dynamic_cast(fn.this_ptr)); + XMLNode *ptr = static_cast(fn.this_ptr); + + if ( fn.nargs == 0 ) + { + fn.result->set_double(ptr->nodeType()); + } + else + { + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("Tried to set read-only property XMLNode.nodeType"); + ); + } +} + +// Both a getter and a (do-nothing) setter for firstChild +static void +xmlnode_firstchild(const fn_call& fn) +{ + assert(dynamic_cast(fn.this_ptr)); + XMLNode *ptr = static_cast(fn.this_ptr); + + if ( fn.nargs == 0 ) + { + fn.result->set_as_object(ptr->firstChild()); + } + else + { + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("Tried to set read-only property XMLNode.firstChild"); + ); + } +} + +// Both a getter and a (do-nothing) setter for lastChild +static void +xmlnode_lastchild(const fn_call& fn) +{ + assert(dynamic_cast(fn.this_ptr)); + XMLNode *ptr = static_cast(fn.this_ptr); + + if ( fn.nargs == 0 ) + { + fn.result->set_as_object(ptr->lastChild()); + } + else + { + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("Tried to set read-only property XMLNode.lastChild"); + ); + } +} + +// Both a getter and a (do-nothing) setter for nextSibling +static void +xmlnode_nextsibling(const fn_call& fn) +{ + assert(dynamic_cast(fn.this_ptr)); + XMLNode *ptr = static_cast(fn.this_ptr); + + if ( fn.nargs == 0 ) + { + log_error("FIXME: XMLNode.nextSibling unimplemented"); + //fn.result->set_as_object(ptr->nextSibling()); + fn.result->set_null(); + } + else + { + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("Tried to set read-only property XMLNode.nextSibling"); + ); + } +} + +// Both a getter and a (do-nothing) setter for previousSibling +static void +xmlnode_previoussibling(const fn_call& fn) +{ + assert(dynamic_cast(fn.this_ptr)); + XMLNode *ptr = static_cast(fn.this_ptr); + + if ( fn.nargs == 0 ) + { + log_error("FIXME: XMLNode.previousSibling unimplemented"); + //fn.result->set_as_object(ptr->previousSibling()); + fn.result->set_null(); + } + else + { + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("Tried to set read-only property XMLNode.previousSibling"); + ); } } Index: server/asobj/xmlnode.h =================================================================== RCS file: /sources/gnash/gnash/server/asobj/xmlnode.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- server/asobj/xmlnode.h 18 Jan 2007 14:23:17 -0000 1.4 +++ server/asobj/xmlnode.h 18 Jan 2007 15:30:53 -0000 1.5 @@ -45,7 +45,7 @@ namespace gnash { /// XML Node -class DSOLOCAL XMLNode +class DSOLOCAL XMLNode : public gnash::as_object { public: XMLNode(); @@ -71,16 +71,24 @@ void nodeValueSet(const char *value); // nodeType XML.nodeType - bool hasChildNodes() { - if (_children.size()) { - return true; + bool hasChildNodes() + { + return ! _children.empty(); } - return false; + + XMLNode *firstChild() + { + return _children.empty() ? NULL : _children.front(); } - XMLNode *firstChild() { return _children[0]; } + XMLNode *lastChild() + { + return _children.empty() ? NULL : _children.back(); + } - std::vectorchildNodes() { return _children; } + std::vector& childNodes() { + return _children; + } XMLNode *operator [] (int x) { gnash::log_msg("%s: get element %d\n", __PRETTY_FUNCTION__, x); @@ -106,10 +114,11 @@ return this; } - as_object *previousSibling(int x); - as_object *nextSibling(int x); + XMLNode* previousSibling(int x); + XMLNode* nextSibling(int x); XMLNode &cloneNode(XMLNode &newnode, bool deep); - void appendChild(as_object *as,XMLNode *node); + void appendChild(XMLNode *node); + void insertBefore(XMLNode *newnode, XMLNode *node); void removeNode(); const char *toString(); @@ -123,30 +132,9 @@ char *_value; xmlElementType _type; - std::vector _objects; std::vector _children; std::vector _attributes; -}; - -/// XML Node ActionScript object -class DSOLOCAL xmlnode_as_object : public gnash::as_object -{ -public: - XMLNode obj; - - xmlnode_as_object(); - -// int _padding; -#ifdef DEBUG_MEMORY_ALLOCATION - xmlnode_as_object() { - // obj = new XMLNode; - log_msg("\tCreating xmlnode_as_object at %p \n", this); - }; - ~xmlnode_as_object() { - log_msg("\tDeleting xmlnode_as_object at %p \n", this); - }; -#endif }; // Initialize the global XMLNode class Index: testsuite/actionscript.all/XMLNode.as =================================================================== RCS file: /sources/gnash/gnash/testsuite/actionscript.all/XMLNode.as,v retrieving revision 1.7 retrieving revision 1.8 diff -u -b -r1.7 -r1.8 --- testsuite/actionscript.all/XMLNode.as 18 Jan 2007 14:23:17 -0000 1.7 +++ testsuite/actionscript.all/XMLNode.as 18 Jan 2007 15:30:53 -0000 1.8 @@ -22,7 +22,7 @@ // compile this test case with Ming makeswf, and then // execute it like this gnash -1 -r 0 -v out.swf -rcsid="$Id: XMLNode.as,v 1.7 2007/01/18 14:23:17 strk Exp $"; +rcsid="$Id: XMLNode.as,v 1.8 2007/01/18 15:30:53 strk Exp $"; #include "dejagnu.as" @@ -55,33 +55,33 @@ // The read only properties. These should all return NULL, because // there are no children. check_equals(textnode.hasChildNodes(), false); -xcheck_equals(textnode.firstChild, undefined); -xcheck_equals(textnode.lastChild, undefined); -xcheck_equals(textnode.parentNode, undefined); -xcheck_equals(textnode.nextSibling, undefined); -xcheck_equals(textnode.previousSibling, undefined); +check_equals(typeof(textnode.firstChild), 'null'); +check_equals(typeof(textnode.lastChild), 'null'); +check_equals(typeof(textnode.parentNode), 'null'); +check_equals(typeof(textnode.nextSibling), 'null'); +check_equals(typeof(textnode.previousSibling), 'null'); //note("Now test the functionality of the methods"); var childnode1 = new XMLNode(3, "first child"); -xcheck_equals(childnode1.nodeType, 3); +check_equals(childnode1.nodeType, 3); textnode.appendChild(childnode1); check_equals(textnode.hasChildNodes(), true); check_equals(textnode.firstChild, childnode1); check_equals(textnode.lastChild, childnode1); -xcheck_equals(childnode1.nextSibling, undefined); -xcheck_equals(childnode1.previousSibling, undefined); +check_equals(childnode1.nextSibling, undefined); +check_equals(childnode1.previousSibling, undefined); var nextnode = new XMLNode(3, "second child"); -xcheck_equals(nextnode.nodeType, 3); +check_equals(nextnode.nodeType, 3); textnode.appendChild(nextnode); check_equals(textnode.hasChildNodes(), true); check_equals(textnode.firstChild, childnode1); check_equals(textnode.lastChild, nextnode); xcheck_equals(childnode1.nextSibling, nextnode); -xcheck_equals(childnode1.previousSibling, undefined); +check_equals(childnode1.previousSibling, undefined); xcheck_equals(nextnode.previousSibling, childnode1); //var out = textnode.toString(); From MAILER-DAEMON Thu Jan 18 11:12:20 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H7ZsC-00039q-9P for mharc-gnash-commit@gnu.org; Thu, 18 Jan 2007 11:12:20 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H7ZsA-00038A-Bf for gnash-commit@gnu.org; Thu, 18 Jan 2007 11:12:18 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H7Zs8-00036G-FT for gnash-commit@gnu.org; Thu, 18 Jan 2007 11:12:17 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H7Zs7-00035W-PT for gnash-commit@gnu.org; Thu, 18 Jan 2007 11:12:15 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H7Zs1-0001UV-Nu for gnash-commit@gnu.org; Thu, 18 Jan 2007 11:12:14 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H7ZrV-0001og-JO for gnash-commit@gnu.org; Thu, 18 Jan 2007 16:11:37 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H7ZrV-0001oH-DO for gnash-commit@gnu.org; Thu, 18 Jan 2007 16:11:37 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Thu, 18 Jan 2007 16:11:37 +0000 Subject: [Gnash-commit] gnash ChangeLog server/asobj/xml.cpp server/aso... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jan 2007 16:12:19 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/18 16:11:27 Modified files: . : ChangeLog server/asobj : xml.cpp xml.h testsuite/actionscript.all: XML.as Log message: * server/asobj/xml.{cpp,h}: first pass of new layout port. * testsuite/actionscript.all/XML.as: first unexpected success. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2133&r2=1.2134 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/xml.cpp?cvsroot=gnash&r1=1.7&r2=1.8 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/xml.h?cvsroot=gnash&r1=1.2&r2=1.3 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/XML.as?cvsroot=gnash&r1=1.14&r2=1.15 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2133 retrieving revision 1.2134 diff -u -b -r1.2133 -r1.2134 --- ChangeLog 18 Jan 2007 15:30:53 -0000 1.2133 +++ ChangeLog 18 Jan 2007 16:11:27 -0000 1.2134 @@ -1,5 +1,10 @@ 2007-01-18 Sandro Santilli + * server/asobj/xml.{cpp,h}: first pass of new layout port. + * testsuite/actionscript.all/XML.as: first unexpected success. + +2007-01-18 Sandro Santilli + * server/asobj/: xml.cpp, xmlnode.{cpp,h}: drop xmlnode_as_object, making XMLNode a direct subclass of as_object; Implement or stub many properties as actual *properties* (new layout). Index: server/asobj/xml.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/xml.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -b -r1.7 -r1.8 --- server/asobj/xml.cpp 18 Jan 2007 15:30:53 -0000 1.7 +++ server/asobj/xml.cpp 18 Jan 2007 16:11:27 -0000 1.8 @@ -14,7 +14,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -/* $Id: xml.cpp,v 1.7 2007/01/18 15:30:53 strk Exp $ */ +/* $Id: xml.cpp,v 1.8 2007/01/18 16:11:27 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -46,8 +46,16 @@ //#define DEBUG_MEMORY_ALLOCATION 1 +static as_object* getXMLInterface(); + XML::XML() - :_loaded(false), _nodename(0), _nodes(0), _bytes_loaded(0), _bytes_total(0) + : + as_object(getXMLInterface()), + _loaded(false), + _nodename(0), + _nodes(0), + _bytes_loaded(0), + _bytes_total(0) { GNASH_REPORT_FUNCTION; #ifdef DEBUG_MEMORY_ALLOCATION @@ -59,6 +67,13 @@ // Parse the ASCII XML string into memory XML::XML(tu_string xml_in) + : + as_object(getXMLInterface()), + _loaded(false), + _nodename(0), + _nodes(0), + _bytes_loaded(0), + _bytes_total(0) { GNASH_REPORT_FUNCTION; #ifdef DEBUG_MEMORY_ALLOCATION @@ -70,6 +85,13 @@ } XML::XML(struct node */* childNode */) + : + as_object(getXMLInterface()), + _loaded(false), + _nodename(0), + _nodes(0), + _bytes_loaded(0), + _bytes_total(0) { GNASH_REPORT_FUNCTION; #ifdef DEBUG_MEMORY_ALLOCATION @@ -883,7 +905,7 @@ //GNASH_REPORT_FUNCTION; - xml_as_object *xml_obj = (xml_as_object*)fn.this_ptr; + XML *xml_obj = (XML*)fn.this_ptr; std::string filespec = fn.arg(0).to_string(); @@ -896,7 +918,7 @@ // Set the argument to the function event handler based on whether the load // was successful or failed. - ret = xml_obj->obj.load(filespec.c_str()); + ret = xml_obj->load(filespec.c_str()); fn.result->set_bool(ret); if (ret == false) { @@ -904,14 +926,14 @@ } //env->bottom(first_arg) = ret; - // struct node *first_node = ptr->obj.firstChildGet(); + // struct node *first_node = ptr->firstChildGet(); - //const char *name = ptr->obj.nodeNameGet(); + //const char *name = ptr->nodeNameGet(); - if (xml_obj->obj.hasChildNodes() == false) { + if (xml_obj->hasChildNodes() == false) { log_error("%s: No child nodes!\n", __FUNCTION__); } - xml_obj->obj.setupFrame(xml_obj, xml_obj->obj.firstChild(), false); + xml_obj->setupFrame(xml_obj, xml_obj->firstChild(), false); #if 1 if (fn.this_ptr->get_member("onLoad", &method)) { @@ -952,10 +974,10 @@ as_value method; as_value val; static bool first = true; // This event handler should only be executed once. - xml_as_object* ptr = (xml_as_object*) (as_object*) fn.this_ptr; + XML* ptr = (XML*) (as_object*) fn.this_ptr; assert(ptr); - if ((ptr->obj.loaded()) && (first)) { + if ((ptr->loaded()) && (first)) { // env->set_variable("success", true, 0); //as_value bo(true); //env->push_val(bo); @@ -1003,10 +1025,10 @@ as_value val; static bool first = true; // FIXME: ugly hack! - xml_as_object* ptr = (xml_as_object*)fn.this_ptr; + XML* ptr = (XML*)fn.this_ptr; assert(ptr); - if ((ptr->obj.loaded()) && (first)) { + if ((ptr->loaded()) && (first)) { if (fn.this_ptr->get_member("onData", &method)) { log_msg("FIXME: Found onData!\n"); as_c_function_ptr func = method.to_c_function(); @@ -1037,10 +1059,49 @@ } void +attachXMLInterface(as_object& o) +{ + // FIXME: this doesn't appear to exist in the MM player, should it ? + o.set_member("loaded", &xml_loaded); + + o.set_member("addRequestHeader", &xml_addrequestheader); + o.set_member("appendChild", &xml_appendchild); + o.set_member("cloneNode", &xml_clonenode); + o.set_member("createElement", &xml_createelement); + o.set_member("createTextNode", &xml_createtextnode); + o.set_member("getBytesLoaded", &xml_getbytesloaded); + o.set_member("getBytesTotal", &xml_getbytestotal); + o.set_member("hasChildNodes", &xml_haschildnodes); + o.set_member("insertBefore", &xml_insertbefore); + o.set_member("load", &xml_load); + o.set_member("parseXML", &xml_parsexml); + o.set_member("removeNode", &xml_removenode); + o.set_member("send", &xml_send); + o.set_member("sendAndLoad", &xml_sendandload); + o.set_member("toString", &xml_tostring); + // Properties + o.set_member("nodeName", as_value().set_null()); + o.set_member("nodevalue", as_value()); + +} + +static as_object* +getXMLInterface() +{ + static boost::intrusive_ptr o; + if ( o == NULL ) + { + o = new as_object(); + attachXMLInterface(*o); + } + return o.get(); +} + +void xml_new(const fn_call& fn) { as_value inum; - xml_as_object *xml_obj; + XML *xml_obj; //const char *data; // log_msg("%s: nargs=%d\n", __FUNCTION__, fn.nargs); @@ -1049,47 +1110,25 @@ as_object* obj = fn.env->top(0).to_object(); if (! obj ) { - xml_obj = new xml_as_object; + xml_obj = new XML; //log_msg("\tCreated New XML object at %p\n", xml_obj); tu_string datain = fn.env->top(0).to_tu_string(); - xml_obj->obj.parseXML(datain); + xml_obj->parseXML(datain); //log_msg("*** Start setting up the stack frames ***\n"); - xml_obj->obj.setupFrame(xml_obj, xml_obj->obj.firstChild(), true); - //xml_obj->obj.clear(); - //delete xml_obj->obj.firstChild(); + xml_obj->setupFrame(xml_obj, xml_obj->firstChild(), true); + //xml_obj->clear(); + //delete xml_obj->firstChild(); } else { - assert(dynamic_cast(obj)); - xml_as_object* xml_obj = (xml_as_object*)obj; + assert(dynamic_cast(obj)); + XML* xml_obj = (XML*)obj; //log_msg("\tCloned the XML object at %p\n", xml_obj); //result->set(xml_obj); fn.result->set_as_object(xml_obj); return; } } else { - xml_obj = new xml_as_object; + xml_obj = new XML; //log_msg("\tCreated New XML object at %p\n", xml_obj); - // FIXME: this doesn't appear to exist in the MM player, should it ? - xml_obj->set_member("loaded", &xml_loaded); - - xml_obj->set_member("addRequestHeader", &xml_addrequestheader); - xml_obj->set_member("appendChild", &xml_appendchild); - xml_obj->set_member("cloneNode", &xml_clonenode); - xml_obj->set_member("createElement", &xml_createelement); - xml_obj->set_member("createTextNode", &xml_createtextnode); - xml_obj->set_member("getBytesLoaded", &xml_getbytesloaded); - xml_obj->set_member("getBytesTotal", &xml_getbytestotal); - xml_obj->set_member("hasChildNodes", &xml_haschildnodes); - xml_obj->set_member("insertBefore", &xml_insertbefore); - xml_obj->set_member("load", &xml_load); - xml_obj->set_member("parseXML", &xml_parsexml); - xml_obj->set_member("removeNode", &xml_removenode); - xml_obj->set_member("send", &xml_send); - xml_obj->set_member("sendAndLoad", &xml_sendandload); - xml_obj->set_member("toString", &xml_tostring); - // Properties - xml_obj->set_member("nodeName", as_value().set_null()); - xml_obj->set_member("nodevalue", as_value()); - } fn.result->set_as_object(xml_obj); @@ -1111,45 +1150,45 @@ log_msg("%s:\n", __FUNCTION__); - xml_as_object* ptr = (xml_as_object*) (as_object*) fn.this_ptr; + XML* ptr = (XML*) (as_object*) fn.this_ptr; assert(ptr); std::string filespec = fn.arg(0).to_string(); - //fn.result->set(ptr->obj.loaded()); - fn.result->set_bool(ptr->obj.loaded()); + //fn.result->set(ptr->loaded()); + fn.result->set_bool(ptr->loaded()); } void xml_addrequestheader(const fn_call& fn) { log_msg("%s: %d args\n", __PRETTY_FUNCTION__, fn.nargs); - xml_as_object *ptr = (xml_as_object*)fn.this_ptr; + XML *ptr = (XML*)fn.this_ptr; assert(ptr); -// fn.result->set_int(ptr->obj.getAllocated()); -// ptr->obj.addRequestHeader(); +// fn.result->set_int(ptr->getAllocated()); +// ptr->addRequestHeader(); log_msg("%s:unimplemented \n", __FUNCTION__); } void xml_appendchild(const fn_call& fn) { // log_msg("%s: %d args\n", __PRETTY_FUNCTION__, fn.nargs); - xml_as_object *ptr = (xml_as_object*)fn.this_ptr; + XML *ptr = (XML*)fn.this_ptr; assert(ptr); XMLNode *xml_obj = (XMLNode*)fn.env->top(0).to_object(); - ptr->obj.appendChild(xml_obj); + ptr->appendChild(xml_obj); } void xml_clonenode(const fn_call& fn) { log_msg("%s: %d args\n", __PRETTY_FUNCTION__, fn.nargs); - xml_as_object *ptr = (xml_as_object*)fn.this_ptr; + XML *ptr = (XML*)fn.this_ptr; XMLNode *xml_obj; assert(ptr); if (fn.nargs > 0) { bool deep = fn.arg(0).to_bool(); xml_obj = new XMLNode; - ptr->obj.cloneNode(*xml_obj, deep); + ptr->cloneNode(*xml_obj, deep); fn.result->set_as_object(xml_obj); } else { log_msg("ERROR: no Depth paramater!\n"); @@ -1159,7 +1198,7 @@ void xml_createelement(const fn_call& fn) { // log_msg("%s: %d args\n", __PRETTY_FUNCTION__, fn.nargs); - xml_as_object *ptr = (xml_as_object*)fn.this_ptr; + XML *ptr = (XML*)fn.this_ptr; assert(ptr); XMLNode *xml_obj; const char *text; @@ -1180,8 +1219,8 @@ { log_msg("%s: %d args\n", __PRETTY_FUNCTION__, fn.nargs); - //assert(dynamic_cast(fn.this_ptr)); - //xml_as_object *ptr = static_cast(fn.this_ptr); + //assert(dynamic_cast(fn.this_ptr)); + //XML *ptr = static_cast(fn.this_ptr); XMLNode *xml_obj; const char *text; @@ -1201,31 +1240,31 @@ void xml_getbytesloaded(const fn_call& fn) { - xml_as_object *ptr = (xml_as_object*)fn.this_ptr; + XML *ptr = (XML*)fn.this_ptr; assert(ptr); - fn.result->set_int(ptr->obj.getBytesLoaded()); + fn.result->set_int(ptr->getBytesLoaded()); } void xml_getbytestotal(const fn_call& fn) { - xml_as_object *ptr = (xml_as_object*)fn.this_ptr; + XML *ptr = (XML*)fn.this_ptr; assert(ptr); - fn.result->set_int(ptr->obj.getBytesTotal()); + fn.result->set_int(ptr->getBytesTotal()); } void xml_haschildnodes(const fn_call& fn) { - xml_as_object *ptr = (xml_as_object*)fn.this_ptr; + XML *ptr = (XML*)fn.this_ptr; assert(ptr); - fn.result->set_bool(ptr->obj.hasChildNodes()); + fn.result->set_bool(ptr->hasChildNodes()); } void xml_insertbefore(const fn_call& fn) { - xml_as_object *ptr = (xml_as_object*)fn.this_ptr; + XML *ptr = (XML*)fn.this_ptr; assert(ptr); -// fn.result->set_int(ptr->obj.getAllocated()); -// ptr->obj.insertBefore(); +// fn.result->set_int(ptr->getAllocated()); +// ptr->insertBefore(); log_msg("%s:unimplemented \n", __FUNCTION__); } void xml_parsexml(const fn_call& fn) @@ -1233,13 +1272,13 @@ const char *text; as_value method; as_value val; - xml_as_object *ptr = (xml_as_object*)fn.this_ptr; + XML *ptr = (XML*)fn.this_ptr; assert(ptr); if (fn.nargs > 0) { text = fn.arg(0).to_string(); - ptr->obj.parseXML(text); - ptr->obj.setupFrame(ptr, ptr->obj.firstChild(), false); + ptr->parseXML(text); + ptr->setupFrame(ptr, ptr->firstChild(), false); } #if 1 @@ -1266,39 +1305,39 @@ #else #endif -// fn.result->set_int(ptr->obj.getAllocated()); +// fn.result->set_int(ptr->getAllocated()); } void xml_removenode(const fn_call& fn) { - xml_as_object *ptr = (xml_as_object*)fn.this_ptr; + XML *ptr = (XML*)fn.this_ptr; assert(ptr); -// fn.result->set_int(ptr->obj.getAllocated()); - ptr->obj.removeNode(); +// fn.result->set_int(ptr->getAllocated()); + ptr->removeNode(); } void xml_send(const fn_call& fn) { - xml_as_object *ptr = (xml_as_object*)fn.this_ptr; + XML *ptr = (XML*)fn.this_ptr; assert(ptr); -// fn.result->set_int(ptr->obj.getAllocated()); - ptr->obj.send(); +// fn.result->set_int(ptr->getAllocated()); + ptr->send(); } void xml_sendandload(const fn_call& fn) { - xml_as_object *ptr = (xml_as_object*)fn.this_ptr; + XML *ptr = (XML*)fn.this_ptr; assert(ptr); -// fn.result->set_int(ptr->obj.getAllocated()); - ptr->obj.sendAndLoad(); +// fn.result->set_int(ptr->getAllocated()); + ptr->sendAndLoad(); } void xml_tostring(const fn_call& fn) { - xml_as_object *ptr = (xml_as_object*)fn.this_ptr; + XML *ptr = (XML*)fn.this_ptr; assert(ptr); - fn.result->set_string(ptr->obj.toString()); + fn.result->set_string(ptr->toString()); } int Index: server/asobj/xml.h =================================================================== RCS file: /sources/gnash/gnash/server/asobj/xml.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- server/asobj/xml.h 9 Jan 2007 15:14:20 -0000 1.2 +++ server/asobj/xml.h 18 Jan 2007 16:11:27 -0000 1.3 @@ -47,9 +47,12 @@ namespace gnash { -/// XML class -class DSOLOCAL XML { +/// XML class and ActionScript object +class DSOLOCAL XML : public as_object +{ + public: + XML(); XML(tu_string xml_in); XML(struct node * childNode); @@ -156,6 +159,21 @@ return this; } + // FIXME: drop this override when firstChild and childNodes are properties + virtual bool get_member(const tu_stringi& name, as_value* val) { + //printf("GET XML MEMBER: %s at %p for object %p\n", name.c_str(), val, this); + + if ((name == "firstChild") || (name == "childNodes")) { +// printf("Returning a self reference for %s for object at %p\n", +// name.c_str(), this); + val->set_as_object(this); + return true; + } + + return get_member_default(name, val); + + } + private: xmlDocPtr _doc; xmlNodePtr _firstChild; @@ -184,35 +202,6 @@ }; -/// XML ActionScript object -class DSOLOCAL xml_as_object : public gnash::as_object -{ -public: - XML obj; -#ifdef DEBUG_MEMORY_ALLOCATION - xml_as_object() { - log_msg("\tCreating xml_as_object at %p\n", this); - }; - ~xml_as_object() { - log_msg("\tDeleting xml_as_object at %p\n", this); - }; -#endif - - virtual bool get_member(const tu_stringi& name, as_value* val) { - //printf("GET XML MEMBER: %s at %p for object %p\n", name.c_str(), val, this); - - if ((name == "firstChild") || (name == "childNodes")) { -// printf("Returning a self reference for %s for object at %p\n", -// name.c_str(), this); - val->set_as_object(this); - return true; - } - - return get_member_default(name, val); - - } -}; - DSOEXPORT void xml_load(const fn_call& fn); DSOEXPORT void xml_set_current(const fn_call& fn); Index: testsuite/actionscript.all/XML.as =================================================================== RCS file: /sources/gnash/gnash/testsuite/actionscript.all/XML.as,v retrieving revision 1.14 retrieving revision 1.15 diff -u -b -r1.14 -r1.15 --- testsuite/actionscript.all/XML.as 18 Jan 2007 13:43:06 -0000 1.14 +++ testsuite/actionscript.all/XML.as 18 Jan 2007 16:11:27 -0000 1.15 @@ -22,7 +22,7 @@ // compile this test case with Ming makeswf, and then // execute it like this gnash -1 -r 0 -v out.swf -rcsid="$Id: XML.as,v 1.14 2007/01/18 13:43:06 strk Exp $"; +rcsid="$Id: XML.as,v 1.15 2007/01/18 16:11:27 strk Exp $"; #include "dejagnu.as" #include "utils.as" @@ -266,7 +266,7 @@ fail("XML::createTextNode() doesn't work"); } -xcheck_equals(textElement.nodeType, 3); +check_equals(textElement.nodeType, 3); check_equals(textElement.nodeValue, "Hello World"); check_equals(typeof(textElement.nodeName), 'null'); check_equals(textElement.nodeName, null); From MAILER-DAEMON Thu Jan 18 11:28:14 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H7a7a-0004PI-8i for mharc-gnash-commit@gnu.org; Thu, 18 Jan 2007 11:28:14 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H7a7Y-0004P9-NC for gnash-commit@gnu.org; Thu, 18 Jan 2007 11:28:12 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H7a7Y-0004Op-57 for gnash-commit@gnu.org; Thu, 18 Jan 2007 11:28:12 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H7a7X-0004Om-Qc for gnash-commit@gnu.org; Thu, 18 Jan 2007 11:28:11 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H7a7X-0004Fb-6p for gnash-commit@gnu.org; Thu, 18 Jan 2007 11:28:11 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H7a7W-0003N0-Oj for gnash-commit@gnu.org; Thu, 18 Jan 2007 16:28:10 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H7a7W-0003Mw-Ge for gnash-commit@gnu.org; Thu, 18 Jan 2007 16:28:10 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Thu, 18 Jan 2007 16:28:10 +0000 Subject: [Gnash-commit] gnash ChangeLog server/asobj/Global.cpp server/... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jan 2007 16:28:12 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/18 16:28:10 Modified files: . : ChangeLog server/asobj : Global.cpp xml.cpp xml.h Log message: * server/asobj/: Global.cpp, xml.{cpp,h}: second pass of new layout port: use xml_class_init and hide method functions. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2134&r2=1.2135 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Global.cpp?cvsroot=gnash&r1=1.31&r2=1.32 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/xml.cpp?cvsroot=gnash&r1=1.8&r2=1.9 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/xml.h?cvsroot=gnash&r1=1.3&r2=1.4 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2134 retrieving revision 1.2135 diff -u -b -r1.2134 -r1.2135 --- ChangeLog 18 Jan 2007 16:11:27 -0000 1.2134 +++ ChangeLog 18 Jan 2007 16:28:10 -0000 1.2135 @@ -1,5 +1,10 @@ 2007-01-18 Sandro Santilli + * server/asobj/: Global.cpp, xml.{cpp,h}: second pass of new layout + port: use xml_class_init and hide method functions. + +2007-01-18 Sandro Santilli + * server/asobj/xml.{cpp,h}: first pass of new layout port. * testsuite/actionscript.all/XML.as: first unexpected success. Index: server/asobj/Global.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/Global.cpp,v retrieving revision 1.31 retrieving revision 1.32 diff -u -b -r1.31 -r1.32 --- server/asobj/Global.cpp 18 Jan 2007 13:43:06 -0000 1.31 +++ server/asobj/Global.cpp 18 Jan 2007 16:28:10 -0000 1.32 @@ -18,7 +18,7 @@ // Implementation of the Global ActionScript Object -/* $Id: Global.cpp,v 1.31 2007/01/18 13:43:06 strk Exp $ */ +/* $Id: Global.cpp,v 1.32 2007/01/18 16:28:10 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -456,7 +456,7 @@ color_class_init(*this); selection_class_init(*this); // Selection set_member("Sound", as_value(sound_new)); - set_member("XML", as_value(xml_new)); + xml_class_init(*this); xmlnode_class_init(*this); set_member("XMLSocket", as_value(xmlsocket_new)); set_member("Date", as_value(date_new)); Index: server/asobj/xml.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/xml.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -b -r1.8 -r1.9 --- server/asobj/xml.cpp 18 Jan 2007 16:11:27 -0000 1.8 +++ server/asobj/xml.cpp 18 Jan 2007 16:28:10 -0000 1.9 @@ -14,31 +14,31 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -/* $Id: xml.cpp,v 1.8 2007/01/18 16:11:27 strk Exp $ */ +/* $Id: xml.cpp,v 1.9 2007/01/18 16:28:10 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" #endif -#include -#include -#include -#include - #include "log.h" #include "tu_config.h" #include "as_function.h" // for as_function #include "fn_call.h" - -#include #include "xmlattrs.h" #include "xmlnode.h" #include "xml.h" +#include "builtin_function.h" + #include #include #include #include +#include +#include +#include +#include +#include using namespace std; @@ -48,6 +48,34 @@ static as_object* getXMLInterface(); +DSOEXPORT void xml_new(const fn_call& fn); +static void xml_load(const fn_call& fn); +static void xml_set_current(const fn_call& fn); + +static void xml_addrequestheader(const fn_call& fn); +static void xml_appendchild(const fn_call& fn); +static void xml_clonenode(const fn_call& fn); +static void xml_createelement(const fn_call& fn); +static void xml_createtextnode(const fn_call& fn); +static void xml_getbytesloaded(const fn_call& fn); +static void xml_getbytestotal(const fn_call& fn); +static void xml_haschildnodes(const fn_call& fn); +static void xml_insertbefore(const fn_call& fn); +static void xml_parsexml(const fn_call& fn); +static void xml_removenode(const fn_call& fn); +static void xml_send(const fn_call& fn); +static void xml_sendandload(const fn_call& fn); +static void xml_tostring(const fn_call& fn); + +// These are the event handlers called for this object +static void xml_onload(const fn_call& fn); +static void xml_ondata(const fn_call& fn); +static void xml_loaded(const fn_call& fn); + +// Properties +static void xml_nodename(const fn_call& fn); +static void xml_nodevalue(const fn_call& fn); + XML::XML() : as_object(getXMLInterface()), @@ -1346,6 +1374,25 @@ return (x + (4 - x % 4)); } +// extern (used by Global.cpp) +void xml_class_init(as_object& global) +{ + // This is going to be the global XML "class"/"function" + static boost::intrusive_ptr cl; + + if ( cl == NULL ) + { + cl=new builtin_function(&xml_new, getXMLInterface()); + // replicate all interface to class, to be able to access + // all methods as static functions + attachXMLInterface(*cl); + + } + + // Register _global.String + global.set_member("XML", cl.get()); + +} } // end of gnash namespace Index: server/asobj/xml.h =================================================================== RCS file: /sources/gnash/gnash/server/asobj/xml.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -b -r1.3 -r1.4 --- server/asobj/xml.h 18 Jan 2007 16:11:27 -0000 1.3 +++ server/asobj/xml.h 18 Jan 2007 16:28:10 -0000 1.4 @@ -203,34 +203,11 @@ }; -DSOEXPORT void xml_load(const fn_call& fn); -DSOEXPORT void xml_set_current(const fn_call& fn); -DSOEXPORT void xml_new(const fn_call& fn); - -DSOEXPORT void xml_addrequestheader(const fn_call& fn); -DSOEXPORT void xml_appendchild(const fn_call& fn); -DSOEXPORT void xml_clonenode(const fn_call& fn); -DSOEXPORT void xml_createelement(const fn_call& fn); -DSOEXPORT void xml_createtextnode(const fn_call& fn); -DSOEXPORT void xml_getbytesloaded(const fn_call& fn); -DSOEXPORT void xml_getbytestotal(const fn_call& fn); -DSOEXPORT void xml_haschildnodes(const fn_call& fn); -DSOEXPORT void xml_insertbefore(const fn_call& fn); -DSOEXPORT void xml_parsexml(const fn_call& fn); -DSOEXPORT void xml_removenode(const fn_call& fn); -DSOEXPORT void xml_send(const fn_call& fn); -DSOEXPORT void xml_sendandload(const fn_call& fn); -DSOEXPORT void xml_tostring(const fn_call& fn); - -// These are the event handlers called for this object -DSOEXPORT void xml_onload(const fn_call& fn); -DSOEXPORT void xml_ondata(const fn_call& fn); -DSOEXPORT void xml_loaded(const fn_call& fn); - -// Properties -DSOEXPORT void xml_nodename(const fn_call& fn); -DSOEXPORT void xml_nodevalue(const fn_call& fn); +DSOEXPORT void xml_class_init(as_object& global); +// Exporting this is a temporary hack for not changing xmlsocket.cpp now +// (xmlsocket_xml_new calls xml_new) +DSOEXPORT void xml_new(const fn_call& fn); DSOEXPORT int memadjust(int x); From MAILER-DAEMON Thu Jan 18 11:55:40 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H7aY8-0001Ig-AE for mharc-gnash-commit@gnu.org; Thu, 18 Jan 2007 11:55:40 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H7aY7-0001IU-IU for gnash-commit@gnu.org; Thu, 18 Jan 2007 11:55:39 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H7aY6-0001GH-Kk for gnash-commit@gnu.org; Thu, 18 Jan 2007 11:55:39 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H7aY6-0001G4-I5 for gnash-commit@gnu.org; Thu, 18 Jan 2007 11:55:38 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H7aY5-0000wu-SI for gnash-commit@gnu.org; Thu, 18 Jan 2007 11:55:38 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H7aY4-0005Z9-1j for gnash-commit@gnu.org; Thu, 18 Jan 2007 16:55:36 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H7aY3-0005Z6-Ky for gnash-commit@gnu.org; Thu, 18 Jan 2007 16:55:35 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Thu, 18 Jan 2007 16:55:35 +0000 Subject: [Gnash-commit] gnash ChangeLog server/asobj/xml.cpp server/aso... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jan 2007 16:55:39 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/18 16:55:35 Modified files: . : ChangeLog server/asobj : xml.cpp xml.h Log message: * server/asobj/xml.{cpp,h}: third pass of new layout port: don't override get_member, rely on getter/setters instead. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2135&r2=1.2136 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/xml.cpp?cvsroot=gnash&r1=1.9&r2=1.10 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/xml.h?cvsroot=gnash&r1=1.4&r2=1.5 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2135 retrieving revision 1.2136 diff -u -b -r1.2135 -r1.2136 --- ChangeLog 18 Jan 2007 16:28:10 -0000 1.2135 +++ ChangeLog 18 Jan 2007 16:55:35 -0000 1.2136 @@ -1,5 +1,10 @@ 2007-01-18 Sandro Santilli + * server/asobj/xml.{cpp,h}: third pass of new layout port: + don't override get_member, rely on getter/setters instead. + +2007-01-18 Sandro Santilli + * server/asobj/: Global.cpp, xml.{cpp,h}: second pass of new layout port: use xml_class_init and hide method functions. Index: server/asobj/xml.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/xml.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -b -r1.9 -r1.10 --- server/asobj/xml.cpp 18 Jan 2007 16:28:10 -0000 1.9 +++ server/asobj/xml.cpp 18 Jan 2007 16:55:35 -0000 1.10 @@ -14,7 +14,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -/* $Id: xml.cpp,v 1.9 2007/01/18 16:28:10 strk Exp $ */ +/* $Id: xml.cpp,v 1.10 2007/01/18 16:55:35 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -66,6 +66,8 @@ static void xml_send(const fn_call& fn); static void xml_sendandload(const fn_call& fn); static void xml_tostring(const fn_call& fn); +static void xml_firstchild(const fn_call& fn); +static void xml_childnodes(const fn_call& fn); // These are the event handlers called for this object static void xml_onload(const fn_call& fn); @@ -166,7 +168,7 @@ } void -XML::nodeNameSet(char */*name */) +XML::nodeNameSet(const char */*name */) { if (!_nodes) { _nodes = new XMLNode; @@ -178,7 +180,7 @@ } void -XML::nodeValueSet(char */* value */) +XML::nodeValueSet(const char */* value */) { if (!_nodes) { _nodes = new XMLNode; @@ -659,25 +661,15 @@ // primarily by the disk based XML parser, where at least in all my current // test cases this is referenced with firstChild first, then nodeName and // childNodes. - obj->set_member("nodeName", nodename); - obj->set_member("length", length); + //obj->set_member("nodeName", nodename); // use the getter/setter ! + obj->set_member("length", length); // FIXME: use a getter/setter ! if (xml->_value != 0) { - obj->set_member("nodeValue", xml->_value); + //obj->set_member("nodeValue", xml->_value); // use the getter/setter ! log_msg("\tnodevalue for %s is: %s\n", nodename, xml->_value); } else { - obj->set_member("nodeValue", as_value::UNDEFINED); + // obj->set_member("nodeValue", as_value::UNDEFINED); // use the getter/setter ! } -// if (nodevalue.get_type() != as_value::UNDEFINED) { -// obj->set_member("nodeValue", nodevalue.to_string()); -// log_msg("\tnodevalue for %s is: %s\n", nodename, nodevalue.to_string()); -// } else { -// // If there is no value, we want to define it as an empty -// // string. -// obj->set_member("nodeValue", ""); -// } - - // Process the attributes, if any if (xml->_attributes.size() == 0) { //log_msg("\t\tNo attributes for node %s, created empty object at %p\n", nodename, attr_obj); @@ -1107,10 +1099,22 @@ o.set_member("send", &xml_send); o.set_member("sendAndLoad", &xml_sendandload); o.set_member("toString", &xml_tostring); + // Properties - o.set_member("nodeName", as_value().set_null()); - o.set_member("nodevalue", as_value()); + boost::intrusive_ptr gettersetter; + + gettersetter = new builtin_function(&xml_nodename, NULL); + o.add_property("nodeName", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&xml_nodevalue, NULL); + o.add_property("nodeValue", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&xml_firstchild, NULL); + o.add_property("firstChild", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&xml_childnodes, NULL); + o.add_property("childNodes", *gettersetter, *gettersetter); } static as_object* @@ -1368,6 +1372,89 @@ fn.result->set_string(ptr->toString()); } +// Both a getter and a setter for nodeName +static void +xml_nodename(const fn_call& fn) +{ + assert(dynamic_cast(fn.this_ptr)); + XML *ptr = static_cast(fn.this_ptr); + + if ( fn.nargs == 0 ) { + const char* val = ptr->nodeName(); + if ( val ) { + fn.result->set_string(val); + } else { + fn.result->set_null(); + } + } else { + ptr->nodeNameSet(fn.arg(0).to_string()); + } +} + +// Both a getter and a setter for nodeValue +static void +xml_nodevalue(const fn_call& fn) +{ + //GNASH_REPORT_FUNCTION; + + assert(dynamic_cast(fn.this_ptr)); + XML *ptr = static_cast(fn.this_ptr); + + //log_msg("xml_nodevalue called with %d args against 'this' = %p", fn.nargs, ptr); + if ( fn.nargs == 0 ) { + //log_msg(" nodeValue() returns '%s'", ptr->nodeValue()); + const char* val = ptr->nodeValue(); + if ( val ) { + fn.result->set_string(val); + } else { + fn.result->set_null(); + } + } else { + //log_msg(" arg(0) == '%s'", fn.arg(0).to_string()); + ptr->nodeValueSet(fn.arg(0).to_string()); + } +} + +// Both a getter and a (do-nothing) setter for firstChild +static void +xml_firstchild(const fn_call& fn) +{ + assert(dynamic_cast(fn.this_ptr)); + XML *ptr = static_cast(fn.this_ptr); + + if ( fn.nargs == 0 ) + { + //fn.result->set_as_object(ptr->firstChild()); + fn.result->set_as_object(ptr); + } + else + { + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("Tried to set read-only property XML.firstChild"); + ); + } +} + +// Both a getter and a (do-nothing) setter for childNodes +static void +xml_childnodes(const fn_call& fn) +{ + assert(dynamic_cast(fn.this_ptr)); + XML *ptr = static_cast(fn.this_ptr); + + if ( fn.nargs == 0 ) + { + //fn.result->set_as_object(ptr->childNodes()); + fn.result->set_as_object(ptr); + } + else + { + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("Tried to set read-only property XML.childNodes"); + ); + } +} + int memadjust(int x) { Index: server/asobj/xml.h =================================================================== RCS file: /sources/gnash/gnash/server/asobj/xml.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- server/asobj/xml.h 18 Jan 2007 16:28:10 -0000 1.4 +++ server/asobj/xml.h 18 Jan 2007 16:55:35 -0000 1.5 @@ -114,8 +114,8 @@ const char *nodeNameGet() { return _nodename; } const char *nodeName(); const char *nodeValue(); - void nodeNameSet(char *name); - void nodeValueSet(char *value); + void nodeNameSet(const char *name); + void nodeValueSet(const char *value); int length() { return _nodes->length(); } // These 6 have to @@ -159,21 +159,6 @@ return this; } - // FIXME: drop this override when firstChild and childNodes are properties - virtual bool get_member(const tu_stringi& name, as_value* val) { - //printf("GET XML MEMBER: %s at %p for object %p\n", name.c_str(), val, this); - - if ((name == "firstChild") || (name == "childNodes")) { -// printf("Returning a self reference for %s for object at %p\n", -// name.c_str(), this); - val->set_as_object(this); - return true; - } - - return get_member_default(name, val); - - } - private: xmlDocPtr _doc; xmlNodePtr _firstChild; From MAILER-DAEMON Thu Jan 18 14:38:19 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H7d5X-0000al-Lu for mharc-gnash-commit@gnu.org; Thu, 18 Jan 2007 14:38:19 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H7d5W-0000aU-DI for gnash-commit@gnu.org; Thu, 18 Jan 2007 14:38:18 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H7d5V-0000a6-3k for gnash-commit@gnu.org; Thu, 18 Jan 2007 14:38:18 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H7d5U-0000a3-Pj for gnash-commit@gnu.org; Thu, 18 Jan 2007 14:38:16 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H7d5U-0006iz-Fq for gnash-commit@gnu.org; Thu, 18 Jan 2007 14:38:16 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H7d5K-0004yp-8P for gnash-commit@gnu.org; Thu, 18 Jan 2007 19:38:06 +0000 Received: from bjacques by savannah.gnu.org with local (Exim 4.50) id 1H7d5J-0004ym-T4 for gnash-commit@gnu.org; Thu, 18 Jan 2007 19:38:06 +0000 To: gnash-commit@gnu.org Message-Id: From: Bastiaan Jacques Date: Thu, 18 Jan 2007 19:38:05 +0000 Subject: [Gnash-commit] gnash server/asobj/xml.cpp ChangeLog X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jan 2007 19:38:18 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Bastiaan Jacques 07/01/18 19:38:05 Modified files: server/asobj : xml.cpp . : ChangeLog Log message: Make sure we actually have an XMLNode pointer before attempting to clone it. Do not attempt to setup a frame unless XML parsing succeeded. Fixes bug #18746. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/xml.cpp?cvsroot=gnash&r1=1.10&r2=1.11 http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2136&r2=1.2137 Patches: Index: server/asobj/xml.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/xml.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -b -r1.10 -r1.11 --- server/asobj/xml.cpp 18 Jan 2007 16:55:35 -0000 1.10 +++ server/asobj/xml.cpp 18 Jan 2007 19:38:05 -0000 1.11 @@ -14,7 +14,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -/* $Id: xml.cpp,v 1.10 2007/01/18 16:55:35 strk Exp $ */ +/* $Id: xml.cpp,v 1.11 2007/01/18 19:38:05 bjacques Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -765,7 +765,7 @@ { log_msg("%s: deep is %d\n", __PRETTY_FUNCTION__, deep); - if (deep) { + if (_nodes && deep) { newnode = _nodes; // } else { // newnode.nodeNameSet((char *)_nodes->nodeName()); @@ -1309,9 +1309,10 @@ if (fn.nargs > 0) { text = fn.arg(0).to_string(); - ptr->parseXML(text); + if (ptr->parseXML(text)) { ptr->setupFrame(ptr, ptr->firstChild(), false); } + } #if 1 if (fn.this_ptr->get_member("onLoad", &method)) { Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2136 retrieving revision 1.2137 diff -u -b -r1.2136 -r1.2137 --- ChangeLog 18 Jan 2007 16:55:35 -0000 1.2136 +++ ChangeLog 18 Jan 2007 19:38:05 -0000 1.2137 @@ -1,3 +1,9 @@ +2007-01-18 Bastiaan Jacques + + * server/asobj/xml.cpp: Make sure we actually have an XMLNode pointer + before attempting to clone it. Do not attempt to setup a frame unless + XML parsing succeeded. Fixes bug #18746. + 2007-01-18 Sandro Santilli * server/asobj/xml.{cpp,h}: third pass of new layout port: From MAILER-DAEMON Thu Jan 18 17:53:30 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H7g8Q-0004AH-KM for mharc-gnash-commit@gnu.org; Thu, 18 Jan 2007 17:53:30 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H7g8P-0004AC-NQ for gnash-commit@gnu.org; Thu, 18 Jan 2007 17:53:29 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H7g8M-00049t-CJ for gnash-commit@gnu.org; Thu, 18 Jan 2007 17:53:29 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H7g8M-00049p-6V for gnash-commit@gnu.org; Thu, 18 Jan 2007 17:53:26 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H7g8K-0003a5-4O for gnash-commit@gnu.org; Thu, 18 Jan 2007 17:53:25 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H7g8J-0004Uk-Ky for gnash-commit@gnu.org; Thu, 18 Jan 2007 22:53:23 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H7g8J-0004Ud-0b for gnash-commit@gnu.org; Thu, 18 Jan 2007 22:53:23 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Thu, 18 Jan 2007 22:53:23 +0000 Subject: [Gnash-commit] gnash ChangeLog extensions/mysql/mysql_table.cp... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jan 2007 22:53:30 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/18 22:53:22 Modified files: . : ChangeLog extensions/mysql: mysql_table.cpp server : array.cpp array.h as_function.cpp as_object.cpp as_object.h button_character_instance.cpp button_character_instance.h edit_text_character.cpp edit_text_character.h event_id.h gnash.h movie_root.h sprite_instance.cpp sprite_instance.h swf_function.cpp video_stream_instance.cpp video_stream_instance.h server/asobj : ASSound.cpp Boolean.cpp Camera.cpp Color.cpp ContextMenu.cpp CustomActions.cpp Date.cpp Error.cpp Global.cpp Key.cpp Key.h LoadVars.cpp LocalConnection.cpp Math.cpp Microphone.cpp Mouse.cpp MovieClipLoader.cpp NetConnection.cpp NetStream.cpp NetStream.h NetStreamFfmpeg.cpp NetStreamGst.cpp Number.cpp Object.cpp Selection.cpp SharedObject.cpp Stage.cpp System.cpp TextSnapshot.cpp Video.cpp gen-asclass.sh string.cpp xml.cpp xmlnode.cpp xmlsocket.cpp server/vm : ASHandlers.cpp ActionExec.cpp ActionExec.h action.cpp action.h testsuite/actionscript.all: XML.as testsuite/server: GetterSetterTest.cpp Log message: Get rid of another tu_thing and hopefully slighly improve performance: (1) Change {get,set}_member{,_default} as_object members to take a std::string rather then a tu_string and to avoid case conversion of key based on target SWF version (2) Provide init_{member,property} as_obejct members to initialize AS class methods/props and take care of SWF#-based case-conversion; use where appropriate. (3) Provide {get,set}ObjectMember methods in ActionExec to take care of SWF#-based case conversion when called from AS handlers. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2137&r2=1.2138 http://cvs.savannah.gnu.org/viewcvs/gnash/extensions/mysql/mysql_table.cpp?cvsroot=gnash&r1=1.2&r2=1.3 http://cvs.savannah.gnu.org/viewcvs/gnash/server/array.cpp?cvsroot=gnash&r1=1.47&r2=1.48 http://cvs.savannah.gnu.org/viewcvs/gnash/server/array.h?cvsroot=gnash&r1=1.18&r2=1.19 http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_function.cpp?cvsroot=gnash&r1=1.16&r2=1.17 http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_object.cpp?cvsroot=gnash&r1=1.23&r2=1.24 http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_object.h?cvsroot=gnash&r1=1.29&r2=1.30 http://cvs.savannah.gnu.org/viewcvs/gnash/server/button_character_instance.cpp?cvsroot=gnash&r1=1.23&r2=1.24 http://cvs.savannah.gnu.org/viewcvs/gnash/server/button_character_instance.h?cvsroot=gnash&r1=1.9&r2=1.10 http://cvs.savannah.gnu.org/viewcvs/gnash/server/edit_text_character.cpp?cvsroot=gnash&r1=1.41&r2=1.42 http://cvs.savannah.gnu.org/viewcvs/gnash/server/edit_text_character.h?cvsroot=gnash&r1=1.21&r2=1.22 http://cvs.savannah.gnu.org/viewcvs/gnash/server/event_id.h?cvsroot=gnash&r1=1.2&r2=1.3 http://cvs.savannah.gnu.org/viewcvs/gnash/server/gnash.h?cvsroot=gnash&r1=1.82&r2=1.83 http://cvs.savannah.gnu.org/viewcvs/gnash/server/movie_root.h?cvsroot=gnash&r1=1.31&r2=1.32 http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.124&r2=1.125 http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.h?cvsroot=gnash&r1=1.55&r2=1.56 http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf_function.cpp?cvsroot=gnash&r1=1.16&r2=1.17 http://cvs.savannah.gnu.org/viewcvs/gnash/server/video_stream_instance.cpp?cvsroot=gnash&r1=1.5&r2=1.6 http://cvs.savannah.gnu.org/viewcvs/gnash/server/video_stream_instance.h?cvsroot=gnash&r1=1.4&r2=1.5 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/ASSound.cpp?cvsroot=gnash&r1=1.6&r2=1.7 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Boolean.cpp?cvsroot=gnash&r1=1.4&r2=1.5 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Camera.cpp?cvsroot=gnash&r1=1.3&r2=1.4 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Color.cpp?cvsroot=gnash&r1=1.4&r2=1.5 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/ContextMenu.cpp?cvsroot=gnash&r1=1.5&r2=1.6 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/CustomActions.cpp?cvsroot=gnash&r1=1.3&r2=1.4 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Date.cpp?cvsroot=gnash&r1=1.5&r2=1.6 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Error.cpp?cvsroot=gnash&r1=1.4&r2=1.5 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Global.cpp?cvsroot=gnash&r1=1.32&r2=1.33 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Key.cpp?cvsroot=gnash&r1=1.7&r2=1.8 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Key.h?cvsroot=gnash&r1=1.10&r2=1.11 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/LoadVars.cpp?cvsroot=gnash&r1=1.4&r2=1.5 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/LocalConnection.cpp?cvsroot=gnash&r1=1.5&r2=1.6 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Math.cpp?cvsroot=gnash&r1=1.13&r2=1.14 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Microphone.cpp?cvsroot=gnash&r1=1.3&r2=1.4 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Mouse.cpp?cvsroot=gnash&r1=1.3&r2=1.4 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/MovieClipLoader.cpp?cvsroot=gnash&r1=1.14&r2=1.15 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetConnection.cpp?cvsroot=gnash&r1=1.16&r2=1.17 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStream.cpp?cvsroot=gnash&r1=1.21&r2=1.22 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStream.h?cvsroot=gnash&r1=1.16&r2=1.17 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStreamFfmpeg.cpp?cvsroot=gnash&r1=1.6&r2=1.7 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStreamGst.cpp?cvsroot=gnash&r1=1.3&r2=1.4 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Number.cpp?cvsroot=gnash&r1=1.8&r2=1.9 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Object.cpp?cvsroot=gnash&r1=1.10&r2=1.11 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Selection.cpp?cvsroot=gnash&r1=1.4&r2=1.5 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/SharedObject.cpp?cvsroot=gnash&r1=1.4&r2=1.5 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Stage.cpp?cvsroot=gnash&r1=1.4&r2=1.5 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/System.cpp?cvsroot=gnash&r1=1.7&r2=1.8 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/TextSnapshot.cpp?cvsroot=gnash&r1=1.4&r2=1.5 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Video.cpp?cvsroot=gnash&r1=1.5&r2=1.6 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/gen-asclass.sh?cvsroot=gnash&r1=1.6&r2=1.7 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/string.cpp?cvsroot=gnash&r1=1.12&r2=1.13 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/xml.cpp?cvsroot=gnash&r1=1.11&r2=1.12 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/xmlnode.cpp?cvsroot=gnash&r1=1.5&r2=1.6 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/xmlsocket.cpp?cvsroot=gnash&r1=1.2&r2=1.3 http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/ASHandlers.cpp?cvsroot=gnash&r1=1.30&r2=1.31 http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/ActionExec.cpp?cvsroot=gnash&r1=1.13&r2=1.14 http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/ActionExec.h?cvsroot=gnash&r1=1.9&r2=1.10 http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/action.cpp?cvsroot=gnash&r1=1.4&r2=1.5 http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/action.h?cvsroot=gnash&r1=1.2&r2=1.3 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/XML.as?cvsroot=gnash&r1=1.15&r2=1.16 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/server/GetterSetterTest.cpp?cvsroot=gnash&r1=1.5&r2=1.6 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2137 retrieving revision 1.2138 diff -u -b -r1.2137 -r1.2138 --- ChangeLog 18 Jan 2007 19:38:05 -0000 1.2137 +++ ChangeLog 18 Jan 2007 22:53:21 -0000 1.2138 @@ -1,3 +1,44 @@ +2007-01-18 Sandro Santilli + + * extensions/mysql/mysql_table.cpp, server/array.cpp, + server/array.h, server/as_function.cpp, server/as_object.cpp, + server/as_object.h, server/button_character_instance.cpp, + server/button_character_instance.h, + server/edit_text_character.cpp, server/edit_text_character.h, + server/event_id.h, server/gnash.h, server/movie_root.h, + server/sprite_instance.cpp, server/sprite_instance.h, + server/swf_function.cpp, server/video_stream_instance.cpp, + server/video_stream_instance.h, server/asobj/ASSound.cpp, + server/asobj/Boolean.cpp, server/asobj/Camera.cpp, + server/asobj/Color.cpp, server/asobj/ContextMenu.cpp, + server/asobj/CustomActions.cpp, server/asobj/Date.cpp, + server/asobj/Error.cpp, server/asobj/Global.cpp, + server/asobj/Key.cpp, server/asobj/Key.h, + server/asobj/LoadVars.cpp, server/asobj/LocalConnection.cpp, + server/asobj/Math.cpp, server/asobj/Microphone.cpp, + server/asobj/Mouse.cpp, server/asobj/MovieClipLoader.cpp, + server/asobj/NetConnection.cpp, server/asobj/NetStream.cpp, + server/asobj/NetStream.h, server/asobj/NetStreamFfmpeg.cpp, + server/asobj/NetStreamGst.cpp, server/asobj/Number.cpp, + server/asobj/Object.cpp, server/asobj/Selection.cpp, + server/asobj/SharedObject.cpp, server/asobj/Stage.cpp, + server/asobj/System.cpp, server/asobj/TextSnapshot.cpp, + server/asobj/Video.cpp, server/asobj/gen-asclass.sh, + server/asobj/string.cpp, server/asobj/xml.cpp, + server/asobj/xmlnode.cpp, server/asobj/xmlsocket.cpp, + server/vm/ASHandlers.cpp, server/vm/ActionExec.cpp, + server/vm/ActionExec.h, server/vm/action.cpp, + server/vm/action.h, testsuite/actionscript.all/XML.as, + testsuite/server/GetterSetterTest.cpp: + (1) Change {get,set}_member{,_default} as_object members + to take a std::string rather then a tu_string and to avoid + case conversion of key based on target SWF version + (2) Provide init_{member,property} as_obejct members to initialize + AS class methods/props and take care of SWF#-based case-conversion; + use where appropriate. + (3) Provide {get,set}ObjectMember methods in ActionExec to take + care of SWF#-based case conversion when called from AS handlers. + 2007-01-18 Bastiaan Jacques * server/asobj/xml.cpp: Make sure we actually have an XMLNode pointer Index: extensions/mysql/mysql_table.cpp =================================================================== RCS file: /sources/gnash/gnash/extensions/mysql/mysql_table.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- extensions/mysql/mysql_table.cpp 29 Oct 2006 18:34:17 -0000 1.2 +++ extensions/mysql/mysql_table.cpp 18 Jan 2007 22:53:21 -0000 1.3 @@ -109,10 +109,10 @@ } } - bool table::get_member(const tu_stringi& name, as_value* val) + bool table::get_member(const std::string& name, as_value* val) { // check table methods - if (as_object::get_member(name, val) == false) + if ( get_member_default(name, val) == false ) { // hack int idx = atoi(name.c_str()); @@ -128,12 +128,6 @@ return true; } -// void table::set_member(const tu_stringi& name, const as_value& val) -// { -// as_object::set_member(name,val); -// } - - int table::size() { return m_data.size(); Index: server/array.cpp =================================================================== RCS file: /sources/gnash/gnash/server/array.cpp,v retrieving revision 1.47 retrieving revision 1.48 diff -u -b -r1.47 -r1.48 --- server/array.cpp 9 Jan 2007 23:30:37 -0000 1.47 +++ server/array.cpp 18 Jan 2007 22:53:21 -0000 1.48 @@ -152,7 +152,7 @@ } int -as_array_object::index_requested(const tu_stringi& name) +as_array_object::index_requested(const std::string& name) { as_value temp; temp.set_string(name.c_str()); @@ -311,9 +311,9 @@ } -/* virtual public, overriding as_object::set_member */ +/* virtual public, overriding as_object::get_member */ bool -as_array_object::get_member(const tu_stringi& name, as_value *val) +as_array_object::get_member(const std::string& name, as_value *val) { if ( name == "length" ) { @@ -334,7 +334,7 @@ /* virtual public, overriding as_object::set_member */ void -as_array_object::set_member(const tu_stringi& name, +as_array_object::set_member(const std::string& name, const as_value& val ) { if ( name == "length" ) @@ -784,26 +784,26 @@ // we don't need an explicit member here, // we will be handling 'length' requests // within overridden get_member() - //proto->set_member("length", &array_length); + //proto->init_member("length", &array_length); - proto.set_member("join", &array_join); - proto.set_member("concat", &array_concat); - proto.set_member("slice", &array_slice); - proto.set_member("push", &array_push); - proto.set_member("unshift", &array_unshift); - proto.set_member("pop", &array_pop); - proto.set_member("shift", &array_shift); - proto.set_member("splice", &array_splice); - proto.set_member("sort", &array_sort); - proto.set_member("size", &array_size); - proto.set_member("sortOn", &array_sortOn); - proto.set_member("reverse", &array_reverse); - proto.set_member("toString", &array_to_string); - proto.set_member("CASEINSENSITIVE", as_array_object::fCaseInsensitive); - proto.set_member("DESCENDING", as_array_object::fDescending); - proto.set_member("UNIQUESORT", as_array_object::fUniqueSort); - proto.set_member("RETURNINDEXEDARRAY", as_array_object::fReturnIndexedArray); - proto.set_member("NUMERIC", as_array_object::fNumeric); + proto.init_member("join", &array_join); + proto.init_member("concat", &array_concat); + proto.init_member("slice", &array_slice); + proto.init_member("push", &array_push); + proto.init_member("unshift", &array_unshift); + proto.init_member("pop", &array_pop); + proto.init_member("shift", &array_shift); + proto.init_member("splice", &array_splice); + proto.init_member("sort", &array_sort); + proto.init_member("size", &array_size); + proto.init_member("sortOn", &array_sortOn); + proto.init_member("reverse", &array_reverse); + proto.init_member("toString", &array_to_string); + proto.init_member("CASEINSENSITIVE", as_array_object::fCaseInsensitive); + proto.init_member("DESCENDING", as_array_object::fDescending); + proto.init_member("UNIQUESORT", as_array_object::fUniqueSort); + proto.init_member("RETURNINDEXEDARRAY", as_array_object::fReturnIndexedArray); + proto.init_member("NUMERIC", as_array_object::fNumeric); } static as_object* @@ -838,7 +838,7 @@ } // Register _global.Array - glob.set_member("Array", ar.get()); + glob.init_member("Array", ar.get()); } Index: server/array.h =================================================================== RCS file: /sources/gnash/gnash/server/array.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -b -r1.18 -r1.19 --- server/array.h 24 Nov 2006 09:04:24 -0000 1.18 +++ server/array.h 18 Jan 2007 22:53:21 -0000 1.19 @@ -124,10 +124,12 @@ std::auto_ptr sorted_indexes(as_function& comparator, uint8_t flags); /// Overridden to provide 'length' member - virtual bool get_member(const tu_stringi& name, as_value* val); + // + /// TODO: use a property for handling 'length' + virtual bool get_member(const std::string& name, as_value* val); /// Overridden to provide array[#]=x semantic - virtual void set_member(const tu_stringi& name, + virtual void set_member(const std::string& name, const as_value& val ); private: @@ -137,7 +139,7 @@ // this function is used internally by set_member and get_member // it takes a string that is the member name of the array and returns -1 // if the string does not refer to an index, or an appropriate int if the string does refer to an index - int index_requested(const tu_stringi& name); + int index_requested(const std::string& name); }; Index: server/as_function.cpp =================================================================== RCS file: /sources/gnash/gnash/server/as_function.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -u -b -r1.16 -r1.17 --- server/as_function.cpp 2 Jan 2007 12:51:32 -0000 1.16 +++ server/as_function.cpp 18 Jan 2007 22:53:21 -0000 1.17 @@ -77,8 +77,8 @@ if ( proto.get() == NULL ) { // Initialize Function prototype proto = new as_object(); - proto->set_member("apply", &function_apply); - proto->set_member("call", &function_call); + proto->init_member("apply", &function_apply); + proto->init_member("call", &function_call); } return proto.get(); @@ -110,25 +110,23 @@ { _properties = new as_object(); } - _properties->set_member("constructor", this); - _properties->set_member_flags("constructor", 1); - set_member("prototype", as_value(_properties.get())); + _properties->init_member("constructor", this); + init_member("prototype", as_value(_properties.get())); } void as_function::setPrototype(as_object* proto) { _properties = proto; - set_member("prototype", as_value(_properties.get())); + init_member("prototype", as_value(_properties.get())); } void as_function::extends(as_function& superclass) { _properties = new as_object(superclass.getPrototype()); - _properties->set_member("constructor", &superclass); - _properties->set_member_flags("constructor", 1); - set_member("prototype", as_value(_properties.get())); + _properties->init_member("constructor", &superclass); + init_member("prototype", as_value(_properties.get())); } as_object* @@ -164,7 +162,7 @@ ); // Register _global.Function - global.set_member("Function", func.get()); + global.init_member("Function", func.get()); } Index: server/as_object.cpp =================================================================== RCS file: /sources/gnash/gnash/server/as_object.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -u -b -r1.23 -r1.24 --- server/as_object.cpp 2 Jan 2007 12:51:32 -0000 1.23 +++ server/as_object.cpp 18 Jan 2007 22:53:21 -0000 1.24 @@ -37,13 +37,6 @@ namespace gnash { -/*public virtual*/ -bool -as_object::get_member(const tu_stringi& name, as_value* val) -{ - return get_member_default(name, val); -} - bool as_object::add_property(const std::string& key, as_function& getter, as_function& setter) @@ -62,24 +55,16 @@ /*protected*/ bool -as_object::get_member_default(const tu_stringi& namei, as_value* val) +as_object::get_member_default(const std::string& name, as_value* val) { assert(val); - // temp hack, should really update this method's interface instead - std::string name = namei.c_str(); - - if ( _vm.getSWFVersion() < 7 ) - { - boost::to_lower(name, _vm.getLocale()); - } - //log_msg("Getting member %s (SWF version:%d)", name.c_str(), vm.getSWFVersion()); // TODO: inspect wheter it is possible to make __proto__ a // getter/setter property instead, to take this into account // - if (namei == "__proto__") + if (name == "__proto__") { if ( ! m_prototype ) { @@ -145,12 +130,6 @@ } -void -as_object::set_member(const tu_stringi& name, const as_value& val) -{ - return set_member_default(name, val); -} - /*protected*/ void as_object::set_prototype(as_object* proto) @@ -159,17 +138,10 @@ } void -as_object::set_member_default(const tu_stringi& name, const as_value& val ) +as_object::set_member_default(const std::string& key, const as_value& val ) { - std::string key = name.c_str(); - - if ( _vm.getSWFVersion() < 7 ) - { - boost::to_lower(key, _vm.getLocale()); - } - - //log_msg("Setting member %s (SWF version:%d)", key.c_str(), vm.getSWFVersion()); + //log_msg("set_member_default( %s ) ", key.c_str() ); // TODO: make __proto__ a getter/setter ? if (key == "__proto__") @@ -203,17 +175,80 @@ } -bool -as_object::set_member_flags(const tu_stringi& name_tu, - int setTrue, int setFalse) +void +as_object::init_member(const std::string& key, const as_value& val ) { - std::string name(name_tu.c_str()); + //log_msg("Setting member %s (SWF version:%d)", key.c_str(), vm.getSWFVersion()); + //log_msg("Found NO getter/setter property for key %s", key.c_str()); + + VM& vm = _vm; + + int flags = as_prop_flags::dontDelete||as_prop_flags::dontEnum; + + if ( vm.getSWFVersion() < 7 ) + { + std::string keylower = key; + boost::to_lower(keylower, vm.getLocale()); + + // Set (or create) a SimpleProperty + if ( ! _members.setValue(keylower, val, *this) ) + { + log_error("Attempt to initialize Read-Only property ``%s''" + " (%s) on object ``%p''", + keylower.c_str(), key.c_str(), (void*)this); + // We shouldn't attempt to initialize a member twice, should we ? + assert(0); + } + // TODO: optimize this, don't scan again ! + _members.setFlags(keylower, flags, 0); + } + else + { + // Set (or create) a SimpleProperty + if ( ! _members.setValue(key, val, *this) ) + { + log_error("Attempt to initialize Read-Only property ``%s''" + " on object ``%p''", + key.c_str(), (void*)this); + // We shouldn't attempt to initialize a member twice, should we ? + assert(0); + } + // TODO: optimize this, don't scan again ! + _members.setFlags(key, flags, 0); + } + + + + +} + +void +as_object::init_property(const std::string& key, as_function& getter, + as_function& setter) +{ + bool success; if ( _vm.getSWFVersion() < 7 ) { + std::string name = key; boost::to_lower(name, _vm.getLocale()); + success = _members.addGetterSetter(name, getter, setter); + log_msg("Initialized property '%s'", name.c_str()); } + else + { + success = _members.addGetterSetter(key, getter, setter); + log_msg("Initialized property '%s'", key.c_str()); + } + + // We shouldn't attempt to initialize a property twice, should we ? + assert(success); +} +bool +as_object::set_member_flags(const std::string& name, + int setTrue, int setFalse) +{ // TODO: accept a std::string directly return _members.setFlags(name, setTrue, setFalse); } Index: server/as_object.h =================================================================== RCS file: /sources/gnash/gnash/server/as_object.h,v retrieving revision 1.29 retrieving revision 1.30 diff -u -b -r1.29 -r1.30 --- server/as_object.h 2 Jan 2007 12:51:32 -0000 1.29 +++ server/as_object.h 18 Jan 2007 22:53:21 -0000 1.30 @@ -150,10 +150,52 @@ /// NOTE: This might change in the near future trough use of /// getter/setter properties instead.. /// - /// TODO: take a std::string rather then a tu_stringi + virtual void set_member(const std::string& name, const as_value& val) + { + return set_member_default(name, val); + } + + /// Initialize a member value + // + /// This method has to be used by built-in classes initialization + /// (VM initialization in general) as will avoid to scan the + /// inheritance chain and perform lowercase conversion when + /// VM version is initialized at versions < 7. + /// Also, members initialized by calling this function will + /// be protected from deletion and not shown in enumeration + /// TODO: provide an additional argument to prevent 'protection' ? + /// + /// @param name + /// Name of the member. + /// Will be converted to lowercase if VM is initialized for SWF6 or lower. + /// + /// @param val + /// Value to assign to the member. /// - virtual void set_member(const tu_stringi& name, - const as_value& val ); + void init_member(const std::string& name, const as_value& val); + + /// \brief + /// Initialize a getter/setter property + // + /// This method has to be used by built-in classes initialization + /// (VM initialization in general) as will avoid to scan the + /// inheritance chain and perform lowercase conversion when + /// VM version is initialized at versions < 7. + /// + /// @param key + /// Name of the property. + /// Will be converted to lowercase if VM is initialized for SWF6 or lower. + /// + /// @param getter + /// A function to invoke when this property value is requested. + /// add_ref will be called on the function. + /// + /// @param setter + /// A function to invoke when setting this property's value. + /// add_ref will be called on the function. + /// + void init_property(const std::string& key, as_function& getter, + as_function& setter); /// Get a member as_value by name // @@ -168,9 +210,10 @@ /// that the 'getter' won't change this object trough /// use of the 'this' reference. /// - /// TODO: take a std::string rather then a tu_stringi - /// - virtual bool get_member(const tu_stringi& name, as_value* val); + virtual bool get_member(const std::string& name, as_value* val) + { + return get_member_default(name, val); + } /// Delete a property of this object, unless protected from deletion. // @@ -207,7 +250,7 @@ /// @return true on success, false on failure /// (non-existent or protected member) /// - bool set_member_flags(const tu_stringi& name, + bool set_member_flags(const std::string& name, int setTrue, int setFalse=0); /// Cast to a sprite, or return NULL @@ -301,17 +344,17 @@ /// that the 'getter' won't change this object trough /// use of the 'this' reference. /// - /// TODO: take a std::string rather then a tu_stringi - /// /// @param name /// Name of the property. /// Case insensitive up to SWF6, /// case *sensitive* from SWF7 up. + /// TODO: be *always* case-sensitive, and delegate + /// convertion to lowercase to callers /// /// @param val /// The as_value to store a found variable's value in. /// - bool get_member_default(const tu_stringi& name, as_value* val); + bool get_member_default(const std::string& name, as_value* val); /// Set a member value // @@ -330,7 +373,7 @@ /// Case insensitive up to SWF6, /// case *sensitive* from SWF7 up. /// - void set_member_default(const tu_stringi& name, const as_value& val); + void set_member_default(const std::string& name, const as_value& val); /// Set this object's '__proto__' member // Index: server/button_character_instance.cpp =================================================================== RCS file: /sources/gnash/gnash/server/button_character_instance.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -u -b -r1.23 -r1.24 --- server/button_character_instance.cpp 12 Dec 2006 22:41:05 -0000 1.23 +++ server/button_character_instance.cpp 18 Jan 2007 22:53:21 -0000 1.24 @@ -546,7 +546,7 @@ // void -button_character_instance::set_member(const tu_stringi& name, +button_character_instance::set_member(const std::string& name, const as_value& val) { @@ -644,7 +644,7 @@ } bool -button_character_instance::get_member(const tu_stringi& name, as_value* val) +button_character_instance::get_member(const std::string& name, as_value* val) { // TODO: pull these up into a base class, to // share as much as possible with sprite_instance. Index: server/button_character_instance.h =================================================================== RCS file: /sources/gnash/gnash/server/button_character_instance.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -b -r1.9 -r1.10 --- server/button_character_instance.h 12 Dec 2006 19:48:04 -0000 1.9 +++ server/button_character_instance.h 18 Jan 2007 22:53:21 -0000 1.10 @@ -5,7 +5,7 @@ // SWF buttons. Mouse-sensitive update/display, actions, etc. -/* $Id: button_character_instance.h,v 1.9 2006/12/12 19:48:04 strk Exp $ */ +/* $Id: button_character_instance.h,v 1.10 2007/01/18 22:53:21 strk Exp $ */ #ifndef GNASH_BUTTON_CHARACTER_INSTANCE_H #define GNASH_BUTTON_CHARACTER_INSTANCE_H @@ -103,9 +103,9 @@ // ActionScript overrides // - virtual void set_member(const tu_stringi& name, const as_value& val); + virtual void set_member(const std::string& name, const as_value& val); - virtual bool get_member(const tu_stringi& name, as_value* val); + virtual bool get_member(const std::string& name, as_value* val); void get_invalidated_bounds(rect* bounds, bool force); Index: server/edit_text_character.cpp =================================================================== RCS file: /sources/gnash/gnash/server/edit_text_character.cpp,v retrieving revision 1.41 retrieving revision 1.42 diff -u -b -r1.41 -r1.42 --- server/edit_text_character.cpp 8 Dec 2006 14:41:33 -0000 1.41 +++ server/edit_text_character.cpp 18 Jan 2007 22:53:21 -0000 1.42 @@ -15,7 +15,7 @@ // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -/* $Id: edit_text_character.cpp,v 1.41 2006/12/08 14:41:33 strk Exp $ */ +/* $Id: edit_text_character.cpp,v 1.42 2007/01/18 22:53:21 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -34,9 +34,11 @@ #include "VM.h" #include "builtin_function.h" // for getter/setter properties #include "font.h" // for using the _font member +#include "VM.h" #include #include +#include namespace gnash { @@ -95,7 +97,7 @@ // SWF6 or higher boost::intrusive_ptr variable_getter(new builtin_function(&textfield_get_variable, NULL)); boost::intrusive_ptr variable_setter(new builtin_function(&textfield_set_variable, NULL)); - o.add_property("variable", *variable_getter, *variable_setter); + o.init_property("variable", *variable_getter, *variable_setter); if ( target_version < 7 ) return; // SWF7 or higher @@ -111,8 +113,7 @@ { proto = new as_object(); attachTextFieldInterface(*proto); - proto->set_member("constructor", &textfield_ctor); - proto->set_member_flags("constructor", 1); + proto->init_member("constructor", &textfield_ctor); } return proto.get(); } @@ -416,6 +417,9 @@ } format_text(); + + //log_msg("Text set to %s", new_text.c_str()); + } const char* @@ -433,10 +437,10 @@ } void -edit_text_character::set_member(const tu_stringi& name, +edit_text_character::set_member(const std::string& name, const as_value& val) { - //log_msg("edit_text_character.set_member(%s, %s)", name.c_str(), val.to_string()); + log_msg("edit_text_character.set_member(%s, %s)", name.c_str(), val.to_string()); // FIXME: Turn all standard members into getter/setter properties // of the TextField class. See attachTextFieldInterface() @@ -515,7 +519,7 @@ } bool -edit_text_character::get_member(const tu_stringi& name, as_value* val) +edit_text_character::get_member(const std::string& name, as_value* val) { //log_msg("edit_text_character.get_member(%s)", name.c_str()); @@ -965,9 +969,7 @@ return; } - const std::string& var_str = _variable_name; - - if ( var_str.empty() ) + if ( _variable_name.empty() ) { #ifdef DEBUG_DYNTEXT_VARIABLES log_msg(" string is empty, consider as registered"); @@ -976,7 +978,15 @@ return; } + std::string var_str = _variable_name; + VM& vm = VM::get(); + if ( vm.getSWFVersion() < 7 ) + { + boost::to_lower( var_str, vm.getLocale() ); + } + const char* varname = var_str.c_str(); + #ifdef DEBUG_DYNTEXT_VARIABLES log_msg(" VariableName: %s", var_str.c_str()); #endif @@ -1018,7 +1028,7 @@ // check if the VariableName already has a value, // in that case update text value as_value val; - if ( sprite->get_member(tu_stringi(varname), &val) ) + if ( sprite->get_member(varname, &val) ) { #ifdef DEBUG_DYNTEXT_VARIABLES log_msg("target sprite (%p) does have a member named %s", (void*)sprite, varname); Index: server/edit_text_character.h =================================================================== RCS file: /sources/gnash/gnash/server/edit_text_character.h,v retrieving revision 1.21 retrieving revision 1.22 diff -u -b -r1.21 -r1.22 --- server/edit_text_character.h 12 Dec 2006 19:48:04 -0000 1.21 +++ server/edit_text_character.h 18 Jan 2007 22:53:21 -0000 1.22 @@ -74,9 +74,9 @@ virtual const char* get_text_value() const; /// We have a "text" member. - void set_member(const tu_stringi& name, const as_value& val); + void set_member(const std::string& name, const as_value& val); - bool get_member(const tu_stringi& name, as_value* val); + bool get_member(const std::string& name, as_value* val); /// Draw the dynamic string. void display(); Index: server/event_id.h =================================================================== RCS file: /sources/gnash/gnash/server/event_id.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- server/event_id.h 20 Nov 2006 23:21:43 -0000 1.2 +++ server/event_id.h 18 Jan 2007 22:53:21 -0000 1.3 @@ -29,12 +29,13 @@ #include -class tu_string; // for get_function_name - namespace gnash { /// For keyDown and stuff like that. +// +/// Implementation is currently in action.cpp +/// class DSOEXPORT event_id { public: @@ -121,7 +122,7 @@ /// Return the name of a method-handler function /// corresponding to this event. - const tu_string& get_function_name() const; + const std::string& get_function_name() const; /// \brief /// Return true if this is a mouse event Index: server/gnash.h =================================================================== RCS file: /sources/gnash/gnash/server/gnash.h,v retrieving revision 1.82 retrieving revision 1.83 diff -u -b -r1.82 -r1.83 --- server/gnash.h 10 Jan 2007 17:28:49 -0000 1.82 +++ server/gnash.h 18 Jan 2007 22:53:21 -0000 1.83 @@ -17,7 +17,7 @@ // // -/* $Id: gnash.h,v 1.82 2007/01/10 17:28:49 strk Exp $ */ +/* $Id: gnash.h,v 1.83 2007/01/18 22:53:21 strk Exp $ */ /// \mainpage /// @@ -136,7 +136,13 @@ DSOEXPORT void register_fscommand_callback(fscommand_callback handler); /// Use this to register gnash extension -void register_component(const tu_stringi& name, as_c_function_ptr handler); +// +/// WARNING: does not convert name, make sure to pass a lowercase +/// name if SWF version is < 7 ! It seems currently no code +/// calls this function.. +/// +/// +void register_component(const std::string& name, as_c_function_ptr handler); /// Use this to control how finely curves are subdivided. 1.0 /// is the default; it's a pretty good value. Larger values Index: server/movie_root.h =================================================================== RCS file: /sources/gnash/gnash/server/movie_root.h,v retrieving revision 1.31 retrieving revision 1.32 diff -u -b -r1.31 -r1.32 --- server/movie_root.h 7 Dec 2006 10:46:12 -0000 1.31 +++ server/movie_root.h 18 Jan 2007 22:53:21 -0000 1.32 @@ -14,7 +14,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -/* $Id: movie_root.h,v 1.31 2006/12/07 10:46:12 strk Exp $ */ +/* $Id: movie_root.h,v 1.32 2007/01/18 22:53:21 strk Exp $ */ /// \page events_handling Handling of user events /// @@ -128,13 +128,13 @@ /// @@ should this delegate to _movie? probably ! void set_member( - const tu_stringi& /*name*/, + const std::string& /*name*/, const as_value& /*val*/) { } /// @@ should this delegate to _movie? probably ! - bool get_member(const tu_stringi& /*name*/, + bool get_member(const std::string& /*name*/, as_value* /*val*/) { return false; Index: server/sprite_instance.cpp =================================================================== RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v retrieving revision 1.124 retrieving revision 1.125 diff -u -b -r1.124 -r1.125 --- server/sprite_instance.cpp 15 Jan 2007 00:06:59 -0000 1.124 +++ server/sprite_instance.cpp 18 Jan 2007 22:53:21 -0000 1.125 @@ -52,6 +52,7 @@ #include // for mem_fun, bind1st #include // for for_each +#include // This needs to be included first for NetBSD systems or we get a weird // problem with pthread_t being defined too many times if we use any @@ -815,10 +816,10 @@ double yMax = bounds.getMaxY(); boost::intrusive_ptr bounds_obj(new as_object()); - bounds_obj->set_member("xMin", as_value(xMin)); - bounds_obj->set_member("yMin", as_value(yMin)); - bounds_obj->set_member("xMax", as_value(xMax)); - bounds_obj->set_member("yMax", as_value(yMax)); + bounds_obj->init_member("xMin", as_value(xMin)); + bounds_obj->init_member("yMin", as_value(yMin)); + bounds_obj->init_member("xMax", as_value(xMax)); + bounds_obj->init_member("yMax", as_value(yMax)); // xMin, xMax, yMin, and yMax log_error("FIXME: MovieClip.getBounds() not implemented yet (just stubbed)"); @@ -1014,43 +1015,43 @@ int target_version = o.getVM().getSWFVersion(); // SWF5 or higher - o.set_member("attachMovie", &sprite_attach_movie); - o.set_member("play", &sprite_play); - o.set_member("stop", &sprite_stop); - o.set_member("gotoAndStop", &sprite_goto_and_stop); - o.set_member("gotoAndPlay", &sprite_goto_and_play); - o.set_member("nextFrame", &sprite_next_frame); - o.set_member("prevFrame", &sprite_prev_frame); - o.set_member("getBytesLoaded", &sprite_get_bytes_loaded); - o.set_member("getBytesTotal", &sprite_get_bytes_total); - o.set_member("loadMovie", &sprite_load_movie); - o.set_member("hitTest", &sprite_hit_test); - o.set_member("duplicateMovieClip", &sprite_duplicate_movieclip); - o.set_member("swapDepths", &sprite_swap_depths); - o.set_member("removeMovieClip", &sprite_remove_movieclip); - o.set_member("startDrag", &sprite_startDrag); - o.set_member("stopDrag", &sprite_stopDrag); - o.set_member("getURL", &sprite_getURL); - o.set_member("getBounds", &sprite_getBounds); - o.set_member("globalToLocal", &sprite_globalToLocal); + o.init_member("attachMovie", &sprite_attach_movie); + o.init_member("play", &sprite_play); + o.init_member("stop", &sprite_stop); + o.init_member("gotoAndStop", &sprite_goto_and_stop); + o.init_member("gotoAndPlay", &sprite_goto_and_play); + o.init_member("nextFrame", &sprite_next_frame); + o.init_member("prevFrame", &sprite_prev_frame); + o.init_member("getBytesLoaded", &sprite_get_bytes_loaded); + o.init_member("getBytesTotal", &sprite_get_bytes_total); + o.init_member("loadMovie", &sprite_load_movie); + o.init_member("hitTest", &sprite_hit_test); + o.init_member("duplicateMovieClip", &sprite_duplicate_movieclip); + o.init_member("swapDepths", &sprite_swap_depths); + o.init_member("removeMovieClip", &sprite_remove_movieclip); + o.init_member("startDrag", &sprite_startDrag); + o.init_member("stopDrag", &sprite_stopDrag); + o.init_member("getURL", &sprite_getURL); + o.init_member("getBounds", &sprite_getBounds); + o.init_member("globalToLocal", &sprite_globalToLocal); if ( target_version < 6 ) return; // SWF6 or higher - o.set_member("beginFill", &sprite_beginFill); - o.set_member("beginGradientFill", &sprite_beginGradientFill); - o.set_member("clear", &sprite_clear); - o.set_member("curveTo", &sprite_curveTo); - o.set_member("lineStyle", &sprite_lineStyle); - o.set_member("lineTo", &sprite_lineTo); - o.set_member("endFill", &sprite_endFill); - o.set_member("attachAudio", &sprite_attach_audio); - o.set_member("createTextField", &sprite_create_text_field); - o.set_member("getDepth", &sprite_get_depth); - o.set_member("createEmptyMovieClip", &sprite_create_empty_movieclip); + o.init_member("beginFill", &sprite_beginFill); + o.init_member("beginGradientFill", &sprite_beginGradientFill); + o.init_member("clear", &sprite_clear); + o.init_member("curveTo", &sprite_curveTo); + o.init_member("lineStyle", &sprite_lineStyle); + o.init_member("lineTo", &sprite_lineTo); + o.init_member("endFill", &sprite_endFill); + o.init_member("attachAudio", &sprite_attach_audio); + o.init_member("createTextField", &sprite_create_text_field); + o.init_member("getDepth", &sprite_get_depth); + o.init_member("createEmptyMovieClip", &sprite_create_empty_movieclip); if ( target_version < 7 ) return; // SWF7 or higher - o.set_member("getNextHighestDepth", &sprite_getNextHighestDepth); + o.init_member("getNextHighestDepth", &sprite_getNextHighestDepth); if ( target_version < 8 ) return; // TODO: many more methods, see MovieClip class ... @@ -1065,8 +1066,7 @@ { proto = new as_object(); attachMovieClipInterface(*proto); - proto->set_member("constructor", &movieclip_ctor); - proto->set_member_flags("constructor", 1); + proto->init_member("constructor", &movieclip_ctor); } return proto.get(); } @@ -1087,7 +1087,7 @@ } // Register _global.MovieClip - global.set_member("MovieClip", cl.get()); + global.init_member("MovieClip", cl.get()); } @@ -1211,11 +1211,8 @@ // Set *val to the value of the named member and // return true, if we have the named member. // Otherwise leave *val alone and return false. -bool sprite_instance::get_member(const tu_stringi& name_, as_value* val) +bool sprite_instance::get_member(const std::string& name, as_value* val) { - // TODO: take a std::string directly !! - std::string name = name_.c_str(); - if ( name == "_root" ) { // TODO: handle lockroot @@ -1235,7 +1232,7 @@ } // FIXME: use addProperty interface for these !! - as_standard_member std_member = get_standard_member(name.c_str()); + as_standard_member std_member = get_standard_member(name); switch (std_member) { default: @@ -1708,7 +1705,13 @@ { // In ActionScript 2.0, event method names are CASE SENSITIVE. // In ActionScript 1.0, event method names are CASE INSENSITIVE. - const tu_stringi& method_name = id.get_function_name(); + // TODO: move to get_function_name directly ? + std::string method_name = id.get_function_name(); + if ( _vm.getSWFVersion() < 7 ) + { + boost::to_lower(method_name, _vm.getLocale()); + } + if (method_name.length() > 0) { as_value method; @@ -1739,7 +1742,7 @@ return ch; // possibly NULL } -void sprite_instance::set_member(const tu_stringi& name, +void sprite_instance::set_member(const std::string& name, const as_value& val) { #ifdef DEBUG_DYNTEXT_VARIABLES Index: server/sprite_instance.h =================================================================== RCS file: /sources/gnash/gnash/server/sprite_instance.h,v retrieving revision 1.55 retrieving revision 1.56 diff -u -b -r1.55 -r1.56 --- server/sprite_instance.h 11 Jan 2007 17:03:54 -0000 1.55 +++ server/sprite_instance.h 18 Jan 2007 22:53:21 -0000 1.56 @@ -17,7 +17,7 @@ // // -/* $Id: sprite_instance.h,v 1.55 2007/01/11 17:03:54 strk Exp $ */ +/* $Id: sprite_instance.h,v 1.56 2007/01/18 22:53:21 strk Exp $ */ // Stateful live Sprite instance @@ -438,18 +438,15 @@ /// Returns address to static buffer. NOT THREAD SAFE! virtual const char* get_variable(const char* path_to_var) const; - // Set *val to the value of the named member and - // return true, if we have the named member. - // Otherwise leave *val alone and return false. - bool get_member(const tu_stringi& name, as_value* val); + // See dox in as_object.h + bool get_member(const std::string& name, as_value* val); /// Set the named member to the value. // - /// Return true if we have - /// that member; false otherwise. - virtual void set_member(const tu_stringi& name, - const as_value& val); + /// Return true if we have that member; false otherwise. + /// + virtual void set_member(const std::string& name, const as_value& val); /// Overridden to look in DisplayList for a match virtual character* get_relative_target(const std::string& name); Index: server/swf_function.cpp =================================================================== RCS file: /sources/gnash/gnash/server/swf_function.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -u -b -r1.16 -r1.17 --- server/swf_function.cpp 9 Jan 2007 11:02:51 -0000 1.16 +++ server/swf_function.cpp 18 Jan 2007 22:53:21 -0000 1.17 @@ -70,10 +70,10 @@ //as_object* proto = _properties; //proto->add_ref(); - //proto->set_member("constructor", this); //as_value(func)); - //proto->set_member_flags("constructor", 1); + //proto->init_member("constructor", this); //as_value(func)); + //proto->init_member_flags("constructor", 1); - //set_member("prototype", as_value(proto)); + //init_member("prototype", as_value(proto)); } /*private static*/ @@ -238,7 +238,7 @@ for (int i = 0; i < fn.nargs; i++) { index_number.set_int(i); - arg_array->set_member(index_number.to_string(), fn.arg(i)); + arg_array->init_member(index_number.to_string(), fn.arg(i)); } } Index: server/video_stream_instance.cpp =================================================================== RCS file: /sources/gnash/gnash/server/video_stream_instance.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -b -r1.5 -r1.6 --- server/video_stream_instance.cpp 5 Dec 2006 14:26:09 -0000 1.5 +++ server/video_stream_instance.cpp 18 Jan 2007 22:53:21 -0000 1.6 @@ -37,7 +37,8 @@ // m_source(NULL) { assert(m_def); - set_member("attachVideo", &attach_video); + // FIXME: use new layout + init_member("attachVideo", &attach_video); } video_stream_instance::~video_stream_instance() @@ -77,27 +78,5 @@ bounds->expand_to_point(1e10f, 1e10f); } -//void -//video_stream_instance::set_member(const tu_stringi& name, const as_value& val) -//{ -// if (name == "attachVideo") -// { -// m_video_source = val.to_object(); -// } -// set_member(name, val); -//} - -//bool -//video_stream_instance::get_member(const tu_stringi& name, as_value* val) -//{ -// if (name == "attachVideo") -// { -// m_video_source = val->to_object(); -// val->set_as_object(m_video_source); // >set_bool(this->get_visible()); -// return true; -// } -// return false; -//} - } // end of namespace gnash Index: server/video_stream_instance.h =================================================================== RCS file: /sources/gnash/gnash/server/video_stream_instance.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- server/video_stream_instance.h 12 Dec 2006 19:48:04 -0000 1.4 +++ server/video_stream_instance.h 18 Jan 2007 22:53:21 -0000 1.5 @@ -37,9 +37,6 @@ // ActionScript overrides // -// virtual void set_member(const tu_stringi& name, const as_value& val); -// virtual bool get_member(const tu_stringi& name, as_value* val); - as_object* m_ns; }; Index: server/asobj/ASSound.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/ASSound.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -b -r1.6 -r1.7 --- server/asobj/ASSound.cpp 11 Nov 2006 22:44:54 -0000 1.6 +++ server/asobj/ASSound.cpp 18 Jan 2007 22:53:21 -0000 1.7 @@ -115,18 +115,18 @@ { sound_as_object *sound_obj = new sound_as_object; - sound_obj->set_member("attachsound", &sound_attachsound); - sound_obj->set_member("getbytesloaded", &sound_getbytesloaded); - sound_obj->set_member("getbytestotal", &sound_getbytestotal); - sound_obj->set_member("getpan", &sound_getpan); - sound_obj->set_member("gettransform", &sound_gettransform); - sound_obj->set_member("getvolume", &sound_getvolume); - sound_obj->set_member("loadsound", &sound_loadsound); - sound_obj->set_member("setpan", &sound_setpan); - sound_obj->set_member("settransform", &sound_settransform); - sound_obj->set_member("setvolume", &sound_setvolume); - sound_obj->set_member("start", &sound_start); - sound_obj->set_member("stop", &sound_stop); + sound_obj->init_member("attachSound", &sound_attachsound); + sound_obj->init_member("getBytesLoaded", &sound_getbytesloaded); + sound_obj->init_member("getBytesTotal", &sound_getbytestotal); + sound_obj->init_member("getPan", &sound_getpan); + sound_obj->init_member("getTransform", &sound_gettransform); + sound_obj->init_member("getVolume", &sound_getvolume); + sound_obj->init_member("loadSound", &sound_loadsound); + sound_obj->init_member("setPan", &sound_setpan); + sound_obj->init_member("setTransform", &sound_settransform); + sound_obj->init_member("setVolume", &sound_setvolume); + sound_obj->init_member("start", &sound_start); + sound_obj->init_member("stop", &sound_stop); fn.result->set_as_object(sound_obj); } Index: server/asobj/Boolean.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/Boolean.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- server/asobj/Boolean.cpp 25 Nov 2006 14:40:37 -0000 1.4 +++ server/asobj/Boolean.cpp 18 Jan 2007 22:53:21 -0000 1.5 @@ -36,8 +36,8 @@ static void attachBooleanInterface(as_object& o) { - o.set_member("toString", &boolean_tostring); - o.set_member("valueOf", &boolean_valueof); + o.init_member("toString", &boolean_tostring); + o.init_member("valueOf", &boolean_valueof); } static as_object* @@ -126,7 +126,7 @@ } // Register _global.Boolean - global.set_member("Boolean", cl.get()); + global.init_member("Boolean", cl.get()); } Index: server/asobj/Camera.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/Camera.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -b -r1.3 -r1.4 --- server/asobj/Camera.cpp 20 Nov 2006 21:28:58 -0000 1.3 +++ server/asobj/Camera.cpp 18 Jan 2007 22:53:21 -0000 1.4 @@ -38,10 +38,10 @@ static void attachCameraInterface(as_object& o) { - o.set_member("get", &camera_get); - o.set_member("setmode", &camera_setmode); - o.set_member("setmotionlevel", &camera_setmotionlevel); - o.set_member("setquality", &camera_setquality); + o.init_member("get", &camera_get); + o.init_member("setmode", &camera_setmode); + o.init_member("setmotionlevel", &camera_setmotionlevel); + o.init_member("setquality", &camera_setquality); } static as_object* @@ -110,7 +110,7 @@ } // Register _global.Camera - global.set_member("Camera", cl.get()); + global.init_member("Camera", cl.get()); } Index: server/asobj/Color.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/Color.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- server/asobj/Color.cpp 12 Jan 2007 10:27:34 -0000 1.4 +++ server/asobj/Color.cpp 18 Jan 2007 22:53:21 -0000 1.5 @@ -38,10 +38,10 @@ static void attachColorInterface(as_object& o) { - o.set_member("getRGB", &color_getrgb); - o.set_member("getTransform", &color_gettransform); - o.set_member("setRGB", &color_setrgb); - o.set_member("setTransform", &color_settransform); + o.init_member("getRGB", &color_getrgb); + o.init_member("getTransform", &color_gettransform); + o.init_member("setRGB", &color_setrgb); + o.init_member("setTransform", &color_settransform); } static as_object* @@ -110,7 +110,7 @@ } // Register _global.Color - global.set_member("Color", cl.get()); + global.init_member("Color", cl.get()); } Index: server/asobj/ContextMenu.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/ContextMenu.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -b -r1.5 -r1.6 --- server/asobj/ContextMenu.cpp 11 Jan 2007 12:15:02 -0000 1.5 +++ server/asobj/ContextMenu.cpp 18 Jan 2007 22:53:21 -0000 1.6 @@ -36,8 +36,8 @@ static void attachContextMenuInterface(as_object& o) { - o.set_member("copy", &contextmenu_copy); - o.set_member("hideBuiltInItems", &contextmenu_hidebuiltinitems); + o.init_member("copy", &contextmenu_copy); + o.init_member("hideBuiltInItems", &contextmenu_hidebuiltinitems); } static as_object* @@ -100,7 +100,7 @@ } // Register _global.ContextMenu - global.set_member("ContextMenu", cl.get()); + global.init_member("ContextMenu", cl.get()); } Index: server/asobj/CustomActions.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/CustomActions.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -b -r1.3 -r1.4 --- server/asobj/CustomActions.cpp 20 Nov 2006 21:28:58 -0000 1.3 +++ server/asobj/CustomActions.cpp 18 Jan 2007 22:53:21 -0000 1.4 @@ -38,10 +38,10 @@ static void attachCustomActionsInterface(as_object& o) { - o.set_member("get", &customactions_get); - o.set_member("install", &customactions_install); - o.set_member("list", &customactions_list); - o.set_member("uninstall", &customactions_uninstall); + o.init_member("get", &customactions_get); + o.init_member("install", &customactions_install); + o.init_member("list", &customactions_list); + o.init_member("uninstall", &customactions_uninstall); } static as_object* @@ -110,7 +110,7 @@ } // Register _global.CustomActions - global.set_member("CustomActions", cl.get()); + global.init_member("CustomActions", cl.get()); } Index: server/asobj/Date.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/Date.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -b -r1.5 -r1.6 --- server/asobj/Date.cpp 24 Nov 2006 15:41:14 -0000 1.5 +++ server/asobj/Date.cpp 18 Jan 2007 22:53:21 -0000 1.6 @@ -302,43 +302,43 @@ date_as_object *date_obj = new date_as_object; - date_obj->set_member("getDate", &date_getdate); - date_obj->set_member("getDay", &date_getday); - date_obj->set_member("getFullYear", &date_getfullyear); - date_obj->set_member("getHours", &date_gethours); - date_obj->set_member("getMilliseconds", &date_getmilliseconds); - date_obj->set_member("getMinutes", &date_getminutes); - date_obj->set_member("getMonth", &date_getmonth); - date_obj->set_member("getSeconds", &date_getseconds); - date_obj->set_member("getTime", &date_gettime); - date_obj->set_member("getTimezoneOffset", &date_gettimezoneoffset); - date_obj->set_member("getUTCDate", &date_getutcdate); - date_obj->set_member("getUTCDay", &date_getutcday); - date_obj->set_member("getUTCFullYear", &date_getutcfullyear); - date_obj->set_member("getUTCHours", &date_getutchours); - date_obj->set_member("getUTCMilliseconds", &date_getutcmilliseconds); - date_obj->set_member("getUTCMinutes", &date_getutcminutes); - date_obj->set_member("getUTCMonth", &date_getutcmonth); - date_obj->set_member("getUTCSeconds", &date_getutcseconds); - date_obj->set_member("getYear", &date_getyear); - date_obj->set_member("setDate", &date_setdate); - date_obj->set_member("setFullYear", &date_setfullyear); - date_obj->set_member("setHours", &date_sethours); - date_obj->set_member("setMilliseconds", &date_setmilliseconds); - date_obj->set_member("setMinutes", &date_setminutes); - date_obj->set_member("setMonth", &date_setmonth); - date_obj->set_member("setSeconds", &date_setseconds); - date_obj->set_member("setTime", &date_settime); - date_obj->set_member("setUTCDate", &date_setutcdate); - date_obj->set_member("setUTCFullYear", &date_setutcfullyear); - date_obj->set_member("setUTCHours", &date_setutchours); - date_obj->set_member("setUTCMilliseconds", &date_setutcmilliseconds); - date_obj->set_member("setUTCMinutes", &date_setutcminutes); - date_obj->set_member("setUTCMonth", &date_setutcmonth); - date_obj->set_member("setUTCSeconds", &date_setutcseconds); - date_obj->set_member("setYear", &date_setyear); - date_obj->set_member("toString", &date_tostring); - date_obj->set_member("UTC", &date_utc); + date_obj->init_member("getDate", &date_getdate); + date_obj->init_member("getDay", &date_getday); + date_obj->init_member("getFullYear", &date_getfullyear); + date_obj->init_member("getHours", &date_gethours); + date_obj->init_member("getMilliseconds", &date_getmilliseconds); + date_obj->init_member("getMinutes", &date_getminutes); + date_obj->init_member("getMonth", &date_getmonth); + date_obj->init_member("getSeconds", &date_getseconds); + date_obj->init_member("getTime", &date_gettime); + date_obj->init_member("getTimezoneOffset", &date_gettimezoneoffset); + date_obj->init_member("getUTCDate", &date_getutcdate); + date_obj->init_member("getUTCDay", &date_getutcday); + date_obj->init_member("getUTCFullYear", &date_getutcfullyear); + date_obj->init_member("getUTCHours", &date_getutchours); + date_obj->init_member("getUTCMilliseconds", &date_getutcmilliseconds); + date_obj->init_member("getUTCMinutes", &date_getutcminutes); + date_obj->init_member("getUTCMonth", &date_getutcmonth); + date_obj->init_member("getUTCSeconds", &date_getutcseconds); + date_obj->init_member("getYear", &date_getyear); + date_obj->init_member("setDate", &date_setdate); + date_obj->init_member("setFullYear", &date_setfullyear); + date_obj->init_member("setHours", &date_sethours); + date_obj->init_member("setMilliseconds", &date_setmilliseconds); + date_obj->init_member("setMinutes", &date_setminutes); + date_obj->init_member("setMonth", &date_setmonth); + date_obj->init_member("setSeconds", &date_setseconds); + date_obj->init_member("setTime", &date_settime); + date_obj->init_member("setUTCDate", &date_setutcdate); + date_obj->init_member("setUTCFullYear", &date_setutcfullyear); + date_obj->init_member("setUTCHours", &date_setutchours); + date_obj->init_member("setUTCMilliseconds", &date_setutcmilliseconds); + date_obj->init_member("setUTCMinutes", &date_setutcminutes); + date_obj->init_member("setUTCMonth", &date_setutcmonth); + date_obj->init_member("setUTCSeconds", &date_setutcseconds); + date_obj->init_member("setYear", &date_setyear); + date_obj->init_member("toString", &date_tostring); + date_obj->init_member("UTC", &date_utc); struct tm *ti; if (fn.nargs == 0) { Index: server/asobj/Error.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/Error.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- server/asobj/Error.cpp 11 Jan 2007 11:26:50 -0000 1.4 +++ server/asobj/Error.cpp 18 Jan 2007 22:53:21 -0000 1.5 @@ -35,7 +35,9 @@ static void attachErrorInterface(as_object& o) { - o.set_member("toString", &error_tostring); + // is this really needed ? shouldn't toString be + // derived from Object inheritance ? + o.init_member("toString", &error_tostring); } static as_object* @@ -95,7 +97,7 @@ } // Register _global.Error - global.set_member("Error", cl.get()); + global.init_member("Error", cl.get()); } Index: server/asobj/Global.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/Global.cpp,v retrieving revision 1.32 retrieving revision 1.33 diff -u -b -r1.32 -r1.33 --- server/asobj/Global.cpp 18 Jan 2007 16:28:10 -0000 1.32 +++ server/asobj/Global.cpp 18 Jan 2007 22:53:21 -0000 1.33 @@ -18,7 +18,7 @@ // Implementation of the Global ActionScript Object -/* $Id: Global.cpp,v 1.32 2007/01/18 16:28:10 strk Exp $ */ +/* $Id: Global.cpp,v 1.33 2007/01/18 22:53:21 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -418,10 +418,7 @@ //------------------------------------------------- // ASSetPropFlags - set_member("ASSetPropFlags", as_global_assetpropflags); - - // See: http://sephiroth.it/reference.php?id=717&cat=1 - textsnapshot_class_init(*this); + init_member("ASSetPropFlags", as_global_assetpropflags); // System and Function were added in Player Version 6, but // seem to be available even if SWF target version is @@ -441,7 +438,7 @@ // SWF4 //----------------------- - set_member("trace", as_value(as_global_trace)); + init_member("trace", as_value(as_global_trace)); // The methods of the Math class are available // as global methods in SWF4 and as members of // the Math class from SWF5 up @@ -455,34 +452,36 @@ boolean_class_init(*this); color_class_init(*this); selection_class_init(*this); // Selection - set_member("Sound", as_value(sound_new)); + init_member("Sound", as_value(sound_new)); + init_member("XMLSocket", as_value(xmlsocket_new)); + init_member("Date", as_value(date_new)); xml_class_init(*this); xmlnode_class_init(*this); - set_member("XMLSocket", as_value(xmlsocket_new)); - set_member("Date", as_value(date_new)); mouse_class_init(*this); object_class_init(*this); number_class_init(*this); string_class_init(*this); array_class_init(*this); // unescape - set_member("unescape", as_global_unescape); + init_member("unescape", as_global_unescape); // parseFloat - set_member("parseFloat", as_global_parsefloat); + init_member("parseFloat", as_global_parsefloat); // parseInt - set_member("parseInt", as_global_parseint); + init_member("parseInt", as_global_parseint); // isNan - set_member("isNaN", as_global_isnan); + init_member("isNaN", as_global_isnan); // isFinite - set_member("isFinite", as_global_isfinite); + init_member("isFinite", as_global_isfinite); if ( vm.getSWFVersion() < 6 ) goto extscan; //----------------------- // SWF6 //----------------------- - set_member("LocalConnection", as_value(localconnection_new)); - set_member("TextFormat", as_value(textformat_new)); + // See: http://sephiroth.it/reference.php?id=717&cat=1 + textsnapshot_class_init(*this); + init_member("LocalConnection", as_value(localconnection_new)); + init_member("TextFormat", as_value(textformat_new)); key_class_init(*this); // Key video_class_init(*this); // Video camera_class_init(*this); // Camera @@ -497,8 +496,8 @@ // SWF7 //----------------------- - set_member("NetConnection", as_value(netconnection_new)); - set_member("NetStream", as_value(netstream_new)); + init_member("NetConnection", as_value(netconnection_new)); + init_member("NetStream", as_value(netstream_new)); contextmenu_class_init(*this); moviecliploader_class_init(*this); // sephiroth.it refers this to be introduced in SWF7 Index: server/asobj/Key.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/Key.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -b -r1.7 -r1.8 --- server/asobj/Key.cpp 21 Dec 2006 11:34:49 -0000 1.7 +++ server/asobj/Key.cpp 18 Jan 2007 22:53:21 -0000 1.8 @@ -77,12 +77,12 @@ { key_as_object *key_obj = new key_as_object; - key_obj->set_member("addlistener", &key_addlistener); - key_obj->set_member("getascii", &key_getascii); - key_obj->set_member("getcode", &key_getcode); - key_obj->set_member("isdown", &key_isdown); - key_obj->set_member("istoggled", &key_istoggled); - key_obj->set_member("removelistener", &key_removelistener); + key_obj->init_member("addlistener", &key_addlistener); + key_obj->init_member("getascii", &key_getascii); + key_obj->init_member("getcode", &key_getcode); + key_obj->init_member("isdown", &key_isdown); + key_obj->init_member("istoggled", &key_istoggled); + key_obj->init_member("removelistener", &key_removelistener); fn.result->set_as_object(key_obj); } @@ -175,8 +175,9 @@ notify_listeners(event_id(event_id::KEY_UP).get_function_name()); } +// TODO: take a std::string void -key_as_object::notify_listeners(const tu_stringi& funcname) +key_as_object::notify_listeners(const std::string& funcname) { // Notify listeners. for (std::vector >::iterator iter = m_listeners.begin(); @@ -187,7 +188,7 @@ boost::intrusive_ptr listener = *iter; // Hold an owning reference. as_value method; - if (listener->get_member(funcname, &method)) + if (listener->get_member(funcname.c_str(), &method)) call_method(method, NULL /* or root? */, listener.get(), 0, 0); } } @@ -347,7 +348,7 @@ as_object* global = VM::get().getGlobal(); // This isn't very performant... do we allow user override // of _global.Key, btw ? - global->get_member("Key", &kval); + global->init_member("Key", &kval); if (kval.is_object() ) { key_as_object* ko = static_cast( kval.to_object() ); @@ -392,15 +393,19 @@ KEY_CONST(TAB); KEY_CONST(UP); + // FIXME: is this function even called/allowed ? + // if so we shouldn't ever explicitly set + // these methods, but rather rely on inheritance + // methods - key_obj->set_member("addListener", &key_add_listener); - key_obj->set_member("getAscii", &key_get_ascii); - key_obj->set_member("getCode", &key_get_code); - key_obj->set_member("isDown", &key_is_down); - key_obj->set_member("isToggled", &key_is_toggled); - key_obj->set_member("removeListener", &key_remove_listener); + key_obj->init_member("addListener", &key_add_listener); + key_obj->init_member("getAscii", &key_get_ascii); + key_obj->init_member("getCode", &key_get_code); + key_obj->init_member("isDown", &key_is_down); + key_obj->init_member("isToggled", &key_is_toggled); + key_obj->init_member("removeListener", &key_remove_listener); - global.set_member("Key", key_obj); + global.init_member("Key", key_obj); } } // end of gnash namespace Index: server/asobj/Key.h =================================================================== RCS file: /sources/gnash/gnash/server/asobj/Key.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -b -r1.10 -r1.11 --- server/asobj/Key.h 24 Nov 2006 14:50:30 -0000 1.10 +++ server/asobj/Key.h 18 Jan 2007 22:53:21 -0000 1.11 @@ -16,7 +16,7 @@ // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // -/* $Id: Key.h,v 1.10 2006/11/24 14:50:30 strk Exp $ */ +/* $Id: Key.h,v 1.11 2007/01/18 22:53:21 strk Exp $ */ #ifndef __KEY_H__ #define __KEY_H__ @@ -99,8 +99,10 @@ std::vector > m_listeners; int m_last_key_pressed; - void notify_listeners(const tu_stringi& funcname); + void notify_listeners(const std::string& funcname); + public: + key_as_object(); bool is_key_down(int code); Index: server/asobj/LoadVars.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/LoadVars.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- server/asobj/LoadVars.cpp 11 Jan 2007 11:26:50 -0000 1.4 +++ server/asobj/LoadVars.cpp 18 Jan 2007 22:53:21 -0000 1.5 @@ -42,14 +42,14 @@ static void attachLoadVarsInterface(as_object& o) { - o.set_member("addRequestHeader", &loadvars_addrequestheader); - o.set_member("decode", &loadvars_decode); - o.set_member("getBytesLoaded", &loadvars_getbytesloaded); - o.set_member("getBytesTotal", &loadvars_getbytestotal); - o.set_member("load", &loadvars_load); - o.set_member("send", &loadvars_send); - o.set_member("sendAndLoad", &loadvars_sendandload); - o.set_member("toString", &loadvars_tostring); + o.init_member("addRequestHeader", &loadvars_addrequestheader); + o.init_member("decode", &loadvars_decode); + o.init_member("getBytesLoaded", &loadvars_getbytesloaded); + o.init_member("getBytesTotal", &loadvars_getbytestotal); + o.init_member("load", &loadvars_load); + o.init_member("send", &loadvars_send); + o.init_member("sendAndLoad", &loadvars_sendandload); + o.init_member("toString", &loadvars_tostring); } static as_object* @@ -130,7 +130,7 @@ } // Register _global.LoadVars - global.set_member("LoadVars", cl.get()); + global.init_member("LoadVars", cl.get()); } Index: server/asobj/LocalConnection.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/LocalConnection.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -b -r1.5 -r1.6 --- server/asobj/LocalConnection.cpp 29 Oct 2006 18:34:12 -0000 1.5 +++ server/asobj/LocalConnection.cpp 18 Jan 2007 22:53:21 -0000 1.6 @@ -103,16 +103,16 @@ { localconnection_as_object *localconnection_obj = new localconnection_as_object; - localconnection_obj->set_member("close", &localconnection_close); - localconnection_obj->set_member("connect", &localconnection_connect); - localconnection_obj->set_member("domain", &localconnection_domain); - localconnection_obj->set_member("send", &localconnection_send); + localconnection_obj->init_member("close", &localconnection_close); + localconnection_obj->init_member("connect", &localconnection_connect); + localconnection_obj->init_member("domain", &localconnection_domain); + localconnection_obj->init_member("send", &localconnection_send); //#ifdef ENABLE_TESTING #ifndef NETWORK_CONN - localconnection_obj->set_member("getname", &shm_getname); - localconnection_obj->set_member("getsize", &shm_getsize); - localconnection_obj->set_member("getallocated", &shm_getallocated); - localconnection_obj->set_member("exists", &shm_exists); + localconnection_obj->init_member("getname", &shm_getname); + localconnection_obj->init_member("getsize", &shm_getsize); + localconnection_obj->init_member("getallocated", &shm_getallocated); + localconnection_obj->init_member("exists", &shm_exists); #endif fn.result->set_as_object(localconnection_obj); Index: server/asobj/Math.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/Math.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -u -b -r1.13 -r1.14 --- server/asobj/Math.cpp 24 Nov 2006 14:50:30 -0000 1.13 +++ server/asobj/Math.cpp 18 Jan 2007 22:53:21 -0000 1.14 @@ -16,7 +16,7 @@ // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // -/* $Id: Math.cpp,v 1.13 2006/11/24 14:50:30 strk Exp $ */ +/* $Id: Math.cpp,v 1.14 2007/01/18 22:53:21 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -171,7 +171,7 @@ // Create built-in math object. as_object* math_obj = new math_as_object; - global.set_member("Math", math_obj); + global.init_member("Math", math_obj); } // @@ -260,36 +260,38 @@ as_object() { + // TODO: rely on ineritance, use init_property ? + // constant - set_member("e", 2.7182818284590452354); - set_member("ln2", 0.69314718055994530942); - set_member("log2e", 1.4426950408889634074); - set_member("ln10", 2.30258509299404568402); - set_member("log10e", 0.43429448190325182765); - set_member("pi", 3.14159265358979323846); - set_member("sqrt1_2", 0.7071067811865475244); - set_member("sqrt2", 1.4142135623730950488); + init_member("e", 2.7182818284590452354); + init_member("ln2", 0.69314718055994530942); + init_member("log2e", 1.4426950408889634074); + init_member("ln10", 2.30258509299404568402); + init_member("log10e", 0.43429448190325182765); + init_member("pi", 3.14159265358979323846); + init_member("sqrt1_2", 0.7071067811865475244); + init_member("sqrt2", 1.4142135623730950488); // math methods - set_member("abs", &math_abs); - set_member("acos", &math_acos); - set_member("asin", &math_asin); - set_member("atan", &math_atan); - set_member("ceil", &math_ceil); - set_member("cos", &math_cos); - set_member("exp", &math_exp); - set_member("floor", &math_floor); - set_member("log", &math_log); - set_member("random", &math_random); - set_member("round", &math_round); - set_member("sin", &math_sin); - set_member("sqrt", &math_sqrt); - set_member("tan", &math_tan); - - set_member("atan2", &math_atan2); - set_member("max", &math_max); - set_member("min", &math_min); - set_member("pow", &math_pow); + init_member("abs", &math_abs); + init_member("acos", &math_acos); + init_member("asin", &math_asin); + init_member("atan", &math_atan); + init_member("ceil", &math_ceil); + init_member("cos", &math_cos); + init_member("exp", &math_exp); + init_member("floor", &math_floor); + init_member("log", &math_log); + init_member("random", &math_random); + init_member("round", &math_round); + init_member("sin", &math_sin); + init_member("sqrt", &math_sqrt); + init_member("tan", &math_tan); + + init_member("atan2", &math_atan2); + init_member("max", &math_max); + init_member("min", &math_min); + init_member("pow", &math_pow); } void Index: server/asobj/Microphone.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/Microphone.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -b -r1.3 -r1.4 --- server/asobj/Microphone.cpp 20 Nov 2006 21:38:11 -0000 1.3 +++ server/asobj/Microphone.cpp 18 Jan 2007 22:53:21 -0000 1.4 @@ -39,11 +39,11 @@ static void attachMicrophoneInterface(as_object& o) { - o.set_member("get", µphone_get); - o.set_member("setgain", µphone_setgain); - o.set_member("setrate", µphone_setrate); - o.set_member("setsilencelevel", µphone_setsilencelevel); - o.set_member("setuseechosuppression", µphone_setuseechosuppression); + o.init_member("get", µphone_get); + o.init_member("setgain", µphone_setgain); + o.init_member("setrate", µphone_setrate); + o.init_member("setsilencelevel", µphone_setsilencelevel); + o.init_member("setuseechosuppression", µphone_setuseechosuppression); } static as_object* @@ -115,7 +115,7 @@ } // Register _global.Microphone - global.set_member("Microphone", cl.get()); + global.init_member("Microphone", cl.get()); } Index: server/asobj/Mouse.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/Mouse.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -b -r1.3 -r1.4 --- server/asobj/Mouse.cpp 20 Nov 2006 21:38:11 -0000 1.3 +++ server/asobj/Mouse.cpp 18 Jan 2007 22:53:21 -0000 1.4 @@ -38,10 +38,10 @@ static void attachMouseInterface(as_object& o) { - o.set_member("addlistener", &mouse_addlistener); - o.set_member("hide", &mouse_hide); - o.set_member("removelistener", &mouse_removelistener); - o.set_member("show", &mouse_show); + o.init_member("addlistener", &mouse_addlistener); + o.init_member("hide", &mouse_hide); + o.init_member("removelistener", &mouse_removelistener); + o.init_member("show", &mouse_show); } static as_object* @@ -110,7 +110,7 @@ } // Register _global.Mouse - global.set_member("Mouse", cl.get()); + global.init_member("Mouse", cl.get()); } Index: server/asobj/MovieClipLoader.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/MovieClipLoader.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -u -b -r1.14 -r1.15 --- server/asobj/MovieClipLoader.cpp 21 Dec 2006 11:34:49 -0000 1.14 +++ server/asobj/MovieClipLoader.cpp 18 Jan 2007 22:53:21 -0000 1.15 @@ -54,17 +54,12 @@ static void attachMovieClipLoaderInterface(as_object& o) { - o.set_member("loadClip", &moviecliploader_loadclip); - o.set_member_flags("loadClip", 1); // hidden - o.set_member("unloadClip", &moviecliploader_unloadclip); - o.set_member_flags("unloadClip", 1); // hidden - o.set_member("getProgress", &moviecliploader_getprogress); - o.set_member_flags("getProgress", 1); // hidden - - o.set_member("addListener", &moviecliploader_addlistener); - o.set_member_flags("addListener", 1); // hidden - o.set_member("removeListener", &moviecliploader_removelistener); - o.set_member_flags("removeListener", 1); // hidden + o.init_member("loadClip", &moviecliploader_loadclip); + o.init_member("unloadClip", &moviecliploader_unloadclip); + o.init_member("getProgress", &moviecliploader_getprogress); + + o.init_member("addListener", &moviecliploader_addlistener); + o.init_member("removeListener", &moviecliploader_removelistener); #if 0 // Load the default event handlers. These should really never @@ -428,8 +423,8 @@ mcl_as_object *mcl_obj = new mcl_as_object; - mcl_obj->set_member("bytesLoaded", mcl_data->bytes_loaded); - mcl_obj->set_member("bytesTotal", mcl_data->bytes_total); + mcl_obj->init_member("bytesLoaded", mcl_data->bytes_loaded); + mcl_obj->init_member("bytesTotal", mcl_data->bytes_total); fn.result->set_as_object(mcl_obj); // will store in a boost::intrusive_ptr } @@ -470,7 +465,7 @@ void moviecliploader_class_init(as_object& global) { - global.set_member("MovieClipLoader", as_value(moviecliploader_new)); + global.init_member("MovieClipLoader", as_value(moviecliploader_new)); } } // end of gnash namespace Index: server/asobj/NetConnection.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/NetConnection.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -u -b -r1.16 -r1.17 --- server/asobj/NetConnection.cpp 18 Jan 2007 11:53:37 -0000 1.16 +++ server/asobj/NetConnection.cpp 18 Jan 2007 22:53:21 -0000 1.17 @@ -14,7 +14,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -/* $Id: NetConnection.cpp,v 1.16 2007/01/18 11:53:37 tgc Exp $ */ +/* $Id: NetConnection.cpp,v 1.17 2007/01/18 22:53:21 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -164,7 +164,7 @@ /// Open a connection to stream FLV files. // /// \param arg is the URL -/// \return nothing +/// \return true on success, false on error. /// \note Older Flash movies can only take a NULL value as /// the parameter, which therefor only connects to the localhost using /// RTMP. Newer Flash movies have a parameter to connect which is a @@ -270,7 +270,9 @@ } fill_cache(50000); // pre-cache 50 Kbytes + return true; } + /*public*/ bool NetConnection::eof() @@ -320,7 +322,8 @@ netconnection_as_object *netconnection_obj = new netconnection_as_object; - netconnection_obj->set_member("connect", &netconnection_connect); + // FIXME: rely on inheritance + netconnection_obj->init_member("connect", &netconnection_connect); fn.result->set_as_object(netconnection_obj); } Index: server/asobj/NetStream.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/NetStream.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -u -b -r1.21 -r1.22 --- server/asobj/NetStream.cpp 12 Jan 2007 09:35:58 -0000 1.21 +++ server/asobj/NetStream.cpp 18 Jan 2007 22:53:21 -0000 1.22 @@ -18,7 +18,7 @@ // // -/* $Id: NetStream.cpp,v 1.21 2007/01/12 09:35:58 strk Exp $ */ +/* $Id: NetStream.cpp,v 1.22 2007/01/18 22:53:21 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -44,11 +44,12 @@ { netstream_as_object *netstream_obj = new netstream_as_object; - netstream_obj->set_member("close", &netstream_close); - netstream_obj->set_member("pause", &netstream_pause); - netstream_obj->set_member("play", &netstream_play); - netstream_obj->set_member("seek", &netstream_seek); - netstream_obj->set_member("setBufferTime", &netstream_setbuffertime); + // FIXME: rely on inheritance + netstream_obj->init_member("close", &netstream_close); + netstream_obj->init_member("pause", &netstream_pause); + netstream_obj->init_member("play", &netstream_play); + netstream_obj->init_member("seek", &netstream_seek); + netstream_obj->init_member("setBufferTime", &netstream_setbuffertime); fn.result->set_as_object(netstream_obj); Index: server/asobj/NetStream.h =================================================================== RCS file: /sources/gnash/gnash/server/asobj/NetStream.h,v retrieving revision 1.16 retrieving revision 1.17 diff -u -b -r1.16 -r1.17 --- server/asobj/NetStream.h 13 Jan 2007 20:06:17 -0000 1.16 +++ server/asobj/NetStream.h 18 Jan 2007 22:53:21 -0000 1.17 @@ -18,7 +18,7 @@ // // -/* $Id: NetStream.h,v 1.16 2007/01/13 20:06:17 tgc Exp $ */ +/* $Id: NetStream.h,v 1.17 2007/01/18 22:53:21 strk Exp $ */ #ifndef __NETSTREAM_H__ #define __NETSTREAM_H__ @@ -88,8 +88,6 @@ NetStream obj; -// virtual void set_member(const tu_stringi& name, const as_value& val); -// virtual bool get_member(const tu_stringi& name, as_value* val); }; void netstream_new(const fn_call& fn); Index: server/asobj/NetStreamFfmpeg.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/NetStreamFfmpeg.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -b -r1.6 -r1.7 --- server/asobj/NetStreamFfmpeg.cpp 18 Jan 2007 11:53:37 -0000 1.6 +++ server/asobj/NetStreamFfmpeg.cpp 18 Jan 2007 22:53:21 -0000 1.7 @@ -14,7 +14,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -/* $Id: NetStreamFfmpeg.cpp,v 1.6 2007/01/18 11:53:37 tgc Exp $ */ +/* $Id: NetStreamFfmpeg.cpp,v 1.7 2007/01/18 22:53:21 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -74,7 +74,7 @@ { if (m_netstream_object) { - //m_netstream_object->set_member("onStatus_Code", code); + //m_netstream_object->init_member("onStatus_Code", code); //push_video_event(m_netstream_object); } } Index: server/asobj/NetStreamGst.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/NetStreamGst.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -b -r1.3 -r1.4 --- server/asobj/NetStreamGst.cpp 15 Jan 2007 20:58:53 -0000 1.3 +++ server/asobj/NetStreamGst.cpp 18 Jan 2007 22:53:21 -0000 1.4 @@ -68,7 +68,7 @@ { if (m_netstream_object) { - //m_netstream_object->set_member("onStatus_Code", code); + //m_netstream_object->init_member("onStatus_Code", code); //push_video_event(m_netstream_object); } } Index: server/asobj/Number.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/Number.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -b -r1.8 -r1.9 --- server/asobj/Number.cpp 15 Dec 2006 21:25:59 -0000 1.8 +++ server/asobj/Number.cpp 18 Jan 2007 22:53:21 -0000 1.9 @@ -18,7 +18,7 @@ // // -/* $Id: Number.cpp,v 1.8 2006/12/15 21:25:59 rsavoye Exp $ */ +/* $Id: Number.cpp,v 1.9 2007/01/18 22:53:21 strk Exp $ */ // Implementation of ActionScript Number class. @@ -124,7 +124,7 @@ } // Register _global.Number - global.set_member("Number", cl.get()); + global.init_member("Number", cl.get()); } Index: server/asobj/Object.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/Object.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -b -r1.10 -r1.11 --- server/asobj/Object.cpp 11 Jan 2007 17:03:54 -0000 1.10 +++ server/asobj/Object.cpp 18 Jan 2007 22:53:21 -0000 1.11 @@ -18,7 +18,7 @@ // // -/* $Id: Object.cpp,v 1.10 2007/01/11 17:03:54 strk Exp $ */ +/* $Id: Object.cpp,v 1.11 2007/01/18 22:53:21 strk Exp $ */ // Implementation of ActionScript Object class. @@ -49,9 +49,9 @@ attachObjectInterface(as_object& o) { // FIXME: add Object interface here: - o.set_member("addProperty", &object_addproperty); + o.init_member("addProperty", &object_addproperty); o.set_member_flags("addProperty", 1); // hidden - o.set_member("registerClass", &object_registerClass); + o.init_member("registerClass", &object_registerClass); o.set_member_flags("registerClass", 1); // hidden } @@ -133,7 +133,7 @@ } // Register _global.Object - global.set_member("Object", cl.get()); + global.init_member("Object", cl.get()); } Index: server/asobj/Selection.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/Selection.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- server/asobj/Selection.cpp 12 Jan 2007 09:53:58 -0000 1.4 +++ server/asobj/Selection.cpp 18 Jan 2007 22:53:21 -0000 1.5 @@ -42,14 +42,14 @@ static void attachSelectionInterface(as_object& o) { - o.set_member("addListener", &selection_addlistener); - o.set_member("getBeginIndex", &selection_getbeginindex); - o.set_member("getCaretIndex", &selection_getcaretindex); - o.set_member("getEndIndex", &selection_getendindex); - o.set_member("getFocus", &selection_getfocus); - o.set_member("removeListener", &selection_removelistener); - o.set_member("setFocus", &selection_setfocus); - o.set_member("setSelection", &selection_setselection); + o.init_member("addListener", &selection_addlistener); + o.init_member("getBeginIndex", &selection_getbeginindex); + o.init_member("getCaretIndex", &selection_getcaretindex); + o.init_member("getEndIndex", &selection_getendindex); + o.init_member("getFocus", &selection_getfocus); + o.init_member("removeListener", &selection_removelistener); + o.init_member("setFocus", &selection_setfocus); + o.init_member("setSelection", &selection_setselection); } static as_object* @@ -122,7 +122,7 @@ static boost::intrusive_ptr obj = new as_object(); attachSelectionInterface(*obj); - global.set_member("Selection", obj.get()); + global.init_member("Selection", obj.get()); } Index: server/asobj/SharedObject.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/SharedObject.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- server/asobj/SharedObject.cpp 11 Jan 2007 11:56:20 -0000 1.4 +++ server/asobj/SharedObject.cpp 18 Jan 2007 22:53:21 -0000 1.5 @@ -39,10 +39,10 @@ attachSharedObjectInterface(as_object& o) { // TODO: clear, flush and getSize not in SWF<6 , it seems - o.set_member("clear", &sharedobject_clear); - o.set_member("flush", &sharedobject_flush); - o.set_member("getLocal", &sharedobject_getlocal); - o.set_member("getSize", &sharedobject_getsize); + o.init_member("clear", &sharedobject_clear); + o.init_member("flush", &sharedobject_flush); + o.init_member("getLocal", &sharedobject_getlocal); + o.init_member("getSize", &sharedobject_getsize); } static as_object* @@ -111,7 +111,7 @@ } // Register _global.SharedObject - global.set_member("SharedObject", cl.get()); + global.init_member("SharedObject", cl.get()); } Index: server/asobj/Stage.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/Stage.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- server/asobj/Stage.cpp 11 Jan 2007 12:47:26 -0000 1.4 +++ server/asobj/Stage.cpp 18 Jan 2007 22:53:21 -0000 1.5 @@ -36,8 +36,8 @@ static void attachStageInterface(as_object& o) { - o.set_member("addListener", &stage_addlistener); - o.set_member("removeListener", &stage_removelistener); + o.init_member("addListener", &stage_addlistener); + o.init_member("removeListener", &stage_removelistener); } static as_object* @@ -90,25 +90,7 @@ static boost::intrusive_ptr obj = new as_object(); attachStageInterface(*obj); - global.set_member("Stage", obj.get()); - -#if 0 // Stage is NOT a class, but a simple object, see Stage.as - - // This is going to be the global Stage "class"/"function" - static boost::intrusive_ptr cl; - - if ( cl == NULL ) - { - cl=new builtin_function(&stage_ctor, getStageInterface()); - // replicate all interface to class, to be able to access - // all methods as static functions - attachStageInterface(*cl); - - } - - // Register _global.Stage - global.set_member("Stage", cl.get()); -#endif + global.init_member("Stage", obj.get()); } Index: server/asobj/System.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/System.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -b -r1.7 -r1.8 --- server/asobj/System.cpp 12 Jan 2007 10:15:13 -0000 1.7 +++ server/asobj/System.cpp 18 Jan 2007 22:53:21 -0000 1.8 @@ -73,12 +73,12 @@ if ( proto == NULL ) { proto = new as_object(); - proto->set_member("allowDomain", &system_security_allowdomain); + proto->init_member("allowDomain", &system_security_allowdomain); // TODO: only available when SWF >= 7 - proto->set_member("allowInsecureDomain", &system_security_allowinsecuredomain); + proto->init_member("allowInsecureDomain", &system_security_allowinsecuredomain); - proto->set_member("loadPolicyFile", &system_security_loadpolicyfile); + proto->init_member("loadPolicyFile", &system_security_loadpolicyfile); } return proto.get(); } @@ -90,7 +90,7 @@ if ( proto == NULL ) { proto = new as_object(); - proto->set_member("version", "Gnash-" VERSION); + proto->init_member("version", "Gnash-" VERSION); } return proto.get(); } @@ -99,10 +99,10 @@ attachSystemInterface(as_object& proto) { // Initialize Function prototype - proto.set_member("security", getSystemSecurityInterface()); - proto.set_member("capabilities", getSystemCapabilitiesInterface()); - proto.set_member("setClipboard", &system_setclipboard); - proto.set_member("showSettings", &system_showsettings); + proto.init_member("security", getSystemSecurityInterface()); + proto.init_member("capabilities", getSystemCapabilitiesInterface()); + proto.init_member("setClipboard", &system_setclipboard); + proto.init_member("showSettings", &system_showsettings); } static as_object* @@ -113,8 +113,7 @@ { proto = new as_object(); attachSystemInterface(*proto); - proto->set_member("constructor", &system_new); - proto->set_member_flags("constructor", 1); + proto->init_member("constructor", &system_new); } return proto.get(); } @@ -160,7 +159,7 @@ static boost::intrusive_ptr obj = new as_object(); attachSystemInterface(*obj); - global.set_member("System", obj.get()); + global.init_member("System", obj.get()); } Index: server/asobj/TextSnapshot.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/TextSnapshot.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- server/asobj/TextSnapshot.cpp 15 Jan 2007 17:00:14 -0000 1.4 +++ server/asobj/TextSnapshot.cpp 18 Jan 2007 22:53:22 -0000 1.5 @@ -42,14 +42,17 @@ static void attachTextSnapshotInterface(as_object& o) { - o.set_member("findText", &textsnapshot_findtext); - o.set_member("getCount", &textsnapshot_getcount); - o.set_member("getSelected", &textsnapshot_getselected); - o.set_member("getSelectedText", &textsnapshot_getselectedtext); - o.set_member("getText", &textsnapshot_gettext); - o.set_member("hitTestTextNearPos", &textsnapshot_hittesttextnearpos); - o.set_member("setSelectColor", &textsnapshot_setselectcolor); - o.set_member("setSelected", &textsnapshot_setselected); + // FIXME: check name case of all methods, and only initialize + // the ones expected to be found based on SWF version + + o.init_member("findText", &textsnapshot_findtext); + o.init_member("getCount", &textsnapshot_getcount); + o.init_member("getSelected", &textsnapshot_getselected); + o.init_member("getSelectedText", &textsnapshot_getselectedtext); + o.init_member("getText", &textsnapshot_gettext); + o.init_member("hitTestTextNearPos", &textsnapshot_hittesttextnearpos); + o.init_member("setSelectColor", &textsnapshot_setselectcolor); + o.init_member("setSelected", &textsnapshot_setselected); } static as_object* @@ -130,7 +133,7 @@ } // Register _global.TextSnapshot - global.set_member("TextSnapshot", cl.get()); + global.init_member("TextSnapshot", cl.get()); } Index: server/asobj/Video.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/Video.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -b -r1.5 -r1.6 --- server/asobj/Video.cpp 27 Nov 2006 10:00:44 -0000 1.5 +++ server/asobj/Video.cpp 18 Jan 2007 22:53:22 -0000 1.6 @@ -36,8 +36,8 @@ static void attachVideoInterface(as_object& o) { - o.set_member("attachVideo", &video_attachvideo); - o.set_member("clear", &video_clear); + o.init_member("attachVideo", &video_attachvideo); + o.init_member("clear", &video_clear); } static as_object* @@ -100,7 +100,7 @@ } // Register _global.Video - global.set_member("Video", cl.get()); + global.init_member("Video", cl.get()); } Index: server/asobj/gen-asclass.sh =================================================================== RCS file: /sources/gnash/gnash/server/asobj/gen-asclass.sh,v retrieving revision 1.6 retrieving revision 1.7 diff -u -b -r1.6 -r1.7 --- server/asobj/gen-asclass.sh 25 Nov 2006 14:43:47 -0000 1.6 +++ server/asobj/gen-asclass.sh 18 Jan 2007 22:53:22 -0000 1.7 @@ -166,7 +166,7 @@ # DO NOT CONVERT CASE, SWF7+ is case-sensitive newi=`echo $i | sed -e 's/()//g'` # | tr '[A-Z]' '[a-z]' cat <>${srcname} - o.set_member("${newi}", &${lowname}_${newi}); + o.init_member("${newi}", &${lowname}_${newi}); EOF done cat <>${srcname} @@ -239,7 +239,7 @@ } // Register _global.${asname} - global.set_member("${asname}", cl.get()); + global.init_member("${asname}", cl.get()); } Index: server/asobj/string.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/string.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -u -b -r1.12 -r1.13 --- server/asobj/string.cpp 12 Dec 2006 16:58:31 -0000 1.12 +++ server/asobj/string.cpp 18 Jan 2007 22:53:22 -0000 1.13 @@ -18,7 +18,7 @@ // // -/* $Id: string.cpp,v 1.12 2006/12/12 16:58:31 strk Exp $ */ +/* $Id: string.cpp,v 1.13 2007/01/18 22:53:22 strk Exp $ */ // Implementation of ActionScript String class. @@ -60,23 +60,23 @@ attachStringInterface(as_object& o) { // TODO fill in the rest - o.set_member("concat", &string_concat); - o.set_member("slice", &string_slice); - o.set_member("split", &string_split); - o.set_member("lastIndexOf", &string_last_index_of); - o.set_member("substr", &string_sub_str); - o.set_member("substring", &string_sub_string); - o.set_member("indexOf", &string_index_of); - o.set_member("toString", &string_to_string); - o.set_member("fromCharCode", &string_from_char_code); - o.set_member("charAt", &string_char_at); - o.set_member("charCodeAt", &string_char_code_at); - o.set_member("toUpperCase", &string_to_upper_case); - o.set_member("toLowerCase", &string_to_lower_case); + o.init_member("concat", &string_concat); + o.init_member("slice", &string_slice); + o.init_member("split", &string_split); + o.init_member("lastIndexOf", &string_last_index_of); + o.init_member("substr", &string_sub_str); + o.init_member("substring", &string_sub_string); + o.init_member("indexOf", &string_index_of); + o.init_member("toString", &string_to_string); + o.init_member("fromCharCode", &string_from_char_code); + o.init_member("charAt", &string_char_at); + o.init_member("charCodeAt", &string_char_code_at); + o.init_member("toUpperCase", &string_to_upper_case); + o.init_member("toLowerCase", &string_to_lower_case); boost::intrusive_ptr length_getter(new builtin_function(&string_get_length,NULL)); boost::intrusive_ptr length_setter(new builtin_function(&string_set_length,NULL)); - o.add_property(std::string("length"),*length_getter,*length_setter); + o.init_property("length", *length_getter, *length_setter); } @@ -514,7 +514,7 @@ } // Register _global.String - global.set_member("String", cl.get()); + global.init_member("String", cl.get()); } Index: server/asobj/xml.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/xml.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -u -b -r1.11 -r1.12 --- server/asobj/xml.cpp 18 Jan 2007 19:38:05 -0000 1.11 +++ server/asobj/xml.cpp 18 Jan 2007 22:53:22 -0000 1.12 @@ -14,7 +14,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -/* $Id: xml.cpp,v 1.11 2007/01/18 19:38:05 bjacques Exp $ */ +/* $Id: xml.cpp,v 1.12 2007/01/18 22:53:22 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1082,39 +1082,39 @@ attachXMLInterface(as_object& o) { // FIXME: this doesn't appear to exist in the MM player, should it ? - o.set_member("loaded", &xml_loaded); + o.init_member("loaded", &xml_loaded); - o.set_member("addRequestHeader", &xml_addrequestheader); - o.set_member("appendChild", &xml_appendchild); - o.set_member("cloneNode", &xml_clonenode); - o.set_member("createElement", &xml_createelement); - o.set_member("createTextNode", &xml_createtextnode); - o.set_member("getBytesLoaded", &xml_getbytesloaded); - o.set_member("getBytesTotal", &xml_getbytestotal); - o.set_member("hasChildNodes", &xml_haschildnodes); - o.set_member("insertBefore", &xml_insertbefore); - o.set_member("load", &xml_load); - o.set_member("parseXML", &xml_parsexml); - o.set_member("removeNode", &xml_removenode); - o.set_member("send", &xml_send); - o.set_member("sendAndLoad", &xml_sendandload); - o.set_member("toString", &xml_tostring); + o.init_member("addRequestHeader", &xml_addrequestheader); + o.init_member("appendChild", &xml_appendchild); + o.init_member("cloneNode", &xml_clonenode); + o.init_member("createElement", &xml_createelement); + o.init_member("createTextNode", &xml_createtextnode); + o.init_member("getBytesLoaded", &xml_getbytesloaded); + o.init_member("getBytesTotal", &xml_getbytestotal); + o.init_member("hasChildNodes", &xml_haschildnodes); + o.init_member("insertBefore", &xml_insertbefore); + o.init_member("load", &xml_load); + o.init_member("parseXML", &xml_parsexml); + o.init_member("removeNode", &xml_removenode); + o.init_member("send", &xml_send); + o.init_member("sendAndLoad", &xml_sendandload); + o.init_member("toString", &xml_tostring); // Properties boost::intrusive_ptr gettersetter; gettersetter = new builtin_function(&xml_nodename, NULL); - o.add_property("nodeName", *gettersetter, *gettersetter); + o.init_property("nodeName", *gettersetter, *gettersetter); gettersetter = new builtin_function(&xml_nodevalue, NULL); - o.add_property("nodeValue", *gettersetter, *gettersetter); + o.init_property("nodeValue", *gettersetter, *gettersetter); gettersetter = new builtin_function(&xml_firstchild, NULL); - o.add_property("firstChild", *gettersetter, *gettersetter); + o.init_property("firstChild", *gettersetter, *gettersetter); gettersetter = new builtin_function(&xml_childnodes, NULL); - o.add_property("childNodes", *gettersetter, *gettersetter); + o.init_property("childNodes", *gettersetter, *gettersetter); } static as_object* @@ -1478,7 +1478,7 @@ } // Register _global.String - global.set_member("XML", cl.get()); + global.init_member("XML", cl.get()); } Index: server/asobj/xmlnode.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/xmlnode.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -b -r1.5 -r1.6 --- server/asobj/xmlnode.cpp 18 Jan 2007 15:30:53 -0000 1.5 +++ server/asobj/xmlnode.cpp 18 Jan 2007 22:53:22 -0000 1.6 @@ -18,7 +18,7 @@ // // -/* $Id: xmlnode.cpp,v 1.5 2007/01/18 15:30:53 strk Exp $ */ +/* $Id: xmlnode.cpp,v 1.6 2007/01/18 22:53:22 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -310,12 +310,12 @@ void attachXMLNodeInterface(as_object& o) { - o.set_member("appendChild", &xmlnode_appendchild); - o.set_member("cloneNode", &xmlnode_clonenode); - o.set_member("hasChildNodes", &xmlnode_haschildnodes); - o.set_member("insertBefore", &xmlnode_insertbefore); - o.set_member("removeNode", &xmlnode_removenode); - o.set_member("toString", &xmlnode_tostring); + o.init_member("appendChild", &xmlnode_appendchild); + o.init_member("cloneNode", &xmlnode_clonenode); + o.init_member("hasChildNodes", &xmlnode_haschildnodes); + o.init_member("insertBefore", &xmlnode_insertbefore); + o.init_member("removeNode", &xmlnode_removenode); + o.init_member("toString", &xmlnode_tostring); // Properties - FIXME: use addProperty ! @@ -325,14 +325,14 @@ o.add_property("nodeValue", *gettersetter, *gettersetter); gettersetter = new builtin_function(&xmlnode_nodename, NULL); - o.add_property("nodeName", *gettersetter, *gettersetter); + o.init_property("nodeName", *gettersetter, *gettersetter); gettersetter = new builtin_function(&xmlnode_nodetype, NULL); - o.add_property("nodeType", *gettersetter, *gettersetter); + o.init_property("nodeType", *gettersetter, *gettersetter); // These two return an array of objects - o.set_member("attributes", as_value("")); - o.set_member("childNodes", as_value("")); + o.init_member("attributes", as_value("")); + o.init_member("childNodes", as_value("")); /// \fn MLNode::firstChild /// \brief XMLNode::firstChild property @@ -345,7 +345,7 @@ /// manipulate child nodes; use the appendChild(), insertBefore(), /// and removeNode() methods to manipulate child nodes. gettersetter = new builtin_function(&xmlnode_firstchild, NULL); - o.add_property("firstChild", *gettersetter, *gettersetter); + o.init_property("firstChild", *gettersetter, *gettersetter); /// \fn MLNode::lastChild /// \brief XMLNode::lastChild property @@ -357,15 +357,15 @@ /// insertBefore(), and removeNode() methods to manipulate child /// nodes. gettersetter = new builtin_function(&xmlnode_lastchild, NULL); - o.add_property("lastChild", *gettersetter, *gettersetter); + o.init_property("lastChild", *gettersetter, *gettersetter); gettersetter = new builtin_function(&xmlnode_nextsibling, NULL); - o.add_property("nextSibling", *gettersetter, *gettersetter); + o.init_property("nextSibling", *gettersetter, *gettersetter); gettersetter = new builtin_function(&xmlnode_previoussibling, NULL); - o.add_property("previousSibling", *gettersetter, *gettersetter); + o.init_property("previousSibling", *gettersetter, *gettersetter); - o.set_member("parentNode", as_value().set_null()); + o.init_member("parentNode", as_value().set_null()); } @@ -645,7 +645,7 @@ } // Register _global.String - global.set_member("XMLNode", cl.get()); + global.init_member("XMLNode", cl.get()); } Index: server/asobj/xmlsocket.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/xmlsocket.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- server/asobj/xmlsocket.cpp 9 Jan 2007 15:14:20 -0000 1.2 +++ server/asobj/xmlsocket.cpp 18 Jan 2007 22:53:22 -0000 1.3 @@ -583,10 +583,10 @@ as_object* xmlsock_obj = new xmlsocket_as_object; //log_msg("\tCreated New XMLSocket object at 0x%X\n", (unsigned int)xmlsock_obj); - xmlsock_obj->set_member("connect", &xmlsocket_connect); - xmlsock_obj->set_member("send", &xmlsocket_send); - xmlsock_obj->set_member("close", &xmlsocket_close); - xmlsock_obj->set_member("Connected", true); + xmlsock_obj->init_member("connect", &xmlsocket_connect); + xmlsock_obj->init_member("send", &xmlsocket_send); + xmlsock_obj->init_member("close", &xmlsocket_close); + xmlsock_obj->init_member("Connected", true); // swf_event* ev = new swf_event; // m_event_handlers.push_back(ev); // Setup event handlers @@ -604,12 +604,16 @@ #if 1 + // //as_c_function_ptr int_handler = (as_c_function_ptr)&timer_setinterval; //env->set_member("setInterval", int_handler); + // TODO: check this, sounds suspicious fn.env->set_member("setInterval", timer_setinterval); //as_c_function_ptr clr_handler = timer_clearinterval; + // TODO: check this, sounds suspicious fn.env->set_member("clearInterval", timer_clearinterval); + //env->set_variable("setInterval", int_handler, 0); //xmlsock_obj->set_event_handler(event_id::TIMER, // (as_c_function_ptr)&timer_expire); Index: server/vm/ASHandlers.cpp =================================================================== RCS file: /sources/gnash/gnash/server/vm/ASHandlers.cpp,v retrieving revision 1.30 retrieving revision 1.31 diff -u -b -r1.30 -r1.31 --- server/vm/ASHandlers.cpp 15 Jan 2007 14:46:24 -0000 1.30 +++ server/vm/ASHandlers.cpp 18 Jan 2007 22:53:22 -0000 1.31 @@ -16,7 +16,7 @@ // -/* $Id: ASHandlers.cpp,v 1.30 2007/01/15 14:46:24 strk Exp $ */ +/* $Id: ASHandlers.cpp,v 1.31 2007/01/18 22:53:22 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -141,6 +141,10 @@ { // Set up the prototype. as_value proto; + // We can safaly call as_object::get_member here as member name is + // a literal string in lowercase. (we should likely avoid calling + // get_member as a whole actually, and use a getProto() or similar + // method directly instead) TODO bool func_has_prototype = ctor_as_func->get_member("prototype", &proto); assert(func_has_prototype); @@ -1097,8 +1101,11 @@ if ( prop_number < get_property_names().size() ) { as_value val; - target->get_member(get_property_names()[prop_number].c_str(), - &val); + // TODO: check if get_propery_names() can return a std::string + // directly. + std::string propname = get_property_names()[prop_number].c_str(); + //target->get_member(propname &val); + thread.getObjectMember(*target, propname, val); env.top(1) = val; } else @@ -1136,10 +1143,13 @@ // set_property(target, prop_number, env.top(0)); if ( prop_number < get_property_names().size() ) { - target->set_member(get_property_names()[prop_number].c_str(), prop_val); + // TODO: check if get_property_names() return a std::string& + std::string member_name = get_property_names()[prop_number].c_str(); + thread.setObjectMember(*target, member_name, prop_val); } else { + // Malformed SWF ? (don't think this is possible to do with syntactically valid ActionScript) log_error("invalid set_property, property number %d", prop_number); } @@ -2293,7 +2303,8 @@ for (int i = 0; i < array_size; i++) { // @@ TODO a set_member that takes an int or as_value? index_number.set_int(i); - ao->set_member(index_number.to_string(), env.pop()); + //ao->set_member(index_number.to_string(), env.pop()); + thread.setObjectMember(*ao, index_number.to_std_string(), env.pop()); } env.push(result); @@ -2329,8 +2340,9 @@ // Set provided members for (int i=0; iset_member(member_name, member_value); + std::string member_name = env.pop().to_std_string(); + //new_obj_ptr->set_member(member_name, member_value); + thread.setObjectMember(*new_obj_ptr, member_name, member_value); } // @@ TODO @@ -2534,7 +2546,8 @@ int len = target.to_tu_string_versioned(version).utf8_length(); env.top(1).set_int(len); } else { - if (!obj->get_member(member_name.to_tu_string(), &(env.top(1)))) { + if ( ! thread.getObjectMember(*obj, member_name.to_std_string(), env.top(1)) ) + { env.top(1).set_undefined(); } @@ -2557,26 +2570,28 @@ thread.ensureStack(3); // value, member, object as_object* obj = env.top(2).to_object(); - + std::string member_name = env.top(1).to_std_string(); + const as_value& member_value = env.top(0); if (obj) { - obj->set_member(env.top(1).to_tu_string(), env.top(0)); + thread.setObjectMember(*obj, member_name, member_value); IF_VERBOSE_ACTION ( log_action("-- set_member %s.%s=%s", env.top(2).to_tu_string().c_str(), - env.top(1).to_tu_string().c_str(), - env.top(0).to_tu_string().c_str()); + member_name.c_str(), + member_value.to_string()); ); } else { + // Malformed SWF ? (don't think this is possible to do with ActionScript syntax) IF_VERBOSE_ACTION ( // Invalid object, can't set. log_action("-- set_member %s.%s=%s on invalid object!", env.top(2).to_tu_string().c_str(), - env.top(1).to_tu_string().c_str(), - env.top(0).to_tu_string().c_str()); + member_name.c_str(), + member_value.to_string()); ); } @@ -2618,7 +2633,7 @@ //int version = env.get_version(); // Get name of the method - const tu_string &method_name = env.top(0).to_tu_string(); + std::string method_name = env.top(0).to_std_string(); // Get an object as_value& obj_value = env.top(1); @@ -2650,7 +2665,8 @@ else { as_value method; - if (obj->get_member(method_name, &method)) + //if (obj->get_member(method_name, &method)) + if ( thread.getObjectMember(*obj, method_name, method) ) { if ( ! method.is_function() ) { @@ -2712,7 +2728,9 @@ } as_value method_val; - if ( ! obj->get_member(method_name.to_tu_stringi(), &method_val) ) + std::string method_string = method_name.to_std_string(); + //if ( ! obj->get_member(method_name.to_tu_stringi(), &method_val) ) + if ( ! thread.getObjectMember(*obj, method_string, method_val) ) { // SWF integrity check log_warning( Index: server/vm/ActionExec.cpp =================================================================== RCS file: /sources/gnash/gnash/server/vm/ActionExec.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -u -b -r1.13 -r1.14 --- server/vm/ActionExec.cpp 15 Jan 2007 16:08:02 -0000 1.13 +++ server/vm/ActionExec.cpp 18 Jan 2007 22:53:22 -0000 1.14 @@ -16,7 +16,7 @@ // -/* $Id: ActionExec.cpp,v 1.13 2007/01/15 16:08:02 strk Exp $ */ +/* $Id: ActionExec.cpp,v 1.14 2007/01/18 22:53:22 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -354,6 +354,42 @@ } +void +ActionExec::setObjectMember(as_object& obj, const std::string& var, const as_value& val) +{ + VM& vm = VM::get(); + + if ( vm.getSWFVersion() < 7 ) + { + std::string vari = var; + boost::to_lower(vari, vm.getLocale()); + obj.set_member(vari, val); + } + else + { + obj.set_member(var, val); + } + +} + +bool +ActionExec::getObjectMember(as_object& obj, const std::string& var, as_value& val) +{ + VM& vm = VM::get(); + + if ( vm.getSWFVersion() < 7 ) + { + std::string vari = var; + boost::to_lower(vari, vm.getLocale()); + return obj.get_member(vari, &val); + } + else + { + return obj.get_member(var, &val); + } + +} + /*private*/ void ActionExec::fixStackUnderrun(size_t required) Index: server/vm/ActionExec.h =================================================================== RCS file: /sources/gnash/gnash/server/vm/ActionExec.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -b -r1.9 -r1.10 --- server/vm/ActionExec.h 15 Jan 2007 18:07:39 -0000 1.9 +++ server/vm/ActionExec.h 18 Jan 2007 22:53:22 -0000 1.10 @@ -273,6 +273,37 @@ /// as_value getVariable(const std::string& name); + /// Set an object's member. + // + /// @param obj + /// The object we want to set the member of. + /// + /// @param name + /// Name of the variable. Supports slash and dot syntax. + /// Name is converted to lowercase if SWF version is < 7. + /// + /// @param val + /// The value to assign to the object's member. + /// + void setObjectMember(as_object& obj, const std::string& name, const as_value& val); + + /// Get an object's member. + // + /// @param obj + /// The object we want to set the member of. + /// + /// @param name + /// Name of the variable. Supports slash and dot syntax. + /// Name is converted to lowercase if SWF version is < 7. + /// + /// @param val + /// The as_value to write member value into. + /// + /// @returns + /// True if the member was found, false otherwise. + /// + bool getObjectMember(as_object& obj, const std::string& name, as_value& val); + /// Execute. void operator() (); }; Index: server/vm/action.cpp =================================================================== RCS file: /sources/gnash/gnash/server/vm/action.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- server/vm/action.cpp 7 Dec 2006 17:22:51 -0000 1.4 +++ server/vm/action.cpp 18 Jan 2007 22:53:22 -0000 1.5 @@ -42,6 +42,7 @@ #include "as_environment.h" #include "fn_call.h" #include "VM.h" +#include "StringPredicates.h" #ifdef HAVE_LIBXML #include "xml.h" @@ -127,7 +128,7 @@ // Statics. bool s_inited = false; -void register_component(const tu_stringi& name, as_c_function_ptr handler) +void register_component(const std::string& name, as_c_function_ptr handler) { as_object* global = VM::get().getGlobal(); global->set_member(name, handler); @@ -478,10 +479,11 @@ // event_id // -const tu_string& +const std::string& event_id::get_function_name() const { - static tu_string s_function_names[EVENT_COUNT] = + // TODO: use a case-insensitive matching + static std::string s_function_names[EVENT_COUNT] = { "INVALID", // INVALID "onPress", // PRESS @@ -549,55 +551,67 @@ } // Standard member lookup. +// TODO: move to character.h ? +// TODO: case-insensitive search ? as_standard_member -get_standard_member(const tu_stringi& name) +get_standard_member(const std::string& name) { + typedef std::map< std::string, as_standard_member> maptype; + static bool s_inited = false; - static stringi_hash s_standard_member_map; - if (!s_inited) { + static std::map< std::string, as_standard_member, StringNoCaseLessThen> membersMap; + + if (!s_inited) + { s_inited = true; - s_standard_member_map.resize(int(AS_STANDARD_MEMBER_COUNT)); + // worth reserving ? + //membersMap.resize(int(AS_STANDARD_MEMBER_COUNT)); - s_standard_member_map.add("_x", M_X); - s_standard_member_map.add("_y", M_Y); - s_standard_member_map.add("_xscale", M_XSCALE); - s_standard_member_map.add("_yscale", M_YSCALE); - s_standard_member_map.add("_currentframe", M_CURRENTFRAME); - s_standard_member_map.add("_totalframes", M_TOTALFRAMES); - s_standard_member_map.add("_alpha", M_ALPHA); - s_standard_member_map.add("_visible", M_VISIBLE); - s_standard_member_map.add("_width", M_WIDTH); - s_standard_member_map.add("_height", M_HEIGHT); - s_standard_member_map.add("_rotation", M_ROTATION); - s_standard_member_map.add("_target", M_TARGET); - s_standard_member_map.add("_framesloaded", M_FRAMESLOADED); - s_standard_member_map.add("_name", M_NAME); - s_standard_member_map.add("_droptarget", M_DROPTARGET); - s_standard_member_map.add("_url", M_URL); - s_standard_member_map.add("_highquality", M_HIGHQUALITY); - s_standard_member_map.add("_focusrect", M_FOCUSRECT); - s_standard_member_map.add("_soundbuftime", M_SOUNDBUFTIME); - s_standard_member_map.add("_xmouse", M_XMOUSE); - s_standard_member_map.add("_ymouse", M_YMOUSE); - s_standard_member_map.add("_parent", M_PARENT); - s_standard_member_map.add("text", M_TEXT); - s_standard_member_map.add("textWidth", M_TEXTWIDTH); - s_standard_member_map.add("textColor", M_TEXTCOLOR); - s_standard_member_map.add("onLoad", M_ONLOAD); - s_standard_member_map.add("onRollOver", M_ONROLLOVER); - s_standard_member_map.add("onRollOut", M_ONROLLOUT); + membersMap["_x"] = M_X; + membersMap["_y"] = M_Y; + membersMap["_xscale"] = M_XSCALE; + membersMap["_yscale"] = M_YSCALE; + membersMap["_currentframe"] = M_CURRENTFRAME; + membersMap["_totalframes"] = M_TOTALFRAMES; + membersMap["_alpha"] = M_ALPHA; + membersMap["_visible"] = M_VISIBLE; + membersMap["_width"] = M_WIDTH; + membersMap["_height"] = M_HEIGHT; + membersMap["_rotation"] = M_ROTATION; + membersMap["_target"] = M_TARGET; + membersMap["_framesloaded"] = M_FRAMESLOADED; + membersMap["_name"] = M_NAME; + membersMap["_droptarget"] = M_DROPTARGET; + membersMap["_url"] = M_URL; + membersMap["_highquality"] = M_HIGHQUALITY; + membersMap["_focusrect"] = M_FOCUSRECT; + membersMap["_soundbuftime"] = M_SOUNDBUFTIME; + membersMap["_xmouse"] = M_XMOUSE; + membersMap["_ymouse"] = M_YMOUSE; + membersMap["_parent"] = M_PARENT; + membersMap["text"] = M_TEXT; + membersMap["textWidth"] = M_TEXTWIDTH; + membersMap["textColor"] = M_TEXTCOLOR; + membersMap["onLoad"] = M_ONLOAD; + membersMap["onRollOver"] = M_ONROLLOVER; + membersMap["onRollOut"] = M_ONROLLOUT; + } + + as_standard_member result; + maptype::const_iterator it = membersMap.find(name); + if ( it == membersMap.end() ) + { + result = M_INVALID_MEMBER; + } else { + result = it->second; } - as_standard_member result = M_INVALID_MEMBER; - s_standard_member_map.get(name, &result); - return result; } - -} +} // end of namespace gnash // Local Variables: Index: server/vm/action.h =================================================================== RCS file: /sources/gnash/gnash/server/vm/action.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- server/vm/action.h 24 Nov 2006 14:50:30 -0000 1.2 +++ server/vm/action.h 18 Jan 2007 22:53:22 -0000 1.3 @@ -140,7 +140,7 @@ /// Return the standard enum, if the arg names a standard member. /// Returns M_INVALID_MEMBER if there's no match. - as_standard_member get_standard_member(const tu_stringi& name); + as_standard_member get_standard_member(const std::string& name); void attach_extern_movie(const char* c_url, const sprite_instance* target, const sprite_instance* root_movie); Index: testsuite/actionscript.all/XML.as =================================================================== RCS file: /sources/gnash/gnash/testsuite/actionscript.all/XML.as,v retrieving revision 1.15 retrieving revision 1.16 diff -u -b -r1.15 -r1.16 --- testsuite/actionscript.all/XML.as 18 Jan 2007 16:11:27 -0000 1.15 +++ testsuite/actionscript.all/XML.as 18 Jan 2007 22:53:22 -0000 1.16 @@ -22,7 +22,7 @@ // compile this test case with Ming makeswf, and then // execute it like this gnash -1 -r 0 -v out.swf -rcsid="$Id: XML.as,v 1.15 2007/01/18 16:11:27 strk Exp $"; +rcsid="$Id: XML.as,v 1.16 2007/01/18 22:53:22 strk Exp $"; #include "dejagnu.as" #include "utils.as" @@ -201,6 +201,7 @@ }; check(XML); +check_equals( typeof(tmp.parseXML), 'function'); // parseXML doesn't return anything tmp.parseXML(xml_in); Index: testsuite/server/GetterSetterTest.cpp =================================================================== RCS file: /sources/gnash/gnash/testsuite/server/GetterSetterTest.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -b -r1.5 -r1.6 --- testsuite/server/GetterSetterTest.cpp 6 Dec 2006 10:24:55 -0000 1.5 +++ testsuite/server/GetterSetterTest.cpp 18 Jan 2007 22:53:22 -0000 1.6 @@ -52,7 +52,7 @@ as_object* o = fn.this_ptr; assert(fn.nargs == 1); as_value& val = fn.arg(0); - o->set_member(val.to_string(), val); + o->set_member(val.to_std_string(), val); } struct test_object: public as_object { @@ -67,7 +67,7 @@ const string& getText() const { return textval; } const char* get_text_value() const { return textval.c_str(); } - void set_member(const tu_stringi& , const as_value& val ) + void set_member(const std::string& , const as_value& val ) { textval = val.to_string(); } From MAILER-DAEMON Fri Jan 19 05:15:55 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H7qmo-00011B-O9 for mharc-gnash-commit@gnu.org; Fri, 19 Jan 2007 05:15:54 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H7qml-0000yE-PM for gnash-commit@gnu.org; Fri, 19 Jan 2007 05:15:52 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H7qmj-0000w2-V8 for gnash-commit@gnu.org; Fri, 19 Jan 2007 05:15:51 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H7qmj-0000vj-PG for gnash-commit@gnu.org; Fri, 19 Jan 2007 05:15:49 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H7qmj-0000S4-67 for gnash-commit@gnu.org; Fri, 19 Jan 2007 05:15:49 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H7qmh-0001Kr-PW for gnash-commit@gnu.org; Fri, 19 Jan 2007 10:15:47 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H7qmh-0001Kn-Gu for gnash-commit@gnu.org; Fri, 19 Jan 2007 10:15:47 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Fri, 19 Jan 2007 10:15:47 +0000 Subject: [Gnash-commit] gnash/server as_object.cpp X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jan 2007 10:15:52 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/19 10:15:47 Modified files: server : as_object.cpp Log message: Commented out debugging output in init_property CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_object.cpp?cvsroot=gnash&r1=1.24&r2=1.25 Patches: Index: as_object.cpp =================================================================== RCS file: /sources/gnash/gnash/server/as_object.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -u -b -r1.24 -r1.25 --- as_object.cpp 18 Jan 2007 22:53:21 -0000 1.24 +++ as_object.cpp 19 Jan 2007 10:15:47 -0000 1.25 @@ -233,12 +233,12 @@ std::string name = key; boost::to_lower(name, _vm.getLocale()); success = _members.addGetterSetter(name, getter, setter); - log_msg("Initialized property '%s'", name.c_str()); + //log_msg("Initialized property '%s'", name.c_str()); } else { success = _members.addGetterSetter(key, getter, setter); - log_msg("Initialized property '%s'", key.c_str()); + //log_msg("Initialized property '%s'", key.c_str()); } // We shouldn't attempt to initialize a property twice, should we ? From MAILER-DAEMON Fri Jan 19 05:54:23 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H7rO3-0004om-1c for mharc-gnash-commit@gnu.org; Fri, 19 Jan 2007 05:54:23 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H7rO0-0004l0-Jz for gnash-commit@gnu.org; Fri, 19 Jan 2007 05:54:20 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H7rNy-0004iU-J6 for gnash-commit@gnu.org; Fri, 19 Jan 2007 05:54:19 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H7rNy-0004hG-0G for gnash-commit@gnu.org; Fri, 19 Jan 2007 05:54:18 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H7rNx-0007tn-Dh for gnash-commit@gnu.org; Fri, 19 Jan 2007 05:54:17 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H7rNw-0003RY-1C for gnash-commit@gnu.org; Fri, 19 Jan 2007 10:54:16 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H7rNv-0003RV-Nv for gnash-commit@gnu.org; Fri, 19 Jan 2007 10:54:15 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Fri, 19 Jan 2007 10:54:15 +0000 Subject: [Gnash-commit] gnash ChangeLog server/sprite_instance.cpp X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jan 2007 10:54:21 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/19 10:54:15 Modified files: . : ChangeLog server : sprite_instance.cpp Log message: * server/sprite_instance.cpp: cleanups, including use of log_aserror when appropriate. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2138&r2=1.2139 http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.125&r2=1.126 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2138 retrieving revision 1.2139 diff -u -b -r1.2138 -r1.2139 --- ChangeLog 18 Jan 2007 22:53:21 -0000 1.2138 +++ ChangeLog 19 Jan 2007 10:54:15 -0000 1.2139 @@ -1,5 +1,11 @@ 2007-01-18 Sandro Santilli + * server/sprite_instance.cpp: cleanups, including use + of log_aserror when appropriate. + * server/as_object.cpp: commented out debugging output. + +2007-01-18 Sandro Santilli + * extensions/mysql/mysql_table.cpp, server/array.cpp, server/array.h, server/as_function.cpp, server/as_object.cpp, server/as_object.h, server/button_character_instance.cpp, Index: server/sprite_instance.cpp =================================================================== RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v retrieving revision 1.125 retrieving revision 1.126 diff -u -b -r1.125 -r1.126 --- server/sprite_instance.cpp 18 Jan 2007 22:53:21 -0000 1.125 +++ server/sprite_instance.cpp 19 Jan 2007 10:54:15 -0000 1.126 @@ -96,11 +96,6 @@ { assert(dynamic_cast(fn.this_ptr)); sprite_instance* sprite = static_cast(fn.this_ptr); - if (sprite == NULL) - { - sprite = dynamic_cast(fn.env->get_target()); - } - assert(sprite); sprite->set_play_state(sprite_instance::PLAY); } @@ -108,11 +103,7 @@ { assert(dynamic_cast(fn.this_ptr)); sprite_instance* sprite = static_cast(fn.this_ptr); - if (sprite == NULL) - { - sprite = dynamic_cast(fn.env->get_target()); - } - assert(sprite); + sprite->set_play_state(sprite_instance::STOP); // Stop sound stream as well, if such exist @@ -132,12 +123,6 @@ { assert(dynamic_cast(fn.this_ptr)); sprite_instance* sprite = static_cast(fn.this_ptr); - if (sprite == NULL) - { - sprite = dynamic_cast(fn.env->get_target()); - } - - assert(sprite); sprite_instance* parent = (sprite_instance*) sprite->get_parent(); if (parent) @@ -150,22 +135,13 @@ // depth:Number [, initObject:Object]) : MovieClip static void sprite_attach_movie(const fn_call& fn) { - sprite_instance* sprite = dynamic_cast(fn.this_ptr); - if (sprite == NULL) - { - IF_VERBOSE_ASCODING_ERRORS( - log_warning("attachMovie called against an object" - " which is NOT a MovieClip (%s), " - "returning undefined", typeid(fn.this_ptr).name()); - ); - fn.result->set_undefined(); - return; - } + assert( dynamic_cast(fn.this_ptr) ); + sprite_instance* sprite = static_cast(fn.this_ptr); if (fn.nargs < 3 || fn.nargs > 4) { IF_VERBOSE_ASCODING_ERRORS( - log_warning("attachMovie called with wrong number of arguments" + log_aserror("attachMovie called with wrong number of arguments" " expected 3 to 4, got (%d) - returning undefined", fn.nargs); ); @@ -179,7 +155,7 @@ if ( exported == NULL ) { IF_VERBOSE_ASCODING_ERRORS( - log_warning("attachMovie: '%s': no such exported resource - " + log_aserror("attachMovie: '%s': no such exported resource - " "returning undefined", id_name.c_str()); ); @@ -190,7 +166,7 @@ if ( ! exported_movie ) { IF_VERBOSE_ASCODING_ERRORS( - log_warning("attachMovie: exported resource '%s' " + log_aserror("attachMovie: exported resource '%s' " "is not a movie definition (%s) -- " "returning undefined", id_name.c_str(), @@ -219,7 +195,11 @@ // attachAudio(id:Object) : Void static void sprite_attach_audio(const fn_call& fn) { - log_error("MovieClip.attachAudio() unimplemented -- " + assert( dynamic_cast(fn.this_ptr) ); + sprite_instance* sprite = static_cast(fn.this_ptr); + UNUSED(sprite); + + log_error("FIXME: MovieClip.attachAudio() unimplemented -- " "returning undefined"); fn.result->set_undefined(); } @@ -229,19 +209,13 @@ { assert(dynamic_cast(fn.this_ptr)); sprite_instance* sprite = static_cast(fn.this_ptr); - if (sprite == NULL) - { - sprite = dynamic_cast(fn.env->get_target()); - } - - assert(sprite); if (fn.nargs != 2) { if (fn.nargs < 2) { IF_VERBOSE_ASCODING_ERRORS( - log_warning("createEmptyMovieClip needs " + log_aserror("createEmptyMovieClip needs " "2 args, but %d given," " returning undefined.", fn.nargs); @@ -252,7 +226,7 @@ else { IF_VERBOSE_ASCODING_ERRORS( - log_warning("createEmptyMovieClip takes " + log_aserror("createEmptyMovieClip takes " "2 args, but %d given, discarding" " the one in excess.", fn.nargs); @@ -268,12 +242,7 @@ { assert(dynamic_cast(fn.this_ptr)); sprite_instance* sprite = static_cast(fn.this_ptr); - if (sprite == NULL) - { - sprite = dynamic_cast(fn.env->get_target()); - } - assert(sprite); int n = sprite->get_depth(); // Macromedia Flash help says: depth starts at -16383 (0x3FFF) @@ -285,15 +254,12 @@ { assert(dynamic_cast(fn.this_ptr)); sprite_instance* sprite = static_cast(fn.this_ptr); - if (sprite == NULL) - { - sprite = dynamic_cast(fn.env->get_target()); - } - assert(sprite); - if (fn.nargs != 1) + if (fn.nargs < 1) { - log_error("swapDepths needs one arg\n"); + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("swapDepths needs one arg"); + ); return; } @@ -313,13 +279,17 @@ } else { - log_error("swapDepths has received invalid arg\n"); + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("swapDepths has received invalid arg\n"); + ); return; } if (sprite == NULL || target == NULL) { - log_error("It is impossible to swap NULL character\n"); + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("It is impossible to swap NULL character"); + ); return; } @@ -334,7 +304,10 @@ } else { - log_error("MovieClips should have the same parent\n"); + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("Can't swap depth of MovieClips " + "with different parents"); + ); } } @@ -346,15 +319,12 @@ { assert(dynamic_cast(fn.this_ptr)); sprite_instance* sprite = static_cast(fn.this_ptr); - if (sprite == NULL) - { - sprite = dynamic_cast(fn.env->get_target()); - } - assert(sprite); if (fn.nargs < 2) { - log_error("duplicateMovieClip needs 2 or 3 args\n"); + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("duplicateMovieClip needs 2 or 3 args\n"); + ); return; } @@ -410,15 +380,12 @@ { assert(dynamic_cast(fn.this_ptr)); sprite_instance* sprite = static_cast(fn.this_ptr); - if (sprite == NULL) - { - sprite = dynamic_cast(fn.env->get_target()); - } - assert(sprite); if (fn.nargs < 1) { - log_error("sprite_goto_and_play needs one arg\n"); + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("sprite_goto_and_play needs one arg"); + ); return; } @@ -433,15 +400,12 @@ { assert(dynamic_cast(fn.this_ptr)); sprite_instance* sprite = static_cast(fn.this_ptr); - if (sprite == NULL) - { - sprite = dynamic_cast(fn.env->get_target()); - } - assert(sprite); if (fn.nargs < 1) { - log_error("sprite_goto_and_stop needs one arg\n"); + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("sprite_goto_and_stop needs one arg"); + ); return; } @@ -456,11 +420,6 @@ { assert(dynamic_cast(fn.this_ptr)); sprite_instance* sprite = static_cast(fn.this_ptr); - if (sprite == NULL) - { - sprite = dynamic_cast(fn.env->get_target()); - } - assert(sprite); size_t frame_count = sprite->get_frame_count(); size_t current_frame = sprite->get_current_frame(); @@ -475,11 +434,6 @@ { assert(dynamic_cast(fn.this_ptr)); sprite_instance* sprite = static_cast(fn.this_ptr); - if (sprite == NULL) - { - sprite = dynamic_cast(fn.env->get_target()); - } - assert(sprite); size_t current_frame = sprite->get_current_frame(); if (current_frame > 0) @@ -493,11 +447,6 @@ { assert(dynamic_cast(fn.this_ptr)); sprite_instance* sprite = static_cast(fn.this_ptr); - if (sprite == NULL) - { - sprite = dynamic_cast(fn.env->get_target()); - } - assert(sprite); fn.result->set_int(sprite->get_bytes_loaded()); } @@ -516,8 +465,12 @@ fn.result->set_int(sprite->get_bytes_total()); } -static void sprite_load_movie(const fn_call& /* fn */) +static void sprite_load_movie(const fn_call& fn) { + assert( dynamic_cast(fn.this_ptr) ); + sprite_instance* sprite = static_cast(fn.this_ptr); + UNUSED(sprite); + log_error("FIXME: %s not implemented yet", __PRETTY_FUNCTION__); //moviecliploader_loadclip(fn); } @@ -540,14 +493,14 @@ if ( ! target ) { IF_VERBOSE_ASCODING_ERRORS( - log_warning("Can't find hitTest target %s", + log_aserror("Can't find hitTest target %s", tgt_val.to_string()); ); fn.result->set_undefined(); return; } if ( ! warned_1_arg ) { - log_warning("hitTest(target) unimplemented"); + log_error("FIXME: hitTest(target) unimplemented"); warned_1_arg=true; } fn.result->set_undefined(); @@ -559,7 +512,7 @@ double x = fn.arg(0).to_number(); double y = fn.arg(1).to_number(); if ( ! warned_2_arg ) { - log_error("hitTest(%g,%g) unimplemented", + log_error("FIXME: hitTest(%g,%g) unimplemented", x,y); warned_2_arg=true; } @@ -573,7 +526,7 @@ double y = fn.arg(1).to_number(); bool shapeFlag = fn.arg(2).to_bool(); if ( ! warned_3_arg ) { - log_error("hitTest(%g,%g,%d) unimplemented", + log_error("FIXME: hitTest(%g,%g,%d) unimplemented", x,y,shapeFlag); warned_3_arg=true; } @@ -584,7 +537,7 @@ default: { IF_VERBOSE_ASCODING_ERRORS( - log_warning("hitTest() called with %u args.", + log_aserror("hitTest() called with %u args.", fn.nargs); ); fn.result->set_undefined(); @@ -596,24 +549,11 @@ } -static void sprite_create_text_field(const fn_call& fn) +static void +sprite_create_text_field(const fn_call& fn) { - as_object *target=fn.this_ptr; - if ( target == NULL ) - { - target=fn.env->get_target(); - } - else - { - // I'm curious about when does fn.this_ptr - // actually have a value! - log_msg("-- %s: this_ptr(%p)!=target(%p) --\n", - __PRETTY_FUNCTION__, - (void*)fn.this_ptr, (void*)fn.env->get_target()); - } - - sprite_instance* sprite = dynamic_cast(target); - assert(sprite); + assert( dynamic_cast(fn.this_ptr) ); + sprite_instance* sprite = static_cast(fn.this_ptr); if (fn.nargs != 6) // name, depth, x, y, width, height { @@ -760,18 +700,8 @@ static void sprite_getNextHighestDepth(const fn_call& fn) { - sprite_instance* sprite = dynamic_cast(fn.this_ptr); - if (sprite == NULL) - { - // Handle programming errors - IF_VERBOSE_ASCODING_ERRORS ( - log_error("getNextHighestDepth called against an object" - " which is NOT a MovieClip (%s), " - "returning undefined", typeid(fn.this_ptr).name()); - ); - fn.result->set_undefined(); - return; - } + assert( dynamic_cast(fn.this_ptr) ); + sprite_instance* sprite = static_cast(fn.this_ptr); unsigned int nextdepth = sprite->getNextHighestDepth(); fn.result->set_double(static_cast(nextdepth)); @@ -779,8 +709,12 @@ // getURL(url:String, [window:String], [method:String]) : Void static void -sprite_getURL(const fn_call& /*fn*/) +sprite_getURL(const fn_call& fn) { + assert( dynamic_cast(fn.this_ptr) ); + sprite_instance* sprite = static_cast(fn.this_ptr); + UNUSED(sprite); + log_error("FIXME: MovieClip.getURL() not implemented yet"); } @@ -788,18 +722,8 @@ static void sprite_getBounds(const fn_call& fn) { - sprite_instance* sprite = dynamic_cast(fn.this_ptr); - if (sprite == NULL) - { - // Handle programming errors - IF_VERBOSE_ASCODING_ERRORS ( - log_error("getBounds called against an object" - " which is NOT a MovieClip (%s), " - "returning undefined", typeid(fn.this_ptr).name()); - ); - fn.result->set_undefined(); - return; - } + assert( dynamic_cast(fn.this_ptr) ); + sprite_instance* sprite = static_cast(fn.this_ptr); boost::intrusive_ptr target; if ( fn.nargs > 0 ) @@ -808,6 +732,7 @@ } // TODO: implement 'Range2d character::getBounds(character* ref=NULL)' + UNUSED(sprite); geometry::Range2d bounds(0, 0, 0, 0); // = sprite->getBounds(target.get()); double xMin = bounds.getMinX(); @@ -830,18 +755,9 @@ static void sprite_globalToLocal(const fn_call& fn) { - sprite_instance* sprite = dynamic_cast(fn.this_ptr); - if (sprite == NULL) - { - // Handle programming errors - IF_VERBOSE_ASCODING_ERRORS ( - log_error("MovieClip.globalToLocal() called against an object" - " which is NOT a MovieClip (%s), " - "returning undefined", typeid(fn.this_ptr).name()); - ); - fn.result->set_undefined(); - return; - } + assert( dynamic_cast(fn.this_ptr) ); + sprite_instance* sprite = static_cast(fn.this_ptr); + UNUSED(sprite); log_error("FIXME: MovieClip.globalToLocal() not implemented yet"); fn.result->set_undefined(); @@ -850,18 +766,9 @@ static void sprite_endFill(const fn_call& fn) { - sprite_instance* sprite = dynamic_cast(fn.this_ptr); - if (sprite == NULL) - { - // Handle programming errors - IF_VERBOSE_ASCODING_ERRORS ( - log_error("MovieClip.endFill() called against an object" - " which is NOT a MovieClip (%s), " - "returning undefined", typeid(fn.this_ptr).name()); - ); - fn.result->set_undefined(); - return; - } + assert( dynamic_cast(fn.this_ptr) ); + sprite_instance* sprite = static_cast(fn.this_ptr); + UNUSED(sprite); log_error("FIXME: MovieClip.endFill() not implemented yet"); fn.result->set_undefined(); @@ -870,18 +777,9 @@ static void sprite_lineTo(const fn_call& fn) { - sprite_instance* sprite = dynamic_cast(fn.this_ptr); - if (sprite == NULL) - { - // Handle programming errors - IF_VERBOSE_ASCODING_ERRORS ( - log_error("MovieClip.lineTo() called against an object" - " which is NOT a MovieClip (%s), " - "returning undefined", typeid(fn.this_ptr).name()); - ); - fn.result->set_undefined(); - return; - } + assert( dynamic_cast(fn.this_ptr) ); + sprite_instance* sprite = static_cast(fn.this_ptr); + UNUSED(sprite); log_error("FIXME: MovieClip.lineTo() not implemented yet"); fn.result->set_undefined(); @@ -890,18 +788,9 @@ static void sprite_lineStyle(const fn_call& fn) { - sprite_instance* sprite = dynamic_cast(fn.this_ptr); - if (sprite == NULL) - { - // Handle programming errors - IF_VERBOSE_ASCODING_ERRORS ( - log_error("MovieClip.lineStyle() called against an object" - " which is NOT a MovieClip (%s), " - "returning undefined", typeid(fn.this_ptr).name()); - ); - fn.result->set_undefined(); - return; - } + assert( dynamic_cast(fn.this_ptr) ); + sprite_instance* sprite = static_cast(fn.this_ptr); + UNUSED(sprite); log_error("FIXME: MovieClip.lineStyle() not implemented yet"); fn.result->set_undefined(); @@ -910,18 +799,9 @@ static void sprite_curveTo(const fn_call& fn) { - sprite_instance* sprite = dynamic_cast(fn.this_ptr); - if (sprite == NULL) - { - // Handle programming errors - IF_VERBOSE_ASCODING_ERRORS ( - log_error("MovieClip.curveTo() called against an object" - " which is NOT a MovieClip (%s), " - "returning undefined", typeid(fn.this_ptr).name()); - ); - fn.result->set_undefined(); - return; - } + assert( dynamic_cast(fn.this_ptr) ); + sprite_instance* sprite = static_cast(fn.this_ptr); + UNUSED(sprite); log_error("FIXME: MovieClip.curveTo() not implemented yet"); fn.result->set_undefined(); @@ -930,18 +810,9 @@ static void sprite_clear(const fn_call& fn) { - sprite_instance* sprite = dynamic_cast(fn.this_ptr); - if (sprite == NULL) - { - // Handle programming errors - IF_VERBOSE_ASCODING_ERRORS ( - log_error("MovieClip.clear() called against an object" - " which is NOT a MovieClip (%s), " - "returning undefined", typeid(fn.this_ptr).name()); - ); - fn.result->set_undefined(); - return; - } + assert( dynamic_cast(fn.this_ptr) ); + sprite_instance* sprite = static_cast(fn.this_ptr); + UNUSED(sprite); log_error("FIXME: MovieClip.clear() not implemented yet"); fn.result->set_undefined(); @@ -950,18 +821,9 @@ static void sprite_beginFill(const fn_call& fn) { - sprite_instance* sprite = dynamic_cast(fn.this_ptr); - if (sprite == NULL) - { - // Handle programming errors - IF_VERBOSE_ASCODING_ERRORS ( - log_error("MovieClip.beginFill() called against an object" - " which is NOT a MovieClip (%s), " - "returning undefined", typeid(fn.this_ptr).name()); - ); - fn.result->set_undefined(); - return; - } + assert( dynamic_cast(fn.this_ptr) ); + sprite_instance* sprite = static_cast(fn.this_ptr); + UNUSED(sprite); log_error("FIXME: MovieClip.beginFill() not implemented yet"); fn.result->set_undefined(); @@ -970,18 +832,9 @@ static void sprite_beginGradientFill(const fn_call& fn) { - sprite_instance* sprite = dynamic_cast(fn.this_ptr); - if (sprite == NULL) - { - // Handle programming errors - IF_VERBOSE_ASCODING_ERRORS ( - log_error("MovieClip.beginGradientFill() called against an object" - " which is NOT a MovieClip (%s), " - "returning undefined", typeid(fn.this_ptr).name()); - ); - fn.result->set_undefined(); - return; - } + assert( dynamic_cast(fn.this_ptr) ); + sprite_instance* sprite = static_cast(fn.this_ptr); + UNUSED(sprite); log_error("FIXME: MovieClip.beginGradientFill() not implemented yet"); fn.result->set_undefined(); @@ -990,15 +843,23 @@ // startDrag([lockCenter:Boolean], [left:Number], [top:Number], // [right:Number], [bottom:Number]) : Void` static void -sprite_startDrag(const fn_call& /*fn*/) +sprite_startDrag(const fn_call& fn) { + assert( dynamic_cast(fn.this_ptr) ); + sprite_instance* sprite = static_cast(fn.this_ptr); + UNUSED(sprite); + log_error("FIXME: MovieClip.startDrag() not implemented yet"); } // stopDrag() : Void static void -sprite_stopDrag(const fn_call& /*fn*/) +sprite_stopDrag(const fn_call& fn) { + assert( dynamic_cast(fn.this_ptr) ); + sprite_instance* sprite = static_cast(fn.this_ptr); + UNUSED(sprite); + log_error("FIXME: MovieClip.stopDrag() not implemented yet"); } @@ -1350,7 +1211,7 @@ // @@ TODO static bool warned = false; if ( ! warned ) { - log_warning("FIXME: MovieClip._droptarget unimplemented"); + log_error("FIXME: MovieClip._droptarget unimplemented"); warned=true; } @@ -1492,7 +1353,7 @@ IF_VERBOSE_ASCODING_ERRORS( if ( m_display_list.get_character_by_name_i(name) ) { - log_warning("A sprite member (%s) clashes with " + log_aserror("A sprite member (%s) clashes with " "the name of an existing character " "in its display list! " "The member will hide the " @@ -1568,11 +1429,12 @@ { size_t frame_number = get_frame_number(frame_spec); - if (frame_number >= m_def->get_frame_count()) { // No dice. - log_error("call_frame('%s') -- unknown frame\n", frame_spec.to_string()); + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("call_frame('%s') -- unknown frame", frame_spec.to_string()); + ); return; } @@ -1787,22 +1649,20 @@ // Handle bogus values if (isnan(scale_percent)) { - log_warning("Attempt to set _xscale to %g, refused", + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("Attempt to set _xscale to %g, refused", scale_percent); + ); return; } else if (scale_percent < 0 ) { - log_warning("Attempt to set _xscale to %g, use 0", + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("Attempt to set _xscale to %g, use 0", scale_percent); + ); scale_percent = 0; } -// else if (scale_percent > 100 ) -// { -// log_warning("Attempt to set _xscale to %g, use 100", -// scale_percent); -// scale_percent = 100; -// } // input is in percent float scale = (float)scale_percent/100.f; @@ -1827,22 +1687,20 @@ // Handle bogus values if (isnan(scale_percent)) { - log_warning("Attempt to set _yscale to %g, refused", + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("Attempt to set _yscale to %g, refused", scale_percent); + ); return; } else if (scale_percent < 0 ) { - log_warning("Attempt to set _yscale to %g, use 0", + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("Attempt to set _yscale to %g, use 0", scale_percent); + ); scale_percent = 0; } -// else if (scale_percent > 100 ) -// { -// log_warning("Attempt to set _yscale to %g, use 100", -// scale_percent); -// scale_percent = 100; -// } // input is in percent float scale = (float)scale_percent/100.f; @@ -2428,8 +2286,8 @@ else { IF_VERBOSE_MALFORMED_SWF( - log_warning("sprite_instance::goto_labeled_frame('%s') " - "unknown label\n", label); + log_swferror("sprite_instance::goto_labeled_frame('%s') " + "unknown label", label); ); return false; } @@ -2486,7 +2344,7 @@ if (cdef == NULL) { IF_VERBOSE_MALFORMED_SWF( - log_warning("sprite_instance::add_display_object(): " + log_swferror("sprite_instance::add_display_object(): " "unknown cid = %d", character_id); ); return NULL; From MAILER-DAEMON Fri Jan 19 08:10:19 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H7tVb-0003Dq-4r for mharc-gnash-commit@gnu.org; Fri, 19 Jan 2007 08:10:19 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H7tVa-0003DE-58 for gnash-commit@gnu.org; Fri, 19 Jan 2007 08:10:18 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H7tVY-0003CH-N0 for gnash-commit@gnu.org; Fri, 19 Jan 2007 08:10:17 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H7tVY-0003CB-I5 for gnash-commit@gnu.org; Fri, 19 Jan 2007 08:10:16 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H7tVX-0004r9-N2 for gnash-commit@gnu.org; Fri, 19 Jan 2007 08:10:15 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H7tVU-0000mN-K6 for gnash-commit@gnu.org; Fri, 19 Jan 2007 13:10:12 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H7tVT-0000mJ-TF for gnash-commit@gnu.org; Fri, 19 Jan 2007 13:10:12 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Fri, 19 Jan 2007 13:10:11 +0000 Subject: [Gnash-commit] gnash ChangeLog server/asobj/xmlnode.cpp X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jan 2007 13:10:18 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/19 13:10:11 Modified files: . : ChangeLog server/asobj : xmlnode.cpp Log message: * server/asobj/xmlnode.cpp (xmlnode_new): cast double to int before casting to an enum [ fix for gcc-3.3.5 ] CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2139&r2=1.2140 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/xmlnode.cpp?cvsroot=gnash&r1=1.6&r2=1.7 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2139 retrieving revision 1.2140 diff -u -b -r1.2139 -r1.2140 --- ChangeLog 19 Jan 2007 10:54:15 -0000 1.2139 +++ ChangeLog 19 Jan 2007 13:10:11 -0000 1.2140 @@ -1,5 +1,7 @@ -2007-01-18 Sandro Santilli +2007-01-19 Sandro Santilli + * server/asobj/xmlnode.cpp (xmlnode_new): cast double to int + before casting to an enum [ fix for gcc-3.3.5 ] * server/sprite_instance.cpp: cleanups, including use of log_aserror when appropriate. * server/as_object.cpp: commented out debugging output. Index: server/asobj/xmlnode.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/xmlnode.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -b -r1.6 -r1.7 --- server/asobj/xmlnode.cpp 18 Jan 2007 22:53:22 -0000 1.6 +++ server/asobj/xmlnode.cpp 19 Jan 2007 13:10:11 -0000 1.7 @@ -18,7 +18,7 @@ // // -/* $Id: xmlnode.cpp,v 1.6 2007/01/18 22:53:22 strk Exp $ */ +/* $Id: xmlnode.cpp,v 1.7 2007/01/19 13:10:11 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -385,15 +385,13 @@ xmlnode_new(const fn_call& fn) { XMLNode *xml_obj; - //const char *data; - -// log_msg("%s\n", __PRETTY_FUNCTION__); xml_obj = new XMLNode; if ( fn.nargs > 0 ) { - xml_obj->nodeTypeSet(static_cast(fn.arg(0).to_number())); + xml_obj->nodeTypeSet(static_cast( + static_cast(fn.arg(0).to_number()))); if ( fn.nargs > 1 ) { xml_obj->nodeValueSet(fn.arg(1).to_string()); From MAILER-DAEMON Fri Jan 19 09:23:02 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H7udy-0008R3-8m for mharc-gnash-commit@gnu.org; Fri, 19 Jan 2007 09:23:02 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H7udw-0008Pi-TF for gnash-commit@gnu.org; Fri, 19 Jan 2007 09:23:00 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H7udv-0008O9-F7 for gnash-commit@gnu.org; Fri, 19 Jan 2007 09:23:00 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H7udv-0008O2-1w for gnash-commit@gnu.org; Fri, 19 Jan 2007 09:22:59 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H7udu-0003pO-JO for gnash-commit@gnu.org; Fri, 19 Jan 2007 09:22:58 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H7udt-0003jY-A5 for gnash-commit@gnu.org; Fri, 19 Jan 2007 14:22:57 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H7uds-0003jV-T7 for gnash-commit@gnu.org; Fri, 19 Jan 2007 14:22:57 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Fri, 19 Jan 2007 14:22:56 +0000 Subject: [Gnash-commit] gnash ChangeLog server/sprite_instance.cpp serv... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jan 2007 14:23:01 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/19 14:22:56 Modified files: . : ChangeLog server : sprite_instance.cpp sprite_instance.h testsuite/misc-ming.all: Makefile.am Added files: testsuite/misc-ming.all: attachMovieTest.c attachMovieTestRunner.cpp Log message: * server/sprite_instance.{h,cpp}: MovieClip.attachMovie() implemented. * testsuite/misc-ming.all/: Makefile.am, attachMovieTest.c, attachMovieTestRunner.cpp: testcase and runner for MovieClip.attachMovie(). CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2140&r2=1.2141 http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.126&r2=1.127 http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.h?cvsroot=gnash&r1=1.56&r2=1.57 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/Makefile.am?cvsroot=gnash&r1=1.51&r2=1.52 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/attachMovieTest.c?cvsroot=gnash&rev=1.1 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/attachMovieTestRunner.cpp?cvsroot=gnash&rev=1.1 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2140 retrieving revision 1.2141 diff -u -b -r1.2140 -r1.2141 --- ChangeLog 19 Jan 2007 13:10:11 -0000 1.2140 +++ ChangeLog 19 Jan 2007 14:22:56 -0000 1.2141 @@ -1,5 +1,12 @@ 2007-01-19 Sandro Santilli + * server/sprite_instance.{h,cpp}: MovieClip.attachMovie() implemented. + * testsuite/misc-ming.all/: Makefile.am, attachMovieTest.c, + attachMovieTestRunner.cpp: testcase and runner for + MovieClip.attachMovie(). + +2007-01-19 Sandro Santilli + * server/asobj/xmlnode.cpp (xmlnode_new): cast double to int before casting to an enum [ fix for gcc-3.3.5 ] * server/sprite_instance.cpp: cleanups, including use Index: server/sprite_instance.cpp =================================================================== RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v retrieving revision 1.126 retrieving revision 1.127 diff -u -b -r1.126 -r1.127 --- server/sprite_instance.cpp 19 Jan 2007 10:54:15 -0000 1.126 +++ server/sprite_instance.cpp 19 Jan 2007 14:22:56 -0000 1.127 @@ -177,19 +177,31 @@ } std::string newname = fn.arg(1).to_std_string(); - //int depth_val = int(fn.arg(2).to_number()); - if (fn.nargs > 3 ) - { - //as_object* initObject = fn.arg(3).to_object(); - //if ( initObject ) newch->copyProperties(*initObject); + // should we support negative depths ? + uint16_t depth_val = uint16_t(fn.arg(2).to_number()); + + boost::intrusive_ptr newch = exported_movie->create_character_instance(sprite, depth_val); + assert( dynamic_cast(newch.get()) ); + + if (fn.nargs > 3 ) { + as_object* initObject = fn.arg(3).to_object(); + newch->copyProperties(*initObject); } - log_error("MovieClip.attachMovie() unimplemented -- " - "returning undefined"); + + if (sprite->attachCharacter(*newch, depth_val, newname) ) + { + fn.result->set_as_object(newch.get()); + } + else + { fn.result->set_undefined(); - //fn.result->set_as_object(newch); - return; + } + + log_warning("MovieClip.attachMovie(%s, %d, %s) TESTING", + id_name.c_str(), depth_val, newname.c_str()); + } // attachAudio(id:Object) : Void @@ -2327,6 +2339,23 @@ m_display_list.swap_characters(ch1, ch2); } +bool +sprite_instance::attachCharacter(character& newch, uint16_t depth, std::string& name) +{ + newch.set_name(name.c_str()); + + // place_character() will set depth on newch + m_display_list.place_character( + &newch, + depth, + cxform(), + matrix(), + 1.0, + 0); + + return true; // FIXME: check return from place_character above ? +} + character* sprite_instance::add_display_object( uint16_t character_id, Index: server/sprite_instance.h =================================================================== RCS file: /sources/gnash/gnash/server/sprite_instance.h,v retrieving revision 1.56 retrieving revision 1.57 diff -u -b -r1.56 -r1.57 --- server/sprite_instance.h 18 Jan 2007 22:53:21 -0000 1.56 +++ server/sprite_instance.h 19 Jan 2007 14:22:56 -0000 1.57 @@ -17,7 +17,7 @@ // // -/* $Id: sprite_instance.h,v 1.56 2007/01/18 22:53:21 strk Exp $ */ +/* $Id: sprite_instance.h,v 1.57 2007/01/19 14:22:56 strk Exp $ */ // Stateful live Sprite instance @@ -352,6 +352,23 @@ float ratio, uint16_t clip_depth); + /// Attach the given character instance to current display list + // + /// @param newch + /// The character instance to attach. + /// + /// @param depth + /// The depth to assign to the instance. + /// + /// @param name + /// The name to assign to the instance. + /// + /// @return true on success, false on failure + /// FIXME: currently never returns false ! + /// + bool attachCharacter(character& newch, uint16_t depth, + std::string& name); + /// Updates the transform properties of the object at /// the specified depth. Index: testsuite/misc-ming.all/Makefile.am =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/Makefile.am,v retrieving revision 1.51 retrieving revision 1.52 diff -u -b -r1.51 -r1.52 --- testsuite/misc-ming.all/Makefile.am 12 Jan 2007 11:34:33 -0000 1.51 +++ testsuite/misc-ming.all/Makefile.am 19 Jan 2007 14:22:56 -0000 1.52 @@ -66,6 +66,8 @@ place_object_test \ place_and_remove_object_test \ place_and_remove_object_insane_test \ + attachMovieTest \ + attachMovieTestRunner \ $(NULL) check_SCRIPTS = \ @@ -241,6 +243,30 @@ sh $< -r5 $(top_builddir) place_and_remove_object_insane_test.swf > $@ chmod 755 $@ +attachMovieTest_SOURCES = \ + attachMovieTest.c \ + ming_utils.h \ + ming_utils.c \ + $(NULL) +attachMovieTest_LDADD = $(MING_LIBS) + +attachMovieTest.swf: attachMovieTest + ./attachMovieTest $(top_srcdir)/testsuite/media + +attachMovieTestRunner_SOURCES = \ + attachMovieTestRunner.cpp \ + $(NULL) +attachMovieTestRunner_LDADD = \ + $(top_builddir)/testsuite/libtestsuite.la \ + $(NULL) +attachMovieTestRunner_CXXFLAGS = \ + -DSRCDIR='"$(srcdir)"' \ + $(NULL) +attachMovieTestRunner_DEPENDENCIES = \ + attachMovieTest.swf \ + $(top_builddir)/testsuite/libtestsuite.la \ + $(NULL) + spritehier.swf: spritehier ./spritehier @@ -320,6 +346,7 @@ place_object_testrunner \ place_and_remove_object_testrunner \ place_and_remove_object_insane_testrunner \ + attachMovieTestRunner \ $(NULL) Index: testsuite/misc-ming.all/attachMovieTest.c =================================================================== RCS file: testsuite/misc-ming.all/attachMovieTest.c diff -N testsuite/misc-ming.all/attachMovieTest.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ testsuite/misc-ming.all/attachMovieTest.c 19 Jan 2007 14:22:56 -0000 1.1 @@ -0,0 +1,145 @@ +/* + * Copyright (C) 2005, 2006 Free Software Foundation, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + * + */ + +/* + * Test MovieClip.attachMovie(). + * + * Exports a 'redsquare' symbol and then attach it to main timeline 4 times + * at depths 70+[0..3] and with xoffset 70*[0..3] + * + * run as ./attachMovieTest + */ + +#include +#include +#include + +#include "ming_utils.h" + +#define OUTPUT_VERSION 6 +#define OUTPUT_FILENAME "attachMovieTest.swf" + +void +addRedSquareExport(SWFMovie mo) +{ + SWFShape sh; + SWFMovieClip mc; + + sh = make_fill_square (0, 300, 60, 60, 255, 0, 0, 255, 0, 0); + mc = newSWFMovieClip(); + + SWFMovieClip_add(mc, (SWFBlock)sh); + SWFMovieClip_nextFrame(mc); + + SWFMovie_addExport(mo, (SWFBlock)mc, "redsquare"); + + SWFMovie_writeExports(mo); +} + +int +main(int argc, char** argv) +{ + SWFMovie mo; + SWFMovieClip exportedClip; + const char *srcdir="."; + SWFFont bfont; + + + /********************************************* + * + * Initialization + * + *********************************************/ + + if ( argc>1 ) srcdir=argv[1]; + else + { + fprintf(stderr, "Usage: %s\n", argv[0]); + return 1; + } + + puts("Setting things up"); + + Ming_init(); + Ming_useSWFVersion (OUTPUT_VERSION); + Ming_setScale(20.0); /* let's talk pixels */ + + mo = newSWFMovie(); + SWFMovie_setRate(mo, 12); + //SWFMovie_setDimension(mo, 6400, 4000); + SWFMovie_setDimension(mo, 640, 400); + + /********************************************* + * + * Body + * + *********************************************/ + + addRedSquareExport(mo); + /* it seems we need a SHOWFRAME for this to be effective */ + /* (maybe it's related to loop-back handling ?) */ + SWFMovie_nextFrame(mo); + + add_actions(mo, + "attachMovie('redsquare', 'square'+counter, 70+counter);" + "this['square'+counter]._x = 70*counter;" + "counter++;" + ); + + SWFMovie_nextFrame(mo); /* showFrame */ + + add_actions(mo, + "attachMovie('redsquare', 'square'+counter, 70+counter);" + "this['square'+counter]._x = 70*counter;" + "counter++;" + ); + + SWFMovie_nextFrame(mo); /* showFrame */ + + add_actions(mo, + "attachMovie('redsquare', 'square'+counter, 70+counter);" + "this['square'+counter]._x = 70*counter;" + "counter++;" + ); + + SWFMovie_nextFrame(mo); /* showFrame */ + + add_actions(mo, + "attachMovie('redsquare', 'square'+counter, 70+counter);" + "this['square'+counter]._x = 70*counter;" + "counter++;" + ); + + add_actions(mo, "stop();"); + + SWFMovie_nextFrame(mo); /* showFrame */ + + + /***************************************************** + * + * Output movie + * + *****************************************************/ + + puts("Saving " OUTPUT_FILENAME ); + + SWFMovie_save(mo, OUTPUT_FILENAME); + + return 0; +} Index: testsuite/misc-ming.all/attachMovieTestRunner.cpp =================================================================== RCS file: testsuite/misc-ming.all/attachMovieTestRunner.cpp diff -N testsuite/misc-ming.all/attachMovieTestRunner.cpp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ testsuite/misc-ming.all/attachMovieTestRunner.cpp 19 Jan 2007 14:22:56 -0000 1.1 @@ -0,0 +1,85 @@ +/* + * Copyright (C) 2005, 2006 Free Software Foundation, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + * + */ + +#define INPUT_FILENAME "attachMovieTest.swf" + +#include "MovieTester.h" +#include "sprite_instance.h" +#include "character.h" +#include "dlist.h" +#include "container.h" +#include "log.h" + +#include "check.h" +#include +#include + +using namespace gnash; +using namespace std; + +int +main(int /*argc*/, char** /*argv*/) +{ + string filename = INPUT_FILENAME; + MovieTester tester(filename); + + gnash::LogFile& dbglogfile = gnash::LogFile::getDefaultInstance(); + dbglogfile.setVerbosity(1); + + sprite_instance* root = tester.getRootMovie(); + assert(root); + + check_equals(root->get_frame_count(), 5); + check_equals(root->get_play_state(), sprite_instance::PLAY); + check_equals(root->get_current_frame(), 0); + + check(! tester.findDisplayItemByDepth(*root, 70) ); + check(! tester.findDisplayItemByDepth(*root, 71) ); + check(! tester.findDisplayItemByDepth(*root, 72) ); + check(! tester.findDisplayItemByDepth(*root, 73) ); + + tester.advance(); + + check( tester.findDisplayItemByDepth(*root, 70) ); + check(! tester.findDisplayItemByDepth(*root, 71) ); + check(! tester.findDisplayItemByDepth(*root, 72) ); + check(! tester.findDisplayItemByDepth(*root, 73) ); + + tester.advance(); + + check( tester.findDisplayItemByDepth(*root, 70) ); + check( tester.findDisplayItemByDepth(*root, 71) ); + check(! tester.findDisplayItemByDepth(*root, 72) ); + check(! tester.findDisplayItemByDepth(*root, 73) ); + + tester.advance(); + + check( tester.findDisplayItemByDepth(*root, 70) ); + check( tester.findDisplayItemByDepth(*root, 71) ); + check( tester.findDisplayItemByDepth(*root, 72) ); + check(! tester.findDisplayItemByDepth(*root, 73) ); + + tester.advance(); + + check( tester.findDisplayItemByDepth(*root, 70) ); + check( tester.findDisplayItemByDepth(*root, 71) ); + check( tester.findDisplayItemByDepth(*root, 72) ); + check( tester.findDisplayItemByDepth(*root, 73) ); +} + From MAILER-DAEMON Fri Jan 19 10:07:30 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H7vL0-0001Tp-JK for mharc-gnash-commit@gnu.org; Fri, 19 Jan 2007 10:07:30 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H7vKy-0001Tj-Rk for gnash-commit@gnu.org; Fri, 19 Jan 2007 10:07:28 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H7vKx-0001TP-8D for gnash-commit@gnu.org; Fri, 19 Jan 2007 10:07:27 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H7vKx-0001TM-3D for gnash-commit@gnu.org; Fri, 19 Jan 2007 10:07:27 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H7vKw-00058k-Nv for gnash-commit@gnu.org; Fri, 19 Jan 2007 10:07:26 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H7vKv-00065j-Jk for gnash-commit@gnu.org; Fri, 19 Jan 2007 15:07:25 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H7vKv-00065g-EC for gnash-commit@gnu.org; Fri, 19 Jan 2007 15:07:25 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Fri, 19 Jan 2007 15:07:25 +0000 Subject: [Gnash-commit] gnash/testsuite/misc-ming.all attachMovieTest.c X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jan 2007 15:07:29 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/19 15:07:25 Modified files: testsuite/misc-ming.all: attachMovieTest.c Log message: Added a note about another example of loop-back related failures. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/attachMovieTest.c?cvsroot=gnash&r1=1.1&r2=1.2 Patches: Index: attachMovieTest.c =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/attachMovieTest.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -b -r1.1 -r1.2 --- attachMovieTest.c 19 Jan 2007 14:22:56 -0000 1.1 +++ attachMovieTest.c 19 Jan 2007 15:07:25 -0000 1.2 @@ -96,6 +96,39 @@ /* (maybe it's related to loop-back handling ?) */ SWFMovie_nextFrame(mo); + /*********************************************************************** + * NOTE: + * + * The following snippet was initially implemented in a *single* frame + * (the second one, with first only contained the EXPORTASSET tag). + * The code went something like this: + * + * if ( counter < 4 ) + * { + * attachMovie('redsquare', 'square'+counter, 70+counter); + * this['square'+counter]._x = 70*counter; + * counter++; + * } + * else + * { + * stop(); + * } + * + * The problem with the above was that Gnash failed due to loop-back + * problems. + * The "expected" behaviour with the above code is exactly the same + * with the current one (ie: number of squares increment up to 4) but + * Gnash fails in that it resets the DisplayList to the one generated + * after first execution of first frame tags (an empty DisplayList) + * at each restart. + * + * Since we have separate testcases for loop-backs I've preferred + * to keep this one focused on MovieClip.attachMovie. + * + * --strk 2007-01-19 + * + ***********************************************************************/ + add_actions(mo, "attachMovie('redsquare', 'square'+counter, 70+counter);" "this['square'+counter]._x = 70*counter;" From MAILER-DAEMON Fri Jan 19 10:46:56 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H7vxA-0007M0-4s for mharc-gnash-commit@gnu.org; Fri, 19 Jan 2007 10:46:56 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H7vx8-0007I4-Pm for gnash-commit@gnu.org; Fri, 19 Jan 2007 10:46:54 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H7vx7-0007F4-5R for gnash-commit@gnu.org; Fri, 19 Jan 2007 10:46:54 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H7vx6-0007ET-Sf for gnash-commit@gnu.org; Fri, 19 Jan 2007 10:46:52 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H7vx6-0004of-Hc for gnash-commit@gnu.org; Fri, 19 Jan 2007 10:46:52 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H7vx5-0008CF-Es for gnash-commit@gnu.org; Fri, 19 Jan 2007 15:46:51 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H7vx5-0008CC-36 for gnash-commit@gnu.org; Fri, 19 Jan 2007 15:46:51 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Fri, 19 Jan 2007 15:46:51 +0000 Subject: [Gnash-commit] gnash ChangeLog server/asobj/xmlnode.cpp X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jan 2007 15:46:55 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/19 15:46:51 Modified files: . : ChangeLog server/asobj : xmlnode.cpp Log message: * server/asobj/xmlnode.cpp (attachXMLNodeInterface): add_property -> init_property. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2141&r2=1.2142 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/xmlnode.cpp?cvsroot=gnash&r1=1.7&r2=1.8 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2141 retrieving revision 1.2142 diff -u -b -r1.2141 -r1.2142 --- ChangeLog 19 Jan 2007 14:22:56 -0000 1.2141 +++ ChangeLog 19 Jan 2007 15:46:50 -0000 1.2142 @@ -1,5 +1,7 @@ 2007-01-19 Sandro Santilli + * server/asobj/xmlnode.cpp (attachXMLNodeInterface): + add_property -> init_property. * server/sprite_instance.{h,cpp}: MovieClip.attachMovie() implemented. * testsuite/misc-ming.all/: Makefile.am, attachMovieTest.c, attachMovieTestRunner.cpp: testcase and runner for Index: server/asobj/xmlnode.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/xmlnode.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -b -r1.7 -r1.8 --- server/asobj/xmlnode.cpp 19 Jan 2007 13:10:11 -0000 1.7 +++ server/asobj/xmlnode.cpp 19 Jan 2007 15:46:50 -0000 1.8 @@ -18,7 +18,7 @@ // // -/* $Id: xmlnode.cpp,v 1.7 2007/01/19 13:10:11 strk Exp $ */ +/* $Id: xmlnode.cpp,v 1.8 2007/01/19 15:46:50 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -322,7 +322,7 @@ boost::intrusive_ptr gettersetter; gettersetter = new builtin_function(&xmlnode_nodevalue, NULL); - o.add_property("nodeValue", *gettersetter, *gettersetter); + o.init_property("nodeValue", *gettersetter, *gettersetter); gettersetter = new builtin_function(&xmlnode_nodename, NULL); o.init_property("nodeName", *gettersetter, *gettersetter); From MAILER-DAEMON Sun Jan 21 17:41:10 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H8lN8-0004iX-8c for mharc-gnash-commit@gnu.org; Sun, 21 Jan 2007 17:41:10 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H8lN5-0004hV-E8 for gnash-commit@gnu.org; Sun, 21 Jan 2007 17:41:07 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H8lN3-0004gm-Sy for gnash-commit@gnu.org; Sun, 21 Jan 2007 17:41:07 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H8lN3-0004gj-PA for gnash-commit@gnu.org; Sun, 21 Jan 2007 17:41:05 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H8lN2-000589-Px for gnash-commit@gnu.org; Sun, 21 Jan 2007 17:41:05 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H8lN1-0001XK-KZ for gnash-commit@gnu.org; Sun, 21 Jan 2007 22:41:03 +0000 Received: from rsavoye by savannah.gnu.org with local (Exim 4.50) id 1H8lN1-0001XH-8e for gnash-commit@gnu.org; Sun, 21 Jan 2007 22:41:03 +0000 To: gnash-commit@gnu.org Message-Id: From: Rob Savoye Date: Sun, 21 Jan 2007 22:41:03 +0000 Subject: [Gnash-commit] gnash Makefile.am NEWS README configure.ac doc/... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jan 2007 22:41:07 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Rob Savoye 07/01/21 22:41:03 Modified files: . : Makefile.am NEWS README configure.ac doc/C : sources.xml gui : Makefile.am libamf : Makefile.am plugin/klash : Makefile.am utilities : Makefile.am macros : curl.m4 glib.m4 gtk2.m4 incllist libXML.m4 libslist ming.m4 pthreads.m4 sdl.m4 Log message: A pile of cross configuration patches for ARM-linux and OLPC. * Makefile.am: Organize the output of dumpconfig somewhat. Make some lines optional based on the configuration to save space. * NEWS: Add that cross compiling is now supported. * README: Mention trying cvs Head befor bug reporting. * configure.ac: Check for the build and host systems. We don't have to hack cross_compile. it works correctly now. Use $host_alias instead $target_alias for the directory search paths. Look for PNG, OLPC needs it. Define a restricted path for cross configuring and export it for the other m4 scripts. * doc/C/sources.xml: Clarify cross configuring based on current technique. * gui/Makefile.am: PTHREAD_LIBS must be after BOOST_LIBS. * libamf/Makefile.am: Remove unused libraries from LDFLAGS. * macros/curl.m4: Only look for curl-config in the pathlist variable. * macros/glib.m4: Look for glibconfig.h in the right place. * macros/gtk2.m4: Add -lgobject and -lgmodule for cross compiling. * macros/incllist, libslist: Look in $host_alias, not $target_alias. * macros/libXML.m4: Only look for xml2-config in the pathlist variable. * macros/ming.m4: Only look for ming-config in the pathlist variable. * macros/pthreads.m4: Use correct comment syntax. Also look for pthread.h and libpthread so we cross configure correctly. * macros/sdl.m4: Only look for sdl-config in the pathlist variable. * plugin/klash/Makefile.am: Don't build klash here anymore. * utilities/Makefile.am: Link in XML2 libs. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/Makefile.am?cvsroot=gnash&r1=1.58&r2=1.59 http://cvs.savannah.gnu.org/viewcvs/gnash/NEWS?cvsroot=gnash&r1=1.2&r2=1.3 http://cvs.savannah.gnu.org/viewcvs/gnash/README?cvsroot=gnash&r1=1.23&r2=1.24 http://cvs.savannah.gnu.org/viewcvs/gnash/configure.ac?cvsroot=gnash&r1=1.235&r2=1.236 http://cvs.savannah.gnu.org/viewcvs/gnash/doc/C/sources.xml?cvsroot=gnash&r1=1.25&r2=1.26 http://cvs.savannah.gnu.org/viewcvs/gnash/gui/Makefile.am?cvsroot=gnash&r1=1.57&r2=1.58 http://cvs.savannah.gnu.org/viewcvs/gnash/libamf/Makefile.am?cvsroot=gnash&r1=1.19&r2=1.20 http://cvs.savannah.gnu.org/viewcvs/gnash/plugin/klash/Makefile.am?cvsroot=gnash&r1=1.22&r2=1.23 http://cvs.savannah.gnu.org/viewcvs/gnash/utilities/Makefile.am?cvsroot=gnash&r1=1.45&r2=1.46 http://cvs.savannah.gnu.org/viewcvs/gnash/macros/curl.m4?cvsroot=gnash&r1=1.12&r2=1.13 http://cvs.savannah.gnu.org/viewcvs/gnash/macros/glib.m4?cvsroot=gnash&r1=1.24&r2=1.25 http://cvs.savannah.gnu.org/viewcvs/gnash/macros/gtk2.m4?cvsroot=gnash&r1=1.38&r2=1.39 http://cvs.savannah.gnu.org/viewcvs/gnash/macros/incllist?cvsroot=gnash&r1=1.1&r2=1.2 http://cvs.savannah.gnu.org/viewcvs/gnash/macros/libXML.m4?cvsroot=gnash&r1=1.27&r2=1.28 http://cvs.savannah.gnu.org/viewcvs/gnash/macros/libslist?cvsroot=gnash&r1=1.1&r2=1.2 http://cvs.savannah.gnu.org/viewcvs/gnash/macros/ming.m4?cvsroot=gnash&r1=1.11&r2=1.12 http://cvs.savannah.gnu.org/viewcvs/gnash/macros/pthreads.m4?cvsroot=gnash&r1=1.21&r2=1.22 http://cvs.savannah.gnu.org/viewcvs/gnash/macros/sdl.m4?cvsroot=gnash&r1=1.37&r2=1.38 Patches: Index: Makefile.am =================================================================== RCS file: /sources/gnash/gnash/Makefile.am,v retrieving revision 1.58 retrieving revision 1.59 diff -u -b -r1.58 -r1.59 --- Makefile.am 16 Jan 2007 14:02:45 -0000 1.58 +++ Makefile.am 21 Jan 2007 22:41:02 -0000 1.59 @@ -15,7 +15,7 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -# $Id: Makefile.am,v 1.58 2007/01/16 14:02:45 bjacques Exp $ +# $Id: Makefile.am,v 1.59 2007/01/21 22:41:02 rsavoye Exp $ ## Process this file with automake to produce Makefile.in AUTOMAKE_OPTIONS = 1.6.0 @@ -134,73 +134,99 @@ endif dumpconfig: + @echo "" + @echo "Building in directories: $(SUBDIRS)" + @echo "Some directories may be excluded from the build" @uname -a $(CXX) -v + @echo "" + @echo "Image decoding support..." + @echo " JPEG_CFLAGS is $(JPEG_CFLAGS)" + @echo " JPEG_LIBS is $(JPEG_LIBS)" + @echo " PNG_CFLAGS is $(PNG_CFLAGS)" + @echo " PNG_LIBS is $(PNG_LIBS)" + @echo "Audio decoding support..." +if USE_SOUND_GST + @echo " GSTREAMER_CFLAGS is $(GSTREAMER_CFLAGS)" + @echo " GSTREAMER_LIBS is $(GSTREAMER_LIBS)" +endif +if USE_FFMPEG_ENGINE + @echo " FFMPEG_CFLAGS is $(FFMPEG_CFLAGS)" + @echo " FFMPEG_LIBS is $(FFMPEG_LIBS)" + @echo " OGG_CFLAGS is $(OGG_CFLAGS)" + @echo " OGG_LIBS is $(OGG_LIBS)" +endif + @echo "GUI Toolkit decoding support..." + @echo " SDL_CFLAGS is $(SDL_CFLAGS)" + @echo " SDL_LIBS is $(SDL_LIBS)" +if USE_GUI_KDE + @echo " KDE_CFLAGS is $(KDE_CFLAGS)" + @echo " KDE_LIBS is $(KDE_LIBS)" +endif +if USE_GUI_FLTK + @echo " FLTK2_CFLAGS is $(FLTK2_CFLAGS)" + @echo " FLTK2_LIBS is $(FLTK2_LIBS)" +endif +if USE_GUI_GTK + @echo " GTK2_CFLAGS is $(GTK2_CFLAGS)" + @echo " GTK2_LIBS is $(GTK2_LIBS)" + @echo " XFT_CFLAGS is $(XFT_CFLAGS)" + @echo " XFT_LIBS is $(XFT_LIBS)" + @echo " PANGO_CFLAGS is $(PANGO_CFLAGS)" + @echo " PANGO_LIBS is $(PANGO_LIBS)" + @echo " ATK_CFLAGS is $(ATK_CFLAGS)" + @echo " ATK_LIBS is $(ATK_LIBS)" +endif + @echo " X11_CFLAGS is $(X11_CFLAGS)" + @echo " X11_LIBS is $(X11_LIBS)" + @echo "Support libraries..." + @echo " INCLTDL $(INCLTDL) " + @echo " LIBLTDL $(LIBLTDL) " + @echo " GLIB_CFLAGS is $(GLIB_CFLAGS)" + @echo " GLIB_LIBS is $(GLIB_LIBS)" + @echo " Z_CFLAGS is $(Z_CFLAGS)" + @echo " Z_LIBS is $(Z_LIBS)" + @echo " LIBXML_CFLAGS is $(LIBXML_CFLAGS)" + @echo " LIBXML_LIBS is $(LIBXML_LIBS)" +if HAVE_DMALLOC + @echo " DMALLOC_CFLAGS is $(DMALLOC_CFLAGS)" + @echo " DMALLOC_LIBS is $(DMALLOC_LIBS)" +endif +if EXTENSIONS @echo "MYSQL_CFLAGS is $(MYSQL_CFLAGS)" @echo "MYSQL_LIBS is $(MYSQL_LIBS)" - @echo "JPEG_CFLAGS is $(JPEG_CFLAGS)" - @echo "JPEG_LIBS is $(JPEG_LIBS)" - @echo "PNG_CFLAGS is $(PNG_CFLAGS)" - @echo "PNG_LIBS is $(PNG_LIBS)" - @echo "OGG_CFLAGS is $(OGG_CFLAGS)" - @echo "OGG_LIBS is $(OGG_LIBS)" - @echo "Z_CFLAGS is $(Z_CFLAGS)" - @echo "Z_LIBS is $(Z_LIBS)" - @echo "LIBXML_CFLAGS is $(LIBXML_CFLAGS)" - @echo "LIBXML_LIBS is $(LIBXML_LIBS)" - @echo "SDL_CFLAGS is $(SDL_CFLAGS)" - @echo "SDL_LIBS is $(SDL_LIBS)" - @echo "OPENGL_CFLAGS is $(OPENGL_CFLAGS)" - @echo "OPENGL_LIBS is $(OPENGL_LIBS)" - @echo "GLEXT_CFLAGS is $(GLEXT_CFLAGS)" - @echo "GLEXT_LIBS is $(GLEXT_LIBS)" - @echo "GTK2_CFLAGS is $(GTK2_CFLAGS)" - @echo "GTK2_LIBS is $(GTK2_LIBS)" - @echo "FLTK2_CFLAGS is $(FLTK2_CFLAGS)" - @echo "FLTK2_LIBS is $(FLTK2_LIBS)" - @echo "XFT_CFLAGS is $(XFT_CFLAGS)" - @echo "XFT_LIBS is $(XFT_LIBS)" - @echo "PANGO_CFLAGS is $(PANGO_CFLAGS)" - @echo "PANGO_LIBS is $(PANGO_LIBS)" - @echo "ATK_CFLAGS is $(ATK_CFLAGS)" - @echo "ATK_LIBS is $(ATK_LIBS)" - @echo "GLIB_CFLAGS is $(GLIB_CFLAGS)" - @echo "GLIB_LIBS is $(GLIB_LIBS)" - @echo "X_CFLAGS is $(X_CFLAGS)" - @echo "X_LIBS is $(X_LIBS)" - @echo "DMALLOC_CFLAGS is $(DMALLOC_CFLAGS)" - @echo "DMALLOC_LIBS is $(DMALLOC_LIBS)" - @echo "MAD_CFLAGS is $(MAD_CFLAGS)" - @echo "MAD_LIBS is $(MAD_LIBS)" - @echo "PTHREAD_CFLAGS is $(PTHREAD_CFLAGS)" - @echo "PTHREAD_LIBS is $(PTHREAD_LIBS)" - @echo "CURL_CFLAGS is $(CURL_CFLAGS)" - @echo "CURL_LIBS is $(CURL_LIBS)" - @echo "GSTREAMER_CFLAGS is $(GSTREAMER_CFLAGS)" - @echo "GSTREAMER_LIBS is $(GSTREAMER_LIBS)" - @echo "FFMPEG_CFLAGS is $(FFMPEG_CFLAGS)" - @echo "FFMPEG_LIBS is $(FFMPEG_LIBS)" - @echo "KDE_CFLAGS is $(KDE_CFLAGS)" - @echo "KDE_LIBS is $(KDE_LIBS)" - @echo "CAIRO_CFLAGS is $(CAIRO_CFLAGS)" - @echo "CAIRO_LIBS is $(CAIRO_LIBS)" - @echo "BOOST_CFLAGS is $(BOOST_CFLAGS)" - @echo "BOOST_LIBS is $(BOOST_LIBS)" - @echo "AGG_CFLAGS is $(AGG_CFLAGS)" - @echo "AGG_LIBS is $(AGG_LIBS)" - @echo "INCLTDL $(INCLTDL) " - @echo "LIBLTDL $(LIBLTDL) " - @echo "MING_VERSION_CODE $(MING_VERSION_CODE) " - @echo "MING_LIBS $(MING_LIBS) " - @echo "MING_CFLAGS $(MING_CFLAGS) " - @echo "MAKESWF $(MAKESWF) " +endif +if USE_MAD_ENGINE + @echo " MAD_CFLAGS is $(MAD_CFLAGS)" + @echo " MAD_LIBS is $(MAD_LIBS)" +endif + @echo " PTHREAD_CFLAGS is $(PTHREAD_CFLAGS)" + @echo " PTHREAD_LIBS is $(PTHREAD_LIBS)" + @echo " CURL_CFLAGS is $(CURL_CFLAGS)" + @echo " CURL_LIBS is $(CURL_LIBS)" + @echo " BOOST_CFLAGS is $(BOOST_CFLAGS)" + @echo " BOOST_LIBS is $(BOOST_LIBS)" + @echo " MING_VERSION_CODE $(MING_VERSION_CODE) " + @echo " MING_LIBS $(MING_LIBS) " + @echo " MING_CFLAGS $(MING_CFLAGS) " + @echo " MAKESWF $(MAKESWF) " + @echo "Graphics support..." + @echo " CAIRO_CFLAGS is $(CAIRO_CFLAGS)" + @echo " CAIRO_LIBS is $(CAIRO_LIBS)" +if USE_RENDERER_OPENGL + @echo " GLEXT_CFLAGS is $(GLEXT_CFLAGS)" + @echo " GLEXT_LIBS is $(GLEXT_LIBS)" + @echo " OPENGL_CFLAGS is $(OPENGL_CFLAGS)" + @echo " OPENGL_LIBS is $(OPENGL_LIBS)" +endif +if USE_RENDERER_AGG + @echo " AGG_CFLAGS is $(AGG_CFLAGS)" + @echo " AGG_LIBS is $(AGG_LIBS)" +endif @echo "A blank value for CFLAGS means the header is installed in the" @echo "default system header location. All the LIBS should have a" @echo "legit value" @echo "" - @echo "Building in directories: $(SUBDIRS)" - @echo "Some directories may be excluded from the build" - @echo "" @echo "Configurable options are:" @echo "Sound handler: $(SOUND_OPT)" @echo "MP3 decoder: $(ENGINE_OPT)" Index: NEWS =================================================================== RCS file: /sources/gnash/gnash/NEWS,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- NEWS 22 Oct 2006 01:00:54 -0000 1.2 +++ NEWS 21 Jan 2007 22:41:02 -0000 1.3 @@ -12,6 +12,7 @@ is loading. * New AntiGrain (AGG) 2D backend added for framebuffer devices. * Sound now works. +* Supports cross configuration and cross compiling for embedded targets. * A whole slew of minor bugs that kept various movies from playing. 2006-04-20 Rob Savoye Index: README =================================================================== RCS file: /sources/gnash/gnash/README,v retrieving revision 1.23 retrieving revision 1.24 diff -u -b -r1.23 -r1.24 --- README 14 Oct 2006 15:28:08 -0000 1.23 +++ README 21 Jan 2007 22:41:02 -0000 1.24 @@ -1,4 +1,4 @@ -$Id: README,v 1.23 2006/10/14 15:28:08 rsavoye Exp $ +$Id: README,v 1.24 2007/01/21 22:41:02 rsavoye Exp $ Gnash: the GNU Flash Player @@ -173,4 +173,6 @@ complete a report as possible at https://savannah.gnu.org/bugs/?group=gnash. Please include the operating system name and version, and which gnash version you are -using, in your bug reports. +using, in your bug reports. Please try to reproduce your bug reports +with Gnash cvs HEAD, as bugs are fixed there that may be broken in a +standard release. Index: configure.ac =================================================================== RCS file: /sources/gnash/gnash/configure.ac,v retrieving revision 1.235 retrieving revision 1.236 diff -u -b -r1.235 -r1.236 --- configure.ac 17 Jan 2007 11:21:58 -0000 1.235 +++ configure.ac 21 Jan 2007 22:41:02 -0000 1.236 @@ -15,7 +15,7 @@ dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA dnl -dnl $Id: configure.ac,v 1.235 2007/01/17 11:21:58 strk Exp $ +dnl $Id: configure.ac,v 1.236 2007/01/21 22:41:02 rsavoye Exp $ AC_PREREQ(2.50) AC_INIT(gnash, cvs) @@ -24,7 +24,9 @@ AM_CONFIG_HEADER(config.h) AC_CONFIG_SUBDIRS(libltdl) -AC_CANONICAL_TARGET +dnl AC_CANONICAL_TARGET +AC_CANONICAL_BUILD +AC_CANONICAL_HOST dnl Some things you can only do by looking at the platform name. case "${host}" in @@ -279,11 +281,6 @@ AC_PROG_INSTALL AM_COMPILER_LIB -dnl autoconf doesn't always get whether we're cross compiling or not, -dnl so we try to figure this out on out own. -if test ${host} != ${target} ; then - cross_compiling=yes -fi dnl When cross compiling, limit the search directories cause otherwise dnl we may get the host headers or libraries by accident. These values dnl are exported, so all the other configure tests in macros/*.m4 use @@ -292,12 +289,16 @@ dnl options to configure. if test x$cross_compiling = xyes; then AC_MSG_NOTICE([Configuring Gnash for cross compilation]) - export incllist="${prefix}/${target_alias}/include ${prefix}/include" - export libslist="${prefix}/${target_alias}/lib ${prefix}/lib64 ${prefix}/lib32 ${prefix}/lib" + export incllist="${prefix}/${host_alias}/include ${prefix}/include" + export libslist="${prefix}/${host_alias}/lib ${prefix}/lib64 ${prefix}/lib32 ${prefix}/lib" + export pathlist="${prefix}/${host_alias}/bin:${prefix}/bin" + LDFLAGS="${LDFLAGS} -Wl,--as-needed" + plugin=no else AC_MSG_NOTICE([Configuring Gnash for native compilation]) export incllist=`cat ${srcdir}/macros/incllist` export libslist=`cat ${srcdir}/macros/libslist` + export pathlist=$PATH fi GNASH_PKG_FIND(dmalloc, [dmalloc.h], [dmalloc], mallinfo) @@ -345,7 +346,8 @@ LIBS=$save_LIBS ;; esac -AC_PATH_XTRA +dnl AC_PATH_XTRA +GNASH_PATH_X11 AC_CHECK_HEADERS(dejagnu.h) AC_CHECK_HEADERS(malloc.h) @@ -474,8 +476,8 @@ fi AM_CONDITIONAL(ENABLE_MYSQL, [ test x"$mysql" = xyes ]) -dnl currently unused -dnl GNASH_PKG_FIND(png, [png.h], [playing oggs], ogg_sync_init) +dnl currently used by Fedora Core 6 +GNASH_PKG_FIND(png, [png.h], [decode PNG images], png_process_data) AC_PATH_MING AM_CONDITIONAL(ENABLE_MING, [ test x"$MAKESWF" != x ]) @@ -982,17 +984,17 @@ fi fi -dnl if test x"${png}" != x ; then -dnl if test x"${PNG_CFLAGS}" != x ; then -dnl echo " PNG flags are: $PNG_CFLAGS" -dnl else -dnl echo " PNG flags are: default include path" -dnl fi -dnl echo " PNG libs are: $PNG_LIBS" -dnl else -dnl echo " ERROR: No PNG library development package installed!" -dnl nogo=true -dnl fi +if test x"${png}" != x ; then + if test x"${PNG_CFLAGS}" != x ; then + echo " PNG flags are: $PNG_CFLAGS" + else + echo " PNG flags are: default include path" + fi + echo " PNG libs are: $PNG_LIBS" +else + echo " ERROR: No PNG library development package installed!" + nogo=true +fi if test x"${JPEG_LIBS}" != x ; then if test x"${JPEG_CFLAGS}" != x ; then Index: doc/C/sources.xml =================================================================== RCS file: /sources/gnash/gnash/doc/C/sources.xml,v retrieving revision 1.25 retrieving revision 1.26 diff -u -b -r1.25 -r1.26 --- doc/C/sources.xml 11 Dec 2006 11:28:46 -0000 1.25 +++ doc/C/sources.xml 21 Jan 2007 22:41:02 -0000 1.26 @@ -1231,7 +1231,7 @@ - ../gnash/configure --target=arm-unknown-linux-gnu --prefix=/usr/arm --host=arm-unknown-linux-gnu --build=i686-pc-linux-gnu --disable-plugin + ../../gnash/configure --build=i686-pc-linux-gnu --host=arm-linux --prefix=/usr/local/arm/oe --disable-plugin --enable-renderer=agg --disable-shared --with-mp3-decoder=mad @@ -1240,11 +1240,11 @@ - --target + --build - The target architecture. This is the architecture the - final executables are supposed to run on. + The build architecture. This is the architecture the + development tools we're using are supposed to run on. @@ -1253,21 +1253,7 @@ The host architecture. This is the architecture the - executables are supposed to run on. This is usually the - same as --target except when building a - compiler as a - Canadian Cross. This is when you build a cross - compiler on a Unix machine, that runs on a - win32 machine, producing code for yet - a third architecture, like the ARM. - - - - - --build - - - This is the system this build is running on. + executables are supposed to run on. Index: gui/Makefile.am =================================================================== RCS file: /sources/gnash/gnash/gui/Makefile.am,v retrieving revision 1.57 retrieving revision 1.58 diff -u -b -r1.57 -r1.58 --- gui/Makefile.am 17 Jan 2007 12:16:28 -0000 1.57 +++ gui/Makefile.am 21 Jan 2007 22:41:02 -0000 1.58 @@ -17,7 +17,7 @@ # -# $Id: Makefile.am,v 1.57 2007/01/17 12:16:28 bjacques Exp $ +# $Id: Makefile.am,v 1.58 2007/01/21 22:41:02 rsavoye Exp $ AUTOMAKE_OPTIONS = @@ -30,14 +30,10 @@ -I$(top_srcdir)/libbase \ -I$(top_srcdir)/backend \ -I$(top_srcdir)/libgeometry \ - $(PTHREAD_CFLAGS) \ $(SDL_CFLAGS) \ $(DMALLOC_CFLAGS) \ - $(BOOST_CFLAGS) -# $(PNG_CFLAGS) \ -# $(JPEG_CFLAGS) \ -# $(MP3_CFLAGS) \ -# $(OGG_CFLAGS) + $(BOOST_CFLAGS) \ + $(PTHREAD_CFLAGS) GTK_CFLAGS = \ $(GTK2_CFLAGS) \ @@ -50,16 +46,22 @@ GTK_LIBS = \ $(GTK2_LIBS) \ $(GLEXT_LIBS) \ + $(CAIRO_LIBS) \ $(PANGO_LIBS) \ $(ATK_LIBS) \ - $(GLIB_LIBS) \ - $(CAIRO_LIBS) + $(GLIB_LIBS) +# $(PNG_CFLAGS) \ +# $(JPEG_CFLAGS) \ +# $(MP3_CFLAGS) \ +# $(OGG_CFLAGS) ## WARNING: make sure GLIB_LIBS appears first ## See: http://lists.gnu.org/archive/html/gnash-dev/2006-07/msg00076.html AM_LDFLAGS = \ - $(CURL_LIBS) \ $(LIBLTDL) \ + $(CURL_LIBS) \ + $(LIBXML_LIBS) \ + $(BOOST_LIBS) \ $(PTHREAD_LIBS) \ $(NULL) Index: libamf/Makefile.am =================================================================== RCS file: /sources/gnash/gnash/libamf/Makefile.am,v retrieving revision 1.19 retrieving revision 1.20 diff -u -b -r1.19 -r1.20 --- libamf/Makefile.am 24 Nov 2006 22:33:00 -0000 1.19 +++ libamf/Makefile.am 21 Jan 2007 22:41:02 -0000 1.20 @@ -15,7 +15,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# $Id: Makefile.am,v 1.19 2006/11/24 22:33:00 strk Exp $ +# $Id: Makefile.am,v 1.20 2007/01/21 22:41:02 rsavoye Exp $ AUTOMAKE_OPTIONS = @@ -23,15 +23,7 @@ #AM_CPPFLAGS = AM_LDFLAGS = \ $(top_builddir)/libbase/libgnashbase.la \ - $(OPENGL_LIBS) \ - $(SDL_LIBS) \ - $(X_LIBS) \ - $(JPEG_LIBS) \ - $(PNG_LIBS) \ - $(LIBXML_LIBS) \ - $(DMALLOC_LIBS) \ - $(MAD_LIBS) \ - $(OGG_LIBS) + $(DMALLOC_LIBS) # AM_LDFLAGS = $(OPENGL_LIBNS) $(SDL_LIBS) Index: plugin/klash/Makefile.am =================================================================== RCS file: /sources/gnash/gnash/plugin/klash/Makefile.am,v retrieving revision 1.22 retrieving revision 1.23 diff -u -b -r1.22 -r1.23 --- plugin/klash/Makefile.am 17 Jan 2007 12:16:28 -0000 1.22 +++ plugin/klash/Makefile.am 21 Jan 2007 22:41:02 -0000 1.23 @@ -17,7 +17,7 @@ # -# $Id: Makefile.am,v 1.22 2007/01/17 12:16:28 bjacques Exp $ +# $Id: Makefile.am,v 1.23 2007/01/21 22:41:02 rsavoye Exp $ AUTOMAKE_OPTIONS = @@ -67,34 +67,34 @@ if KLASH #bin_PROGRAMS = klash -klash_SOURCES = klash.cpp -klash_CPPFLAGS = \ - -I.. \ - -I$(top_srcdir) \ - -I$(top_srcdir)/server \ - -I$(top_srcdir)/server/parser \ - -I$(top_srcdir)/server/asobj \ - -I$(top_srcdir)/server/vm \ - -I$(top_srcdir)/libbase \ - -I$(top_srcdir)/libgeometry \ - -I$(top_srcdir)/backend \ - $(LIBXML_CFLAGS) \ - $(OPENGL_CFLAGS) \ - $(KDE_CFLAGS) \ - -DUSE_KDE - -klash_LDADD = \ - $(KDE_LIBS) \ - $(OPENGL_LIBS) \ - $(LIBXML_LIBS) \ - $(PTHREAD_LIBS) \ - ../../backend/libgnashbackend.la \ - ../../server/libgnashserver.la \ - ../../server/asobj/libgnashasobjs.la \ - ../../libgeometry/libgnashgeo.la \ - ../../libbase/libgnashbase.la +# klash_SOURCES = klash.cpp +# klash_CPPFLAGS = \ +# -I.. \ +# -I$(top_srcdir) \ +# -I$(top_srcdir)/server \ +# -I$(top_srcdir)/server/parser \ +# -I$(top_srcdir)/server/asobj \ +# -I$(top_srcdir)/server/vm \ +# -I$(top_srcdir)/libbase \ +# -I$(top_srcdir)/libgeometry \ +# -I$(top_srcdir)/backend \ +# $(LIBXML_CFLAGS) \ +# $(OPENGL_CFLAGS) \ +# $(KDE_CFLAGS) \ +# -DUSE_KDE + +# klash_LDADD = \ +# $(KDE_LIBS) \ +# $(OPENGL_LIBS) \ +# $(LIBXML_LIBS) \ +# $(PTHREAD_LIBS) \ +# ../../backend/libgnashbackend.la \ +# ../../server/libgnashserver.la \ +# ../../server/asobj/libgnashasobjs.la \ +# ../../libgeometry/libgnashgeo.la \ +# ../../libbase/libgnashbase.la -klash_DEPENDENCIES = klash.moc +# klash_DEPENDENCIES = klash.moc BUILT_SOURCES = klash_part.moc klash.moc CLEANFILES = klash_part.moc klash.moc Index: utilities/Makefile.am =================================================================== RCS file: /sources/gnash/gnash/utilities/Makefile.am,v retrieving revision 1.45 retrieving revision 1.46 diff -u -b -r1.45 -r1.46 --- utilities/Makefile.am 9 Jan 2007 00:43:42 -0000 1.45 +++ utilities/Makefile.am 21 Jan 2007 22:41:02 -0000 1.46 @@ -36,6 +36,7 @@ $(LIBADD_DL) \ $(LIBLTDL) \ $(MYSQL_LIBS) \ + $(LIBXML_LIBS) \ $(BOOST_LIBS) \ $(PTHREAD_LIBS) \ $(NULL) Index: macros/curl.m4 =================================================================== RCS file: /sources/gnash/gnash/macros/curl.m4,v retrieving revision 1.12 retrieving revision 1.13 diff -u -b -r1.12 -r1.13 --- macros/curl.m4 9 Jan 2007 00:43:43 -0000 1.12 +++ macros/curl.m4 21 Jan 2007 22:41:02 -0000 1.13 @@ -14,7 +14,7 @@ dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -dnl $Id: curl.m4,v 1.12 2007/01/09 00:43:43 rsavoye Exp $ +dnl $Id: curl.m4,v 1.13 2007/01/21 22:41:02 rsavoye Exp $ AC_DEFUN([GNASH_PATH_CURL], [ @@ -31,8 +31,7 @@ ]) curlconfig="" - if test x$cross_compiling = xno; then - AC_CHECK_PROG(curlconfig, [echo], [curl-config]) + AC_CHECK_PROG(curlconfig, [echo], [curl-config], , ${pathlist}) if test x"${curlconfig}" != "x" ; then AC_MSG_CHECKING([for RTMP support]) rtmp=`${curlconfig} --protocols|grep -c RTMP` @@ -44,7 +43,6 @@ rtmp=yes fi fi - fi dnl If the path hasn't been specified, go look for it. if test x"${ac_cv_path_curl_incl}" = x; then Index: macros/glib.m4 =================================================================== RCS file: /sources/gnash/gnash/macros/glib.m4,v retrieving revision 1.24 retrieving revision 1.25 diff -u -b -r1.24 -r1.25 --- macros/glib.m4 9 Jan 2007 00:43:43 -0000 1.24 +++ macros/glib.m4 21 Jan 2007 22:41:02 -0000 1.25 @@ -14,7 +14,7 @@ dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -dnl $Id: glib.m4,v 1.24 2007/01/09 00:43:43 rsavoye Exp $ +dnl $Id: glib.m4,v 1.25 2007/01/21 22:41:02 rsavoye Exp $ AC_DEFUN([GNASH_PATH_GLIB], [ @@ -52,6 +52,10 @@ gnash_glib_version=`echo ${gnash_glib_topdir} | sed -e 's:glib-::'` ac_cv_path_glib_incl="-I$j" AC_MSG_RESULT(${ac_cv_path_glib_incl}) + gnash_glib_config=`echo $j | sed -e 's:include:lib:'` + if test -f ${gnash_glib_config}/include/glibconfig.h; then + ac_cv_path_glib_incl="${ac_cv_path_glib_incl} -I${gnash_glib_config}/include" + fi break fi done @@ -62,6 +66,7 @@ done fi + dnl Look for the library AC_ARG_WITH(glib_lib, AC_HELP_STRING([--with-glib-lib], [directory where glib library is]), with_glib_lib=${withval}) AC_CACHE_VAL(ac_cv_path_glib_lib,[ @@ -93,9 +98,6 @@ fi fi done - if test -f $i/glib-${gnash_glib_version}/include/glibconfig.h; then - ac_cv_path_glib_incl="${ac_cv_path_glib_incl} -I$i/glib-${gnash_glib_version}/include" - fi fi AC_MSG_RESULT(${ac_cv_path_glib_lib}) Index: macros/gtk2.m4 =================================================================== RCS file: /sources/gnash/gnash/macros/gtk2.m4,v retrieving revision 1.38 retrieving revision 1.39 diff -u -b -r1.38 -r1.39 --- macros/gtk2.m4 9 Jan 2007 00:43:43 -0000 1.38 +++ macros/gtk2.m4 21 Jan 2007 22:41:02 -0000 1.39 @@ -15,7 +15,7 @@ dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -dnl $Id: gtk2.m4,v 1.38 2007/01/09 00:43:43 rsavoye Exp $ +dnl $Id: gtk2.m4,v 1.39 2007/01/21 22:41:02 rsavoye Exp $ AC_DEFUN([GNASH_PATH_GTK2], [ @@ -99,10 +99,10 @@ for i in $libslist; do if test -f $i/libgtk-x11-2.0.a -o -f $i/libgtk-x11-2.0.so; then if test x"$i" != x"/usr/lib"; then - ac_cv_path_gtk2_lib="-L$i -lgtk-x11-2.0 -lgdk-x11-2.0" + ac_cv_path_gtk2_lib="-L$i -lgtk-x11-2.0 -lgdk-x11-2.0 -lgobject-2.0 -lgmodule-2.0" break else - ac_cv_path_gtk2_lib="-lgtk-x11-2.0 -lgdk-x11-2.0" + ac_cv_path_gtk2_lib="-lgtk-x11-2.0 -lgdk-x11-2.0 -lgobject-2.0 -lgmodule-2.0 " break fi fi @@ -110,7 +110,7 @@ fi if test x"${ac_cv_path_gtk2_lib}" = x; then - AC_CHECK_LIB([gtk-x11-2.0], [gtk_init], [ac_cv_path_gtk2_lib="-lgtk-x11-2.0 -lgdk-x11-2.0"]) + AC_CHECK_LIB([gtk-x11-2.0], [gtk_init], [ac_cv_path_gtk2_lib="-lgtk-x11-2.0 -lgdk-x11-2.0 -lgobject-2.0 -lgmodule-2.0"]) fi AC_MSG_RESULT($ac_cv_path_gtk2_lib) Index: macros/incllist =================================================================== RCS file: /sources/gnash/gnash/macros/incllist,v retrieving revision 1.1 retrieving revision 1.2 diff -u -b -r1.1 -r1.2 --- macros/incllist 9 Jan 2007 00:43:43 -0000 1.1 +++ macros/incllist 21 Jan 2007 22:41:03 -0000 1.2 @@ -1 +1 @@ -${prefix}/${target_alias}/include ${prefix}/include /sw/include /usr/nekoware/include /usr/freeware/include /pkg/include /opt/local/include /usr/local/include /home/latest/include /opt/include /opt/mesa/include /opt/include /usr/X11R6/include /usr/include /usr/pkg/include .. ../.. +${prefix}/${host_alias}/include ${prefix}/include /sw/include /usr/nekoware/include /usr/freeware/include /pkg/include /opt/local/include /usr/local/include /home/latest/include /opt/include /opt/mesa/include /opt/include /usr/X11R6/include /usr/include /usr/pkg/include .. ../.. Index: macros/libXML.m4 =================================================================== RCS file: /sources/gnash/gnash/macros/libXML.m4,v retrieving revision 1.27 retrieving revision 1.28 diff -u -b -r1.27 -r1.28 --- macros/libXML.m4 9 Jan 2007 00:57:58 -0000 1.27 +++ macros/libXML.m4 21 Jan 2007 22:41:03 -0000 1.28 @@ -14,7 +14,7 @@ dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -dnl $Id: libXML.m4,v 1.27 2007/01/09 00:57:58 rsavoye Exp $ +dnl $Id: libXML.m4,v 1.28 2007/01/21 22:41:03 rsavoye Exp $ AC_DEFUN([GNASH_PATH_LIBXML], [ has_xml=no @@ -30,8 +30,8 @@ fi ]) - if test x${cross_compiling} = xno; then - AC_PATH_PROG(XML2_CONFIG, xml2-config, , ,[${prefix}:${prefix}/${target_alias}:$PATH]) + if test x"${ac_cv_path_libxml_incl}" = x; then + AC_PATH_PROG(XML2_CONFIG, xml2-config, ,[${pathlist}]) if test "x$XML2_CONFIG" != "x" ; then if test "x$XML2_CFLAGS" = "x" ; then ac_cv_path_libxml_incl=`$XML2_CONFIG --cflags` Index: macros/libslist =================================================================== RCS file: /sources/gnash/gnash/macros/libslist,v retrieving revision 1.1 retrieving revision 1.2 diff -u -b -r1.1 -r1.2 --- macros/libslist 9 Jan 2007 00:43:43 -0000 1.1 +++ macros/libslist 21 Jan 2007 22:41:03 -0000 1.2 @@ -1 +1 @@ -${prefix}/${target_alias}/lib ${prefix}/lib64 ${prefix}/lib32 ${prefix}/lib /usr/lib64 /usr/lib32 /usr/nekoware/lib /usr/freeware/lib /usr/lib /sw/lib /usr/local/lib /home/latest/lib /opt/lib /pkg/lib /opt/local/lib /usr/pkg/lib /usr/X11R6/lib /usr/lib/opengl/xorg-x11/lib /usr/lib64/opengl/xorg-x11/lib /usr/lib64/opengl/xorg-x11/lib64 /opt/mesa/lib64 /opt/mesa/lib .. ../.. +${prefix}/${host_alias}/lib ${prefix}/lib64 ${prefix}/lib32 ${prefix}/lib /lib /usr/lib64 /usr/lib32 /usr/nekoware/lib /usr/freeware/lib /usr/lib /sw/lib /usr/local/lib /home/latest/lib /opt/lib /pkg/lib /opt/local/lib /usr/pkg/lib /usr/X11R6/lib /usr/lib/opengl/xorg-x11/lib /usr/lib64/opengl/xorg-x11/lib /usr/lib64/opengl/xorg-x11/lib64 /opt/mesa/lib64 /opt/mesa/lib .. ../.. Index: macros/ming.m4 =================================================================== RCS file: /sources/gnash/gnash/macros/ming.m4,v retrieving revision 1.11 retrieving revision 1.12 diff -u -b -r1.11 -r1.12 --- macros/ming.m4 17 Jan 2007 12:50:54 -0000 1.11 +++ macros/ming.m4 21 Jan 2007 22:41:03 -0000 1.12 @@ -38,7 +38,6 @@ MING_CFLAGS="" MING_LIBS="" - if test x$cross_compiling = xno; then AC_ARG_WITH(ming,[ --with-ming=[] Path to the ming-config command], [ case "${withval}" in yes|no) ;; @@ -47,7 +46,7 @@ ], MING_CONFIG="") if test x"$MING_CONFIG" = "x"; then - AC_PATH_PROG(MING_CONFIG, ming-config) + AC_PATH_PROG(MING_CONFIG, ming-config, ,[${pathlist}]) fi if test x"$MING_CONFIG" != "x"; then @@ -62,7 +61,8 @@ MING_PATH=`$MING_CONFIG --bindir` AC_PATH_PROG([MAKESWF], [makeswf], , [$MING_PATH:$PATH]) fi - else + + if test x"${MING_CFLAGS}" = x; then AC_ARG_WITH(ming_incl, AC_HELP_STRING([--with-ming-incl], [Directory where Ming header is]), with_ming_incl=${withval}) AC_CACHE_VAL(ac_cv_path_ming_incl, [ if test x"${with_ming_incl}" != x ; then Index: macros/pthreads.m4 =================================================================== RCS file: /sources/gnash/gnash/macros/pthreads.m4,v retrieving revision 1.21 retrieving revision 1.22 diff -u -b -r1.21 -r1.22 --- macros/pthreads.m4 9 Jan 2007 00:43:43 -0000 1.21 +++ macros/pthreads.m4 21 Jan 2007 22:41:03 -0000 1.22 @@ -15,7 +15,7 @@ dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA dnl Copyright (C) 2006 Steven G. Johnson . -dnl $Id: pthreads.m4,v 1.21 2007/01/09 00:43:43 rsavoye Exp $ +dnl $Id: pthreads.m4,v 1.22 2007/01/21 22:41:03 rsavoye Exp $ AC_DEFUN([GNASH_PATH_PTHREADS], [ @@ -23,14 +23,16 @@ AC_LANG_SAVE AC_LANG_C pthreads=no +PTHREAD_LIBS="" +PTHREAD_CFLAGS="" -# We used to check for pthread.h first, but this fails if pthread.h -# requires special compiler flags (e.g. on True64 or Sequent). -# It gets checked for in the link test anyway. - -# First of all, check if the user has set any of the PTHREAD_LIBS, -# etcetera environment variables, and if threads linking works using -# them: +dnl We used to check for pthread.h first, but this fails if pthread.h +dnl requires special compiler flags (e.g. on True64 or Sequent). +dnl It gets checked for in the link test anyway. + +dnl First of all, check if the user has set any of the PTHREAD_LIBS, +dnl etcetera environment variables, and if threads linking works using +dnl them: if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" @@ -47,61 +49,63 @@ CFLAGS="$save_CFLAGS" fi -# We must check for the threads library under a number of different -# names; the ordering is very important because some systems -# (e.g. DEC) have both -lpthread and -lpthreads, where one of the -# libraries is broken (non-POSIX). - -# Create a list of thread flags to try. Items starting with a "-" are -# C compiler flags, and other items are library names, except for "none" -# which indicates that we try without any flags at all, and "pthread-config" -# which is a program returning the flags for the Pth emulation library. +dnl We must check for the threads library under a number of different +dnl names; the ordering is very important because some systems +dnl (e.g. DEC) have both -lpthread and -lpthreads, where one of the +dnl libraries is broken (non-POSIX). + +dnl Create a list of thread flags to try. Items starting with a "-" are +dnl C compiler flags, and other items are library names, except for "none" +dnl which indicates that we try without any flags at all, and "pthread-config" +dnl which is a program returning the flags for the Pth emulation library. pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pth-config" -# The ordering *is* (sometimes) important. Some notes on the -# individual items follow: +dnl The ordering *is* (sometimes) important. Some notes on the +dnl individual items follow: -# pthreads: AIX (must check this before -lpthread) -# none: in case threads are in libc; should be tried before -Kthread and -# other compiler flags to prevent continual compiler warnings -# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) -# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) -# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) -# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) -# -pthreads: Solaris/gcc -# -mthreads: Mingw32/gcc, Lynx/gcc -# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it -# doesn't hurt to check since this sometimes defines pthreads too; -# also defines -D_REENTRANT) -# ... -mt is also the pthreads flag for HP/aCC -# pthread: Linux, etcetera -# --thread-safe: KAI C++ -# pth(read)-config: use pthread-config program (for GNU Pth library) +dnl pthreads: AIX (must check this before -lpthread) +dnl none: in case threads are in libc; should be tried before -Kthread and +dnl other compiler flags to prevent continual compiler warnings +dnl -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) +dnl -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) +dnl lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) +dnl -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) +dnl -pthreads: Solaris/gcc +dnl -mthreads: Mingw32/gcc, Lynx/gcc +dnl -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it +dnl doesn't hurt to check since this sometimes defines pthreads too; +dnl also defines -D_REENTRANT) +dnl ... -mt is also the pthreads flag for HP/aCC +dnl pthread: Linux, etcetera +dnl --thread-safe: KAI C++ +dnl pth(read)-config: use pthread-config program (for GNU Pth library) case "${host_cpu}-${host_os}" in + *linux*) + pthread_flags="" + ;; *solaris*) - # On Solaris (at least, for some versions), libc contains stubbed - # (non-functional) versions of the pthreads routines, so link-based - # tests will erroneously succeed. (We need to link with -pthreads/-mt/ - # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather - # a function called by this macro, so we could check for that, but - # who knows whether they'll stub that too in a future libc.) So, - # we'll just look for -pthreads and -lpthread first: + dnl On Solaris (at least, for some versions), libc contains stubbed + dnl (non-functional) versions of the pthreads routines, so link-based + dnl tests will erroneously succeed. (We need to link with -pthreads/-mt/ + dnl -lpthread.) (The stubs are missing pthread_cleanup_push, or rather + dnl a function called by this macro, so we could check for that, but + dnl who knows whether they'll stub that too in a future libc.) So, + dnl we'll just look for -pthreads and -lpthread first: pthread_flags="-pthreads pthread -mt -pthread $pthread_flags" ;; esac if test x"$pthreads" = xno; then -for flag in $pthread_flags; do + for flag in $pthread_flags; do case $flag in none) AC_MSG_CHECKING([whether pthreads work without any flags]) ;; - -*) AC_MSG_CHECKING([whether pthreads work with $flag]) PTHREAD_CFLAGS="$flag" @@ -109,14 +113,18 @@ pth-config) AC_CHECK_PROG(pth_config, pth-config, yes, no) - if test x"$pth_config" = xno; then continue; fi + if test x"$pth_config" = xno; then + continue; + fi PTHREAD_CFLAGS="`pth-config --cflags`" PTHREAD_LIBS="`pth-config --ldflags` `pth-config --libs`" ;; pthread-config) AC_CHECK_PROG(pthread_config, pthread-config, yes, no) - if test x"$pthread_config" = xno; then continue; fi + if test x"$pthread_config" = xno; then + continue; + fi PTHREAD_CFLAGS="`pthread-config --cflags`" PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" ;; @@ -132,15 +140,15 @@ LIBS="$PTHREAD_LIBS $LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - # Check for various functions. We must include pthread.h, - # since some functions may be macros. (On the Sequent, we - # need a special flag -Kthread to make this header compile.) - # We check for pthread_join because it is in -lpthread on IRIX - # while pthread_create is in libc. We check for pthread_attr_init - # due to DEC craziness with -lpthreads. We check for - # pthread_cleanup_push because it is one of the few pthread - # functions on Solaris that doesn't have a non-functional libc stub. - # We try pthread_create on general principles. + dnl Check for various functions. We must include pthread.h, + dnl since some functions may be macros. (On the Sequent, we + dnl need a special flag -Kthread to make this header compile.) + dnl We check for pthread_join because it is in -lpthread on IRIX + dnl while pthread_create is in libc. We check for pthread_attr_init + dnl due to DEC craziness with -lpthreads. We check for + dnl pthread_cleanup_push because it is one of the few pthread + dnl functions on Solaris that doesn't have a non-functional libc stub. + dnl We try pthread_create on general principles. AC_TRY_LINK([#include ], [pthread_t th; pthread_join(th, 0); pthread_attr_init(0); pthread_cleanup_push(0, 0); @@ -155,19 +163,35 @@ break; fi - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" -done + done fi -# Various other checks: +dnl Try a manual search, useful for cross-compiling +if test x"${PTHREAD_LIBS}" = "x"; then + AC_MSG_CHECKING([searching for pthread library]) + for i in $libslist; do + if test -f $i/libpthread.a -o -f $i/libpthread.so; then + pthreads=yes + if test x"$i" != x"/usr/lib"; then + PTHREAD_LIBS="-L$i -lpthread" + break + else + PTHREAD_LIBS="-lpthread" + break + fi + AC_MSG_RESULT(yes) + fi + done +fi + +dnl Various other checks: if test "x$pthreads" = xyes; then save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. + dnl Detect AIX lossage: JOINABLE attribute is called UNDETACHED. AC_MSG_CHECKING([for joinable pthread attribute]) attr_name=unknown for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do @@ -196,7 +220,7 @@ LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" - # More AIX lossage: must compile with cc_r (or xlc_r) + dnl More AIX lossage: must compile with cc_r (or xlc_r) case "${host_os}" in aix* ) case "$CC" in @@ -220,24 +244,21 @@ PTHREAD_CXX="$CXX" fi + AC_SUBST(PTHREAD_LIBS) AC_SUBST(PTHREAD_CFLAGS) AC_SUBST(PTHREAD_CC) AC_SUBST(PTHREAD_CXX) -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +dnl Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$pthreads" = xyes; then - if test "${PTHREAD_LIBS}x" = "x"; then - dnl PTHREAD_LIBS="-lpthread" - PTHREAD_LIBS=" " - fi ifelse([$1],,AC_DEFINE(HAVE_PTHREADS,1,[Define if you have POSIX threads libraries and header files.]),[$1]) : else pthreads=no $2 fi -AC_LANG_RESTORE + AC_LANG_RESTORE ]) # Local Variables: Index: macros/sdl.m4 =================================================================== RCS file: /sources/gnash/gnash/macros/sdl.m4,v retrieving revision 1.37 retrieving revision 1.38 diff -u -b -r1.37 -r1.38 --- macros/sdl.m4 16 Jan 2007 19:12:12 -0000 1.37 +++ macros/sdl.m4 21 Jan 2007 22:41:03 -0000 1.38 @@ -14,7 +14,7 @@ dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -dnl $Id: sdl.m4,v 1.37 2007/01/16 19:12:12 bjacques Exp $ +dnl $Id: sdl.m4,v 1.38 2007/01/21 22:41:03 rsavoye Exp $ AC_DEFUN([GNASH_PATH_SDL], [ has_sdl=no @@ -48,17 +48,17 @@ fi AC_MSG_RESULT(${gnash_sdl_version}) -dnl AC_PATH_PROG(SDL_CONFIG, sdl-config, , ,[${prefix}:${prefix}/${target_alias}:$PATH]) -dnl if test "x$SDL_CONFIG" != "x" ; then -dnl if test "x$SDL_CFLAGS" = "x" ; then -dnl SDL_CFLAGS=`$SDL_CONFIG --cflags` -dnl fi -dnl if test "x$SDL_LIBS" = "x" ; then -dnl SDL_LIBS=`$SDL_CONFIG --libs | sed -e 's:-L/usr/lib::'` -dnl fi -dnl else -dnl AC_MSG_RESULT(no) -dnl fi + AC_PATH_PROG(SDL_CONFIG, sdl-config, , ,[${pathlist}]) + if test "x$SDL_CONFIG" != "x" ; then + if test "x$SDL_CFLAGS" = "x" ; then + SDL_CFLAGS=`$SDL_CONFIG --cflags` + fi + if test "x$SDL_LIBS" = "x" ; then + SDL_LIBS=`$SDL_CONFIG --libs | sed -e 's:-L/usr/lib::'` + fi + else + AC_MSG_RESULT(no) + fi gnash_sdl_topdir="" gnash_sdl_version="" From MAILER-DAEMON Mon Jan 22 02:13:24 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H8tMq-0008S6-Nx for mharc-gnash-commit@gnu.org; Mon, 22 Jan 2007 02:13:24 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H8tMp-0008PS-DR for gnash-commit@gnu.org; Mon, 22 Jan 2007 02:13:23 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H8tMo-0008OY-Ns for gnash-commit@gnu.org; Mon, 22 Jan 2007 02:13:23 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H8tMo-0008OI-HS for gnash-commit@gnu.org; Mon, 22 Jan 2007 02:13:22 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H8tMn-0003A3-Lo for gnash-commit@gnu.org; Mon, 22 Jan 2007 02:13:22 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H8tMM-0005z8-Ce for gnash-commit@gnu.org; Mon, 22 Jan 2007 07:12:54 +0000 Received: from ann by savannah.gnu.org with local (Exim 4.50) id 1H8tMM-0005z5-3l for gnash-commit@gnu.org; Mon, 22 Jan 2007 07:12:54 +0000 To: gnash-commit@gnu.org Message-Id: From: Ann Barcomb Date: Mon, 22 Jan 2007 07:12:54 +0000 Subject: [Gnash-commit] gnash ChangeLog doc/C/internals.xml doc/C/sourc... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jan 2007 07:13:23 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Ann Barcomb 07/01/22 07:12:54 Modified files: . : ChangeLog doc/C : internals.xml sources.xml Log message: Partially merged branch 'testing-documentation-refactor' for files doc/C/sources.xml and doc/C/internals.xml. The change involved moving 'running tests' from the test-writing section into the user's installation section. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2142&r2=1.2143 http://cvs.savannah.gnu.org/viewcvs/gnash/doc/C/internals.xml?cvsroot=gnash&r1=1.53&r2=1.54 http://cvs.savannah.gnu.org/viewcvs/gnash/doc/C/sources.xml?cvsroot=gnash&r1=1.26&r2=1.27 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2142 retrieving revision 1.2143 diff -u -b -r1.2142 -r1.2143 --- ChangeLog 19 Jan 2007 15:46:50 -0000 1.2142 +++ ChangeLog 22 Jan 2007 07:12:53 -0000 1.2143 @@ -1,3 +1,10 @@ +2007-01-22 Ann Barcomb + + * Partially merged branch 'testing-documentation-refactor' for + files doc/C/sources.xml and doc/C/internals.xml. The change + involved moving 'running tests' from the test-writing section + into the user's installation section. + 2007-01-19 Sandro Santilli * server/asobj/xmlnode.cpp (attachXMLNodeInterface): Index: doc/C/internals.xml =================================================================== RCS file: /sources/gnash/gnash/doc/C/internals.xml,v retrieving revision 1.53 retrieving revision 1.54 diff -u -b -r1.53 -r1.54 --- doc/C/internals.xml 3 Jan 2007 17:18:07 -0000 1.53 +++ doc/C/internals.xml 22 Jan 2007 07:12:53 -0000 1.54 @@ -1253,7 +1253,12 @@ - Testing Support + Testing + + + Instructions on running tests + can be found in the section on building Gnash. + Testing Tools @@ -1795,88 +1800,6 @@ - - Running The Tests - - - Using DejaGnu - - - The simple way to run the tests is to install - DejaGnu, and use that to run the tests. That - handles all the details to compile and execute the tests. To - run the tests using DejaGnu, change to the - testsuite directory and type: - - make check - - - - - You can get more details by adding command line option when - invoking make. The make check target - in the Makefile supports a variable, RUNTESTFLAGS - that gets passed to DejaGnu when it's invoked by make. - - - make check RUNTESTFLAGS="-v -a" - - - This adds the verbose (-v) option and the - all (-a) option. Verbose prints much more - information about how DejaGnu is running the test. It may be - too much information, but if you think you are having a - problem with running a test case, this is a good way to track - it down. The all option tells DejaGnu to print - all the tests that PASS, as well as those that - FAIL. - - - - - Manually Running Tests - - - You can also run all the test cases by hand, which is useful - if you want to see all the debug output from the test - case. Often the debug messages which come deep from within - Gnash are the most useful during development. - - - - The first step is to compile the test case. Ming's - makeswf program is used to compile the test - case into Flash. By default, no options are - required. Running makeswf looks like this: - - - shellprompt> makeswf XML.as - Output file name: out.swf - Output compression level: 9 - Output SWF version: 6 - Preprocessing XML.as... done. - Compiling `XML.as.pp' into frame 1... done. - Saving output to out.swf... done. - - - - - Once you have the flash movie version of the test case, you - can run it through the Gnash standalone player with a few - options which enable a simple test cases to be run. The - unit level tests for an ActionScript class are run without - an associated graphics display. - - - shellprompt> gprocessor -v out.swf - PASSED: XML::XML() constructor - PASSED: XML::addRequestHeader() exists - PASSED: XML::appendChild() exists - ... - - - - Index: doc/C/sources.xml =================================================================== RCS file: /sources/gnash/gnash/doc/C/sources.xml,v retrieving revision 1.26 retrieving revision 1.27 diff -u -b -r1.26 -r1.27 --- doc/C/sources.xml 21 Jan 2007 22:41:02 -0000 1.26 +++ doc/C/sources.xml 22 Jan 2007 07:12:53 -0000 1.27 @@ -1,8 +1,27 @@ Building From Source + + Overview + The typical process of building from source will involve + resolving dependencies, + configuration, + compilation, + testing, and + installation. + A simplified overview of the process would be: + + ./autogen.sh + ./configure + make + make check + make install + + Continue reading for detailed step-by-step instructions + of the entire procedure. + Code Dependencies @@ -1240,11 +1259,11 @@ - --build + --target - The build architecture. This is the architecture the - development tools we're using are supposed to run on. + The target architecture. This is the architecture the + final executables are supposed to run on. @@ -1253,7 +1272,21 @@ The host architecture. This is the architecture the - executables are supposed to run on. + executables are supposed to run on. This is usually the + same as --target except when building a + compiler as a + Canadian Cross. This is when you build a cross + compiler on a Unix machine, that runs on a + win32 machine, producing code for yet + a third architecture, like the ARM. + + + + + --build + + + This is the system this build is running on. @@ -1334,6 +1367,122 @@ sub directory of apidoc/html + + + Running the Tests + + + + + Using DejaGnu + + FIXME: Add a section on running tests without DejaGnu. + The easiest way to run Gnash's test suite is to install + DejaGnu. + After installing DejaGnu, run: + + make check + + + + + Increasing Verbosity + + If you encounter a problem with a test, increasing the + verbosity may make the issue easier to spot. + Additional details are visible when + RUNTESTFLAGS are used to add the + verbose and all options. + Verbose prints more information about the testing process, while + all includes details on passing tests. + + make check RUNTESTFLAGS="-v -a" + + + + + + Running Some Tests + + It is possible to run just a particular test, or + subdirectory of tests, by specifying the directory or + compiled test file. + + + Some tests rely on testsuite/Dejagnu.swf, + which in turn relies on Ming. + This file is created when you run 'make check' for the entire + testsuite, and can also be created on demand: + + make -C testsuite Dejagnu.swf + + + + In this example, the 'clip_as_button2' test is compiled and + run: + + make -C testsuite/samples clip_as_button2-TestRunner + cd testsuite/samples && ./clip_as_button2-TestRunner + + This would create and run all the tests in the directory + 'movies.all': + + make -C testsuite/movies.all check + + + + + + + Running The Tests Manually + + + You may also run test cases by hand, which can be useful if you + want to see all the debugging output from the test case. Often + the messages which come from deep within Gnash are most useful for + development. + + + + The first step is to compile the test case, which can be done + with 'make XML-v#.swf' where the '#' is replaced with the + target SWF version or versions. + For example: + + make XML-v{5,6,7,8}.swf + + + + + Movie tests + + This creates a Flash movie version of the test case, which + can be run with a standalone Flash player. For instance, + the target for SWF version 6 could be run with Gnash: + + gnash -v XML-v6.swf + + + + + + ActionScript Unit Tests + + Unit tests for ActionScript classes in 'testsuite/actionscript.all' + are run without a graphical display: + + gprocessor -v XML-v6.swf + + + + + From MAILER-DAEMON Mon Jan 22 07:23:59 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H8yDO-0000xR-TQ for mharc-gnash-commit@gnu.org; Mon, 22 Jan 2007 07:23:58 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H8yDM-0000xK-VH for gnash-commit@gnu.org; Mon, 22 Jan 2007 07:23:57 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H8yDM-0000x4-9G for gnash-commit@gnu.org; Mon, 22 Jan 2007 07:23:56 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H8yDM-0000x1-4r for gnash-commit@gnu.org; Mon, 22 Jan 2007 07:23:56 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H8yDL-0005SH-E1 for gnash-commit@gnu.org; Mon, 22 Jan 2007 07:23:55 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H8yDE-0003Tr-3O for gnash-commit@gnu.org; Mon, 22 Jan 2007 12:23:48 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H8yDD-0003To-IX for gnash-commit@gnu.org; Mon, 22 Jan 2007 12:23:47 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Mon, 22 Jan 2007 12:23:47 +0000 Subject: [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jan 2007 12:23:57 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/22 12:23:47 Modified files: . : ChangeLog testsuite/misc-ming.all: Makefile.am Added files: testsuite/misc-ming.all: goto_frame_test.c Log message: * testsuite/misc-ming.all/: Makefile.am, goto_frame_test.c: Failing test for gotoFrame action. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2143&r2=1.2144 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/Makefile.am?cvsroot=gnash&r1=1.52&r2=1.53 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/goto_frame_test.c?cvsroot=gnash&rev=1.1 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2143 retrieving revision 1.2144 diff -u -b -r1.2143 -r1.2144 --- ChangeLog 22 Jan 2007 07:12:53 -0000 1.2143 +++ ChangeLog 22 Jan 2007 12:23:47 -0000 1.2144 @@ -1,3 +1,8 @@ +2007-01-22 Zou Lunkai + + * testsuite/misc-ming.all/: Makefile.am, goto_frame_test.c: + Failing test for gotoFrame action. + 2007-01-22 Ann Barcomb * Partially merged branch 'testing-documentation-refactor' for Index: testsuite/misc-ming.all/Makefile.am =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/Makefile.am,v retrieving revision 1.52 retrieving revision 1.53 diff -u -b -r1.52 -r1.53 --- testsuite/misc-ming.all/Makefile.am 19 Jan 2007 14:22:56 -0000 1.52 +++ testsuite/misc-ming.all/Makefile.am 22 Jan 2007 12:23:47 -0000 1.53 @@ -68,6 +68,7 @@ place_and_remove_object_insane_test \ attachMovieTest \ attachMovieTestRunner \ + goto_frame_test \ $(NULL) check_SCRIPTS = \ @@ -76,6 +77,7 @@ place_object_testrunner \ place_and_remove_object_testrunner \ place_and_remove_object_insane_testrunner \ + goto_frame_testrunner \ $(NULL) # TESTS = \ @@ -267,6 +269,20 @@ $(top_builddir)/testsuite/libtestsuite.la \ $(NULL) +goto_frame_test_SOURCES = \ + goto_frame_test.c \ + ming_utils.h \ + ming_utils.c \ + $(NULL) +goto_frame_test_LDADD = $(MING_LIBS) + +goto_frame_test.swf: goto_frame_test + ./goto_frame_test $(top_srcdir)/testsuite/media + +goto_frame_testrunner: $(srcdir)/../generic-testrunner.sh goto_frame_test.swf + sh $< $(top_builddir) goto_frame_test.swf > $@ + chmod 755 $@ + spritehier.swf: spritehier ./spritehier @@ -347,6 +363,7 @@ place_and_remove_object_testrunner \ place_and_remove_object_insane_testrunner \ attachMovieTestRunner \ + goto_frame_testrunner \ $(NULL) Index: testsuite/misc-ming.all/goto_frame_test.c =================================================================== RCS file: testsuite/misc-ming.all/goto_frame_test.c diff -N testsuite/misc-ming.all/goto_frame_test.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ testsuite/misc-ming.all/goto_frame_test.c 22 Jan 2007 12:23:47 -0000 1.1 @@ -0,0 +1,92 @@ +/* + * Copyright (C) 2005, 2006 Free Software Foundation, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +/* + * Zou Lunkai, zoulunkai@gmail.com + * + * Test for ActionGotoFrame + * + * the root movie has 3 frames which contains another 2-framed movieClip named mc_red. + * At _root's 1st frame, tell mc_red to goto frame2 and stop. + */ + +#include +#include +#include + +#include "ming_utils.h" + +#define OUTPUT_VERSION 6 +#define OUTPUT_FILENAME "goto_frame_test.swf" + + +int +main(int argc, char** argv) +{ + SWFMovie mo; + SWFMovieClip mc_red, dejagnuclip; + SWFShape sh_red; + + const char *srcdir="."; + if ( argc>1 ) + srcdir=argv[1]; + else + { + fprintf(stderr, "Usage: %s \n", argv[0]); + return 1; + } + + Ming_init(); + mo = newSWFMovieWithVersion(OUTPUT_VERSION); + SWFMovie_setDimension(mo, 800, 600); + SWFMovie_setRate (mo, 12.0); + + dejagnuclip = get_dejagnu_clip((SWFBlock)get_default_font(srcdir), 10, 0, 0, 800, 600); + SWFMovie_add(mo, (SWFBlock)dejagnuclip); + + + mc_red = newSWFMovieClip(); + sh_red = make_fill_square (0, 300, 60, 60, 255, 0, 0, 255, 0, 0); + SWFMovieClip_add(mc_red, (SWFBlock)sh_red); + add_clip_actions(mc_red, "var flag = \"action_executed\"; "); + SWFMovieClip_nextFrame(mc_red);//1st frame + SWFMovieClip_nextFrame(mc_red);//2nd frame + + SWFDisplayItem it_red; + it_red = SWFMovie_add(mo, (SWFBlock)mc_red); + SWFDisplayItem_setDepth(it_red, 3); + SWFDisplayItem_setName(it_red, "mc_red"); + add_actions(mo, " mc_red.gotoAndStop(2); "); + SWFMovie_nextFrame(mo); //1st frame + + SWFMovie_nextFrame(mo); //2nd frame + + //checks + xcheck_equals(mo, "_root.mc_red.flag", "'action_executed'"); + add_actions(mo, " _root.totals(); stop(); "); + SWFMovie_nextFrame(mo); //3rd frame + + //Output movie + puts("Saving " OUTPUT_FILENAME ); + SWFMovie_save(mo, OUTPUT_FILENAME); + + return 0; +} + + + From MAILER-DAEMON Mon Jan 22 09:01:31 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H8zjn-0007jG-Hs for mharc-gnash-commit@gnu.org; Mon, 22 Jan 2007 09:01:31 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H8zjd-0007eg-UN for gnash-commit@gnu.org; Mon, 22 Jan 2007 09:01:24 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H8zjb-0007cm-Fk for gnash-commit@gnu.org; Mon, 22 Jan 2007 09:01:21 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H8zjY-0007cX-OZ for gnash-commit@gnu.org; Mon, 22 Jan 2007 09:01:16 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H8zjX-0000Jr-K2 for gnash-commit@gnu.org; Mon, 22 Jan 2007 09:01:16 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H8zjW-0008OS-4O for gnash-commit@gnu.org; Mon, 22 Jan 2007 14:01:14 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H8zjV-0008OP-Q8 for gnash-commit@gnu.org; Mon, 22 Jan 2007 14:01:14 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Mon, 22 Jan 2007 14:01:13 +0000 Subject: [Gnash-commit] gnash ChangeLog server/sprite_instance.cpp test... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jan 2007 14:01:26 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/22 14:01:13 Modified files: . : ChangeLog server : sprite_instance.cpp testsuite/misc-ming.all: attachMovieTest.c attachMovieTestRunner.cpp place_and_remove_object_insane_test.c Log message: * server/sprite_instance.cpp (attachMovieClipInterface, get_member): handled most standard properties by means of calls to the new 'init_property' call. Fixes run of the new attachMovieTest testcase and makes code easier and more reusable (next step is to reuse the getter-setter for other builtin classes like TextField, Button or the like). * testsuite/misc-ming.all/: attachMovieTest.c, attachMovieTestRunner.cpp: test 3rd argument to attachMovie (initObject). Fixed by change in sprite_instance above. * testsuite/misc-ming.all/place_and_remove_object_insane_test.c: Expect a failure accessing '_x' property of a clip, not sure about importance of it being the test insane. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2144&r2=1.2145 http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.127&r2=1.128 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/attachMovieTest.c?cvsroot=gnash&r1=1.2&r2=1.3 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/attachMovieTestRunner.cpp?cvsroot=gnash&r1=1.1&r2=1.2 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/place_and_remove_object_insane_test.c?cvsroot=gnash&r1=1.4&r2=1.5 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2144 retrieving revision 1.2145 diff -u -b -r1.2144 -r1.2145 --- ChangeLog 22 Jan 2007 12:23:47 -0000 1.2144 +++ ChangeLog 22 Jan 2007 14:01:13 -0000 1.2145 @@ -1,3 +1,19 @@ +2007-01-22 Sandro Santilli + + * server/sprite_instance.cpp (attachMovieClipInterface, get_member): + handled most standard properties by means of calls to the new + 'init_property' call. Fixes run of the new attachMovieTest testcase + and makes code easier and more reusable (next step is to reuse + the getter-setter for other builtin classes like TextField, Button + or the like). + * testsuite/misc-ming.all/: attachMovieTest.c, + attachMovieTestRunner.cpp: + test 3rd argument to attachMovie (initObject). + Fixed by change in sprite_instance above. + * testsuite/misc-ming.all/place_and_remove_object_insane_test.c: + Expect a failure accessing '_x' property of a clip, not sure + about importance of it being the test insane. + 2007-01-22 Zou Lunkai * testsuite/misc-ming.all/: Makefile.am, goto_frame_test.c: Index: server/sprite_instance.cpp =================================================================== RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v retrieving revision 1.127 retrieving revision 1.128 diff -u -b -r1.127 -r1.128 --- server/sprite_instance.cpp 19 Jan 2007 14:22:56 -0000 1.127 +++ server/sprite_instance.cpp 22 Jan 2007 14:01:13 -0000 1.128 @@ -63,6 +63,15 @@ namespace gnash { +// Define OLD_GET_MEMBER to thread "default" members within the get_member +// override rather then by using the new 'init_property' call. +// This will likely be removed soon, just here to track possible bugs introduced +// by this change. In particular, the place_and_remove_instane_test is failing +// for '_x' property, but attachMovieTest is succeeding with the *new* layout +// and failign with the previous. +// +//#define OLD_GET_MEMBER + // Forward declarations static as_object* getMovieClipInterface(); @@ -186,6 +195,7 @@ if (fn.nargs > 3 ) { as_object* initObject = fn.arg(3).to_object(); + log_msg("Initializing properties from object"); newch->copyProperties(*initObject); } @@ -199,7 +209,7 @@ fn.result->set_undefined(); } - log_warning("MovieClip.attachMovie(%s, %d, %s) TESTING", + log_warning("MovieClip.attachMovie(%s, %d, %s) OLD_GET_MEMBER", id_name.c_str(), depth_val, newname.c_str()); } @@ -815,78 +825,805 @@ sprite_instance* sprite = static_cast(fn.this_ptr); UNUSED(sprite); - log_error("FIXME: MovieClip.curveTo() not implemented yet"); - fn.result->set_undefined(); + log_error("FIXME: MovieClip.curveTo() not implemented yet"); + fn.result->set_undefined(); +} + +static void +sprite_clear(const fn_call& fn) +{ + assert( dynamic_cast(fn.this_ptr) ); + sprite_instance* sprite = static_cast(fn.this_ptr); + UNUSED(sprite); + + log_error("FIXME: MovieClip.clear() not implemented yet"); + fn.result->set_undefined(); +} + +static void +sprite_beginFill(const fn_call& fn) +{ + assert( dynamic_cast(fn.this_ptr) ); + sprite_instance* sprite = static_cast(fn.this_ptr); + UNUSED(sprite); + + log_error("FIXME: MovieClip.beginFill() not implemented yet"); + fn.result->set_undefined(); +} + +static void +sprite_beginGradientFill(const fn_call& fn) +{ + assert( dynamic_cast(fn.this_ptr) ); + sprite_instance* sprite = static_cast(fn.this_ptr); + UNUSED(sprite); + + log_error("FIXME: MovieClip.beginGradientFill() not implemented yet"); + fn.result->set_undefined(); +} + +// startDrag([lockCenter:Boolean], [left:Number], [top:Number], +// [right:Number], [bottom:Number]) : Void` +static void +sprite_startDrag(const fn_call& fn) +{ + assert( dynamic_cast(fn.this_ptr) ); + sprite_instance* sprite = static_cast(fn.this_ptr); + UNUSED(sprite); + + log_error("FIXME: MovieClip.startDrag() not implemented yet"); +} + +// stopDrag() : Void +static void +sprite_stopDrag(const fn_call& fn) +{ + assert( dynamic_cast(fn.this_ptr) ); + sprite_instance* sprite = static_cast(fn.this_ptr); + UNUSED(sprite); + + log_error("FIXME: MovieClip.stopDrag() not implemented yet"); +} + +static void +movieclip_ctor(const fn_call& fn) +{ + boost::intrusive_ptr clip = new as_object(getMovieClipInterface()); + fn.result->set_as_object(clip.get()); +} + +#ifndef OLD_GET_MEMBER +// TODO: consider using this same function for *every* character +static void +character_x_getset(const fn_call& fn) +{ + assert(dynamic_cast(fn.this_ptr)); + character* ptr = static_cast(fn.this_ptr); + + if ( fn.nargs == 0 ) // getter + { + matrix m = ptr->get_matrix(); + fn.result->set_double(TWIPS_TO_PIXELS(m.m_[0][2])); + } + else // setter + { + matrix m = ptr->get_matrix(); + m.m_[0][2] = infinite_to_fzero(PIXELS_TO_TWIPS(fn.arg(0).to_number())); + ptr->set_matrix(m); + //ptr->m_accept_anim_moves = false; // what is this about ?? + } + +} + +// TODO: consider using this same function for *every* character +static void +character_y_getset(const fn_call& fn) +{ + assert(dynamic_cast(fn.this_ptr)); + character* ptr = static_cast(fn.this_ptr); + + if ( fn.nargs == 0 ) // getter + { + matrix m = ptr->get_matrix(); + fn.result->set_double(TWIPS_TO_PIXELS(m.m_[1][2])); + } + else // setter + { + matrix m = ptr->get_matrix(); + m.m_[1][2] = infinite_to_fzero(PIXELS_TO_TWIPS(fn.arg(0).to_number())); + ptr->set_matrix(m); + //ptr->m_accept_anim_moves = false; // what is this about ?? + } + +} + +// TODO: consider using this same function for *every* character +static void +character_xscale_getset(const fn_call& fn) +{ + assert(dynamic_cast(fn.this_ptr)); + character* ptr = static_cast(fn.this_ptr); + + if ( fn.nargs == 0 ) // getter + { + matrix m = ptr->get_matrix(); + float xscale = m.get_x_scale(); + fn.result->set_double(xscale * 100); // result in percent + } + else // setter + { + matrix m = ptr->get_matrix(); + + double scale_percent = fn.arg(0).to_number(); + + // Handle bogus values + if (isnan(scale_percent)) + { + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("Attempt to set _xscale to %g, refused", + scale_percent); + ); + return; + } + else if (scale_percent < 0 ) + { + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("Attempt to set _xscale to %g, use 0", + scale_percent); + ); + scale_percent = 0; + } + + // input is in percent + float scale = (float)scale_percent/100.f; + + // Decompose matrix and insert the desired value. + float x_scale = scale; + float y_scale = m.get_y_scale(); + float rotation = m.get_rotation(); + m.set_scale_rotation(x_scale, y_scale, rotation); + + ptr->set_matrix(m); + //ptr->m_accept_anim_moves = false; // what is this about ?? + } + +} + +// TODO: consider using this same function for *every* character +static void +character_yscale_getset(const fn_call& fn) +{ + assert(dynamic_cast(fn.this_ptr)); + character* ptr = static_cast(fn.this_ptr); + + if ( fn.nargs == 0 ) // getter + { + matrix m = ptr->get_matrix(); + float yscale = m.get_y_scale(); + fn.result->set_double(yscale * 100); // result in percent + } + else // setter + { + matrix m = ptr->get_matrix(); + + double scale_percent = fn.arg(0).to_number(); + + // Handle bogus values + if (isnan(scale_percent)) + { + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("Attempt to set _yscale to %g, refused", + scale_percent); + ); + return; + } + else if (scale_percent < 0 ) + { + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("Attempt to set _yscale to %g, use 0", + scale_percent); + ); + scale_percent = 0; + } + + // input is in percent + float scale = (float)scale_percent/100.f; + + // Decompose matrix and insert the desired value. + float x_scale = m.get_x_scale(); + float y_scale = scale; + float rotation = m.get_rotation(); + m.set_scale_rotation(x_scale, y_scale, rotation); + + ptr->set_matrix(m); + //ptr->m_accept_anim_moves = false; // what is this about ?? + } + +} + +// TODO: consider using this same function for *every* character +static void +character_xmouse_getset(const fn_call& fn) +{ + assert(dynamic_cast(fn.this_ptr)); + character* ptr = static_cast(fn.this_ptr); + + if ( fn.nargs == 0 ) // getter + { + // Local coord of mouse IN PIXELS. + int x, y, buttons; + VM::get().getRoot().get_mouse_state(x, y, buttons); + + matrix m = ptr->get_world_matrix(); + + point a(PIXELS_TO_TWIPS(x), PIXELS_TO_TWIPS(y)); + point b; + + m.transform_by_inverse(&b, a); + + fn.result->set_double(TWIPS_TO_PIXELS(b.m_x)); + } + else // setter + { + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("Attempt to set read-only property '_xmouse'"); + ); + } +} + +// TODO: consider using this same function for *every* character +static void +character_ymouse_getset(const fn_call& fn) +{ + assert(dynamic_cast(fn.this_ptr)); + character* ptr = static_cast(fn.this_ptr); + + if ( fn.nargs == 0 ) // getter + { + // Local coord of mouse IN PIXELS. + int x, y, buttons; + VM::get().getRoot().get_mouse_state(x, y, buttons); + + matrix m = ptr->get_world_matrix(); + + point a(PIXELS_TO_TWIPS(x), PIXELS_TO_TWIPS(y)); + point b; + + m.transform_by_inverse(&b, a); + + fn.result->set_double(TWIPS_TO_PIXELS(b.m_y)); + } + else // setter + { + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("Attempt to set read-only property '_ymouse'"); + ); + } +} + +// TODO: consider using this same function for *every* character +static void +character_alpha_getset(const fn_call& fn) +{ + assert(dynamic_cast(fn.this_ptr)); + character* ptr = static_cast(fn.this_ptr); + + if ( fn.nargs == 0 ) // getter + { + fn.result->set_double(ptr->get_cxform().m_[3][0] * 100.f); + } + else // setter + { + // Set alpha modulate, in percent. + cxform cx = ptr->get_cxform(); + cx.m_[3][0] = infinite_to_fzero(fn.arg(0).to_number()) / 100.f; + ptr->set_cxform(cx); + //ptr->m_accept_anim_moves = false; // what is this about ?? + } + +} + +// TODO: consider using this same function for *every* character +static void +character_visible_getset(const fn_call& fn) +{ + assert(dynamic_cast(fn.this_ptr)); + character* ptr = static_cast(fn.this_ptr); + + if ( fn.nargs == 0 ) // getter + { + fn.result->set_bool(ptr->get_visible()); + } + else // setter + { + ptr->set_visible(fn.arg(0).to_bool()); + //ptr->m_accept_anim_moves = false; // what is this about ?? + } + +} + +// TODO: consider using this same function for *every* character +static void +character_width_getset(const fn_call& fn) +{ + assert(dynamic_cast(fn.this_ptr)); + character* ptr = static_cast(fn.this_ptr); + + if ( fn.nargs == 0 ) // getter + { + fn.result->set_double(TWIPS_TO_PIXELS(ptr->get_width())); + } + else // setter + { + // @@ tulrich: is parameter in world-coords or local-coords? + matrix m = ptr->get_matrix(); + m.m_[0][0] = infinite_to_fzero(PIXELS_TO_TWIPS(fn.arg(0).to_number())); + float w = ptr->get_width(); + if (fabsf(w) > 1e-6f) + { + m.m_[0][0] /= w; + } + ptr->set_matrix(m); + //ptr->m_accept_anim_moves = false; // what is this about ?? + } +} + +// TODO: consider using this same function for *every* character +static void +character_height_getset(const fn_call& fn) +{ + assert(dynamic_cast(fn.this_ptr)); + character* ptr = static_cast(fn.this_ptr); + + if ( fn.nargs == 0 ) // getter + { + fn.result->set_double(TWIPS_TO_PIXELS(ptr->get_height())); + } + else // setter + { + // @@ tulrich: is parameter in world-coords or local-coords? + matrix m = ptr->get_matrix(); + m.m_[1][1] = infinite_to_fzero(PIXELS_TO_TWIPS(fn.arg(0).to_number())); + float h = ptr->get_height(); // WARNING: was get_width originally, sounds as a bug + if (fabsf(h) > 1e-6f) + { + m.m_[1][1] /= h; + } + ptr->set_matrix(m); + //ptr->m_accept_anim_moves = false; // what is this about ?? + } +} + +// TODO: consider using this same function for *every* character +static void +character_rotation_getset(const fn_call& fn) +{ + assert(dynamic_cast(fn.this_ptr)); + character* ptr = static_cast(fn.this_ptr); + + if ( fn.nargs == 0 ) // getter + { + // Verified against Macromedia player using samples/test_rotation.swf + float angle = ptr->get_matrix().get_rotation(); + + // Result is CLOCKWISE DEGREES, [-180,180] + angle *= 180.0f / float(M_PI); + + fn.result->set_double(angle); + } + else // setter + { + // @@ tulrich: is parameter in world-coords or local-coords? + matrix m = ptr->get_matrix(); + + // Decompose matrix and insert the desired value. + float x_scale = m.get_x_scale(); + float y_scale = m.get_y_scale(); + // input is in degrees + float rotation = (float) fn.arg(0).to_number() * float(M_PI) / 180.f; + m.set_scale_rotation(x_scale, y_scale, rotation); + + ptr->set_matrix(m); + //ptr->m_accept_anim_moves = false; // what is this about ?? + } +} + +// TODO: consider using this same function for *every* character +static void +character_parent_getset(const fn_call& fn) +{ + assert(dynamic_cast(fn.this_ptr)); + character* ptr = static_cast(fn.this_ptr); + + if ( fn.nargs == 0 ) // getter + { + // NOTE: will be NULL for root frame ! + // should it be 'ptr' instead ? + fn.result->set_as_object(ptr->get_parent()); + } + else // setter + { + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("Attempt to set read-only property '_parent'"); + ); + } +} + +static void +sprite_currentframe_getset(const fn_call& fn) +{ + assert(dynamic_cast(fn.this_ptr)); + sprite_instance* ptr = static_cast(fn.this_ptr); + + if ( fn.nargs == 0 ) // getter + { + fn.result->set_int(ptr->get_current_frame() + 1); + } + else // setter + { + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("Attempt to set read-only property '_currentframe'"); + ); + } + +} + +static void +sprite_totalframes_getset(const fn_call& fn) +{ + assert(dynamic_cast(fn.this_ptr)); + sprite_instance* ptr = static_cast(fn.this_ptr); + + if ( fn.nargs == 0 ) // getter + { + fn.result->set_int(ptr->get_frame_count()); + } + else // setter + { + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("Attempt to set read-only property '_totalframes'"); + ); + } + +} + +static void +sprite_framesloaded_getset(const fn_call& fn) +{ + assert(dynamic_cast(fn.this_ptr)); + sprite_instance* ptr = static_cast(fn.this_ptr); + + if ( fn.nargs == 0 ) // getter + { + fn.result->set_int(ptr->get_loaded_frames()); + } + else // setter + { + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("Attempt to set read-only property '_framesloaded'"); + ); + } + +} + +static void +sprite_target_getset(const fn_call& fn) +{ + assert(dynamic_cast(fn.this_ptr)); + sprite_instance* ptr = static_cast(fn.this_ptr); + + if ( fn.nargs == 0 ) // getter + { + fn.result->set_string(ptr->getTargetPath().c_str()); + } + else // setter + { + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("Attempt to set read-only property '_target'"); + ); + } + +} + +static void +sprite_name_getset(const fn_call& fn) +{ + assert(dynamic_cast(fn.this_ptr)); + sprite_instance* ptr = static_cast(fn.this_ptr); + + if ( fn.nargs == 0 ) // getter + { + VM& vm = VM::get(); + const std::string& name = ptr->get_name(); + if ( vm.getSWFVersion() < 6 && name.empty() ) + { + fn.result->set_undefined(); + } + else + { + fn.result->set_string(name.c_str()); + } + } + else // setter + { + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("Attempt to set read-only property '_name'"); + ); + } + +} + +static void +sprite_droptarget_getset(const fn_call& fn) +{ + assert(dynamic_cast(fn.this_ptr)); + sprite_instance* ptr = static_cast(fn.this_ptr); + UNUSED(ptr); + + if ( fn.nargs == 0 ) // getter + { + static bool warned = false; + if ( ! warned ) + { + log_error("FIXME: MovieClip._droptarget unimplemented"); + warned=true; + } + + VM& vm = VM::get(); + if ( vm.getSWFVersion() > 5 ) + { + fn.result->set_string(""); + } + else + { + fn.result->set_undefined(); + } + } + else // setter + { + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("Attempt to set read-only property '_droptarget'"); + ); + } + +} + +static void +sprite_url_getset(const fn_call& fn) +{ + assert(dynamic_cast(fn.this_ptr)); + sprite_instance* ptr = static_cast(fn.this_ptr); + + if ( fn.nargs == 0 ) // getter + { + fn.result->set_string(ptr->get_movie_definition()->get_url().c_str()); + } + else // setter + { + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("Attempt to set read-only property '_url'"); + ); + } + +} + +static void +sprite_onrollover_getset(const fn_call& fn) +{ + assert(dynamic_cast(fn.this_ptr)); + sprite_instance* ptr = static_cast(fn.this_ptr); + + if ( fn.nargs == 0 ) // getter + { + if ( ! ptr->get_event_handler(event_id::ROLL_OVER, fn.result) ) + { + fn.result->set_undefined(); + } + } + else // setter + { + ptr->set_event_handler(event_id::ROLL_OVER, fn.arg(0)); + } + } static void -sprite_clear(const fn_call& fn) +sprite_onrollout_getset(const fn_call& fn) { - assert( dynamic_cast(fn.this_ptr) ); - sprite_instance* sprite = static_cast(fn.this_ptr); - UNUSED(sprite); + assert(dynamic_cast(fn.this_ptr)); + sprite_instance* ptr = static_cast(fn.this_ptr); - log_error("FIXME: MovieClip.clear() not implemented yet"); + if ( fn.nargs == 0 ) // getter + { + if ( ! ptr->get_event_handler(event_id::ROLL_OUT, fn.result) ) + { fn.result->set_undefined(); + } + } + else // setter + { + ptr->set_event_handler(event_id::ROLL_OUT, fn.arg(0)); + } } static void -sprite_beginFill(const fn_call& fn) +sprite_onload_getset(const fn_call& fn) { - assert( dynamic_cast(fn.this_ptr) ); - sprite_instance* sprite = static_cast(fn.this_ptr); - UNUSED(sprite); + assert(dynamic_cast(fn.this_ptr)); + sprite_instance* ptr = static_cast(fn.this_ptr); - log_error("FIXME: MovieClip.beginFill() not implemented yet"); + if ( fn.nargs == 0 ) // getter + { + if ( ! ptr->get_event_handler(event_id::LOAD, fn.result) ) + { fn.result->set_undefined(); + } + } + else // setter + { + ptr->set_event_handler(event_id::LOAD, fn.arg(0)); + } } static void -sprite_beginGradientFill(const fn_call& fn) +sprite_highquality_getset(const fn_call& fn) { - assert( dynamic_cast(fn.this_ptr) ); - sprite_instance* sprite = static_cast(fn.this_ptr); - UNUSED(sprite); + assert(dynamic_cast(fn.this_ptr)); + sprite_instance* ptr = static_cast(fn.this_ptr); + UNUSED(ptr); - log_error("FIXME: MovieClip.beginGradientFill() not implemented yet"); - fn.result->set_undefined(); + if ( fn.nargs == 0 ) // getter + { + // We don't support quality settings + fn.result->set_bool(true); + } + else // setter + { + static bool warned=false; + if ( ! warned ) { + log_warning("MovieClip._highquality setting is unsupported"); + warned = true; + } + } } -// startDrag([lockCenter:Boolean], [left:Number], [top:Number], -// [right:Number], [bottom:Number]) : Void` static void -sprite_startDrag(const fn_call& fn) +sprite_focusrect_getset(const fn_call& fn) { - assert( dynamic_cast(fn.this_ptr) ); - sprite_instance* sprite = static_cast(fn.this_ptr); - UNUSED(sprite); + assert(dynamic_cast(fn.this_ptr)); + sprite_instance* ptr = static_cast(fn.this_ptr); + UNUSED(ptr); - log_error("FIXME: MovieClip.startDrag() not implemented yet"); + if ( fn.nargs == 0 ) // getter + { + // Is a yellow rectangle visible around a focused movie clip (?) + // We don't support focuserct settings + fn.result->set_bool(false); + } + else // setter + { + static bool warned=false; + if ( ! warned ) { + log_warning("MovieClip._focusrect setting is unsupported"); + warned = true; + } + } } -// stopDrag() : Void static void -sprite_stopDrag(const fn_call& fn) +sprite_soundbuftime_getset(const fn_call& fn) { - assert( dynamic_cast(fn.this_ptr) ); - sprite_instance* sprite = static_cast(fn.this_ptr); - UNUSED(sprite); + assert(dynamic_cast(fn.this_ptr)); + sprite_instance* ptr = static_cast(fn.this_ptr); + UNUSED(ptr); - log_error("FIXME: MovieClip.stopDrag() not implemented yet"); + if ( fn.nargs == 0 ) // getter + { + // Number of seconds before sound starts to stream. + fn.result->set_double(0.0); + } + else // setter + { + static bool warned=false; + if ( ! warned ) { + log_warning("MovieClip._soundbuftime setting is unsupported"); + warned = true; + } + } } -static void -movieclip_ctor(const fn_call& fn) -{ - boost::intrusive_ptr clip = new as_object(getMovieClipInterface()); - fn.result->set_as_object(clip.get()); -} +#endif // ndef OLD_GET_MEMBER static void attachMovieClipInterface(as_object& o) { int target_version = o.getVM().getSWFVersion(); + boost::intrusive_ptr gettersetter; + +#ifndef OLD_GET_MEMBER + + // + // Properties (TODO: move to appropriate SWF version section) + // + + gettersetter = new builtin_function(&character_x_getset, NULL); + o.init_property("_x", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&character_y_getset, NULL); + o.init_property("_y", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&character_xscale_getset, NULL); + o.init_property("_xscale", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&character_yscale_getset, NULL); + o.init_property("_yscale", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&character_xmouse_getset, NULL); + o.init_property("_xmouse", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&character_ymouse_getset, NULL); + o.init_property("_ymouse", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&character_alpha_getset, NULL); + o.init_property("_alpha", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&character_visible_getset, NULL); + o.init_property("_visible", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&character_width_getset, NULL); + o.init_property("_width", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&character_height_getset, NULL); + o.init_property("_height", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&character_rotation_getset, NULL); + o.init_property("_rotation", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&character_parent_getset, NULL); + o.init_property("_parent", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&sprite_currentframe_getset, NULL); + o.init_property("_currentframe", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&sprite_totalframes_getset, NULL); + o.init_property("_totalframes", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&sprite_framesloaded_getset, NULL); + o.init_property("_framesloaded", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&sprite_target_getset, NULL); + o.init_property("_target", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&sprite_name_getset, NULL); + o.init_property("_name", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&sprite_droptarget_getset, NULL); + o.init_property("_droptarget", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&sprite_url_getset, NULL); + o.init_property("_url", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&sprite_highquality_getset, NULL); + o.init_property("_highquality", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&sprite_focusrect_getset, NULL); + o.init_property("_focusrect", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&sprite_soundbuftime_getset, NULL); + o.init_property("_soundbuftime", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&sprite_onrollover_getset, NULL); + o.init_property("onRollOver", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&sprite_onrollout_getset, NULL); + o.init_property("onRollOut", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&sprite_onload_getset, NULL); + o.init_property("onLoad", *gettersetter, *gettersetter); + +#endif // ndef OLD_GET_MEMBER + // SWF5 or higher o.init_member("attachMovie", &sprite_attach_movie); o.init_member("play", &sprite_play); @@ -1086,6 +1823,7 @@ // Otherwise leave *val alone and return false. bool sprite_instance::get_member(const std::string& name, as_value* val) { + // FIXME: use addProperty interface for these !! if ( name == "_root" ) { // TODO: handle lockroot @@ -1104,6 +1842,7 @@ return true; } +#ifdef OLD_GET_MEMBER // FIXME: use addProperty interface for these !! as_standard_member std_member = get_standard_member(name); switch (std_member) @@ -1191,21 +1930,70 @@ val->set_double(angle); return true; } - - /// FIXME: use a contextual 'target' member - case M_TARGET: - //else if (name == "_target") + case M_PARENT: { - // Full path to this object; e.g. "/_level0/sprite1/sprite2/ourSprite" - val->set_string(getTargetPath().c_str()); + if (m_parent==NULL) + // _parent is undefined for root movies + { + return false; + } + else + { + assert(dynamic_cast(get_parent())); + val->set_as_object(static_cast(get_parent())); return true; } + } case M_FRAMESLOADED: //else if (name == "_framesloaded") { val->set_int(m_def->get_loading_frame()); return true; } + + case M_XMOUSE: + //else if (name == "_xmouse") + { + // Local coord of mouse IN PIXELS. + int x, y, buttons; + _vm.getRoot().get_mouse_state(x, y, buttons); + + matrix m = get_world_matrix(); + + point a(PIXELS_TO_TWIPS(x), PIXELS_TO_TWIPS(y)); + point b; + + m.transform_by_inverse(&b, a); + + val->set_double(TWIPS_TO_PIXELS(b.m_x)); + return true; + } + + case M_YMOUSE: + //else if (name == "_ymouse") + { + // Local coord of mouse IN PIXELS. + int x, y, buttons; + _vm.getRoot().get_mouse_state(x, y, buttons); + + matrix m = get_world_matrix(); + + point a(PIXELS_TO_TWIPS(x), PIXELS_TO_TWIPS(y)); + point b; + + m.transform_by_inverse(&b, a); + + val->set_double(TWIPS_TO_PIXELS(b.m_y)); + return true; + } + /// FIXME: use a contextual 'target' member + case M_TARGET: + //else if (name == "_target") + { + // Full path to this object; e.g. "/_level0/sprite1/sprite2/ourSprite" + val->set_string(getTargetPath().c_str()); + return true; + } case M_NAME: //else if (name == "_name") { @@ -1216,6 +2004,7 @@ return true; } + case M_DROPTARGET: //else if (name == "_droptarget") { @@ -1233,14 +2022,6 @@ val->set_undefined(); return true; } - - /// - /// FIXME: add a valid 'url' member. Currently - /// the verbatim "gnash" value is assigned to it. - /// The 'url' member should be inherited by - /// parent *unless* we loaded an external resource - /// into this movieclip. - /// case M_URL: //else if (name == "_url") { @@ -1250,9 +2031,17 @@ // we might use the actions creating // it as defining where was it "downloaded" from. // - val->set_string(m_def->get_url().c_str()); // "gnash" + val->set_string(m_def->get_url().c_str()); return true; } + case M_ONROLLOVER: + { + return get_event_handler(event_id::ROLL_OVER, val); + } + case M_ONROLLOUT: + { + return get_event_handler(event_id::ROLL_OUT, val); + } case M_HIGHQUALITY: //else if (name == "_highquality") { @@ -1274,54 +2063,6 @@ val->set_double(0.0); return true; } - case M_XMOUSE: - //else if (name == "_xmouse") - { - // Local coord of mouse IN PIXELS. - int x, y, buttons; - _vm.getRoot().get_mouse_state(x, y, buttons); - - matrix m = get_world_matrix(); - - point a(PIXELS_TO_TWIPS(x), PIXELS_TO_TWIPS(y)); - point b; - - m.transform_by_inverse(&b, a); - - val->set_double(TWIPS_TO_PIXELS(b.m_x)); - return true; - } - case M_YMOUSE: - //else if (name == "_ymouse") - { - // Local coord of mouse IN PIXELS. - int x, y, buttons; - _vm.getRoot().get_mouse_state(x, y, buttons); - - matrix m = get_world_matrix(); - - point a(PIXELS_TO_TWIPS(x), PIXELS_TO_TWIPS(y)); - point b; - - m.transform_by_inverse(&b, a); - - val->set_double(TWIPS_TO_PIXELS(b.m_y)); - return true; - } - case M_PARENT: - { - if (m_parent==NULL) - // _parent is undefined for root movies - { - return false; - } - else - { - assert(dynamic_cast(get_parent())); - val->set_as_object(static_cast(get_parent())); - return true; - } - } case M_ONLOAD: { if (m_as_environment.get_member(std::string(name.c_str()), val)) @@ -1331,15 +2072,9 @@ // Optimization: if no hit, don't bother looking in the display list, etc. return false; } - case M_ONROLLOVER: - { - return get_event_handler(event_id::ROLL_OVER, val); - } - case M_ONROLLOUT: - { - return get_event_handler(event_id::ROLL_OUT, val); - } + } // end switch +#endif // def OLD_GET_MEMBER // Try variables. if ( m_as_environment.get_member(name, val) ) @@ -1623,6 +2358,7 @@ log_msg("sprite[%p]::set_member(%s, %s)", (void*)this, name.c_str(), val.to_string()); #endif +#ifdef OLD_GET_MEMBER as_standard_member std_member = get_standard_member(name); switch (std_member) { @@ -1765,7 +2501,7 @@ // @@ tulrich: is parameter in world-coords or local-coords? matrix m = get_matrix(); m.m_[1][1] = infinite_to_fzero(PIXELS_TO_TWIPS(val.to_number())); - float h = get_width(); + float h = get_width(); // FIXME: shoudln't this be get_height ?? if (fabsf(h) > 1e-6f) { m.m_[1][1] /= h; @@ -1789,6 +2525,16 @@ m_accept_anim_moves = false; return; } + case M_ONROLLOVER: + { + set_event_handler(event_id::ROLL_OVER, val); + return; + } + case M_ONROLLOUT: + { + set_event_handler(event_id::ROLL_OUT, val); + return; + } case M_HIGHQUALITY: //else if (name == "_highquality") { @@ -1812,17 +2558,8 @@ // val->set(0.0); return; } - case M_ONROLLOVER: - { - set_event_handler(event_id::ROLL_OVER, val); - return; - } - case M_ONROLLOUT: - { - set_event_handler(event_id::ROLL_OUT, val); - return; - } } // end switch +#endif // def OLD_GET_MEMBER #ifdef DEBUG_DYNTEXT_VARIABLES log_msg(" not a standard member"); Index: testsuite/misc-ming.all/attachMovieTest.c =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/attachMovieTest.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- testsuite/misc-ming.all/attachMovieTest.c 19 Jan 2007 15:07:25 -0000 1.2 +++ testsuite/misc-ming.all/attachMovieTest.c 22 Jan 2007 14:01:13 -0000 1.3 @@ -129,33 +129,35 @@ * ***********************************************************************/ + add_actions(mo, "initObj = new Object();"); + add_actions(mo, - "attachMovie('redsquare', 'square'+counter, 70+counter);" - "this['square'+counter]._x = 70*counter;" + "initObj._x = 70*counter;" + "attachMovie('redsquare', 'square'+counter, 70+counter, initObj);" "counter++;" ); SWFMovie_nextFrame(mo); /* showFrame */ add_actions(mo, - "attachMovie('redsquare', 'square'+counter, 70+counter);" - "this['square'+counter]._x = 70*counter;" + "initObj._x = 70*counter;" + "attachMovie('redsquare', 'square'+counter, 70+counter, initObj);" "counter++;" ); SWFMovie_nextFrame(mo); /* showFrame */ add_actions(mo, - "attachMovie('redsquare', 'square'+counter, 70+counter);" - "this['square'+counter]._x = 70*counter;" + "initObj._x = 70*counter;" + "attachMovie('redsquare', 'square'+counter, 70+counter, initObj);" "counter++;" ); SWFMovie_nextFrame(mo); /* showFrame */ add_actions(mo, - "attachMovie('redsquare', 'square'+counter, 70+counter);" - "this['square'+counter]._x = 70*counter;" + "initObj._x = 70*counter;" + "attachMovie('redsquare', 'square'+counter, 70+counter, initObj);" "counter++;" ); Index: testsuite/misc-ming.all/attachMovieTestRunner.cpp =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/attachMovieTestRunner.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -b -r1.1 -r1.2 --- testsuite/misc-ming.all/attachMovieTestRunner.cpp 19 Jan 2007 14:22:56 -0000 1.1 +++ testsuite/misc-ming.all/attachMovieTestRunner.cpp 22 Jan 2007 14:01:13 -0000 1.2 @@ -56,7 +56,11 @@ tester.advance(); - check( tester.findDisplayItemByDepth(*root, 70) ); + character* ch70 = const_cast(tester.findDisplayItemByDepth(*root, 70)); + check( ch70 ); + as_value ch70_x; + check( ch70->get_member("_x", &ch70_x) ); + check_equals( ch70_x, 0 ); check(! tester.findDisplayItemByDepth(*root, 71) ); check(! tester.findDisplayItemByDepth(*root, 72) ); check(! tester.findDisplayItemByDepth(*root, 73) ); @@ -64,7 +68,11 @@ tester.advance(); check( tester.findDisplayItemByDepth(*root, 70) ); - check( tester.findDisplayItemByDepth(*root, 71) ); + character* ch71 = const_cast(tester.findDisplayItemByDepth(*root, 71)); + check( ch71 ); + as_value ch71_x; + check( ch71->get_member("_x", &ch71_x) ); + check_equals( ch71_x, 70 ); check(! tester.findDisplayItemByDepth(*root, 72) ); check(! tester.findDisplayItemByDepth(*root, 73) ); @@ -72,7 +80,11 @@ check( tester.findDisplayItemByDepth(*root, 70) ); check( tester.findDisplayItemByDepth(*root, 71) ); - check( tester.findDisplayItemByDepth(*root, 72) ); + character* ch72 = const_cast(tester.findDisplayItemByDepth(*root, 72)); + check( ch72 ); + as_value ch72_x; + check( ch72->get_member("_x", &ch72_x) ); + check_equals( ch72_x, 140 ); check(! tester.findDisplayItemByDepth(*root, 73) ); tester.advance(); @@ -80,6 +92,10 @@ check( tester.findDisplayItemByDepth(*root, 70) ); check( tester.findDisplayItemByDepth(*root, 71) ); check( tester.findDisplayItemByDepth(*root, 72) ); - check( tester.findDisplayItemByDepth(*root, 73) ); + character* ch73 = const_cast(tester.findDisplayItemByDepth(*root, 73)); + check( ch73 ); + as_value ch73_x; + check( ch73->get_member("_x", &ch73_x) ); + check_equals( ch73_x, 210 ); } Index: testsuite/misc-ming.all/place_and_remove_object_insane_test.c =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/place_and_remove_object_insane_test.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- testsuite/misc-ming.all/place_and_remove_object_insane_test.c 12 Jan 2007 14:38:55 -0000 1.4 +++ testsuite/misc-ming.all/place_and_remove_object_insane_test.c 22 Jan 2007 14:01:13 -0000 1.5 @@ -113,7 +113,7 @@ { \ if(counter == 1) \ { \ - check_equals(_root.mc_blue._x, 60); \ + xcheck_equals(_root.mc_blue._x, 60); \ xcheck_equals(typeof(_root.mc_black), 'undefined'); \ xcheck_equals(typeof(_root.mc_black_name_changed), 'movieclip'); \ flag = 1; \ @@ -123,7 +123,7 @@ } "); check_equals(mo, " _root.mc_red._x", "0"); - check_equals(mo, " _root.mc_blue._x", "60"); + xcheck_equals(mo, " _root.mc_blue._x", "60"); check_equals(mo, "flag", "1"); SWFMovie_nextFrame(mo); //------------end of 1st frame--------------------------------- From MAILER-DAEMON Mon Jan 22 09:04:00 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H8zmC-0000Pn-U1 for mharc-gnash-commit@gnu.org; Mon, 22 Jan 2007 09:04:00 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H8zmB-0000PW-JC for gnash-commit@gnu.org; Mon, 22 Jan 2007 09:03:59 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H8zmB-0000P8-2P for gnash-commit@gnu.org; Mon, 22 Jan 2007 09:03:59 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H8zmB-0000P5-0B for gnash-commit@gnu.org; Mon, 22 Jan 2007 09:03:59 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H8zmA-0000iV-JB for gnash-commit@gnu.org; Mon, 22 Jan 2007 09:03:58 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H8zmA-0008Su-2t for gnash-commit@gnu.org; Mon, 22 Jan 2007 14:03:58 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H8zm9-0008So-Qt for gnash-commit@gnu.org; Mon, 22 Jan 2007 14:03:57 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Mon, 22 Jan 2007 14:03:57 +0000 Subject: [Gnash-commit] gnash/testsuite/misc-ming.all place_and_remove_... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jan 2007 14:03:59 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/22 14:03:57 Modified files: testsuite/misc-ming.all: place_and_remove_object_insane_test.c Log message: Strip CRs CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/place_and_remove_object_insane_test.c?cvsroot=gnash&r1=1.5&r2=1.6 Patches: Index: place_and_remove_object_insane_test.c =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/place_and_remove_object_insane_test.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -b -r1.5 -r1.6 From MAILER-DAEMON Mon Jan 22 09:37:56 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H90J2-0008Ln-IW for mharc-gnash-commit@gnu.org; Mon, 22 Jan 2007 09:37:56 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H90J0-0008Iw-Q0 for gnash-commit@gnu.org; Mon, 22 Jan 2007 09:37:54 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H90J0-0008Hf-2b for gnash-commit@gnu.org; Mon, 22 Jan 2007 09:37:54 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H90Iz-0008HY-UL for gnash-commit@gnu.org; Mon, 22 Jan 2007 09:37:53 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H90Iz-00084u-KJ for gnash-commit@gnu.org; Mon, 22 Jan 2007 09:37:53 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H90Iy-00023a-3i for gnash-commit@gnu.org; Mon, 22 Jan 2007 14:37:52 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H90Ix-00023T-RM for gnash-commit@gnu.org; Mon, 22 Jan 2007 14:37:52 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Mon, 22 Jan 2007 14:37:51 +0000 Subject: [Gnash-commit] gnash/server sprite_instance.cpp X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jan 2007 14:37:55 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/22 14:37:51 Modified files: server : sprite_instance.cpp Log message: removed spurious typos from last commit CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.128&r2=1.129 Patches: Index: sprite_instance.cpp =================================================================== RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v retrieving revision 1.128 retrieving revision 1.129 diff -u -b -r1.128 -r1.129 --- sprite_instance.cpp 22 Jan 2007 14:01:13 -0000 1.128 +++ sprite_instance.cpp 22 Jan 2007 14:37:51 -0000 1.129 @@ -209,7 +209,7 @@ fn.result->set_undefined(); } - log_warning("MovieClip.attachMovie(%s, %d, %s) OLD_GET_MEMBER", + log_warning("MovieClip.attachMovie('%s', %d, '%s')", id_name.c_str(), depth_val, newname.c_str()); } From MAILER-DAEMON Mon Jan 22 11:15:38 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H91pa-00044W-O1 for mharc-gnash-commit@gnu.org; Mon, 22 Jan 2007 11:15:38 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H91pZ-00043j-5s for gnash-commit@gnu.org; Mon, 22 Jan 2007 11:15:37 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H91pX-00041p-Vv for gnash-commit@gnu.org; Mon, 22 Jan 2007 11:15:36 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H91pX-00041g-OA for gnash-commit@gnu.org; Mon, 22 Jan 2007 11:15:35 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H91pW-0003d6-Ir for gnash-commit@gnu.org; Mon, 22 Jan 2007 11:15:35 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H91pV-0005kb-GS for gnash-commit@gnu.org; Mon, 22 Jan 2007 16:15:33 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H91pV-0005kV-81 for gnash-commit@gnu.org; Mon, 22 Jan 2007 16:15:33 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Mon, 22 Jan 2007 16:15:33 +0000 Subject: [Gnash-commit] gnash ChangeLog testsuite/actionscript.all/Inhe... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jan 2007 16:15:37 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/22 16:15:33 Modified files: . : ChangeLog testsuite/actionscript.all: Inheritance.as Log message: * testsuite/actionscript.all/Inheritance.as: additional test for 'new Function' construct. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2145&r2=1.2146 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Inheritance.as?cvsroot=gnash&r1=1.15&r2=1.16 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2145 retrieving revision 1.2146 diff -u -b -r1.2145 -r1.2146 --- ChangeLog 22 Jan 2007 14:01:13 -0000 1.2145 +++ ChangeLog 22 Jan 2007 16:15:32 -0000 1.2146 @@ -1,5 +1,7 @@ 2007-01-22 Sandro Santilli + * testsuite/actionscript.all/Inheritance.as: additional + test for 'new Function' construct. * server/sprite_instance.cpp (attachMovieClipInterface, get_member): handled most standard properties by means of calls to the new 'init_property' call. Fixes run of the new attachMovieTest testcase Index: testsuite/actionscript.all/Inheritance.as =================================================================== RCS file: /sources/gnash/gnash/testsuite/actionscript.all/Inheritance.as,v retrieving revision 1.15 retrieving revision 1.16 diff -u -b -r1.15 -r1.16 --- testsuite/actionscript.all/Inheritance.as 8 Jan 2007 12:27:14 -0000 1.15 +++ testsuite/actionscript.all/Inheritance.as 22 Jan 2007 16:15:32 -0000 1.16 @@ -20,7 +20,7 @@ // compile this test case with Ming makeswf, and then // execute it like this gnash -1 -r 0 -v out.swf -rcsid="$Id: Inheritance.as,v 1.15 2007/01/08 12:27:14 strk Exp $"; +rcsid="$Id: Inheritance.as,v 1.16 2007/01/22 16:15:32 strk Exp $"; #include "check.as" @@ -39,6 +39,12 @@ // Make 'functionObject' be an instance of Function (an object) var functionObject = new Function(); +#if OUTPUT_VERSION > 5 +check_equals(typeof(functionObject), 'object'); +#else +xcheck_equals(typeof(functionObject), 'undefined'); +#endif + // functionObject '__proto__' is a reference to // it's constructor's 'prototype' member. check_equals (functionObject.__proto__, Function.prototype); @@ -56,6 +62,11 @@ // itself. check (functionObject.prototype == undefined); +#if OUTPUT_VERSION > 5 +functionObject.prototype = {a:1}; +check_equals(functionObject.prototype.a, 1); +#endif + // Make 'userFunc' be a function (should inherit Function things) var userFunc = function() {}; check (userFunc.__proto__ == Function.prototype); From MAILER-DAEMON Mon Jan 22 15:54:10 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H96B8-0000U0-Bd for mharc-gnash-commit@gnu.org; Mon, 22 Jan 2007 15:54:10 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H96B6-0000TZ-Pb for gnash-commit@gnu.org; Mon, 22 Jan 2007 15:54:08 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H96B5-0000Sj-Pf for gnash-commit@gnu.org; Mon, 22 Jan 2007 15:54:08 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H96B5-0000SX-Jj for gnash-commit@gnu.org; Mon, 22 Jan 2007 15:54:07 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H96B4-0003eg-SS for gnash-commit@gnu.org; Mon, 22 Jan 2007 15:54:07 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H96B3-0002E7-Fa for gnash-commit@gnu.org; Mon, 22 Jan 2007 20:54:05 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H96B3-0002E4-C0 for gnash-commit@gnu.org; Mon, 22 Jan 2007 20:54:05 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Mon, 22 Jan 2007 20:54:05 +0000 Subject: [Gnash-commit] gnash server/as_object.h ChangeLog X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jan 2007 20:54:09 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/22 20:54:05 Modified files: server : as_object.h . : ChangeLog Log message: * server/as_object.h: add getConstructor and const version of get_prototype. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_object.h?cvsroot=gnash&r1=1.30&r2=1.31 http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2146&r2=1.2147 Patches: Index: server/as_object.h =================================================================== RCS file: /sources/gnash/gnash/server/as_object.h,v retrieving revision 1.30 retrieving revision 1.31 diff -u -b -r1.30 -r1.31 --- server/as_object.h 18 Jan 2007 22:53:21 -0000 1.30 +++ server/as_object.h 22 Jan 2007 20:54:05 -0000 1.31 @@ -327,6 +327,16 @@ return m_prototype.get(); } + const as_object* get_prototype() const { + return m_prototype.get(); + } + + /// Return a pointer to the as_function used + /// to construct this object instance. + // + /// + as_function* getConstructor(); + protected: /// Get a property value by name Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2146 retrieving revision 1.2147 diff -u -b -r1.2146 -r1.2147 --- ChangeLog 22 Jan 2007 16:15:32 -0000 1.2146 +++ ChangeLog 22 Jan 2007 20:54:05 -0000 1.2147 @@ -1,5 +1,10 @@ 2007-01-22 Sandro Santilli + * server/as_object.h: add getConstructor and const version of + get_prototype. + +2007-01-22 Sandro Santilli + * testsuite/actionscript.all/Inheritance.as: additional test for 'new Function' construct. * server/sprite_instance.cpp (attachMovieClipInterface, get_member): From MAILER-DAEMON Mon Jan 22 15:55:49 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H96Cj-0001VL-56 for mharc-gnash-commit@gnu.org; Mon, 22 Jan 2007 15:55:49 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H96Ch-0001UG-Ai for gnash-commit@gnu.org; Mon, 22 Jan 2007 15:55:47 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H96Cg-0001U1-Pp for gnash-commit@gnu.org; Mon, 22 Jan 2007 15:55:47 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H96Cg-0001Ty-Nx for gnash-commit@gnu.org; Mon, 22 Jan 2007 15:55:46 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H96Cg-0003wL-Bc for gnash-commit@gnu.org; Mon, 22 Jan 2007 15:55:46 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H96Cf-0002FL-SO for gnash-commit@gnu.org; Mon, 22 Jan 2007 20:55:45 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H96Cf-0002FI-Ec for gnash-commit@gnu.org; Mon, 22 Jan 2007 20:55:45 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Mon, 22 Jan 2007 20:55:45 +0000 Subject: [Gnash-commit] gnash server/as_object.h ChangeLog X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jan 2007 20:55:47 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/22 20:55:45 Modified files: server : as_object.h . : ChangeLog Log message: Sorry, getConstructor() was not really added CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_object.h?cvsroot=gnash&r1=1.31&r2=1.32 http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2147&r2=1.2148 Patches: Index: server/as_object.h =================================================================== RCS file: /sources/gnash/gnash/server/as_object.h,v retrieving revision 1.31 retrieving revision 1.32 diff -u -b -r1.31 -r1.32 --- server/as_object.h 22 Jan 2007 20:54:05 -0000 1.31 +++ server/as_object.h 22 Jan 2007 20:55:45 -0000 1.32 @@ -331,12 +331,6 @@ return m_prototype.get(); } - /// Return a pointer to the as_function used - /// to construct this object instance. - // - /// - as_function* getConstructor(); - protected: /// Get a property value by name Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2147 retrieving revision 1.2148 diff -u -b -r1.2147 -r1.2148 --- ChangeLog 22 Jan 2007 20:54:05 -0000 1.2147 +++ ChangeLog 22 Jan 2007 20:55:45 -0000 1.2148 @@ -1,7 +1,6 @@ 2007-01-22 Sandro Santilli - * server/as_object.h: add getConstructor and const version of - get_prototype. + * server/as_object.h: add const version of get_prototype. 2007-01-22 Sandro Santilli From MAILER-DAEMON Mon Jan 22 15:57:09 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H96E1-0002Tt-5a for mharc-gnash-commit@gnu.org; Mon, 22 Jan 2007 15:57:09 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H96Dz-0002S8-7A for gnash-commit@gnu.org; Mon, 22 Jan 2007 15:57:07 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H96Dy-0002Rb-FY for gnash-commit@gnu.org; Mon, 22 Jan 2007 15:57:06 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H96Dy-0002RR-6c for gnash-commit@gnu.org; Mon, 22 Jan 2007 15:57:06 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H96Dx-0004Fo-St for gnash-commit@gnu.org; Mon, 22 Jan 2007 15:57:05 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H96Dx-0002GK-DT for gnash-commit@gnu.org; Mon, 22 Jan 2007 20:57:05 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H96Dx-0002GH-4l for gnash-commit@gnu.org; Mon, 22 Jan 2007 20:57:05 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Mon, 22 Jan 2007 20:57:05 +0000 Subject: [Gnash-commit] gnash ChangeLog server/as_object.cpp X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jan 2007 20:57:07 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/22 20:57:05 Modified files: . : ChangeLog server : as_object.cpp Log message: * server/as_function.cpp (getPrototype): use get_member to access the prototype, in case it was set by ActionScript. * server/as_object.cpp (instanceOf): fix broken implementation always returning true :/ CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2148&r2=1.2149 http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_object.cpp?cvsroot=gnash&r1=1.25&r2=1.26 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2148 retrieving revision 1.2149 diff -u -b -r1.2148 -r1.2149 --- ChangeLog 22 Jan 2007 20:55:45 -0000 1.2148 +++ ChangeLog 22 Jan 2007 20:57:04 -0000 1.2149 @@ -1,6 +1,10 @@ 2007-01-22 Sandro Santilli * server/as_object.h: add const version of get_prototype. + * server/as_function.cpp (getPrototype): use get_member to access + the prototype, in case it was set by ActionScript. + * server/as_object.cpp (instanceOf): fix broken implementation always + returning true :/ 2007-01-22 Sandro Santilli Index: server/as_object.cpp =================================================================== RCS file: /sources/gnash/gnash/server/as_object.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -u -b -r1.25 -r1.26 --- server/as_object.cpp 19 Jan 2007 10:15:47 -0000 1.25 +++ server/as_object.cpp 22 Jan 2007 20:57:04 -0000 1.26 @@ -263,11 +263,17 @@ bool as_object::instanceOf(as_function* ctor) { - as_object* proto=m_prototype.get(); - do { - if ( proto == ctor->getPrototype() ) return true; - proto = ctor->getPrototype(); - } while (proto); + const as_object* obj = this; + + std::set visited; + + while (obj && visited.insert(obj).second ) + { + if ( obj->get_prototype() == ctor->getPrototype() ) return true; + obj = obj->get_prototype(); + } + + if ( obj ) log_warning("Circular inheritance chain detected during instanceOf call"); return false; } From MAILER-DAEMON Mon Jan 22 15:58:39 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H96FS-0003zx-Vy for mharc-gnash-commit@gnu.org; Mon, 22 Jan 2007 15:58:39 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H96FQ-0003wF-PN for gnash-commit@gnu.org; Mon, 22 Jan 2007 15:58:36 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H96FP-0003sZ-0u for gnash-commit@gnu.org; Mon, 22 Jan 2007 15:58:35 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H96FO-0003rv-B5 for gnash-commit@gnu.org; Mon, 22 Jan 2007 15:58:34 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H96FN-0004Uu-To for gnash-commit@gnu.org; Mon, 22 Jan 2007 15:58:34 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H96FM-0002If-Ko for gnash-commit@gnu.org; Mon, 22 Jan 2007 20:58:32 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H96FM-0002Ic-F3 for gnash-commit@gnu.org; Mon, 22 Jan 2007 20:58:32 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Mon, 22 Jan 2007 20:58:32 +0000 Subject: [Gnash-commit] gnash/server as_function.cpp X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jan 2007 20:58:37 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/22 20:58:32 Modified files: server : as_function.cpp Log message: forgot this in last commit (sorry, trying to commit in portions, but evidently failing often) CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_function.cpp?cvsroot=gnash&r1=1.17&r2=1.18 Patches: Index: as_function.cpp =================================================================== RCS file: /sources/gnash/gnash/server/as_function.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -u -b -r1.17 -r1.18 --- as_function.cpp 18 Jan 2007 22:53:21 -0000 1.17 +++ as_function.cpp 22 Jan 2007 20:58:32 -0000 1.18 @@ -141,6 +141,7 @@ if ( proto.to_object() != _properties.get() ) { log_warning("Exported interface of function %p has been overwritten (from %p to %p)!", this, _properties.get(), proto.to_object()); + _properties = proto.to_object(); } return _properties.get(); } From MAILER-DAEMON Mon Jan 22 16:00:26 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H96HB-0006Ei-FH for mharc-gnash-commit@gnu.org; Mon, 22 Jan 2007 16:00:25 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H96HA-0006DZ-6a for gnash-commit@gnu.org; Mon, 22 Jan 2007 16:00:24 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H96H9-0006CY-Hl for gnash-commit@gnu.org; Mon, 22 Jan 2007 16:00:23 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H96H9-0006Br-1o for gnash-commit@gnu.org; Mon, 22 Jan 2007 16:00:23 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H96H8-0004yJ-Hn for gnash-commit@gnu.org; Mon, 22 Jan 2007 16:00:22 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H96H8-0002Kp-3D for gnash-commit@gnu.org; Mon, 22 Jan 2007 21:00:22 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H96H7-0002Km-K6 for gnash-commit@gnu.org; Mon, 22 Jan 2007 21:00:22 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Mon, 22 Jan 2007 21:00:21 +0000 Subject: [Gnash-commit] gnash ChangeLog testsuite/actionscript.all/Inhe... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jan 2007 21:00:24 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/22 21:00:21 Modified files: . : ChangeLog testsuite/actionscript.all: Inheritance.as MovieClip.as Log message: * testsuite/actionscript.all/: Inheritance.as, MovieClip.as: expect failures on 'any instanceOf Object' after fix to 'as_object::instanceOf'. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2149&r2=1.2150 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Inheritance.as?cvsroot=gnash&r1=1.16&r2=1.17 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/MovieClip.as?cvsroot=gnash&r1=1.26&r2=1.27 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2149 retrieving revision 1.2150 diff -u -b -r1.2149 -r1.2150 --- ChangeLog 22 Jan 2007 20:57:04 -0000 1.2149 +++ ChangeLog 22 Jan 2007 21:00:21 -0000 1.2150 @@ -1,5 +1,8 @@ 2007-01-22 Sandro Santilli + * testsuite/actionscript.all/: Inheritance.as, MovieClip.as: expect + failures on 'any instanceOf Object' after fix to + 'as_object::instanceOf'. * server/as_object.h: add const version of get_prototype. * server/as_function.cpp (getPrototype): use get_member to access the prototype, in case it was set by ActionScript. Index: testsuite/actionscript.all/Inheritance.as =================================================================== RCS file: /sources/gnash/gnash/testsuite/actionscript.all/Inheritance.as,v retrieving revision 1.16 retrieving revision 1.17 diff -u -b -r1.16 -r1.17 --- testsuite/actionscript.all/Inheritance.as 22 Jan 2007 16:15:32 -0000 1.16 +++ testsuite/actionscript.all/Inheritance.as 22 Jan 2007 21:00:21 -0000 1.17 @@ -20,10 +20,13 @@ // compile this test case with Ming makeswf, and then // execute it like this gnash -1 -r 0 -v out.swf -rcsid="$Id: Inheritance.as,v 1.16 2007/01/22 16:15:32 strk Exp $"; +rcsid="$Id: Inheritance.as,v 1.17 2007/01/22 21:00:21 strk Exp $"; #include "check.as" +check_equals(typeof(Object.prototype.constructor), 'function'); +check_equals(Object.prototype.constructor, Object); + // Function.apply is Function.__proto__.apply #if OUTPUT_VERSION > 5 check (typeof(Function.apply) != undefined); @@ -69,10 +72,10 @@ // Make 'userFunc' be a function (should inherit Function things) var userFunc = function() {}; -check (userFunc.__proto__ == Function.prototype); -check (userFunc.prototype.constructor == userFunc); -check (userFunc.prototype.apply == undefined); -check (userFunc.apply == Function.prototype.apply); +check_equals (userFunc.__proto__, Function.prototype); +check_equals (userFunc.prototype.constructor, userFunc); +check_equals (userFunc.prototype.apply, undefined); +check_equals (userFunc.apply, Function.prototype.apply); // Override the inherited apply() method #if OUTPUT_VERSION > 5 @@ -119,7 +122,7 @@ // Test the instanceOf operator check(subInstance instanceOf SubClass); check(subInstance instanceOf SuperClass); -check(subInstance instanceOf Object); +xcheck(subInstance instanceOf Object); //------------------------------------------------ @@ -162,16 +165,16 @@ check_equals(sobj1.__proto__.constructor, SubObj1); #if OUTPUT_VERSION > 5 check(SubObj1 instanceOf Function); -check(Function instanceOf Object); -check(SubObj1 instanceOf Object); +xcheck(Function instanceOf Object); +xcheck(SubObj1 instanceOf Object); #endif // inheritance chain is NOT subobj1,SubObj1,Function,Object, as the // above might suggest... -xcheck(!sobj1 instanceOf Function); +check(!sobj1 instanceOf Function); // but still, sobj1 is an instance of Object *and* SubObj1 -check(sobj1 instanceOf Object); +xcheck(sobj1 instanceOf Object); check(sobj1 instanceOf SubObj1); check(SubObj1.prototype != undefined); Index: testsuite/actionscript.all/MovieClip.as =================================================================== RCS file: /sources/gnash/gnash/testsuite/actionscript.all/MovieClip.as,v retrieving revision 1.26 retrieving revision 1.27 diff -u -b -r1.26 -r1.27 --- testsuite/actionscript.all/MovieClip.as 6 Jan 2007 00:23:31 -0000 1.26 +++ testsuite/actionscript.all/MovieClip.as 22 Jan 2007 21:00:21 -0000 1.27 @@ -22,7 +22,7 @@ // compile this test case with Ming makeswf, and then // execute it like this gnash -1 -r 0 -v out.swf -rcsid="$Id: MovieClip.as,v 1.26 2007/01/06 00:23:31 strk Exp $"; +rcsid="$Id: MovieClip.as,v 1.27 2007/01/22 21:00:21 strk Exp $"; #include "check.as" @@ -272,5 +272,5 @@ var cl = new MovieClip(); check_equals(cl.__proto__.constructor, MovieClip); check(cl instanceOf MovieClip); -check(cl instanceOf Object); +xcheck(cl instanceOf Object); check_equals(typeof(cl), "object"); From MAILER-DAEMON Mon Jan 22 17:12:24 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H97Oq-0000pe-JS for mharc-gnash-commit@gnu.org; Mon, 22 Jan 2007 17:12:24 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H97Oo-0000oB-Oa for gnash-commit@gnu.org; Mon, 22 Jan 2007 17:12:22 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H97Om-0000mi-Mc for gnash-commit@gnu.org; Mon, 22 Jan 2007 17:12:21 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H97Om-0000md-DE for gnash-commit@gnu.org; Mon, 22 Jan 2007 17:12:20 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H97Om-0004ca-62 for gnash-commit@gnu.org; Mon, 22 Jan 2007 17:12:20 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H97Ol-0004u1-2L for gnash-commit@gnu.org; Mon, 22 Jan 2007 22:12:19 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H97Ok-0004ty-Rk for gnash-commit@gnu.org; Mon, 22 Jan 2007 22:12:19 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Mon, 22 Jan 2007 22:12:18 +0000 Subject: [Gnash-commit] gnash testsuite/actionscript.all/Inheritance.as... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jan 2007 22:12:23 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/22 22:12:18 Modified files: testsuite/actionscript.all: Inheritance.as . : ChangeLog Log message: * testsuite/actionscript.all/Inheritance.as: add a new test triggering an assertion failure due to 'extends' modifying inheritance chains and importing a getter_setter not meant for non-sprite objects. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Inheritance.as?cvsroot=gnash&r1=1.17&r2=1.18 http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2150&r2=1.2151 Patches: Index: testsuite/actionscript.all/Inheritance.as =================================================================== RCS file: /sources/gnash/gnash/testsuite/actionscript.all/Inheritance.as,v retrieving revision 1.17 retrieving revision 1.18 diff -u -b -r1.17 -r1.18 --- testsuite/actionscript.all/Inheritance.as 22 Jan 2007 21:00:21 -0000 1.17 +++ testsuite/actionscript.all/Inheritance.as 22 Jan 2007 22:12:18 -0000 1.18 @@ -20,7 +20,7 @@ // compile this test case with Ming makeswf, and then // execute it like this gnash -1 -r 0 -v out.swf -rcsid="$Id: Inheritance.as,v 1.17 2007/01/22 21:00:21 strk Exp $"; +rcsid="$Id: Inheritance.as,v 1.18 2007/01/22 22:12:18 strk Exp $"; #include "check.as" @@ -208,5 +208,17 @@ check_equals(obj.var1, "var_in_Base_prototype"); check_equals(obj.var2, "var_in_Derived_prototype"); +function MyClass() {} +asm { + push "MyClass" + getvariable + push "MovieClip" + getvariable + extends +}; +var myInstance = new MyClass(); +myInstance._x = 4; +check_equals(myInstance._x, 4); + #endif // MING_SUPPORTS_ASM_EXTENDS Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2150 retrieving revision 1.2151 diff -u -b -r1.2150 -r1.2151 --- ChangeLog 22 Jan 2007 21:00:21 -0000 1.2150 +++ ChangeLog 22 Jan 2007 22:12:18 -0000 1.2151 @@ -1,5 +1,8 @@ 2007-01-22 Sandro Santilli + * testsuite/actionscript.all/Inheritance.as: add a new test triggering + an assertion failure due to 'extends' modifying inheritance chains + and importing a getter_setter not meant for non-sprite objects. * testsuite/actionscript.all/: Inheritance.as, MovieClip.as: expect failures on 'any instanceOf Object' after fix to 'as_object::instanceOf'. From MAILER-DAEMON Tue Jan 23 06:23:55 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H9Jko-0007Xz-VJ for mharc-gnash-commit@gnu.org; Tue, 23 Jan 2007 06:23:55 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H9Jkn-0007X4-0B for gnash-commit@gnu.org; Tue, 23 Jan 2007 06:23:53 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H9Jkl-0007WB-Uv for gnash-commit@gnu.org; Tue, 23 Jan 2007 06:23:52 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9Jkl-0007W5-GJ for gnash-commit@gnu.org; Tue, 23 Jan 2007 06:23:51 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H9Jkl-0006py-5Z for gnash-commit@gnu.org; Tue, 23 Jan 2007 06:23:51 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H9Jkj-0005Os-OR for gnash-commit@gnu.org; Tue, 23 Jan 2007 11:23:49 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H9Jkj-0005Op-HQ for gnash-commit@gnu.org; Tue, 23 Jan 2007 11:23:49 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Tue, 23 Jan 2007 11:23:49 +0000 Subject: [Gnash-commit] gnash server/sprite_instance.cpp testsuite/misc... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jan 2007 11:23:53 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/23 11:23:49 Modified files: server : sprite_instance.cpp testsuite/misc-ming.all: attachMovieTest.c attachMovieTestRunner.cpp Log message: * server/sprite_instance.cpp (sprite_attach_movie): Copy properties from initialization object *after* placement to ensure matrix is properly updated. * testsuite/misc-ming.all/: attachMovieTest.c, attachMovieTestRunner.cpp: Made dejagnu-enabled, test for actual position of attached movieclips. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.129&r2=1.130 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/attachMovieTest.c?cvsroot=gnash&r1=1.3&r2=1.4 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/attachMovieTestRunner.cpp?cvsroot=gnash&r1=1.2&r2=1.3 Patches: Index: server/sprite_instance.cpp =================================================================== RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v retrieving revision 1.129 retrieving revision 1.130 diff -u -b -r1.129 -r1.130 --- server/sprite_instance.cpp 22 Jan 2007 14:37:51 -0000 1.129 +++ server/sprite_instance.cpp 23 Jan 2007 11:23:49 -0000 1.130 @@ -193,13 +193,6 @@ boost::intrusive_ptr newch = exported_movie->create_character_instance(sprite, depth_val); assert( dynamic_cast(newch.get()) ); - if (fn.nargs > 3 ) { - as_object* initObject = fn.arg(3).to_object(); - log_msg("Initializing properties from object"); - newch->copyProperties(*initObject); - } - - if (sprite->attachCharacter(*newch, depth_val, newname) ) { fn.result->set_as_object(newch.get()); @@ -209,6 +202,14 @@ fn.result->set_undefined(); } + /// Properties must be copied *after* the call to attachCharacter + /// because attachCharacter() will reset matrix !! + if (fn.nargs > 3 ) { + as_object* initObject = fn.arg(3).to_object(); + log_msg("Initializing properties from object"); + newch->copyProperties(*initObject); + } + log_warning("MovieClip.attachMovie('%s', %d, '%s')", id_name.c_str(), depth_val, newname.c_str()); Index: testsuite/misc-ming.all/attachMovieTest.c =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/attachMovieTest.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -b -r1.3 -r1.4 --- testsuite/misc-ming.all/attachMovieTest.c 22 Jan 2007 14:01:13 -0000 1.3 +++ testsuite/misc-ming.all/attachMovieTest.c 23 Jan 2007 11:23:49 -0000 1.4 @@ -41,10 +41,12 @@ SWFShape sh; SWFMovieClip mc; - sh = make_fill_square (0, 300, 60, 60, 255, 0, 0, 255, 0, 0); + sh = make_fill_square (0, 0, 60, 60, 255, 0, 0, 255, 0, 0); mc = newSWFMovieClip(); SWFMovieClip_add(mc, (SWFBlock)sh); + /* This is here just to turn the clip into an active one */ + add_clip_actions(mc, "onRollOver = function() {};"); SWFMovieClip_nextFrame(mc); SWFMovie_addExport(mo, (SWFBlock)mc, "redsquare"); @@ -56,9 +58,8 @@ main(int argc, char** argv) { SWFMovie mo; - SWFMovieClip exportedClip; const char *srcdir="."; - SWFFont bfont; + SWFMovieClip dejagnuclip; /********************************************* @@ -91,6 +92,9 @@ * *********************************************/ + dejagnuclip = get_dejagnu_clip((SWFBlock)get_default_font(srcdir), 10, 0, 80, 800, 600); + SWFMovie_add(mo, (SWFBlock)dejagnuclip); + addRedSquareExport(mo); /* it seems we need a SHOWFRAME for this to be effective */ /* (maybe it's related to loop-back handling ?) */ @@ -131,12 +135,16 @@ add_actions(mo, "initObj = new Object();"); + add_actions(mo, "counter=0;"); + add_actions(mo, "initObj._x = 70*counter;" "attachMovie('redsquare', 'square'+counter, 70+counter, initObj);" "counter++;" ); + check_equals(mo, "square0._x", "0"); + SWFMovie_nextFrame(mo); /* showFrame */ add_actions(mo, @@ -145,6 +153,8 @@ "counter++;" ); + check_equals(mo, "square1._x", "70"); + SWFMovie_nextFrame(mo); /* showFrame */ add_actions(mo, @@ -153,6 +163,8 @@ "counter++;" ); + check_equals(mo, "square2._x", "140"); + SWFMovie_nextFrame(mo); /* showFrame */ add_actions(mo, @@ -161,7 +173,9 @@ "counter++;" ); - add_actions(mo, "stop();"); + check_equals(mo, "square3._x", "210"); + + add_actions(mo, "totals(); stop();"); SWFMovie_nextFrame(mo); /* showFrame */ Index: testsuite/misc-ming.all/attachMovieTestRunner.cpp =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/attachMovieTestRunner.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- testsuite/misc-ming.all/attachMovieTestRunner.cpp 22 Jan 2007 14:01:13 -0000 1.2 +++ testsuite/misc-ming.all/attachMovieTestRunner.cpp 23 Jan 2007 11:23:49 -0000 1.3 @@ -54,48 +54,54 @@ check(! tester.findDisplayItemByDepth(*root, 72) ); check(! tester.findDisplayItemByDepth(*root, 73) ); + tester.movePointerTo(30, 30); + check(!tester.isMouseOverMouseEntity()); + tester.advance(); - character* ch70 = const_cast(tester.findDisplayItemByDepth(*root, 70)); - check( ch70 ); - as_value ch70_x; - check( ch70->get_member("_x", &ch70_x) ); - check_equals( ch70_x, 0 ); + check(tester.findDisplayItemByDepth(*root, 70) ); check(! tester.findDisplayItemByDepth(*root, 71) ); check(! tester.findDisplayItemByDepth(*root, 72) ); check(! tester.findDisplayItemByDepth(*root, 73) ); + tester.movePointerTo(30, 30); + check(tester.isMouseOverMouseEntity()); + tester.movePointerTo(100, 30); + check(!tester.isMouseOverMouseEntity()); + + tester.advance(); check( tester.findDisplayItemByDepth(*root, 70) ); - character* ch71 = const_cast(tester.findDisplayItemByDepth(*root, 71)); - check( ch71 ); - as_value ch71_x; - check( ch71->get_member("_x", &ch71_x) ); - check_equals( ch71_x, 70 ); + check( tester.findDisplayItemByDepth(*root, 71) ); check(! tester.findDisplayItemByDepth(*root, 72) ); check(! tester.findDisplayItemByDepth(*root, 73) ); + tester.movePointerTo(100, 30); + check(tester.isMouseOverMouseEntity()); + tester.movePointerTo(170, 30); + check(!tester.isMouseOverMouseEntity()); + tester.advance(); check( tester.findDisplayItemByDepth(*root, 70) ); check( tester.findDisplayItemByDepth(*root, 71) ); - character* ch72 = const_cast(tester.findDisplayItemByDepth(*root, 72)); - check( ch72 ); - as_value ch72_x; - check( ch72->get_member("_x", &ch72_x) ); - check_equals( ch72_x, 140 ); + check( tester.findDisplayItemByDepth(*root, 72) ); check(! tester.findDisplayItemByDepth(*root, 73) ); + tester.movePointerTo(170, 30); + check(tester.isMouseOverMouseEntity()); + tester.movePointerTo(240, 30); + check(!tester.isMouseOverMouseEntity()); + tester.advance(); check( tester.findDisplayItemByDepth(*root, 70) ); check( tester.findDisplayItemByDepth(*root, 71) ); check( tester.findDisplayItemByDepth(*root, 72) ); - character* ch73 = const_cast(tester.findDisplayItemByDepth(*root, 73)); - check( ch73 ); - as_value ch73_x; - check( ch73->get_member("_x", &ch73_x) ); - check_equals( ch73_x, 210 ); + check( tester.findDisplayItemByDepth(*root, 73) ); + + tester.movePointerTo(240, 30); + check(tester.isMouseOverMouseEntity()); } From MAILER-DAEMON Tue Jan 23 06:28:14 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H9Jp0-0002AN-34 for mharc-gnash-commit@gnu.org; Tue, 23 Jan 2007 06:28:14 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H9Jox-00025b-RL for gnash-commit@gnu.org; Tue, 23 Jan 2007 06:28:11 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H9Jow-00023F-4W for gnash-commit@gnu.org; Tue, 23 Jan 2007 06:28:10 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9Jov-00022E-9Q for gnash-commit@gnu.org; Tue, 23 Jan 2007 06:28:09 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H9Jop-0007D9-5S for gnash-commit@gnu.org; Tue, 23 Jan 2007 06:28:03 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H9Jne-0005aK-7f for gnash-commit@gnu.org; Tue, 23 Jan 2007 11:26:50 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H9Jnd-0005aH-PL for gnash-commit@gnu.org; Tue, 23 Jan 2007 11:26:50 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Tue, 23 Jan 2007 11:26:49 +0000 Subject: [Gnash-commit] gnash ChangeLog server/PropertyList.h X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jan 2007 11:28:12 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/23 11:26:49 Modified files: . : ChangeLog server : PropertyList.h Log message: * server/PropertyList.h: add visitValues() templated function. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2151&r2=1.2152 http://cvs.savannah.gnu.org/viewcvs/gnash/server/PropertyList.h?cvsroot=gnash&r1=1.9&r2=1.10 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2151 retrieving revision 1.2152 diff -u -b -r1.2151 -r1.2152 --- ChangeLog 22 Jan 2007 22:12:18 -0000 1.2151 +++ ChangeLog 23 Jan 2007 11:26:49 -0000 1.2152 @@ -1,3 +1,14 @@ +2007-01-23 Sandro Santilli + + * server/PropertyList.h: add visitValues() templated function. + * server/sprite_instance.cpp (sprite_attach_movie): + Copy properties from initialization object *after* + placement to ensure matrix is properly updated. + * testsuite/misc-ming.all/: attachMovieTest.c, + attachMovieTestRunner.cpp: + Made dejagnu-enabled, test for actual position + of attached movieclips. + 2007-01-22 Sandro Santilli * testsuite/actionscript.all/Inheritance.as: add a new test triggering Index: server/PropertyList.h =================================================================== RCS file: /sources/gnash/gnash/server/PropertyList.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -b -r1.9 -r1.10 --- server/PropertyList.h 10 Dec 2006 18:39:22 -0000 1.9 +++ server/PropertyList.h 23 Jan 2007 11:26:49 -0000 1.10 @@ -24,6 +24,9 @@ #include "config.h" #endif +#include "Property.h" // for templated functions +#include "as_value.h" // for templated functions + #include #include // for use within map #include // for inlines @@ -35,8 +38,8 @@ class as_object; class as_environment; class as_function; - class as_value; - class Property; + //class as_value; + //class Property; } namespace gnash { @@ -102,6 +105,34 @@ /// Delete all Property objects in the container ~PropertyList(); + /// Visit the list of properties + // + /// The method will invoke the given visitor method + /// passing it two arguments: name of the property and + /// value of it. + /// + /// @param visitor + /// The visitor function. Must take a const std::string + /// reference as first argument and a const as_value reference + /// as second argument. + /// + /// @param this_ptr + /// The object reference used to extract values from properties. + /// + template + void visitValues(V& visitor, as_object& this_ptr) const + { + for (const_iterator it = begin(), itEnd = end(); + it != itEnd; ++it) + { + const std::string& name = it->first; + const Property* prop = it->second; + as_value val = prop->getValue(this_ptr); + + visitor(name, val); + } + } + /// Get the as_value value of a named property // /// If the named property is a getter/setter one it's getter From MAILER-DAEMON Tue Jan 23 07:00:16 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H9KK0-0000JC-Dc for mharc-gnash-commit@gnu.org; Tue, 23 Jan 2007 07:00:16 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H9KJy-0000IY-Rt for gnash-commit@gnu.org; Tue, 23 Jan 2007 07:00:14 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H9KJx-0000Hn-8s for gnash-commit@gnu.org; Tue, 23 Jan 2007 07:00:14 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9KJw-0000Ha-T0 for gnash-commit@gnu.org; Tue, 23 Jan 2007 07:00:12 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H9KJw-0005CD-Bl for gnash-commit@gnu.org; Tue, 23 Jan 2007 07:00:12 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H9KJu-0007cL-4e for gnash-commit@gnu.org; Tue, 23 Jan 2007 12:00:10 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H9KJt-0007cI-Ew for gnash-commit@gnu.org; Tue, 23 Jan 2007 12:00:09 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Tue, 23 Jan 2007 12:00:09 +0000 Subject: [Gnash-commit] gnash ChangeLog server/as_object.cpp X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jan 2007 12:00:15 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/23 12:00:09 Modified files: . : ChangeLog server : as_object.cpp Log message: * server/as_object.cpp (copyProperties): use set_member while importing properties to properly scan the inheritance chain. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2152&r2=1.2153 http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_object.cpp?cvsroot=gnash&r1=1.26&r2=1.27 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2152 retrieving revision 1.2153 diff -u -b -r1.2152 -r1.2153 --- ChangeLog 23 Jan 2007 11:26:49 -0000 1.2152 +++ ChangeLog 23 Jan 2007 12:00:08 -0000 1.2153 @@ -1,5 +1,8 @@ 2007-01-23 Sandro Santilli + * server/as_object.cpp (copyProperties): use set_member + while importing properties to properly scan the + inheritance chain. * server/PropertyList.h: add visitValues() templated function. * server/sprite_instance.cpp (sprite_attach_movie): Copy properties from initialization object *after* Index: server/as_object.cpp =================================================================== RCS file: /sources/gnash/gnash/server/as_object.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -u -b -r1.26 -r1.27 --- server/as_object.cpp 22 Jan 2007 20:57:04 -0000 1.26 +++ server/as_object.cpp 23 Jan 2007 12:00:09 -0000 1.27 @@ -35,6 +35,42 @@ #include #include // for std::pair + +// Anonymous namespace used for module-static defs +namespace { + +using namespace gnash; + +// A PropertyList visitor copying properties to an object +class PropsCopier { + + as_object& _tgt; + +public: + + /// \brief + /// Initialize a PropsCopier instance associating it + /// with a target object (an object whose members has to be set) + /// + PropsCopier(as_object& tgt) + : + _tgt(tgt) + {} + + /// \brief + /// Use the set_member function to properly set *inherited* properties + /// of the given target object + /// + void operator() (const std::string& name, const as_value& val) + { + //log_msg("Setting member '%s' to value '%s'", name.c_str(), val.to_string()); + _tgt.set_member(name, val); + } +}; + +} // end of anonymous namespace + + namespace gnash { bool @@ -359,10 +395,14 @@ } } + void as_object::copyProperties(const as_object& o) { - _members.import(o._members); + PropsCopier copier(*this); + o._members.visitValues(copier, + // Need const_cast due to getValue getting non-const ... + const_cast(o)); } void From MAILER-DAEMON Tue Jan 23 07:01:24 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H9KL5-0000sz-Rx for mharc-gnash-commit@gnu.org; Tue, 23 Jan 2007 07:01:23 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H9KL4-0000rF-Aa for gnash-commit@gnu.org; Tue, 23 Jan 2007 07:01:22 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H9KL3-0000qN-Dw for gnash-commit@gnu.org; Tue, 23 Jan 2007 07:01:21 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9KL3-0000qG-1P for gnash-commit@gnu.org; Tue, 23 Jan 2007 07:01:21 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H9KL2-0005OQ-JW for gnash-commit@gnu.org; Tue, 23 Jan 2007 07:01:20 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H9KL1-0007fX-Qq for gnash-commit@gnu.org; Tue, 23 Jan 2007 12:01:20 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H9KL1-0007fU-Db for gnash-commit@gnu.org; Tue, 23 Jan 2007 12:01:19 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Tue, 23 Jan 2007 12:01:19 +0000 Subject: [Gnash-commit] gnash/testsuite/misc-ming.all .cvsignore X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jan 2007 12:01:22 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/23 12:01:19 Modified files: testsuite/misc-ming.all: .cvsignore Log message: attachMovie test output ignored CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/.cvsignore?cvsroot=gnash&r1=1.3&r2=1.4 Patches: Index: .cvsignore =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/.cvsignore,v retrieving revision 1.3 retrieving revision 1.4 diff -u -b -r1.3 -r1.4 --- .cvsignore 17 Jan 2007 08:56:34 -0000 1.3 +++ .cvsignore 23 Jan 2007 12:01:19 -0000 1.4 @@ -35,3 +35,5 @@ testrun.sum timeline_var_test timeline_var_test-Runner +attachMovieTest +attachMovieTestRunner From MAILER-DAEMON Tue Jan 23 07:12:34 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H9KVu-0006uB-Bj for mharc-gnash-commit@gnu.org; Tue, 23 Jan 2007 07:12:34 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H9KVt-0006u5-KX for gnash-commit@gnu.org; Tue, 23 Jan 2007 07:12:33 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H9KVs-0006tt-2m for gnash-commit@gnu.org; Tue, 23 Jan 2007 07:12:32 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9KVr-0006tq-V3 for gnash-commit@gnu.org; Tue, 23 Jan 2007 07:12:31 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H9KVr-0007Js-NN for gnash-commit@gnu.org; Tue, 23 Jan 2007 07:12:31 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H9KVq-0007qi-Gs for gnash-commit@gnu.org; Tue, 23 Jan 2007 12:12:30 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H9KVp-0007qf-Qk for gnash-commit@gnu.org; Tue, 23 Jan 2007 12:12:30 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Tue, 23 Jan 2007 12:12:29 +0000 Subject: [Gnash-commit] gnash ChangeLog server/as_object.cpp X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jan 2007 12:12:33 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/23 12:12:29 Modified files: . : ChangeLog server : as_object.cpp Log message: * server/as_object.cpp (instanceOf): fixed clearly bogus implementation. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2153&r2=1.2154 http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_object.cpp?cvsroot=gnash&r1=1.27&r2=1.28 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2153 retrieving revision 1.2154 diff -u -b -r1.2153 -r1.2154 --- ChangeLog 23 Jan 2007 12:00:08 -0000 1.2153 +++ ChangeLog 23 Jan 2007 12:12:29 -0000 1.2154 @@ -2,7 +2,8 @@ * server/as_object.cpp (copyProperties): use set_member while importing properties to properly scan the - inheritance chain. + inheritance chain; (instanceOf): fixed clearly bogus + implementation. * server/PropertyList.h: add visitValues() templated function. * server/sprite_instance.cpp (sprite_attach_movie): Copy properties from initialization object *after* Index: server/as_object.cpp =================================================================== RCS file: /sources/gnash/gnash/server/as_object.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -u -b -r1.27 -r1.28 --- server/as_object.cpp 23 Jan 2007 12:00:09 -0000 1.27 +++ server/as_object.cpp 23 Jan 2007 12:12:29 -0000 1.28 @@ -299,17 +299,11 @@ bool as_object::instanceOf(as_function* ctor) { - const as_object* obj = this; - - std::set visited; - - while (obj && visited.insert(obj).second ) - { - if ( obj->get_prototype() == ctor->getPrototype() ) return true; - obj = obj->get_prototype(); - } - - if ( obj ) log_warning("Circular inheritance chain detected during instanceOf call"); + as_object* proto=m_prototype.get(); + do { + if ( proto == ctor->getPrototype() ) return true; + proto = ctor->getPrototype(); + } while (proto); return false; } From MAILER-DAEMON Tue Jan 23 07:40:27 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H9Kwt-0008QR-KW for mharc-gnash-commit@gnu.org; Tue, 23 Jan 2007 07:40:27 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H9Kwr-0008Lv-Kb for gnash-commit@gnu.org; Tue, 23 Jan 2007 07:40:25 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H9Kwq-0008Jp-KO for gnash-commit@gnu.org; Tue, 23 Jan 2007 07:40:25 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9Kwq-0008JP-Gf for gnash-commit@gnu.org; Tue, 23 Jan 2007 07:40:24 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H9Kwp-00047D-OD for gnash-commit@gnu.org; Tue, 23 Jan 2007 07:40:23 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H9Kwo-0000Q7-Fd for gnash-commit@gnu.org; Tue, 23 Jan 2007 12:40:22 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H9Kwo-0000Q4-04 for gnash-commit@gnu.org; Tue, 23 Jan 2007 12:40:22 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Tue, 23 Jan 2007 12:40:22 +0000 Subject: [Gnash-commit] gnash ChangeLog testsuite/actionscript.all/Inhe... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jan 2007 12:40:26 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/23 12:40:21 Modified files: . : ChangeLog testsuite/actionscript.all: Inheritance.as MovieClip.as Log message: * testsuite/actionscript.all/: Inheritance.as, MovieClip.as: updated for unexpected failures and successes after fix to instanceOf. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2154&r2=1.2155 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Inheritance.as?cvsroot=gnash&r1=1.18&r2=1.19 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/MovieClip.as?cvsroot=gnash&r1=1.27&r2=1.28 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2154 retrieving revision 1.2155 diff -u -b -r1.2154 -r1.2155 --- ChangeLog 23 Jan 2007 12:12:29 -0000 1.2154 +++ ChangeLog 23 Jan 2007 12:40:21 -0000 1.2155 @@ -1,5 +1,8 @@ 2007-01-23 Sandro Santilli + * testsuite/actionscript.all/: Inheritance.as, MovieClip.as: + updated for unexpected failures and successes after + fix to instanceOf. * server/as_object.cpp (copyProperties): use set_member while importing properties to properly scan the inheritance chain; (instanceOf): fixed clearly bogus Index: testsuite/actionscript.all/Inheritance.as =================================================================== RCS file: /sources/gnash/gnash/testsuite/actionscript.all/Inheritance.as,v retrieving revision 1.18 retrieving revision 1.19 diff -u -b -r1.18 -r1.19 --- testsuite/actionscript.all/Inheritance.as 22 Jan 2007 22:12:18 -0000 1.18 +++ testsuite/actionscript.all/Inheritance.as 23 Jan 2007 12:40:21 -0000 1.19 @@ -20,7 +20,7 @@ // compile this test case with Ming makeswf, and then // execute it like this gnash -1 -r 0 -v out.swf -rcsid="$Id: Inheritance.as,v 1.18 2007/01/22 22:12:18 strk Exp $"; +rcsid="$Id: Inheritance.as,v 1.19 2007/01/23 12:40:21 strk Exp $"; #include "check.as" @@ -122,7 +122,7 @@ // Test the instanceOf operator check(subInstance instanceOf SubClass); check(subInstance instanceOf SuperClass); -xcheck(subInstance instanceOf Object); +check(subInstance instanceOf Object); //------------------------------------------------ @@ -165,16 +165,16 @@ check_equals(sobj1.__proto__.constructor, SubObj1); #if OUTPUT_VERSION > 5 check(SubObj1 instanceOf Function); -xcheck(Function instanceOf Object); -xcheck(SubObj1 instanceOf Object); +check(Function instanceOf Object); +check(SubObj1 instanceOf Object); #endif // inheritance chain is NOT subobj1,SubObj1,Function,Object, as the // above might suggest... -check(!sobj1 instanceOf Function); +xcheck(!sobj1 instanceOf Function); // but still, sobj1 is an instance of Object *and* SubObj1 -xcheck(sobj1 instanceOf Object); +check(sobj1 instanceOf Object); check(sobj1 instanceOf SubObj1); check(SubObj1.prototype != undefined); Index: testsuite/actionscript.all/MovieClip.as =================================================================== RCS file: /sources/gnash/gnash/testsuite/actionscript.all/MovieClip.as,v retrieving revision 1.27 retrieving revision 1.28 diff -u -b -r1.27 -r1.28 --- testsuite/actionscript.all/MovieClip.as 22 Jan 2007 21:00:21 -0000 1.27 +++ testsuite/actionscript.all/MovieClip.as 23 Jan 2007 12:40:21 -0000 1.28 @@ -22,7 +22,7 @@ // compile this test case with Ming makeswf, and then // execute it like this gnash -1 -r 0 -v out.swf -rcsid="$Id: MovieClip.as,v 1.27 2007/01/22 21:00:21 strk Exp $"; +rcsid="$Id: MovieClip.as,v 1.28 2007/01/23 12:40:21 strk Exp $"; #include "check.as" @@ -272,5 +272,5 @@ var cl = new MovieClip(); check_equals(cl.__proto__.constructor, MovieClip); check(cl instanceOf MovieClip); -xcheck(cl instanceOf Object); +check(cl instanceOf Object); check_equals(typeof(cl), "object"); From MAILER-DAEMON Tue Jan 23 11:41:33 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H9OiD-0001cB-AP for mharc-gnash-commit@gnu.org; Tue, 23 Jan 2007 11:41:33 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H9OiB-0001bO-6Y for gnash-commit@gnu.org; Tue, 23 Jan 2007 11:41:31 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H9OiA-0001b2-69 for gnash-commit@gnu.org; Tue, 23 Jan 2007 11:41:30 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9OiA-0001az-0y for gnash-commit@gnu.org; Tue, 23 Jan 2007 11:41:30 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H9Oi9-0007H3-AA for gnash-commit@gnu.org; Tue, 23 Jan 2007 11:41:29 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H9Oi8-0005AW-NW for gnash-commit@gnu.org; Tue, 23 Jan 2007 16:41:28 +0000 Received: from tgc by savannah.gnu.org with local (Exim 4.50) id 1H9Oi8-0005AS-8S for gnash-commit@gnu.org; Tue, 23 Jan 2007 16:41:28 +0000 To: gnash-commit@gnu.org Message-Id: From: Tomas Groth Date: Tue, 23 Jan 2007 16:41:28 +0000 Subject: [Gnash-commit] gnash ChangeLog backend/sound_handler_sdl.cpp s... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jan 2007 16:41:31 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Tomas Groth 07/01/23 16:41:28 Modified files: . : ChangeLog backend : sound_handler_sdl.cpp server/asobj : Global.cpp NetConnection.h NetStream.cpp NetStream.h NetStreamFfmpeg.cpp NetStreamFfmpeg.h NetStreamGst.cpp NetStreamGst.h Log message: * backend/sound_handler_sdl.cpp: Also resample if samplerate is correct but number of channels is not (mono => stereo). * server/asobj/Global.cpp: Initialize NetStream using the new method. * server/asobj/NetConnection.h: Now compiles without Curl. * server/asobj/NetStream.{cpp,h}: Initialize NetStream using the new method. Implemented the time-property. * server/asobj/NetStreamFfmpeg.{cpp,h}: Switched from pthreads to boost. Hopefully fixed a thread-join-bug (#18571). Use ffmpeg/libavcodec's audio resampler since gnashs own resampler only supports a limited samplerates. Implemented seek() and time(). * server/asobj/NetStreamGst.{cpp,h}: Implemented seek() and time(). CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2155&r2=1.2156 http://cvs.savannah.gnu.org/viewcvs/gnash/backend/sound_handler_sdl.cpp?cvsroot=gnash&r1=1.43&r2=1.44 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Global.cpp?cvsroot=gnash&r1=1.33&r2=1.34 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetConnection.h?cvsroot=gnash&r1=1.12&r2=1.13 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStream.cpp?cvsroot=gnash&r1=1.22&r2=1.23 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStream.h?cvsroot=gnash&r1=1.17&r2=1.18 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStreamFfmpeg.cpp?cvsroot=gnash&r1=1.7&r2=1.8 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStreamFfmpeg.h?cvsroot=gnash&r1=1.3&r2=1.4 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStreamGst.cpp?cvsroot=gnash&r1=1.4&r2=1.5 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStreamGst.h?cvsroot=gnash&r1=1.3&r2=1.4 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2155 retrieving revision 1.2156 diff -u -b -r1.2155 -r1.2156 --- ChangeLog 23 Jan 2007 12:40:21 -0000 1.2155 +++ ChangeLog 23 Jan 2007 16:41:27 -0000 1.2156 @@ -1,3 +1,18 @@ +2007-01-23 Tomas Groth Christensen + + * backend/sound_handler_sdl.cpp: Also resample if samplerate is correct + but number of channels is not (mono => stereo). + * server/asobj/Global.cpp: Initialize NetStream using the new method. + * server/asobj/NetConnection.h: Now compiles without Curl. + * server/asobj/NetStream.{cpp,h}: Initialize NetStream using the new method. + Implemented the time-property. + * server/asobj/NetStreamFfmpeg.{cpp,h}: Switched from pthreads to boost. + Hopefully fixed a thread-join-bug (#18571). + Use ffmpeg/libavcodec's audio resampler since gnashs own resampler only + supports a limited samplerates. + Implemented seek() and time(). + * server/asobj/NetStreamGst.{cpp,h}: Implemented seek() and time(). + 2007-01-23 Sandro Santilli * testsuite/actionscript.all/: Inheritance.as, MovieClip.as: Index: backend/sound_handler_sdl.cpp =================================================================== RCS file: /sources/gnash/gnash/backend/sound_handler_sdl.cpp,v retrieving revision 1.43 retrieving revision 1.44 diff -u -b -r1.43 -r1.44 --- backend/sound_handler_sdl.cpp 18 Jan 2007 11:53:37 -0000 1.43 +++ backend/sound_handler_sdl.cpp 23 Jan 2007 16:41:27 -0000 1.44 @@ -18,7 +18,7 @@ // Based on sound_handler_sdl.cpp by Thatcher Ulrich http://tulrich.com 2003 // which has been donated to the Public Domain. -// $Id: sound_handler_sdl.cpp,v 1.43 2007/01/18 11:53:37 tgc Exp $ +// $Id: sound_handler_sdl.cpp,v 1.44 2007/01/23 16:41:27 tgc Exp $ #ifdef HAVE_CONFIG_H #include "config.h" @@ -942,8 +942,8 @@ } #endif - // If we need to convert samplerate... - if (outsize > 0 && sounddata->sample_rate != handler->audioSpec.freq) { + // If we need to convert samplerate or/and from mono to stereo... + if (outsize > 0 && (sounddata->sample_rate != handler->audioSpec.freq || !sounddata->stereo)) { int16_t* adjusted_data = 0; int adjusted_size = 0; Index: server/asobj/Global.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/Global.cpp,v retrieving revision 1.33 retrieving revision 1.34 diff -u -b -r1.33 -r1.34 --- server/asobj/Global.cpp 18 Jan 2007 22:53:21 -0000 1.33 +++ server/asobj/Global.cpp 23 Jan 2007 16:41:27 -0000 1.34 @@ -18,7 +18,7 @@ // Implementation of the Global ActionScript Object -/* $Id: Global.cpp,v 1.33 2007/01/18 22:53:21 strk Exp $ */ +/* $Id: Global.cpp,v 1.34 2007/01/23 16:41:27 tgc Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -497,7 +497,7 @@ //----------------------- init_member("NetConnection", as_value(netconnection_new)); - init_member("NetStream", as_value(netstream_new)); + netstream_class_init(*this); contextmenu_class_init(*this); moviecliploader_class_init(*this); // sephiroth.it refers this to be introduced in SWF7 Index: server/asobj/NetConnection.h =================================================================== RCS file: /sources/gnash/gnash/server/asobj/NetConnection.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -b -r1.12 -r1.13 --- server/asobj/NetConnection.h 18 Jan 2007 11:53:37 -0000 1.12 +++ server/asobj/NetConnection.h 23 Jan 2007 16:41:27 -0000 1.13 @@ -14,7 +14,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -/* $Id: NetConnection.h,v 1.12 2007/01/18 11:53:37 tgc Exp $ */ +/* $Id: NetConnection.h,v 1.13 2007/01/23 16:41:27 tgc Exp $ */ #ifndef __NETCONNECTION_H__ #define __NETCONNECTION_H__ @@ -121,7 +121,9 @@ public: NetConnection() {}; ~NetConnection() {}; - bool openConnection(const char* /*char_url*/, as_object* /*ns*/) { return false; }; + bool openConnection(const char* /*char_url*/, as_object* /*ns*/, bool /* local */) { return false; }; + bool seek(size_t /*pos*/) { return 0; } + size_t read(void* /*dst*/, size_t /*bytes*/) { return false; } }; #endif // HAVE_CURL_CURL_H @@ -130,10 +132,6 @@ { public: NetConnection obj; - /*void seek(int pos) { obj.seek(pos); } - void read(void* buf, int buf_size) { obj.read(static_cast(buf), buf_size); } - void openConnection(as_object* ns, const char* url) { obj.openConnection(url, ns); } - int getFD() { return obj.getFD(); }*/ }; DSOEXPORT void netconnection_new(const fn_call& fn); Index: server/asobj/NetStream.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/NetStream.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -u -b -r1.22 -r1.23 --- server/asobj/NetStream.cpp 18 Jan 2007 22:53:21 -0000 1.22 +++ server/asobj/NetStream.cpp 23 Jan 2007 16:41:27 -0000 1.23 @@ -18,7 +18,7 @@ // // -/* $Id: NetStream.cpp,v 1.22 2007/01/18 22:53:21 strk Exp $ */ +/* $Id: NetStream.cpp,v 1.23 2007/01/23 16:41:27 tgc Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -27,31 +27,37 @@ #include "log.h" #include "NetStream.h" #include "fn_call.h" +#include "builtin_function.h" #include "movie_root.h" -#if defined(_WIN32) || defined(WIN32) - #include // for sleep() - #define usleep(x) Sleep(x/1000) -#else - #include "unistd.h" // for usleep() -#endif - namespace gnash { -void -netstream_new(const fn_call& fn) +static void netstream_new(const fn_call& fn); +static void netstream_close(const fn_call& fn); +static void netstream_pause(const fn_call& fn); +static void netstream_play(const fn_call& fn); +static void netstream_seek(const fn_call& fn); +static void netstream_setbuffertime(const fn_call& fn); +static void netstream_time(const fn_call& fn); +static as_object* getNetStreamInterface(); + +netstream_as_object::netstream_as_object() + : + as_object(getNetStreamInterface()) { - netstream_as_object *netstream_obj = new netstream_as_object; + obj.set_parent(this); +} + +netstream_as_object::~netstream_as_object() +{ +} - // FIXME: rely on inheritance - netstream_obj->init_member("close", &netstream_close); - netstream_obj->init_member("pause", &netstream_pause); - netstream_obj->init_member("play", &netstream_play); - netstream_obj->init_member("seek", &netstream_seek); - netstream_obj->init_member("setBufferTime", &netstream_setbuffertime); +static void +netstream_new(const fn_call& fn) +{ - fn.result->set_as_object(netstream_obj); + netstream_as_object *netstream_obj = new netstream_as_object; if (fn.nargs > 0) { @@ -67,17 +73,19 @@ ); } } + fn.result->set_as_object(netstream_obj); } -void netstream_close(const fn_call& fn) + +static void netstream_close(const fn_call& fn) { assert(dynamic_cast(fn.this_ptr)); netstream_as_object* ns = static_cast(fn.this_ptr); ns->obj.close(); } -void netstream_pause(const fn_call& fn) +static void netstream_pause(const fn_call& fn) { assert(dynamic_cast(fn.this_ptr)); netstream_as_object* ns = static_cast(fn.this_ptr); @@ -91,7 +99,7 @@ ns->obj.pause(mode); // toggle mode } -void netstream_play(const fn_call& fn) +static void netstream_play(const fn_call& fn) { assert(dynamic_cast(fn.this_ptr)); netstream_as_object* ns = static_cast(fn.this_ptr); @@ -108,12 +116,95 @@ }; } -void netstream_seek(const fn_call& /*fn*/) { - log_msg("%s:unimplemented \n", __FUNCTION__); +static void netstream_seek(const fn_call& fn) { + assert(dynamic_cast(fn.this_ptr)); + netstream_as_object* ns = static_cast(fn.this_ptr); + + double time = 0; + if (fn.nargs > 0) + { + time = fn.arg(0).to_number(); + } + ns->obj.seek(time); + } -void netstream_setbuffertime(const fn_call& /*fn*/) { +static void netstream_setbuffertime(const fn_call& /*fn*/) { log_msg("%s:unimplemented \n", __FUNCTION__); } +// Both a getter and a (do-nothing) setter for time +static void +netstream_time(const fn_call& fn) +{ + + assert(dynamic_cast(fn.this_ptr)); + netstream_as_object* ns = static_cast(fn.this_ptr); + + if ( fn.nargs == 0 ) + { + fn.result->set_double((double)ns->obj.time()); + } + else + { + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("Tried to set read-only property NetStream.time"); + ); + } +} + +void +attachNetStreamInterface(as_object& o) +{ + + o.init_member("close", &netstream_close); + o.init_member("pause", &netstream_pause); + o.init_member("play", &netstream_play); + o.init_member("seek", &netstream_seek); + o.init_member("setBufferTime", &netstream_setbuffertime); + + + // Properties + + boost::intrusive_ptr gettersetter; + + gettersetter = new builtin_function(&netstream_time, NULL); + o.init_property("time", *gettersetter, *gettersetter); + +} + +static as_object* +getNetStreamInterface() +{ + + static boost::intrusive_ptr o; + if ( o == NULL ) + { + o = new as_object(); + attachNetStreamInterface(*o); + } + + return o.get(); +} + +// extern (used by Global.cpp) +void netstream_class_init(as_object& global) +{ + + // This is going to be the global NetStream "class"/"function" + static boost::intrusive_ptr cl; + + if ( cl == NULL ) + { + cl=new builtin_function(&netstream_new, getNetStreamInterface()); + // replicate all interface to class, to be able to access + // all methods as static functions + attachNetStreamInterface(*cl); + + } + + // Register _global.String + global.init_member("NetStream", cl.get()); + +} } // end of gnash namespace Index: server/asobj/NetStream.h =================================================================== RCS file: /sources/gnash/gnash/server/asobj/NetStream.h,v retrieving revision 1.17 retrieving revision 1.18 diff -u -b -r1.17 -r1.18 --- server/asobj/NetStream.h 18 Jan 2007 22:53:21 -0000 1.17 +++ server/asobj/NetStream.h 23 Jan 2007 16:41:28 -0000 1.18 @@ -18,7 +18,7 @@ // // -/* $Id: NetStream.h,v 1.17 2007/01/18 22:53:21 strk Exp $ */ +/* $Id: NetStream.h,v 1.18 2007/01/23 16:41:28 tgc Exp $ */ #ifndef __NETSTREAM_H__ #define __NETSTREAM_H__ @@ -45,11 +45,12 @@ void close(){} void pause(int /*mode*/){} int play(const char* /*source*/){ log_error("FFMPEG or Gstreamer is needed to play video"); return 0; } - void seek(unsigned int /*pos*/){} + void seek(double /*pos*/){} void setBufferTime(unsigned int /*pos*/){} void set_status(const char* /*code*/){} void setNetCon(as_object* /*nc*/) {} image::image_base* get_video(){ return NULL; } + long time() { return 0; } inline void set_parent(netstream_as_object* /*ns*/) { @@ -77,25 +78,16 @@ { public: - netstream_as_object() - { - obj.set_parent(this); - } + netstream_as_object(); - ~netstream_as_object() - { - } + ~netstream_as_object(); NetStream obj; }; -void netstream_new(const fn_call& fn); -void netstream_close(const fn_call& fn); -void netstream_pause(const fn_call& fn); -void netstream_play(const fn_call& fn); -void netstream_seek(const fn_call& fn); -void netstream_setbuffertime(const fn_call& fn); +// Initialize the global NetStream class +void netstream_class_init(as_object& global); } // end of gnash namespace Index: server/asobj/NetStreamFfmpeg.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/NetStreamFfmpeg.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -b -r1.7 -r1.8 --- server/asobj/NetStreamFfmpeg.cpp 18 Jan 2007 22:53:21 -0000 1.7 +++ server/asobj/NetStreamFfmpeg.cpp 23 Jan 2007 16:41:28 -0000 1.8 @@ -14,7 +14,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -/* $Id: NetStreamFfmpeg.cpp,v 1.7 2007/01/18 22:53:21 strk Exp $ */ +/* $Id: NetStreamFfmpeg.cpp,v 1.8 2007/01/23 16:41:28 tgc Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -54,6 +54,7 @@ m_ACodecCtx(NULL), m_FormatCtx(NULL), m_Frame(NULL), + m_Resample(NULL), m_go(false), m_imageframe(NULL), @@ -99,7 +100,11 @@ m_go = false; // wait till thread is complete before main continues - pthread_join(m_thread, NULL); + m_thread->join(); + if (m_thread) delete m_thread; + } + if (startThread) { + delete startThread; } // When closing gnash before playback is finished, the soundhandler @@ -119,9 +124,15 @@ if (m_ACodecCtx) avcodec_close(m_ACodecCtx); m_ACodecCtx = NULL; + if (m_FormatCtx) { m_FormatCtx->iformat->flags = AVFMT_NOFILE; - if (m_FormatCtx) av_close_input_file(m_FormatCtx); + av_close_input_file(m_FormatCtx); m_FormatCtx = NULL; + } + + if (m_Resample) { + audio_resample_close (m_Resample); + } if (m_imageframe) delete m_imageframe; @@ -137,8 +148,6 @@ m_qaudio.pop(); } - //delete input; - } // ffmpeg callback function @@ -199,17 +208,19 @@ m_go = true; // To avoid blocking while connecting, we use a thread. - if (pthread_create(&startThread, NULL, NetStreamFfmpeg::startPlayback, this) != 0) - { - return 0; - }; + startThread = new boost::thread(boost::bind(NetStreamFfmpeg::startPlayback, this)); + + // This starts the decoding thread + lock = new boost::mutex::scoped_lock(start_mutex); + m_thread = new boost::thread(boost::bind(NetStreamFfmpeg::av_streamer, this)); + return 0; } -void* -NetStreamFfmpeg::startPlayback(void* arg) +void +NetStreamFfmpeg::startPlayback(NetStreamFfmpeg* ns) { - NetStreamFfmpeg* ns = static_cast(arg); + netconnection_as_object* nc = static_cast(ns->netCon); URL uri(ns->url); @@ -262,7 +273,7 @@ if(av_open_input_stream(&ns->m_FormatCtx, &ns->ByteIOCxt, "", inputFmt, NULL) < 0){ log_error("Couldn't open file '%s' for decoding", ns->url.c_str()); ns->set_status("NetStream.Play.StreamNotFound"); - return 0; + return; } // Next, we need to retrieve information about the streams contained in the file @@ -271,7 +282,7 @@ if (ret < 0) { log_error("Couldn't find stream information from '%s', error code: %d", ns->url.c_str(), ret); - return 0; + return; } // m_FormatCtx->pb.eof_reached = 0; @@ -280,7 +291,7 @@ // Find the first video & audio stream ns->m_video_index = -1; ns->m_audio_index = -1; - for (int i = 0; i < ns->m_FormatCtx->nb_streams; i++) + for (unsigned int i = 0; i < ns->m_FormatCtx->nb_streams; i++) { AVCodecContext* enc = ns->m_FormatCtx->streams[i]->codec; @@ -311,7 +322,7 @@ if (ns->m_video_index < 0) { log_error("Didn't find a video stream from '%s'", ns->url.c_str()); - return 0; + return; } // Get a pointer to the codec context for the video stream @@ -323,7 +334,7 @@ { ns->m_VCodecCtx = NULL; log_error("Decoder not found"); - return 0; + return; } // Open codec @@ -355,14 +366,14 @@ if(pACodec == NULL) { log_error("No available AUDIO decoder to process MPEG file: '%s'", ns->url.c_str()); - return 0; + return; } // Open codec if (avcodec_open(ns->m_ACodecCtx, pACodec) < 0) { log_error("Could not open AUDIO codec"); - return 0; + return; } s->attach_aux_streamer(audio_streamer, (void*) ns); @@ -371,11 +382,9 @@ ns->m_pause = false; - if (pthread_create(&ns->m_thread, NULL, NetStreamFfmpeg::av_streamer, ns) != 0) - { - return 0; - }; - return 0; + // By deleting this lock we allow the av_streamer-thread to start its work + delete ns->lock; + return; } void @@ -384,9 +393,11 @@ } // decoder thread -void* NetStreamFfmpeg::av_streamer(void* arg) +void NetStreamFfmpeg::av_streamer(NetStreamFfmpeg* ns) { - NetStreamFfmpeg* ns = static_cast(arg); + + boost::mutex::scoped_lock lock(ns->start_mutex); + ns->set_status("NetStream.Play.Start"); raw_videodata_t* video = NULL; @@ -397,6 +408,7 @@ ns->m_start_clock = tu_timer::ticks_to_seconds(tu_timer::get_ticks()); ns->m_go = true; ns->m_unqueued_data = NULL; + while (ns->m_go) { if (ns->m_pause) @@ -449,8 +461,7 @@ } } ns->set_status("NetStream.Play.Stop"); - pthread_exit(0); - return 0; + } // audio callback is running in sound handler thread @@ -458,6 +469,8 @@ { NetStreamFfmpeg* ns = static_cast(owner); + boost::mutex::scoped_lock lock(ns->decoding_mutex); + while (len > 0 && ns->m_qaudio.size() > 0) { raw_videodata_t* samples = ns->m_qaudio.front(); @@ -479,6 +492,8 @@ bool NetStreamFfmpeg::read_frame() { + boost::mutex::scoped_lock lock(decoding_mutex); + // raw_videodata_t* ret = NULL; if (m_unqueued_data) { @@ -517,19 +532,22 @@ if (avcodec_decode_audio(m_ACodecCtx, (int16_t*) ptr, &frame_size, packet.data, packet.size) >= 0) { - int16_t* adjusted_data = 0; - int n = 0; - bool stereo = m_ACodecCtx->channels > 1 ? true : false; int samples = stereo ? frame_size >> 2 : frame_size >> 1; - // This convertion only works for 5.5, 11, 22 and 44 KHz. 32KHz causes problems. - s->convert_raw_data(&adjusted_data, &n, ptr, samples, 2, m_ACodecCtx->sample_rate, stereo); + // Resampeling using ffmpegs (libavcodecs) resampler + if (!m_Resample) { + // arguments: (output channels, input channels, output rate, input rate) + m_Resample = audio_resample_init (2, m_ACodecCtx->channels, 44100, m_ACodecCtx->sample_rate); + } + // The size of this is a guess, we don't know yet... Lets hope it's big enough + int16_t* output_data = new int16_t[frame_size * 2]; + samples = audio_resample (m_Resample, output_data, (int16_t*)ptr, samples); raw_videodata_t* raw = new raw_videodata_t; - raw->m_data = (uint8_t*) adjusted_data; + raw->m_data = (uint8_t*) output_data; raw->m_ptr = raw->m_data; - raw->m_size = n; + raw->m_size = samples * 2 * 2; // 2 for stereo and 2 for samplesize = 2 bytes raw->m_stream_index = m_audio_index; m_unqueued_data = m_qaudio.push(raw) ? NULL : raw; @@ -637,6 +655,7 @@ } else { + log_warning("Problems decoding frame"); return false; } @@ -649,9 +668,58 @@ } void -NetStreamFfmpeg::seek() +NetStreamFfmpeg::seek(double pos) { - log_msg("%s:unimplemented \n", __FUNCTION__); + boost::mutex::scoped_lock lock(decoding_mutex); + + // Seek to new position + double timebase = (double)m_FormatCtx->streams[m_video_index]->time_base.num / (double)m_FormatCtx->streams[m_video_index]->time_base.den; + + long newpos = (long)(pos / timebase); + + if (av_seek_frame(m_FormatCtx, m_video_index, newpos, 0) < 0) { + log_warning("seeking failed"); + return; + } + + // This is kindof hackish and ugly :-( + if (newpos == 0) { + m_video_clock = 0; + m_start_clock = tu_timer::ticks_to_seconds(tu_timer::get_ticks()); + } else { + + AVPacket Packet; + av_init_packet(&Packet); + double newtime = 0; + while (newtime == 0) { + if ( av_read_frame(m_FormatCtx, &Packet) < 0) { + av_seek_frame(m_FormatCtx, -1, 0,AVSEEK_FLAG_BACKWARD); + av_free_packet(&Packet); + return; + } + + newtime = timebase * (double)m_FormatCtx->streams[m_video_index]->cur_dts; + } + + av_free_packet(&Packet); + av_seek_frame(m_FormatCtx, m_video_index, newpos, 0); + + m_start_clock += m_video_clock - newtime; + + m_video_clock = newtime; + } + // Flush the queues + while (m_qvideo.size() > 0) + { + delete m_qvideo.front(); + m_qvideo.pop(); + } + + while (m_qaudio.size() > 0) + { + delete m_qaudio.front(); + m_qaudio.pop(); + } } void @@ -660,6 +728,17 @@ log_msg("%s:unimplemented \n", __FUNCTION__); } +long +NetStreamFfmpeg::time() +{ + if (m_FormatCtx && m_FormatCtx->nb_streams > 0) { + double time = (double)m_FormatCtx->streams[0]->time_base.num / (double)m_FormatCtx->streams[0]->time_base.den * (double)m_FormatCtx->streams[0]->cur_dts; + return (long) time; + } else { + return 0; + } +} + } // gnash namespcae #endif // USE_FFMPEG Index: server/asobj/NetStreamFfmpeg.h =================================================================== RCS file: /sources/gnash/gnash/server/asobj/NetStreamFfmpeg.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -b -r1.3 -r1.4 --- server/asobj/NetStreamFfmpeg.h 18 Jan 2007 11:53:37 -0000 1.3 +++ server/asobj/NetStreamFfmpeg.h 23 Jan 2007 16:41:28 -0000 1.4 @@ -14,7 +14,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -/* $Id: NetStreamFfmpeg.h,v 1.3 2007/01/18 11:53:37 tgc Exp $ */ +/* $Id: NetStreamFfmpeg.h,v 1.4 2007/01/23 16:41:28 tgc Exp $ */ #ifndef __NETSTREAMFFMPEG_H__ #define __NETSTREAMFFMPEG_H__ @@ -26,7 +26,11 @@ #ifdef USE_FFMPEG #include -#include +//#include +#include +#include +#include + #include "impl.h" #include "video_stream_instance.h" #include @@ -153,10 +157,11 @@ void close(); void pause(int mode); int play(const char* source); - void seek(); + void seek(double pos); void setBufferTime(); void set_status(const char* code); void setNetCon(as_object* nc); + long time(); // Used for ffmpeg data read and seek callbacks static int readPacket(void* opaque, uint8_t* buf, int buf_size); @@ -181,8 +186,8 @@ return time.num / (double) time.den; } - static void* startPlayback(void* arg); - static void* av_streamer(void* arg); + static void startPlayback(NetStreamFfmpeg* ns); + static void av_streamer(NetStreamFfmpeg* ns); static void audio_streamer(void *udata, uint8 *stream, int len); private: @@ -210,6 +215,8 @@ AVFrame* m_Frame; + ReSampleContext *m_Resample; + volatile bool m_go; unsigned int runtime; @@ -217,8 +224,14 @@ double m_video_clock; - pthread_t m_thread; - pthread_t startThread; +// pthread_t m_thread; +// pthread_t startThread; + boost::thread *m_thread; + boost::thread *startThread; + boost::mutex decoding_mutex; + boost::mutex start_mutex; + boost::mutex::scoped_lock *lock; + multithread_queue m_qaudio; multithread_queue m_qvideo; bool m_pause; Index: server/asobj/NetStreamGst.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/NetStreamGst.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- server/asobj/NetStreamGst.cpp 18 Jan 2007 22:53:21 -0000 1.4 +++ server/asobj/NetStreamGst.cpp 23 Jan 2007 16:41:28 -0000 1.5 @@ -35,26 +35,29 @@ #include "URL.h" -#if defined(_WIN32) || defined(WIN32) - #include // for sleep() - #define usleep(x) Sleep(x/1000) -#else - #include "unistd.h" // for usleep() -#endif - - - namespace gnash { NetStreamGst::NetStreamGst(): + pipeline(NULL), + audiosink(NULL), + videosink(NULL), + source(NULL), + decoder(NULL), + volume(NULL), + colorspace(NULL), + videorate(NULL), + videocaps(NULL), + videoflip(NULL), + audioconv(NULL), m_go(false), m_imageframe(NULL), m_pause(false), inputPos(0), videowidth(0), videoheight(0) + { } @@ -317,27 +320,23 @@ // Setup the videorate element which makes sure the frames are delivered on time. ns->videorate = gst_element_factory_make ("videorate", NULL); - // Setup the videorate element which makes sure the frames are delivered on time. -/* ns->videoflip = gst_element_factory_make ("videoflip", NULL); - g_object_set (G_OBJECT (ns->videoflip), "method", 5, NULL);*/ - // setup the videosink with callback ns->videosink = gst_element_factory_make ("fakesink", NULL); g_object_set (G_OBJECT (ns->videosink), "signal-handoffs", TRUE, "sync", TRUE, NULL); g_signal_connect (ns->videosink, "handoff", G_CALLBACK (NetStreamGst::callback_output), ns); - if (!ns->source || !ns->audioconv || !ns->volume || !ns->decoder || !ns->colorspace /*|| !ns->videoflip*/ || !ns->videocaps || !ns->videorate || !ns->videosink) { + if (!ns->source || !ns->audioconv || !ns->volume || !ns->decoder || !ns->colorspace || !ns->videocaps || !ns->videorate || !ns->videosink) { gnash::log_error("Gstreamer element(s) for movie handling could not be created\n"); return 0; } // put it all in the pipeline - gst_bin_add_many (GST_BIN (ns->pipeline), ns->source, ns->decoder, ns->audiosink, ns->audioconv, ns->colorspace, ns->videosink, ns->videorate, ns->videocaps, /*ns->videoflip,*/ ns->volume, NULL); + gst_bin_add_many (GST_BIN (ns->pipeline), ns->source, ns->decoder, ns->audiosink, ns->audioconv, ns->colorspace, ns->videosink, ns->videorate, ns->videocaps, ns->volume, NULL); // link the elements gst_element_link(ns->source, ns->decoder); gst_element_link_many(ns->audioconv, ns->volume, ns->audiosink, NULL); - gst_element_link_many(/*ns->videoflip,*/ ns->colorspace, ns->videocaps, ns->videorate, ns->videosink, NULL); + gst_element_link_many(ns->colorspace, ns->videocaps, ns->videorate, ns->videosink, NULL); // start playing gst_element_set_state (ns->pipeline, GST_STATE_PLAYING); @@ -355,9 +354,12 @@ } void -NetStreamGst::seek() +NetStreamGst::seek(double pos) { - log_msg("%s:unimplemented \n", __FUNCTION__); + + if (!gst_element_seek_simple(pipeline, GST_FORMAT_TIME, GST_SEEK_FLAG_KEY_UNIT, GST_SECOND * static_cast(pos))) { + log_warning("seek failed"); + } } void @@ -366,6 +368,29 @@ log_msg("%s:unimplemented \n", __FUNCTION__); } +long +NetStreamGst::time() +{ + + if (!pipeline) return 0; + + GstFormat fmt = GST_FORMAT_TIME; + long pos; + GstStateChangeReturn ret; + GstState current, pending; + + ret = gst_element_get_state (GST_ELEMENT (pipeline), ¤t, &pending, 0); +// fail_unless (ret == GST_STATE_CHANGE_ASYNC, "not changing state async"); +// fail_unless (current == GST_STATE_READY, "bad current state"); +// fail_unless (pending == GST_STATE_PLAYING, "bad pending state"); + + if (current != GST_STATE_NULL && gst_element_query_position (pipeline, &fmt, &pos)) { + return pos; + } else { + return 0; + } +} + // Gstreamer callback function int NetStreamGst::readPacket(void* opaque, char* buf, int buf_size){ Index: server/asobj/NetStreamGst.h =================================================================== RCS file: /sources/gnash/gnash/server/asobj/NetStreamGst.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -b -r1.3 -r1.4 --- server/asobj/NetStreamGst.h 15 Jan 2007 20:58:53 -0000 1.3 +++ server/asobj/NetStreamGst.h 23 Jan 2007 16:41:28 -0000 1.4 @@ -42,10 +42,11 @@ void close(); void pause(int mode); int play(const char* source); - void seek(); + void seek(double pos); void setBufferTime(); void set_status(const char* code); void setNetCon(as_object* nc); + long time(); // Used for gstreamer data read and seek callbacks static int readPacket(void* opaque, char* buf, int buf_size); From MAILER-DAEMON Tue Jan 23 12:17:23 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H9PGt-0001X0-NS for mharc-gnash-commit@gnu.org; Tue, 23 Jan 2007 12:17:23 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H9PGr-0001Ra-EE for gnash-commit@gnu.org; Tue, 23 Jan 2007 12:17:21 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H9PGo-0001M0-RH for gnash-commit@gnu.org; Tue, 23 Jan 2007 12:17:20 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9PGo-0001Ld-MF for gnash-commit@gnu.org; Tue, 23 Jan 2007 12:17:18 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H9PGn-0005SY-FX for gnash-commit@gnu.org; Tue, 23 Jan 2007 12:17:18 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H9PGl-0005no-Nc for gnash-commit@gnu.org; Tue, 23 Jan 2007 17:17:15 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H9PGl-0005nl-6Y for gnash-commit@gnu.org; Tue, 23 Jan 2007 17:17:15 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Tue, 23 Jan 2007 17:17:15 +0000 Subject: [Gnash-commit] gnash ChangeLog libbase/GnashException.h server... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jan 2007 17:17:21 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/23 17:17:15 Modified files: . : ChangeLog libbase : GnashException.h server : sprite_instance.cpp server/asobj : Date.cpp Log message: * libbase/GnashException.h: add ActionException class. * server/sprite_instance.cpp, server/asobj/Date.cpp: throw an ActionException if methods or gettersetter properties are invoked against the wrong instance type. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2156&r2=1.2157 http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/GnashException.h?cvsroot=gnash&r1=1.4&r2=1.5 http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.130&r2=1.131 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Date.cpp?cvsroot=gnash&r1=1.6&r2=1.7 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2156 retrieving revision 1.2157 diff -u -b -r1.2156 -r1.2157 --- ChangeLog 23 Jan 2007 16:41:27 -0000 1.2156 +++ ChangeLog 23 Jan 2007 17:17:14 -0000 1.2157 @@ -1,3 +1,10 @@ +2007-01-23 Sandro Santilli + + * libbase/GnashException.h: add ActionException class. + * server/sprite_instance.cpp, server/asobj/Date.cpp: + throw an ActionException if methods or gettersetter properties are invoked + against the wrong instance type. + 2007-01-23 Tomas Groth Christensen * backend/sound_handler_sdl.cpp: Also resample if samplerate is correct Index: libbase/GnashException.h =================================================================== RCS file: /sources/gnash/gnash/libbase/GnashException.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- libbase/GnashException.h 29 Nov 2006 23:54:05 -0000 1.4 +++ libbase/GnashException.h 23 Jan 2007 17:17:14 -0000 1.5 @@ -70,6 +70,26 @@ }; +/// An ActionScript error exception +class ActionException: public GnashException +{ + +public: + + ActionException(const std::string& s) + : + GnashException(s) + {} + + ActionException() + : + GnashException("ActionScript error") + {} + + virtual ~ActionException() throw() {} + +}; + } // namespace gnash #endif // def _GNASH_GNASHEXCEPTION__H Index: server/sprite_instance.cpp =================================================================== RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v retrieving revision 1.130 retrieving revision 1.131 diff -u -b -r1.130 -r1.131 --- server/sprite_instance.cpp 23 Jan 2007 11:23:49 -0000 1.130 +++ server/sprite_instance.cpp 23 Jan 2007 17:17:14 -0000 1.131 @@ -45,6 +45,7 @@ #include "smart_ptr.h" #include "VM.h" #include "Range2d.h" // for getBounds +#include "GnashException.h" #include #include @@ -101,17 +102,42 @@ } } +// Wrapper around dynamic_cast to implement user warning. +// To be used by builtin properties and methods. +static sprite_instance* +ensure_sprite(as_object* obj) +{ + sprite_instance* ret = dynamic_cast(obj); + if ( ! ret ) + { + throw ActionException("builtin method or gettersetter for sprite objects called against non-sprite instance"); + } + return ret; +} + +// Wrapper around dynamic_cast to implement user warning. +// To be used by builtin properties and methods. +static character* +ensure_character(as_object* obj) +{ + character* ret = dynamic_cast(obj); + if ( ! ret ) + { + throw ActionException("builtin method or gettersetter for character objects called against non-character instance"); + } + return ret; +} + static void sprite_play(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - sprite_instance* sprite = static_cast(fn.this_ptr); + sprite_instance* sprite = ensure_sprite(fn.this_ptr); + sprite->set_play_state(sprite_instance::PLAY); } static void sprite_stop(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - sprite_instance* sprite = static_cast(fn.this_ptr); + sprite_instance* sprite = ensure_sprite(fn.this_ptr); sprite->set_play_state(sprite_instance::STOP); @@ -130,10 +156,9 @@ //removeMovieClip() : Void static void sprite_remove_movieclip(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - sprite_instance* sprite = static_cast(fn.this_ptr); + sprite_instance* sprite = ensure_sprite(fn.this_ptr); - sprite_instance* parent = (sprite_instance*) sprite->get_parent(); + sprite_instance* parent = dynamic_cast(sprite->get_parent()); if (parent) { parent->remove_display_object(sprite->get_depth(), 0); @@ -144,8 +169,7 @@ // depth:Number [, initObject:Object]) : MovieClip static void sprite_attach_movie(const fn_call& fn) { - assert( dynamic_cast(fn.this_ptr) ); - sprite_instance* sprite = static_cast(fn.this_ptr); + sprite_instance* sprite = ensure_sprite(fn.this_ptr); if (fn.nargs < 3 || fn.nargs > 4) { @@ -154,7 +178,6 @@ " expected 3 to 4, got (%d) - returning undefined", fn.nargs); ); - fn.result->set_undefined(); return; } @@ -168,7 +191,6 @@ "returning undefined", id_name.c_str()); ); - fn.result->set_undefined(); return; } movie_definition* exported_movie = dynamic_cast(exported.get()); @@ -181,7 +203,6 @@ id_name.c_str(), typeid(*(exported.get())).name()); ); - fn.result->set_undefined(); return; } @@ -193,13 +214,9 @@ boost::intrusive_ptr newch = exported_movie->create_character_instance(sprite, depth_val); assert( dynamic_cast(newch.get()) ); - if (sprite->attachCharacter(*newch, depth_val, newname) ) - { - fn.result->set_as_object(newch.get()); - } - else + if (! sprite->attachCharacter(*newch, depth_val, newname) ) { - fn.result->set_undefined(); + return; } /// Properties must be copied *after* the call to attachCharacter @@ -210,28 +227,23 @@ newch->copyProperties(*initObject); } - log_warning("MovieClip.attachMovie('%s', %d, '%s')", - id_name.c_str(), depth_val, newname.c_str()); - + fn.result->set_as_object(newch.get()); } // attachAudio(id:Object) : Void static void sprite_attach_audio(const fn_call& fn) { - assert( dynamic_cast(fn.this_ptr) ); - sprite_instance* sprite = static_cast(fn.this_ptr); + sprite_instance* sprite = ensure_sprite(fn.this_ptr); UNUSED(sprite); log_error("FIXME: MovieClip.attachAudio() unimplemented -- " "returning undefined"); - fn.result->set_undefined(); } //createEmptyMovieClip(name:String, depth:Number) : MovieClip static void sprite_create_empty_movieclip(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - sprite_instance* sprite = static_cast(fn.this_ptr); + sprite_instance* sprite = ensure_sprite(fn.this_ptr); if (fn.nargs != 2) { @@ -243,7 +255,6 @@ " returning undefined.", fn.nargs); ); - fn.result->set_undefined(); return; } else @@ -263,8 +274,7 @@ static void sprite_get_depth(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - sprite_instance* sprite = static_cast(fn.this_ptr); + sprite_instance* sprite = ensure_sprite(fn.this_ptr); int n = sprite->get_depth(); @@ -275,8 +285,7 @@ //swapDepths(target:Object) : Void static void sprite_swap_depths(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - sprite_instance* sprite = static_cast(fn.this_ptr); + sprite_instance* sprite = ensure_sprite(fn.this_ptr); if (fn.nargs < 1) { @@ -340,8 +349,7 @@ //duplicateMovieClip(name:String, depth:Number, [initObject:Object]) : MovieClip static void sprite_duplicate_movieclip(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - sprite_instance* sprite = static_cast(fn.this_ptr); + sprite_instance* sprite = ensure_sprite(fn.this_ptr); if (fn.nargs < 2) { @@ -401,8 +409,7 @@ static void sprite_goto_and_play(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - sprite_instance* sprite = static_cast(fn.this_ptr); + sprite_instance* sprite = ensure_sprite(fn.this_ptr); if (fn.nargs < 1) { @@ -421,8 +428,7 @@ static void sprite_goto_and_stop(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - sprite_instance* sprite = static_cast(fn.this_ptr); + sprite_instance* sprite = ensure_sprite(fn.this_ptr); if (fn.nargs < 1) { @@ -441,8 +447,7 @@ static void sprite_next_frame(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - sprite_instance* sprite = static_cast(fn.this_ptr); + sprite_instance* sprite = ensure_sprite(fn.this_ptr); size_t frame_count = sprite->get_frame_count(); size_t current_frame = sprite->get_current_frame(); @@ -455,8 +460,7 @@ static void sprite_prev_frame(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - sprite_instance* sprite = static_cast(fn.this_ptr); + sprite_instance* sprite = ensure_sprite(fn.this_ptr); size_t current_frame = sprite->get_current_frame(); if (current_frame > 0) @@ -468,21 +472,14 @@ static void sprite_get_bytes_loaded(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - sprite_instance* sprite = static_cast(fn.this_ptr); + sprite_instance* sprite = ensure_sprite(fn.this_ptr); fn.result->set_int(sprite->get_bytes_loaded()); } static void sprite_get_bytes_total(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - sprite_instance* sprite = static_cast(fn.this_ptr); - if (sprite == NULL) - { - sprite = dynamic_cast(fn.env->get_target()); - } - assert(sprite); + sprite_instance* sprite = ensure_sprite(fn.this_ptr); // @@ horrible uh ? fn.result->set_int(sprite->get_bytes_total()); @@ -490,8 +487,7 @@ static void sprite_load_movie(const fn_call& fn) { - assert( dynamic_cast(fn.this_ptr) ); - sprite_instance* sprite = static_cast(fn.this_ptr); + sprite_instance* sprite = ensure_sprite(fn.this_ptr); UNUSED(sprite); log_error("FIXME: %s not implemented yet", __PRETTY_FUNCTION__); @@ -500,8 +496,8 @@ static void sprite_hit_test(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - //sprite_instance* sprite = static_cast(fn.this_ptr); + sprite_instance* sprite = ensure_sprite(fn.this_ptr); + UNUSED(sprite); static bool warned_1_arg = false; static bool warned_2_arg = false; @@ -519,14 +515,12 @@ log_aserror("Can't find hitTest target %s", tgt_val.to_string()); ); - fn.result->set_undefined(); return; } if ( ! warned_1_arg ) { log_error("FIXME: hitTest(target) unimplemented"); warned_1_arg=true; } - fn.result->set_undefined(); break; } @@ -539,7 +533,6 @@ x,y); warned_2_arg=true; } - fn.result->set_undefined(); break; } @@ -553,7 +546,6 @@ x,y,shapeFlag); warned_3_arg=true; } - fn.result->set_undefined(); break; } @@ -563,7 +555,6 @@ log_aserror("hitTest() called with %u args.", fn.nargs); ); - fn.result->set_undefined(); break; } } @@ -575,8 +566,7 @@ static void sprite_create_text_field(const fn_call& fn) { - assert( dynamic_cast(fn.this_ptr) ); - sprite_instance* sprite = static_cast(fn.this_ptr); + sprite_instance* sprite = ensure_sprite(fn.this_ptr); if (fn.nargs != 6) // name, depth, x, y, width, height { @@ -584,7 +574,6 @@ log_msg("createTextField called with %d args, " "expected 6 - returning undefined", fn.nargs); ); - fn.result->set_undefined(); return; } @@ -594,7 +583,6 @@ log_msg("First argument of createTextField is not a string" " - returning undefined"); ); - fn.result->set_undefined(); return; } //std::string txt_name = fn.arg(0).to_string(); @@ -605,7 +593,6 @@ log_msg("Second argument of createTextField is not a number" " - returning undefined"); ); - fn.result->set_undefined(); return; } @@ -617,7 +604,6 @@ log_msg("Third argument of createTextField is not a number" " - returning undefined"); ); - fn.result->set_undefined(); return; } @@ -629,7 +615,6 @@ log_msg("Fourth argument of createTextField is not a number" " - returning undefined"); ); - fn.result->set_undefined(); return; } @@ -641,7 +626,6 @@ log_msg("Fifth argument of createTextField is not a number" " - returning undefined"); ); - fn.result->set_undefined(); return; } //double txt_width = fn.arg(4).to_number(); @@ -652,7 +636,6 @@ log_msg("Fifth argument of createTextField is not a number" " - returning undefined"); ); - fn.result->set_undefined(); return; } //double txt_height = fn.arg(5).to_number(); @@ -723,8 +706,7 @@ static void sprite_getNextHighestDepth(const fn_call& fn) { - assert( dynamic_cast(fn.this_ptr) ); - sprite_instance* sprite = static_cast(fn.this_ptr); + sprite_instance* sprite = ensure_sprite(fn.this_ptr); unsigned int nextdepth = sprite->getNextHighestDepth(); fn.result->set_double(static_cast(nextdepth)); @@ -734,8 +716,7 @@ static void sprite_getURL(const fn_call& fn) { - assert( dynamic_cast(fn.this_ptr) ); - sprite_instance* sprite = static_cast(fn.this_ptr); + sprite_instance* sprite = ensure_sprite(fn.this_ptr); UNUSED(sprite); log_error("FIXME: MovieClip.getURL() not implemented yet"); @@ -745,8 +726,7 @@ static void sprite_getBounds(const fn_call& fn) { - assert( dynamic_cast(fn.this_ptr) ); - sprite_instance* sprite = static_cast(fn.this_ptr); + sprite_instance* sprite = ensure_sprite(fn.this_ptr); boost::intrusive_ptr target; if ( fn.nargs > 0 ) @@ -778,89 +758,73 @@ static void sprite_globalToLocal(const fn_call& fn) { - assert( dynamic_cast(fn.this_ptr) ); - sprite_instance* sprite = static_cast(fn.this_ptr); + sprite_instance* sprite = ensure_sprite(fn.this_ptr); UNUSED(sprite); log_error("FIXME: MovieClip.globalToLocal() not implemented yet"); - fn.result->set_undefined(); } static void sprite_endFill(const fn_call& fn) { - assert( dynamic_cast(fn.this_ptr) ); - sprite_instance* sprite = static_cast(fn.this_ptr); + sprite_instance* sprite = ensure_sprite(fn.this_ptr); UNUSED(sprite); log_error("FIXME: MovieClip.endFill() not implemented yet"); - fn.result->set_undefined(); } static void sprite_lineTo(const fn_call& fn) { - assert( dynamic_cast(fn.this_ptr) ); - sprite_instance* sprite = static_cast(fn.this_ptr); + sprite_instance* sprite = ensure_sprite(fn.this_ptr); UNUSED(sprite); log_error("FIXME: MovieClip.lineTo() not implemented yet"); - fn.result->set_undefined(); } static void sprite_lineStyle(const fn_call& fn) { - assert( dynamic_cast(fn.this_ptr) ); - sprite_instance* sprite = static_cast(fn.this_ptr); + sprite_instance* sprite = ensure_sprite(fn.this_ptr); UNUSED(sprite); log_error("FIXME: MovieClip.lineStyle() not implemented yet"); - fn.result->set_undefined(); } static void sprite_curveTo(const fn_call& fn) { - assert( dynamic_cast(fn.this_ptr) ); - sprite_instance* sprite = static_cast(fn.this_ptr); + sprite_instance* sprite = ensure_sprite(fn.this_ptr); UNUSED(sprite); log_error("FIXME: MovieClip.curveTo() not implemented yet"); - fn.result->set_undefined(); } static void sprite_clear(const fn_call& fn) { - assert( dynamic_cast(fn.this_ptr) ); - sprite_instance* sprite = static_cast(fn.this_ptr); + sprite_instance* sprite = ensure_sprite(fn.this_ptr); UNUSED(sprite); log_error("FIXME: MovieClip.clear() not implemented yet"); - fn.result->set_undefined(); } static void sprite_beginFill(const fn_call& fn) { - assert( dynamic_cast(fn.this_ptr) ); - sprite_instance* sprite = static_cast(fn.this_ptr); + sprite_instance* sprite = ensure_sprite(fn.this_ptr); UNUSED(sprite); log_error("FIXME: MovieClip.beginFill() not implemented yet"); - fn.result->set_undefined(); } static void sprite_beginGradientFill(const fn_call& fn) { - assert( dynamic_cast(fn.this_ptr) ); - sprite_instance* sprite = static_cast(fn.this_ptr); + sprite_instance* sprite = ensure_sprite(fn.this_ptr); UNUSED(sprite); log_error("FIXME: MovieClip.beginGradientFill() not implemented yet"); - fn.result->set_undefined(); } // startDrag([lockCenter:Boolean], [left:Number], [top:Number], @@ -868,8 +832,7 @@ static void sprite_startDrag(const fn_call& fn) { - assert( dynamic_cast(fn.this_ptr) ); - sprite_instance* sprite = static_cast(fn.this_ptr); + sprite_instance* sprite = ensure_sprite(fn.this_ptr); UNUSED(sprite); log_error("FIXME: MovieClip.startDrag() not implemented yet"); @@ -879,8 +842,7 @@ static void sprite_stopDrag(const fn_call& fn) { - assert( dynamic_cast(fn.this_ptr) ); - sprite_instance* sprite = static_cast(fn.this_ptr); + sprite_instance* sprite = ensure_sprite(fn.this_ptr); UNUSED(sprite); log_error("FIXME: MovieClip.stopDrag() not implemented yet"); @@ -898,8 +860,7 @@ static void character_x_getset(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - character* ptr = static_cast(fn.this_ptr); + character* ptr = ensure_character(fn.this_ptr); if ( fn.nargs == 0 ) // getter { @@ -920,8 +881,7 @@ static void character_y_getset(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - character* ptr = static_cast(fn.this_ptr); + character* ptr = ensure_character(fn.this_ptr); if ( fn.nargs == 0 ) // getter { @@ -942,8 +902,7 @@ static void character_xscale_getset(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - character* ptr = static_cast(fn.this_ptr); + character* ptr = ensure_character(fn.this_ptr); if ( fn.nargs == 0 ) // getter { @@ -994,8 +953,7 @@ static void character_yscale_getset(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - character* ptr = static_cast(fn.this_ptr); + character* ptr = ensure_character(fn.this_ptr); if ( fn.nargs == 0 ) // getter { @@ -1046,8 +1004,7 @@ static void character_xmouse_getset(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - character* ptr = static_cast(fn.this_ptr); + character* ptr = ensure_character(fn.this_ptr); if ( fn.nargs == 0 ) // getter { @@ -1076,8 +1033,7 @@ static void character_ymouse_getset(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - character* ptr = static_cast(fn.this_ptr); + character* ptr = ensure_character(fn.this_ptr); if ( fn.nargs == 0 ) // getter { @@ -1106,8 +1062,7 @@ static void character_alpha_getset(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - character* ptr = static_cast(fn.this_ptr); + character* ptr = ensure_character(fn.this_ptr); if ( fn.nargs == 0 ) // getter { @@ -1128,8 +1083,7 @@ static void character_visible_getset(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - character* ptr = static_cast(fn.this_ptr); + character* ptr = ensure_character(fn.this_ptr); if ( fn.nargs == 0 ) // getter { @@ -1147,8 +1101,7 @@ static void character_width_getset(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - character* ptr = static_cast(fn.this_ptr); + character* ptr = ensure_character(fn.this_ptr); if ( fn.nargs == 0 ) // getter { @@ -1173,8 +1126,7 @@ static void character_height_getset(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - character* ptr = static_cast(fn.this_ptr); + character* ptr = ensure_character(fn.this_ptr); if ( fn.nargs == 0 ) // getter { @@ -1199,8 +1151,7 @@ static void character_rotation_getset(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - character* ptr = static_cast(fn.this_ptr); + character* ptr = ensure_character(fn.this_ptr); if ( fn.nargs == 0 ) // getter { @@ -1233,8 +1184,7 @@ static void character_parent_getset(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - character* ptr = static_cast(fn.this_ptr); + character* ptr = ensure_character(fn.this_ptr); if ( fn.nargs == 0 ) // getter { @@ -1253,8 +1203,7 @@ static void sprite_currentframe_getset(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - sprite_instance* ptr = static_cast(fn.this_ptr); + sprite_instance* ptr = ensure_sprite(fn.this_ptr); if ( fn.nargs == 0 ) // getter { @@ -1272,8 +1221,7 @@ static void sprite_totalframes_getset(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - sprite_instance* ptr = static_cast(fn.this_ptr); + sprite_instance* ptr = ensure_sprite(fn.this_ptr); if ( fn.nargs == 0 ) // getter { @@ -1291,8 +1239,7 @@ static void sprite_framesloaded_getset(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - sprite_instance* ptr = static_cast(fn.this_ptr); + sprite_instance* ptr = ensure_sprite(fn.this_ptr); if ( fn.nargs == 0 ) // getter { @@ -1310,8 +1257,7 @@ static void sprite_target_getset(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - sprite_instance* ptr = static_cast(fn.this_ptr); + sprite_instance* ptr = ensure_sprite(fn.this_ptr); if ( fn.nargs == 0 ) // getter { @@ -1329,8 +1275,7 @@ static void sprite_name_getset(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - sprite_instance* ptr = static_cast(fn.this_ptr); + sprite_instance* ptr = ensure_sprite(fn.this_ptr); if ( fn.nargs == 0 ) // getter { @@ -1338,7 +1283,7 @@ const std::string& name = ptr->get_name(); if ( vm.getSWFVersion() < 6 && name.empty() ) { - fn.result->set_undefined(); + return; } else { @@ -1357,8 +1302,7 @@ static void sprite_droptarget_getset(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - sprite_instance* ptr = static_cast(fn.this_ptr); + sprite_instance* ptr = ensure_sprite(fn.this_ptr); UNUSED(ptr); if ( fn.nargs == 0 ) // getter @@ -1377,7 +1321,7 @@ } else { - fn.result->set_undefined(); + return; } } else // setter @@ -1392,8 +1336,7 @@ static void sprite_url_getset(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - sprite_instance* ptr = static_cast(fn.this_ptr); + sprite_instance* ptr = ensure_sprite(fn.this_ptr); if ( fn.nargs == 0 ) // getter { @@ -1411,15 +1354,11 @@ static void sprite_onrollover_getset(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - sprite_instance* ptr = static_cast(fn.this_ptr); + sprite_instance* ptr = ensure_sprite(fn.this_ptr); if ( fn.nargs == 0 ) // getter { - if ( ! ptr->get_event_handler(event_id::ROLL_OVER, fn.result) ) - { - fn.result->set_undefined(); - } + ptr->get_event_handler(event_id::ROLL_OVER, fn.result); } else // setter { @@ -1431,15 +1370,11 @@ static void sprite_onrollout_getset(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - sprite_instance* ptr = static_cast(fn.this_ptr); + sprite_instance* ptr = ensure_sprite(fn.this_ptr); if ( fn.nargs == 0 ) // getter { - if ( ! ptr->get_event_handler(event_id::ROLL_OUT, fn.result) ) - { - fn.result->set_undefined(); - } + ptr->get_event_handler(event_id::ROLL_OUT, fn.result); } else // setter { @@ -1450,15 +1385,11 @@ static void sprite_onload_getset(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - sprite_instance* ptr = static_cast(fn.this_ptr); + sprite_instance* ptr = ensure_sprite(fn.this_ptr); if ( fn.nargs == 0 ) // getter { - if ( ! ptr->get_event_handler(event_id::LOAD, fn.result) ) - { - fn.result->set_undefined(); - } + ptr->get_event_handler(event_id::LOAD, fn.result); } else // setter { @@ -1469,8 +1400,7 @@ static void sprite_highquality_getset(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - sprite_instance* ptr = static_cast(fn.this_ptr); + sprite_instance* ptr = ensure_sprite(fn.this_ptr); UNUSED(ptr); if ( fn.nargs == 0 ) // getter @@ -1491,8 +1421,7 @@ static void sprite_focusrect_getset(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - sprite_instance* ptr = static_cast(fn.this_ptr); + sprite_instance* ptr = ensure_sprite(fn.this_ptr); UNUSED(ptr); if ( fn.nargs == 0 ) // getter @@ -1514,8 +1443,7 @@ static void sprite_soundbuftime_getset(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - sprite_instance* ptr = static_cast(fn.this_ptr); + sprite_instance* ptr = ensure_sprite(fn.this_ptr); UNUSED(ptr); if ( fn.nargs == 0 ) // getter Index: server/asobj/Date.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/Date.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -b -r1.6 -r1.7 --- server/asobj/Date.cpp 18 Jan 2007 22:53:21 -0000 1.6 +++ server/asobj/Date.cpp 23 Jan 2007 17:17:14 -0000 1.7 @@ -24,6 +24,7 @@ #include "log.h" #include "Date.h" #include "fn_call.h" +#include "GnashException.h" #include @@ -338,7 +339,6 @@ date_obj->init_member("setUTCSeconds", &date_setutcseconds); date_obj->init_member("setYear", &date_setyear); date_obj->init_member("toString", &date_tostring); - date_obj->init_member("UTC", &date_utc); struct tm *ti; if (fn.nargs == 0) { @@ -374,113 +374,108 @@ fn.result->set_as_object(date_obj); } + +// Wrapper around dynamic_cast to implement user warning. +// To be used by builtin properties and methods. +static date_as_object* +ensure_date_object(as_object* obj) +{ + date_as_object* ret = dynamic_cast(obj); + if ( ! ret ) + { + throw ActionException("builtin method or gettersetter for date objects called against non-date instance"); + } + return ret; +} + void date_getdate(const fn_call& fn) { - assert(fn.nargs == 0); - date_as_object* date = (date_as_object*) (as_object*) fn.this_ptr; + date_as_object* date = ensure_date_object(fn.this_ptr); fn.result->set_int(date->obj.date); } void date_getday(const fn_call& fn) { - assert(fn.nargs == 0); - date_as_object* date = (date_as_object*) (as_object*) fn.this_ptr; + date_as_object* date = ensure_date_object(fn.this_ptr); fn.result->set_int(date->obj.dayWeek); } void date_getfullyear(const fn_call& fn) { - assert(fn.nargs == 0); - date_as_object* date = (date_as_object*) (as_object*) fn.this_ptr; + date_as_object* date = ensure_date_object(fn.this_ptr); fn.result->set_int(date->obj.year + 1900); } void date_gethours(const fn_call& fn) { - assert(fn.nargs == 0); - date_as_object* date = (date_as_object*) (as_object*) fn.this_ptr; + date_as_object* date = ensure_date_object(fn.this_ptr); fn.result->set_int(date->obj.hour); } void date_getmilliseconds(const fn_call& fn) { - assert(fn.nargs == 0); - date_as_object* date = (date_as_object*) (as_object*) fn.this_ptr; + date_as_object* date = ensure_date_object(fn.this_ptr); fn.result->set_int(date->obj.millisecond); } void date_getminutes(const fn_call& fn) { - assert(fn.nargs == 0); - date_as_object* date = (date_as_object*) (as_object*) fn.this_ptr; + date_as_object* date = ensure_date_object(fn.this_ptr); fn.result->set_int(date->obj.minute); } void date_getmonth(const fn_call& fn) { - assert(fn.nargs == 0); - date_as_object* date = (date_as_object*) (as_object*) fn.this_ptr; + date_as_object* date = ensure_date_object(fn.this_ptr); fn.result->set_int(date->obj.month); } void date_getseconds(const fn_call& fn) { - assert(fn.nargs == 0); - date_as_object* date = (date_as_object*) (as_object*) fn.this_ptr; + date_as_object* date = ensure_date_object(fn.this_ptr); fn.result->set_int(date->obj.second); } void date_gettime(const fn_call& fn) { - assert(fn.nargs == 0); - date_as_object* date = (date_as_object*) (as_object*) fn.this_ptr; + date_as_object* date = ensure_date_object(fn.this_ptr); fn.result->set_double(date->obj.getTime()); } void date_gettimezoneoffset(const fn_call& fn) { - assert(fn.nargs == 0); - date_as_object* date = (date_as_object*) (as_object*) fn.this_ptr; + date_as_object* date = ensure_date_object(fn.this_ptr); fn.result->set_int(date->obj.minutesEast); } void date_getutcdate(const fn_call& fn) { - assert(fn.nargs == 0); - date_as_object* date = (date_as_object*) (as_object*) fn.this_ptr; + date_as_object* date = ensure_date_object(fn.this_ptr); tm result = date->obj.convertUTC(); fn.result->set_int(int(result.tm_mday)); } void date_getutcday(const fn_call& fn) { - assert(fn.nargs == 0); - date_as_object* date = (date_as_object*) (as_object*) fn.this_ptr; + date_as_object* date = ensure_date_object(fn.this_ptr); tm result = date->obj.convertUTC(); fn.result->set_int(int(result.tm_wday)); } void date_getutcfullyear(const fn_call& fn) { - assert(fn.nargs == 0); - date_as_object* date = (date_as_object*) (as_object*) fn.this_ptr; + date_as_object* date = ensure_date_object(fn.this_ptr); tm result = date->obj.convertUTC(); fn.result->set_int(int(result.tm_year)+1900); } void date_getutchours(const fn_call& fn) { - assert(fn.nargs == 0); - date_as_object* date = (date_as_object*) (as_object*) fn.this_ptr; + date_as_object* date = ensure_date_object(fn.this_ptr); tm result = date->obj.convertUTC(); fn.result->set_int(int(result.tm_hour)); } void date_getutcmilliseconds(const fn_call& fn) { - assert(fn.nargs == 0); - date_as_object* date = (date_as_object*) (as_object*) fn.this_ptr; + date_as_object* date = ensure_date_object(fn.this_ptr); // Milliseconds (value between 0 and 999) won't be affected by timezone fn.result->set_int(int(date->obj.millisecond)); } void date_getutcminutes(const fn_call& fn) { - assert(fn.nargs == 0); - date_as_object* date = (date_as_object*) (as_object*) fn.this_ptr; + date_as_object* date = ensure_date_object(fn.this_ptr); tm result = date->obj.convertUTC(); fn.result->set_int(int(result.tm_min)); } void date_getutcmonth(const fn_call& fn) { - assert(fn.nargs == 0); - date_as_object* date = (date_as_object*) (as_object*) fn.this_ptr; + date_as_object* date = ensure_date_object(fn.this_ptr); tm result = date->obj.convertUTC(); fn.result->set_int(int(result.tm_mon)); } void date_getutcseconds(const fn_call& fn) { - assert(fn.nargs == 0); - date_as_object* date = (date_as_object*) (as_object*) fn.this_ptr; + date_as_object* date = ensure_date_object(fn.this_ptr); // Seconds (value between 0 and 59) won't be affected by timezone fn.result->set_int(int(date->obj.second)); } void date_getyear(const fn_call& fn) { - assert(fn.nargs == 0); - date_as_object* date = (date_as_object*) (as_object*) fn.this_ptr; + date_as_object* date = ensure_date_object(fn.this_ptr); fn.result->set_int(date->obj.year); } @@ -493,7 +488,7 @@ // then convert back to local time. We should confirm the official behavior! void date_setdate(const fn_call& fn) { assert(fn.nargs == 1); - date_as_object* date = (date_as_object*) (as_object*) fn.this_ptr; + date_as_object* date = ensure_date_object(fn.this_ptr); date->obj.date = (long int)(fn.arg(0).to_number()); date->obj.Normalize(); @@ -501,7 +496,7 @@ } void date_setfullyear(const fn_call& fn) { assert(fn.nargs >= 1 && fn.nargs <= 3); - date_as_object* date = (date_as_object*) (as_object*) fn.this_ptr; + date_as_object* date = ensure_date_object(fn.this_ptr); date->obj.year = (long int)(fn.arg(0).to_number() - 1900); if (fn.nargs >= 2) date->obj.month = (long int)(fn.arg(1).to_number()); @@ -513,7 +508,7 @@ } void date_sethours(const fn_call& fn) { assert(fn.nargs >= 1 && fn.nargs <= 4); - date_as_object* date = (date_as_object*) (as_object*) fn.this_ptr; + date_as_object* date = ensure_date_object(fn.this_ptr); date->obj.hour = (long int)(fn.arg(0).to_number()); if (fn.nargs >= 2) date->obj.minute = (long int)(fn.arg(1).to_number()); @@ -527,7 +522,7 @@ } void date_setmilliseconds(const fn_call& fn) { assert(fn.nargs == 1); - date_as_object* date = (date_as_object*) (as_object*) fn.this_ptr; + date_as_object* date = ensure_date_object(fn.this_ptr); date->obj.millisecond = (long int)(fn.arg(0).to_number()); date->obj.Normalize(); @@ -535,7 +530,7 @@ } void date_setminutes(const fn_call& fn) { assert(fn.nargs >= 1 && fn.nargs <= 3); - date_as_object* date = (date_as_object*) (as_object*) fn.this_ptr; + date_as_object* date = ensure_date_object(fn.this_ptr); // Seconds (value between 0 and 59) won't be affected by timezone date->obj.minute = (long int)(fn.arg(0).to_number()); if (fn.nargs >= 2) date->obj.second = (long int)(fn.arg(1).to_number()); @@ -546,7 +541,7 @@ } void date_setmonth(const fn_call& fn) { assert(fn.nargs >= 1 && fn.nargs <= 2); - date_as_object* date = (date_as_object*) (as_object*) fn.this_ptr; + date_as_object* date = ensure_date_object(fn.this_ptr); date->obj.month = (long int)(fn.arg(0).to_number()); if (fn.nargs >= 2) date->obj.date = (long int)(fn.arg(1).to_number()); @@ -556,7 +551,7 @@ } void date_setseconds(const fn_call& fn) { assert(fn.nargs >= 1 && fn.nargs <= 2); - date_as_object* date = (date_as_object*) (as_object*) fn.this_ptr; + date_as_object* date = ensure_date_object(fn.this_ptr); // Seconds (value between 0 and 59) won't be affected by timezone date->obj.second = (long int)(fn.arg(0).to_number()); if (fn.nargs >= 2) date->obj.millisecond = (long int)(fn.arg(1).to_number()); @@ -564,12 +559,14 @@ date->obj.Normalize(); fn.result->set_double(date->obj.getTime()); } -void date_settime(const fn_call& /*fn*/) { +void date_settime(const fn_call& fn) { + date_as_object* date = ensure_date_object(fn.this_ptr); + UNUSED(date); log_msg("%s:unimplemented \n", __FUNCTION__); } void date_setutcdate(const fn_call& fn) { assert(fn.nargs == 1); - date_as_object* date = (date_as_object*) (as_object*) fn.this_ptr; + date_as_object* date = ensure_date_object(fn.this_ptr); tm utctime = date->obj.convertUTC(); // Set mday to our new UTC date (yday and wday don't need to be set) @@ -586,7 +583,7 @@ } void date_setutcfullyear(const fn_call& fn) { assert(fn.nargs >= 1 && fn.nargs <= 3); - date_as_object* date = (date_as_object*) (as_object*) fn.this_ptr; + date_as_object* date = ensure_date_object(fn.this_ptr); tm utctime = date->obj.convertUTC(); // Set year to our new UTC date @@ -607,7 +604,7 @@ } void date_setutchours(const fn_call& fn) { assert(fn.nargs >= 1 && fn.nargs <= 4); - date_as_object* date = (date_as_object*) (as_object*) fn.this_ptr; + date_as_object* date = ensure_date_object(fn.this_ptr); if (fn.nargs >= 4) { @@ -634,7 +631,7 @@ } void date_setutcmilliseconds(const fn_call& fn) { assert(fn.nargs == 1); - date_as_object* date = (date_as_object*) (as_object*) fn.this_ptr; + date_as_object* date = ensure_date_object(fn.this_ptr); date->obj.millisecond = (long int)(fn.arg(0).to_number()); date->obj.Normalize(); @@ -642,7 +639,7 @@ } void date_setutcminutes(const fn_call& fn) { assert(fn.nargs >= 1 && fn.nargs <= 3); - date_as_object* date = (date_as_object*) (as_object*) fn.this_ptr; + date_as_object* date = ensure_date_object(fn.this_ptr); // Seconds (value between 0 and 59) won't be affected by timezone date->obj.minute = (long int)(fn.arg(0).to_number()); if (fn.nargs >= 2) date->obj.second = (long int)(fn.arg(1).to_number()); @@ -657,7 +654,7 @@ } void date_setutcmonth(const fn_call& fn) { assert(fn.nargs >= 1 && fn.nargs <= 2); - date_as_object* date = (date_as_object*) (as_object*) fn.this_ptr; + date_as_object* date = ensure_date_object(fn.this_ptr); tm utctime = date->obj.convertUTC(); // Set year to our new UTC date @@ -676,7 +673,7 @@ } void date_setutcseconds(const fn_call& fn) { assert(fn.nargs >= 1 && fn.nargs <= 2); - date_as_object* date = (date_as_object*) (as_object*) fn.this_ptr; + date_as_object* date = ensure_date_object(fn.this_ptr); // Seconds (value between 0 and 59) won't be affected by timezone date->obj.second = (long int)(fn.arg(0).to_number()); if (fn.nargs >= 2) date->obj.millisecond = (long int)(fn.arg(1).to_number()); @@ -686,7 +683,7 @@ } void date_setyear(const fn_call& fn) { assert(fn.nargs == 1); - date_as_object* date = (date_as_object*) (as_object*) fn.this_ptr; + date_as_object* date = ensure_date_object(fn.this_ptr); date->obj.year = (long int)(fn.arg(0).to_number()); date->obj.Normalize(); @@ -700,7 +697,7 @@ {"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"}; char* dayweekname[7] = {"Sun","Mon","Tue","Wed","Thu","Fri","Sat"}; - date_as_object* date = (date_as_object*) (as_object*) fn.this_ptr; + date_as_object* date = ensure_date_object(fn.this_ptr); snprintf((char *)&buffer,128,"%s %s %2ld %.2ld:%.2ld:%.2ld %ld", dayweekname[date->obj.dayWeek],monthname[date->obj.month], @@ -709,9 +706,6 @@ fn.result->set_string((char *)&buffer); } -void date_utc(const fn_call& /*fn*/) { - log_msg("%s:unimplemented \n", __FUNCTION__); -} } // end of gnash namespace From MAILER-DAEMON Tue Jan 23 12:19:38 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H9PJ4-0007vP-Av for mharc-gnash-commit@gnu.org; Tue, 23 Jan 2007 12:19:38 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H9PJ3-0007rH-B3 for gnash-commit@gnu.org; Tue, 23 Jan 2007 12:19:37 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H9PJ1-0007km-Hk for gnash-commit@gnu.org; Tue, 23 Jan 2007 12:19:36 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9PJ1-0007kR-Cx for gnash-commit@gnu.org; Tue, 23 Jan 2007 12:19:35 -0500 Received: from [217.59.8.147] (helo=freek.keybit.net) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.52) id 1H9PJ0-0005uI-NV for gnash-commit@gnu.org; Tue, 23 Jan 2007 12:19:35 -0500 Received: (from strk@localhost) by freek.keybit.net (8.11.1/8.11.1) id l0NHJUS33799; Tue, 23 Jan 2007 18:19:30 +0100 (CET) (envelope-from strk@keybit.net) From: strk Date: Tue, 23 Jan 2007 18:19:30 +0100 To: Tomas Groth Subject: Re: [Gnash-commit] gnash ChangeLog backend/sound_handler_sdl.cpp s... Message-ID: <20070123171930.GC15888@keybit.net> Mail-Followup-To: Tomas Groth , gnash-commit@gnu.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: gnash-commit@gnu.org X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jan 2007 17:19:37 -0000 On Tue, Jan 23, 2007 at 04:41:28PM +0000, Tomas Groth wrote: > CVSROOT: /sources/gnash > Module name: gnash > Changes by: Tomas Groth 07/01/23 16:41:28 > > Modified files: > . : ChangeLog > backend : sound_handler_sdl.cpp > server/asobj : Global.cpp NetConnection.h NetStream.cpp > NetStream.h NetStreamFfmpeg.cpp > NetStreamFfmpeg.h NetStreamGst.cpp > NetStreamGst.h Build here broke after this commit: /home/strk/src/gnash/gnash-head/server/asobj/NetStreamGst.cpp: In member function 'void gnash::NetStreamGst::seek(double)': /home/strk/src/gnash/gnash-head/server/asobj/NetStreamGst.cpp:360: error: 'gst_element_seek_simple' was not declared in this scope /home/strk/src/gnash/gnash-head/server/asobj/NetStreamGst.cpp: In member function 'long int gnash::NetStreamGst::time()': /home/strk/src/gnash/gnash-head/server/asobj/NetStreamGst.cpp:387: error: cannot convert 'long int*' to 'gint64*' for argument '3' to 'gboolean gst_element_que ry_position(GstElement*, GstFormat*, gint64*)' /home/strk/src/gnash/gnash-head/server/asobj/NetStreamGst.cpp:392: warning: control reaches end of non-void function Worked fine before. Installed version: ii libgstreamer0.10-dev 0.10.6-0ubuntu2 GStreamer core development files --strk; From MAILER-DAEMON Tue Jan 23 12:26:13 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H9PPR-0005QU-9h for mharc-gnash-commit@gnu.org; Tue, 23 Jan 2007 12:26:13 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H9PPP-0005Q3-By for gnash-commit@gnu.org; Tue, 23 Jan 2007 12:26:11 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H9PPN-0005Pr-UZ for gnash-commit@gnu.org; Tue, 23 Jan 2007 12:26:10 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9PPN-0005Po-Pa for gnash-commit@gnu.org; Tue, 23 Jan 2007 12:26:09 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H9PPN-0007Lv-Hn for gnash-commit@gnu.org; Tue, 23 Jan 2007 12:26:09 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H9PPN-00062y-67 for gnash-commit@gnu.org; Tue, 23 Jan 2007 17:26:09 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H9PPM-00062v-QB for gnash-commit@gnu.org; Tue, 23 Jan 2007 17:26:09 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Tue, 23 Jan 2007 17:26:08 +0000 Subject: [Gnash-commit] gnash ChangeLog server/vm/action.cpp X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jan 2007 17:26:11 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/23 17:26:08 Modified files: . : ChangeLog server/vm : action.cpp Log message: * server/vm/action.cpp (call_method): catch ActionException so return for invalid calls is always undefined. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2157&r2=1.2158 http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/action.cpp?cvsroot=gnash&r1=1.5&r2=1.6 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2157 retrieving revision 1.2158 diff -u -b -r1.2157 -r1.2158 --- ChangeLog 23 Jan 2007 17:17:14 -0000 1.2157 +++ ChangeLog 23 Jan 2007 17:26:08 -0000 1.2158 @@ -4,6 +4,8 @@ * server/sprite_instance.cpp, server/asobj/Date.cpp: throw an ActionException if methods or gettersetter properties are invoked against the wrong instance type. + * server/vm/action.cpp (call_method): catch ActionException + so return for invalid calls is always undefined. 2007-01-23 Tomas Groth Christensen Index: server/vm/action.cpp =================================================================== RCS file: /sources/gnash/gnash/server/vm/action.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -b -r1.5 -r1.6 --- server/vm/action.cpp 18 Jan 2007 22:53:22 -0000 1.5 +++ server/vm/action.cpp 23 Jan 2007 17:26:08 -0000 1.6 @@ -233,6 +233,8 @@ as_value val; fn_call call(&val, this_ptr, env, nargs, first_arg_bottom_index); + try + { if ( as_c_function_ptr func = method.to_c_function() ) { // It's a C function. Call it. @@ -245,11 +247,14 @@ } else { + throw ActionException("Attempt to call a value which is neither a C nor an ActionScript function"); + } + } + catch (ActionException& ex) + { + assert(val.is_undefined()); IF_VERBOSE_ASCODING_ERRORS( - log_warning( - "error in call_method(): " - "'%s' is neither a C nor an ActionScript function\n", - method.to_string()); + log_aserror("%s", ex.what()); ); } From MAILER-DAEMON Tue Jan 23 12:43:16 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H9Pfw-0003lj-1f for mharc-gnash-commit@gnu.org; Tue, 23 Jan 2007 12:43:16 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H9Pfu-0003lZ-L4 for gnash-commit@gnu.org; Tue, 23 Jan 2007 12:43:14 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H9Pfu-0003lJ-0W for gnash-commit@gnu.org; Tue, 23 Jan 2007 12:43:14 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9Pft-0003l9-P5 for gnash-commit@gnu.org; Tue, 23 Jan 2007 12:43:13 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H9Pft-00024H-0G for gnash-commit@gnu.org; Tue, 23 Jan 2007 12:43:13 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H9Pfp-0007i0-NC for gnash-commit@gnu.org; Tue, 23 Jan 2007 17:43:09 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H9Pfp-0007hx-FS for gnash-commit@gnu.org; Tue, 23 Jan 2007 17:43:09 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Tue, 23 Jan 2007 17:43:09 +0000 Subject: [Gnash-commit] gnash ChangeLog testsuite/actionscript.all/Date.as X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jan 2007 17:43:14 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/23 17:43:09 Modified files: . : ChangeLog testsuite/actionscript.all: Date.as Log message: * testsuite/actionscript.all/Date.as: don't expect a failure on dateInstance.UTC being undefined. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2158&r2=1.2159 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Date.as?cvsroot=gnash&r1=1.12&r2=1.13 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2158 retrieving revision 1.2159 diff -u -b -r1.2158 -r1.2159 --- ChangeLog 23 Jan 2007 17:26:08 -0000 1.2158 +++ ChangeLog 23 Jan 2007 17:43:09 -0000 1.2159 @@ -6,6 +6,8 @@ against the wrong instance type. * server/vm/action.cpp (call_method): catch ActionException so return for invalid calls is always undefined. + * testsuite/actionscript.all/Date.as: don't expect a failure + on dateInstance.UTC being undefined. 2007-01-23 Tomas Groth Christensen Index: testsuite/actionscript.all/Date.as =================================================================== RCS file: /sources/gnash/gnash/testsuite/actionscript.all/Date.as,v retrieving revision 1.12 retrieving revision 1.13 diff -u -b -r1.12 -r1.13 --- testsuite/actionscript.all/Date.as 24 Nov 2006 23:08:57 -0000 1.12 +++ testsuite/actionscript.all/Date.as 23 Jan 2007 17:43:09 -0000 1.13 @@ -20,7 +20,7 @@ // compile this test case with Ming makeswf, and then // execute it like this gnash -1 -r 0 -v out.swf -rcsid="$Id: Date.as,v 1.12 2006/11/24 23:08:57 strk Exp $"; +rcsid="$Id: Date.as,v 1.13 2007/01/23 17:43:09 strk Exp $"; #include "check.as" @@ -67,7 +67,7 @@ check (date.setUTCSeconds != undefined); check (date.setYear != undefined); check (date.toString != undefined); -xcheck_equals (date.UTC, undefined); +check_equals (date.UTC, undefined); #if OUTPUT_VERSION > 6 xcheck(Date.UTC != undefined); From MAILER-DAEMON Tue Jan 23 12:49:55 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H9PmN-00085C-Fv for mharc-gnash-commit@gnu.org; Tue, 23 Jan 2007 12:49:55 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H9PmM-00083W-CN for gnash-commit@gnu.org; Tue, 23 Jan 2007 12:49:54 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H9PmL-00082U-JC for gnash-commit@gnu.org; Tue, 23 Jan 2007 12:49:53 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9PmL-00082L-5A for gnash-commit@gnu.org; Tue, 23 Jan 2007 12:49:53 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H9PmJ-0003oe-U6 for gnash-commit@gnu.org; Tue, 23 Jan 2007 12:49:52 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H9PmJ-0007q3-FG for gnash-commit@gnu.org; Tue, 23 Jan 2007 17:49:51 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H9PmJ-0007q0-5m for gnash-commit@gnu.org; Tue, 23 Jan 2007 17:49:51 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Tue, 23 Jan 2007 17:49:51 +0000 Subject: [Gnash-commit] gnash ChangeLog testsuite/actionscript.all/Inhe... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jan 2007 17:49:54 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/23 17:49:51 Modified files: . : ChangeLog testsuite/actionscript.all: Inheritance.as Log message: * testsuite/actionscript.all/Inheritance.as: Test access of builtin methods or gettersetter properties from user defined objects. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2159&r2=1.2160 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Inheritance.as?cvsroot=gnash&r1=1.19&r2=1.20 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2159 retrieving revision 1.2160 diff -u -b -r1.2159 -r1.2160 --- ChangeLog 23 Jan 2007 17:43:09 -0000 1.2159 +++ ChangeLog 23 Jan 2007 17:49:50 -0000 1.2160 @@ -8,6 +8,9 @@ so return for invalid calls is always undefined. * testsuite/actionscript.all/Date.as: don't expect a failure on dateInstance.UTC being undefined. + * testsuite/actionscript.all/Inheritance.as: Test access of + builtin methods or gettersetter properties from user defined + objects. 2007-01-23 Tomas Groth Christensen Index: testsuite/actionscript.all/Inheritance.as =================================================================== RCS file: /sources/gnash/gnash/testsuite/actionscript.all/Inheritance.as,v retrieving revision 1.19 retrieving revision 1.20 diff -u -b -r1.19 -r1.20 --- testsuite/actionscript.all/Inheritance.as 23 Jan 2007 12:40:21 -0000 1.19 +++ testsuite/actionscript.all/Inheritance.as 23 Jan 2007 17:49:51 -0000 1.20 @@ -20,7 +20,7 @@ // compile this test case with Ming makeswf, and then // execute it like this gnash -1 -r 0 -v out.swf -rcsid="$Id: Inheritance.as,v 1.19 2007/01/23 12:40:21 strk Exp $"; +rcsid="$Id: Inheritance.as,v 1.20 2007/01/23 17:49:51 strk Exp $"; #include "check.as" @@ -217,8 +217,53 @@ extends }; var myInstance = new MyClass(); -myInstance._x = 4; -check_equals(myInstance._x, 4); +check(_root instanceOf MovieClip); +check_equals(MyClass.prototype.constructor, MovieClip); +check_equals(myInstance.__proto__, MyClass.prototype); +check_equals(typeof(MovieClip.prototype._x), 'undefined'); #endif // MING_SUPPORTS_ASM_EXTENDS +//------------------------------------------------ +// Test access of builtin methods or getter/setter +// from a user-defined instance. +//------------------------------------------------ + +function Test() {} +xcheck_equals(typeof(Date.prototype), 'object'); +Test.prototype = new Date(); +var t = new Test; +check_equals(typeof(t.getYear), 'function'); +check_equals(typeof(t.setYear), 'function'); +t.setYear(2007); +check_equals(typeof(t.getYear()), 'undefined'); + +var t2 = new Object; +t2.__proto__ = Date.prototype; +xcheck_equals(typeof(t2.getYear), 'function'); +xcheck_equals(typeof(t2.setYear), 'function'); +t2.setYear(2007); +check_equals(typeof(t2.getYear()), 'undefined'); + +var t3 = new Object; +t3.__proto__ = MovieClip.prototype; +check_equals(typeof(t4.gotoAndStop), 'undefined'); +check_equals(typeof(t3._currentframe), 'undefined'); +t3._currentframe = 10; +check_equals(typeof(t3._currentframe), 'number'); + +function Test4() {} +Test3.prototype = new MovieClip; +var t4 = new Test4; +check_equals(typeof(t4.gotoAndStop), 'undefined'); +check_equals(typeof(t4._currentframe), 'undefined'); +t4._currentframe = 10; +check_equals(typeof(t4._currentframe), 'number'); + +check_equals(typeof(_root.gotoAndPlay), 'function'); +t4.die = _root.gotoAndPlay; +check_equals(typeof(t4.die), 'function'); +var b = t4.die(4); +check_equals(typeof(b), 'undefined'); + + From MAILER-DAEMON Tue Jan 23 13:02:52 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H9Pyt-0006Ya-Rs for mharc-gnash-commit@gnu.org; Tue, 23 Jan 2007 13:02:51 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H9Pys-0006Xo-03 for gnash-commit@gnu.org; Tue, 23 Jan 2007 13:02:50 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H9Pyq-0006WY-1Q for gnash-commit@gnu.org; Tue, 23 Jan 2007 13:02:49 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9Pyp-0006WQ-NO for gnash-commit@gnu.org; Tue, 23 Jan 2007 13:02:47 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H9Pyp-00063C-5P for gnash-commit@gnu.org; Tue, 23 Jan 2007 13:02:47 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H9Pyo-00082s-80 for gnash-commit@gnu.org; Tue, 23 Jan 2007 18:02:46 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H9Pyo-00082p-19 for gnash-commit@gnu.org; Tue, 23 Jan 2007 18:02:46 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Tue, 23 Jan 2007 18:02:46 +0000 Subject: [Gnash-commit] gnash ChangeLog testsuite/generic-testrunner.sh X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jan 2007 18:02:50 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/23 18:02:45 Modified files: . : ChangeLog testsuite : generic-testrunner.sh Log message: * testsuite/generic-testrunner.sh: be more verbose about exit failures. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2160&r2=1.2161 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/generic-testrunner.sh?cvsroot=gnash&r1=1.5&r2=1.6 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2160 retrieving revision 1.2161 diff -u -b -r1.2160 -r1.2161 --- ChangeLog 23 Jan 2007 17:49:50 -0000 1.2160 +++ ChangeLog 23 Jan 2007 18:02:45 -0000 1.2161 @@ -1,5 +1,10 @@ 2007-01-23 Sandro Santilli + * testsuite/generic-testrunner.sh: be more verbose about + exit failures. + +2007-01-23 Sandro Santilli + * libbase/GnashException.h: add ActionException class. * server/sprite_instance.cpp, server/asobj/Date.cpp: throw an ActionException if methods or gettersetter properties are invoked Index: testsuite/generic-testrunner.sh =================================================================== RCS file: /sources/gnash/gnash/testsuite/generic-testrunner.sh,v retrieving revision 1.5 retrieving revision 1.6 diff -u -b -r1.5 -r1.6 --- testsuite/generic-testrunner.sh 30 Dec 2006 22:31:37 -0000 1.5 +++ testsuite/generic-testrunner.sh 23 Jan 2007 18:02:45 -0000 1.6 @@ -36,6 +36,6 @@ #!/bin/sh for t in ${testfiles}; do echo "NOTE: Running test \${t}" - ${top_builddir}/utilities/gprocessor -r${runs} -v \${t} || echo "FAILED: gprocessor returned an error" + ${top_builddir}/utilities/gprocessor -r${runs} -v \${t} || echo "FAILED: gprocessor returned an error while playing '\${t}'" done EOF From MAILER-DAEMON Tue Jan 23 14:29:41 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H9RKv-0005Dw-0W for mharc-gnash-commit@gnu.org; Tue, 23 Jan 2007 14:29:41 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H9RKt-0005Ak-8H for gnash-commit@gnu.org; Tue, 23 Jan 2007 14:29:39 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H9RKr-0005AP-MJ for gnash-commit@gnu.org; Tue, 23 Jan 2007 14:29:38 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9RKr-0005AM-Jd for gnash-commit@gnu.org; Tue, 23 Jan 2007 14:29:37 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H9RKr-0006ei-9K for gnash-commit@gnu.org; Tue, 23 Jan 2007 14:29:37 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H9RKq-0002Xn-2Z for gnash-commit@gnu.org; Tue, 23 Jan 2007 19:29:36 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H9RKp-0002Xk-Re for gnash-commit@gnu.org; Tue, 23 Jan 2007 19:29:35 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Tue, 23 Jan 2007 19:29:35 +0000 Subject: [Gnash-commit] gnash ChangeLog server/as_object.cpp X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jan 2007 19:29:39 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/23 19:29:35 Modified files: . : ChangeLog server : as_object.cpp Log message: * server/as_object.cpp ({get,set}_member_default): handle ActionExceptions. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2161&r2=1.2162 http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_object.cpp?cvsroot=gnash&r1=1.28&r2=1.29 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2161 retrieving revision 1.2162 diff -u -b -r1.2161 -r1.2162 --- ChangeLog 23 Jan 2007 18:02:45 -0000 1.2161 +++ ChangeLog 23 Jan 2007 19:29:35 -0000 1.2162 @@ -1,5 +1,7 @@ 2007-01-23 Sandro Santilli + * server/as_object.cpp ({get,set}_member_default): + handle ActionExceptions. * testsuite/generic-testrunner.sh: be more verbose about exit failures. Index: server/as_object.cpp =================================================================== RCS file: /sources/gnash/gnash/server/as_object.cpp,v retrieving revision 1.28 retrieving revision 1.29 diff -u -b -r1.28 -r1.29 --- server/as_object.cpp 23 Jan 2007 12:12:29 -0000 1.28 +++ server/as_object.cpp 23 Jan 2007 19:29:35 -0000 1.29 @@ -29,6 +29,7 @@ #include "as_environment.h" // for enumerateProperties #include "Property.h" // for findGetterSetter #include "VM.h" +#include "GnashException.h" #include #include @@ -114,8 +115,16 @@ Property* prop = findProperty(name); if ( ! prop ) return false; + try + { *val = prop->getValue(*this); return true; + } + catch (ActionException& exc) + { + log_warning("%s", exc.what()); + return false; + } } @@ -191,12 +200,19 @@ Property* prop = findGetterSetter(key); if ( prop ) { + try + { //log_msg("Found a getter/setter property for key %s", key.c_str()); // TODO: have setValue check for read-only property // and warn if failed prop->setValue(*this, val); return; } + catch (ActionException& exc) + { + log_warning("%s", exc.what()); + } + } //log_msg("Found NO getter/setter property for key %s", key.c_str()); From MAILER-DAEMON Tue Jan 23 16:37:45 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H9TKr-0005oz-Nu for mharc-gnash-commit@gnu.org; Tue, 23 Jan 2007 16:37:45 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H9TKp-0005na-LN for gnash-commit@gnu.org; Tue, 23 Jan 2007 16:37:43 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H9TKi-0005js-V1 for gnash-commit@gnu.org; Tue, 23 Jan 2007 16:37:43 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9TKi-0005jl-Nd for gnash-commit@gnu.org; Tue, 23 Jan 2007 16:37:36 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H9TKV-0004WP-Cv for gnash-commit@gnu.org; Tue, 23 Jan 2007 16:37:30 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H9TKO-0001kC-FT for gnash-commit@gnu.org; Tue, 23 Jan 2007 21:37:16 +0000 Received: from tgc by savannah.gnu.org with local (Exim 4.50) id 1H9TKO-0001k9-96 for gnash-commit@gnu.org; Tue, 23 Jan 2007 21:37:16 +0000 To: gnash-commit@gnu.org Message-Id: From: Tomas Groth Date: Tue, 23 Jan 2007 21:37:16 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash ChangeLog server/asobj/NetStream.h server... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jan 2007 21:37:44 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Tomas Groth 07/01/23 21:37:16 Modified files: . : ChangeLog server/asobj : NetStream.h NetStreamFfmpeg.cpp NetStreamFfmpeg.h NetStreamGst.cpp NetStreamGst.h Log message: * server/asobj/NetStream.{h,cpp}, server/asobj/NetStreamFfmpeg.{cpp.h}: Use int64_t instead of long. * server/asobj/NetStreamGst.{cpp,h}: Use int64_t instead of long. Switched to use gst_element_seek() for seeking, which is supported by older version of gstreamer. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2162&r2=1.2163 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStream.h?cvsroot=gnash&r1=1.18&r2=1.19 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStreamFfmpeg.cpp?cvsroot=gnash&r1=1.8&r2=1.9 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStreamFfmpeg.h?cvsroot=gnash&r1=1.4&r2=1.5 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStreamGst.cpp?cvsroot=gnash&r1=1.5&r2=1.6 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStreamGst.h?cvsroot=gnash&r1=1.4&r2=1.5 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2162 retrieving revision 1.2163 diff -u -b -r1.2162 -r1.2163 --- ChangeLog 23 Jan 2007 19:29:35 -0000 1.2162 +++ ChangeLog 23 Jan 2007 21:37:15 -0000 1.2163 @@ -1,3 +1,11 @@ +2007-01-23 Tomas Groth Christensen + + * server/asobj/NetStream.{h,cpp}, server/asobj/NetStreamFfmpeg.{cpp.h}: + Use int64_t instead of long. + * server/asobj/NetStreamGst.{cpp,h}: Use int64_t instead of long. + Switched to use gst_element_seek() for seeking, which is supported by + older version of gstreamer. + 2007-01-23 Sandro Santilli * server/as_object.cpp ({get,set}_member_default): Index: server/asobj/NetStream.h =================================================================== RCS file: /sources/gnash/gnash/server/asobj/NetStream.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -b -r1.18 -r1.19 --- server/asobj/NetStream.h 23 Jan 2007 16:41:28 -0000 1.18 +++ server/asobj/NetStream.h 23 Jan 2007 21:37:16 -0000 1.19 @@ -18,7 +18,7 @@ // // -/* $Id: NetStream.h,v 1.18 2007/01/23 16:41:28 tgc Exp $ */ +/* $Id: NetStream.h,v 1.19 2007/01/23 21:37:16 tgc Exp $ */ #ifndef __NETSTREAM_H__ #define __NETSTREAM_H__ @@ -50,7 +50,7 @@ void set_status(const char* /*code*/){} void setNetCon(as_object* /*nc*/) {} image::image_base* get_video(){ return NULL; } - long time() { return 0; } + int64_t time() { return 0; } inline void set_parent(netstream_as_object* /*ns*/) { Index: server/asobj/NetStreamFfmpeg.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/NetStreamFfmpeg.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -b -r1.8 -r1.9 --- server/asobj/NetStreamFfmpeg.cpp 23 Jan 2007 16:41:28 -0000 1.8 +++ server/asobj/NetStreamFfmpeg.cpp 23 Jan 2007 21:37:16 -0000 1.9 @@ -14,7 +14,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -/* $Id: NetStreamFfmpeg.cpp,v 1.8 2007/01/23 16:41:28 tgc Exp $ */ +/* $Id: NetStreamFfmpeg.cpp,v 1.9 2007/01/23 21:37:16 tgc Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -728,12 +728,12 @@ log_msg("%s:unimplemented \n", __FUNCTION__); } -long +int64_t NetStreamFfmpeg::time() { if (m_FormatCtx && m_FormatCtx->nb_streams > 0) { double time = (double)m_FormatCtx->streams[0]->time_base.num / (double)m_FormatCtx->streams[0]->time_base.den * (double)m_FormatCtx->streams[0]->cur_dts; - return (long) time; + return static_cast(time); } else { return 0; } Index: server/asobj/NetStreamFfmpeg.h =================================================================== RCS file: /sources/gnash/gnash/server/asobj/NetStreamFfmpeg.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- server/asobj/NetStreamFfmpeg.h 23 Jan 2007 16:41:28 -0000 1.4 +++ server/asobj/NetStreamFfmpeg.h 23 Jan 2007 21:37:16 -0000 1.5 @@ -14,7 +14,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -/* $Id: NetStreamFfmpeg.h,v 1.4 2007/01/23 16:41:28 tgc Exp $ */ +/* $Id: NetStreamFfmpeg.h,v 1.5 2007/01/23 21:37:16 tgc Exp $ */ #ifndef __NETSTREAMFFMPEG_H__ #define __NETSTREAMFFMPEG_H__ @@ -161,7 +161,7 @@ void setBufferTime(); void set_status(const char* code); void setNetCon(as_object* nc); - long time(); + int64_t time(); // Used for ffmpeg data read and seek callbacks static int readPacket(void* opaque, uint8_t* buf, int buf_size); Index: server/asobj/NetStreamGst.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/NetStreamGst.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -b -r1.5 -r1.6 --- server/asobj/NetStreamGst.cpp 23 Jan 2007 16:41:28 -0000 1.5 +++ server/asobj/NetStreamGst.cpp 23 Jan 2007 21:37:16 -0000 1.6 @@ -357,8 +357,10 @@ NetStreamGst::seek(double pos) { - if (!gst_element_seek_simple(pipeline, GST_FORMAT_TIME, GST_SEEK_FLAG_KEY_UNIT, GST_SECOND * static_cast(pos))) { - log_warning("seek failed"); + if (!gst_element_seek (pipeline, 1.0, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH, + GST_SEEK_TYPE_SET, GST_SECOND * static_cast(pos), + GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE)) { + log_warning("Seek failed"); } } @@ -368,21 +370,18 @@ log_msg("%s:unimplemented \n", __FUNCTION__); } -long +int64_t NetStreamGst::time() { if (!pipeline) return 0; GstFormat fmt = GST_FORMAT_TIME; - long pos; + int64_t pos; GstStateChangeReturn ret; GstState current, pending; ret = gst_element_get_state (GST_ELEMENT (pipeline), ¤t, &pending, 0); -// fail_unless (ret == GST_STATE_CHANGE_ASYNC, "not changing state async"); -// fail_unless (current == GST_STATE_READY, "bad current state"); -// fail_unless (pending == GST_STATE_PLAYING, "bad pending state"); if (current != GST_STATE_NULL && gst_element_query_position (pipeline, &fmt, &pos)) { return pos; Index: server/asobj/NetStreamGst.h =================================================================== RCS file: /sources/gnash/gnash/server/asobj/NetStreamGst.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- server/asobj/NetStreamGst.h 23 Jan 2007 16:41:28 -0000 1.4 +++ server/asobj/NetStreamGst.h 23 Jan 2007 21:37:16 -0000 1.5 @@ -46,7 +46,7 @@ void setBufferTime(); void set_status(const char* code); void setNetCon(as_object* nc); - long time(); + int64_t time(); // Used for gstreamer data read and seek callbacks static int readPacket(void* opaque, char* buf, int buf_size); From MAILER-DAEMON Tue Jan 23 17:38:39 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H9UHn-0002XL-3w for mharc-gnash-commit@gnu.org; Tue, 23 Jan 2007 17:38:39 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H9UHl-0002Ww-6R for gnash-commit@gnu.org; Tue, 23 Jan 2007 17:38:37 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H9UHk-0002Wk-DK for gnash-commit@gnu.org; Tue, 23 Jan 2007 17:38:36 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9UHk-0002Wh-9k for gnash-commit@gnu.org; Tue, 23 Jan 2007 17:38:36 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H9UHj-0001qk-Nq for gnash-commit@gnu.org; Tue, 23 Jan 2007 17:38:35 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H9UHi-0004C0-Ih for gnash-commit@gnu.org; Tue, 23 Jan 2007 22:38:34 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H9UHi-0004Bx-CY for gnash-commit@gnu.org; Tue, 23 Jan 2007 22:38:34 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Tue, 23 Jan 2007 22:38:34 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash/server as_object.cpp X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jan 2007 22:38:37 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/23 22:38:34 Modified files: server : as_object.cpp Log message: Dunno how last fix of instanceOf was reverted CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_object.cpp?cvsroot=gnash&r1=1.29&r2=1.30 Patches: Index: as_object.cpp =================================================================== RCS file: /sources/gnash/gnash/server/as_object.cpp,v retrieving revision 1.29 retrieving revision 1.30 diff -u -b -r1.29 -r1.30 --- as_object.cpp 23 Jan 2007 19:29:35 -0000 1.29 +++ as_object.cpp 23 Jan 2007 22:38:34 -0000 1.30 @@ -315,11 +315,17 @@ bool as_object::instanceOf(as_function* ctor) { - as_object* proto=m_prototype.get(); - do { - if ( proto == ctor->getPrototype() ) return true; - proto = ctor->getPrototype(); - } while (proto); + const as_object* obj = this; + + std::set visited; + + while (obj && visited.insert(obj).second ) + { + if ( obj->get_prototype() == ctor->getPrototype() ) return true; + obj = obj->get_prototype(); + } + + if ( obj ) log_warning("Circular inheritance chain detected during instanceOf call"); return false; } From MAILER-DAEMON Tue Jan 23 17:44:36 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H9UNY-0007nj-8T for mharc-gnash-commit@gnu.org; Tue, 23 Jan 2007 17:44:36 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H9UNW-0007nO-Qn for gnash-commit@gnu.org; Tue, 23 Jan 2007 17:44:34 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H9UNV-0007nC-S8 for gnash-commit@gnu.org; Tue, 23 Jan 2007 17:44:34 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9UNV-0007n9-N8 for gnash-commit@gnu.org; Tue, 23 Jan 2007 17:44:33 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H9UNV-0003B9-9n for gnash-commit@gnu.org; Tue, 23 Jan 2007 17:44:33 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H9UNU-0004LD-UE for gnash-commit@gnu.org; Tue, 23 Jan 2007 22:44:33 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H9UNU-0004LA-M2 for gnash-commit@gnu.org; Tue, 23 Jan 2007 22:44:32 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Tue, 23 Jan 2007 22:44:32 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash ChangeLog testsuite/actionscript.all/Inhe... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jan 2007 22:44:35 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/23 22:44:32 Modified files: . : ChangeLog testsuite/actionscript.all: Inheritance.as MovieClip.as Log message: Same as previous commit (erroneously reverted precedent revision). Confusion evil took my brain today. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2163&r2=1.2164 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Inheritance.as?cvsroot=gnash&r1=1.20&r2=1.21 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/MovieClip.as?cvsroot=gnash&r1=1.28&r2=1.29 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2163 retrieving revision 1.2164 diff -u -b -r1.2163 -r1.2164 --- ChangeLog 23 Jan 2007 21:37:15 -0000 1.2163 +++ ChangeLog 23 Jan 2007 22:44:32 -0000 1.2164 @@ -44,13 +44,9 @@ 2007-01-23 Sandro Santilli - * testsuite/actionscript.all/: Inheritance.as, MovieClip.as: - updated for unexpected failures and successes after - fix to instanceOf. * server/as_object.cpp (copyProperties): use set_member while importing properties to properly scan the - inheritance chain; (instanceOf): fixed clearly bogus - implementation. + inheritance chain. * server/PropertyList.h: add visitValues() templated function. * server/sprite_instance.cpp (sprite_attach_movie): Copy properties from initialization object *after* Index: testsuite/actionscript.all/Inheritance.as =================================================================== RCS file: /sources/gnash/gnash/testsuite/actionscript.all/Inheritance.as,v retrieving revision 1.20 retrieving revision 1.21 diff -u -b -r1.20 -r1.21 --- testsuite/actionscript.all/Inheritance.as 23 Jan 2007 17:49:51 -0000 1.20 +++ testsuite/actionscript.all/Inheritance.as 23 Jan 2007 22:44:32 -0000 1.21 @@ -20,7 +20,7 @@ // compile this test case with Ming makeswf, and then // execute it like this gnash -1 -r 0 -v out.swf -rcsid="$Id: Inheritance.as,v 1.20 2007/01/23 17:49:51 strk Exp $"; +rcsid="$Id: Inheritance.as,v 1.21 2007/01/23 22:44:32 strk Exp $"; #include "check.as" @@ -122,7 +122,7 @@ // Test the instanceOf operator check(subInstance instanceOf SubClass); check(subInstance instanceOf SuperClass); -check(subInstance instanceOf Object); +xcheck(subInstance instanceOf Object); //------------------------------------------------ @@ -165,16 +165,16 @@ check_equals(sobj1.__proto__.constructor, SubObj1); #if OUTPUT_VERSION > 5 check(SubObj1 instanceOf Function); -check(Function instanceOf Object); -check(SubObj1 instanceOf Object); +xcheck(Function instanceOf Object); +xcheck(SubObj1 instanceOf Object); #endif // inheritance chain is NOT subobj1,SubObj1,Function,Object, as the // above might suggest... -xcheck(!sobj1 instanceOf Function); +check(!sobj1 instanceOf Function); // but still, sobj1 is an instance of Object *and* SubObj1 -check(sobj1 instanceOf Object); +xcheck(sobj1 instanceOf Object); check(sobj1 instanceOf SubObj1); check(SubObj1.prototype != undefined); Index: testsuite/actionscript.all/MovieClip.as =================================================================== RCS file: /sources/gnash/gnash/testsuite/actionscript.all/MovieClip.as,v retrieving revision 1.28 retrieving revision 1.29 diff -u -b -r1.28 -r1.29 --- testsuite/actionscript.all/MovieClip.as 23 Jan 2007 12:40:21 -0000 1.28 +++ testsuite/actionscript.all/MovieClip.as 23 Jan 2007 22:44:32 -0000 1.29 @@ -22,7 +22,7 @@ // compile this test case with Ming makeswf, and then // execute it like this gnash -1 -r 0 -v out.swf -rcsid="$Id: MovieClip.as,v 1.28 2007/01/23 12:40:21 strk Exp $"; +rcsid="$Id: MovieClip.as,v 1.29 2007/01/23 22:44:32 strk Exp $"; #include "check.as" @@ -272,5 +272,5 @@ var cl = new MovieClip(); check_equals(cl.__proto__.constructor, MovieClip); check(cl instanceOf MovieClip); -check(cl instanceOf Object); +xcheck(cl instanceOf Object); check_equals(typeof(cl), "object"); From MAILER-DAEMON Tue Jan 23 18:20:35 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H9UwN-0006qp-11 for mharc-gnash-commit@gnu.org; Tue, 23 Jan 2007 18:20:35 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H9UwK-0006qL-P2 for gnash-commit@gnu.org; Tue, 23 Jan 2007 18:20:32 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H9UwJ-0006q9-0a for gnash-commit@gnu.org; Tue, 23 Jan 2007 18:20:31 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9UwI-0006q6-Rj for gnash-commit@gnu.org; Tue, 23 Jan 2007 18:20:30 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H9UwI-0002g5-G3 for gnash-commit@gnu.org; Tue, 23 Jan 2007 18:20:30 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H9UwH-0005Dc-GO for gnash-commit@gnu.org; Tue, 23 Jan 2007 23:20:29 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H9UwH-0005DZ-6y for gnash-commit@gnu.org; Tue, 23 Jan 2007 23:20:29 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Tue, 23 Jan 2007 23:20:29 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash ChangeLog gui/gui.cpp server/sprite_insta... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jan 2007 23:20:33 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/23 23:20:29 Modified files: . : ChangeLog gui : gui.cpp server : sprite_instance.cpp testsuite/misc-ming.all: Makefile.am Added files: testsuite/misc-ming.all: registerClassTest.c registerClassTestRunner.cpp Log message: * server/sprite_instance.cpp (ctor): fix handlign of registerClass (at least for the new testcase). * testsuite/misc-ming.all/: Makefile.am, registerClassTest.c, registerClassTestRunner.cpp: new testcase for registerClass. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2164&r2=1.2165 http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gui.cpp?cvsroot=gnash&r1=1.56&r2=1.57 http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.131&r2=1.132 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/Makefile.am?cvsroot=gnash&r1=1.53&r2=1.54 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/registerClassTest.c?cvsroot=gnash&rev=1.1 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/registerClassTestRunner.cpp?cvsroot=gnash&rev=1.1 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2164 retrieving revision 1.2165 diff -u -b -r1.2164 -r1.2165 --- ChangeLog 23 Jan 2007 22:44:32 -0000 1.2164 +++ ChangeLog 23 Jan 2007 23:20:28 -0000 1.2165 @@ -1,3 +1,10 @@ +2007-01-23 Sandro Santilli + + * server/sprite_instance.cpp (ctor): fix handlign of registerClass + (at least for the new testcase). + * testsuite/misc-ming.all/: Makefile.am, registerClassTest.c, + registerClassTestRunner.cpp: new testcase for registerClass. + 2007-01-23 Tomas Groth Christensen * server/asobj/NetStream.{h,cpp}, server/asobj/NetStreamFfmpeg.{cpp.h}: Index: gui/gui.cpp =================================================================== RCS file: /sources/gnash/gnash/gui/gui.cpp,v retrieving revision 1.56 retrieving revision 1.57 diff -u -b -r1.56 -r1.57 --- gui/gui.cpp 10 Jan 2007 19:21:14 -0000 1.56 +++ gui/gui.cpp 23 Jan 2007 23:20:28 -0000 1.57 @@ -229,6 +229,7 @@ { movie_root* m = get_current_root(); + log_msg("mouse @ %d,%d", x, y); if ( m->notify_mouse_moved(x, y) ) { // any action triggered by the Index: server/sprite_instance.cpp =================================================================== RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v retrieving revision 1.131 retrieving revision 1.132 diff -u -b -r1.131 -r1.132 --- server/sprite_instance.cpp 23 Jan 2007 17:17:14 -0000 1.131 +++ server/sprite_instance.cpp 23 Jan 2007 23:20:28 -0000 1.132 @@ -1712,10 +1712,11 @@ if ( registerClass ) { - // TODO: store in intrusive_ptr ? + attachMovieClipInterface(*this); // TODO: call the constructor ? as_object* proto = registerClass->getPrototype(); log_msg("registerClass prototype : %p", proto); + copyProperties(*proto); set_prototype(proto); } else Index: testsuite/misc-ming.all/Makefile.am =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/Makefile.am,v retrieving revision 1.53 retrieving revision 1.54 diff -u -b -r1.53 -r1.54 --- testsuite/misc-ming.all/Makefile.am 22 Jan 2007 12:23:47 -0000 1.53 +++ testsuite/misc-ming.all/Makefile.am 23 Jan 2007 23:20:29 -0000 1.54 @@ -68,6 +68,8 @@ place_and_remove_object_insane_test \ attachMovieTest \ attachMovieTestRunner \ + registerClassTest \ + registerClassTestRunner \ goto_frame_test \ $(NULL) @@ -283,6 +285,30 @@ sh $< $(top_builddir) goto_frame_test.swf > $@ chmod 755 $@ +registerClassTest_SOURCES = \ + registerClassTest.c \ + ming_utils.h \ + ming_utils.c \ + $(NULL) +registerClassTest_LDADD = $(MING_LIBS) + +registerClassTest.swf: registerClassTest + ./registerClassTest $(top_srcdir)/testsuite/media + +registerClassTestRunner_SOURCES = \ + registerClassTestRunner.cpp \ + $(NULL) +registerClassTestRunner_LDADD = \ + $(top_builddir)/testsuite/libtestsuite.la \ + $(NULL) +registerClassTestRunner_CXXFLAGS = \ + -DSRCDIR='"$(srcdir)"' \ + $(NULL) +registerClassTestRunner_DEPENDENCIES = \ + registerClassTest.swf \ + $(top_builddir)/testsuite/libtestsuite.la \ + $(NULL) + spritehier.swf: spritehier ./spritehier @@ -364,6 +390,7 @@ place_and_remove_object_insane_testrunner \ attachMovieTestRunner \ goto_frame_testrunner \ + registerClassTestRunner \ $(NULL) Index: testsuite/misc-ming.all/registerClassTest.c =================================================================== RCS file: testsuite/misc-ming.all/registerClassTest.c diff -N testsuite/misc-ming.all/registerClassTest.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ testsuite/misc-ming.all/registerClassTest.c 23 Jan 2007 23:20:29 -0000 1.1 @@ -0,0 +1,168 @@ +/* + * Copyright (C) 2005, 2006 Free Software Foundation, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + * + */ + +/* + * Test Object.registerClass(). + * + * 1) Exports a 'redsquare' symbol + * 2) attach it to main timeline + * 3) register a custom class to it + * 4) attach it again (expected to have the custom class interface) + * + * run as ./registerClass + */ + +#include +#include +#include + +#include "ming_utils.h" + +#define OUTPUT_VERSION 6 +#define OUTPUT_FILENAME "registerClassTest.swf" + +void addRedSquareExport(SWFMovie mo); + +void +addRedSquareExport(SWFMovie mo) +{ + SWFShape sh; + SWFMovieClip mc; + + sh = make_fill_square (0, 0, 60, 60, 255, 0, 0, 255, 0, 0); + mc = newSWFMovieClip(); + + SWFMovieClip_add(mc, (SWFBlock)sh); + /* This is here just to turn the clip into an active one */ + add_clip_actions(mc, "onRollOver = function() {};"); + SWFMovieClip_nextFrame(mc); + + SWFMovie_addExport(mo, (SWFBlock)mc, "redsquare"); + + SWFMovie_writeExports(mo); +} + +int +main(int argc, char** argv) +{ + SWFMovie mo; + const char *srcdir="."; + SWFMovieClip dejagnuclip; + + + /********************************************* + * + * Initialization + * + *********************************************/ + + if ( argc>1 ) srcdir=argv[1]; + else + { + fprintf(stderr, "Usage: %s\n", argv[0]); + return 1; + } + + puts("Setting things up"); + + Ming_init(); + Ming_useSWFVersion (OUTPUT_VERSION); + Ming_setScale(20.0); /* let's talk pixels */ + + mo = newSWFMovie(); + SWFMovie_setRate(mo, 12); + //SWFMovie_setDimension(mo, 6400, 4000); + SWFMovie_setDimension(mo, 640, 400); + + /********************************************* + * + * Body + * + *********************************************/ + + dejagnuclip = get_dejagnu_clip((SWFBlock)get_default_font(srcdir), 10, 0, 80, 800, 600); + SWFMovie_add(mo, (SWFBlock)dejagnuclip); + addRedSquareExport(mo); + /* it seems we need a SHOWFRAME for this to be effective */ + /* (maybe it's related to loop-back handling ?) */ + SWFMovie_nextFrame(mo); /* end of frame1 */ + + add_actions(mo, "counter = 1;"); + + add_actions(mo, + "var name1 = 'square'+counter;" + "attachMovie('redsquare', name1, 70+counter);" + "var clip1 = this[name1];" + "counter++;" + ); + + SWFMovie_nextFrame(mo); /* end of frame2 */ + + add_actions(mo, + "function CustomClass() { " + "}" + "CustomClass.prototype.moveRight = function(pix) {" + " this._x += pix;" + "};" + "CustomClass.prototype.sayHello = function() {" + " note('Hello from CustomClass instance');" + "};" + "MovieClip.prototype.sayHello = function() {" + " note('Hello from MovieClip instance');" + "};" + "Object.registerClass('redsquare', CustomClass);" + ); + + add_actions(mo, + "var name2 = 'square'+counter;" + "attachMovie('redsquare', name2, 70+counter);" + "var clip2 = this[name2];" + "clip2.moveRight(80);" // TODO: test this! + "counter++;" + ); + + + check_equals(mo, "typeof(clip1)", "'movieclip'"); + check(mo, "clip1 instanceOf MovieClip"); + check(mo, "! clip1 instanceOf CustomClass"); + + check_equals(mo, "typeof(clip2)", "'movieclip'"); + /**/ check(mo, "clip2 instanceOf CustomClass"); + /**/ check(mo, "! clip2 instanceOf MovieClip"); + + add_actions(mo, + "totals();" + "stop();" + ); + + SWFMovie_nextFrame(mo); /* end of frame3 */ + + + /***************************************************** + * + * Output movie + * + *****************************************************/ + + puts("Saving " OUTPUT_FILENAME ); + + SWFMovie_save(mo, OUTPUT_FILENAME); + + return 0; +} Index: testsuite/misc-ming.all/registerClassTestRunner.cpp =================================================================== RCS file: testsuite/misc-ming.all/registerClassTestRunner.cpp diff -N testsuite/misc-ming.all/registerClassTestRunner.cpp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ testsuite/misc-ming.all/registerClassTestRunner.cpp 23 Jan 2007 23:20:29 -0000 1.1 @@ -0,0 +1,78 @@ +/* + * Copyright (C) 2005, 2006 Free Software Foundation, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + * + */ + +#define INPUT_FILENAME "registerClassTest.swf" + +#include "MovieTester.h" +#include "sprite_instance.h" +#include "character.h" +#include "dlist.h" +#include "container.h" +#include "log.h" + +#include "check.h" +#include +#include + +using namespace gnash; +using namespace std; + +int +main(int /*argc*/, char** /*argv*/) +{ + string filename = INPUT_FILENAME; + MovieTester tester(filename); + + gnash::LogFile& dbglogfile = gnash::LogFile::getDefaultInstance(); + dbglogfile.setVerbosity(1); + + sprite_instance* root = tester.getRootMovie(); + assert(root); + + check_equals(root->get_frame_count(), 3); + check_equals(root->get_play_state(), sprite_instance::PLAY); + check_equals(root->get_current_frame(), 0); + + check(! tester.findDisplayItemByDepth(*root, 71) ); + check(! tester.findDisplayItemByDepth(*root, 72) ); + + tester.movePointerTo(30, 30); + check(!tester.isMouseOverMouseEntity()); + + tester.advance(); + + check( tester.findDisplayItemByDepth(*root, 71) ); + check(! tester.findDisplayItemByDepth(*root, 72) ); + + tester.movePointerTo(30, 30); + /**/ check(tester.isMouseOverMouseEntity()); + tester.movePointerTo(100, 30); + check(!tester.isMouseOverMouseEntity()); + + tester.advance(); + + check(tester.findDisplayItemByDepth(*root, 71) ); + check(tester.findDisplayItemByDepth(*root, 72) ); + + tester.movePointerTo(30, 30); + /**/ check(tester.isMouseOverMouseEntity()); + tester.movePointerTo(100, 30); + /**/ check(tester.isMouseOverMouseEntity()); +} + From MAILER-DAEMON Tue Jan 23 18:52:08 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H9VQu-0006EZ-3Z for mharc-gnash-commit@gnu.org; Tue, 23 Jan 2007 18:52:08 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H9VQt-0006EU-H6 for gnash-commit@gnu.org; Tue, 23 Jan 2007 18:52:07 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H9VQs-0006EI-DY for gnash-commit@gnu.org; Tue, 23 Jan 2007 18:52:06 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9VQs-0006EF-7K for gnash-commit@gnu.org; Tue, 23 Jan 2007 18:52:06 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H9VQr-0000Gx-EB for gnash-commit@gnu.org; Tue, 23 Jan 2007 18:52:06 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H9VQq-00077I-BU for gnash-commit@gnu.org; Tue, 23 Jan 2007 23:52:04 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H9VQq-00077F-6C for gnash-commit@gnu.org; Tue, 23 Jan 2007 23:52:04 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Tue, 23 Jan 2007 23:52:04 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash/testsuite/misc-ming.all .cvsignore X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jan 2007 23:52:07 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/23 23:52:04 Modified files: testsuite/misc-ming.all: .cvsignore Log message: hush CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/.cvsignore?cvsroot=gnash&r1=1.4&r2=1.5 Patches: Index: .cvsignore =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/.cvsignore,v retrieving revision 1.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- .cvsignore 23 Jan 2007 12:01:19 -0000 1.4 +++ .cvsignore 23 Jan 2007 23:52:04 -0000 1.5 @@ -37,3 +37,7 @@ timeline_var_test-Runner attachMovieTest attachMovieTestRunner +goto_frame_test +goto_frame_testrunner +registerClassTest +registerClassTestRunner From MAILER-DAEMON Wed Jan 24 05:12:07 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H9f6t-0006QI-0p for mharc-gnash-commit@gnu.org; Wed, 24 Jan 2007 05:12:07 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H9f6p-0006M5-4V for gnash-commit@gnu.org; Wed, 24 Jan 2007 05:12:03 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H9f6l-0006JV-IR for gnash-commit@gnu.org; Wed, 24 Jan 2007 05:12:00 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9f6k-0006J0-Kh for gnash-commit@gnu.org; Wed, 24 Jan 2007 05:11:58 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H9f6k-0005Aw-5L for gnash-commit@gnu.org; Wed, 24 Jan 2007 05:11:58 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H9f6g-0008IR-TA for gnash-commit@gnu.org; Wed, 24 Jan 2007 10:11:54 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H9f6g-0008IO-Kv for gnash-commit@gnu.org; Wed, 24 Jan 2007 10:11:54 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Wed, 24 Jan 2007 10:11:54 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash ChangeLog testsuite/libgeometry/Makefile.... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jan 2007 10:12:05 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/24 10:11:54 Modified files: . : ChangeLog testsuite/libgeometry: Makefile.am testsuite/misc-ming.all: Makefile.am attachMovieTestRunner.cpp loop_test-Runner.cpp registerClassTestRunner.cpp Log message: * testsuite/misc-ming.all/: Makefile.am, attachMovieTestRunner.cpp, loop_test-Runner.cpp, registerClassTestRunner.cpp: Allow running tests from any directory. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2165&r2=1.2166 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/libgeometry/Makefile.am?cvsroot=gnash&r1=1.1&r2=1.2 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/Makefile.am?cvsroot=gnash&r1=1.54&r2=1.55 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/attachMovieTestRunner.cpp?cvsroot=gnash&r1=1.3&r2=1.4 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/loop_test-Runner.cpp?cvsroot=gnash&r1=1.2&r2=1.3 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/registerClassTestRunner.cpp?cvsroot=gnash&r1=1.1&r2=1.2 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2165 retrieving revision 1.2166 diff -u -b -r1.2165 -r1.2166 --- ChangeLog 23 Jan 2007 23:20:28 -0000 1.2165 +++ ChangeLog 24 Jan 2007 10:11:54 -0000 1.2166 @@ -1,3 +1,9 @@ +2007-01-24 Sandro Santilli + + * testsuite/misc-ming.all/: Makefile.am, attachMovieTestRunner.cpp, + loop_test-Runner.cpp, registerClassTestRunner.cpp: + Allow running tests from any directory. + 2007-01-23 Sandro Santilli * server/sprite_instance.cpp (ctor): fix handlign of registerClass Index: testsuite/libgeometry/Makefile.am =================================================================== RCS file: /sources/gnash/gnash/testsuite/libgeometry/Makefile.am,v retrieving revision 1.1 retrieving revision 1.2 diff -u -b -r1.1 -r1.2 --- testsuite/libgeometry/Makefile.am 1 Dec 2006 15:38:18 -0000 1.1 +++ testsuite/libgeometry/Makefile.am 24 Jan 2007 10:11:54 -0000 1.2 @@ -33,8 +33,6 @@ -I$(top_srcdir)/testsuite \ $(NULL) -abs_builddir=`(cd $(top_builddir)/testsuite/libbase; pwd)` - check_PROGRAMS = \ Range2dTest \ $(NULL) Index: testsuite/misc-ming.all/Makefile.am =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/Makefile.am,v retrieving revision 1.54 retrieving revision 1.55 diff -u -b -r1.54 -r1.55 --- testsuite/misc-ming.all/Makefile.am 23 Jan 2007 23:20:29 -0000 1.54 +++ testsuite/misc-ming.all/Makefile.am 24 Jan 2007 10:11:54 -0000 1.55 @@ -21,6 +21,8 @@ AUTOMAKE_OPTIONS = dejagnu +abs_builddir=$(shell cd $(top_builddir)/testsuite/misc-ming.all; pwd) + if ENABLE_MING CLEANFILES = \ @@ -199,6 +201,7 @@ $(NULL) loop_test_Runner_CXXFLAGS = \ -DSRCDIR='"$(srcdir)"' \ + -DTGTDIR='"$(abs_builddir)"' \ $(NULL) loop_test_Runner_DEPENDENCIES = \ loop_test.swf \ @@ -265,6 +268,7 @@ $(NULL) attachMovieTestRunner_CXXFLAGS = \ -DSRCDIR='"$(srcdir)"' \ + -DTGTDIR='"$(abs_builddir)"' \ $(NULL) attachMovieTestRunner_DEPENDENCIES = \ attachMovieTest.swf \ @@ -303,6 +307,7 @@ $(NULL) registerClassTestRunner_CXXFLAGS = \ -DSRCDIR='"$(srcdir)"' \ + -DTGTDIR='"$(abs_builddir)"' \ $(NULL) registerClassTestRunner_DEPENDENCIES = \ registerClassTest.swf \ Index: testsuite/misc-ming.all/attachMovieTestRunner.cpp =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/attachMovieTestRunner.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -b -r1.3 -r1.4 --- testsuite/misc-ming.all/attachMovieTestRunner.cpp 23 Jan 2007 11:23:49 -0000 1.3 +++ testsuite/misc-ming.all/attachMovieTestRunner.cpp 24 Jan 2007 10:11:54 -0000 1.4 @@ -36,7 +36,7 @@ int main(int /*argc*/, char** /*argv*/) { - string filename = INPUT_FILENAME; + string filename = string(TGTDIR) + string("/") + string(INPUT_FILENAME); MovieTester tester(filename); gnash::LogFile& dbglogfile = gnash::LogFile::getDefaultInstance(); Index: testsuite/misc-ming.all/loop_test-Runner.cpp =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/loop_test-Runner.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- testsuite/misc-ming.all/loop_test-Runner.cpp 28 Dec 2006 01:44:09 -0000 1.2 +++ testsuite/misc-ming.all/loop_test-Runner.cpp 24 Jan 2007 10:11:54 -0000 1.3 @@ -40,7 +40,7 @@ int main(int /*argc*/, char** /*argv*/) { - string filename = INPUT_FILENAME; + string filename = string(TGTDIR) + string("/") + string(INPUT_FILENAME); auto_ptr t; try Index: testsuite/misc-ming.all/registerClassTestRunner.cpp =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/registerClassTestRunner.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -b -r1.1 -r1.2 --- testsuite/misc-ming.all/registerClassTestRunner.cpp 23 Jan 2007 23:20:29 -0000 1.1 +++ testsuite/misc-ming.all/registerClassTestRunner.cpp 24 Jan 2007 10:11:54 -0000 1.2 @@ -36,7 +36,7 @@ int main(int /*argc*/, char** /*argv*/) { - string filename = INPUT_FILENAME; + string filename = string(TGTDIR) + string("/") + string(INPUT_FILENAME); MovieTester tester(filename); gnash::LogFile& dbglogfile = gnash::LogFile::getDefaultInstance(); From MAILER-DAEMON Wed Jan 24 08:23:29 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H9i65-0004XU-3D for mharc-gnash-commit@gnu.org; Wed, 24 Jan 2007 08:23:29 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H9i63-0004Wo-TM for gnash-commit@gnu.org; Wed, 24 Jan 2007 08:23:27 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H9i62-0004VK-J7 for gnash-commit@gnu.org; Wed, 24 Jan 2007 08:23:26 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9i62-0004VH-Bl for gnash-commit@gnu.org; Wed, 24 Jan 2007 08:23:26 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H9i61-0005dY-TV for gnash-commit@gnu.org; Wed, 24 Jan 2007 08:23:26 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H9i5u-0000TV-Ft for gnash-commit@gnu.org; Wed, 24 Jan 2007 13:23:18 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H9i5u-0000TS-Aa for gnash-commit@gnu.org; Wed, 24 Jan 2007 13:23:18 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Wed, 24 Jan 2007 13:23:18 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash ChangeLog server/character.h server/sprit... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jan 2007 13:23:28 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/24 13:23:18 Modified files: . : ChangeLog server : character.h sprite_instance.cpp sprite_instance.h Log message: * server/: character.h, sprite_instance.{cpp,h}: Understood, documented and cleaned up the concept of "ActionScript-transformed" characters; Fix property handlers to properly register having been transformed by script. Fixes elvis.swf and bitmap.swf. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2166&r2=1.2167 http://cvs.savannah.gnu.org/viewcvs/gnash/server/character.h?cvsroot=gnash&r1=1.36&r2=1.37 http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.132&r2=1.133 http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.h?cvsroot=gnash&r1=1.57&r2=1.58 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2166 retrieving revision 1.2167 diff -u -b -r1.2166 -r1.2167 --- ChangeLog 24 Jan 2007 10:11:54 -0000 1.2166 +++ ChangeLog 24 Jan 2007 13:23:17 -0000 1.2167 @@ -1,5 +1,10 @@ 2007-01-24 Sandro Santilli + * server/: character.h, sprite_instance.{cpp,h}: + Understood, documented and cleaned up the concept of + "ActionScript-transformed" characters; Fix property handlers + to properly register having been transformed by script. + Fixes elvis.swf and bitmap.swf. * testsuite/misc-ming.all/: Makefile.am, attachMovieTestRunner.cpp, loop_test-Runner.cpp, registerClassTestRunner.cpp: Allow running tests from any directory. Index: server/character.h =================================================================== RCS file: /sources/gnash/gnash/server/character.h,v retrieving revision 1.36 retrieving revision 1.37 diff -u -b -r1.36 -r1.37 --- server/character.h 12 Dec 2006 19:48:04 -0000 1.36 +++ server/character.h 24 Jan 2007 13:23:18 -0000 1.37 @@ -18,7 +18,7 @@ // // -/* $Id: character.h,v 1.36 2006/12/12 19:48:04 strk Exp $ */ +/* $Id: character.h,v 1.37 2007/01/24 13:23:18 strk Exp $ */ #ifndef GNASH_CHARACTER_H #define GNASH_CHARACTER_H @@ -117,6 +117,14 @@ /// rect m_old_invalidated_bounds; + /// Wheter this character has been transformed by ActionScript code + // + /// Once we've been moved by ActionScript, + /// Don't accept moves from anim tags (PlaceObject) + /// + /// See get_accept_anim_moves() function + /// + bool _scriptTransformed; public: @@ -132,7 +140,8 @@ m_visible(true), m_parent(parent), m_invalidated(true), - m_old_invalidated_bounds() + m_old_invalidated_bounds(), + _scriptTransformed(false) { assert((parent == NULL && m_id == -1) || (parent != NULL && m_id >= 0)); @@ -315,7 +324,36 @@ virtual void goto_frame(size_t /*target_frame*/) {} - virtual bool get_accept_anim_moves() const { return true; } + /// \brief + /// Return true if PlaceObjects tag are allowed to move + /// this character. + // + /// Once a character has been transformed by ActionScript, + /// further transformation trought non-action SWF constrol tags + /// is not allowed. + /// + /// See scriptTransformed() + /// + bool get_accept_anim_moves() const + { + return ! _scriptTransformed; + } + + /// \brief + /// Call this function when the sprite has been + /// transformed due to ActionScript code. + // + /// This information will be used while executing + /// PlaceObject tags in that ActionScript-transformed + /// characters won't be allowed to be moved. + /// + /// TODO: make protected + /// + void transformedByScript() + { + _scriptTransformed = true; + } + virtual void set_visible(bool visible) { if (m_visible!=visible) set_invalidated(); Index: server/sprite_instance.cpp =================================================================== RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v retrieving revision 1.132 retrieving revision 1.133 diff -u -b -r1.132 -r1.133 --- server/sprite_instance.cpp 23 Jan 2007 23:20:28 -0000 1.132 +++ server/sprite_instance.cpp 24 Jan 2007 13:23:18 -0000 1.133 @@ -872,7 +872,7 @@ matrix m = ptr->get_matrix(); m.m_[0][2] = infinite_to_fzero(PIXELS_TO_TWIPS(fn.arg(0).to_number())); ptr->set_matrix(m); - //ptr->m_accept_anim_moves = false; // what is this about ?? + ptr->transformedByScript(); // m_accept_anim_moves = false; } } @@ -893,7 +893,7 @@ matrix m = ptr->get_matrix(); m.m_[1][2] = infinite_to_fzero(PIXELS_TO_TWIPS(fn.arg(0).to_number())); ptr->set_matrix(m); - //ptr->m_accept_anim_moves = false; // what is this about ?? + ptr->transformedByScript(); // m_accept_anim_moves = false; } } @@ -944,7 +944,7 @@ m.set_scale_rotation(x_scale, y_scale, rotation); ptr->set_matrix(m); - //ptr->m_accept_anim_moves = false; // what is this about ?? + ptr->transformedByScript(); // m_accept_anim_moves = false; } } @@ -995,7 +995,7 @@ m.set_scale_rotation(x_scale, y_scale, rotation); ptr->set_matrix(m); - //ptr->m_accept_anim_moves = false; // what is this about ?? + ptr->transformedByScript(); // m_accept_anim_moves = false; } } @@ -1074,7 +1074,7 @@ cxform cx = ptr->get_cxform(); cx.m_[3][0] = infinite_to_fzero(fn.arg(0).to_number()) / 100.f; ptr->set_cxform(cx); - //ptr->m_accept_anim_moves = false; // what is this about ?? + ptr->transformedByScript(); // m_accept_anim_moves = false; } } @@ -1092,7 +1092,7 @@ else // setter { ptr->set_visible(fn.arg(0).to_bool()); - //ptr->m_accept_anim_moves = false; // what is this about ?? + ptr->transformedByScript(); // m_accept_anim_moves = false; } } @@ -1118,7 +1118,7 @@ m.m_[0][0] /= w; } ptr->set_matrix(m); - //ptr->m_accept_anim_moves = false; // what is this about ?? + ptr->transformedByScript(); // m_accept_anim_moves = false; } } @@ -1143,7 +1143,7 @@ m.m_[1][1] /= h; } ptr->set_matrix(m); - //ptr->m_accept_anim_moves = false; // what is this about ?? + ptr->transformedByScript(); // m_accept_anim_moves = false; } } @@ -1176,7 +1176,7 @@ m.set_scale_rotation(x_scale, y_scale, rotation); ptr->set_matrix(m); - //ptr->m_accept_anim_moves = false; // what is this about ?? + ptr->transformedByScript(); // m_accept_anim_moves = false; } } @@ -1697,7 +1697,6 @@ m_current_frame(0), m_update_frame(true), m_has_looped(false), - m_accept_anim_moves(true), m_init_actions_executed(), m_as_environment(), m_has_keypress_event(false), @@ -2302,7 +2301,7 @@ m.m_[0][2] = infinite_to_fzero(PIXELS_TO_TWIPS(val.to_number())); set_matrix(m); - m_accept_anim_moves = false; + transformedByScript(); // m_accept_anim_moves = false; return; } @@ -2313,7 +2312,7 @@ m.m_[1][2] = infinite_to_fzero(PIXELS_TO_TWIPS(val.to_number())); set_matrix(m); - m_accept_anim_moves = false; + transformedByScript(); // m_accept_anim_moves = false; return; } @@ -2390,7 +2389,7 @@ m.set_scale_rotation(x_scale, y_scale, rotation); set_matrix(m); - m_accept_anim_moves = false; + transformedByScript(); // m_accept_anim_moves = false; return; } case M_ALPHA: @@ -2400,14 +2399,14 @@ cxform cx = get_cxform(); cx.m_[3][0] = infinite_to_fzero(val.to_number()) / 100.f; set_cxform(cx); - m_accept_anim_moves = false; + transformedByScript(); // m_accept_anim_moves = false; return; } case M_VISIBLE: //else if (name == "_visible") { set_visible(val.to_bool()); - m_accept_anim_moves = false; + transformedByScript(); // m_accept_anim_moves = false; return; } case M_WIDTH: @@ -2422,7 +2421,7 @@ m.m_[0][0] /= w; } set_matrix(m); - m_accept_anim_moves = false; + transformedByScript(); // m_accept_anim_moves = false; return; } case M_HEIGHT: @@ -2437,7 +2436,7 @@ m.m_[1][1] /= h; } set_matrix(m); - m_accept_anim_moves = false; + transformedByScript(); // m_accept_anim_moves = false; return; } case M_ROTATION: @@ -2452,7 +2451,7 @@ m.set_scale_rotation(x_scale, y_scale, rotation); set_matrix(m); - m_accept_anim_moves = false; + transformedByScript(); // m_accept_anim_moves = false; return; } case M_ONROLLOVER: Index: server/sprite_instance.h =================================================================== RCS file: /sources/gnash/gnash/server/sprite_instance.h,v retrieving revision 1.57 retrieving revision 1.58 diff -u -b -r1.57 -r1.58 --- server/sprite_instance.h 19 Jan 2007 14:22:56 -0000 1.57 +++ server/sprite_instance.h 24 Jan 2007 13:23:18 -0000 1.58 @@ -17,7 +17,7 @@ // // -/* $Id: sprite_instance.h,v 1.57 2007/01/19 14:22:56 strk Exp $ */ +/* $Id: sprite_instance.h,v 1.58 2007/01/24 13:23:18 strk Exp $ */ // Stateful live Sprite instance @@ -206,11 +206,6 @@ return m_has_looped; } - virtual bool get_accept_anim_moves() const - { - return m_accept_anim_moves; - } - /// Combine the flags to avoid a conditional. /// It would be faster with a macro. inline int transition(int a, int b) const @@ -637,9 +632,6 @@ bool m_update_frame; bool m_has_looped; - // once we've been moved by ActionScript, - // don't accept moves from anim tags. - bool m_accept_anim_moves; // a bit-array class would be ideal for this std::vector m_init_actions_executed; From MAILER-DAEMON Wed Jan 24 08:32:45 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H9iF3-0001gb-C7 for mharc-gnash-commit@gnu.org; Wed, 24 Jan 2007 08:32:45 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H9iF0-0001fc-Ap for gnash-commit@gnu.org; Wed, 24 Jan 2007 08:32:42 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H9iEz-0001fG-EJ for gnash-commit@gnu.org; Wed, 24 Jan 2007 08:32:41 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9iEz-0001fA-70 for gnash-commit@gnu.org; Wed, 24 Jan 2007 08:32:41 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H9iEy-0007nh-MN for gnash-commit@gnu.org; Wed, 24 Jan 2007 08:32:40 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H9iEy-0000pr-5K for gnash-commit@gnu.org; Wed, 24 Jan 2007 13:32:40 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H9iEx-0000pm-T7 for gnash-commit@gnu.org; Wed, 24 Jan 2007 13:32:40 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Wed, 24 Jan 2007 13:32:39 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/place_a... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jan 2007 13:32:42 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/24 13:32:39 Modified files: . : ChangeLog testsuite/misc-ming.all: place_and_remove_object_insane_test.c Log message: * testsuite/misc-ming.all/place_and_remove_object_insane_test.c: Last commit fixed a couple of tests in this testcase. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2167&r2=1.2168 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/place_and_remove_object_insane_test.c?cvsroot=gnash&r1=1.6&r2=1.7 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2167 retrieving revision 1.2168 diff -u -b -r1.2167 -r1.2168 --- ChangeLog 24 Jan 2007 13:23:17 -0000 1.2167 +++ ChangeLog 24 Jan 2007 13:32:39 -0000 1.2168 @@ -1,5 +1,7 @@ 2007-01-24 Sandro Santilli + * testsuite/misc-ming.all/place_and_remove_object_insane_test.c: + Last commit fixed a couple of tests in this testcase. * server/: character.h, sprite_instance.{cpp,h}: Understood, documented and cleaned up the concept of "ActionScript-transformed" characters; Fix property handlers Index: testsuite/misc-ming.all/place_and_remove_object_insane_test.c =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/place_and_remove_object_insane_test.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -b -r1.6 -r1.7 --- testsuite/misc-ming.all/place_and_remove_object_insane_test.c 22 Jan 2007 14:03:57 -0000 1.6 +++ testsuite/misc-ming.all/place_and_remove_object_insane_test.c 24 Jan 2007 13:32:39 -0000 1.7 @@ -113,7 +113,7 @@ { \ if(counter == 1) \ { \ - xcheck_equals(_root.mc_blue._x, 60); \ + check_equals(_root.mc_blue._x, 60); \ xcheck_equals(typeof(_root.mc_black), 'undefined'); \ xcheck_equals(typeof(_root.mc_black_name_changed), 'movieclip'); \ flag = 1; \ @@ -123,7 +123,7 @@ } "); check_equals(mo, " _root.mc_red._x", "0"); - xcheck_equals(mo, " _root.mc_blue._x", "60"); + check_equals(mo, " _root.mc_blue._x", "60"); check_equals(mo, "flag", "1"); SWFMovie_nextFrame(mo); //------------end of 1st frame--------------------------------- From MAILER-DAEMON Wed Jan 24 09:33:45 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H9jC5-0003n0-1R for mharc-gnash-commit@gnu.org; Wed, 24 Jan 2007 09:33:45 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H9jC3-0003mq-Gk for gnash-commit@gnu.org; Wed, 24 Jan 2007 09:33:43 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H9jC2-0003mQ-Ge for gnash-commit@gnu.org; Wed, 24 Jan 2007 09:33:42 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9jC2-0003mN-B3 for gnash-commit@gnu.org; Wed, 24 Jan 2007 09:33:42 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H9jC2-0007gT-5L for gnash-commit@gnu.org; Wed, 24 Jan 2007 09:33:42 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H9jC0-0003si-6W for gnash-commit@gnu.org; Wed, 24 Jan 2007 14:33:40 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H9jBz-0003sd-WF for gnash-commit@gnu.org; Wed, 24 Jan 2007 14:33:40 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Wed, 24 Jan 2007 14:33:40 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash/testsuite/misc-ming.all place_and_remove_... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jan 2007 14:33:44 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/24 14:33:39 Modified files: testsuite/misc-ming.all: place_and_remove_object_insane_test.c Log message: comments fixes CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/place_and_remove_object_insane_test.c?cvsroot=gnash&r1=1.7&r2=1.8 Patches: Index: place_and_remove_object_insane_test.c =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/place_and_remove_object_insane_test.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -b -r1.7 -r1.8 --- place_and_remove_object_insane_test.c 24 Jan 2007 13:32:39 -0000 1.7 +++ place_and_remove_object_insane_test.c 24 Jan 2007 14:33:39 -0000 1.8 @@ -21,10 +21,9 @@ * * Test for tag PlaceObject2 and also sprite_instance::advance_sprite(float delta_time) * - * Normally, you will see the both the red square and black square - * again and again while looping back + * TODO: add description here ! * - * run as ./place_and_remove_object_test + * run as ./place_and_remove_object_insane_test */ #include From MAILER-DAEMON Wed Jan 24 10:17:33 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H9jsT-00081O-B8 for mharc-gnash-commit@gnu.org; Wed, 24 Jan 2007 10:17:33 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H9jsS-00081A-6g for gnash-commit@gnu.org; Wed, 24 Jan 2007 10:17:32 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H9jsQ-00080g-UY for gnash-commit@gnu.org; Wed, 24 Jan 2007 10:17:31 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9jsQ-00080d-Pg for gnash-commit@gnu.org; Wed, 24 Jan 2007 10:17:30 -0500 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H9jsP-00023U-Fc for gnash-commit@gnu.org; Wed, 24 Jan 2007 10:17:29 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H9jsO-0005mz-Rb for gnash-commit@gnu.org; Wed, 24 Jan 2007 15:17:28 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H9jsO-0005mt-Gw for gnash-commit@gnu.org; Wed, 24 Jan 2007 15:17:28 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Wed, 24 Jan 2007 15:17:28 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jan 2007 15:17:32 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/24 15:17:28 Modified files: . : ChangeLog testsuite/misc-ming.all: Makefile.am Added files: testsuite/misc-ming.all: action_execution_order_test.c attachMovieLoopingTest.c attachMovieLoopingTestRunner.cpp Log message: * testsuite/misc-ming.all/: Makefile.am, action_execution_order_test.c, attachMovieLoopingTest.c, attachMovieLoopingTestRunner.cpp: More tests, with failures (didnt' bother using xcheck as I'm working on them). CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2168&r2=1.2169 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/Makefile.am?cvsroot=gnash&r1=1.55&r2=1.56 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/action_execution_order_test.c?cvsroot=gnash&rev=1.1 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/attachMovieLoopingTest.c?cvsroot=gnash&rev=1.1 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/attachMovieLoopingTestRunner.cpp?cvsroot=gnash&rev=1.1 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2168 retrieving revision 1.2169 diff -u -b -r1.2168 -r1.2169 --- ChangeLog 24 Jan 2007 13:32:39 -0000 1.2168 +++ ChangeLog 24 Jan 2007 15:17:28 -0000 1.2169 @@ -1,5 +1,13 @@ 2007-01-24 Sandro Santilli + * testsuite/misc-ming.all/: Makefile.am, + action_execution_order_test.c, attachMovieLoopingTest.c, + attachMovieLoopingTestRunner.cpp: + More tests, with failures (didnt' bother using xcheck as + I'm working on them). + +2007-01-24 Sandro Santilli + * testsuite/misc-ming.all/place_and_remove_object_insane_test.c: Last commit fixed a couple of tests in this testcase. * server/: character.h, sprite_instance.{cpp,h}: Index: testsuite/misc-ming.all/Makefile.am =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/Makefile.am,v retrieving revision 1.55 retrieving revision 1.56 diff -u -b -r1.55 -r1.56 --- testsuite/misc-ming.all/Makefile.am 24 Jan 2007 10:11:54 -0000 1.55 +++ testsuite/misc-ming.all/Makefile.am 24 Jan 2007 15:17:28 -0000 1.56 @@ -70,9 +70,12 @@ place_and_remove_object_insane_test \ attachMovieTest \ attachMovieTestRunner \ + attachMovieLoopingTest \ + attachMovieLoopingTestRunner \ registerClassTest \ registerClassTestRunner \ goto_frame_test \ + action_execution_order_test \ $(NULL) check_SCRIPTS = \ @@ -82,6 +85,7 @@ place_and_remove_object_testrunner \ place_and_remove_object_insane_testrunner \ goto_frame_testrunner \ + action_execution_order_testrunner \ $(NULL) # TESTS = \ @@ -275,6 +279,31 @@ $(top_builddir)/testsuite/libtestsuite.la \ $(NULL) +attachMovieLoopingTest_SOURCES = \ + attachMovieLoopingTest.c \ + ming_utils.h \ + ming_utils.c \ + $(NULL) +attachMovieLoopingTest_LDADD = $(MING_LIBS) + +attachMovieLoopingTest.swf: attachMovieLoopingTest + ./attachMovieLoopingTest $(top_srcdir)/testsuite/media + +attachMovieLoopingTestRunner_SOURCES = \ + attachMovieLoopingTestRunner.cpp \ + $(NULL) +attachMovieLoopingTestRunner_LDADD = \ + $(top_builddir)/testsuite/libtestsuite.la \ + $(NULL) +attachMovieLoopingTestRunner_CXXFLAGS = \ + -DSRCDIR='"$(srcdir)"' \ + -DTGTDIR='"$(abs_builddir)"' \ + $(NULL) +attachMovieLoopingTestRunner_DEPENDENCIES = \ + attachMovieLoopingTest.swf \ + $(top_builddir)/testsuite/libtestsuite.la \ + $(NULL) + goto_frame_test_SOURCES = \ goto_frame_test.c \ ming_utils.h \ @@ -289,6 +318,20 @@ sh $< $(top_builddir) goto_frame_test.swf > $@ chmod 755 $@ +action_execution_order_test_SOURCES = \ + action_execution_order_test.c \ + ming_utils.h \ + ming_utils.c \ + $(NULL) +action_execution_order_test_LDADD = $(MING_LIBS) + +action_execution_order_test.swf: action_execution_order_test + ./action_execution_order_test $(top_srcdir)/testsuite/media + +action_execution_order_testrunner: $(srcdir)/../generic-testrunner.sh action_execution_order_test.swf + sh $< $(top_builddir) action_execution_order_test.swf > $@ + chmod 755 $@ + registerClassTest_SOURCES = \ registerClassTest.c \ ming_utils.h \ @@ -396,6 +439,7 @@ attachMovieTestRunner \ goto_frame_testrunner \ registerClassTestRunner \ + action_execution_order_testrunner \ $(NULL) Index: testsuite/misc-ming.all/action_execution_order_test.c =================================================================== RCS file: testsuite/misc-ming.all/action_execution_order_test.c diff -N testsuite/misc-ming.all/action_execution_order_test.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ testsuite/misc-ming.all/action_execution_order_test.c 24 Jan 2007 15:17:28 -0000 1.1 @@ -0,0 +1,99 @@ +/* + * Copyright (C) 2005, 2006 Free Software Foundation, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +/* + * Zou Lunkai, zoulunkai@gmail.com + * + * Test the execution order of actions within different movieClips + * + * set a variable with a new value under _root, then set it again under anther movieClip. + * the variable will only record the later assignment. Checking the final result of the + * variable will tell us which action(assignment) is executed first. + */ + +#include +#include +#include + +#include "ming_utils.h" + +#define OUTPUT_VERSION 6 +#define OUTPUT_FILENAME "action_execution_order_test.swf" + + +int +main(int argc, char** argv) +{ + SWFMovie mo; + SWFMovieClip mc_red, dejagnuclip; + SWFShape sh_red; + + const char *srcdir="."; + if ( argc>1 ) + srcdir=argv[1]; + else + { + fprintf(stderr, "Usage: %s \n", argv[0]); + return 1; + } + + Ming_init(); + mo = newSWFMovieWithVersion(OUTPUT_VERSION); + SWFMovie_setDimension(mo, 800, 600); + SWFMovie_setRate (mo, 12.0); + + dejagnuclip = get_dejagnu_clip((SWFBlock)get_default_font(srcdir), 10, 0, 0, 800, 600); + SWFMovie_add(mo, (SWFBlock)dejagnuclip); + + + mc_red = newSWFMovieClip(); + sh_red = make_fill_square (0, 300, 60, 60, 255, 0, 0, 255, 0, 0); + SWFMovieClip_add(mc_red, (SWFBlock)sh_red); + add_clip_actions(mc_red, " _root.x1 = \"as_in_mc_red\"; "); + SWFMovieClip_nextFrame(mc_red);//1st frame + add_clip_actions(mc_red, " _root.x2 = \"as_in_mc_red\"; stop(); "); + SWFMovieClip_nextFrame(mc_red);//2nd frame + + //add mc_red to _root and name it as "mc_red" + SWFDisplayItem it_red; + it_red = SWFMovie_add(mo, (SWFBlock)mc_red); + SWFDisplayItem_setDepth(it_red, 3); + SWFDisplayItem_setName(it_red, "mc_red"); + + add_actions(mo, " var x1 = \"as_in_root\"; "); + SWFMovie_nextFrame(mo); //1st frame + add_actions(mo, " _root.x2 = \"as_in_root\"; "); + SWFMovie_nextFrame(mo); //2nd frame + + //checks + //at 1st frame, actions in mc_red is executed *after* actions in _root + check_equals(mo, "_root.x1", "'as_in_mc_red'"); + //at 2nd frame, actions in mc_red is executed *before* actions in _root + check_equals(mo, "_root.x2", "'as_in_root'"); + add_actions(mo, " _root.totals(); stop(); "); + SWFMovie_nextFrame(mo); //3rd frame + + //Output movie + puts("Saving " OUTPUT_FILENAME ); + SWFMovie_save(mo, OUTPUT_FILENAME); + + return 0; +} + + + Index: testsuite/misc-ming.all/attachMovieLoopingTest.c =================================================================== RCS file: testsuite/misc-ming.all/attachMovieLoopingTest.c diff -N testsuite/misc-ming.all/attachMovieLoopingTest.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ testsuite/misc-ming.all/attachMovieLoopingTest.c 24 Jan 2007 15:17:28 -0000 1.1 @@ -0,0 +1,134 @@ +/* + * Copyright (C) 2005, 2006 Free Software Foundation, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + * + */ + +/* + * Test MovieClip.attachMovie(). + * + * Exports a 'redsquare' symbol and then attach it to main timeline 4 times + * at depths 70+[0..3] and with xoffset 70*[0..3] + * The attachMovie() calls all happen in the same frame, the second one. + * It is expected that all of them will persist (not be cleared by loopback). + * + * run as ./attachMovieLoopingTest + */ + +#include +#include +#include + +#include "ming_utils.h" + +#define OUTPUT_VERSION 6 +#define OUTPUT_FILENAME "attachMovieLoopingTest.swf" + +void addRedSquareExport(SWFMovie mo); +void +addRedSquareExport(SWFMovie mo) +{ + SWFShape sh; + SWFMovieClip mc; + + sh = make_fill_square (0, 0, 60, 60, 255, 0, 0, 255, 0, 0); + mc = newSWFMovieClip(); + + SWFMovieClip_add(mc, (SWFBlock)sh); + /* This is here just to turn the clip into an active one */ + add_clip_actions(mc, "onRollOver = function() {};"); + SWFMovieClip_nextFrame(mc); + + SWFMovie_addExport(mo, (SWFBlock)mc, "redsquare"); + + SWFMovie_writeExports(mo); +} + +int +main(int argc, char** argv) +{ + SWFMovie mo; + const char *srcdir="."; + SWFMovieClip dejagnuclip; + + + /********************************************* + * + * Initialization + * + *********************************************/ + + if ( argc>1 ) srcdir=argv[1]; + else + { + fprintf(stderr, "Usage: %s\n", argv[0]); + return 1; + } + + puts("Setting things up"); + + Ming_init(); + Ming_useSWFVersion (OUTPUT_VERSION); + Ming_setScale(20.0); /* let's talk pixels */ + + mo = newSWFMovie(); + SWFMovie_setRate(mo, 12); + //SWFMovie_setDimension(mo, 6400, 4000); + SWFMovie_setDimension(mo, 640, 400); + + /********************************************* + * + * Body + * + *********************************************/ + + dejagnuclip = get_dejagnu_clip((SWFBlock)get_default_font(srcdir), 10, 0, 80, 800, 600); + SWFMovie_add(mo, (SWFBlock)dejagnuclip); + + addRedSquareExport(mo); + /* it seems we need a SHOWFRAME for this to be effective */ + /* (maybe it's related to loop-back handling ?) */ + SWFMovie_nextFrame(mo); + + add_actions(mo, "initObj = new Object();"); + + add_actions(mo, + "if ( counter < 4 ) {" + " initObj._x = 70*counter;" + " attachMovie('redsquare', " + " 'square'+counter, 70+counter, initObj);" + " check_equals(this['square'+counter]._x, 70*counter);" + " counter++;" + "} else {" + " totals(); stop();" + "}" + ); + + SWFMovie_nextFrame(mo); /* showFrame */ + + + /***************************************************** + * + * Output movie + * + *****************************************************/ + + puts("Saving " OUTPUT_FILENAME ); + + SWFMovie_save(mo, OUTPUT_FILENAME); + + return 0; +} Index: testsuite/misc-ming.all/attachMovieLoopingTestRunner.cpp =================================================================== RCS file: testsuite/misc-ming.all/attachMovieLoopingTestRunner.cpp diff -N testsuite/misc-ming.all/attachMovieLoopingTestRunner.cpp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ testsuite/misc-ming.all/attachMovieLoopingTestRunner.cpp 24 Jan 2007 15:17:28 -0000 1.1 @@ -0,0 +1,107 @@ +/* + * Copyright (C) 2005, 2006 Free Software Foundation, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + * + */ + +#define INPUT_FILENAME "attachMovieLoopingTest.swf" + +#include "MovieTester.h" +#include "sprite_instance.h" +#include "character.h" +#include "dlist.h" +#include "container.h" +#include "log.h" + +#include "check.h" +#include +#include + +using namespace gnash; +using namespace std; + +int +main(int /*argc*/, char** /*argv*/) +{ + string filename = string(TGTDIR) + string("/") + string(INPUT_FILENAME); + MovieTester tester(filename); + + gnash::LogFile& dbglogfile = gnash::LogFile::getDefaultInstance(); + dbglogfile.setVerbosity(1); + + sprite_instance* root = tester.getRootMovie(); + assert(root); + + check_equals(root->get_frame_count(), 2); + check_equals(root->get_play_state(), sprite_instance::PLAY); + check_equals(root->get_current_frame(), 0); + + check(! tester.findDisplayItemByDepth(*root, 70) ); + check(! tester.findDisplayItemByDepth(*root, 71) ); + check(! tester.findDisplayItemByDepth(*root, 72) ); + check(! tester.findDisplayItemByDepth(*root, 73) ); + + tester.movePointerTo(30, 30); + check(!tester.isMouseOverMouseEntity()); + + tester.advance(); + + check(tester.findDisplayItemByDepth(*root, 70) ); + check(! tester.findDisplayItemByDepth(*root, 71) ); + check(! tester.findDisplayItemByDepth(*root, 72) ); + check(! tester.findDisplayItemByDepth(*root, 73) ); + + tester.movePointerTo(30, 30); + check(tester.isMouseOverMouseEntity()); + tester.movePointerTo(100, 30); + check(!tester.isMouseOverMouseEntity()); + + + tester.advance(); + + check( tester.findDisplayItemByDepth(*root, 70) ); + check( tester.findDisplayItemByDepth(*root, 71) ); + check(! tester.findDisplayItemByDepth(*root, 72) ); + check(! tester.findDisplayItemByDepth(*root, 73) ); + + tester.movePointerTo(100, 30); + check(tester.isMouseOverMouseEntity()); + tester.movePointerTo(170, 30); + check(!tester.isMouseOverMouseEntity()); + + tester.advance(); + + check( tester.findDisplayItemByDepth(*root, 70) ); + check( tester.findDisplayItemByDepth(*root, 71) ); + check( tester.findDisplayItemByDepth(*root, 72) ); + check(! tester.findDisplayItemByDepth(*root, 73) ); + + tester.movePointerTo(170, 30); + check(tester.isMouseOverMouseEntity()); + tester.movePointerTo(240, 30); + check(!tester.isMouseOverMouseEntity()); + + tester.advance(); + + check( tester.findDisplayItemByDepth(*root, 70) ); + check( tester.findDisplayItemByDepth(*root, 71) ); + check( tester.findDisplayItemByDepth(*root, 72) ); + check( tester.findDisplayItemByDepth(*root, 73) ); + + tester.movePointerTo(240, 30); + check(tester.isMouseOverMouseEntity()); +} + From MAILER-DAEMON Wed Jan 24 11:52:08 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H9lM0-0000Mi-Qg for mharc-gnash-commit@gnu.org; Wed, 24 Jan 2007 11:52:08 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H9lLz-0000LT-RS for gnash-commit@gnu.org; Wed, 24 Jan 2007 11:52:07 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H9lLx-0000KH-MF for gnash-commit@gnu.org; Wed, 24 Jan 2007 11:52:07 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9lLx-0000KC-Fy for gnash-commit@gnu.org; Wed, 24 Jan 2007 11:52:05 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H9lLx-000506-6a for gnash-commit@gnu.org; Wed, 24 Jan 2007 11:52:05 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H9lLw-0003eG-Mb for gnash-commit@gnu.org; Wed, 24 Jan 2007 16:52:04 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H9lLw-0003eD-FC for gnash-commit@gnu.org; Wed, 24 Jan 2007 16:52:04 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Wed, 24 Jan 2007 16:52:04 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash/server sprite_instance.cpp X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jan 2007 16:52:08 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/24 16:52:04 Modified files: server : sprite_instance.cpp Log message: fixed typo for OLD_GET_MEMBER built to work CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.133&r2=1.134 Patches: Index: sprite_instance.cpp =================================================================== RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v retrieving revision 1.133 retrieving revision 1.134 diff -u -b -r1.133 -r1.134 --- sprite_instance.cpp 24 Jan 2007 13:23:18 -0000 1.133 +++ sprite_instance.cpp 24 Jan 2007 16:52:04 -0000 1.134 @@ -2351,7 +2351,7 @@ m.set_scale_rotation(x_scale, y_scale, rotation); set_matrix(m); - m_accept_anim_moves = false; + ptr->transformedByScript(); // m_accept_anim_moves = false; return; } case M_YSCALE: From MAILER-DAEMON Wed Jan 24 12:13:31 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H9lgg-0007FA-Sz for mharc-gnash-commit@gnu.org; Wed, 24 Jan 2007 12:13:30 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H9lge-0007F4-Vj for gnash-commit@gnu.org; Wed, 24 Jan 2007 12:13:29 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H9lge-0007Es-BD for gnash-commit@gnu.org; Wed, 24 Jan 2007 12:13:28 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9lge-0007Ep-6N for gnash-commit@gnu.org; Wed, 24 Jan 2007 12:13:28 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H9lgc-0001wK-EB for gnash-commit@gnu.org; Wed, 24 Jan 2007 12:13:26 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H9lga-00043z-Vq for gnash-commit@gnu.org; Wed, 24 Jan 2007 17:13:25 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H9lga-00043w-Ny for gnash-commit@gnu.org; Wed, 24 Jan 2007 17:13:24 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Wed, 24 Jan 2007 17:13:24 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash/server sprite_instance.cpp X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jan 2007 17:13:29 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/24 17:13:24 Modified files: server : sprite_instance.cpp Log message: real fix for OLD_GET_MEMBER build CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.134&r2=1.135 Patches: Index: sprite_instance.cpp =================================================================== RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v retrieving revision 1.134 retrieving revision 1.135 diff -u -b -r1.134 -r1.135 --- sprite_instance.cpp 24 Jan 2007 16:52:04 -0000 1.134 +++ sprite_instance.cpp 24 Jan 2007 17:13:24 -0000 1.135 @@ -2351,7 +2351,7 @@ m.set_scale_rotation(x_scale, y_scale, rotation); set_matrix(m); - ptr->transformedByScript(); // m_accept_anim_moves = false; + transformedByScript(); // m_accept_anim_moves = false; return; } case M_YSCALE: From MAILER-DAEMON Wed Jan 24 18:33:07 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H9rc2-0003x5-UY for mharc-gnash-commit@gnu.org; Wed, 24 Jan 2007 18:33:06 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H9rc1-0003wu-Ib for gnash-commit@gnu.org; Wed, 24 Jan 2007 18:33:05 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H9rc0-0003wh-Ec for gnash-commit@gnu.org; Wed, 24 Jan 2007 18:33:05 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9rc0-0003we-8i for gnash-commit@gnu.org; Wed, 24 Jan 2007 18:33:04 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H9rbz-0000fy-7A for gnash-commit@gnu.org; Wed, 24 Jan 2007 18:33:03 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H9rbx-0005TX-Ro for gnash-commit@gnu.org; Wed, 24 Jan 2007 23:33:01 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1H9rbx-0005TQ-8K for gnash-commit@gnu.org; Wed, 24 Jan 2007 23:33:01 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Wed, 24 Jan 2007 23:33:01 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash ChangeLog server/character.h server/dlist... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jan 2007 23:33:05 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/24 23:33:01 Modified files: . : ChangeLog server : character.h dlist.cpp dlist.h sprite_instance.cpp testsuite/misc-ming.all: Makefile.am action_execution_order_test.c attachMovieLoopingTest.c attachMovieLoopingTestRunner.cpp Log message: * server/character.h: add isDynamic() and setDynamic() function to tag actionscript-created characters; have accept_anim_moves return false for dynamic chars. * server/dlist.{cpp,h}: new add() and addAll() helper methods. * server/sprite_instance.cpp (execute_frame_tags): keep script objects when reinitializing DisplayList on loop-back; (sprite_attach_movie, sprite_duplicate_movieclip, add_empty_movieclip): mark created characters as dynamic. * testsuite/misc-ming.all/: Makefile.am, attachMovieLoopingTest.c, attachMovieLoopingTestRunner.cpp: test for DisplayList reset on loopback when dynamic characters are present. * testsuite/misc-ming.all/action_execution_order_test.c: expect failure of the only test in there... CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2169&r2=1.2170 http://cvs.savannah.gnu.org/viewcvs/gnash/server/character.h?cvsroot=gnash&r1=1.37&r2=1.38 http://cvs.savannah.gnu.org/viewcvs/gnash/server/dlist.cpp?cvsroot=gnash&r1=1.43&r2=1.44 http://cvs.savannah.gnu.org/viewcvs/gnash/server/dlist.h?cvsroot=gnash&r1=1.22&r2=1.23 http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.135&r2=1.136 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/Makefile.am?cvsroot=gnash&r1=1.56&r2=1.57 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/action_execution_order_test.c?cvsroot=gnash&r1=1.1&r2=1.2 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/attachMovieLoopingTest.c?cvsroot=gnash&r1=1.1&r2=1.2 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/attachMovieLoopingTestRunner.cpp?cvsroot=gnash&r1=1.1&r2=1.2 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2169 retrieving revision 1.2170 diff -u -b -r1.2169 -r1.2170 --- ChangeLog 24 Jan 2007 15:17:28 -0000 1.2169 +++ ChangeLog 24 Jan 2007 23:33:00 -0000 1.2170 @@ -1,5 +1,21 @@ 2007-01-24 Sandro Santilli + * server/character.h: add isDynamic() and setDynamic() + function to tag actionscript-created characters; + have accept_anim_moves return false for dynamic chars. + * server/dlist.{cpp,h}: new add() and addAll() helper methods. + * server/sprite_instance.cpp (execute_frame_tags): + keep script objects when reinitializing DisplayList + on loop-back; (sprite_attach_movie, sprite_duplicate_movieclip, + add_empty_movieclip): mark created characters as dynamic. + * testsuite/misc-ming.all/: Makefile.am, attachMovieLoopingTest.c, + attachMovieLoopingTestRunner.cpp: test for DisplayList reset + on loopback when dynamic characters are present. + * testsuite/misc-ming.all/action_execution_order_test.c: + expect failure of the only test in there... + +2007-01-24 Sandro Santilli + * testsuite/misc-ming.all/: Makefile.am, action_execution_order_test.c, attachMovieLoopingTest.c, attachMovieLoopingTestRunner.cpp: Index: server/character.h =================================================================== RCS file: /sources/gnash/gnash/server/character.h,v retrieving revision 1.37 retrieving revision 1.38 diff -u -b -r1.37 -r1.38 --- server/character.h 24 Jan 2007 13:23:18 -0000 1.37 +++ server/character.h 24 Jan 2007 23:33:00 -0000 1.38 @@ -18,7 +18,7 @@ // // -/* $Id: character.h,v 1.37 2007/01/24 13:23:18 strk Exp $ */ +/* $Id: character.h,v 1.38 2007/01/24 23:33:00 strk Exp $ */ #ifndef GNASH_CHARACTER_H #define GNASH_CHARACTER_H @@ -126,6 +126,8 @@ /// bool _scriptTransformed; + bool _dynamicallyCreated; + public: character(character* parent, int id) @@ -141,7 +143,8 @@ m_parent(parent), m_invalidated(true), m_old_invalidated_bounds(), - _scriptTransformed(false) + _scriptTransformed(false), + _dynamicallyCreated(false) { assert((parent == NULL && m_id == -1) || (parent != NULL && m_id >= 0)); @@ -336,7 +339,23 @@ /// bool get_accept_anim_moves() const { - return ! _scriptTransformed; + return ! _scriptTransformed && ! _dynamicallyCreated; + } + + /// Was this character dynamically created ? + // + /// "Dynamically created" means created trough ActionScript + /// + bool isDynamic() const { + return _dynamicallyCreated; + } + + /// Mark this character as dynamically created + // + /// "Dynamically created" means created trough ActionScript + /// + void setDynamic() { + _dynamicallyCreated = true; } /// \brief Index: server/dlist.cpp =================================================================== RCS file: /sources/gnash/gnash/server/dlist.cpp,v retrieving revision 1.43 retrieving revision 1.44 diff -u -b -r1.43 -r1.44 --- server/dlist.cpp 10 Jan 2007 11:21:50 -0000 1.43 +++ server/dlist.cpp 24 Jan 2007 23:33:00 -0000 1.44 @@ -217,6 +217,35 @@ } void +DisplayList::add(character* ch, bool replace) +{ + int depth = ch->get_depth(); + + container_type::iterator it = find_if( + _characters.begin(), _characters.end(), + DepthGreaterOrEqual(depth)); + if ( it == _characters.end() || (*it)->get_depth() != depth ) + { + _characters.insert(it, DisplayItem(ch)); + } + else if ( replace ) + { + *it = DisplayItem(ch); + } +} + +void +DisplayList::addAll(std::vector& chars, bool replace) +{ + for (std::vector::iterator it=chars.begin(), + itEnd=chars.end(); + it != itEnd; ++it) + { + add(*it, replace); + } +} + +void DisplayList::replace_character( character* ch, uint16_t depth, Index: server/dlist.h =================================================================== RCS file: /sources/gnash/gnash/server/dlist.h,v retrieving revision 1.22 retrieving revision 1.23 diff -u -b -r1.22 -r1.23 --- server/dlist.h 10 Jan 2007 11:21:50 -0000 1.22 +++ server/dlist.h 24 Jan 2007 23:33:00 -0000 1.23 @@ -138,6 +138,12 @@ /// void clear_except(std::vector& exclude); + /// Add all chars in the list + void addAll(std::vector& chars, bool replace); + + /// Add chars in the list + void add(character* ch, bool replace); + // It is executed only before the second and the subsequent // execution of execute_frame_tags(0) for sprite_instance // with frame count > 1. Index: server/sprite_instance.cpp =================================================================== RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v retrieving revision 1.135 retrieving revision 1.136 diff -u -b -r1.135 -r1.136 --- server/sprite_instance.cpp 24 Jan 2007 17:13:24 -0000 1.135 +++ server/sprite_instance.cpp 24 Jan 2007 23:33:00 -0000 1.136 @@ -71,7 +71,7 @@ // for '_x' property, but attachMovieTest is succeeding with the *new* layout // and failign with the previous. // -//#define OLD_GET_MEMBER +#define OLD_GET_MEMBER // Forward declarations static as_object* getMovieClipInterface(); @@ -219,6 +219,8 @@ return; } + newch->setDynamic(); + /// Properties must be copied *after* the call to attachCharacter /// because attachCharacter() will reset matrix !! if (fn.nargs > 3 ) { @@ -396,6 +398,8 @@ sprite->get_ratio(), sprite->get_clip_depth()); + ch->setDynamic(); + // Copy members from initObject if (fn.nargs == 3 && ch) { @@ -1679,6 +1683,76 @@ } }; +/// A DisplayList visitor used to extract script characters +// +/// Script characters are characters created or transformed +/// by ActionScript +/// +class ScriptObjectsFinder { + std::vector& _chars; +public: + ScriptObjectsFinder(std::vector& chars) + : + _chars(chars) + {} + + bool operator() (character* ch) + { + // TODO: Are script-transformed object to be kept ? + // Need a testcase for this + if ( ! ch->get_accept_anim_moves() ) + //if ( ch->isDynamic() ) + { + _chars.push_back(ch); + } + return true; // keep scanning + } +}; + +/// A DisplayList visitor used to extract static characters +// +/// Static characters are characters instantiaced trough display-list SWF tags +/// +class StaticObjectsFinder { + std::vector& _chars; +public: + StaticObjectsFinder(std::vector& chars) + : + _chars(chars) + {} + + bool operator() (character* ch) + { + //if ( ch->get_accept_anim_moves() ) + if ( ! ch->isDynamic() ) + { + _chars.push_back(ch); + } + return true; // keep scanning + } +}; + +/// A DisplayList visitor used to extract all characters +// +/// Script characters are characters created or transformed +/// by ActionScript +/// +class CharactersExtractor { + std::vector& _chars; +public: + CharactersExtractor(std::vector& chars) + : + _chars(chars) + {} + + bool operator() (character* ch) + { + _chars.push_back(ch); + return true; // keep scanning + } +}; + + //------------------------------------------------ // sprite_instance //------------------------------------------------ @@ -2164,6 +2238,7 @@ sprite_instance* sprite = new sprite_instance(empty_sprite_def, m_root, this, 0); sprite->set_name(name); + sprite->setDynamic(); m_display_list.place_character( sprite, @@ -2758,6 +2833,15 @@ // characters in it might have been // externally changed. _frame0_chars.sort(); + + // Add script objects in current DisplayList + std::vector charsToAdd; + ScriptObjectsFinder scriptObjFinder(charsToAdd); + m_display_list.visitForward(scriptObjFinder); + // NOTE: script objects are *not* allowed to replace depths + // of static objects (change second argument to switch) + _frame0_chars.addAll(charsToAdd, false); + m_display_list = _frame0_chars; } Index: testsuite/misc-ming.all/Makefile.am =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/Makefile.am,v retrieving revision 1.56 retrieving revision 1.57 diff -u -b -r1.56 -r1.57 --- testsuite/misc-ming.all/Makefile.am 24 Jan 2007 15:17:28 -0000 1.56 +++ testsuite/misc-ming.all/Makefile.am 24 Jan 2007 23:33:01 -0000 1.57 @@ -437,6 +437,7 @@ place_and_remove_object_testrunner \ place_and_remove_object_insane_testrunner \ attachMovieTestRunner \ + attachMovieLoopingTestRunner \ goto_frame_testrunner \ registerClassTestRunner \ action_execution_order_testrunner \ Index: testsuite/misc-ming.all/action_execution_order_test.c =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/action_execution_order_test.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -b -r1.1 -r1.2 --- testsuite/misc-ming.all/action_execution_order_test.c 24 Jan 2007 15:17:28 -0000 1.1 +++ testsuite/misc-ming.all/action_execution_order_test.c 24 Jan 2007 23:33:01 -0000 1.2 @@ -84,7 +84,7 @@ //at 1st frame, actions in mc_red is executed *after* actions in _root check_equals(mo, "_root.x1", "'as_in_mc_red'"); //at 2nd frame, actions in mc_red is executed *before* actions in _root - check_equals(mo, "_root.x2", "'as_in_root'"); + xcheck_equals(mo, "_root.x2", "'as_in_root'"); add_actions(mo, " _root.totals(); stop(); "); SWFMovie_nextFrame(mo); //3rd frame Index: testsuite/misc-ming.all/attachMovieLoopingTest.c =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/attachMovieLoopingTest.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -b -r1.1 -r1.2 --- testsuite/misc-ming.all/attachMovieLoopingTest.c 24 Jan 2007 15:17:28 -0000 1.1 +++ testsuite/misc-ming.all/attachMovieLoopingTest.c 24 Jan 2007 23:33:01 -0000 1.2 @@ -107,11 +107,22 @@ add_actions(mo, "if ( counter < 4 ) {" + " if ( counter != undefined ) { " " initObj._x = 70*counter;" " attachMovie('redsquare', " " 'square'+counter, 70+counter, initObj);" + " } else {" + /* We don't use an initObject for the first attachMovie call + * to verify that the character will be kept in DisplayList + * at loopback time anyway + */ + " attachMovie('redsquare', " + " 'square'+counter, 70+counter);" + " }" " check_equals(this['square'+counter]._x, 70*counter);" + " note('Depth is '+70*counter);" " counter++;" + " note('Next counter is '+counter);" "} else {" " totals(); stop();" "}" Index: testsuite/misc-ming.all/attachMovieLoopingTestRunner.cpp =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/attachMovieLoopingTestRunner.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -b -r1.1 -r1.2 --- testsuite/misc-ming.all/attachMovieLoopingTestRunner.cpp 24 Jan 2007 15:17:28 -0000 1.1 +++ testsuite/misc-ming.all/attachMovieLoopingTestRunner.cpp 24 Jan 2007 23:33:01 -0000 1.2 @@ -57,7 +57,7 @@ tester.movePointerTo(30, 30); check(!tester.isMouseOverMouseEntity()); - tester.advance(); + tester.advance(); check_equals(root->get_current_frame(), 1); check(tester.findDisplayItemByDepth(*root, 70) ); check(! tester.findDisplayItemByDepth(*root, 71) ); @@ -69,8 +69,8 @@ tester.movePointerTo(100, 30); check(!tester.isMouseOverMouseEntity()); - - tester.advance(); + tester.advance(); check_equals(root->get_current_frame(), 0); + tester.advance(); check_equals(root->get_current_frame(), 1); check( tester.findDisplayItemByDepth(*root, 70) ); check( tester.findDisplayItemByDepth(*root, 71) ); @@ -82,7 +82,8 @@ tester.movePointerTo(170, 30); check(!tester.isMouseOverMouseEntity()); - tester.advance(); + tester.advance(); check_equals(root->get_current_frame(), 0); + tester.advance(); check_equals(root->get_current_frame(), 1); check( tester.findDisplayItemByDepth(*root, 70) ); check( tester.findDisplayItemByDepth(*root, 71) ); @@ -94,7 +95,8 @@ tester.movePointerTo(240, 30); check(!tester.isMouseOverMouseEntity()); - tester.advance(); + tester.advance(); check_equals(root->get_current_frame(), 0); + tester.advance(); check_equals(root->get_current_frame(), 1); check( tester.findDisplayItemByDepth(*root, 70) ); check( tester.findDisplayItemByDepth(*root, 71) ); From MAILER-DAEMON Wed Jan 24 20:01:12 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1H9szI-0001t6-C0 for mharc-gnash-commit@gnu.org; Wed, 24 Jan 2007 20:01:12 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H9szF-0001m1-3E for gnash-commit@gnu.org; Wed, 24 Jan 2007 20:01:09 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H9szE-0001je-1W for gnash-commit@gnu.org; Wed, 24 Jan 2007 20:01:08 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9szD-0001jA-PW for gnash-commit@gnu.org; Wed, 24 Jan 2007 20:01:07 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H9szD-0000zB-9O for gnash-commit@gnu.org; Wed, 24 Jan 2007 20:01:07 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1H9syj-0000IM-O4 for gnash-commit@gnu.org; Thu, 25 Jan 2007 01:00:37 +0000 Received: from ann by savannah.gnu.org with local (Exim 4.50) id 1H9syj-0000II-F3 for gnash-commit@gnu.org; Thu, 25 Jan 2007 01:00:37 +0000 To: gnash-commit@gnu.org Message-Id: From: Ann Barcomb Date: Thu, 25 Jan 2007 01:00:37 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash ChangeLog doc/C/gnash-man.xml doc/C/gnash... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jan 2007 01:01:09 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Ann Barcomb 07/01/25 01:00:37 Modified files: . : ChangeLog doc/C : gnash-man.xml gnash.xml gui : fltk.cpp Log message: Following a thread on the dev list about the function of -a I updated the manual. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2170&r2=1.2171 http://cvs.savannah.gnu.org/viewcvs/gnash/doc/C/gnash-man.xml?cvsroot=gnash&r1=1.6&r2=1.7 http://cvs.savannah.gnu.org/viewcvs/gnash/doc/C/gnash.xml?cvsroot=gnash&r1=1.38&r2=1.39 http://cvs.savannah.gnu.org/viewcvs/gnash/gui/fltk.cpp?cvsroot=gnash&r1=1.3&r2=1.4 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2170 retrieving revision 1.2171 diff -u -b -r1.2170 -r1.2171 --- ChangeLog 24 Jan 2007 23:33:00 -0000 1.2170 +++ ChangeLog 25 Jan 2007 01:00:37 -0000 1.2171 @@ -1,3 +1,8 @@ +2007-01-24 Ann Barcomb + + * Replaced outdated references to -a in the manual (doc/C) + with current usage. + 2007-01-24 Sandro Santilli * server/character.h: add isDynamic() and setDynamic() Index: doc/C/gnash-man.xml =================================================================== RCS file: /sources/gnash/gnash/doc/C/gnash-man.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -b -r1.6 -r1.7 --- doc/C/gnash-man.xml 20 Oct 2006 06:11:09 -0000 1.6 +++ doc/C/gnash-man.xml 25 Jan 2007 01:00:37 -0000 1.7 @@ -72,16 +72,14 @@ - -x @@ -289,6 +287,7 @@ + CTRL-T Index: doc/C/gnash.xml =================================================================== RCS file: /sources/gnash/gnash/doc/C/gnash.xml,v retrieving revision 1.38 retrieving revision 1.39 diff -u -b -r1.38 -r1.39 --- doc/C/gnash.xml 10 Jan 2007 13:45:46 -0000 1.38 +++ doc/C/gnash.xml 25 Jan 2007 01:00:37 -0000 1.39 @@ -381,7 +381,7 @@ -a - Turn anti-aliasing on/off. (obsolete) + Enable Actionscript debugging. @@ -638,6 +638,7 @@ + CTRL-T Index: gui/fltk.cpp =================================================================== RCS file: /sources/gnash/gnash/gui/fltk.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -b -r1.3 -r1.4 --- gui/fltk.cpp 16 Jan 2007 14:02:45 -0000 1.3 +++ gui/fltk.cpp 25 Jan 2007 01:00:37 -0000 1.4 @@ -20,7 +20,8 @@ #include #include -#include +//#include +#include #include #include #include @@ -194,8 +195,8 @@ FltkGui::create() { // TODO: make the set_xid() call conditional on the availability of X11. - if (_xid) { - CreatedWindow::set_xid(this, _xid); + if (/*_xid*/ false) { + //CreatedWindow::set_xid(this, _xid); } else { Window::create(); } From MAILER-DAEMON Thu Jan 25 05:15:25 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HA1dc-0007Q4-SN for mharc-gnash-commit@gnu.org; Thu, 25 Jan 2007 05:15:24 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HA1db-0007Ph-4M for gnash-commit@gnu.org; Thu, 25 Jan 2007 05:15:23 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HA1dZ-0007PV-LG for gnash-commit@gnu.org; Thu, 25 Jan 2007 05:15:21 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HA1dZ-0007PS-GI for gnash-commit@gnu.org; Thu, 25 Jan 2007 05:15:21 -0500 Received: from equi.bjacques.org ([84.244.180.88]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HA1dY-0004xX-Lj for gnash-commit@gnu.org; Thu, 25 Jan 2007 05:15:21 -0500 Received: from [192.168.0.136] (cc1073080-a.leek1.gr.home.nl [217.121.140.192]) by equi.bjacques.org (8.13.4/8.13.4) with ESMTP id l0PAF9Nj019208; Thu, 25 Jan 2007 11:15:09 +0100 (CET) Subject: Re: [Gnash-commit] gnash ChangeLog doc/C/gnash-man.xml doc/C/gnash... From: Bastiaan Jacques To: Ann Barcomb In-Reply-To: References: Content-Type: text/plain Organization: Lulu Date: Thu, 25 Jan 2007 11:15:09 +0100 Message-Id: <1169720109.13859.13.camel@sioux.welcomehome.org> Mime-Version: 1.0 X-Mailer: Evolution 2.8.2.1 (2.8.2.1-3.fc6) Content-Transfer-Encoding: 7bit X-detected-kernel: OpenBSD 3.0-3.9 Cc: gnash-commit@gnu.org X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jan 2007 10:15:23 -0000 On Thu, 2007-01-25 at 01:00 +0000, Ann Barcomb wrote: > gui : fltk.cpp This was probably committed by accident. It's code I wrote on your machine that allows one to compile the FLTK GUI on OSX, but it's not quite ready for CVS yet. Would you please revert it? Bastiaan > > Log message: > Following a thread on the dev list about the function of -a I updated > the manual. > =================================================================== > RCS file: /sources/gnash/gnash/gui/fltk.cpp,v > retrieving revision 1.3 > retrieving revision 1.4 > diff -u -b -r1.3 -r1.4 > --- gui/fltk.cpp 16 Jan 2007 14:02:45 -0000 1.3 > +++ gui/fltk.cpp 25 Jan 2007 01:00:37 -0000 1.4 > @@ -20,7 +20,8 @@ > > #include > #include > -#include > +//#include > +#include > #include > #include > #include > @@ -194,8 +195,8 @@ > FltkGui::create() > { > // TODO: make the set_xid() call conditional on the availability of X11. > - if (_xid) { > - CreatedWindow::set_xid(this, _xid); > + if (/*_xid*/ false) { > + //CreatedWindow::set_xid(this, _xid); > } else { > Window::create(); > } From MAILER-DAEMON Thu Jan 25 05:55:35 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HA2GV-00015b-FG for mharc-gnash-commit@gnu.org; Thu, 25 Jan 2007 05:55:35 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HA2GT-000136-Rc for gnash-commit@gnu.org; Thu, 25 Jan 2007 05:55:33 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HA2GS-00011F-IZ for gnash-commit@gnu.org; Thu, 25 Jan 2007 05:55:33 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HA2GS-000116-DY for gnash-commit@gnu.org; Thu, 25 Jan 2007 05:55:32 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HA2GR-0005kN-Vj for gnash-commit@gnu.org; Thu, 25 Jan 2007 05:55:32 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HA2GQ-0002Kz-Kq for gnash-commit@gnu.org; Thu, 25 Jan 2007 10:55:30 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1HA2GQ-0002Kw-6L for gnash-commit@gnu.org; Thu, 25 Jan 2007 10:55:30 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Thu, 25 Jan 2007 10:55:30 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jan 2007 10:55:34 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/25 10:55:30 Modified files: . : ChangeLog testsuite/misc-ming.all: Makefile.am Added files: testsuite/misc-ming.all: simple_loop_test.c simple_loop_testrunner.cpp Log message: * testsuite/misc-ming.all/: Makefile.am, simple_loop_test.c, Simple_loop_testrunner.cpp: new test for simple loop. Seems to work internally, but reveals a bug in invalidated bounds computation !! CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2171&r2=1.2172 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/Makefile.am?cvsroot=gnash&r1=1.57&r2=1.58 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/simple_loop_test.c?cvsroot=gnash&rev=1.1 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/simple_loop_testrunner.cpp?cvsroot=gnash&rev=1.1 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2171 retrieving revision 1.2172 diff -u -b -r1.2171 -r1.2172 --- ChangeLog 25 Jan 2007 01:00:37 -0000 1.2171 +++ ChangeLog 25 Jan 2007 10:55:29 -0000 1.2172 @@ -1,3 +1,10 @@ +2007-01-24 Sandro Santilli + + * testsuite/misc-ming.all/: Makefile.am, simple_loop_test.c, + Simple_loop_testrunner.cpp: new test for simple loop. + Seems to work internally, but reveals a bug in invalidated + bounds computation !! + 2007-01-24 Ann Barcomb * Replaced outdated references to -a in the manual (doc/C) Index: testsuite/misc-ming.all/Makefile.am =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/Makefile.am,v retrieving revision 1.57 retrieving revision 1.58 diff -u -b -r1.57 -r1.58 --- testsuite/misc-ming.all/Makefile.am 24 Jan 2007 23:33:01 -0000 1.57 +++ testsuite/misc-ming.all/Makefile.am 25 Jan 2007 10:55:29 -0000 1.58 @@ -75,6 +75,8 @@ registerClassTest \ registerClassTestRunner \ goto_frame_test \ + simple_loop_test \ + simple_loop_testrunner \ action_execution_order_test \ $(NULL) @@ -304,6 +306,32 @@ $(top_builddir)/testsuite/libtestsuite.la \ $(NULL) +simple_loop_test_SOURCES = \ + simple_loop_test.c \ + ming_utils.h \ + ming_utils.c \ + $(NULL) +simple_loop_test_LDADD = $(MING_LIBS) + +simple_loop_test.swf: simple_loop_test + ./simple_loop_test $(top_srcdir)/testsuite/media + +simple_loop_testrunner_SOURCES = \ + simple_loop_testrunner.cpp \ + $(NULL) +simple_loop_testrunner_LDADD = \ + $(top_builddir)/testsuite/libtestsuite.la \ + $(NULL) +simple_loop_testrunner_CXXFLAGS = \ + -DSRCDIR='"$(srcdir)"' \ + -DTGTDIR='"$(abs_builddir)"' \ + $(NULL) +simple_loop_testrunner_DEPENDENCIES = \ + simple_loop_test.swf \ + $(top_builddir)/testsuite/libtestsuite.la \ + $(NULL) + + goto_frame_test_SOURCES = \ goto_frame_test.c \ ming_utils.h \ @@ -441,6 +469,7 @@ goto_frame_testrunner \ registerClassTestRunner \ action_execution_order_testrunner \ + simple_loop_testrunner \ $(NULL) Index: testsuite/misc-ming.all/simple_loop_test.c =================================================================== RCS file: testsuite/misc-ming.all/simple_loop_test.c diff -N testsuite/misc-ming.all/simple_loop_test.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ testsuite/misc-ming.all/simple_loop_test.c 25 Jan 2007 10:55:30 -0000 1.1 @@ -0,0 +1,113 @@ +/* + * Copyright (C) 2005, 2006 Free Software Foundation, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +/* + * Simple test for loopback + * + * The root movie has 4 frames + * First frame initializes the dejagnu stuff. + * Each frame from 2nd to 4th place a character on the stage. + * Last frame (4) contains a goto_frame(2). + */ + +#include +#include +#include + +#include "ming_utils.h" + +#define OUTPUT_VERSION 6 +#define OUTPUT_FILENAME "simple_loop_test.swf" + +static SWFShape +get_shape(int r, int g, int b) +{ + SWFMovieClip mc = newSWFMovieClip(); + SWFShape sh = make_fill_square (0, 300, 60, 60, r, g, b, r, g, b); + //SWFMovieClip_add(mc, (SWFBlock)sh); + //SWFMovieClip_nextFrame(mc); + return sh; +} + +int +main(int argc, char** argv) +{ + SWFMovie mo; + SWFMovieClip mc, dejagnuclip; + SWFDisplayItem it; + + const char *srcdir="."; + if ( argc>1 ) + srcdir=argv[1]; + else + { + fprintf(stderr, "Usage: %s \n", argv[0]); + return 1; + } + + Ming_init(); + mo = newSWFMovieWithVersion(OUTPUT_VERSION); + SWFMovie_setDimension(mo, 800, 600); + SWFMovie_setRate (mo, 2.0); + + /*************************************************************** + * Frame 1 (empty) + ***************************************************************/ + + SWFMovie_nextFrame(mo); + + + /*************************************************************** + * Frame 2 + ***************************************************************/ + + mc = get_shape(255, 0, 0); + it = SWFMovie_add(mo, (SWFBlock)mc); + SWFDisplayItem_setDepth(it, 2); + SWFMovie_nextFrame(mo); + + /*************************************************************** + * Frame 3 + ***************************************************************/ + + mc = get_shape(0, 255, 0); + it = SWFMovie_add(mo, (SWFBlock)mc); + SWFDisplayItem_moveTo(it, 60, 0); + SWFDisplayItem_setDepth(it, 3); + SWFMovie_nextFrame(mo); + + /*************************************************************** + * Frame 4 + ***************************************************************/ + + mc = get_shape(0, 0, 255); + it = SWFMovie_add(mo, (SWFBlock)mc); + SWFDisplayItem_moveTo(it, 120, 0); + SWFDisplayItem_setDepth(it, 4); + SWFMovie_nextFrame(mo); + + + //Output movie + puts("Saving " OUTPUT_FILENAME ); + SWFMovie_save(mo, OUTPUT_FILENAME); + + return 0; +} + + + Index: testsuite/misc-ming.all/simple_loop_testrunner.cpp =================================================================== RCS file: testsuite/misc-ming.all/simple_loop_testrunner.cpp diff -N testsuite/misc-ming.all/simple_loop_testrunner.cpp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ testsuite/misc-ming.all/simple_loop_testrunner.cpp 25 Jan 2007 10:55:30 -0000 1.1 @@ -0,0 +1,128 @@ +/* + * Copyright (C) 2005, 2006 Free Software Foundation, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + * + */ + +// TODO: fix invalidated bounds, which are clearly bogus ! + +#define INPUT_FILENAME "simple_loop_test.swf" + +#include "MovieTester.h" +#include "sprite_instance.h" +#include "character.h" +#include "dlist.h" +#include "container.h" +#include "log.h" + +#include "check.h" +#include +#include + +using namespace gnash; +using namespace std; + +int +main(int /*argc*/, char** /*argv*/) +{ + typedef gnash::geometry::Range2d Bounds; + + string filename = string(TGTDIR) + string("/") + string(INPUT_FILENAME); + MovieTester tester(filename); + + gnash::LogFile& dbglogfile = gnash::LogFile::getDefaultInstance(); + dbglogfile.setVerbosity(1); + + Bounds invalidatedBounds; + sprite_instance* root = tester.getRootMovie(); + assert(root); + + // FRAME 1/4 (start) + + check_equals(root->get_frame_count(), 4); + check_equals(root->get_play_state(), sprite_instance::PLAY); + check_equals(root->get_current_frame(), 0); + check_equals(root->getDisplayList().size(), 0); // no chars + + invalidatedBounds = tester.getInvalidatedBounds(); + check_equals(invalidatedBounds, Bounds().setNull()); + + tester.advance(); // FRAME 2/4 + + check_equals(root->get_play_state(), sprite_instance::PLAY); + check_equals(root->get_current_frame(), 1); + check_equals(root->getDisplayList().size(), 1); + check( tester.findDisplayItemByDepth(*root, 2) ); + xcheck_equals( invalidatedBounds, Bounds(0, 0, 60, 60) ); + + tester.advance(); // FRAME 3/4 + + check_equals(root->get_play_state(), sprite_instance::PLAY); + check_equals(root->get_current_frame(), 2); + + check_equals(root->getDisplayList().size(), 2); + check( tester.findDisplayItemByDepth(*root, 2) ); + check( tester.findDisplayItemByDepth(*root, 3) ); + xcheck_equals( invalidatedBounds, Bounds(60, 0, 120, 60) ); + + tester.advance(); // FRAME 4/4 + + check_equals(root->get_play_state(), sprite_instance::PLAY); + check_equals(root->get_current_frame(), 3); + check_equals(root->getDisplayList().size(), 3); + check( tester.findDisplayItemByDepth(*root, 2) ); + check( tester.findDisplayItemByDepth(*root, 3) ); + check( tester.findDisplayItemByDepth(*root, 4) ); + xcheck_equals( invalidatedBounds, Bounds(120, 0, 180, 60) ); + + tester.advance(); // FRAME 1/4 (loop back) + + check_equals(root->get_play_state(), sprite_instance::PLAY); + check_equals(root->get_current_frame(), 0); + check_equals(root->getDisplayList().size(), 0); + xcheck_equals( invalidatedBounds, Bounds(0, 0, 180, 60) ); + + tester.advance(); // FRAME 2/4 + + check_equals(root->get_play_state(), sprite_instance::PLAY); + check_equals(root->get_current_frame(), 1); + + check_equals(root->getDisplayList().size(), 1); + check( tester.findDisplayItemByDepth(*root, 2) ); + xcheck_equals( invalidatedBounds, Bounds(0, 0, 60, 60) ); + + tester.advance(); // FRAME 3/4 + + check_equals(root->get_play_state(), sprite_instance::PLAY); + check_equals(root->get_current_frame(), 2); + + check_equals(root->getDisplayList().size(), 2); + check( tester.findDisplayItemByDepth(*root, 2) ); + check( tester.findDisplayItemByDepth(*root, 3) ); + xcheck_equals( invalidatedBounds, Bounds(60, 0, 120, 60) ); + + tester.advance(); // FRAME 4/4 + + check_equals(root->get_play_state(), sprite_instance::PLAY); + check_equals(root->get_current_frame(), 3); + check_equals(root->getDisplayList().size(), 3); + check( tester.findDisplayItemByDepth(*root, 2) ); + check( tester.findDisplayItemByDepth(*root, 3) ); + check( tester.findDisplayItemByDepth(*root, 4) ); + xcheck_equals( invalidatedBounds, Bounds(120, 0, 180, 60) ); + +} + From MAILER-DAEMON Thu Jan 25 08:37:58 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HA4ne-0002Hf-K6 for mharc-gnash-commit@gnu.org; Thu, 25 Jan 2007 08:37:58 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HA4nc-0002H6-2o for gnash-commit@gnu.org; Thu, 25 Jan 2007 08:37:56 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HA4na-0002Gn-65 for gnash-commit@gnu.org; Thu, 25 Jan 2007 08:37:54 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HA4nZ-0002Gk-Sx for gnash-commit@gnu.org; Thu, 25 Jan 2007 08:37:53 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HA4nZ-00050u-IC for gnash-commit@gnu.org; Thu, 25 Jan 2007 08:37:53 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HA4nS-0001U2-Mi for gnash-commit@gnu.org; Thu, 25 Jan 2007 13:37:46 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1HA4nS-0001Tt-9B for gnash-commit@gnu.org; Thu, 25 Jan 2007 13:37:46 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Thu, 25 Jan 2007 13:37:46 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash ChangeLog server/character.h server/sprit... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jan 2007 13:37:56 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/25 13:37:46 Modified files: . : ChangeLog server : character.h sprite_instance.cpp Log message: * server/character.h: more info about set_invalidated() * server/sprite_instance.cpp (execute_frame_tags): properly call set_invalidated() when resetting DisplayList. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2173&r2=1.2174 http://cvs.savannah.gnu.org/viewcvs/gnash/server/character.h?cvsroot=gnash&r1=1.38&r2=1.39 http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.136&r2=1.137 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2173 retrieving revision 1.2174 diff -u -b -r1.2173 -r1.2174 --- ChangeLog 25 Jan 2007 12:21:34 -0000 1.2173 +++ ChangeLog 25 Jan 2007 13:37:45 -0000 1.2174 @@ -1,3 +1,9 @@ +2007-01-24 Sandro Santilli + + * server/character.h: more info about set_invalidated() + * server/sprite_instance.cpp (execute_frame_tags): properly + call set_invalidated() when resetting DisplayList. + 2007-01-24 Martin Guy * Makefile.am: fltk cares about Xft; gtk doesn't. Index: server/character.h =================================================================== RCS file: /sources/gnash/gnash/server/character.h,v retrieving revision 1.38 retrieving revision 1.39 diff -u -b -r1.38 -r1.39 --- server/character.h 24 Jan 2007 23:33:00 -0000 1.38 +++ server/character.h 25 Jan 2007 13:37:46 -0000 1.39 @@ -18,7 +18,7 @@ // // -/* $Id: character.h,v 1.38 2007/01/24 23:33:00 strk Exp $ */ +/* $Id: character.h,v 1.39 2007/01/25 13:37:46 strk Exp $ */ #ifndef GNASH_CHARACTER_H #define GNASH_CHARACTER_H @@ -452,10 +452,14 @@ /// This function marks the character as being modified in aspect. // - /// Call this function whenever a change in this character - /// modifies its rendering. This information will be used + /// Call this function *before* any change in this character + /// that modifies its rendering. This information will be used /// to detect visual changes that need to be redrawn. /// + /// It is *important* to call this function *before* the change + /// rather then after as it will also take care of updating the + /// previously invalidated bounds (m_old_invalidated_bounds) + /// /// NOTE: Marking a character as invalidated automatically marks /// it's parent as being invalidated. /// Index: server/sprite_instance.cpp =================================================================== RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v retrieving revision 1.136 retrieving revision 1.137 diff -u -b -r1.136 -r1.137 --- server/sprite_instance.cpp 24 Jan 2007 23:33:00 -0000 1.136 +++ server/sprite_instance.cpp 25 Jan 2007 13:37:46 -0000 1.137 @@ -2842,6 +2842,10 @@ // of static objects (change second argument to switch) _frame0_chars.addAll(charsToAdd, false); + // Set this character as invalidated *before* + // actually updating the displaylist ! + set_invalidated(); + m_display_list = _frame0_chars; } From MAILER-DAEMON Thu Jan 25 10:01:45 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HA66j-0007gI-JC for mharc-gnash-commit@gnu.org; Thu, 25 Jan 2007 10:01:45 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HA66i-0007gD-9R for gnash-commit@gnu.org; Thu, 25 Jan 2007 10:01:44 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HA66g-0007g1-9D for gnash-commit@gnu.org; Thu, 25 Jan 2007 10:01:43 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HA66g-0007fy-3v for gnash-commit@gnu.org; Thu, 25 Jan 2007 10:01:42 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HA66f-0004TW-JK for gnash-commit@gnu.org; Thu, 25 Jan 2007 10:01:41 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HA66d-0005DO-WC for gnash-commit@gnu.org; Thu, 25 Jan 2007 15:01:40 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1HA66d-0005DL-N0 for gnash-commit@gnu.org; Thu, 25 Jan 2007 15:01:39 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Thu, 25 Jan 2007 15:01:39 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/simple_... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jan 2007 15:01:44 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/25 15:01:39 Modified files: . : ChangeLog testsuite/misc-ming.all: simple_loop_test.c simple_loop_testrunner.cpp Log message: * testsuite/misc-ming.all/simple_loop_test.c: anchor the characters at 0,0 and fix compiler warnings. * testsuite/misc-ming.all/simple_loop_testrunner.cpp: fix invalidated bounds checking (but still fails with both bogus and correct version of sprite_instance::execute_frame_tags - odd!) CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2174&r2=1.2175 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/simple_loop_test.c?cvsroot=gnash&r1=1.1&r2=1.2 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/simple_loop_testrunner.cpp?cvsroot=gnash&r1=1.1&r2=1.2 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2174 retrieving revision 1.2175 diff -u -b -r1.2174 -r1.2175 --- ChangeLog 25 Jan 2007 13:37:45 -0000 1.2174 +++ ChangeLog 25 Jan 2007 15:01:39 -0000 1.2175 @@ -1,5 +1,11 @@ -2007-01-24 Sandro Santilli +2007-01-25 Sandro Santilli + * testsuite/misc-ming.all/simple_loop_test.c: anchor + the characters at 0,0 and fix compiler warnings. + * testsuite/misc-ming.all/simple_loop_testrunner.cpp: + fix invalidated bounds checking (but still fails + with both bogus and correct version of + sprite_instance::execute_frame_tags - odd!) * server/character.h: more info about set_invalidated() * server/sprite_instance.cpp (execute_frame_tags): properly call set_invalidated() when resetting DisplayList. Index: testsuite/misc-ming.all/simple_loop_test.c =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/simple_loop_test.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -b -r1.1 -r1.2 --- testsuite/misc-ming.all/simple_loop_test.c 25 Jan 2007 10:55:30 -0000 1.1 +++ testsuite/misc-ming.all/simple_loop_test.c 25 Jan 2007 15:01:39 -0000 1.2 @@ -37,10 +37,7 @@ static SWFShape get_shape(int r, int g, int b) { - SWFMovieClip mc = newSWFMovieClip(); - SWFShape sh = make_fill_square (0, 300, 60, 60, r, g, b, r, g, b); - //SWFMovieClip_add(mc, (SWFBlock)sh); - //SWFMovieClip_nextFrame(mc); + SWFShape sh = make_fill_square (0, 0, 60, 60, r, g, b, r, g, b); return sh; } @@ -48,7 +45,7 @@ main(int argc, char** argv) { SWFMovie mo; - SWFMovieClip mc, dejagnuclip; + SWFShape sh; SWFDisplayItem it; const char *srcdir="."; @@ -76,8 +73,8 @@ * Frame 2 ***************************************************************/ - mc = get_shape(255, 0, 0); - it = SWFMovie_add(mo, (SWFBlock)mc); + sh = get_shape(255, 0, 0); + it = SWFMovie_add(mo, (SWFBlock)sh); SWFDisplayItem_setDepth(it, 2); SWFMovie_nextFrame(mo); @@ -85,8 +82,8 @@ * Frame 3 ***************************************************************/ - mc = get_shape(0, 255, 0); - it = SWFMovie_add(mo, (SWFBlock)mc); + sh = get_shape(0, 255, 0); + it = SWFMovie_add(mo, (SWFBlock)sh); SWFDisplayItem_moveTo(it, 60, 0); SWFDisplayItem_setDepth(it, 3); SWFMovie_nextFrame(mo); @@ -95,8 +92,8 @@ * Frame 4 ***************************************************************/ - mc = get_shape(0, 0, 255); - it = SWFMovie_add(mo, (SWFBlock)mc); + sh = get_shape(0, 0, 255); + it = SWFMovie_add(mo, (SWFBlock)sh); SWFDisplayItem_moveTo(it, 120, 0); SWFDisplayItem_setDepth(it, 4); SWFMovie_nextFrame(mo); Index: testsuite/misc-ming.all/simple_loop_testrunner.cpp =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/simple_loop_testrunner.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -b -r1.1 -r1.2 --- testsuite/misc-ming.all/simple_loop_testrunner.cpp 25 Jan 2007 10:55:30 -0000 1.1 +++ testsuite/misc-ming.all/simple_loop_testrunner.cpp 25 Jan 2007 15:01:39 -0000 1.2 @@ -46,7 +46,7 @@ gnash::LogFile& dbglogfile = gnash::LogFile::getDefaultInstance(); dbglogfile.setVerbosity(1); - Bounds invalidatedBounds; + Bounds invalidated; sprite_instance* root = tester.getRootMovie(); assert(root); @@ -56,9 +56,8 @@ check_equals(root->get_play_state(), sprite_instance::PLAY); check_equals(root->get_current_frame(), 0); check_equals(root->getDisplayList().size(), 0); // no chars - - invalidatedBounds = tester.getInvalidatedBounds(); - check_equals(invalidatedBounds, Bounds().setNull()); + invalidated = tester.getInvalidatedBounds(); + check( invalidated.isNull() ); tester.advance(); // FRAME 2/4 @@ -66,17 +65,18 @@ check_equals(root->get_current_frame(), 1); check_equals(root->getDisplayList().size(), 1); check( tester.findDisplayItemByDepth(*root, 2) ); - xcheck_equals( invalidatedBounds, Bounds(0, 0, 60, 60) ); + invalidated = tester.getInvalidatedBounds(); + check( invalidated.intersects(Bounds(0, 0, 60, 60)) ); tester.advance(); // FRAME 3/4 check_equals(root->get_play_state(), sprite_instance::PLAY); check_equals(root->get_current_frame(), 2); - check_equals(root->getDisplayList().size(), 2); check( tester.findDisplayItemByDepth(*root, 2) ); check( tester.findDisplayItemByDepth(*root, 3) ); - xcheck_equals( invalidatedBounds, Bounds(60, 0, 120, 60) ); + invalidated = tester.getInvalidatedBounds(); + check( invalidated.intersects(Bounds(60, 0, 120, 60)) ); tester.advance(); // FRAME 4/4 @@ -86,33 +86,35 @@ check( tester.findDisplayItemByDepth(*root, 2) ); check( tester.findDisplayItemByDepth(*root, 3) ); check( tester.findDisplayItemByDepth(*root, 4) ); - xcheck_equals( invalidatedBounds, Bounds(120, 0, 180, 60) ); + invalidated = tester.getInvalidatedBounds(); + check( invalidated.intersects(Bounds(120, 0, 180, 60)) ); tester.advance(); // FRAME 1/4 (loop back) check_equals(root->get_play_state(), sprite_instance::PLAY); check_equals(root->get_current_frame(), 0); check_equals(root->getDisplayList().size(), 0); - xcheck_equals( invalidatedBounds, Bounds(0, 0, 180, 60) ); + invalidated = tester.getInvalidatedBounds(); + xcheck( invalidated.intersects(Bounds(0, 0, 180, 60)) ); tester.advance(); // FRAME 2/4 check_equals(root->get_play_state(), sprite_instance::PLAY); check_equals(root->get_current_frame(), 1); - check_equals(root->getDisplayList().size(), 1); check( tester.findDisplayItemByDepth(*root, 2) ); - xcheck_equals( invalidatedBounds, Bounds(0, 0, 60, 60) ); + invalidated = tester.getInvalidatedBounds(); + check( invalidated.intersects(Bounds(0, 0, 60, 60)) ); tester.advance(); // FRAME 3/4 check_equals(root->get_play_state(), sprite_instance::PLAY); check_equals(root->get_current_frame(), 2); - check_equals(root->getDisplayList().size(), 2); check( tester.findDisplayItemByDepth(*root, 2) ); check( tester.findDisplayItemByDepth(*root, 3) ); - xcheck_equals( invalidatedBounds, Bounds(60, 0, 120, 60) ); + invalidated = tester.getInvalidatedBounds(); + check( invalidated.intersects(Bounds(60, 0, 120, 60)) ); tester.advance(); // FRAME 4/4 @@ -122,7 +124,8 @@ check( tester.findDisplayItemByDepth(*root, 2) ); check( tester.findDisplayItemByDepth(*root, 3) ); check( tester.findDisplayItemByDepth(*root, 4) ); - xcheck_equals( invalidatedBounds, Bounds(120, 0, 180, 60) ); + invalidated = tester.getInvalidatedBounds(); + check( invalidated.intersects(Bounds(120, 0, 180, 60)) ); } From MAILER-DAEMON Thu Jan 25 10:35:30 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HA6dO-0005Cj-IL for mharc-gnash-commit@gnu.org; Thu, 25 Jan 2007 10:35:30 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HA6dM-0005Ce-Dm for gnash-commit@gnu.org; Thu, 25 Jan 2007 10:35:28 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HA6dL-0005CS-TK for gnash-commit@gnu.org; Thu, 25 Jan 2007 10:35:28 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HA6dL-0005CP-Mh for gnash-commit@gnu.org; Thu, 25 Jan 2007 10:35:27 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HA6dL-0002A0-9P for gnash-commit@gnu.org; Thu, 25 Jan 2007 10:35:27 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HA6dK-0007Aj-RR for gnash-commit@gnu.org; Thu, 25 Jan 2007 15:35:26 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1HA6dK-0007Ag-EP for gnash-commit@gnu.org; Thu, 25 Jan 2007 15:35:26 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Thu, 25 Jan 2007 15:35:26 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash ChangeLog server/sprite_instance.cpp X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jan 2007 15:35:29 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/25 15:35:26 Modified files: . : ChangeLog server : sprite_instance.cpp Log message: * server/sprite_instance.cpp (goto_frame): hopefully made code more readable; added warning for gotoFrame invoking a yet-to-be-loaded frame; added comments submitted by Zou Lunkai; undefined OLD_GET_MEMBER accidentally defined by some of the previous commits. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2175&r2=1.2176 http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.137&r2=1.138 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2175 retrieving revision 1.2176 diff -u -b -r1.2175 -r1.2176 --- ChangeLog 25 Jan 2007 15:01:39 -0000 1.2175 +++ ChangeLog 25 Jan 2007 15:35:25 -0000 1.2176 @@ -1,5 +1,14 @@ 2007-01-25 Sandro Santilli + * server/sprite_instance.cpp (goto_frame): + hopefully made code more readable; added warning + for gotoFrame invoking a yet-to-be-loaded frame; + added comments submitted by Zou Lunkai; + undefined OLD_GET_MEMBER accidentally defined by + some of the previous commits. + +2007-01-25 Sandro Santilli + * testsuite/misc-ming.all/simple_loop_test.c: anchor the characters at 0,0 and fix compiler warnings. * testsuite/misc-ming.all/simple_loop_testrunner.cpp: Index: server/sprite_instance.cpp =================================================================== RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v retrieving revision 1.137 retrieving revision 1.138 diff -u -b -r1.137 -r1.138 --- server/sprite_instance.cpp 25 Jan 2007 13:37:46 -0000 1.137 +++ server/sprite_instance.cpp 25 Jan 2007 15:35:26 -0000 1.138 @@ -71,7 +71,7 @@ // for '_x' property, but attachMovieTest is succeeding with the *new* layout // and failign with the previous. // -#define OLD_GET_MEMBER +//#define OLD_GET_MEMBER // Forward declarations static as_object* getMovieClipInterface(); @@ -2975,6 +2975,9 @@ if (target_frame_number > m_def->get_frame_count() - 1 || target_frame_number == m_current_frame) // to prevent infinitive recursion { + //FIXME: Don't set play state to STOP, just return will be more correct. + // m_current_frame will be incremented in next advance_sprite, so I think + // there will be no 'infinitive recursion' (Zou) set_play_state(STOP); return; } @@ -2990,45 +2993,66 @@ size_t loaded_frames = get_loaded_frames(); if ( target_frame_number > loaded_frames ) { -#if 0 // debugging - log_msg("loaded frames: %u, target frame number: %u", - loaded_frames, target_frame_number); -#endif - // we might be asking for an already loaded frame - // (consider a backward goto and then a forward goto) + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("GotoFrame(" SIZET_FMT ") targets a yet " + "to be loaded frame (" SIZET_FMT ") loaded).\n" + "We'll wait for it but a more correct form " + "is explicitly using WaitForFrame instead.", + target_frame_number, + loaded_frames); + + ); m_def->ensure_frame_loaded(target_frame_number); } + // + // Construct the DisplayList of the target frame + // + if (target_frame_number < m_current_frame) + // Go backward to a previous frame { for (size_t f = m_current_frame; f>target_frame_number; --f) { + // CHECK: will this execute "state" tags only ? execute_frame_tags_reverse(f); } - m_action_list.clear(); - execute_frame_tags(target_frame_number, false); - //we don't have the concept of a DisplayList update anymore - //m_display_list.update(); - } - else if (target_frame_number > m_current_frame) + else + // Go forward to a later frame { + // We'd immediately return if target_frame_number == m_current_frame + assert(target_frame_number > m_current_frame); + + // Construct the DisplayList of the target frame for (size_t f = m_current_frame+1; f From: Rob Savoye Date: Thu, 25 Jan 2007 17:20:37 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash plugin/Makefile.am ChangeLog X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jan 2007 17:20:41 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Rob Savoye 07/01/25 17:20:37 Modified files: plugin : Makefile.am . : ChangeLog Log message: * plugin/Makefile.am: Add more header paths so we can be cross compiled. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/plugin/Makefile.am?cvsroot=gnash&r1=1.55&r2=1.56 http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2176&r2=1.2177 Patches: Index: plugin/Makefile.am =================================================================== RCS file: /sources/gnash/gnash/plugin/Makefile.am,v retrieving revision 1.55 retrieving revision 1.56 diff -u -b -r1.55 -r1.56 --- plugin/Makefile.am 28 Nov 2006 12:10:27 -0000 1.55 +++ plugin/Makefile.am 25 Jan 2007 17:20:36 -0000 1.56 @@ -15,7 +15,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# $Id: Makefile.am,v 1.55 2006/11/28 12:10:27 strk Exp $ +# $Id: Makefile.am,v 1.56 2007/01/25 17:20:36 rsavoye Exp $ AUTOMAKE_OPTIONS = @@ -43,16 +43,14 @@ -I$(top_srcdir)/backend \ -I$(srcdir)/mozilla-sdk \ -I$(srcdir)/mozilla-sdk/include \ + $(GLIB_CFLAGS) \ $(GTK2_CFLAGS) \ + $(CAIRO_CFLAGS) \ + $(GLIB_CFLAGS) \ + $(ATK_CFLAGS) \ + $(PANGO_CFLAGS) \ $(NULL) - -# $(GLIB_CFLAGS) \ -# $(CAIRO_CFLAGS) \ -# $(ATK_CFLAGS) \ -# $(PANGO_CFLAGS) \ -# - # AM_CXXFLAGS = $(AM_CPPFLAGS) plugin_LTLIBRARIES = libgnashplugin.la Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2176 retrieving revision 1.2177 diff -u -b -r1.2176 -r1.2177 --- ChangeLog 25 Jan 2007 15:35:25 -0000 1.2176 +++ ChangeLog 25 Jan 2007 17:20:36 -0000 1.2177 @@ -1,3 +1,8 @@ +2007-01-25 Rob Savoye + + * plugin/Makefile.am: Add more header paths so we can be cross + compiled. + 2007-01-25 Sandro Santilli * server/sprite_instance.cpp (goto_frame): @@ -193,6 +198,39 @@ involved moving 'running tests' from the test-writing section into the user's installation section. +2007-01-21 Rob Savoye + + * Makefile.am: Organize the output of dumpconfig somewhat. Make + some lines optional based on the configuration to save space. + * NEWS: Add that cross compiling is now supported. + * README: Mention trying cvs Head befor bug reporting. + * configure.ac: Check for the build and host systems. We don't + have to hack cross_compile. it works correctly now. Use + $host_alias instead $target_alias for the directory search + paths. Look for PNG, OLPC needs it. Define a restricted path for + cross configuring and export it for the other m4 scripts. + * doc/C/sources.xml: Clarify cross configuring based on current + technique. + * gui/Makefile.am: PTHREAD_LIBS must be after BOOST_LIBS. + * libamf/Makefile.am: Remove unused libraries from LDFLAGS. + * macros/curl.m4: Only look for curl-config in the pathlist + variable. + * macros/glib.m4: Look for glibconfig.h in the right place. + * macros/gtk2.m4: Add -lgobject and -lgmodule for cross + compiling. + * macros/incllist, libslist: Look in $host_alias, not + $target_alias. + * macros/libXML.m4: Only look for xml2-config in the pathlist + variable. + * macros/ming.m4: Only look for ming-config in the pathlist + variable. + * macros/pthreads.m4: Use correct comment syntax. Also look for + pthread.h and libpthread so we cross configure correctly. + * macros/sdl.m4: Only look for sdl-config in the pathlist + variable. + * plugin/klash/Makefile.am: Don't build klash here anymore. + * utilities/Makefile.am: Link in XML2 libs. + 2007-01-19 Sandro Santilli * server/asobj/xmlnode.cpp (attachXMLNodeInterface): From MAILER-DAEMON Thu Jan 25 12:24:38 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HA8L0-000097-Lg for mharc-gnash-commit@gnu.org; Thu, 25 Jan 2007 12:24:38 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HA8Kz-000091-KA for gnash-commit@gnu.org; Thu, 25 Jan 2007 12:24:37 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HA8Ky-00008p-VJ for gnash-commit@gnu.org; Thu, 25 Jan 2007 12:24:37 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HA8Ky-00008m-Rp for gnash-commit@gnu.org; Thu, 25 Jan 2007 12:24:36 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HA8Ky-00079x-MD for gnash-commit@gnu.org; Thu, 25 Jan 2007 12:24:36 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HA8Ky-0006yK-16 for gnash-commit@gnu.org; Thu, 25 Jan 2007 17:24:36 +0000 Received: from ann by savannah.gnu.org with local (Exim 4.50) id 1HA8Kx-0006yH-Rb for gnash-commit@gnu.org; Thu, 25 Jan 2007 17:24:35 +0000 To: gnash-commit@gnu.org Message-Id: From: Ann Barcomb Date: Thu, 25 Jan 2007 17:24:35 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash/gui fltk.cpp X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jan 2007 17:24:37 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Ann Barcomb 07/01/25 17:24:35 Modified files: gui : fltk.cpp Log message: Rolled back the accidental commit of test code Bastiaan was working on on my machine. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/gui/fltk.cpp?cvsroot=gnash&r1=1.4&r2=1.5 Patches: Index: fltk.cpp =================================================================== RCS file: /sources/gnash/gnash/gui/fltk.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- fltk.cpp 25 Jan 2007 01:00:37 -0000 1.4 +++ fltk.cpp 25 Jan 2007 17:24:35 -0000 1.5 @@ -20,8 +20,7 @@ #include #include -//#include -#include +#include #include #include #include @@ -195,8 +194,8 @@ FltkGui::create() { // TODO: make the set_xid() call conditional on the availability of X11. - if (/*_xid*/ false) { - //CreatedWindow::set_xid(this, _xid); + if (_xid) { + CreatedWindow::set_xid(this, _xid); } else { Window::create(); } From MAILER-DAEMON Thu Jan 25 12:56:29 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HA8pp-00022f-MY for mharc-gnash-commit@gnu.org; Thu, 25 Jan 2007 12:56:29 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HA8po-00022A-Tl for gnash-commit@gnu.org; Thu, 25 Jan 2007 12:56:28 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HA8pl-0001xI-5y for gnash-commit@gnu.org; Thu, 25 Jan 2007 12:56:28 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HA8pl-0001x4-3B for gnash-commit@gnu.org; Thu, 25 Jan 2007 12:56:25 -0500 Received: from notes.lulu.com ([66.45.5.120]) by monty-python.gnu.org with esmtps (SSL 3.0:RSA_ARCFOUR_MD5:16) (Exim 4.52) id 1HA8pk-00055A-Jt for gnash-commit@gnu.org; Thu, 25 Jan 2007 12:56:24 -0500 Received: from [192.168.4.2] ([71.216.176.58]) by notes.lulu.com (Lotus Domino Release 7.0.1) with ESMTP id 2007012512254333-154028 ; Thu, 25 Jan 2007 12:25:43 -0500 Date: Thu, 25 Jan 2007 18:26:13 +0100 (CET) From: ann X-X-Sender: ann@lady.wifi.occ3.onlinecoffeeco.com cc: Commit mailing list Subject: Re: [Gnash-commit] gnash ChangeLog doc/C/gnash-man.xml doc/C/gnash... In-Reply-To: <1169720109.13859.13.camel@sioux.welcomehome.org> Message-ID: References: <1169720109.13859.13.camel@sioux.welcomehome.org> MIME-Version: 1.0 X-MIMETrack: Itemize by SMTP Server on LuluNotes/Lulu(Release 7.0.1|January 17, 2006) at 01/25/2007 12:25:43 PM, Serialize by Router on LuluNotes/Lulu(Release 7.0.1|January 17, 2006) at 01/25/2007 12:56:24 PM, Serialize complete at 01/25/2007 12:56:24 PM Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-detected-kernel: Error: This connection is not (no longer?) in the cache. X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jan 2007 17:56:29 -0000 Done. I did not even notice that file in the commit list; sorry. I reverted to 1.3. On Thu, 25 Jan 2007, Bastiaan Jacques wrote: > On Thu, 2007-01-25 at 01:00 +0000, Ann Barcomb wrote: >> gui : fltk.cpp > > This was probably committed by accident. It's code I wrote on your > machine that allows one to compile the FLTK GUI on OSX, but it's not > quite ready for CVS yet. > > Would you please revert it? > From MAILER-DAEMON Fri Jan 26 00:14:34 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HAJQ2-0004Ky-KF for mharc-gnash-commit@gnu.org; Fri, 26 Jan 2007 00:14:34 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HAJQ0-0004Kj-7I for gnash-commit@gnu.org; Fri, 26 Jan 2007 00:14:32 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HAJPy-0004KX-Is for gnash-commit@gnu.org; Fri, 26 Jan 2007 00:14:31 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HAJPy-0004KU-Ew for gnash-commit@gnu.org; Fri, 26 Jan 2007 00:14:30 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HAJPy-0001q4-3E for gnash-commit@gnu.org; Fri, 26 Jan 2007 00:14:30 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HAJPx-0005gm-I5 for gnash-commit@gnu.org; Fri, 26 Jan 2007 05:14:29 +0000 Received: from rsavoye by savannah.gnu.org with local (Exim 4.50) id 1HAJPx-0005gj-A6 for gnash-commit@gnu.org; Fri, 26 Jan 2007 05:14:29 +0000 To: gnash-commit@gnu.org Message-Id: From: Rob Savoye Date: Fri, 26 Jan 2007 05:14:29 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash/macros x11.m4 X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jan 2007 05:14:32 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Rob Savoye 07/01/26 05:14:29 Added files: macros : x11.m4 Log message: Add our own X11 tests, as the default one won't cross compile. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/macros/x11.m4?cvsroot=gnash&rev=1.1 Patches: Index: x11.m4 =================================================================== RCS file: x11.m4 diff -N x11.m4 --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ x11.m4 26 Jan 2007 05:14:29 -0000 1.1 @@ -0,0 +1,128 @@ +dnl +dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc. +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl You should have received a copy of the GNU General Public License +dnl along with this program; if not, write to the Free Software +dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + +dnl $Id: x11.m4,v 1.1 2007/01/26 05:14:29 rsavoye Exp $ + +AC_DEFUN([GNASH_PATH_X11], +[ + AC_ARG_ENABLE(x11, AC_HELP_STRING([--enable-x11], [Enable support for x11 images]), + [case "${enableval}" in + yes) x11=yes ;; + no) x11=no ;; + *) AC_MSG_ERROR([bad value ${enableval} for enable-x11 option]) ;; + esac], x11=yes) + + if test x"$x11" = x"yes"; then + dnl Look for the header + AC_ARG_WITH(x11_incl, AC_HELP_STRING([--with-x11-incl], [Directory where libx11 header is]), with_x11_incl=${withval}) + AC_CACHE_VAL(ac_cv_path_x11_incl,[ + if test x"${with_x11_incl}" != x ; then + if test -f ${with_x11_incl}/X11/X.h ; then + ac_cv_path_x11_incl=-I`(cd ${with_x11_incl}; pwd)` + else + AC_MSG_ERROR([${with_x11_incl} directory doesn't contain x11lib.h]) + fi + fi + ]) + + dnl If the path hasn't been specified, go look for it. + if test x"${ac_cv_path_x11_incl}" = x; then + AC_MSG_CHECKING([for libx11 headers]) + for i in $incllist; do + if test -f $i/X11/X.h; then + if test x"$i" != x"/usr/include"; then + ac_cv_path_x11_incl="-I$i" + break + else + ac_cv_path_x11_incl="" + break + fi + fi + done + fi + + if test x"${ac_cv_path_x11_incl}" = x; then + AC_CHECK_HEADERS(X11/X.h, [ac_cv_path_x11_incl=""]) + fi + + AC_MSG_RESULT(${ac_cv_path_x11_incl}) + + if test x"${ac_cv_path_x11_incl}" != x ; then + X11_CFLAGS="${ac_cv_path_x11_incl}" + AC_MSG_RESULT(${ac_cv_path_x11_incl}) + else + X11_CFLAGS="" + fi + + dnl Look for the library + AC_ARG_WITH(x11_lib, AC_HELP_STRING([--with-x11-lib], [directory where x11 library is]), with_x11_lib=${withval}) + AC_CACHE_VAL(ac_cv_path_x11_lib,[ + if test x"${with_x11_lib}" != x ; then + if test -f ${with_x11_lib}/libX11.a -o -f ${with_x11_lib}/libX11.so; then + ac_cv_path_x11_lib=`(cd ${with_x11_lib}; pwd)` + else + AC_MSG_ERROR([${with_x11_lib} directory doesn't contain libx11.]) + fi + fi + ]) + + dnl If the header doesn't exist, there is no point looking for the library. + if test x"${ac_cv_path_x11_incl}" = x; then + AC_MSG_CHECKING([for libx11 library]) + for i in $libslist; do + if test -f $i/libX11.a -o -f $i/libX11.so; then + if test x"$i" != x"/usr/lib"; then + ac_cv_path_x11_lib="-L$i" + break + else + ac_cv_path_x11_lib="" + break + fi + AC_MSG_RESULT(yes) + fi + done + fi + + if test x"${ac_cv_path_x11_lib}" = x; then + AC_CHECK_LIB(x11, x11_mem_init, [ac_cv_path_x11_lib=""]) + AC_MSG_RESULT(${ac_cv_path_x11_lib}) + fi + + if test x"${ac_cv_path_x11_lib}" != x ; then + X11_LIBS="${ac_cv_path_x11_lib}" + else + X11_LIBS="" + fi + fi + + if test x"${ac_cv_path_x11_lib}" != x ; then + X11_LIBS="${ac_cv_path_x11_lib} -lx11" + else + X11_LIBS="-lX11" + fi + + AM_CONDITIONAL(HAVE_X11, [test x$x11 = xyes]) + + AC_SUBST(X11_CFLAGS) + AC_SUBST(X11_LIBS) +]) + +# Local Variables: +# c-basic-offset: 2 +# tab-width: 2 +# indent-tabs-mode: nil +# End: From MAILER-DAEMON Fri Jan 26 00:16:04 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HAJRU-0004PB-Rs for mharc-gnash-commit@gnu.org; Fri, 26 Jan 2007 00:16:04 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HAJRS-0004P6-Gy for gnash-commit@gnu.org; Fri, 26 Jan 2007 00:16:02 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HAJRR-0004Ou-3j for gnash-commit@gnu.org; Fri, 26 Jan 2007 00:16:01 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HAJRQ-0004Or-Vo for gnash-commit@gnu.org; Fri, 26 Jan 2007 00:16:01 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HAJRQ-0002Df-N2 for gnash-commit@gnu.org; Fri, 26 Jan 2007 00:16:00 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HAJRQ-0005i7-5O for gnash-commit@gnu.org; Fri, 26 Jan 2007 05:16:00 +0000 Received: from rsavoye by savannah.gnu.org with local (Exim 4.50) id 1HAJRP-0005i3-SI for gnash-commit@gnu.org; Fri, 26 Jan 2007 05:16:00 +0000 To: gnash-commit@gnu.org Message-Id: From: Rob Savoye Date: Fri, 26 Jan 2007 05:15:59 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash/macros x11.m4 X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jan 2007 05:16:03 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Rob Savoye 07/01/26 05:15:59 Modified files: macros : x11.m4 Log message: Tweak indenting. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/macros/x11.m4?cvsroot=gnash&r1=1.1&r2=1.2 Patches: Index: x11.m4 =================================================================== RCS file: /sources/gnash/gnash/macros/x11.m4,v retrieving revision 1.1 retrieving revision 1.2 diff -u -b -r1.1 -r1.2 --- x11.m4 26 Jan 2007 05:14:29 -0000 1.1 +++ x11.m4 26 Jan 2007 05:15:59 -0000 1.2 @@ -15,7 +15,7 @@ dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -dnl $Id: x11.m4,v 1.1 2007/01/26 05:14:29 rsavoye Exp $ +dnl $Id: x11.m4,v 1.2 2007/01/26 05:15:59 rsavoye Exp $ AC_DEFUN([GNASH_PATH_X11], [ @@ -29,12 +29,12 @@ if test x"$x11" = x"yes"; then dnl Look for the header AC_ARG_WITH(x11_incl, AC_HELP_STRING([--with-x11-incl], [Directory where libx11 header is]), with_x11_incl=${withval}) - AC_CACHE_VAL(ac_cv_path_x11_incl,[ + AC_CACHE_VAL(ac_cv_path_x11_incl, [ if test x"${with_x11_incl}" != x ; then if test -f ${with_x11_incl}/X11/X.h ; then ac_cv_path_x11_incl=-I`(cd ${with_x11_incl}; pwd)` else - AC_MSG_ERROR([${with_x11_incl} directory doesn't contain x11lib.h]) + AC_MSG_ERROR([${with_x11_incl} directory doesn't contain X.h]) fi fi ]) From MAILER-DAEMON Fri Jan 26 05:10:59 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HAO2t-0005NQ-HK for mharc-gnash-commit@gnu.org; Fri, 26 Jan 2007 05:10:59 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HAO2r-0005ML-6s for gnash-commit@gnu.org; Fri, 26 Jan 2007 05:10:57 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HAO2p-0005La-EZ for gnash-commit@gnu.org; Fri, 26 Jan 2007 05:10:56 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HAO2o-0005LN-1C for gnash-commit@gnu.org; Fri, 26 Jan 2007 05:10:54 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HAO2n-0005Gu-Nv for gnash-commit@gnu.org; Fri, 26 Jan 2007 05:10:53 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HAO2k-0000bT-Pc for gnash-commit@gnu.org; Fri, 26 Jan 2007 10:10:50 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1HAO2k-0000bQ-Lf for gnash-commit@gnu.org; Fri, 26 Jan 2007 10:10:50 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Fri, 26 Jan 2007 10:10:50 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash ChangeLog server/character.h X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jan 2007 10:10:57 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/26 10:10:50 Modified files: . : ChangeLog server : character.h Log message: * server/character.h: more info about invalidated bounds methods and members. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2178&r2=1.2179 http://cvs.savannah.gnu.org/viewcvs/gnash/server/character.h?cvsroot=gnash&r1=1.39&r2=1.40 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2178 retrieving revision 1.2179 diff -u -b -r1.2178 -r1.2179 --- ChangeLog 25 Jan 2007 21:25:37 -0000 1.2178 +++ ChangeLog 26 Jan 2007 10:10:50 -0000 1.2179 @@ -1,3 +1,8 @@ +2007-01-25 Sandro Santilli + + * server/character.h: more info about invalidated bounds + methods and members. + 2007-01-25 Martin Guy * configure.ac: Regularize indentation, reorder things Index: server/character.h =================================================================== RCS file: /sources/gnash/gnash/server/character.h,v retrieving revision 1.39 retrieving revision 1.40 diff -u -b -r1.39 -r1.40 --- server/character.h 25 Jan 2007 13:37:46 -0000 1.39 +++ server/character.h 26 Jan 2007 10:10:50 -0000 1.40 @@ -18,7 +18,7 @@ // // -/* $Id: character.h,v 1.39 2007/01/25 13:37:46 strk Exp $ */ +/* $Id: character.h,v 1.40 2007/01/26 10:10:50 strk Exp $ */ #ifndef GNASH_CHARACTER_H #define GNASH_CHARACTER_H @@ -104,14 +104,12 @@ bool m_invalidated; - /// Bounds of character instance before invalidating it + /// \brief + /// Bounds of this character instance before first invalidation + /// since last call to clear_invalidated(). // - /// TODO: tell more about this, it is unclear what - /// does "before" invalidating means. - /// In particular I've the impression that calling - /// set_invalidated() updates this, which doesn't - /// seem error-prone to me as multiple calls would - /// make this member useless! + /// Will be set by set_invalidated() and used by + /// get_invalidated_bounds(). /// /// NOTE: this is currently initialized as the NULL rectangle. /// @@ -450,7 +448,10 @@ /// @} - /// This function marks the character as being modified in aspect. + /// \brief + /// This function marks the character as being modified in aspect + /// and keeps track of current invalidated bounds the first time + /// it's called after each call to clear_invalidated(). // /// Call this function *before* any change in this character /// that modifies its rendering. This information will be used @@ -460,6 +461,9 @@ /// rather then after as it will also take care of updating the /// previously invalidated bounds (m_old_invalidated_bounds) /// + /// Calling this function multiple time is a no-op, unless + /// clear_invalidated() is called in between. + /// /// NOTE: Marking a character as invalidated automatically marks /// it's parent as being invalidated. /// @@ -467,7 +471,7 @@ /// void set_invalidated(); - // Should be called by display() + /// Clear invalidated flag and reset m_old_invalidated_bounds to null. void clear_invalidated() { m_invalidated = false; // Is it correct to set old bounds to null ? From MAILER-DAEMON Fri Jan 26 05:51:56 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HAOgW-0001Rt-Qr for mharc-gnash-commit@gnu.org; Fri, 26 Jan 2007 05:51:56 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HAOgV-0001Ro-G2 for gnash-commit@gnu.org; Fri, 26 Jan 2007 05:51:55 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HAOgU-0001Rc-Kc for gnash-commit@gnu.org; Fri, 26 Jan 2007 05:51:55 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HAOgU-0001RZ-GX for gnash-commit@gnu.org; Fri, 26 Jan 2007 05:51:54 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HAOgU-0003DD-2y for gnash-commit@gnu.org; Fri, 26 Jan 2007 05:51:54 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HAOgT-0002jg-0z for gnash-commit@gnu.org; Fri, 26 Jan 2007 10:51:53 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1HAOgS-0002jc-Kn for gnash-commit@gnu.org; Fri, 26 Jan 2007 10:51:52 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Fri, 26 Jan 2007 10:51:52 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash ChangeLog testsuite/MovieTester.cpp tests... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jan 2007 10:51:55 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/26 10:51:52 Modified files: . : ChangeLog testsuite : MovieTester.cpp testsuite/misc-ming.all: simple_loop_testrunner.cpp Log message: * testsuite/MovieTester.cpp: call display() before advancing to make invalidated bounds computation properly work. * testsuite/misc-ming.all/simple_loop_testrunner.cpp: don't expect a failure about invalidated bounds at loopback. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2179&r2=1.2180 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/MovieTester.cpp?cvsroot=gnash&r1=1.17&r2=1.18 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/simple_loop_testrunner.cpp?cvsroot=gnash&r1=1.2&r2=1.3 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2179 retrieving revision 1.2180 diff -u -b -r1.2179 -r1.2180 --- ChangeLog 26 Jan 2007 10:10:50 -0000 1.2179 +++ ChangeLog 26 Jan 2007 10:51:52 -0000 1.2180 @@ -1,5 +1,9 @@ 2007-01-25 Sandro Santilli + * testsuite/MovieTester.cpp: call display() before advancing + to make invalidated bounds computation properly work. + * testsuite/misc-ming.all/simple_loop_testrunner.cpp: + don't expect a failure about invalidated bounds at loopback. * server/character.h: more info about invalidated bounds methods and members. Index: testsuite/MovieTester.cpp =================================================================== RCS file: /sources/gnash/gnash/testsuite/MovieTester.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -u -b -r1.17 -r1.18 --- testsuite/MovieTester.cpp 10 Jan 2007 17:28:50 -0000 1.17 +++ testsuite/MovieTester.cpp 26 Jan 2007 10:51:52 -0000 1.18 @@ -87,6 +87,23 @@ void MovieTester::advance() { + // We call display here to simulate effect of a real run. + // + // What we're particularly interested about is + // proper computation of invalidated bounds, which + // needs clear_invalidated() to be called. + // display() will call clear_invalidated() on characters + // actually modified so we're fine with that. + // + // Directly calling _movie->clear_invalidated() here + // also work currently, as invalidating the topmost + // movie will force recomputation of all invalidated + // bounds. Still, possible future changes might + // introduce differences, so better to reproduce + // real runs as close as possible, by calling display(). + // + _movie->display(); + _movie->advance(1.0); #ifdef SHOW_INVALIDATED_BOUNDS_ON_ADVANCE geometry::Range2d invalidatedbounds = getInvalidatedBounds(); @@ -95,6 +112,7 @@ gnash::LogFile& dbglogfile = gnash::LogFile::getDefaultInstance(); dbglogfile << ss.str().c_str() << std::endl; #endif + } const character* Index: testsuite/misc-ming.all/simple_loop_testrunner.cpp =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/simple_loop_testrunner.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- testsuite/misc-ming.all/simple_loop_testrunner.cpp 25 Jan 2007 15:01:39 -0000 1.2 +++ testsuite/misc-ming.all/simple_loop_testrunner.cpp 26 Jan 2007 10:51:52 -0000 1.3 @@ -95,7 +95,7 @@ check_equals(root->get_current_frame(), 0); check_equals(root->getDisplayList().size(), 0); invalidated = tester.getInvalidatedBounds(); - xcheck( invalidated.intersects(Bounds(0, 0, 180, 60)) ); + check( invalidated.intersects(Bounds(0, 0, 180, 60)) ); tester.advance(); // FRAME 2/4 From MAILER-DAEMON Fri Jan 26 08:12:49 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HAQsr-0007J8-7C for mharc-gnash-commit@gnu.org; Fri, 26 Jan 2007 08:12:49 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HAQsp-0007Ir-18 for gnash-commit@gnu.org; Fri, 26 Jan 2007 08:12:47 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HAQso-0007If-3g for gnash-commit@gnu.org; Fri, 26 Jan 2007 08:12:46 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HAQsn-0007Ic-VE for gnash-commit@gnu.org; Fri, 26 Jan 2007 08:12:45 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HAQsn-0002Nb-KH for gnash-commit@gnu.org; Fri, 26 Jan 2007 08:12:45 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HAQsm-0008RU-9W for gnash-commit@gnu.org; Fri, 26 Jan 2007 13:12:44 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1HAQsl-0008RR-Qd for gnash-commit@gnu.org; Fri, 26 Jan 2007 13:12:44 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Fri, 26 Jan 2007 13:12:43 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash ChangeLog server/sprite_instance.cpp X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jan 2007 13:12:47 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/26 13:12:43 Modified files: . : ChangeLog server : sprite_instance.cpp Log message: * server/sprite_instance.cpp (on_event): don't attempt to call event handlers functions when they are simply *undefined*. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2180&r2=1.2181 http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.138&r2=1.139 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2180 retrieving revision 1.2181 diff -u -b -r1.2180 -r1.2181 --- ChangeLog 26 Jan 2007 10:51:52 -0000 1.2180 +++ ChangeLog 26 Jan 2007 13:12:43 -0000 1.2181 @@ -1,5 +1,7 @@ 2007-01-25 Sandro Santilli + * server/sprite_instance.cpp (on_event): don't attempt to call + event handlers functions when they are simply *undefined*. * testsuite/MovieTester.cpp: call display() before advancing to make invalidated bounds computation properly work. * testsuite/misc-ming.all/simple_loop_testrunner.cpp: Index: server/sprite_instance.cpp =================================================================== RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v retrieving revision 1.138 retrieving revision 1.139 diff -u -b -r1.138 -r1.139 --- server/sprite_instance.cpp 25 Jan 2007 15:35:26 -0000 1.138 +++ server/sprite_instance.cpp 26 Jan 2007 13:12:43 -0000 1.139 @@ -2328,7 +2328,7 @@ if (method_name.length() > 0) { as_value method; - if (get_member(method_name, &method)) + if (get_member(method_name, &method) && ! method.is_undefined() ) { call_method0(method, &m_as_environment, this); called = true; From MAILER-DAEMON Fri Jan 26 08:17:13 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HAQx7-0001um-Cl for mharc-gnash-commit@gnu.org; Fri, 26 Jan 2007 08:17:13 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HAQx5-0001u4-KJ for gnash-commit@gnu.org; Fri, 26 Jan 2007 08:17:11 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HAQx5-0001tm-0f for gnash-commit@gnu.org; Fri, 26 Jan 2007 08:17:11 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HAQx4-0001tg-Ki for gnash-commit@gnu.org; Fri, 26 Jan 2007 08:17:10 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HAQx4-0003Eu-Cl for gnash-commit@gnu.org; Fri, 26 Jan 2007 08:17:10 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HAQx3-0000DI-OA for gnash-commit@gnu.org; Fri, 26 Jan 2007 13:17:09 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1HAQx3-0000DF-AW for gnash-commit@gnu.org; Fri, 26 Jan 2007 13:17:09 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Fri, 26 Jan 2007 13:17:09 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash/server character.h X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jan 2007 13:17:11 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/26 13:17:09 Modified files: server : character.h Log message: more comments for get_invalidated_bounds CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/server/character.h?cvsroot=gnash&r1=1.40&r2=1.41 Patches: Index: character.h =================================================================== RCS file: /sources/gnash/gnash/server/character.h,v retrieving revision 1.40 retrieving revision 1.41 diff -u -b -r1.40 -r1.41 --- character.h 26 Jan 2007 10:10:50 -0000 1.40 +++ character.h 26 Jan 2007 13:17:09 -0000 1.41 @@ -18,7 +18,7 @@ // // -/* $Id: character.h,v 1.40 2007/01/26 10:10:50 strk Exp $ */ +/* $Id: character.h,v 1.41 2007/01/26 13:17:09 strk Exp $ */ #ifndef GNASH_CHARACTER_H #define GNASH_CHARACTER_H @@ -485,9 +485,9 @@ /// invalidated bounds. // /// NOTE that this method should include the bounds that it - /// covered the last time ::display() was called, as those need - /// to be rerendered as well (to clear the region previously - /// occupied by this character). [ Correct ? ] + /// covered the last time clear_invalidated() was called, + /// as those need to be rerendered as well (to clear the region + /// previously occupied by this character). /// /// It is used to determine what area needs to be re-rendered. /// The coordinates are world coordinates (in TWIPS). From MAILER-DAEMON Fri Jan 26 08:31:34 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HARB0-0006nn-1H for mharc-gnash-commit@gnu.org; Fri, 26 Jan 2007 08:31:34 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HARAy-0006nh-UQ for gnash-commit@gnu.org; Fri, 26 Jan 2007 08:31:32 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HARAy-0006nV-2m for gnash-commit@gnu.org; Fri, 26 Jan 2007 08:31:32 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HARAx-0006nS-V8 for gnash-commit@gnu.org; Fri, 26 Jan 2007 08:31:32 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HARAx-0005hC-Ms for gnash-commit@gnu.org; Fri, 26 Jan 2007 08:31:31 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HARAw-0000hz-NS for gnash-commit@gnu.org; Fri, 26 Jan 2007 13:31:30 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1HARAw-0000hw-C7 for gnash-commit@gnu.org; Fri, 26 Jan 2007 13:31:30 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Fri, 26 Jan 2007 13:31:30 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash backend/render_handler.h ChangeLog X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jan 2007 13:31:33 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/26 13:31:30 Modified files: backend : render_handler.h . : ChangeLog Log message: * backend/render_handler.h (Detection of regions update page): note that set_invalidated() must be called *prior* actual modifications; minor typos and rewordings. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/backend/render_handler.h?cvsroot=gnash&r1=1.27&r2=1.28 http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2181&r2=1.2182 Patches: Index: backend/render_handler.h =================================================================== RCS file: /sources/gnash/gnash/backend/render_handler.h,v retrieving revision 1.27 retrieving revision 1.28 diff -u -b -r1.27 -r1.28 --- backend/render_handler.h 17 Jan 2007 16:31:30 -0000 1.27 +++ backend/render_handler.h 26 Jan 2007 13:31:29 -0000 1.28 @@ -17,7 +17,7 @@ // // -/* $Id: render_handler.h,v 1.27 2007/01/17 16:31:30 bjacques Exp $ */ +/* $Id: render_handler.h,v 1.28 2007/01/26 13:31:29 strk Exp $ */ #ifndef RENDER_HANDLER_H #define RENDER_HANDLER_H @@ -125,14 +125,14 @@ /// for one frame. This could be implemented in Gnash, too. /// /// 2nd, it can detect still frames (like a stopped movie). gui.cpp can -/// detect these and completely avoids to call any rendering function. +/// detect these and completely avoid calling any rendering function. /// /// Of course, the most critical part is detection of changes. There is a /// method gnash::character::set_invalidated() which gets called whenever a /// critical property of a instance gets updated, like when it changes /// position, for example. -/// It's really important to always call set_invalidated() whenever -/// code is added that changes the character instance in a visible way. +/// It's really important to *always* call set_invalidated() *before* +/// any call that changes the character instance in a visible way. /// /// Even if no renderer really uses this information it has effects when /// skipping unchanged frames. If necessary, this feature can be switched @@ -142,7 +142,7 @@ /// responsible of informing the renderer (see gnash::Gui::set_invalidated_region). /// This is because it's pointless /// to have a renderer which updates only a small part of the stage when -/// the GUI shows it all since the area aroung the region is undefined. +/// the GUI shows it all since the area around the region is undefined. /// However, there can be a GUI which supports update regions without needing /// the renderer to do so (for example, to save time during blitting). /// The GUI can also completely ignore the region information. Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2181 retrieving revision 1.2182 diff -u -b -r1.2181 -r1.2182 --- ChangeLog 26 Jan 2007 13:12:43 -0000 1.2181 +++ ChangeLog 26 Jan 2007 13:31:30 -0000 1.2182 @@ -1,5 +1,8 @@ 2007-01-25 Sandro Santilli + * backend/render_handler.h (Detection of regions update page): + note that set_invalidated() must be called *prior* actual + modifications; minor typos and rewordings. * server/sprite_instance.cpp (on_event): don't attempt to call event handlers functions when they are simply *undefined*. * testsuite/MovieTester.cpp: call display() before advancing From MAILER-DAEMON Fri Jan 26 14:41:45 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HAWxF-0006w6-O9 for mharc-gnash-commit@gnu.org; Fri, 26 Jan 2007 14:41:45 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HAWxE-0006vl-8C for gnash-commit@gnu.org; Fri, 26 Jan 2007 14:41:44 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HAWxD-0006vO-Nb for gnash-commit@gnu.org; Fri, 26 Jan 2007 14:41:43 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HAWxD-0006vG-Ea for gnash-commit@gnu.org; Fri, 26 Jan 2007 14:41:43 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HAWxD-0006sU-1q for gnash-commit@gnu.org; Fri, 26 Jan 2007 14:41:43 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HAWxC-0001Zn-Hw for gnash-commit@gnu.org; Fri, 26 Jan 2007 19:41:42 +0000 Received: from rsavoye by savannah.gnu.org with local (Exim 4.50) id 1HAWxC-0001Zi-46 for gnash-commit@gnu.org; Fri, 26 Jan 2007 19:41:42 +0000 To: gnash-commit@gnu.org Message-Id: From: Rob Savoye Date: Fri, 26 Jan 2007 19:41:42 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash configure.ac ChangeLog gui/Makefile.am ma... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jan 2007 19:41:44 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Rob Savoye 07/01/26 19:41:41 Modified files: . : configure.ac ChangeLog gui : Makefile.am macros : firefox.m4 x11.m4 plugin : Makefile.am plugin.cpp Log message: * configure.ac: Look for libexpat too to resolve a stupid library dependency on some systems. * gui/Makefile.am: Add EXPAT_LIBS for GTK builds. Add XFT and X11 libs for FLTK2 builds * macros/x11.m4: New file for X11. The default one from aclocal doesn't support cross configuration very well, so now we have our own. Also look for Xinerama to keep Debian Etch happy. * macros/firefox.m4: Add an --with-gnashexe to specify an optional path to find the gnash executable if it's not in $prefix/bin. * plugin/Makefile.am: * plugin/plugin.cpp: Use GNASHBINDIR instead of PREFIX to be clearer. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/configure.ac?cvsroot=gnash&r1=1.239&r2=1.240 http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2182&r2=1.2183 http://cvs.savannah.gnu.org/viewcvs/gnash/gui/Makefile.am?cvsroot=gnash&r1=1.58&r2=1.59 http://cvs.savannah.gnu.org/viewcvs/gnash/macros/firefox.m4?cvsroot=gnash&r1=1.20&r2=1.21 http://cvs.savannah.gnu.org/viewcvs/gnash/macros/x11.m4?cvsroot=gnash&r1=1.2&r2=1.3 http://cvs.savannah.gnu.org/viewcvs/gnash/plugin/Makefile.am?cvsroot=gnash&r1=1.56&r2=1.57 http://cvs.savannah.gnu.org/viewcvs/gnash/plugin/plugin.cpp?cvsroot=gnash&r1=1.70&r2=1.71 Patches: Index: configure.ac =================================================================== RCS file: /sources/gnash/gnash/configure.ac,v retrieving revision 1.239 retrieving revision 1.240 diff -u -b -r1.239 -r1.240 --- configure.ac 25 Jan 2007 21:25:37 -0000 1.239 +++ configure.ac 26 Jan 2007 19:41:41 -0000 1.240 @@ -15,7 +15,7 @@ dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA dnl -dnl $Id: configure.ac,v 1.239 2007/01/25 21:25:37 martinwguy Exp $ +dnl $Id: configure.ac,v 1.240 2007/01/26 19:41:41 rsavoye Exp $ AC_PREREQ(2.50) AC_INIT(gnash, cvs) @@ -586,6 +586,11 @@ GNASH_PKG_FIND(Xft, [Xft.h], [xft library], XftGlyphRender) fi +dnl Some systems have a pervered set of dependencies. Although Gnash itself uses libXML, +dnl Fedora Core 6 appears to have a dependency on expat for fontconfig. We only need the +dnl library, but this is the easy wind to find it. +GNASH_PKG_FIND(expat, [expat.h], [Expat library], XML_ErrorString) + dnl these conditionals were moved out of kde.m4 AM_CONDITIONAL(HAS_KDE, [test x$kde = xyes]) # used to disable x11-specific stuff on special platforms Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2182 retrieving revision 1.2183 diff -u -b -r1.2182 -r1.2183 --- ChangeLog 26 Jan 2007 13:31:30 -0000 1.2182 +++ ChangeLog 26 Jan 2007 19:41:41 -0000 1.2183 @@ -1,3 +1,17 @@ +2007-01-26 Rob Savoye + + * configure.ac: Look for libexpat too to resolve a stupid library + dependency on some systems. + * gui/Makefile.am: Add EXPAT_LIBS for GTK builds. Add XFT and X11 + libs for FLTK2 builds + * macros/x11.m4: New file for X11. The default one from aclocal + doesn't support cross configuration very well, so now we have our + own. Also look for Xinerama to keep Debian Etch happy. + * macros/firefox.m4: Add an --with-gnashexe to specify an optional + path to find the gnash executable if it's not in $prefix/bin. + * plugin/Makefile.am: + * plugin/plugin.cpp: Use GNASHBINDIR instead of PREFIX to be clearer. + 2007-01-25 Sandro Santilli * backend/render_handler.h (Detection of regions update page): Index: gui/Makefile.am =================================================================== RCS file: /sources/gnash/gnash/gui/Makefile.am,v retrieving revision 1.58 retrieving revision 1.59 diff -u -b -r1.58 -r1.59 --- gui/Makefile.am 21 Jan 2007 22:41:02 -0000 1.58 +++ gui/Makefile.am 26 Jan 2007 19:41:41 -0000 1.59 @@ -17,7 +17,7 @@ # -# $Id: Makefile.am,v 1.58 2007/01/21 22:41:02 rsavoye Exp $ +# $Id: Makefile.am,v 1.59 2007/01/26 19:41:41 rsavoye Exp $ AUTOMAKE_OPTIONS = @@ -49,7 +49,8 @@ $(CAIRO_LIBS) \ $(PANGO_LIBS) \ $(ATK_LIBS) \ - $(GLIB_LIBS) + $(GLIB_LIBS) \ + $(EXPAT_LIBS) # $(PNG_CFLAGS) \ # $(JPEG_CFLAGS) \ # $(MP3_CFLAGS) \ @@ -169,7 +170,7 @@ if USE_GUI_FLTK FLTK_SRCS = fltk.cpp fltksup.h $(FLTK_AGG_SRCS) $(FLTK_CAIRO_SRCS) AM_CPPFLAGS += $(FLTK2_CFLAGS) - AM_LDFLAGS += $(FLTK2_LIBS) + AM_LDFLAGS += $(FLTK2_LIBS) $(XFT_LIBS) $(X11_LIBS) else FLTK_SRCS = endif Index: macros/firefox.m4 =================================================================== RCS file: /sources/gnash/gnash/macros/firefox.m4,v retrieving revision 1.20 retrieving revision 1.21 diff -u -b -r1.20 -r1.21 --- macros/firefox.m4 9 Jan 2007 00:43:43 -0000 1.20 +++ macros/firefox.m4 26 Jan 2007 19:41:41 -0000 1.21 @@ -33,14 +33,28 @@ dnl *) AC_MSG_ERROR([bad value ${enableval} for disable-plugin option]) ;; dnl esac], plugin=yes) + FIREFOX_PLUGINS="" + GNASHEXE="" if test x"${plugin}" = x"yes"; then - FIREFOX_PLUGINS="" AC_ARG_WITH(plugindir, AC_HELP_STRING([--with-plugindir=DIR], [Directory to install Firefox plugin in]), [FIREFOX_PLUGINS=$withval] ) -dnl Always install the plugin in the users home directory. + dnl Allow setting a path for the Gnash executable to be different from the prefix. This + dnl is mostly only used for cross compiling. + AC_ARG_WITH(gnashexe, AC_HELP_STRING([--with-gnashexe=DIR], [Directory to where the gnash executable is]), + [gnashbindir=$withval] + ) + + dnl default to the prefix if no path is specified. As $prefix isn't set at this time by + dnl configure, we set this to the variable itself so it gets resolved at make time. + if test x"${gnashbindir}" = "x" ; then + GNASHEXE="\${prefix}/bin" + else + GNASHEXE=${gnashbindir} + fi + dnl Always install the plugin in the users home directory. if test x"${FIREFOX_PLUGINS}" = "x" ; then if test -d $HOME/.mozilla/plugins; then FIREFOX_PLUGINS=$HOME/.mozilla/plugins @@ -50,6 +64,7 @@ fi fi + AC_SUBST(GNASHEXE) AC_SUBST(FIREFOX_PLUGINS) ])dnl end of GNASH_PATH_FIREFOX Index: macros/x11.m4 =================================================================== RCS file: /sources/gnash/gnash/macros/x11.m4,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- macros/x11.m4 26 Jan 2007 05:15:59 -0000 1.2 +++ macros/x11.m4 26 Jan 2007 19:41:41 -0000 1.3 @@ -15,11 +15,11 @@ dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -dnl $Id: x11.m4,v 1.2 2007/01/26 05:15:59 rsavoye Exp $ +dnl $Id: x11.m4,v 1.3 2007/01/26 19:41:41 rsavoye Exp $ AC_DEFUN([GNASH_PATH_X11], [ - AC_ARG_ENABLE(x11, AC_HELP_STRING([--enable-x11], [Enable support for x11 images]), + AC_ARG_ENABLE(x11, AC_HELP_STRING([--disable-x11], [Disable support for X11]), [case "${enableval}" in yes) x11=yes ;; no) x11=no ;; @@ -28,7 +28,7 @@ if test x"$x11" = x"yes"; then dnl Look for the header - AC_ARG_WITH(x11_incl, AC_HELP_STRING([--with-x11-incl], [Directory where libx11 header is]), with_x11_incl=${withval}) + AC_ARG_WITH(x11_incl, AC_HELP_STRING([--with-x11-incl], [Directory where x11 header is]), with_x11_incl=${withval}) AC_CACHE_VAL(ac_cv_path_x11_incl, [ if test x"${with_x11_incl}" != x ; then if test -f ${with_x11_incl}/X11/X.h ; then @@ -41,7 +41,7 @@ dnl If the path hasn't been specified, go look for it. if test x"${ac_cv_path_x11_incl}" = x; then - AC_MSG_CHECKING([for libx11 headers]) + AC_MSG_CHECKING([for X11 headers]) for i in $incllist; do if test -f $i/X11/X.h; then if test x"$i" != x"/usr/include"; then @@ -82,14 +82,17 @@ dnl If the header doesn't exist, there is no point looking for the library. if test x"${ac_cv_path_x11_incl}" = x; then - AC_MSG_CHECKING([for libx11 library]) + AC_MSG_CHECKING([for X11 library]) for i in $libslist; do if test -f $i/libX11.a -o -f $i/libX11.so; then + if test -f $i/libXinerama.a -o -f $i/libXinerama.so; then + ac_cv_path_x11_lib="-lXinerama" + fi if test x"$i" != x"/usr/lib"; then - ac_cv_path_x11_lib="-L$i" + ac_cv_path_x11_lib="-L$i -lX11 ${ac_cv_path_x11_lib}" break else - ac_cv_path_x11_lib="" + ac_cv_path_x11_lib="-lX11 ${ac_cv_path_x11_lib}" break fi AC_MSG_RESULT(yes) @@ -98,7 +101,7 @@ fi if test x"${ac_cv_path_x11_lib}" = x; then - AC_CHECK_LIB(x11, x11_mem_init, [ac_cv_path_x11_lib=""]) + AC_CHECK_LIB(X11, x11_mem_init, [ac_cv_path_x11_lib=""]) AC_MSG_RESULT(${ac_cv_path_x11_lib}) fi @@ -110,7 +113,7 @@ fi if test x"${ac_cv_path_x11_lib}" != x ; then - X11_LIBS="${ac_cv_path_x11_lib} -lx11" + X11_LIBS="${ac_cv_path_x11_lib}" else X11_LIBS="-lX11" fi Index: plugin/Makefile.am =================================================================== RCS file: /sources/gnash/gnash/plugin/Makefile.am,v retrieving revision 1.56 retrieving revision 1.57 diff -u -b -r1.56 -r1.57 --- plugin/Makefile.am 25 Jan 2007 17:20:36 -0000 1.56 +++ plugin/Makefile.am 26 Jan 2007 19:41:41 -0000 1.57 @@ -15,7 +15,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# $Id: Makefile.am,v 1.56 2007/01/25 17:20:36 rsavoye Exp $ +# $Id: Makefile.am,v 1.57 2007/01/26 19:41:41 rsavoye Exp $ AUTOMAKE_OPTIONS = @@ -34,7 +34,7 @@ # XP_UNIX This needs to get defined for npapi.h on unix platforms. # PLUGIN_TRACE Enable this define to get debug prints whenever the plugin # api gets control. -AM_CPPFLAGS = -DPLUGIN_TRACE -DXP_UNIX -DMOZ_X11 -DPREFIX=\""${prefix}"\" \ +AM_CPPFLAGS = -DPLUGIN_TRACE -DXP_UNIX -DMOZ_X11 -DGNASHBINDIR=\"$(GNASHEXE)" \ -I.. \ -I$(srcdir) \ -I$(top_srcdir)/server \ Index: plugin/plugin.cpp =================================================================== RCS file: /sources/gnash/gnash/plugin/plugin.cpp,v retrieving revision 1.70 retrieving revision 1.71 diff -u -b -r1.70 -r1.71 --- plugin/plugin.cpp 6 Dec 2006 10:58:34 -0000 1.70 +++ plugin/plugin.cpp 26 Jan 2007 19:41:41 -0000 1.71 @@ -14,10 +14,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -// -// - -/* $Id: plugin.cpp,v 1.70 2006/12/06 10:58:34 strk Exp $ */ +/* $Id: plugin.cpp,v 1.71 2007/01/26 19:41:41 rsavoye Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -472,8 +469,8 @@ string procname; char *gnash_env = getenv("GNASH_PLAYER"); if (!gnash_env) { - procname = PREFIX; - procname += "/bin/gnash"; + procname = GNASHBINDIR; + procname += "/gnash"; } else { procname = gnash_env; } From MAILER-DAEMON Sat Jan 27 10:30:52 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HApW0-000796-CN for mharc-gnash-commit@gnu.org; Sat, 27 Jan 2007 10:30:52 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HApVy-00078m-Ga for gnash-commit@gnu.org; Sat, 27 Jan 2007 10:30:50 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HApVx-00078A-9J for gnash-commit@gnu.org; Sat, 27 Jan 2007 10:30:50 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HApVx-000786-1z for gnash-commit@gnu.org; Sat, 27 Jan 2007 10:30:49 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HApVw-00052F-RO for gnash-commit@gnu.org; Sat, 27 Jan 2007 10:30:48 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HApVv-0002Jk-Ta for gnash-commit@gnu.org; Sat, 27 Jan 2007 15:30:47 +0000 Received: from rsavoye by savannah.gnu.org with local (Exim 4.50) id 1HApVv-0002Jd-NI for gnash-commit@gnu.org; Sat, 27 Jan 2007 15:30:47 +0000 To: gnash-commit@gnu.org Message-Id: From: Rob Savoye Date: Sat, 27 Jan 2007 15:30:47 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash/plugin Makefile.am X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jan 2007 15:30:50 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Rob Savoye 07/01/27 15:30:47 Modified files: plugin : Makefile.am Log message: Need to escape the closing quote for GNASHEXE. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/plugin/Makefile.am?cvsroot=gnash&r1=1.57&r2=1.58 Patches: Index: Makefile.am =================================================================== RCS file: /sources/gnash/gnash/plugin/Makefile.am,v retrieving revision 1.57 retrieving revision 1.58 diff -u -b -r1.57 -r1.58 --- Makefile.am 26 Jan 2007 19:41:41 -0000 1.57 +++ Makefile.am 27 Jan 2007 15:30:47 -0000 1.58 @@ -15,7 +15,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# $Id: Makefile.am,v 1.57 2007/01/26 19:41:41 rsavoye Exp $ +# $Id: Makefile.am,v 1.58 2007/01/27 15:30:47 rsavoye Exp $ AUTOMAKE_OPTIONS = @@ -34,7 +34,7 @@ # XP_UNIX This needs to get defined for npapi.h on unix platforms. # PLUGIN_TRACE Enable this define to get debug prints whenever the plugin # api gets control. -AM_CPPFLAGS = -DPLUGIN_TRACE -DXP_UNIX -DMOZ_X11 -DGNASHBINDIR=\"$(GNASHEXE)" \ +AM_CPPFLAGS = -DPLUGIN_TRACE -DXP_UNIX -DMOZ_X11 -DGNASHBINDIR=\"$(GNASHEXE)\" \ -I.. \ -I$(srcdir) \ -I$(top_srcdir)/server \ From MAILER-DAEMON Sat Jan 27 11:55:10 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HAqpa-0002se-64 for mharc-gnash-commit@gnu.org; Sat, 27 Jan 2007 11:55:10 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HAqpY-0002sZ-TZ for gnash-commit@gnu.org; Sat, 27 Jan 2007 11:55:08 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HAqpX-0002sN-7J for gnash-commit@gnu.org; Sat, 27 Jan 2007 11:55:07 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HAqpX-0002sK-2e for gnash-commit@gnu.org; Sat, 27 Jan 2007 11:55:07 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HAqpW-0000AU-JS for gnash-commit@gnu.org; Sat, 27 Jan 2007 11:55:06 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HAqpV-0006w8-RW for gnash-commit@gnu.org; Sat, 27 Jan 2007 16:55:05 +0000 Received: from tgc by savannah.gnu.org with local (Exim 4.50) id 1HAqpV-0006w5-Fs for gnash-commit@gnu.org; Sat, 27 Jan 2007 16:55:05 +0000 To: gnash-commit@gnu.org Message-Id: From: Tomas Groth Date: Sat, 27 Jan 2007 16:55:05 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash ChangeLog server/asobj/Global.cpp server/... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jan 2007 16:55:09 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Tomas Groth 07/01/27 16:55:05 Modified files: . : ChangeLog server/asobj : Global.cpp NetConnection.cpp NetConnection.h NetStreamFfmpeg.cpp NetStreamFfmpeg.h NetStreamGst.cpp Log message: * server/asobj/Global.cpp: NetConnection switched to the new init method. * server/asobj/NetConnection.{cpp,h}: Switched to the new init method. Moved URL checking to NetConnection, and added support for different ways to setup the URL. * server/asobj/NetStreamFfmpeg.{cpp,h}, server/asobj/NetStreamGst.cpp: Removed the URL checking, and moved it to NetConnection. Added "support" for the "mp3:" prefix (untested). CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2183&r2=1.2184 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Global.cpp?cvsroot=gnash&r1=1.34&r2=1.35 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetConnection.cpp?cvsroot=gnash&r1=1.17&r2=1.18 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetConnection.h?cvsroot=gnash&r1=1.13&r2=1.14 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStreamFfmpeg.cpp?cvsroot=gnash&r1=1.9&r2=1.10 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStreamFfmpeg.h?cvsroot=gnash&r1=1.5&r2=1.6 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStreamGst.cpp?cvsroot=gnash&r1=1.6&r2=1.7 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2183 retrieving revision 1.2184 diff -u -b -r1.2183 -r1.2184 --- ChangeLog 26 Jan 2007 19:41:41 -0000 1.2183 +++ ChangeLog 27 Jan 2007 16:55:05 -0000 1.2184 @@ -1,3 +1,13 @@ +2007-01-27 Tomas Groth Christensen + + * server/asobj/Global.cpp: NetConnection switched to the new init method. + * server/asobj/NetConnection.{cpp,h}: Switched to the new init method. + Moved URL checking to NetConnection, and added support for different ways + to setup the URL. + * server/asobj/NetStreamFfmpeg.{cpp,h}, server/asobj/NetStreamGst.cpp: + Removed the URL checking, and moved it to NetConnection. Added "support" + for the "mp3:" prefix (untested). + 2007-01-26 Rob Savoye * configure.ac: Look for libexpat too to resolve a stupid library Index: server/asobj/Global.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/Global.cpp,v retrieving revision 1.34 retrieving revision 1.35 diff -u -b -r1.34 -r1.35 --- server/asobj/Global.cpp 23 Jan 2007 16:41:27 -0000 1.34 +++ server/asobj/Global.cpp 27 Jan 2007 16:55:05 -0000 1.35 @@ -18,7 +18,7 @@ // Implementation of the Global ActionScript Object -/* $Id: Global.cpp,v 1.34 2007/01/23 16:41:27 tgc Exp $ */ +/* $Id: Global.cpp,v 1.35 2007/01/27 16:55:05 tgc Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -496,7 +496,7 @@ // SWF7 //----------------------- - init_member("NetConnection", as_value(netconnection_new)); + netconnection_class_init(*this); netstream_class_init(*this); contextmenu_class_init(*this); moviecliploader_class_init(*this); Index: server/asobj/NetConnection.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/NetConnection.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -u -b -r1.17 -r1.18 --- server/asobj/NetConnection.cpp 18 Jan 2007 22:53:21 -0000 1.17 +++ server/asobj/NetConnection.cpp 27 Jan 2007 16:55:05 -0000 1.18 @@ -14,7 +14,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -/* $Id: NetConnection.cpp,v 1.17 2007/01/18 22:53:21 strk Exp $ */ +/* $Id: NetConnection.cpp,v 1.18 2007/01/27 16:55:05 tgc Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -24,13 +24,15 @@ #include #include #include "NetConnection.h" -#include "fn_call.h" -#include "rtmp.h" #include "log.h" #include "GnashException.h" +#include "builtin_function.h" +#include "movie_root.h" + +#include "URLAccessManager.h" +#include "URL.h" using namespace std; -using namespace amf; namespace { gnash::LogFile& dbglogfile = gnash::LogFile::getDefaultInstance(); @@ -38,6 +40,10 @@ namespace gnash { +static void netconnection_new(const fn_call& fn); +static void netconnection_connect(const fn_call& fn); +static as_object* getNetConnectionInterface(); + #ifdef HAVE_CURL_CURL_H /// \class NetConnection @@ -170,14 +176,31 @@ /// RTMP. Newer Flash movies have a parameter to connect which is a /// URL string like rtmp://foobar.com/videos/bar.flv /*public*/ -bool NetConnection::openConnection(const char* char_url, as_object* ns, bool local) +bool NetConnection::openConnection(const char* char_url, as_object* ns) { netStreamObj = ns; - _url = std::string(char_url); + if (_url.size() > 0) { + _url += "/"; + } + _url += char_url; _running = 1; _cache = NULL; - localFile = local; + localFile = false; + + + URL uri(_url); + + // Check if we're allowed to open url + if (URLAccessManager::allow(uri)) { + + if (uri.protocol() == "file") + { + localFile = true; + } + } else { + return false; + } if (localFile) { _cache = fopen(char_url, "rb"); @@ -274,6 +297,13 @@ } /*public*/ +void +NetConnection::addToURL(const char* url) +{ + _url += url; +} + +/*public*/ bool NetConnection::eof() { @@ -311,24 +341,35 @@ #endif // HAVE_CURL_CURL_H + + +netconnection_as_object::netconnection_as_object() + : + as_object(getNetConnectionInterface()) +{ +} + +netconnection_as_object::~netconnection_as_object() +{ +} + + /// \brief callback to instantiate a new NetConnection object. /// \param fn the parameters from the Flash movie /// \return nothing from the function call. /// \note The return value is returned through the fn.result member. -void +static void netconnection_new(const fn_call& fn) { GNASH_REPORT_FUNCTION; netconnection_as_object *netconnection_obj = new netconnection_as_object; - // FIXME: rely on inheritance - netconnection_obj->init_member("connect", &netconnection_connect); - fn.result->set_as_object(netconnection_obj); } -void netconnection_connect(const fn_call& fn) +static void +netconnection_connect(const fn_call& fn) { GNASH_REPORT_FUNCTION; @@ -337,13 +378,52 @@ assert(ptr); if (fn.nargs != 0) { - filespec = fn.env->bottom(fn.first_arg_bottom_index).to_string(); -// ptr->obj.connect(filespec.c_str()); - } else { -// ptr->obj.connect(0); + ptr->obj.addToURL(fn.env->bottom(fn.first_arg_bottom_index).to_string()); } } +void +attachNetConnectionInterface(as_object& o) +{ + + o.init_member("connect", &netconnection_connect); + +} + +static as_object* +getNetConnectionInterface() +{ + + static boost::intrusive_ptr o; + if ( o == NULL ) + { + o = new as_object(); + attachNetConnectionInterface(*o); + } + + return o.get(); +} + +// extern (used by Global.cpp) +void netconnection_class_init(as_object& global) +{ + + // This is going to be the global NetConnection "class"/"function" + static boost::intrusive_ptr cl; + + if ( cl == NULL ) + { + cl=new builtin_function(&netconnection_new, getNetConnectionInterface()); + // replicate all interface to class, to be able to access + // all methods as static functions + attachNetConnectionInterface(*cl); + + } + + // Register _global.String + global.init_member("NetConnection", cl.get()); + +} } // end of gnash namespace Index: server/asobj/NetConnection.h =================================================================== RCS file: /sources/gnash/gnash/server/asobj/NetConnection.h,v retrieving revision 1.13 retrieving revision 1.14 diff -u -b -r1.13 -r1.14 --- server/asobj/NetConnection.h 23 Jan 2007 16:41:27 -0000 1.13 +++ server/asobj/NetConnection.h 27 Jan 2007 16:55:05 -0000 1.14 @@ -14,7 +14,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -/* $Id: NetConnection.h,v 1.13 2007/01/23 16:41:27 tgc Exp $ */ +/* $Id: NetConnection.h,v 1.14 2007/01/27 16:55:05 tgc Exp $ */ #ifndef __NETCONNECTION_H__ #define __NETCONNECTION_H__ @@ -48,7 +48,7 @@ ~NetConnection(); /// Opens the connection to char_url - bool openConnection(const char* char_url, as_object* ns, bool local); + bool openConnection(const char* char_url, as_object* ns); /// Put read pointer at given position bool seek(size_t pos); @@ -65,6 +65,9 @@ /// Report global position within the file size_t tell(); + // Extend the URL to be used for playing + void addToURL(const char* url); + private: // Use this file to cache data FILE* _cache; @@ -119,11 +122,12 @@ #else class NetConnection { public: - NetConnection() {}; - ~NetConnection() {}; - bool openConnection(const char* /*char_url*/, as_object* /*ns*/, bool /* local */) { return false; }; + NetConnection() {} + ~NetConnection() {} + bool openConnection(const char* /*char_url*/, as_object* /*ns*/) { return false; } bool seek(size_t /*pos*/) { return 0; } size_t read(void* /*dst*/, size_t /*bytes*/) { return false; } + void addToURL(const char* /*url*/) {} }; #endif // HAVE_CURL_CURL_H @@ -131,12 +135,12 @@ class netconnection_as_object : public as_object { public: + netconnection_as_object(); + ~netconnection_as_object(); NetConnection obj; }; -DSOEXPORT void netconnection_new(const fn_call& fn); -DSOEXPORT void netconnection_connect(const fn_call& fn); - +void netconnection_class_init(as_object& global); } // end of gnash namespace Index: server/asobj/NetStreamFfmpeg.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/NetStreamFfmpeg.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -b -r1.9 -r1.10 --- server/asobj/NetStreamFfmpeg.cpp 23 Jan 2007 21:37:16 -0000 1.9 +++ server/asobj/NetStreamFfmpeg.cpp 27 Jan 2007 16:55:05 -0000 1.10 @@ -14,7 +14,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -/* $Id: NetStreamFfmpeg.cpp,v 1.9 2007/01/23 21:37:16 tgc Exp $ */ +/* $Id: NetStreamFfmpeg.cpp,v 1.10 2007/01/27 16:55:05 tgc Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -26,12 +26,10 @@ #include "NetStreamFfmpeg.h" #include "fn_call.h" #include "NetStream.h" -#include "URLAccessManager.h" #include "render.h" #include "movie_root.h" #include "NetConnection.h" -#include "URL.h" #include "tu_file.h" #if defined(_WIN32) || defined(WIN32) @@ -205,6 +203,11 @@ } url += c_url; + // Remove any "mp3:" prefix. Maybe should use this to mark as audio-only + if (url.compare(0, 4, std::string("mp3:")) == 0) { + url = url.substr(4); + } + m_go = true; // To avoid blocking while connecting, we use a thread. @@ -223,21 +226,10 @@ netconnection_as_object* nc = static_cast(ns->netCon); - URL uri(ns->url); - - // Check if we're allowed to open url - if (URLAccessManager::allow(uri)) { - - bool local = false; - if (uri.protocol() == "file") - { - local = true; - } - // Pass stuff from/to the NetConnection object. - nc->obj.openConnection(ns->url.c_str(), ns->m_netstream_object, local); - } else { - log_warning("Gnash is not allowed to open movie url: %s", ns->url.c_str()); + if (!nc->obj.openConnection(ns->url.c_str(), ns->m_netstream_object)) { + log_warning("Gnash could not open movie url: %s", ns->url.c_str()); + return; } ns->inputPos = 0; Index: server/asobj/NetStreamFfmpeg.h =================================================================== RCS file: /sources/gnash/gnash/server/asobj/NetStreamFfmpeg.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -b -r1.5 -r1.6 --- server/asobj/NetStreamFfmpeg.h 23 Jan 2007 21:37:16 -0000 1.5 +++ server/asobj/NetStreamFfmpeg.h 27 Jan 2007 16:55:05 -0000 1.6 @@ -14,7 +14,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -/* $Id: NetStreamFfmpeg.h,v 1.5 2007/01/23 21:37:16 tgc Exp $ */ +/* $Id: NetStreamFfmpeg.h,v 1.6 2007/01/27 16:55:05 tgc Exp $ */ #ifndef __NETSTREAMFFMPEG_H__ #define __NETSTREAMFFMPEG_H__ @@ -224,8 +224,6 @@ double m_video_clock; -// pthread_t m_thread; -// pthread_t startThread; boost::thread *m_thread; boost::thread *startThread; boost::mutex decoding_mutex; Index: server/asobj/NetStreamGst.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/NetStreamGst.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -b -r1.6 -r1.7 --- server/asobj/NetStreamGst.cpp 23 Jan 2007 21:37:16 -0000 1.6 +++ server/asobj/NetStreamGst.cpp 27 Jan 2007 16:55:05 -0000 1.7 @@ -120,6 +120,10 @@ } url += c_url; + // Remove any "mp3:" prefix. Maybe should use this to mark as audio-only + if (url.compare(0, 4, std::string("mp3:")) == 0) { + url = url.substr(4); + } m_go = true; // To avoid blocking while connecting, we use a thread. @@ -237,21 +241,11 @@ { NetStreamGst* ns = static_cast(arg); netconnection_as_object* nc = static_cast(ns->netCon); - URL uri(ns->url); - - // Check if we're allowed to open url - if (URLAccessManager::allow(uri)) { - bool local = false; - if (uri.protocol() == "file") - { - local = true; - } // Pass stuff from/to the NetConnection object. - nc->obj.openConnection(ns->url.c_str(), ns->m_netstream_object, local); - } else { - log_warning("Gnash is not allowed to open movie url: %s", ns->url.c_str()); - return 0; + if (!nc->obj.openConnection(ns->url.c_str(), ns->m_netstream_object)) { + log_warning("Gnash could not open movie url: %s", ns->url.c_str()); + return; } ns->inputPos = 0; From MAILER-DAEMON Sun Jan 28 21:48:11 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HBMZ1-0006SI-1R for mharc-gnash-commit@gnu.org; Sun, 28 Jan 2007 21:48:11 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HBMYy-0006OL-HF for gnash-commit@gnu.org; Sun, 28 Jan 2007 21:48:08 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HBMYy-0006Nn-0X for gnash-commit@gnu.org; Sun, 28 Jan 2007 21:48:08 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HBMYx-0006Ng-Sy for gnash-commit@gnu.org; Sun, 28 Jan 2007 21:48:07 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HBMYx-00083z-JN for gnash-commit@gnu.org; Sun, 28 Jan 2007 21:48:07 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HBMYw-0007Jd-Sr for gnash-commit@gnu.org; Mon, 29 Jan 2007 02:48:07 +0000 Received: from zoulunkai by savannah.gnu.org with local (Exim 4.50) id 1HBMYw-0007Ja-Ld for gnash-commit@gnu.org; Mon, 29 Jan 2007 02:48:06 +0000 To: gnash-commit@gnu.org Message-Id: From: Zou Lunkai Date: Mon, 29 Jan 2007 02:48:06 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash/testsuite/misc-ming.all goto_frame_test.c X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jan 2007 02:48:09 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Zou Lunkai 07/01/29 02:48:06 Modified files: testsuite/misc-ming.all: goto_frame_test.c Log message: add checks about the _currentframe property before and after goto_frame actions CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/goto_frame_test.c?cvsroot=gnash&r1=1.1&r2=1.2 Patches: Index: goto_frame_test.c =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/goto_frame_test.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -b -r1.1 -r1.2 --- goto_frame_test.c 22 Jan 2007 12:23:47 -0000 1.1 +++ goto_frame_test.c 29 Jan 2007 02:48:06 -0000 1.2 @@ -21,8 +21,8 @@ * * Test for ActionGotoFrame * - * the root movie has 3 frames which contains another 2-framed movieClip named mc_red. - * At _root's 1st frame, tell mc_red to goto frame2 and stop. + * the root movie has 4 frames which contains another 3-framed movieClip named mc_red. + * At _root's 2st frame, tell mc_red to goto 3rd frame and stop. */ #include @@ -58,28 +58,34 @@ dejagnuclip = get_dejagnu_clip((SWFBlock)get_default_font(srcdir), 10, 0, 0, 800, 600); SWFMovie_add(mo, (SWFBlock)dejagnuclip); - + // Add a ShowFrame here, do all checks at later frames! + // This will guarantee all the check-functions are defined before we call them. + SWFMovie_nextFrame(mo); //1st frame mc_red = newSWFMovieClip(); sh_red = make_fill_square (0, 300, 60, 60, 255, 0, 0, 255, 0, 0); SWFMovieClip_add(mc_red, (SWFBlock)sh_red); - add_clip_actions(mc_red, "var flag = \"action_executed\"; "); SWFMovieClip_nextFrame(mc_red);//1st frame - SWFMovieClip_nextFrame(mc_red);//2nd frame + SWFMovieClip_nextFrame(mc_red);//2st frame + add_clip_actions(mc_red, "var flag = \"action_executed\"; "); + SWFMovieClip_nextFrame(mc_red);//3nd frame SWFDisplayItem it_red; it_red = SWFMovie_add(mo, (SWFBlock)mc_red); SWFDisplayItem_setDepth(it_red, 3); SWFDisplayItem_setName(it_red, "mc_red"); - add_actions(mo, " mc_red.gotoAndStop(2); "); - SWFMovie_nextFrame(mo); //1st frame + add_actions(mo, " check_equals(mc_red._currentframe, 1); \ + mc_red.gotoAndStop(3); \ + check_equals(mc_red._currentframe, 3);"); SWFMovie_nextFrame(mo); //2nd frame + SWFMovie_nextFrame(mo); //3nd frame + //checks xcheck_equals(mo, "_root.mc_red.flag", "'action_executed'"); add_actions(mo, " _root.totals(); stop(); "); - SWFMovie_nextFrame(mo); //3rd frame + SWFMovie_nextFrame(mo); //4th frame //Output movie puts("Saving " OUTPUT_FILENAME ); @@ -87,6 +93,3 @@ return 0; } - - - From MAILER-DAEMON Mon Jan 29 02:33:18 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HBR0w-0006MR-CY for mharc-gnash-commit@gnu.org; Mon, 29 Jan 2007 02:33:18 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HBR0v-0006MM-2b for gnash-commit@gnu.org; Mon, 29 Jan 2007 02:33:17 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HBR0t-0006MA-KW for gnash-commit@gnu.org; Mon, 29 Jan 2007 02:33:15 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HBR0t-0006M7-Eh for gnash-commit@gnu.org; Mon, 29 Jan 2007 02:33:15 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HBR0t-0000T1-5O for gnash-commit@gnu.org; Mon, 29 Jan 2007 02:33:15 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HBR0s-0002Qz-LU for gnash-commit@gnu.org; Mon, 29 Jan 2007 07:33:14 +0000 Received: from zoulunkai by savannah.gnu.org with local (Exim 4.50) id 1HBR0s-0002Qr-9T for gnash-commit@gnu.org; Mon, 29 Jan 2007 07:33:14 +0000 To: gnash-commit@gnu.org Message-Id: From: Zou Lunkai Date: Mon, 29 Jan 2007 07:33:14 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash/server sprite_instance.cpp sprite_instance.h X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jan 2007 07:33:17 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Zou Lunkai 07/01/29 07:33:14 Modified files: server : sprite_instance.cpp sprite_instance.h Log message: fixed goto_frame_test(bug #18845). the next step is to make testcase more complicated CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.139&r2=1.140 http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.h?cvsroot=gnash&r1=1.58&r2=1.59 Patches: Index: sprite_instance.cpp =================================================================== RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v retrieving revision 1.139 retrieving revision 1.140 diff -u -b -r1.139 -r1.140 --- sprite_instance.cpp 26 Jan 2007 13:12:43 -0000 1.139 +++ sprite_instance.cpp 29 Jan 2007 07:33:14 -0000 1.140 @@ -1769,6 +1769,7 @@ m_goto_frame_action_list(), m_play_state(PLAY), m_current_frame(0), + m_executing_frame(0), m_update_frame(true), m_has_looped(false), m_init_actions_executed(), @@ -2764,16 +2765,47 @@ // Advance everything in the display list. m_display_list.advance(delta_time); - if ( ! m_goto_frame_action_list.empty() ) + // + // executing all target frames actions + // + while( m_executing_frame != m_current_frame ) { - IF_VERBOSE_ACTION( - log_action(" Executing %u actions in " - "goto_frame_action_list", - m_goto_frame_action_list.size()); - ); + // + // Construct the DisplayList of the target frame + // + if ( m_current_frame < m_executing_frame) + // go backward to a previous frame + { + for (size_t f = m_executing_frame; f>m_current_frame; --f) + { + execute_frame_tags_reverse(f); + } + } + else if (m_current_frame > m_executing_frame) + // go forward to a later frame + { + for (size_t f = m_executing_frame+1; fensure_frame_loaded(target_frame_number); } + m_current_frame = target_frame_number; + // ActionGotoFrame tells the movieClip to go to the target frame + // and stops at that frame. + set_play_state(STOP); + + /* // // Construct the DisplayList of the target frame // @@ -3069,7 +3107,7 @@ // unfortunately the actions in the current frame have already been ruined // by above code.(Zou) m_action_list.clear(); - + */ } bool sprite_instance::goto_labeled_frame(const char* label) @@ -3306,11 +3344,15 @@ { //GNASH_REPORT_FUNCTION; + m_executing_frame++; + m_current_frame = m_executing_frame; + size_t frame_count = m_def->get_frame_count(); - if ( ++m_current_frame >= frame_count ) + if ( m_current_frame >= frame_count ) { // Loop. m_current_frame = 0; + m_executing_frame = 0; m_has_looped = true; if (frame_count > 1) { Index: sprite_instance.h =================================================================== RCS file: /sources/gnash/gnash/server/sprite_instance.h,v retrieving revision 1.58 retrieving revision 1.59 diff -u -b -r1.58 -r1.59 --- sprite_instance.h 24 Jan 2007 13:23:18 -0000 1.58 +++ sprite_instance.h 29 Jan 2007 07:33:14 -0000 1.59 @@ -17,7 +17,7 @@ // // -/* $Id: sprite_instance.h,v 1.58 2007/01/24 13:23:18 strk Exp $ */ +/* $Id: sprite_instance.h,v 1.59 2007/01/29 07:33:14 zoulunkai Exp $ */ // Stateful live Sprite instance @@ -628,7 +628,10 @@ ActionList m_goto_frame_action_list; play_state m_play_state; + // the _currentframe property size_t m_current_frame; + // the frame which contains the current executing actions + size_t m_executing_frame; bool m_update_frame; bool m_has_looped; From MAILER-DAEMON Mon Jan 29 02:44:51 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HBRC7-0001j7-74 for mharc-gnash-commit@gnu.org; Mon, 29 Jan 2007 02:44:51 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HBRC5-0001iy-1Q for gnash-commit@gnu.org; Mon, 29 Jan 2007 02:44:49 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HBRC3-0001im-Lp for gnash-commit@gnu.org; Mon, 29 Jan 2007 02:44:47 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HBRC3-0001ij-Hu for gnash-commit@gnu.org; Mon, 29 Jan 2007 02:44:47 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HBRC3-0001Y2-9w for gnash-commit@gnu.org; Mon, 29 Jan 2007 02:44:47 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HBRC2-0003S3-QY for gnash-commit@gnu.org; Mon, 29 Jan 2007 07:44:46 +0000 Received: from zoulunkai by savannah.gnu.org with local (Exim 4.50) id 1HBRC2-0003S0-Lk for gnash-commit@gnu.org; Mon, 29 Jan 2007 07:44:46 +0000 To: gnash-commit@gnu.org Message-Id: From: Zou Lunkai Date: Mon, 29 Jan 2007 07:44:46 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash/testsuite/misc-ming.all goto_frame_test.c X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jan 2007 07:44:49 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Zou Lunkai 07/01/29 07:44:46 Modified files: testsuite/misc-ming.all: goto_frame_test.c Log message: change xcheck to check CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/goto_frame_test.c?cvsroot=gnash&r1=1.2&r2=1.3 Patches: Index: goto_frame_test.c =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/goto_frame_test.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- goto_frame_test.c 29 Jan 2007 02:48:06 -0000 1.2 +++ goto_frame_test.c 29 Jan 2007 07:44:46 -0000 1.3 @@ -83,7 +83,7 @@ SWFMovie_nextFrame(mo); //3nd frame //checks - xcheck_equals(mo, "_root.mc_red.flag", "'action_executed'"); + check_equals(mo, "_root.mc_red.flag", "'action_executed'"); add_actions(mo, " _root.totals(); stop(); "); SWFMovie_nextFrame(mo); //4th frame From MAILER-DAEMON Mon Jan 29 03:43:36 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HBS6y-0005cX-DN for mharc-gnash-commit@gnu.org; Mon, 29 Jan 2007 03:43:36 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HBS6w-0005cN-F9 for gnash-commit@gnu.org; Mon, 29 Jan 2007 03:43:34 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HBS6v-0005cA-Hg for gnash-commit@gnu.org; Mon, 29 Jan 2007 03:43:34 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HBS6v-0005c7-DY for gnash-commit@gnu.org; Mon, 29 Jan 2007 03:43:33 -0500 Received: from host147-8-static.59-217-b.business.telecomitalia.it ([217.59.8.147] helo=freek.keybit.net) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.52) id 1HBS6u-0001OO-J0 for gnash-commit@gnu.org; Mon, 29 Jan 2007 03:43:33 -0500 Received: (from strk@localhost) by freek.keybit.net (8.11.1/8.11.1) id l0T8hR147607; Mon, 29 Jan 2007 09:43:27 +0100 (CET) (envelope-from strk@keybit.net) From: strk Date: Mon, 29 Jan 2007 09:43:27 +0100 To: Zou Lunkai Subject: Re: [Gnash-commit] gnash/testsuite/misc-ming.all goto_frame_test.c Message-ID: <20070129084327.GA40394@keybit.net> Mail-Followup-To: Zou Lunkai , gnash-commit@gnu.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-detected-kernel: FreeBSD 2.0-4.2 Cc: gnash-commit@gnu.org X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jan 2007 08:43:34 -0000 Zou, forgot to mention: We're manually maintaining the ChangeLog file, you should commit it as part of any commit. I updated it for all your (3) commits for now, but please remember for the future. Thanks ! --strk; On Mon, Jan 29, 2007 at 02:48:06AM +0000, Zou Lunkai wrote: > CVSROOT: /sources/gnash > Module name: gnash > Changes by: Zou Lunkai 07/01/29 02:48:06 > > Modified files: > testsuite/misc-ming.all: goto_frame_test.c > > Log message: > add checks about the _currentframe property before and after goto_frame actions > > CVSWeb URLs: > http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/goto_frame_test.c?cvsroot=gnash&r1=1.1&r2=1.2 > > Patches: > Index: goto_frame_test.c > =================================================================== > RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/goto_frame_test.c,v > retrieving revision 1.1 > retrieving revision 1.2 > diff -u -b -r1.1 -r1.2 > --- goto_frame_test.c 22 Jan 2007 12:23:47 -0000 1.1 > +++ goto_frame_test.c 29 Jan 2007 02:48:06 -0000 1.2 > @@ -21,8 +21,8 @@ > * > * Test for ActionGotoFrame > * > - * the root movie has 3 frames which contains another 2-framed movieClip named mc_red. > - * At _root's 1st frame, tell mc_red to goto frame2 and stop. > + * the root movie has 4 frames which contains another 3-framed movieClip named mc_red. > + * At _root's 2st frame, tell mc_red to goto 3rd frame and stop. > */ > > #include > @@ -58,28 +58,34 @@ > > dejagnuclip = get_dejagnu_clip((SWFBlock)get_default_font(srcdir), 10, 0, 0, 800, 600); > SWFMovie_add(mo, (SWFBlock)dejagnuclip); > - > + // Add a ShowFrame here, do all checks at later frames! > + // This will guarantee all the check-functions are defined before we call them. > + SWFMovie_nextFrame(mo); //1st frame > > mc_red = newSWFMovieClip(); > sh_red = make_fill_square (0, 300, 60, 60, 255, 0, 0, 255, 0, 0); > SWFMovieClip_add(mc_red, (SWFBlock)sh_red); > - add_clip_actions(mc_red, "var flag = \"action_executed\"; "); > SWFMovieClip_nextFrame(mc_red);//1st frame > - SWFMovieClip_nextFrame(mc_red);//2nd frame > + SWFMovieClip_nextFrame(mc_red);//2st frame > + add_clip_actions(mc_red, "var flag = \"action_executed\"; "); > + SWFMovieClip_nextFrame(mc_red);//3nd frame > > SWFDisplayItem it_red; > it_red = SWFMovie_add(mo, (SWFBlock)mc_red); > SWFDisplayItem_setDepth(it_red, 3); > SWFDisplayItem_setName(it_red, "mc_red"); > - add_actions(mo, " mc_red.gotoAndStop(2); "); > - SWFMovie_nextFrame(mo); //1st frame > + add_actions(mo, " check_equals(mc_red._currentframe, 1); \ > + mc_red.gotoAndStop(3); \ > + check_equals(mc_red._currentframe, 3);"); > > SWFMovie_nextFrame(mo); //2nd frame > > + SWFMovie_nextFrame(mo); //3nd frame > + > //checks > xcheck_equals(mo, "_root.mc_red.flag", "'action_executed'"); > add_actions(mo, " _root.totals(); stop(); "); > - SWFMovie_nextFrame(mo); //3rd frame > + SWFMovie_nextFrame(mo); //4th frame > > //Output movie > puts("Saving " OUTPUT_FILENAME ); > @@ -87,6 +93,3 @@ > > return 0; > } > - > - > - > > > _______________________________________________ > Gnash-commit mailing list > Gnash-commit@gnu.org > http://lists.gnu.org/mailman/listinfo/gnash-commit -- () ASCII Ribbon Campaign /\ Keep it simple! From MAILER-DAEMON Mon Jan 29 03:44:39 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HBS7z-00063A-2o for mharc-gnash-commit@gnu.org; Mon, 29 Jan 2007 03:44:39 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HBS7y-00062o-0w for gnash-commit@gnu.org; Mon, 29 Jan 2007 03:44:38 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HBS7x-00062U-0t for gnash-commit@gnu.org; Mon, 29 Jan 2007 03:44:37 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HBS7w-00062O-R5 for gnash-commit@gnu.org; Mon, 29 Jan 2007 03:44:36 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HBS7w-0001US-F0 for gnash-commit@gnu.org; Mon, 29 Jan 2007 03:44:36 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HBS7v-0005cz-IM for gnash-commit@gnu.org; Mon, 29 Jan 2007 08:44:35 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1HBS7v-0005cw-Ai for gnash-commit@gnu.org; Mon, 29 Jan 2007 08:44:35 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Mon, 29 Jan 2007 08:44:35 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash ChangeLog X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jan 2007 08:44:38 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/29 08:44:35 Modified files: . : ChangeLog Log message: added missing entry for last commits from Zou CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2184&r2=1.2185 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2184 retrieving revision 1.2185 diff -u -b -r1.2184 -r1.2185 --- ChangeLog 27 Jan 2007 16:55:05 -0000 1.2184 +++ ChangeLog 29 Jan 2007 08:44:35 -0000 1.2185 @@ -1,3 +1,12 @@ +2007-01-29 Zou Lunkai + + * testsuite/misc-ming.all/goto_frame_test.c: + add checks about the _currentframe property before + and after goto_frame actions; change xcheck to check. + * server/sprite_instance.cpp sprite_instance.h: + fixed goto_frame_test(bug #18845). the next step is to + make testcase more complicated + 2007-01-27 Tomas Groth Christensen * server/asobj/Global.cpp: NetConnection switched to the new init method. From MAILER-DAEMON Mon Jan 29 03:45:10 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HBS8U-0006MF-26 for mharc-gnash-commit@gnu.org; Mon, 29 Jan 2007 03:45:10 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HBS8R-0006Ji-Jr for gnash-commit@gnu.org; Mon, 29 Jan 2007 03:45:07 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HBS8Q-0006J9-IU for gnash-commit@gnu.org; Mon, 29 Jan 2007 03:45:07 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HBS8Q-0006Iq-Bb for gnash-commit@gnu.org; Mon, 29 Jan 2007 03:45:06 -0500 Received: from host147-8-static.59-217-b.business.telecomitalia.it ([217.59.8.147] helo=freek.keybit.net) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.52) id 1HBS8O-0001Xx-N1 for gnash-commit@gnu.org; Mon, 29 Jan 2007 03:45:06 -0500 Received: (from strk@localhost) by freek.keybit.net (8.11.1/8.11.1) id l0T8ixb47641; Mon, 29 Jan 2007 09:44:59 +0100 (CET) (envelope-from strk@keybit.net) From: strk Date: Mon, 29 Jan 2007 09:44:59 +0100 To: Tomas Groth Subject: Re: [Gnash-commit] gnash ChangeLog server/asobj/Global.cpp server/... Message-ID: <20070129084459.GB40394@keybit.net> Mail-Followup-To: Tomas Groth , gnash-commit@gnu.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-detected-kernel: FreeBSD 2.0-4.2 Cc: gnash-commit@gnu.org X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jan 2007 08:45:07 -0000 Tomas, after this commit: /home/strk/src/gnash/gnash-head/server/asobj/NetStreamGst.cpp:248: error: return-statement with no value, in function returning 'void*' --strk; On Sat, Jan 27, 2007 at 04:55:05PM +0000, Tomas Groth wrote: > CVSROOT: /sources/gnash > Module name: gnash > Changes by: Tomas Groth 07/01/27 16:55:05 > > Modified files: > . : ChangeLog > server/asobj : Global.cpp NetConnection.cpp NetConnection.h > NetStreamFfmpeg.cpp NetStreamFfmpeg.h > NetStreamGst.cpp > > Log message: > * server/asobj/Global.cpp: NetConnection switched to the new init method. > * server/asobj/NetConnection.{cpp,h}: Switched to the new init method. > Moved URL checking to NetConnection, and added support for different ways > to setup the URL. > * server/asobj/NetStreamFfmpeg.{cpp,h}, server/asobj/NetStreamGst.cpp: > Removed the URL checking, and moved it to NetConnection. Added "support" > for the "mp3:" prefix (untested). > > CVSWeb URLs: > http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2183&r2=1.2184 > http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Global.cpp?cvsroot=gnash&r1=1.34&r2=1.35 > http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetConnection.cpp?cvsroot=gnash&r1=1.17&r2=1.18 > http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetConnection.h?cvsroot=gnash&r1=1.13&r2=1.14 > http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStreamFfmpeg.cpp?cvsroot=gnash&r1=1.9&r2=1.10 > http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStreamFfmpeg.h?cvsroot=gnash&r1=1.5&r2=1.6 > http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStreamGst.cpp?cvsroot=gnash&r1=1.6&r2=1.7 > > Patches: > Index: ChangeLog > =================================================================== > RCS file: /sources/gnash/gnash/ChangeLog,v > retrieving revision 1.2183 > retrieving revision 1.2184 > diff -u -b -r1.2183 -r1.2184 > --- ChangeLog 26 Jan 2007 19:41:41 -0000 1.2183 > +++ ChangeLog 27 Jan 2007 16:55:05 -0000 1.2184 > @@ -1,3 +1,13 @@ > +2007-01-27 Tomas Groth Christensen > + > + * server/asobj/Global.cpp: NetConnection switched to the new init method. > + * server/asobj/NetConnection.{cpp,h}: Switched to the new init method. > + Moved URL checking to NetConnection, and added support for different ways > + to setup the URL. > + * server/asobj/NetStreamFfmpeg.{cpp,h}, server/asobj/NetStreamGst.cpp: > + Removed the URL checking, and moved it to NetConnection. Added "support" > + for the "mp3:" prefix (untested). > + > 2007-01-26 Rob Savoye > > * configure.ac: Look for libexpat too to resolve a stupid library > > Index: server/asobj/Global.cpp > =================================================================== > RCS file: /sources/gnash/gnash/server/asobj/Global.cpp,v > retrieving revision 1.34 > retrieving revision 1.35 > diff -u -b -r1.34 -r1.35 > --- server/asobj/Global.cpp 23 Jan 2007 16:41:27 -0000 1.34 > +++ server/asobj/Global.cpp 27 Jan 2007 16:55:05 -0000 1.35 > @@ -18,7 +18,7 @@ > > // Implementation of the Global ActionScript Object > > -/* $Id: Global.cpp,v 1.34 2007/01/23 16:41:27 tgc Exp $ */ > +/* $Id: Global.cpp,v 1.35 2007/01/27 16:55:05 tgc Exp $ */ > > #ifdef HAVE_CONFIG_H > #include "config.h" > @@ -496,7 +496,7 @@ > // SWF7 > //----------------------- > > - init_member("NetConnection", as_value(netconnection_new)); > + netconnection_class_init(*this); > netstream_class_init(*this); > contextmenu_class_init(*this); > moviecliploader_class_init(*this); > > Index: server/asobj/NetConnection.cpp > =================================================================== > RCS file: /sources/gnash/gnash/server/asobj/NetConnection.cpp,v > retrieving revision 1.17 > retrieving revision 1.18 > diff -u -b -r1.17 -r1.18 > --- server/asobj/NetConnection.cpp 18 Jan 2007 22:53:21 -0000 1.17 > +++ server/asobj/NetConnection.cpp 27 Jan 2007 16:55:05 -0000 1.18 > @@ -14,7 +14,7 @@ > // along with this program; if not, write to the Free Software > // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA > > -/* $Id: NetConnection.cpp,v 1.17 2007/01/18 22:53:21 strk Exp $ */ > +/* $Id: NetConnection.cpp,v 1.18 2007/01/27 16:55:05 tgc Exp $ */ > > #ifdef HAVE_CONFIG_H > #include "config.h" > @@ -24,13 +24,15 @@ > #include > #include > #include "NetConnection.h" > -#include "fn_call.h" > -#include "rtmp.h" > #include "log.h" > #include "GnashException.h" > +#include "builtin_function.h" > +#include "movie_root.h" > + > +#include "URLAccessManager.h" > +#include "URL.h" > > using namespace std; > -using namespace amf; > > namespace { > gnash::LogFile& dbglogfile = gnash::LogFile::getDefaultInstance(); > @@ -38,6 +40,10 @@ > > namespace gnash { > > +static void netconnection_new(const fn_call& fn); > +static void netconnection_connect(const fn_call& fn); > +static as_object* getNetConnectionInterface(); > + > #ifdef HAVE_CURL_CURL_H > > /// \class NetConnection > @@ -170,14 +176,31 @@ > /// RTMP. Newer Flash movies have a parameter to connect which is a > /// URL string like rtmp://foobar.com/videos/bar.flv > /*public*/ > -bool NetConnection::openConnection(const char* char_url, as_object* ns, bool local) > +bool NetConnection::openConnection(const char* char_url, as_object* ns) > { > netStreamObj = ns; > - _url = std::string(char_url); > + if (_url.size() > 0) { > + _url += "/"; > + } > + _url += char_url; > _running = 1; > _cache = NULL; > > - localFile = local; > + localFile = false; > + > + > + URL uri(_url); > + > + // Check if we're allowed to open url > + if (URLAccessManager::allow(uri)) { > + > + if (uri.protocol() == "file") > + { > + localFile = true; > + } > + } else { > + return false; > + } > > if (localFile) { > _cache = fopen(char_url, "rb"); > @@ -274,6 +297,13 @@ > } > > /*public*/ > +void > +NetConnection::addToURL(const char* url) > +{ > + _url += url; > +} > + > +/*public*/ > bool > NetConnection::eof() > { > @@ -311,24 +341,35 @@ > > #endif // HAVE_CURL_CURL_H > > + > + > +netconnection_as_object::netconnection_as_object() > + : > + as_object(getNetConnectionInterface()) > +{ > +} > + > +netconnection_as_object::~netconnection_as_object() > +{ > +} > + > + > /// \brief callback to instantiate a new NetConnection object. > /// \param fn the parameters from the Flash movie > /// \return nothing from the function call. > /// \note The return value is returned through the fn.result member. > -void > +static void > netconnection_new(const fn_call& fn) > { > GNASH_REPORT_FUNCTION; > > netconnection_as_object *netconnection_obj = new netconnection_as_object; > > - // FIXME: rely on inheritance > - netconnection_obj->init_member("connect", &netconnection_connect); > - > fn.result->set_as_object(netconnection_obj); > } > > -void netconnection_connect(const fn_call& fn) > +static void > +netconnection_connect(const fn_call& fn) > { > GNASH_REPORT_FUNCTION; > > @@ -337,13 +378,52 @@ > > assert(ptr); > if (fn.nargs != 0) { > - filespec = fn.env->bottom(fn.first_arg_bottom_index).to_string(); > -// ptr->obj.connect(filespec.c_str()); > - } else { > -// ptr->obj.connect(0); > + ptr->obj.addToURL(fn.env->bottom(fn.first_arg_bottom_index).to_string()); > } > } > > +void > +attachNetConnectionInterface(as_object& o) > +{ > + > + o.init_member("connect", &netconnection_connect); > + > +} > + > +static as_object* > +getNetConnectionInterface() > +{ > + > + static boost::intrusive_ptr o; > + if ( o == NULL ) > + { > + o = new as_object(); > + attachNetConnectionInterface(*o); > + } > + > + return o.get(); > +} > + > +// extern (used by Global.cpp) > +void netconnection_class_init(as_object& global) > +{ > + > + // This is going to be the global NetConnection "class"/"function" > + static boost::intrusive_ptr cl; > + > + if ( cl == NULL ) > + { > + cl=new builtin_function(&netconnection_new, getNetConnectionInterface()); > + // replicate all interface to class, to be able to access > + // all methods as static functions > + attachNetConnectionInterface(*cl); > + > + } > + > + // Register _global.String > + global.init_member("NetConnection", cl.get()); > + > +} > > } // end of gnash namespace > > > Index: server/asobj/NetConnection.h > =================================================================== > RCS file: /sources/gnash/gnash/server/asobj/NetConnection.h,v > retrieving revision 1.13 > retrieving revision 1.14 > diff -u -b -r1.13 -r1.14 > --- server/asobj/NetConnection.h 23 Jan 2007 16:41:27 -0000 1.13 > +++ server/asobj/NetConnection.h 27 Jan 2007 16:55:05 -0000 1.14 > @@ -14,7 +14,7 @@ > // along with this program; if not, write to the Free Software > // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA > > -/* $Id: NetConnection.h,v 1.13 2007/01/23 16:41:27 tgc Exp $ */ > +/* $Id: NetConnection.h,v 1.14 2007/01/27 16:55:05 tgc Exp $ */ > > #ifndef __NETCONNECTION_H__ > #define __NETCONNECTION_H__ > @@ -48,7 +48,7 @@ > ~NetConnection(); > > /// Opens the connection to char_url > - bool openConnection(const char* char_url, as_object* ns, bool local); > + bool openConnection(const char* char_url, as_object* ns); > > /// Put read pointer at given position > bool seek(size_t pos); > @@ -65,6 +65,9 @@ > /// Report global position within the file > size_t tell(); > > + // Extend the URL to be used for playing > + void addToURL(const char* url); > + > private: > // Use this file to cache data > FILE* _cache; > @@ -119,11 +122,12 @@ > #else > class NetConnection { > public: > - NetConnection() {}; > - ~NetConnection() {}; > - bool openConnection(const char* /*char_url*/, as_object* /*ns*/, bool /* local */) { return false; }; > + NetConnection() {} > + ~NetConnection() {} > + bool openConnection(const char* /*char_url*/, as_object* /*ns*/) { return false; } > bool seek(size_t /*pos*/) { return 0; } > size_t read(void* /*dst*/, size_t /*bytes*/) { return false; } > + void addToURL(const char* /*url*/) {} > }; > > #endif // HAVE_CURL_CURL_H > @@ -131,12 +135,12 @@ > class netconnection_as_object : public as_object > { > public: > + netconnection_as_object(); > + ~netconnection_as_object(); > NetConnection obj; > }; > > -DSOEXPORT void netconnection_new(const fn_call& fn); > -DSOEXPORT void netconnection_connect(const fn_call& fn); > - > +void netconnection_class_init(as_object& global); > > } // end of gnash namespace > > > Index: server/asobj/NetStreamFfmpeg.cpp > =================================================================== > RCS file: /sources/gnash/gnash/server/asobj/NetStreamFfmpeg.cpp,v > retrieving revision 1.9 > retrieving revision 1.10 > diff -u -b -r1.9 -r1.10 > --- server/asobj/NetStreamFfmpeg.cpp 23 Jan 2007 21:37:16 -0000 1.9 > +++ server/asobj/NetStreamFfmpeg.cpp 27 Jan 2007 16:55:05 -0000 1.10 > @@ -14,7 +14,7 @@ > // along with this program; if not, write to the Free Software > // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA > > -/* $Id: NetStreamFfmpeg.cpp,v 1.9 2007/01/23 21:37:16 tgc Exp $ */ > +/* $Id: NetStreamFfmpeg.cpp,v 1.10 2007/01/27 16:55:05 tgc Exp $ */ > > #ifdef HAVE_CONFIG_H > #include "config.h" > @@ -26,12 +26,10 @@ > #include "NetStreamFfmpeg.h" > #include "fn_call.h" > #include "NetStream.h" > -#include "URLAccessManager.h" > #include "render.h" > #include "movie_root.h" > #include "NetConnection.h" > > -#include "URL.h" > #include "tu_file.h" > > #if defined(_WIN32) || defined(WIN32) > @@ -205,6 +203,11 @@ > } > > url += c_url; > + // Remove any "mp3:" prefix. Maybe should use this to mark as audio-only > + if (url.compare(0, 4, std::string("mp3:")) == 0) { > + url = url.substr(4); > + } > + > m_go = true; > > // To avoid blocking while connecting, we use a thread. > @@ -223,21 +226,10 @@ > > netconnection_as_object* nc = static_cast(ns->netCon); > > - URL uri(ns->url); > - > - // Check if we're allowed to open url > - if (URLAccessManager::allow(uri)) { > - > - bool local = false; > - if (uri.protocol() == "file") > - { > - local = true; > - } > - > // Pass stuff from/to the NetConnection object. > - nc->obj.openConnection(ns->url.c_str(), ns->m_netstream_object, local); > - } else { > - log_warning("Gnash is not allowed to open movie url: %s", ns->url.c_str()); > + if (!nc->obj.openConnection(ns->url.c_str(), ns->m_netstream_object)) { > + log_warning("Gnash could not open movie url: %s", ns->url.c_str()); > + return; > } > > ns->inputPos = 0; > > Index: server/asobj/NetStreamFfmpeg.h > =================================================================== > RCS file: /sources/gnash/gnash/server/asobj/NetStreamFfmpeg.h,v > retrieving revision 1.5 > retrieving revision 1.6 > diff -u -b -r1.5 -r1.6 > --- server/asobj/NetStreamFfmpeg.h 23 Jan 2007 21:37:16 -0000 1.5 > +++ server/asobj/NetStreamFfmpeg.h 27 Jan 2007 16:55:05 -0000 1.6 > @@ -14,7 +14,7 @@ > // along with this program; if not, write to the Free Software > // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA > > -/* $Id: NetStreamFfmpeg.h,v 1.5 2007/01/23 21:37:16 tgc Exp $ */ > +/* $Id: NetStreamFfmpeg.h,v 1.6 2007/01/27 16:55:05 tgc Exp $ */ > > #ifndef __NETSTREAMFFMPEG_H__ > #define __NETSTREAMFFMPEG_H__ > @@ -224,8 +224,6 @@ > > double m_video_clock; > > -// pthread_t m_thread; > -// pthread_t startThread; > boost::thread *m_thread; > boost::thread *startThread; > boost::mutex decoding_mutex; > > Index: server/asobj/NetStreamGst.cpp > =================================================================== > RCS file: /sources/gnash/gnash/server/asobj/NetStreamGst.cpp,v > retrieving revision 1.6 > retrieving revision 1.7 > diff -u -b -r1.6 -r1.7 > --- server/asobj/NetStreamGst.cpp 23 Jan 2007 21:37:16 -0000 1.6 > +++ server/asobj/NetStreamGst.cpp 27 Jan 2007 16:55:05 -0000 1.7 > @@ -120,6 +120,10 @@ > } > > url += c_url; > + // Remove any "mp3:" prefix. Maybe should use this to mark as audio-only > + if (url.compare(0, 4, std::string("mp3:")) == 0) { > + url = url.substr(4); > + } > m_go = true; > > // To avoid blocking while connecting, we use a thread. > @@ -237,21 +241,11 @@ > { > NetStreamGst* ns = static_cast(arg); > netconnection_as_object* nc = static_cast(ns->netCon); > - URL uri(ns->url); > - > - // Check if we're allowed to open url > - if (URLAccessManager::allow(uri)) { > - bool local = false; > - if (uri.protocol() == "file") > - { > - local = true; > - } > > // Pass stuff from/to the NetConnection object. > - nc->obj.openConnection(ns->url.c_str(), ns->m_netstream_object, local); > - } else { > - log_warning("Gnash is not allowed to open movie url: %s", ns->url.c_str()); > - return 0; > + if (!nc->obj.openConnection(ns->url.c_str(), ns->m_netstream_object)) { > + log_warning("Gnash could not open movie url: %s", ns->url.c_str()); > + return; > } > > ns->inputPos = 0; > > > _______________________________________________ > Gnash-commit mailing list > Gnash-commit@gnu.org > http://lists.gnu.org/mailman/listinfo/gnash-commit -- () ASCII Ribbon Campaign /\ Keep it simple! From MAILER-DAEMON Mon Jan 29 04:01:17 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HBSO5-0003fz-DE for mharc-gnash-commit@gnu.org; Mon, 29 Jan 2007 04:01:17 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HBSO4-0003ft-53 for gnash-commit@gnu.org; Mon, 29 Jan 2007 04:01:16 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HBSO3-0003fh-Ey for gnash-commit@gnu.org; Mon, 29 Jan 2007 04:01:15 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HBSO3-0003fe-BJ for gnash-commit@gnu.org; Mon, 29 Jan 2007 04:01:15 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HBSO2-00045w-SM for gnash-commit@gnu.org; Mon, 29 Jan 2007 04:01:14 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HBSO1-0005yY-Qk for gnash-commit@gnu.org; Mon, 29 Jan 2007 09:01:13 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1HBSO1-0005yV-Ki for gnash-commit@gnu.org; Mon, 29 Jan 2007 09:01:13 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Mon, 29 Jan 2007 09:01:13 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash/testsuite/misc-ming.all place_and_remove_... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jan 2007 09:01:16 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/29 09:01:13 Modified files: testsuite/misc-ming.all: place_and_remove_object_insane_test.c Log message: fixed comments CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/place_and_remove_object_insane_test.c?cvsroot=gnash&r1=1.8&r2=1.9 Patches: Index: place_and_remove_object_insane_test.c =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/place_and_remove_object_insane_test.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -b -r1.8 -r1.9 --- place_and_remove_object_insane_test.c 24 Jan 2007 14:33:39 -0000 1.8 +++ place_and_remove_object_insane_test.c 29 Jan 2007 09:01:13 -0000 1.9 @@ -143,12 +143,12 @@ SWFDisplayItem_setName(it_red, "mc_red"); SWFDisplayItem_setRatio(it_red, 2.0); - it_blue = SWFMovie_add(mo, (SWFBlock)mc_blue); //add mc_red to the 3rd frame at depth 30 again + it_blue = SWFMovie_add(mo, (SWFBlock)mc_blue); //add mc_blue to the 3rd frame at depth 30 again SWFDisplayItem_setDepth(it_blue, 30); SWFDisplayItem_setName(it_blue, "mc_blue"); //SWFDisplayItem_setRatio(it, 2.0); //Don't set ratio this time! - it_black = SWFMovie_add(mo, (SWFBlock)mc_black); //add mc_red to the 3rd frame at depth 40 again + it_black = SWFMovie_add(mo, (SWFBlock)mc_black); //add mc_black to the 3rd frame at depth 40 again SWFDisplayItem_setDepth(it_black, 40); SWFDisplayItem_setName(it_black, "mc_black_name_changed"); //SWFDisplayItem_setRatio(it_black, 2.0); //Don't set ratio this time! From MAILER-DAEMON Mon Jan 29 04:03:15 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HBSPz-0004JH-OU for mharc-gnash-commit@gnu.org; Mon, 29 Jan 2007 04:03:15 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HBSPy-0004IG-AU for gnash-commit@gnu.org; Mon, 29 Jan 2007 04:03:14 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HBSPx-0004Hx-BQ for gnash-commit@gnu.org; Mon, 29 Jan 2007 04:03:13 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HBSPx-0004Hr-5D for gnash-commit@gnu.org; Mon, 29 Jan 2007 04:03:13 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HBSPw-0004KG-MB for gnash-commit@gnu.org; Mon, 29 Jan 2007 04:03:12 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HBSPw-0005zo-5C for gnash-commit@gnu.org; Mon, 29 Jan 2007 09:03:12 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1HBSPv-0005zl-Vv for gnash-commit@gnu.org; Mon, 29 Jan 2007 09:03:12 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Mon, 29 Jan 2007 09:03:11 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash/testsuite/misc-ming.all simple_loop_test.c X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jan 2007 09:03:14 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/29 09:03:11 Modified files: testsuite/misc-ming.all: simple_loop_test.c Log message: fixed comments CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/simple_loop_test.c?cvsroot=gnash&r1=1.2&r2=1.3 Patches: Index: simple_loop_test.c =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/simple_loop_test.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- simple_loop_test.c 25 Jan 2007 15:01:39 -0000 1.2 +++ simple_loop_test.c 29 Jan 2007 09:03:11 -0000 1.3 @@ -22,7 +22,6 @@ * The root movie has 4 frames * First frame initializes the dejagnu stuff. * Each frame from 2nd to 4th place a character on the stage. - * Last frame (4) contains a goto_frame(2). */ #include From MAILER-DAEMON Mon Jan 29 04:31:46 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HBSra-0004p5-8I for mharc-gnash-commit@gnu.org; Mon, 29 Jan 2007 04:31:46 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HBSrX-0004o8-Oi for gnash-commit@gnu.org; Mon, 29 Jan 2007 04:31:43 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HBSrW-0004nq-3I for gnash-commit@gnu.org; Mon, 29 Jan 2007 04:31:42 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HBSrV-0004nn-Sx for gnash-commit@gnu.org; Mon, 29 Jan 2007 04:31:41 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HBSrV-0008Mf-Kd for gnash-commit@gnu.org; Mon, 29 Jan 2007 04:31:41 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HBSrU-0006eE-9V for gnash-commit@gnu.org; Mon, 29 Jan 2007 09:31:40 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1HBSrU-0006e7-1u for gnash-commit@gnu.org; Mon, 29 Jan 2007 09:31:40 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Mon, 29 Jan 2007 09:31:40 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash/gui gui.cpp X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jan 2007 09:31:44 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/29 09:31:40 Modified files: gui : gui.cpp Log message: commented out debugging output for mouse movements CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gui.cpp?cvsroot=gnash&r1=1.57&r2=1.58 Patches: Index: gui.cpp =================================================================== RCS file: /sources/gnash/gnash/gui/gui.cpp,v retrieving revision 1.57 retrieving revision 1.58 diff -u -b -r1.57 -r1.58 --- gui.cpp 23 Jan 2007 23:20:28 -0000 1.57 +++ gui.cpp 29 Jan 2007 09:31:39 -0000 1.58 @@ -229,7 +229,7 @@ { movie_root* m = get_current_root(); - log_msg("mouse @ %d,%d", x, y); + //log_msg("mouse @ %d,%d", x, y); if ( m->notify_mouse_moved(x, y) ) { // any action triggered by the From MAILER-DAEMON Mon Jan 29 13:16:31 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HBb3P-0006OU-GA for mharc-gnash-commit@gnu.org; Mon, 29 Jan 2007 13:16:31 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HBb3N-0006O9-7f for gnash-commit@gnu.org; Mon, 29 Jan 2007 13:16:29 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HBb3L-0006Nu-Mn for gnash-commit@gnu.org; Mon, 29 Jan 2007 13:16:28 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HBb3L-0006Nr-HD for gnash-commit@gnu.org; Mon, 29 Jan 2007 13:16:27 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HBb3L-0006MR-AQ for gnash-commit@gnu.org; Mon, 29 Jan 2007 13:16:27 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HBb3K-0005on-9w for gnash-commit@gnu.org; Mon, 29 Jan 2007 18:16:26 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1HBb3J-0005ok-V4 for gnash-commit@gnu.org; Mon, 29 Jan 2007 18:16:26 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Mon, 29 Jan 2007 18:16:25 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash server/parser/movie_def_impl.h ChangeLog X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jan 2007 18:16:29 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/29 18:16:25 Modified files: server/parser : movie_def_impl.h . : ChangeLog Log message: * server/parser/movie_def_impl.h (add_execute_tag, add_init_action): Add an assertion to catch out-of-bounds accesses. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/movie_def_impl.h?cvsroot=gnash&r1=1.29&r2=1.30 http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2185&r2=1.2186 Patches: Index: server/parser/movie_def_impl.h =================================================================== RCS file: /sources/gnash/gnash/server/parser/movie_def_impl.h,v retrieving revision 1.29 retrieving revision 1.30 diff -u -b -r1.29 -r1.30 --- server/parser/movie_def_impl.h 10 Jan 2007 17:28:50 -0000 1.29 +++ server/parser/movie_def_impl.h 29 Jan 2007 18:16:25 -0000 1.30 @@ -452,17 +452,16 @@ void add_execute_tag(execute_tag* e) { assert(e); + if (_frames_loaded < m_playlist.size()); m_playlist[_frames_loaded].push_back(e); } /// Need to execute the given tag before entering the /// currently-loading frame for the first time. - /// - /// @@ AFAIK, the sprite_id is totally pointless -- correct? - //void add_init_action(int sprite_id, execute_tag* e) void add_init_action(execute_tag* e) { assert(e); + assert(_frames_loaded < m_playlist.size()); m_init_action_list[_frames_loaded].push_back(e); } Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2185 retrieving revision 1.2186 diff -u -b -r1.2185 -r1.2186 --- ChangeLog 29 Jan 2007 08:44:35 -0000 1.2185 +++ ChangeLog 29 Jan 2007 18:16:25 -0000 1.2186 @@ -1,3 +1,8 @@ +2007-01-29 Sandro Santilli + + * server/parser/movie_def_impl.h (add_execute_tag, add_init_action): + Add an assertion to catch out-of-bounds accesses. + 2007-01-29 Zou Lunkai * testsuite/misc-ming.all/goto_frame_test.c: From MAILER-DAEMON Mon Jan 29 13:25:13 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HBbBp-00019E-Rd for mharc-gnash-commit@gnu.org; Mon, 29 Jan 2007 13:25:13 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HBbBo-000199-QY for gnash-commit@gnu.org; Mon, 29 Jan 2007 13:25:12 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HBbBm-00018v-Ay for gnash-commit@gnu.org; Mon, 29 Jan 2007 13:25:11 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HBbBm-00018s-4j for gnash-commit@gnu.org; Mon, 29 Jan 2007 13:25:10 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HBbBl-0007vE-Qu for gnash-commit@gnu.org; Mon, 29 Jan 2007 13:25:09 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HBbBK-0005yV-KO for gnash-commit@gnu.org; Mon, 29 Jan 2007 18:24:42 +0000 Received: from ann by savannah.gnu.org with local (Exim 4.50) id 1HBbBK-0005yS-Ai for gnash-commit@gnu.org; Mon, 29 Jan 2007 18:24:42 +0000 To: gnash-commit@gnu.org Message-Id: From: Ann Barcomb Date: Mon, 29 Jan 2007 18:24:42 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash ChangeLog doc/C/sources.xml X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jan 2007 18:25:13 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Ann Barcomb 07/01/29 18:24:42 Modified files: . : ChangeLog doc/C : sources.xml Log message: I've removed the '--disable-xml' option. Rob, on #gnash: "btw, I've just removed the remnants of "HAVE_XML", it's required now, so no more --disable-xml option." CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2186&r2=1.2187 http://cvs.savannah.gnu.org/viewcvs/gnash/doc/C/sources.xml?cvsroot=gnash&r1=1.27&r2=1.28 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2186 retrieving revision 1.2187 diff -u -b -r1.2186 -r1.2187 --- ChangeLog 29 Jan 2007 18:16:25 -0000 1.2186 +++ ChangeLog 29 Jan 2007 18:24:42 -0000 1.2187 @@ -1,3 +1,8 @@ +2007-01-29 Ann Barcomb + + * Removed reference to '--disable-xml' option in doc/C/sources.xml. + It is required now. + 2007-01-29 Sandro Santilli * server/parser/movie_def_impl.h (add_execute_tag, add_init_action): Index: doc/C/sources.xml =================================================================== RCS file: /sources/gnash/gnash/doc/C/sources.xml,v retrieving revision 1.27 retrieving revision 1.28 diff -u -b -r1.27 -r1.28 --- doc/C/sources.xml 22 Jan 2007 07:12:53 -0000 1.27 +++ doc/C/sources.xml 29 Jan 2007 18:24:42 -0000 1.28 @@ -950,16 +950,6 @@ to limit what is required for a quite build of Gnash. - - - --disable-xml - - - Disable support for XML. The default is to support XML. - - - - --disable-fork From MAILER-DAEMON Mon Jan 29 13:36:03 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HBbMJ-00054P-D0 for mharc-gnash-commit@gnu.org; Mon, 29 Jan 2007 13:36:03 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HBbMI-00053U-6Z for gnash-commit@gnu.org; Mon, 29 Jan 2007 13:36:02 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HBbMH-00052t-Cr for gnash-commit@gnu.org; Mon, 29 Jan 2007 13:36:01 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HBbMH-00052n-38 for gnash-commit@gnu.org; Mon, 29 Jan 2007 13:36:01 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HBbMG-0001oJ-Mz for gnash-commit@gnu.org; Mon, 29 Jan 2007 13:36:00 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HBbMF-0007Us-Hv for gnash-commit@gnu.org; Mon, 29 Jan 2007 18:35:59 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1HBbMF-0007Up-6P for gnash-commit@gnu.org; Mon, 29 Jan 2007 18:35:59 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Mon, 29 Jan 2007 18:35:59 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash ChangeLog server/parser/movie_def_impl.cpp X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jan 2007 18:36:02 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/29 18:35:59 Modified files: . : ChangeLog server/parser : movie_def_impl.cpp Log message: * server/parser/movie_def_impl.cpp (read_all_swf): when last expected SHOWFRAME tag is hit, discard the rest and warn user if next tag is not an END. This happens when Ming users forget to call SWFMovie_nextFrame() as last thing before output. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2187&r2=1.2188 http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/movie_def_impl.cpp?cvsroot=gnash&r1=1.56&r2=1.57 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2187 retrieving revision 1.2188 diff -u -b -r1.2187 -r1.2188 --- ChangeLog 29 Jan 2007 18:24:42 -0000 1.2187 +++ ChangeLog 29 Jan 2007 18:35:58 -0000 1.2188 @@ -1,3 +1,10 @@ +2007-01-29 Sandro Santilli + + * server/parser/movie_def_impl.cpp (read_all_swf): when last + expected SHOWFRAME tag is hit, discard the rest and warn + user if next tag is not an END. This happens when Ming users + forget to call SWFMovie_nextFrame() as last thing before output. + 2007-01-29 Ann Barcomb * Removed reference to '--disable-xml' option in doc/C/sources.xml. Index: server/parser/movie_def_impl.cpp =================================================================== RCS file: /sources/gnash/gnash/server/parser/movie_def_impl.cpp,v retrieving revision 1.56 retrieving revision 1.57 diff -u -b -r1.56 -r1.57 --- server/parser/movie_def_impl.cpp 10 Jan 2007 17:28:50 -0000 1.56 +++ server/parser/movie_def_impl.cpp 29 Jan 2007 18:35:59 -0000 1.57 @@ -853,6 +853,24 @@ ); incrementLoadedFrames(); + if ( _frames_loaded == m_frame_count ) + { + str.close_tag(); + if ( str.open_tag() != SWF::END ) + { + IF_VERBOSE_MALFORMED_SWF( + log_swferror("last expected SHOWFRAME " + "in SWF stream " + "isn't followed by an END. " + "Discarding the rest."); + ); + } + // WARNING: might not match with SWF size + // advertised in header + setBytesLoaded(str.get_position()); + str.close_tag(); + break; + } } else if (_tag_loaders.get(tag_type, &lf)) From MAILER-DAEMON Mon Jan 29 16:28:17 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HBe2z-0000BV-2A for mharc-gnash-commit@gnu.org; Mon, 29 Jan 2007 16:28:17 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HBe2y-0000BQ-3m for gnash-commit@gnu.org; Mon, 29 Jan 2007 16:28:16 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HBe2x-0000BD-Fr for gnash-commit@gnu.org; Mon, 29 Jan 2007 16:28:15 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HBe2x-0000B9-7u for gnash-commit@gnu.org; Mon, 29 Jan 2007 16:28:15 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HBe2w-0000jJ-Q4 for gnash-commit@gnu.org; Mon, 29 Jan 2007 16:28:15 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HBe2s-0005mm-W4 for gnash-commit@gnu.org; Mon, 29 Jan 2007 21:28:11 +0000 Received: from martinwguy by savannah.gnu.org with local (Exim 4.50) id 1HBe2s-0005mj-NB for gnash-commit@gnu.org; Mon, 29 Jan 2007 21:28:10 +0000 To: gnash-commit@gnu.org Message-Id: From: Martin Guy Date: Mon, 29 Jan 2007 21:28:10 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash configure.ac ChangeLog server/asobj/xml.cpp X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jan 2007 21:28:16 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Martin Guy 07/01/29 21:28:10 Modified files: . : configure.ac ChangeLog server/asobj : xml.cpp Log message: Remove broken --enable-xmlreader and --enable-dom leaving only dom. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/configure.ac?cvsroot=gnash&r1=1.240&r2=1.241 http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2188&r2=1.2189 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/xml.cpp?cvsroot=gnash&r1=1.12&r2=1.13 Patches: Index: configure.ac =================================================================== RCS file: /sources/gnash/gnash/configure.ac,v retrieving revision 1.240 retrieving revision 1.241 diff -u -b -r1.240 -r1.241 --- configure.ac 26 Jan 2007 19:41:41 -0000 1.240 +++ configure.ac 29 Jan 2007 21:28:10 -0000 1.241 @@ -15,7 +15,7 @@ dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA dnl -dnl $Id: configure.ac,v 1.240 2007/01/26 19:41:41 rsavoye Exp $ +dnl $Id: configure.ac,v 1.241 2007/01/29 21:28:10 martinwguy Exp $ AC_PREREQ(2.50) AC_INIT(gnash, cvs) @@ -243,35 +243,6 @@ dnl ... dnl -------------------------------------------------------- -dnl Use the Dom parser from libxml2, not the xmlReader one -dnl The default is to use the Dom parser -AC_ARG_ENABLE(dom, AC_HELP_STRING([--enable-dom], [Enable support for Dom parser]), -[case "${enableval}" in - yes) dom=yes ;; - no) dom=no ;; - *) AC_MSG_ERROR([bad value ${enableval} for enable-malloc option]) ;; -esac], dom=yes) - -if test x$dom = xyes; then - AC_DEFINE([USE_DOM], [], [Use Dom parser]) -fi - -dnl Use an xmlReader parser, instead of the DOM one -AC_ARG_ENABLE(reader, AC_HELP_STRING([--enable-xmlreader], [Enable support for xmlReader parser]), -[case "${enableval}" in - yes) reader=yes ;; - no) reader=no ;; - *) AC_MSG_ERROR([bad value ${enableval} for enable-xmlreader option]) ;; -esac], reader=no) - -if test x$reader = xyes; then - AC_DEFINE([USE_XMLREADER], [], [Use xmlReader parser]) -fi - -if test x$reader = xyes -a x$dom = xyes; then - AC_ERROR([Can't specify a DOM and an xmlReader parser]) -fi - AC_PROG_CC AC_PROG_CXX AC_EXEEXT Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2188 retrieving revision 1.2189 diff -u -b -r1.2188 -r1.2189 --- ChangeLog 29 Jan 2007 18:35:58 -0000 1.2188 +++ ChangeLog 29 Jan 2007 21:28:10 -0000 1.2189 @@ -1,3 +1,7 @@ +2007-01-25 Martin Guy + + * Remove broken --enable-xmlreader and --enable-dom leaving only dom. + 2007-01-29 Sandro Santilli * server/parser/movie_def_impl.cpp (read_all_swf): when last Index: server/asobj/xml.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/xml.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -u -b -r1.12 -r1.13 --- server/asobj/xml.cpp 18 Jan 2007 22:53:22 -0000 1.12 +++ server/asobj/xml.cpp 29 Jan 2007 21:28:10 -0000 1.13 @@ -14,7 +14,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -/* $Id: xml.cpp,v 1.12 2007/01/18 22:53:22 strk Exp $ */ +/* $Id: xml.cpp,v 1.13 2007/01/29 21:28:10 martinwguy Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -363,35 +363,9 @@ _bytes_total = _bytes_loaded = xml_in.size(); -#ifdef USE_XMLREADER - XMLNode *node = 0; - xmlTextReaderPtr reader; - - reader = xmlReaderForMemory(xml_in.c_str(), xml_in.size(), NULL, NULL, 0); - if (reader != NULL) { - bool ret = true; - while (ret) { - ret = xmlTextReaderRead(reader); - node = processNode(reader, node); - } - xmlFreeTextReader(reader); - if (ret != false) { - log_error("%s : couldn't parse\n", xml_in.c_str()); - return false; - } - } else { - log_error("Unable to open %s\n", xml_in.c_str()); - return false; - } - xmlCleanupParser(); - return true; -#else + bool ret=true; -bool ret = true; - -#ifdef USE_DOM xmlInitParser(); - _doc = xmlParseMemory(xml_in.c_str(), xml_in.size()); if (_doc == 0) { log_error("Can't parse XML data!\n"); @@ -401,7 +375,7 @@ xmlCleanupParser(); xmlFreeDoc(_doc); xmlMemoryDump(); -#endif + #ifndef USE_DMALLOC //dump_memory_stats(__FUNCTION__, __LINE__, "after xmlParseMemory"); #endif @@ -410,137 +384,6 @@ } -// XML_READER_TYPE_NONE = 0 -// XML_READER_TYPE_ELEMENT = 1, -// XML_READER_TYPE_ATTRIBUTE = 2, -// XML_READER_TYPE_TEXT = 3, -// XML_READER_TYPE_COMMENT = 8, -// XML_READER_TYPE_SIGNIFICANT_WHITESPACE = 14, -// XML_READER_TYPE_END_ELEMENT = 15, -// -// processNode: -// 2 1 IP 0// processNode: -// 3 3 #text 0 192.168.2.50 -// processNode: -// 2 15 IP 0 -// processNode: -// 2 14 #text 0 -const char *tabs[] = { - "", - "\t", - "\t\t", - "\t\t\t", - "\t\t\t", - "\t\t\t\t", -}; - -#ifdef USE_XMLREADER -// This is an xmlReader (SAX) based parser. For some reason it core dumps -// when compiled with GCC 3.x, but works just fine with GCC 4.x. -XMLNode* -XML::processNode(xmlTextReaderPtr reader, XMLNode *node) -{ - log_msg("%s: node is %p\n", __PRETTY_FUNCTION__, node); - static XMLNode *parent[10]; - xmlChar *name, *value; - int depth; - XMLNode *element; - //static int previous_depth = 0; - xmlReaderTypes type; - - if (node == 0) { - memset(parent, 0, sizeof(XMLNode *)); - } - type = (xmlReaderTypes)xmlTextReaderNodeType(reader); - depth = xmlTextReaderDepth(reader); - value = xmlTextReaderValue(reader); - name = xmlTextReaderName(reader); - - if (name == NULL) - name = xmlStrdup(BAD_CAST "--"); - -#if 0 - printf("%d %d %s %d\n", - depth, - (int)type, - name, - xmlTextReaderIsEmptyElement(reader)); -#endif - - - //child = node->_children[0]; - switch(xmlTextReaderNodeType(reader)) { - case XML_READER_TYPE_NONE: - break; - case XML_READER_TYPE_SIGNIFICANT_WHITESPACE: // This is an empty text node - //log_msg("\tWhitespace at depth %d\n", depth); - break; - case XML_READER_TYPE_END_ELEMENT: - if (depth == 0) { // This is the last node in the file - element = node; - break; - } - parent[depth]->_children.push_back(element); -// log_msg("Pushing element %s on node %s\n", node->_name, parent[depth]->_name); -// log_msg("End element at depth %d is %s for parent %s %p\n", depth, name, -// parent[depth]->_name, parent[depth]); - element = parent[depth]; - break; - case XML_READER_TYPE_ELEMENT: - element = new XMLNode; -// log_msg("%sElement at depth %d is %s for node at %p\n", tabs[depth], depth, name, element); - element->_name = (char *)new char[strlen(reinterpret_cast(name))+1]; - memset(element->_name, 0, strlen(reinterpret_cast(name))+1); - strcpy(element->_name, reinterpret_cast(name)); - if (node == 0) { - _nodes = element; - parent[0] = element; - } else { - parent[depth] = node; - parent[depth+1] = node; - } - // xmlTextReaderAttributeCount(reader); - if (xmlTextReaderHasAttributes(reader)) { - // log_msg("Has Attributes!\n"); - xmlTextReaderMoveToFirstAttribute(reader); - processNode(reader, element); - while(xmlTextReaderMoveToNextAttribute(reader)) { - processNode(reader, element); - } - } - break; - case XML_READER_TYPE_TEXT: - element = node; -// log_msg("%sValue at depth %d is \"%s\" for node at %p\n", tabs[depth], depth, value, element); - element->_value = (char *)new char[strlen(reinterpret_cast(value))+1]; - memset(element->_value, 0, strlen(reinterpret_cast(value))+1); - strcpy(element->_value, reinterpret_cast(value)); - break; - case XML_READER_TYPE_ATTRIBUTE: - element = node; - XMLAttr *attrib = new XMLAttr; - attrib->_name = (char *)new char[strlen(reinterpret_cast(name))+1]; - memset(attrib->_name, 0, strlen(reinterpret_cast(name))+1); - strcpy(attrib->_name, reinterpret_cast(name)); - attrib->_value = (char *)new char[strlen(reinterpret_cast(value))+1]; - memset(attrib->_value, 0, strlen(reinterpret_cast(value))+1); - strcpy(attrib->_value, reinterpret_cast(value)); -// log_msg("%sPushing attribute %s, value \"%s\" for node %s\n", tabs[depth], name, value, element->_name); - element->_attributes.push_back(attrib); - break; - default: // FIXME: why does this break GCC 3.3.3 but not 3.4.3 ? - log_error("Unsupported XML type %d\n!", type); - break; - }; - - xmlFree(name); - if (value != NULL) { - xmlFree(value); - } - //previous_depth = depth; - return element; -} -#endif // This reads in an XML file from disk and parses into into a memory resident // tree which can be walked through later. @@ -560,30 +403,6 @@ // be set later on after the // file is loaded } -#ifdef USE_XMLREADER - XMLNode *node = 0; - xmlTextReaderPtr reader; - - reader = xmlNewTextReaderFilename(filespec); - if (reader != NULL) { - bool ret = true; - while (ret) { - ret = xmlTextReaderRead(reader); - node = processNode(reader, node); - } - xmlFreeTextReader(reader); - if (ret != false) { - log_error("%s : couldn't parse\n", filespec); - return false; - } - } else { - log_error("Unable to open %s\n", filespec); - return false; - } - xmlCleanupParser(); - return true; -#else -#ifdef USE_DOM xmlInitParser(); _doc = xmlParseFile(filespec); if (_doc == 0) { @@ -595,10 +414,6 @@ xmlFreeDoc(_doc); xmlMemoryDump(); return true; -#else -#error "You have to enable either a DOM or an xmlReader XML parser" -#endif -#endif } From MAILER-DAEMON Mon Jan 29 18:21:04 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HBfo8-0003Mn-Pu for mharc-gnash-commit@gnu.org; Mon, 29 Jan 2007 18:21:04 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HBfo7-0003Km-EJ for gnash-commit@gnu.org; Mon, 29 Jan 2007 18:21:03 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HBfo7-0003Ka-2Q for gnash-commit@gnu.org; Mon, 29 Jan 2007 18:21:03 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HBfo6-0003KX-RY for gnash-commit@gnu.org; Mon, 29 Jan 2007 18:21:02 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HBfo6-0002kp-Jq for gnash-commit@gnu.org; Mon, 29 Jan 2007 18:21:02 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HBfo6-0002n7-BT for gnash-commit@gnu.org; Mon, 29 Jan 2007 23:21:02 +0000 Received: from martinwguy by savannah.gnu.org with local (Exim 4.50) id 1HBfo6-0002n4-2d for gnash-commit@gnu.org; Mon, 29 Jan 2007 23:21:02 +0000 To: gnash-commit@gnu.org Message-Id: From: Martin Guy Date: Mon, 29 Jan 2007 23:21:02 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash ChangeLog README configure.ac X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jan 2007 23:21:03 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Martin Guy 07/01/29 23:21:01 Modified files: . : ChangeLog README configure.ac Log message: Remove code and documentation for unimplemented --disable-xml CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2189&r2=1.2190 http://cvs.savannah.gnu.org/viewcvs/gnash/README?cvsroot=gnash&r1=1.24&r2=1.25 http://cvs.savannah.gnu.org/viewcvs/gnash/configure.ac?cvsroot=gnash&r1=1.241&r2=1.242 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2189 retrieving revision 1.2190 diff -u -b -r1.2189 -r1.2190 --- ChangeLog 29 Jan 2007 21:28:10 -0000 1.2189 +++ ChangeLog 29 Jan 2007 23:21:01 -0000 1.2190 @@ -1,6 +1,12 @@ 2007-01-25 Martin Guy - * Remove broken --enable-xmlreader and --enable-dom leaving only dom. + * configure.ac, README: Remove code and documentation for + --disable-xml + +2007-01-25 Martin Guy + + * configure.ac, server/asobj/xml.cpp: Remove broken + --enable-xmlreader and --enable-dom leaving only dom. 2007-01-29 Sandro Santilli Index: README =================================================================== RCS file: /sources/gnash/gnash/README,v retrieving revision 1.24 retrieving revision 1.25 diff -u -b -r1.24 -r1.25 --- README 21 Jan 2007 22:41:02 -0000 1.24 +++ README 29 Jan 2007 23:21:01 -0000 1.25 @@ -1,4 +1,4 @@ -$Id: README,v 1.24 2007/01/21 22:41:02 rsavoye Exp $ +$Id: README,v 1.25 2007/01/29 23:21:01 martinwguy Exp $ Gnash: the GNU Flash Player @@ -113,8 +113,7 @@ The GTK support is more developed and featureful, while the SDL support has less dependancies on other packages. -Other required packages are libxml2, libpng, libjpeg. The use of -libxml2 can be dropped if configured with --disable-xml. +Other required packages are libxml2, libpng and libjpeg. At this time the sound support is experimental until the new sound support is completed. This will support both Gstreamer and Index: configure.ac =================================================================== RCS file: /sources/gnash/gnash/configure.ac,v retrieving revision 1.241 retrieving revision 1.242 diff -u -b -r1.241 -r1.242 --- configure.ac 29 Jan 2007 21:28:10 -0000 1.241 +++ configure.ac 29 Jan 2007 23:21:01 -0000 1.242 @@ -15,7 +15,7 @@ dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA dnl -dnl $Id: configure.ac,v 1.241 2007/01/29 21:28:10 martinwguy Exp $ +dnl $Id: configure.ac,v 1.242 2007/01/29 23:21:01 martinwguy Exp $ AC_PREREQ(2.50) AC_INIT(gnash, cvs) @@ -77,26 +77,6 @@ AC_DEFINE([WRITE_FILE], [], [Write files while streaming]) fi -dnl Add XML support, if specified. -AC_ARG_ENABLE(xml, AC_HELP_STRING([--disable-xml], [Disable support for XML and XMLSocket]), -[case "${enableval}" in - yes) xml=yes ;; - no) xml=no ;; - *) AC_MSG_ERROR([bad value ${enableval} for disable-xml option]) ;; -esac],xml=yes) - -AM_CONDITIONAL(XML, test x$xml = xyes) - -dnl Add XML support, if specified. -AC_ARG_ENABLE(xml, AC_HELP_STRING([--disable-xml], [Disable support for XML and XMLSocket]), -[case "${enableval}" in - yes) xml=yes ;; - no) xml=no ;; - *) AC_MSG_ERROR([bad value ${enableval} for disable-xml option]) ;; -esac],xml=yes) - -AM_CONDITIONAL(XML, test x$xml = xyes) - dnl Don't build the extensions if specified. AC_ARG_ENABLE(extensions, AC_HELP_STRING([--enable-extensions], [Enable support for Gnash EXTENSIONS]), [case "${enableval}" in @@ -873,12 +853,6 @@ echo " DMalloc support disabled (default). Use --enable-dmalloc to enable." fi -if test x$xml = xno; then - echo " XML and XMLSocket disabled" -else - echo " XML and XMLSocket enabled (default). Use --disable-xml to disable." -fi - if test x"$plugin" = x"yes"; then echo " Firefox plugin enabled (default). Use --disable-plugin to disable." else @@ -938,8 +912,10 @@ echo " XML flags are: $LIBXML_CFLAGS" echo " XML libs are: $LIBXML_LIBS" else - echo " ERROR: No libxml2 development package installed!" - echo " Reconfigure with --disable-xml to continue" + echo " ERROR: No libxml2 development package installed!\ + You need to have the libmesa development package installed\ + to compile this project or install libxml2-dev (using apt-get)\ + or libxml2-devel (using yum or rpm)." nogo=true fi fi From MAILER-DAEMON Mon Jan 29 18:26:05 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HBfsz-0004ZF-6z for mharc-gnash-commit@gnu.org; Mon, 29 Jan 2007 18:26:05 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HBfsx-0004Yv-DY for gnash-commit@gnu.org; Mon, 29 Jan 2007 18:26:03 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HBfsw-0004Yj-IB for gnash-commit@gnu.org; Mon, 29 Jan 2007 18:26:02 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HBfsw-0004Yg-BZ for gnash-commit@gnu.org; Mon, 29 Jan 2007 18:26:02 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HBfsw-0003W6-3x for gnash-commit@gnu.org; Mon, 29 Jan 2007 18:26:02 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HBfsv-0002t8-SM for gnash-commit@gnu.org; Mon, 29 Jan 2007 23:26:01 +0000 Received: from martinwguy by savannah.gnu.org with local (Exim 4.50) id 1HBfsv-0002t5-MH for gnash-commit@gnu.org; Mon, 29 Jan 2007 23:26:01 +0000 To: gnash-commit@gnu.org Message-Id: From: Martin Guy Date: Mon, 29 Jan 2007 23:26:01 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash configure.ac X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jan 2007 23:26:04 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Martin Guy 07/01/29 23:26:01 Modified files: . : configure.ac Log message: Fix rubbish message about needing libmesa to include libxml2 CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/configure.ac?cvsroot=gnash&r1=1.242&r2=1.243 Patches: Index: configure.ac =================================================================== RCS file: /sources/gnash/gnash/configure.ac,v retrieving revision 1.242 retrieving revision 1.243 diff -u -b -r1.242 -r1.243 --- configure.ac 29 Jan 2007 23:21:01 -0000 1.242 +++ configure.ac 29 Jan 2007 23:26:01 -0000 1.243 @@ -15,7 +15,7 @@ dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA dnl -dnl $Id: configure.ac,v 1.242 2007/01/29 23:21:01 martinwguy Exp $ +dnl $Id: configure.ac,v 1.243 2007/01/29 23:26:01 martinwguy Exp $ AC_PREREQ(2.50) AC_INIT(gnash, cvs) @@ -913,8 +913,7 @@ echo " XML libs are: $LIBXML_LIBS" else echo " ERROR: No libxml2 development package installed!\ - You need to have the libmesa development package installed\ - to compile this project or install libxml2-dev (using apt-get)\ + To compile this project install libxml2-dev (using apt-get)\ or libxml2-devel (using yum or rpm)." nogo=true fi From MAILER-DAEMON Mon Jan 29 21:02:34 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HBiKQ-00066D-IA for mharc-gnash-commit@gnu.org; Mon, 29 Jan 2007 21:02:34 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HBiKO-000666-Bh for gnash-commit@gnu.org; Mon, 29 Jan 2007 21:02:32 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HBiKN-00065u-IP for gnash-commit@gnu.org; Mon, 29 Jan 2007 21:02:31 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HBiKN-00065r-F5 for gnash-commit@gnu.org; Mon, 29 Jan 2007 21:02:31 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HBiKM-0001CP-Td for gnash-commit@gnu.org; Mon, 29 Jan 2007 21:02:31 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HBiKL-0001Oa-Qf for gnash-commit@gnu.org; Tue, 30 Jan 2007 02:02:29 +0000 Received: from rsavoye by savannah.gnu.org with local (Exim 4.50) id 1HBiKL-0001OX-E1 for gnash-commit@gnu.org; Tue, 30 Jan 2007 02:02:29 +0000 To: gnash-commit@gnu.org Message-Id: From: Rob Savoye Date: Tue, 30 Jan 2007 02:02:29 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash ChangeLog libamf/amftest.cpp libbase/log.... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jan 2007 02:02:32 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Rob Savoye 07/01/30 02:02:29 Modified files: . : ChangeLog libamf : amftest.cpp libbase : log.h log.cpp server/vm : action.cpp server/asobj : xmlsocket.h utilities : parser.cpp processor.cpp Log message: * configure.ac: Remove --disable option. Bug #18905: * libamf/amftest.cpp: Remove HAVE_LIBXML ifdefs, we always want XML support. * libbase/log.h, log.cpp: Remove HAVE_LIBXML ifdefs, we always want XML support. * server/asobj/xmlsocket.h: Remove HAVE_LIBXML ifdefs, we always want XML support. * server/vm/action.cpp: Remove HAVE_LIBXML ifdefs, we always want XML support. * utilities/parser.cpp, processor.cpp: Remove HAVE_LIBXML ifdefs, we always want XML support. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2190&r2=1.2191 http://cvs.savannah.gnu.org/viewcvs/gnash/libamf/amftest.cpp?cvsroot=gnash&r1=1.8&r2=1.9 http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/log.h?cvsroot=gnash&r1=1.40&r2=1.41 http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/log.cpp?cvsroot=gnash&r1=1.41&r2=1.42 http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/action.cpp?cvsroot=gnash&r1=1.6&r2=1.7 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/xmlsocket.h?cvsroot=gnash&r1=1.2&r2=1.3 http://cvs.savannah.gnu.org/viewcvs/gnash/utilities/parser.cpp?cvsroot=gnash&r1=1.33&r2=1.34 http://cvs.savannah.gnu.org/viewcvs/gnash/utilities/processor.cpp?cvsroot=gnash&r1=1.45&r2=1.46 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2190 retrieving revision 1.2191 diff -u -b -r1.2190 -r1.2191 --- ChangeLog 29 Jan 2007 23:21:01 -0000 1.2190 +++ ChangeLog 30 Jan 2007 02:02:28 -0000 1.2191 @@ -1,3 +1,17 @@ +2007-01-29 Rob Savoye + + * configure.ac: Remove --disable option. Bug #18905: + * libamf/amftest.cpp: Remove HAVE_LIBXML ifdefs, we always + want XML support. + * libbase/log.h, log.cpp: Remove HAVE_LIBXML ifdefs, we always + want XML support. + * server/asobj/xmlsocket.h: Remove HAVE_LIBXML ifdefs, we always + want XML support. + * server/vm/action.cpp: Remove HAVE_LIBXML ifdefs, we always want + XML support. + * utilities/parser.cpp, processor.cpp: Remove HAVE_LIBXML ifdefs, + we always want XML support. + 2007-01-25 Martin Guy * configure.ac, README: Remove code and documentation for Index: libamf/amftest.cpp =================================================================== RCS file: /sources/gnash/gnash/libamf/amftest.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -b -r1.8 -r1.9 --- libamf/amftest.cpp 29 Oct 2006 18:34:18 -0000 1.8 +++ libamf/amftest.cpp 30 Jan 2007 02:02:28 -0000 1.9 @@ -1,5 +1,5 @@ // -// Copyright (C) 2005, 2006 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -14,9 +14,6 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -// -// - #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -25,6 +22,7 @@ #include #include +#include #include "dejagnu.h" @@ -40,13 +38,11 @@ // can optimize it's own performance // when needed, -#ifdef HAVE_LIBXML extern int xml_fd; // FIXME: this is the file descriptor // from XMLSocket::connect(). This // needs to be propogated up through // the layers properly, but first I // want to make sure it all works. -#endif // HAVE_LIBXML #include "amf.h" Index: libbase/log.h =================================================================== RCS file: /sources/gnash/gnash/libbase/log.h,v retrieving revision 1.40 retrieving revision 1.41 diff -u -b -r1.40 -r1.41 --- libbase/log.h 8 Jan 2007 17:24:39 -0000 1.40 +++ libbase/log.h 30 Jan 2007 02:02:28 -0000 1.41 @@ -1,5 +1,5 @@ // -// Copyright (C) 2005, 2006 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -14,10 +14,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -// -// - -/* $Id: log.h,v 1.40 2007/01/08 17:24:39 strk Exp $ */ +/* $Id: log.h,v 1.41 2007/01/30 02:02:28 rsavoye Exp $ */ #ifndef GNASH_LOG_H #define GNASH_LOG_H @@ -96,9 +93,7 @@ LogFile& operator << (const char *); LogFile& operator << (unsigned char const *); LogFile& operator << (const std::string &s); -// #ifdef HAVE_LIBXML // LogFile& operator << (const xmlChar *c); -// #endif LogFile& operator << (std::ostream & (&)(std::ostream &)); /// Print anything that can be printed on a stringstream Index: libbase/log.cpp =================================================================== RCS file: /sources/gnash/gnash/libbase/log.cpp,v retrieving revision 1.41 retrieving revision 1.42 diff -u -b -r1.41 -r1.42 --- libbase/log.cpp 8 Jan 2007 17:24:39 -0000 1.41 +++ libbase/log.cpp 30 Jan 2007 02:02:28 -0000 1.42 @@ -1,5 +1,5 @@ // -// Copyright (C) 2005, 2006 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -14,11 +14,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -// -// -// - -/* $Id: log.cpp,v 1.41 2007/01/08 17:24:39 strk Exp $ */ +/* $Id: log.cpp,v 1.42 2007/01/30 02:02:28 rsavoye Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -38,11 +34,9 @@ # include #endif -#ifdef HAVE_LIBXML #include #include #include -#endif #include #define BOOST_HAS_THREADS 1 @@ -684,7 +678,7 @@ return *this; } -#ifdef HAVE_LIBXML_XX +#if 0 /// \brief print an XML char * LogFile& LogFile::operator << (const xmlChar *c) Index: server/vm/action.cpp =================================================================== RCS file: /sources/gnash/gnash/server/vm/action.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -b -r1.6 -r1.7 --- server/vm/action.cpp 23 Jan 2007 17:26:08 -0000 1.6 +++ server/vm/action.cpp 30 Jan 2007 02:02:29 -0000 1.7 @@ -14,8 +14,6 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -// - #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -43,11 +41,8 @@ #include "fn_call.h" #include "VM.h" #include "StringPredicates.h" - -#ifdef HAVE_LIBXML #include "xml.h" #include "xmlsocket.h" -#endif #include Index: server/asobj/xmlsocket.h =================================================================== RCS file: /sources/gnash/gnash/server/asobj/xmlsocket.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- server/asobj/xmlsocket.h 9 Jan 2007 15:14:20 -0000 1.2 +++ server/asobj/xmlsocket.h 30 Jan 2007 02:02:29 -0000 1.3 @@ -1,5 +1,5 @@ // -// Copyright (C) 2005, 2006 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -14,10 +14,6 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -// -// -// - #ifndef __XMLSOCKET_H__ #define __XMLSOCKET_H__ Index: utilities/parser.cpp =================================================================== RCS file: /sources/gnash/gnash/utilities/parser.cpp,v retrieving revision 1.33 retrieving revision 1.34 diff -u -b -r1.33 -r1.34 --- utilities/parser.cpp 10 Jan 2007 17:28:50 -0000 1.33 +++ utilities/parser.cpp 30 Jan 2007 02:02:29 -0000 1.34 @@ -1,5 +1,5 @@ // -// Copyright (C) 2005, 2006 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -14,9 +14,8 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // -// -/* $Id: parser.cpp,v 1.33 2007/01/10 17:28:50 strk Exp $ */ +/* $Id: parser.cpp,v 1.34 2007/01/30 02:02:29 rsavoye Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -62,14 +61,11 @@ // can optimize it's own performance // when needed, -#ifdef HAVE_LIBXML extern int xml_fd; // FIXME: this is the file descriptor // from XMLSocket::connect(). This // needs to be propogated up through // the layers properly, but first I // want to make sure it all works. -#endif // HAVE_LIBXML - using gnash::stream; using gnash::log_msg; Index: utilities/processor.cpp =================================================================== RCS file: /sources/gnash/gnash/utilities/processor.cpp,v retrieving revision 1.45 retrieving revision 1.46 diff -u -b -r1.45 -r1.46 --- utilities/processor.cpp 2 Jan 2007 22:04:36 -0000 1.45 +++ utilities/processor.cpp 30 Jan 2007 02:02:29 -0000 1.46 @@ -1,5 +1,5 @@ // -// Copyright (C) 2005, 2006 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -14,10 +14,8 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // -// -// -/* $Id: processor.cpp,v 1.45 2007/01/02 22:04:36 nihilus Exp $ */ +/* $Id: processor.cpp,v 1.46 2007/01/30 02:02:29 rsavoye Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -67,13 +65,11 @@ // can optimize it's own performance // when needed, -#ifdef HAVE_LIBXML extern int xml_fd; // FIXME: this is the file descriptor // from XMLSocket::connect(). This // needs to be propogated up through // the layers properly, but first I // want to make sure it all works. -#endif // HAVE_LIBXML const char *GPROC_VERSION = "1.0"; From MAILER-DAEMON Tue Jan 30 04:54:29 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HBph7-0004Tb-CK for mharc-gnash-commit@gnu.org; Tue, 30 Jan 2007 04:54:29 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HBph5-0004TV-2c for gnash-commit@gnu.org; Tue, 30 Jan 2007 04:54:27 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HBph3-0004TJ-Qh for gnash-commit@gnu.org; Tue, 30 Jan 2007 04:54:26 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HBph3-0004TG-FP for gnash-commit@gnu.org; Tue, 30 Jan 2007 04:54:25 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HBph3-00088C-4S for gnash-commit@gnu.org; Tue, 30 Jan 2007 04:54:25 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HBph1-00054E-Mz for gnash-commit@gnu.org; Tue, 30 Jan 2007 09:54:23 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1HBph1-00054B-7b for gnash-commit@gnu.org; Tue, 30 Jan 2007 09:54:23 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Tue, 30 Jan 2007 09:54:23 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash ChangeLog server/asobj/xml.cpp X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jan 2007 09:54:27 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/30 09:54:23 Modified files: . : ChangeLog server/asobj : xml.cpp Log message: * server/asobj/xml.cpp: removed stale #endif. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2191&r2=1.2192 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/xml.cpp?cvsroot=gnash&r1=1.13&r2=1.14 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2191 retrieving revision 1.2192 diff -u -b -r1.2191 -r1.2192 --- ChangeLog 30 Jan 2007 02:02:28 -0000 1.2191 +++ ChangeLog 30 Jan 2007 09:54:22 -0000 1.2192 @@ -1,3 +1,7 @@ +2007-01-30 Sandro Santilli + + * server/asobj/xml.cpp: removed stale #endif. + 2007-01-29 Rob Savoye * configure.ac: Remove --disable option. Bug #18905: Index: server/asobj/xml.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/xml.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -u -b -r1.13 -r1.14 --- server/asobj/xml.cpp 29 Jan 2007 21:28:10 -0000 1.13 +++ server/asobj/xml.cpp 30 Jan 2007 09:54:22 -0000 1.14 @@ -14,7 +14,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -/* $Id: xml.cpp,v 1.13 2007/01/29 21:28:10 martinwguy Exp $ */ +/* $Id: xml.cpp,v 1.14 2007/01/30 09:54:22 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -380,7 +380,6 @@ //dump_memory_stats(__FUNCTION__, __LINE__, "after xmlParseMemory"); #endif return ret; -#endif } From MAILER-DAEMON Tue Jan 30 04:58:12 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HBpki-0005o1-FO for mharc-gnash-commit@gnu.org; Tue, 30 Jan 2007 04:58:12 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HBpkg-0005nR-Gd for gnash-commit@gnu.org; Tue, 30 Jan 2007 04:58:10 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HBpkd-0005mW-HQ for gnash-commit@gnu.org; Tue, 30 Jan 2007 04:58:08 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HBpkd-0005mO-5w for gnash-commit@gnu.org; Tue, 30 Jan 2007 04:58:07 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HBpkc-0000G4-RG for gnash-commit@gnu.org; Tue, 30 Jan 2007 04:58:06 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HBpkc-00057Y-3q for gnash-commit@gnu.org; Tue, 30 Jan 2007 09:58:06 +0000 Received: from tgc by savannah.gnu.org with local (Exim 4.50) id 1HBpkb-00057V-RH for gnash-commit@gnu.org; Tue, 30 Jan 2007 09:58:06 +0000 To: gnash-commit@gnu.org Message-Id: From: Tomas Groth Date: Tue, 30 Jan 2007 09:58:05 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash ChangeLog server/asobj/NetStreamGst.cpp X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jan 2007 09:58:11 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Tomas Groth 07/01/30 09:58:05 Modified files: . : ChangeLog server/asobj : NetStreamGst.cpp Log message: * server/asobj/NetStreamGst.cpp: Fixed wrong return type. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2192&r2=1.2193 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStreamGst.cpp?cvsroot=gnash&r1=1.7&r2=1.8 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2192 retrieving revision 1.2193 diff -u -b -r1.2192 -r1.2193 --- ChangeLog 30 Jan 2007 09:54:22 -0000 1.2192 +++ ChangeLog 30 Jan 2007 09:58:05 -0000 1.2193 @@ -1,3 +1,7 @@ +2007-01-30 Tomas Groth Christensen + + * server/asobj/NetStreamGst.cpp: Fixed wrong return type. + 2007-01-30 Sandro Santilli * server/asobj/xml.cpp: removed stale #endif. Index: server/asobj/NetStreamGst.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/NetStreamGst.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -b -r1.7 -r1.8 --- server/asobj/NetStreamGst.cpp 27 Jan 2007 16:55:05 -0000 1.7 +++ server/asobj/NetStreamGst.cpp 30 Jan 2007 09:58:05 -0000 1.8 @@ -245,7 +245,7 @@ // Pass stuff from/to the NetConnection object. if (!nc->obj.openConnection(ns->url.c_str(), ns->m_netstream_object)) { log_warning("Gnash could not open movie url: %s", ns->url.c_str()); - return; + return 0; } ns->inputPos = 0; From MAILER-DAEMON Tue Jan 30 05:25:26 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HBqB4-00068z-K0 for mharc-gnash-commit@gnu.org; Tue, 30 Jan 2007 05:25:26 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HBqB2-00068T-E2 for gnash-commit@gnu.org; Tue, 30 Jan 2007 05:25:24 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HBqB1-000671-LL for gnash-commit@gnu.org; Tue, 30 Jan 2007 05:25:24 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HBqB1-00066o-E3 for gnash-commit@gnu.org; Tue, 30 Jan 2007 05:25:23 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HBqB1-0005HA-75 for gnash-commit@gnu.org; Tue, 30 Jan 2007 05:25:23 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HBqB0-0005dO-3j for gnash-commit@gnu.org; Tue, 30 Jan 2007 10:25:22 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1HBqAz-0005dL-Ob for gnash-commit@gnu.org; Tue, 30 Jan 2007 10:25:22 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Tue, 30 Jan 2007 10:25:21 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash ChangeLog server/parser/movie_def_impl.cpp X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jan 2007 10:25:25 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/30 10:25:21 Modified files: . : ChangeLog server/parser : movie_def_impl.cpp Log message: * server/parser/movie_def_impl.cpp (read_all_swf): Don't discard anything past the last SHOWFRAME, as Ming seems to still put EXPORTASSETS after it (possibly bogus, but we want to accept it). CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2193&r2=1.2194 http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/movie_def_impl.cpp?cvsroot=gnash&r1=1.57&r2=1.58 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2193 retrieving revision 1.2194 diff -u -b -r1.2193 -r1.2194 --- ChangeLog 30 Jan 2007 09:58:05 -0000 1.2193 +++ ChangeLog 30 Jan 2007 10:25:21 -0000 1.2194 @@ -1,3 +1,10 @@ +2007-01-30 Sandro Santilli + + * server/parser/movie_def_impl.cpp (read_all_swf): + Don't discard anything past the last SHOWFRAME, + as Ming seems to still put EXPORTASSETS after it + (possibly bogus, but we want to accept it). + 2007-01-30 Tomas Groth Christensen * server/asobj/NetStreamGst.cpp: Fixed wrong return type. Index: server/parser/movie_def_impl.cpp =================================================================== RCS file: /sources/gnash/gnash/server/parser/movie_def_impl.cpp,v retrieving revision 1.57 retrieving revision 1.58 diff -u -b -r1.57 -r1.58 --- server/parser/movie_def_impl.cpp 29 Jan 2007 18:35:59 -0000 1.57 +++ server/parser/movie_def_impl.cpp 30 Jan 2007 10:25:21 -0000 1.58 @@ -836,6 +836,8 @@ SWF::tag_type tag_type = str.open_tag(); +parse_tag: + if (s_progress_function != NULL) { s_progress_function((uint32_t)str.get_position(), @@ -856,20 +858,17 @@ if ( _frames_loaded == m_frame_count ) { str.close_tag(); - if ( str.open_tag() != SWF::END ) + tag_type = str.open_tag(); + if ( tag_type != SWF::END ) { IF_VERBOSE_MALFORMED_SWF( log_swferror("last expected SHOWFRAME " - "in SWF stream " - "isn't followed by an END. " - "Discarding the rest."); + "in SWF stream '%s' isn't " + "followed by an END (%d).", + get_url().c_str(), tag_type); ); } - // WARNING: might not match with SWF size - // advertised in header - setBytesLoaded(str.get_position()); - str.close_tag(); - break; + goto parse_tag; } } From MAILER-DAEMON Tue Jan 30 05:52:26 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HBqbB-0005pI-JJ for mharc-gnash-commit@gnu.org; Tue, 30 Jan 2007 05:52:26 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HBqb6-0005ni-N4 for gnash-commit@gnu.org; Tue, 30 Jan 2007 05:52:21 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HBqb5-0005nD-7e for gnash-commit@gnu.org; Tue, 30 Jan 2007 05:52:19 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HBqb4-0005mr-03 for gnash-commit@gnu.org; Tue, 30 Jan 2007 05:52:18 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HBqb3-000194-Fu for gnash-commit@gnu.org; Tue, 30 Jan 2007 05:52:17 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HBqb2-0007bX-CY for gnash-commit@gnu.org; Tue, 30 Jan 2007 10:52:16 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1HBqb2-0007bT-4O for gnash-commit@gnu.org; Tue, 30 Jan 2007 10:52:16 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Tue, 30 Jan 2007 10:52:16 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash ChangeLog server/asobj/NetConnection.cpp ... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jan 2007 10:52:21 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/30 10:52:16 Modified files: . : ChangeLog server/asobj : NetConnection.cpp NetStream.cpp Log message: * server/asobj/: NetConnection.cpp, NetStream.cpp: Cleanups and robustness improvements. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2194&r2=1.2195 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetConnection.cpp?cvsroot=gnash&r1=1.18&r2=1.19 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStream.cpp?cvsroot=gnash&r1=1.23&r2=1.24 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2194 retrieving revision 1.2195 diff -u -b -r1.2194 -r1.2195 --- ChangeLog 30 Jan 2007 10:25:21 -0000 1.2194 +++ ChangeLog 30 Jan 2007 10:52:15 -0000 1.2195 @@ -1,5 +1,7 @@ 2007-01-30 Sandro Santilli + * server/asobj/: NetConnection.cpp, NetStream.cpp: + Cleanups and robustness improvements. * server/parser/movie_def_impl.cpp (read_all_swf): Don't discard anything past the last SHOWFRAME, as Ming seems to still put EXPORTASSETS after it Index: server/asobj/NetConnection.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/NetConnection.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -u -b -r1.18 -r1.19 --- server/asobj/NetConnection.cpp 27 Jan 2007 16:55:05 -0000 1.18 +++ server/asobj/NetConnection.cpp 30 Jan 2007 10:52:15 -0000 1.19 @@ -14,7 +14,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -/* $Id: NetConnection.cpp,v 1.18 2007/01/27 16:55:05 tgc Exp $ */ +/* $Id: NetConnection.cpp,v 1.19 2007/01/30 10:52:15 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -157,7 +157,18 @@ } } -NetConnection::NetConnection() { +NetConnection::NetConnection() + : + _cache(NULL), + _cachefd(0), + _url(), + _handle(NULL), + _mhandle(NULL), + _running(false), + localFile(true), + netStreamObj(NULL), + totalSize(0) +{ } NetConnection::~NetConnection() { @@ -353,6 +364,19 @@ { } +// Wrapper around dynamic_cast to implement user warning. +// To be used by builtin properties and methods. +static netconnection_as_object* +ensure_netconnection(as_object* obj) +{ + netconnection_as_object* ret = dynamic_cast(obj); + if ( ! ret ) + { + throw ActionException("builtin method or gettersetter for NetConnection objects called against non-NetConnection instance"); + } + return ret; +} + /// \brief callback to instantiate a new NetConnection object. /// \param fn the parameters from the Flash movie @@ -374,11 +398,10 @@ GNASH_REPORT_FUNCTION; string filespec; - netconnection_as_object *ptr = (netconnection_as_object*)fn.this_ptr; + netconnection_as_object *ptr = ensure_netconnection(fn.this_ptr); - assert(ptr); - if (fn.nargs != 0) { - ptr->obj.addToURL(fn.env->bottom(fn.first_arg_bottom_index).to_string()); + if (fn.nargs > 0) { + ptr->obj.addToURL(fn.arg(0).to_string()); } } Index: server/asobj/NetStream.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/NetStream.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -u -b -r1.23 -r1.24 --- server/asobj/NetStream.cpp 23 Jan 2007 16:41:27 -0000 1.23 +++ server/asobj/NetStream.cpp 30 Jan 2007 10:52:15 -0000 1.24 @@ -18,7 +18,7 @@ // // -/* $Id: NetStream.cpp,v 1.23 2007/01/23 16:41:27 tgc Exp $ */ +/* $Id: NetStream.cpp,v 1.24 2007/01/30 10:52:15 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -28,6 +28,7 @@ #include "NetStream.h" #include "fn_call.h" #include "builtin_function.h" +#include "GnashException.h" #include "movie_root.h" @@ -66,7 +67,7 @@ else { IF_VERBOSE_ASCODING_ERRORS( - log_warning("First argument " + log_aserror("First argument " "to NetConnection constructor " "doesn't cast to an Object (%s)", fn.arg(0).to_string()); @@ -77,18 +78,29 @@ } +// Wrapper around dynamic_cast to implement user warning. +// To be used by builtin properties and methods. +static netstream_as_object* +ensure_netstream(as_object* obj) +{ + netstream_as_object* ret = dynamic_cast(obj); + if ( ! ret ) + { + throw ActionException("builtin method or gettersetter for NetStream objects called against non-NetStream instance"); + } + return ret; +} + static void netstream_close(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - netstream_as_object* ns = static_cast(fn.this_ptr); + netstream_as_object* ns = ensure_netstream(fn.this_ptr); ns->obj.close(); } static void netstream_pause(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - netstream_as_object* ns = static_cast(fn.this_ptr); + netstream_as_object* ns = ensure_netstream(fn.this_ptr); // mode: -1 ==> toogle, 0==> pause, 1==> play int mode = -1; @@ -101,12 +113,13 @@ static void netstream_play(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - netstream_as_object* ns = static_cast(fn.this_ptr); + netstream_as_object* ns = ensure_netstream(fn.this_ptr); if (fn.nargs < 1) { - log_error("NetStream play needs args\n"); + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("NetStream play needs args"); + ); return; } @@ -117,8 +130,7 @@ } static void netstream_seek(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - netstream_as_object* ns = static_cast(fn.this_ptr); + netstream_as_object* ns = ensure_netstream(fn.this_ptr); double time = 0; if (fn.nargs > 0) @@ -128,7 +140,9 @@ ns->obj.seek(time); } -static void netstream_setbuffertime(const fn_call& /*fn*/) { +static void netstream_setbuffertime(const fn_call& fn) { + netstream_as_object* ns = ensure_netstream(fn.this_ptr); + UNUSED(ns); log_msg("%s:unimplemented \n", __FUNCTION__); } @@ -137,12 +151,11 @@ netstream_time(const fn_call& fn) { - assert(dynamic_cast(fn.this_ptr)); - netstream_as_object* ns = static_cast(fn.this_ptr); + netstream_as_object* ns = ensure_netstream(fn.this_ptr); if ( fn.nargs == 0 ) { - fn.result->set_double((double)ns->obj.time()); + fn.result->set_double(ns->obj.time()); } else { From MAILER-DAEMON Tue Jan 30 06:05:19 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HBqnf-0001QN-GN for mharc-gnash-commit@gnu.org; Tue, 30 Jan 2007 06:05:19 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HBqnd-0001QI-RT for gnash-commit@gnu.org; Tue, 30 Jan 2007 06:05:17 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HBqnd-0001Q3-5I for gnash-commit@gnu.org; Tue, 30 Jan 2007 06:05:17 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HBqnd-0001Q0-0l for gnash-commit@gnu.org; Tue, 30 Jan 2007 06:05:17 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HBqnc-00031J-Id for gnash-commit@gnu.org; Tue, 30 Jan 2007 06:05:16 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HBqna-0007pR-Gc for gnash-commit@gnu.org; Tue, 30 Jan 2007 11:05:14 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1HBqnZ-0007pN-WE for gnash-commit@gnu.org; Tue, 30 Jan 2007 11:05:14 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Tue, 30 Jan 2007 11:05:13 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash ChangeLog server/parser/movie_def_impl.cpp X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jan 2007 11:05:18 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/30 11:05:13 Modified files: . : ChangeLog server/parser : movie_def_impl.cpp Log message: * server/parser/movie_def_impl.cpp (incrementLoadedFrames): handle malformed SWF containing more SHOWFRAME then expected; (readHeader): allocate more slots for actions to make malformed SWF handling easier. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2195&r2=1.2196 http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/movie_def_impl.cpp?cvsroot=gnash&r1=1.58&r2=1.59 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2195 retrieving revision 1.2196 diff -u -b -r1.2195 -r1.2196 --- ChangeLog 30 Jan 2007 10:52:15 -0000 1.2195 +++ ChangeLog 30 Jan 2007 11:05:13 -0000 1.2196 @@ -1,5 +1,9 @@ 2007-01-30 Sandro Santilli + * server/parser/movie_def_impl.cpp (incrementLoadedFrames): + handle malformed SWF containing more SHOWFRAME then expected; + (readHeader): allocate more slots for actions to make malformed + SWF handling easier. * server/asobj/: NetConnection.cpp, NetStream.cpp: Cleanups and robustness improvements. * server/parser/movie_def_impl.cpp (read_all_swf): Index: server/parser/movie_def_impl.cpp =================================================================== RCS file: /sources/gnash/gnash/server/parser/movie_def_impl.cpp,v retrieving revision 1.58 retrieving revision 1.59 diff -u -b -r1.58 -r1.59 --- server/parser/movie_def_impl.cpp 30 Jan 2007 10:25:21 -0000 1.58 +++ server/parser/movie_def_impl.cpp 30 Jan 2007 11:05:13 -0000 1.59 @@ -481,8 +481,10 @@ // TODO: This seems dangerous, check closely if(m_frame_count == 0) m_frame_count++; - m_playlist.resize(m_frame_count); - m_init_action_list.resize(m_frame_count); + // Allocate 1 more then the expected slots + // for actions, to make handling malformed SWF easier. + m_playlist.resize(m_frame_count+1); + m_init_action_list.resize(m_frame_count+1); IF_VERBOSE_PARSE( m_frame_size.print(); @@ -931,6 +933,20 @@ boost::mutex::scoped_lock lock(_frames_loaded_mutex); ++_frames_loaded; + if ( _frames_loaded > m_frame_count ) + { + IF_VERBOSE_MALFORMED_SWF( + log_swferror("number of SHOWFRAME tags " + "in SWF stream '%s' (" SIZET_FMT + ") exceeds " + "the advertised number in header (" + SIZET_FMT ").", + get_url().c_str(), _frames_loaded, + m_frame_count); + ); + m_playlist.resize(_frames_loaded+1); + m_init_action_list.resize(_frames_loaded+1); + } #ifdef DEBUG_FRAMES_LOAD log_msg("Loaded frame %u/%u", From MAILER-DAEMON Tue Jan 30 07:49:13 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HBsQC-0005Lr-S8 for mharc-gnash-commit@gnu.org; Tue, 30 Jan 2007 07:49:12 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HBsQA-0005LC-96 for gnash-commit@gnu.org; Tue, 30 Jan 2007 07:49:10 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HBsQ7-0005Ky-D1 for gnash-commit@gnu.org; Tue, 30 Jan 2007 07:49:08 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HBsQ7-0005Kt-7k for gnash-commit@gnu.org; Tue, 30 Jan 2007 07:49:07 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HBsQ6-00066N-Fe for gnash-commit@gnu.org; Tue, 30 Jan 2007 07:49:06 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HBsQ4-000466-TQ for gnash-commit@gnu.org; Tue, 30 Jan 2007 12:49:05 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1HBsQ4-00045x-83 for gnash-commit@gnu.org; Tue, 30 Jan 2007 12:49:04 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Tue, 30 Jan 2007 12:49:04 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash ChangeLog server/video_stream_instance.cp... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jan 2007 12:49:11 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/30 12:49:03 Modified files: . : ChangeLog server : video_stream_instance.cpp video_stream_instance.h server/asobj : NetConnection.cpp NetConnection.h NetStream.cpp NetStream.h NetStreamFfmpeg.cpp NetStreamFfmpeg.h NetStreamGst.cpp NetStreamGst.h Log message: * server/: video_stream_instance.{h,cpp}, server/asobj/: NetConnection.cpp, NetConnection.h, NetStream.cpp, NetStream.h, NetStreamFfmpeg.cpp, NetStreamFfmpeg.h, NetStreamGst.cpp, NetStreamGst.h: Refactored NetStream inheritance model, got rid of netstream_as_object and netconnection_as_object wrappers. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2196&r2=1.2197 http://cvs.savannah.gnu.org/viewcvs/gnash/server/video_stream_instance.cpp?cvsroot=gnash&r1=1.6&r2=1.7 http://cvs.savannah.gnu.org/viewcvs/gnash/server/video_stream_instance.h?cvsroot=gnash&r1=1.5&r2=1.6 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetConnection.cpp?cvsroot=gnash&r1=1.19&r2=1.20 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetConnection.h?cvsroot=gnash&r1=1.14&r2=1.15 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStream.cpp?cvsroot=gnash&r1=1.24&r2=1.25 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStream.h?cvsroot=gnash&r1=1.19&r2=1.20 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStreamFfmpeg.cpp?cvsroot=gnash&r1=1.10&r2=1.11 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStreamFfmpeg.h?cvsroot=gnash&r1=1.6&r2=1.7 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStreamGst.cpp?cvsroot=gnash&r1=1.8&r2=1.9 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStreamGst.h?cvsroot=gnash&r1=1.5&r2=1.6 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2196 retrieving revision 1.2197 diff -u -b -r1.2196 -r1.2197 --- ChangeLog 30 Jan 2007 11:05:13 -0000 1.2196 +++ ChangeLog 30 Jan 2007 12:49:03 -0000 1.2197 @@ -1,5 +1,14 @@ 2007-01-30 Sandro Santilli + * server/: video_stream_instance.{h,cpp}, + server/asobj/: NetConnection.cpp, NetConnection.h, NetStream.cpp, + NetStream.h, NetStreamFfmpeg.cpp, NetStreamFfmpeg.h, NetStreamGst.cpp, + NetStreamGst.h: + Refactored NetStream inheritance model, got rid of + netstream_as_object and netconnection_as_object wrappers. + +2007-01-30 Sandro Santilli + * server/parser/movie_def_impl.cpp (incrementLoadedFrames): handle malformed SWF containing more SHOWFRAME then expected; (readHeader): allocate more slots for actions to make malformed Index: server/video_stream_instance.cpp =================================================================== RCS file: /sources/gnash/gnash/server/video_stream_instance.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -b -r1.6 -r1.7 --- server/video_stream_instance.cpp 18 Jan 2007 22:53:21 -0000 1.6 +++ server/video_stream_instance.cpp 30 Jan 2007 12:49:03 -0000 1.7 @@ -16,14 +16,16 @@ if (fn.nargs != 1) { - log_error("attachVideo needs 1 arg\n"); + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("attachVideo needs 1 arg"); + ); return; } -// if (dynamic_cast(fn.arg(0).to_object())) - if (video) + NetStream* ns = dynamic_cast(fn.arg(0).to_object()); + if (ns) { - video->m_ns = static_cast(fn.arg(0).to_object()); + video->setStream(ns); } } @@ -33,7 +35,7 @@ character(parent, id), m_def(def), m_video_source(NULL), - m_ns(NULL) + _ns(NULL) // m_source(NULL) { assert(m_def); @@ -48,16 +50,16 @@ void video_stream_instance::display() { - if (m_ns) + if (_ns) { matrix m = get_world_matrix(); rect bounds(0.0f, 0.0f, PIXELS_TO_TWIPS(m_def->m_width), PIXELS_TO_TWIPS(m_def->m_height)); - netstream_as_object* nso = static_cast(m_ns); + NetStream* nso = _ns; - if (nso->obj.playing()) + if (nso->playing()) { - image::image_base* i = nso->obj.get_video(); + image::image_base* i = nso->get_video(); if (i) { gnash::render::drawVideoFrame(i, &m, &bounds); Index: server/video_stream_instance.h =================================================================== RCS file: /sources/gnash/gnash/server/video_stream_instance.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -b -r1.5 -r1.6 --- server/video_stream_instance.h 18 Jan 2007 22:53:21 -0000 1.5 +++ server/video_stream_instance.h 30 Jan 2007 12:49:03 -0000 1.6 @@ -4,6 +4,11 @@ #include "character.h" // for inheritance #include "video_stream_def.h" +// Forward declarations +namespace gnash { + class NetStream; +} + namespace gnash { class video_stream_instance : public character @@ -11,11 +16,11 @@ public: -// const as_object* m_source; video_stream_definition* m_def; // m_video_source - A Camera object that is capturing video data or a NetStream object. // To drop the connection to the Video object, pass null for source. + // FIXME: don't use as_object, but a more meaningful type as_object* m_video_source; video_stream_instance(video_stream_definition* def, @@ -28,16 +33,16 @@ void get_invalidated_bounds(rect* bounds, bool force); -// void set_source(const as_object* source) -// { -// m_source = source; -// } - - // - // ActionScript overrides - // + /// Set the input stream for this video + void setStream(NetStream* ns) + { + _ns = ns; + } + +private: - as_object* m_ns; + // Who owns this ? Should it be an intrusive ptr ? + NetStream* _ns; }; Index: server/asobj/NetConnection.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/NetConnection.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -u -b -r1.19 -r1.20 --- server/asobj/NetConnection.cpp 30 Jan 2007 10:52:15 -0000 1.19 +++ server/asobj/NetConnection.cpp 30 Jan 2007 12:49:03 -0000 1.20 @@ -14,7 +14,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -/* $Id: NetConnection.cpp,v 1.19 2007/01/30 10:52:15 strk Exp $ */ +/* $Id: NetConnection.cpp,v 1.20 2007/01/30 12:49:03 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -159,6 +159,7 @@ } NetConnection::NetConnection() : + as_object(getNetConnectionInterface()), _cache(NULL), _cachefd(0), _url(), @@ -187,7 +188,7 @@ /// RTMP. Newer Flash movies have a parameter to connect which is a /// URL string like rtmp://foobar.com/videos/bar.flv /*public*/ -bool NetConnection::openConnection(const char* char_url, as_object* ns) +bool NetConnection::openConnection(const char* char_url, NetStream* ns) { netStreamObj = ns; if (_url.size() > 0) { @@ -354,22 +355,12 @@ -netconnection_as_object::netconnection_as_object() - : - as_object(getNetConnectionInterface()) -{ -} - -netconnection_as_object::~netconnection_as_object() -{ -} - // Wrapper around dynamic_cast to implement user warning. // To be used by builtin properties and methods. -static netconnection_as_object* +static NetConnection* ensure_netconnection(as_object* obj) { - netconnection_as_object* ret = dynamic_cast(obj); + NetConnection* ret = dynamic_cast(obj); if ( ! ret ) { throw ActionException("builtin method or gettersetter for NetConnection objects called against non-NetConnection instance"); @@ -387,7 +378,7 @@ { GNASH_REPORT_FUNCTION; - netconnection_as_object *netconnection_obj = new netconnection_as_object; + NetConnection *netconnection_obj = new NetConnection; fn.result->set_as_object(netconnection_obj); } @@ -397,11 +388,10 @@ { GNASH_REPORT_FUNCTION; - string filespec; - netconnection_as_object *ptr = ensure_netconnection(fn.this_ptr); + NetConnection *ptr = ensure_netconnection(fn.this_ptr); if (fn.nargs > 0) { - ptr->obj.addToURL(fn.arg(0).to_string()); + ptr->addToURL(fn.arg(0).to_string()); } } Index: server/asobj/NetConnection.h =================================================================== RCS file: /sources/gnash/gnash/server/asobj/NetConnection.h,v retrieving revision 1.14 retrieving revision 1.15 diff -u -b -r1.14 -r1.15 --- server/asobj/NetConnection.h 27 Jan 2007 16:55:05 -0000 1.14 +++ server/asobj/NetConnection.h 30 Jan 2007 12:49:03 -0000 1.15 @@ -14,7 +14,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -/* $Id: NetConnection.h,v 1.14 2007/01/27 16:55:05 tgc Exp $ */ +/* $Id: NetConnection.h,v 1.15 2007/01/30 12:49:03 strk Exp $ */ #ifndef __NETCONNECTION_H__ #define __NETCONNECTION_H__ @@ -39,16 +39,21 @@ #include "as_object.h" // for inheritance #include "fn_call.h" +// Forward declarations namespace gnash { -#ifdef HAVE_CURL_CURL_H -class NetConnection { + class NetStream; +} + +namespace gnash { + +class NetConnection: public as_object { public: NetConnection(); ~NetConnection(); /// Opens the connection to char_url - bool openConnection(const char* char_url, as_object* ns); + bool openConnection(const char* char_url, NetStream* ns); /// Put read pointer at given position bool seek(size_t pos); @@ -107,7 +112,8 @@ bool localFile; // The NetStream object which handles the video playback - as_object* netStreamObj; + // Watch out for circular dependencies, see NetStream.h + NetStream* netStreamObj; // Total filesize double totalSize; @@ -119,27 +125,6 @@ }; -#else -class NetConnection { -public: - NetConnection() {} - ~NetConnection() {} - bool openConnection(const char* /*char_url*/, as_object* /*ns*/) { return false; } - bool seek(size_t /*pos*/) { return 0; } - size_t read(void* /*dst*/, size_t /*bytes*/) { return false; } - void addToURL(const char* /*url*/) {} -}; - -#endif // HAVE_CURL_CURL_H - -class netconnection_as_object : public as_object -{ -public: - netconnection_as_object(); - ~netconnection_as_object(); - NetConnection obj; -}; - void netconnection_class_init(as_object& global); } // end of gnash namespace Index: server/asobj/NetStream.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/NetStream.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -u -b -r1.24 -r1.25 --- server/asobj/NetStream.cpp 30 Jan 2007 10:52:15 -0000 1.24 +++ server/asobj/NetStream.cpp 30 Jan 2007 12:49:03 -0000 1.25 @@ -18,17 +18,23 @@ // // -/* $Id: NetStream.cpp,v 1.24 2007/01/30 10:52:15 strk Exp $ */ +/* $Id: NetStream.cpp,v 1.25 2007/01/30 12:49:03 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "log.h" +#ifdef SOUND_GST +# include "NetStreamGst.h" +#elif defined(USE_FFMPEG) +# include "NetStreamFfmpeg.h" +#endif #include "NetStream.h" #include "fn_call.h" #include "builtin_function.h" #include "GnashException.h" +#include "NetConnection.h" #include "movie_root.h" @@ -43,14 +49,11 @@ static void netstream_time(const fn_call& fn); static as_object* getNetStreamInterface(); -netstream_as_object::netstream_as_object() +NetStream::NetStream() : - as_object(getNetStreamInterface()) -{ - obj.set_parent(this); -} - -netstream_as_object::~netstream_as_object() + as_object(getNetStreamInterface()), + _parent(NULL), + _netCon(NULL) { } @@ -58,18 +61,30 @@ netstream_new(const fn_call& fn) { - netstream_as_object *netstream_obj = new netstream_as_object; + NetStream *netstream_obj; + +#ifdef SOUND_GST + netstream_obj = new NetStreamGst(); +#elif defined(USE_FFMPEG) + netstream_obj = new NetStreamFfmpeg(); +#else + netstream_obj = new NetStream(); +#endif + if (fn.nargs > 0) { - as_object* nc = fn.arg(0).to_object(); - if ( nc ) netstream_obj->obj.setNetCon(nc); + NetConnection* ns = dynamic_cast(fn.arg(0).to_object()); + if ( ns ) + { + netstream_obj->setNetCon(ns); + } else { IF_VERBOSE_ASCODING_ERRORS( log_aserror("First argument " - "to NetConnection constructor " - "doesn't cast to an Object (%s)", + "to NetStream constructor " + "doesn't cast to a NetConnection (%s)", fn.arg(0).to_string()); ); } @@ -80,10 +95,10 @@ // Wrapper around dynamic_cast to implement user warning. // To be used by builtin properties and methods. -static netstream_as_object* +static NetStream* ensure_netstream(as_object* obj) { - netstream_as_object* ret = dynamic_cast(obj); + NetStream* ret = dynamic_cast(obj); if ( ! ret ) { throw ActionException("builtin method or gettersetter for NetStream objects called against non-NetStream instance"); @@ -94,13 +109,13 @@ static void netstream_close(const fn_call& fn) { - netstream_as_object* ns = ensure_netstream(fn.this_ptr); - ns->obj.close(); + NetStream* ns = ensure_netstream(fn.this_ptr); + ns->close(); } static void netstream_pause(const fn_call& fn) { - netstream_as_object* ns = ensure_netstream(fn.this_ptr); + NetStream* ns = ensure_netstream(fn.this_ptr); // mode: -1 ==> toogle, 0==> pause, 1==> play int mode = -1; @@ -108,12 +123,12 @@ { mode = fn.arg(0).to_bool() ? 0 : 1; } - ns->obj.pause(mode); // toggle mode + ns->pause(mode); // toggle mode } static void netstream_play(const fn_call& fn) { - netstream_as_object* ns = ensure_netstream(fn.this_ptr); + NetStream* ns = ensure_netstream(fn.this_ptr); if (fn.nargs < 1) { @@ -123,25 +138,25 @@ return; } - if (ns->obj.play(fn.arg(0).to_string()) != 0) + if (ns->play(fn.arg(0).to_string()) != 0) { - ns->obj.close(); + ns->close(); }; } static void netstream_seek(const fn_call& fn) { - netstream_as_object* ns = ensure_netstream(fn.this_ptr); + NetStream* ns = ensure_netstream(fn.this_ptr); double time = 0; if (fn.nargs > 0) { time = fn.arg(0).to_number(); } - ns->obj.seek(time); + ns->seek(time); } static void netstream_setbuffertime(const fn_call& fn) { - netstream_as_object* ns = ensure_netstream(fn.this_ptr); + NetStream* ns = ensure_netstream(fn.this_ptr); UNUSED(ns); log_msg("%s:unimplemented \n", __FUNCTION__); } @@ -151,11 +166,11 @@ netstream_time(const fn_call& fn) { - netstream_as_object* ns = ensure_netstream(fn.this_ptr); + NetStream* ns = ensure_netstream(fn.this_ptr); if ( fn.nargs == 0 ) { - fn.result->set_double(ns->obj.time()); + fn.result->set_double(ns->time()); } else { @@ -219,5 +234,6 @@ global.init_member("NetStream", cl.get()); } + } // end of gnash namespace Index: server/asobj/NetStream.h =================================================================== RCS file: /sources/gnash/gnash/server/asobj/NetStream.h,v retrieving revision 1.19 retrieving revision 1.20 diff -u -b -r1.19 -r1.20 --- server/asobj/NetStream.h 23 Jan 2007 21:37:16 -0000 1.19 +++ server/asobj/NetStream.h 30 Jan 2007 12:49:03 -0000 1.20 @@ -18,7 +18,7 @@ // // -/* $Id: NetStream.h,v 1.19 2007/01/23 21:37:16 tgc Exp $ */ +/* $Id: NetStream.h,v 1.20 2007/01/30 12:49:03 strk Exp $ */ #ifndef __NETSTREAM_H__ #define __NETSTREAM_H__ @@ -31,61 +31,65 @@ #include #include "impl.h" #include "video_stream_instance.h" -#include "NetStreamFfmpeg.h" -#include "NetStreamGst.h" +// Forward declarations namespace gnash { + class NetConnection; +} -class netstream_as_object; +namespace gnash { -class NetStreamBase { -public: - NetStreamBase(){} - ~NetStreamBase(){} - void close(){} - void pause(int /*mode*/){} - int play(const char* /*source*/){ log_error("FFMPEG or Gstreamer is needed to play video"); return 0; } - void seek(double /*pos*/){} - void setBufferTime(unsigned int /*pos*/){} - void set_status(const char* /*code*/){} - void setNetCon(as_object* /*nc*/) {} - image::image_base* get_video(){ return NULL; } - int64_t time() { return 0; } - inline void set_parent(netstream_as_object* /*ns*/) - { - } +class NetStream : public as_object { - inline bool playing() - { - return false; - } +protected: -}; + // Watch out for circular dependencies, see NetStream.h + NetStream* _parent; + + NetConnection* _netCon; -#ifdef SOUND_GST -class NetStream : public NetStreamGst { -#elif defined(USE_FFMPEG) -class NetStream : public NetStreamFfmpeg { -#else -class NetStream : public NetStreamBase { -#endif public: -}; + NetStream(); + + virtual ~NetStream(){} + + virtual void close(){} + + virtual void pause(int /*mode*/){} -class netstream_as_object : public as_object -{ - public: + virtual int play(const char* /*source*/){ log_error("FFMPEG or Gstreamer is needed to play video"); return 0; } - netstream_as_object(); + virtual void seek(double /*pos*/){} - ~netstream_as_object(); + virtual void setBufferTime(unsigned int /*pos*/){} - NetStream obj; + virtual void set_status(const char* /*code*/){} + + virtual void setNetCon(NetConnection* nc) + { + _netCon = nc; + } + + virtual image::image_base* get_video(){ return NULL; } + + virtual int64_t time() { return 0; } + + /// What is supposed to happens if ns is NULL ? + void set_parent(NetStream* ns) + { + _parent = ns; + } + + virtual bool playing() + { + return false; + } }; + // Initialize the global NetStream class void netstream_class_init(as_object& global); Index: server/asobj/NetStreamFfmpeg.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/NetStreamFfmpeg.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -b -r1.10 -r1.11 --- server/asobj/NetStreamFfmpeg.cpp 27 Jan 2007 16:55:05 -0000 1.10 +++ server/asobj/NetStreamFfmpeg.cpp 30 Jan 2007 12:49:03 -0000 1.11 @@ -14,7 +14,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -/* $Id: NetStreamFfmpeg.cpp,v 1.10 2007/01/27 16:55:05 tgc Exp $ */ +/* $Id: NetStreamFfmpeg.cpp,v 1.11 2007/01/30 12:49:03 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -71,7 +71,7 @@ // called from avstreamer thread void NetStreamFfmpeg::set_status(const char* /*code*/) { - if (m_netstream_object) + if (_parent) { //m_netstream_object->init_member("onStatus_Code", code); //push_video_event(m_netstream_object); @@ -150,12 +150,13 @@ // ffmpeg callback function int -NetStreamFfmpeg::readPacket(void* opaque, uint8_t* buf, int buf_size){ +NetStreamFfmpeg::readPacket(void* opaque, uint8_t* buf, int buf_size) +{ NetStreamFfmpeg* ns = static_cast(opaque); + NetConnection* nc = ns->_netCon; - netconnection_as_object* nc = static_cast(ns->netCon); - size_t ret = nc->obj.read(static_cast(buf), buf_size); + size_t ret = nc->read(static_cast(buf), buf_size); ns->inputPos += ret; return ret; @@ -166,24 +167,24 @@ NetStreamFfmpeg::seekMedia(void *opaque, offset_t offset, int whence){ NetStreamFfmpeg* ns = static_cast(opaque); - netconnection_as_object* nc = static_cast(ns->netCon); + NetConnection* nc = ns->_netCon; // Offset is absolute new position in the file if (whence == SEEK_SET) { - nc->obj.seek(offset); + nc->seek(offset); ns->inputPos = offset; // New position is offset + old position } else if (whence == SEEK_CUR) { - nc->obj.seek(ns->inputPos + offset); + nc->seek(ns->inputPos + offset); ns->inputPos = ns->inputPos + offset; // // New position is offset + end of file } else if (whence == SEEK_END) { // This is (most likely) a streamed file, so we can't seek to the end! // Instead we seek to 50.000 bytes... seems to work fine... - nc->obj.seek(50000); + nc->seek(50000); ns->inputPos = 50000; } @@ -202,6 +203,15 @@ return 0; } + // Does it have an associated NetConnectoin ? + if ( ! _netCon ) + { + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("No NetConnection associated with this NetStream, won't play"); + ); + return 0; + } + url += c_url; // Remove any "mp3:" prefix. Maybe should use this to mark as audio-only if (url.compare(0, 4, std::string("mp3:")) == 0) { @@ -224,10 +234,12 @@ NetStreamFfmpeg::startPlayback(NetStreamFfmpeg* ns) { - netconnection_as_object* nc = static_cast(ns->netCon); + NetConnection* nc = ns->_netCon; + assert(nc); // Pass stuff from/to the NetConnection object. - if (!nc->obj.openConnection(ns->url.c_str(), ns->m_netstream_object)) { + assert(ns); // ns->_parent is ok being NULL + if ( !nc->openConnection(ns->url.c_str(), ns->_parent) ) { log_warning("Gnash could not open movie url: %s", ns->url.c_str()); return; } @@ -252,7 +264,7 @@ AVInputFormat* inputFmt = av_probe_input_format(pd, 1); // After the format probe, reset to the beginning of the file. - nc->obj.seek(0); + nc->seek(0); // Setup the filereader/seeker mechanism. 7th argument (NULL) is the writer function, // which isn't needed. @@ -283,7 +295,8 @@ // Find the first video & audio stream ns->m_video_index = -1; ns->m_audio_index = -1; - for (unsigned int i = 0; i < ns->m_FormatCtx->nb_streams; i++) + assert(ns->m_FormatCtx->nb_streams >= 0); + for (int i = 0; i < ns->m_FormatCtx->nb_streams; i++) { AVCodecContext* enc = ns->m_FormatCtx->streams[i]->codec; @@ -379,11 +392,6 @@ return; } -void -NetStreamFfmpeg::setNetCon(as_object* nc){ - netCon = nc; -} - // decoder thread void NetStreamFfmpeg::av_streamer(NetStreamFfmpeg* ns) { Index: server/asobj/NetStreamFfmpeg.h =================================================================== RCS file: /sources/gnash/gnash/server/asobj/NetStreamFfmpeg.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -b -r1.6 -r1.7 --- server/asobj/NetStreamFfmpeg.h 27 Jan 2007 16:55:05 -0000 1.6 +++ server/asobj/NetStreamFfmpeg.h 30 Jan 2007 12:49:03 -0000 1.7 @@ -14,7 +14,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -/* $Id: NetStreamFfmpeg.h,v 1.6 2007/01/27 16:55:05 tgc Exp $ */ +/* $Id: NetStreamFfmpeg.h,v 1.7 2007/01/30 12:49:03 strk Exp $ */ #ifndef __NETSTREAMFFMPEG_H__ #define __NETSTREAMFFMPEG_H__ @@ -36,6 +36,7 @@ #include #include "image.h" #include "StreamProvider.h" +#include "NetStream.h" // for inheritance namespace gnash { @@ -148,9 +149,7 @@ std::queue < T > m_queue; }; -class netstream_as_object; - -class NetStreamFfmpeg { +class NetStreamFfmpeg: public NetStream { public: NetStreamFfmpeg(); ~NetStreamFfmpeg(); @@ -171,16 +170,11 @@ image::image_base* get_video(); - inline bool playing() + bool playing() { return m_go; } - inline void set_parent(netstream_as_object* ns) - { - m_netstream_object = ns; - } - inline double as_double(AVRational time) { return time.num / (double) time.den; @@ -234,10 +228,8 @@ multithread_queue m_qvideo; bool m_pause; double m_start_clock; - netstream_as_object* m_netstream_object; raw_videodata_t* m_unqueued_data; - as_object* netCon; ByteIOContext ByteIOCxt; tu_file* input; long inputPos; Index: server/asobj/NetStreamGst.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/NetStreamGst.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -b -r1.8 -r1.9 --- server/asobj/NetStreamGst.cpp 30 Jan 2007 09:58:05 -0000 1.8 +++ server/asobj/NetStreamGst.cpp 30 Jan 2007 12:49:03 -0000 1.9 @@ -69,7 +69,7 @@ // called from avstreamer thread void NetStreamGst::set_status(const char* /*code*/) { - if (m_netstream_object) + if (_parent) { //m_netstream_object->init_member("onStatus_Code", code); //push_video_event(m_netstream_object); @@ -240,10 +240,11 @@ NetStreamGst::startPlayback(void* arg) { NetStreamGst* ns = static_cast(arg); - netconnection_as_object* nc = static_cast(ns->netCon); + NetConnection* nc = ns->_netCon; // Pass stuff from/to the NetConnection object. - if (!nc->obj.openConnection(ns->url.c_str(), ns->m_netstream_object)) { + assert(ns); // ns->_parent being null seems ok + if ( !nc->openConnection(ns->url.c_str(), ns->_parent) ) { log_warning("Gnash could not open movie url: %s", ns->url.c_str()); return 0; } @@ -337,11 +338,6 @@ return 0; } -void -NetStreamGst::setNetCon(as_object* nc){ - netCon = nc; -} - image::image_base* NetStreamGst::get_video() { return m_imageframe; @@ -390,8 +386,8 @@ NetStreamGst* ns = static_cast(opaque); - netconnection_as_object* nc = static_cast(ns->netCon); - size_t ret = nc->obj.read(static_cast(buf), buf_size); + NetConnection* nc = ns->_netCon; + size_t ret = nc->read(static_cast(buf), buf_size); ns->inputPos += ret; return ret; @@ -403,19 +399,19 @@ NetStreamGst::seekMedia(void *opaque, int offset, int whence){ NetStreamGst* ns = static_cast(opaque); - netconnection_as_object* nc = static_cast(ns->netCon); + NetConnection* nc = ns->_netCon; bool ret; // Offset is absolute new position in the file if (whence == SEEK_SET) { - ret = nc->obj.seek(offset); + ret = nc->seek(offset); if (!ret) return -1; ns->inputPos = offset; // New position is offset + old position } else if (whence == SEEK_CUR) { - ret = nc->obj.seek(ns->inputPos + offset); + ret = nc->seek(ns->inputPos + offset); if (!ret) return -1; ns->inputPos = ns->inputPos + offset; @@ -423,7 +419,7 @@ } else if (whence == SEEK_END) { // This is (most likely) a streamed file, so we can't seek to the end! // Instead we seek to 50.000 bytes... seems to work fine... - ret = nc->obj.seek(50000); + ret = nc->seek(50000); ns->inputPos = 50000; } return ns->inputPos; Index: server/asobj/NetStreamGst.h =================================================================== RCS file: /sources/gnash/gnash/server/asobj/NetStreamGst.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -b -r1.5 -r1.6 --- server/asobj/NetStreamGst.h 23 Jan 2007 21:37:16 -0000 1.5 +++ server/asobj/NetStreamGst.h 30 Jan 2007 12:49:03 -0000 1.6 @@ -30,12 +30,11 @@ #include "video_stream_instance.h" #include #include "image.h" +#include "NetStream.h" // for inheritance namespace gnash { -class netstream_as_object; - -class NetStreamGst { +class NetStreamGst: public NetStream { public: NetStreamGst(); ~NetStreamGst(); @@ -59,11 +58,6 @@ return m_go; } - inline void set_parent(netstream_as_object* ns) - { - m_netstream_object = ns; - } - static void* startPlayback(void* arg); static void callback_output (GstElement* /*c*/, GstBuffer *buffer, GstPad* /*pad*/, gpointer user_data); static void callback_newpad (GstElement *decodebin, GstPad *pad, gboolean last, gpointer data); @@ -96,9 +90,7 @@ pthread_t startThread; bool m_pause; - netstream_as_object* m_netstream_object; - as_object* netCon; long inputPos; std::string url; From MAILER-DAEMON Tue Jan 30 12:41:21 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HBwyv-0000Mg-QR for mharc-gnash-commit@gnu.org; Tue, 30 Jan 2007 12:41:21 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HBwyu-0000M1-2M for gnash-commit@gnu.org; Tue, 30 Jan 2007 12:41:20 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HBwys-0000LH-La for gnash-commit@gnu.org; Tue, 30 Jan 2007 12:41:19 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HBwys-0000LB-CR for gnash-commit@gnu.org; Tue, 30 Jan 2007 12:41:18 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HBwys-0000ah-35 for gnash-commit@gnu.org; Tue, 30 Jan 2007 12:41:18 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HBwyr-000857-I3 for gnash-commit@gnu.org; Tue, 30 Jan 2007 17:41:17 +0000 Received: from martinwguy by savannah.gnu.org with local (Exim 4.50) id 1HBwyr-000854-CS for gnash-commit@gnu.org; Tue, 30 Jan 2007 17:41:17 +0000 To: gnash-commit@gnu.org Message-Id: From: Martin Guy Date: Tue, 30 Jan 2007 17:41:17 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash ChangeLog configure.ac X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jan 2007 17:41:20 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Martin Guy 07/01/30 17:41:17 Modified files: . : ChangeLog configure.ac Log message: Fix message about Debian packages required for boost CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2197&r2=1.2198 http://cvs.savannah.gnu.org/viewcvs/gnash/configure.ac?cvsroot=gnash&r1=1.243&r2=1.244 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2197 retrieving revision 1.2198 diff -u -b -r1.2197 -r1.2198 --- ChangeLog 30 Jan 2007 12:49:03 -0000 1.2197 +++ ChangeLog 30 Jan 2007 17:41:16 -0000 1.2198 @@ -1,3 +1,7 @@ +2007-01-25 Martin Guy + + * configure.ac: Fix message about Debian packages required for boost + 2007-01-30 Sandro Santilli * server/: video_stream_instance.{h,cpp}, Index: configure.ac =================================================================== RCS file: /sources/gnash/gnash/configure.ac,v retrieving revision 1.243 retrieving revision 1.244 diff -u -b -r1.243 -r1.244 --- configure.ac 29 Jan 2007 23:26:01 -0000 1.243 +++ configure.ac 30 Jan 2007 17:41:17 -0000 1.244 @@ -15,7 +15,7 @@ dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA dnl -dnl $Id: configure.ac,v 1.243 2007/01/29 23:26:01 martinwguy Exp $ +dnl $Id: configure.ac,v 1.244 2007/01/30 17:41:17 martinwguy Exp $ AC_PREREQ(2.50) AC_INIT(gnash, cvs) @@ -1307,8 +1307,8 @@ else echo "ERROR: No BOOST development package installed!\ You need to have the BOOST development package installed\ - to compile, or install libboost-thread1.33.1-dev\ - and libboost-dev (using apt-get) or boost-devel (using yum)." + to compile, or install libboost-thread-dev (using apt-get)\ + or boost-devel (using yum)." nogo=true fi From MAILER-DAEMON Tue Jan 30 13:29:46 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HBxjm-0007dT-KR for mharc-gnash-commit@gnu.org; Tue, 30 Jan 2007 13:29:46 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HBxjl-0007dN-4E for gnash-commit@gnu.org; Tue, 30 Jan 2007 13:29:45 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HBxjj-0007dB-5P for gnash-commit@gnu.org; Tue, 30 Jan 2007 13:29:43 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HBxji-0007d8-V6 for gnash-commit@gnu.org; Tue, 30 Jan 2007 13:29:43 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HBxji-0001u9-CS for gnash-commit@gnu.org; Tue, 30 Jan 2007 13:29:42 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HBxjh-0002VK-55 for gnash-commit@gnu.org; Tue, 30 Jan 2007 18:29:41 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1HBxjg-0002VF-Pj for gnash-commit@gnu.org; Tue, 30 Jan 2007 18:29:41 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Tue, 30 Jan 2007 18:29:40 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash ChangeLog server/character.cpp server/cha... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jan 2007 18:29:45 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/30 18:29:40 Modified files: . : ChangeLog server : character.cpp character.h sprite_instance.cpp Log message: * server/: character.{h,cpp}, sprite_instance.cpp: Made generic gettersetter definitions statics in the 'character' class. Ready for reuse in button instances and whichever other ActionScript class associated with a character (_x,_y,_width...). CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2198&r2=1.2199 http://cvs.savannah.gnu.org/viewcvs/gnash/server/character.cpp?cvsroot=gnash&r1=1.15&r2=1.16 http://cvs.savannah.gnu.org/viewcvs/gnash/server/character.h?cvsroot=gnash&r1=1.41&r2=1.42 http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.140&r2=1.141 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2198 retrieving revision 1.2199 diff -u -b -r1.2198 -r1.2199 --- ChangeLog 30 Jan 2007 17:41:16 -0000 1.2198 +++ ChangeLog 30 Jan 2007 18:29:40 -0000 1.2199 @@ -1,4 +1,12 @@ -2007-01-25 Martin Guy +2007-01-30 Sandro Santilli + + * server/: character.{h,cpp}, sprite_instance.cpp: + Made generic gettersetter definitions statics + in the 'character' class. Ready for reuse in button + instances and whichever other ActionScript class + associated with a character (_x,_y,_width...). + +2007-01-30 Martin Guy * configure.ac: Fix message about Debian packages required for boost Index: server/character.cpp =================================================================== RCS file: /sources/gnash/gnash/server/character.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -u -b -r1.15 -r1.16 --- server/character.cpp 13 Dec 2006 12:00:06 -0000 1.15 +++ server/character.cpp 30 Jan 2007 18:29:40 -0000 1.16 @@ -18,7 +18,7 @@ // // -/* $Id: character.cpp,v 1.15 2006/12/13 12:00:06 strk Exp $ */ +/* $Id: character.cpp,v 1.16 2007/01/30 18:29:40 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -28,6 +28,8 @@ #include "sprite_instance.h" #include "drag_state.h" // for do_mouse_drag (to be moved in movie_root) #include "VM.h" // for do_mouse_drag (to be moved in movie_root) +#include "fn_call.h" // for shared ActionScript getter-setters +#include "GnashException.h" // for shared ActionScript getter-setters (ensure_character) namespace gnash { @@ -187,6 +189,375 @@ } +//--------------------------------------------------------------------- +// +// Shared ActionScript getter-setters +// +//--------------------------------------------------------------------- + +// Wrapper around dynamic_cast to implement user warning. +// To be used by builtin properties and methods. +static character* +ensure_character(as_object* obj) +{ + character* ret = dynamic_cast(obj); + if ( ! ret ) + { + throw ActionException("builtin method or gettersetter for character objects called against non-character instance"); + } + return ret; +} + +void +character::onrollover_getset(const fn_call& fn) +{ + character* ptr = ensure_character(fn.this_ptr); + + if ( fn.nargs == 0 ) // getter + { + ptr->get_event_handler(event_id::ROLL_OVER, fn.result); + } + else // setter + { + ptr->set_event_handler(event_id::ROLL_OVER, fn.arg(0)); + } + +} + +void +character::x_getset(const fn_call& fn) +{ + character* ptr = ensure_character(fn.this_ptr); + + if ( fn.nargs == 0 ) // getter + { + matrix m = ptr->get_matrix(); + fn.result->set_double(TWIPS_TO_PIXELS(m.m_[0][2])); + } + else // setter + { + matrix m = ptr->get_matrix(); + m.m_[0][2] = infinite_to_fzero(PIXELS_TO_TWIPS(fn.arg(0).to_number())); + ptr->set_matrix(m); + ptr->transformedByScript(); // m_accept_anim_moves = false; + } + +} + +void +character::y_getset(const fn_call& fn) +{ + character* ptr = ensure_character(fn.this_ptr); + + if ( fn.nargs == 0 ) // getter + { + matrix m = ptr->get_matrix(); + fn.result->set_double(TWIPS_TO_PIXELS(m.m_[1][2])); + } + else // setter + { + matrix m = ptr->get_matrix(); + m.m_[1][2] = infinite_to_fzero(PIXELS_TO_TWIPS(fn.arg(0).to_number())); + ptr->set_matrix(m); + ptr->transformedByScript(); // m_accept_anim_moves = false; + } + +} + +void +character::xscale_getset(const fn_call& fn) +{ + character* ptr = ensure_character(fn.this_ptr); + + if ( fn.nargs == 0 ) // getter + { + matrix m = ptr->get_matrix(); + float xscale = m.get_x_scale(); + fn.result->set_double(xscale * 100); // result in percent + } + else // setter + { + matrix m = ptr->get_matrix(); + + double scale_percent = fn.arg(0).to_number(); + + // Handle bogus values + if (isnan(scale_percent)) + { + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("Attempt to set _xscale to %g, refused", + scale_percent); + ); + return; + } + else if (scale_percent < 0 ) + { + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("Attempt to set _xscale to %g, use 0", + scale_percent); + ); + scale_percent = 0; + } + + // input is in percent + float scale = (float)scale_percent/100.f; + + // Decompose matrix and insert the desired value. + float x_scale = scale; + float y_scale = m.get_y_scale(); + float rotation = m.get_rotation(); + m.set_scale_rotation(x_scale, y_scale, rotation); + + ptr->set_matrix(m); + ptr->transformedByScript(); // m_accept_anim_moves = false; + } + +} + +void +character::yscale_getset(const fn_call& fn) +{ + character* ptr = ensure_character(fn.this_ptr); + + if ( fn.nargs == 0 ) // getter + { + matrix m = ptr->get_matrix(); + float yscale = m.get_y_scale(); + fn.result->set_double(yscale * 100); // result in percent + } + else // setter + { + matrix m = ptr->get_matrix(); + + double scale_percent = fn.arg(0).to_number(); + + // Handle bogus values + if (isnan(scale_percent)) + { + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("Attempt to set _yscale to %g, refused", + scale_percent); + ); + return; + } + else if (scale_percent < 0 ) + { + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("Attempt to set _yscale to %g, use 0", + scale_percent); + ); + scale_percent = 0; + } + + // input is in percent + float scale = (float)scale_percent/100.f; + + // Decompose matrix and insert the desired value. + float x_scale = m.get_x_scale(); + float y_scale = scale; + float rotation = m.get_rotation(); + m.set_scale_rotation(x_scale, y_scale, rotation); + + ptr->set_matrix(m); + ptr->transformedByScript(); // m_accept_anim_moves = false; + } + +} + +void +character::xmouse_getset(const fn_call& fn) +{ + character* ptr = ensure_character(fn.this_ptr); + + if ( fn.nargs == 0 ) // getter + { + // Local coord of mouse IN PIXELS. + int x, y, buttons; + VM::get().getRoot().get_mouse_state(x, y, buttons); + + matrix m = ptr->get_world_matrix(); + + point a(PIXELS_TO_TWIPS(x), PIXELS_TO_TWIPS(y)); + point b; + + m.transform_by_inverse(&b, a); + + fn.result->set_double(TWIPS_TO_PIXELS(b.m_x)); + } + else // setter + { + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("Attempt to set read-only property '_xmouse'"); + ); + } +} + +void +character::ymouse_getset(const fn_call& fn) +{ + character* ptr = ensure_character(fn.this_ptr); + + if ( fn.nargs == 0 ) // getter + { + // Local coord of mouse IN PIXELS. + int x, y, buttons; + VM::get().getRoot().get_mouse_state(x, y, buttons); + + matrix m = ptr->get_world_matrix(); + + point a(PIXELS_TO_TWIPS(x), PIXELS_TO_TWIPS(y)); + point b; + + m.transform_by_inverse(&b, a); + + fn.result->set_double(TWIPS_TO_PIXELS(b.m_y)); + } + else // setter + { + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("Attempt to set read-only property '_ymouse'"); + ); + } +} + +void +character::alpha_getset(const fn_call& fn) +{ + character* ptr = ensure_character(fn.this_ptr); + + if ( fn.nargs == 0 ) // getter + { + fn.result->set_double(ptr->get_cxform().m_[3][0] * 100.f); + } + else // setter + { + // Set alpha modulate, in percent. + cxform cx = ptr->get_cxform(); + cx.m_[3][0] = infinite_to_fzero(fn.arg(0).to_number()) / 100.f; + ptr->set_cxform(cx); + ptr->transformedByScript(); // m_accept_anim_moves = false; + } + +} + +void +character::visible_getset(const fn_call& fn) +{ + character* ptr = ensure_character(fn.this_ptr); + + if ( fn.nargs == 0 ) // getter + { + fn.result->set_bool(ptr->get_visible()); + } + else // setter + { + ptr->set_visible(fn.arg(0).to_bool()); + ptr->transformedByScript(); // m_accept_anim_moves = false; + } + +} + +void +character::width_getset(const fn_call& fn) +{ + character* ptr = ensure_character(fn.this_ptr); + + if ( fn.nargs == 0 ) // getter + { + fn.result->set_double(TWIPS_TO_PIXELS(ptr->get_width())); + } + else // setter + { + // @@ tulrich: is parameter in world-coords or local-coords? + matrix m = ptr->get_matrix(); + m.m_[0][0] = infinite_to_fzero(PIXELS_TO_TWIPS(fn.arg(0).to_number())); + float w = ptr->get_width(); + if (fabsf(w) > 1e-6f) + { + m.m_[0][0] /= w; + } + ptr->set_matrix(m); + ptr->transformedByScript(); // m_accept_anim_moves = false; + } +} + +void +character::height_getset(const fn_call& fn) +{ + character* ptr = ensure_character(fn.this_ptr); + + if ( fn.nargs == 0 ) // getter + { + fn.result->set_double(TWIPS_TO_PIXELS(ptr->get_height())); + } + else // setter + { + // @@ tulrich: is parameter in world-coords or local-coords? + matrix m = ptr->get_matrix(); + m.m_[1][1] = infinite_to_fzero(PIXELS_TO_TWIPS(fn.arg(0).to_number())); + float h = ptr->get_height(); // WARNING: was get_width originally, sounds as a bug + if (fabsf(h) > 1e-6f) + { + m.m_[1][1] /= h; + } + ptr->set_matrix(m); + ptr->transformedByScript(); // m_accept_anim_moves = false; + } +} + +void +character::rotation_getset(const fn_call& fn) +{ + character* ptr = ensure_character(fn.this_ptr); + + if ( fn.nargs == 0 ) // getter + { + // Verified against Macromedia player using samples/test_rotation.swf + float angle = ptr->get_matrix().get_rotation(); + + // Result is CLOCKWISE DEGREES, [-180,180] + angle *= 180.0f / float(M_PI); + + fn.result->set_double(angle); + } + else // setter + { + // @@ tulrich: is parameter in world-coords or local-coords? + matrix m = ptr->get_matrix(); + + // Decompose matrix and insert the desired value. + float x_scale = m.get_x_scale(); + float y_scale = m.get_y_scale(); + // input is in degrees + float rotation = (float) fn.arg(0).to_number() * float(M_PI) / 180.f; + m.set_scale_rotation(x_scale, y_scale, rotation); + + ptr->set_matrix(m); + ptr->transformedByScript(); // m_accept_anim_moves = false; + } +} + +void +character::parent_getset(const fn_call& fn) +{ + character* ptr = ensure_character(fn.this_ptr); + + if ( fn.nargs == 0 ) // getter + { + // NOTE: will be NULL for root frame ! + // should it be 'ptr' instead ? + fn.result->set_as_object(ptr->get_parent()); + } + else // setter + { + IF_VERBOSE_ASCODING_ERRORS( + log_aserror("Attempt to set read-only property '_parent'"); + ); + } +} + + + } // namespace gnash // Local Variables: Index: server/character.h =================================================================== RCS file: /sources/gnash/gnash/server/character.h,v retrieving revision 1.41 retrieving revision 1.42 diff -u -b -r1.41 -r1.42 --- server/character.h 26 Jan 2007 13:17:09 -0000 1.41 +++ server/character.h 30 Jan 2007 18:29:40 -0000 1.42 @@ -18,7 +18,7 @@ // // -/* $Id: character.h,v 1.41 2007/01/26 13:17:09 strk Exp $ */ +/* $Id: character.h,v 1.42 2007/01/30 18:29:40 strk Exp $ */ #ifndef GNASH_CHARACTER_H #define GNASH_CHARACTER_H @@ -126,6 +126,40 @@ bool _dynamicallyCreated; + + + /// @{ Common ActionScript getter-setters for characters + +public: // TODO: make protected + + static void onrollover_getset(const fn_call& fn); + + static void x_getset(const fn_call& fn); + + static void y_getset(const fn_call& fn); + + static void xscale_getset(const fn_call& fn); + + static void yscale_getset(const fn_call& fn); + + static void xmouse_getset(const fn_call& fn); + + static void ymouse_getset(const fn_call& fn); + + static void alpha_getset(const fn_call& fn); + + static void visible_getset(const fn_call& fn); + + static void width_getset(const fn_call& fn); + + static void height_getset(const fn_call& fn); + + static void rotation_getset(const fn_call& fn); + + static void parent_getset(const fn_call& fn); + + /// @} Common ActionScript getter-setters for characters + public: character(character* parent, int id) Index: server/sprite_instance.cpp =================================================================== RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v retrieving revision 1.140 retrieving revision 1.141 diff -u -b -r1.140 -r1.141 --- server/sprite_instance.cpp 29 Jan 2007 07:33:14 -0000 1.140 +++ server/sprite_instance.cpp 30 Jan 2007 18:29:40 -0000 1.141 @@ -860,349 +860,7 @@ } #ifndef OLD_GET_MEMBER -// TODO: consider using this same function for *every* character -static void -character_x_getset(const fn_call& fn) -{ - character* ptr = ensure_character(fn.this_ptr); - - if ( fn.nargs == 0 ) // getter - { - matrix m = ptr->get_matrix(); - fn.result->set_double(TWIPS_TO_PIXELS(m.m_[0][2])); - } - else // setter - { - matrix m = ptr->get_matrix(); - m.m_[0][2] = infinite_to_fzero(PIXELS_TO_TWIPS(fn.arg(0).to_number())); - ptr->set_matrix(m); - ptr->transformedByScript(); // m_accept_anim_moves = false; - } - -} - -// TODO: consider using this same function for *every* character -static void -character_y_getset(const fn_call& fn) -{ - character* ptr = ensure_character(fn.this_ptr); - - if ( fn.nargs == 0 ) // getter - { - matrix m = ptr->get_matrix(); - fn.result->set_double(TWIPS_TO_PIXELS(m.m_[1][2])); - } - else // setter - { - matrix m = ptr->get_matrix(); - m.m_[1][2] = infinite_to_fzero(PIXELS_TO_TWIPS(fn.arg(0).to_number())); - ptr->set_matrix(m); - ptr->transformedByScript(); // m_accept_anim_moves = false; - } - -} - -// TODO: consider using this same function for *every* character -static void -character_xscale_getset(const fn_call& fn) -{ - character* ptr = ensure_character(fn.this_ptr); - - if ( fn.nargs == 0 ) // getter - { - matrix m = ptr->get_matrix(); - float xscale = m.get_x_scale(); - fn.result->set_double(xscale * 100); // result in percent - } - else // setter - { - matrix m = ptr->get_matrix(); - - double scale_percent = fn.arg(0).to_number(); - - // Handle bogus values - if (isnan(scale_percent)) - { - IF_VERBOSE_ASCODING_ERRORS( - log_aserror("Attempt to set _xscale to %g, refused", - scale_percent); - ); - return; - } - else if (scale_percent < 0 ) - { - IF_VERBOSE_ASCODING_ERRORS( - log_aserror("Attempt to set _xscale to %g, use 0", - scale_percent); - ); - scale_percent = 0; - } - - // input is in percent - float scale = (float)scale_percent/100.f; - - // Decompose matrix and insert the desired value. - float x_scale = scale; - float y_scale = m.get_y_scale(); - float rotation = m.get_rotation(); - m.set_scale_rotation(x_scale, y_scale, rotation); - - ptr->set_matrix(m); - ptr->transformedByScript(); // m_accept_anim_moves = false; - } - -} - -// TODO: consider using this same function for *every* character -static void -character_yscale_getset(const fn_call& fn) -{ - character* ptr = ensure_character(fn.this_ptr); - - if ( fn.nargs == 0 ) // getter - { - matrix m = ptr->get_matrix(); - float yscale = m.get_y_scale(); - fn.result->set_double(yscale * 100); // result in percent - } - else // setter - { - matrix m = ptr->get_matrix(); - - double scale_percent = fn.arg(0).to_number(); - - // Handle bogus values - if (isnan(scale_percent)) - { - IF_VERBOSE_ASCODING_ERRORS( - log_aserror("Attempt to set _yscale to %g, refused", - scale_percent); - ); - return; - } - else if (scale_percent < 0 ) - { - IF_VERBOSE_ASCODING_ERRORS( - log_aserror("Attempt to set _yscale to %g, use 0", - scale_percent); - ); - scale_percent = 0; - } - - // input is in percent - float scale = (float)scale_percent/100.f; - - // Decompose matrix and insert the desired value. - float x_scale = m.get_x_scale(); - float y_scale = scale; - float rotation = m.get_rotation(); - m.set_scale_rotation(x_scale, y_scale, rotation); - - ptr->set_matrix(m); - ptr->transformedByScript(); // m_accept_anim_moves = false; - } - -} - -// TODO: consider using this same function for *every* character -static void -character_xmouse_getset(const fn_call& fn) -{ - character* ptr = ensure_character(fn.this_ptr); - - if ( fn.nargs == 0 ) // getter - { - // Local coord of mouse IN PIXELS. - int x, y, buttons; - VM::get().getRoot().get_mouse_state(x, y, buttons); - - matrix m = ptr->get_world_matrix(); - - point a(PIXELS_TO_TWIPS(x), PIXELS_TO_TWIPS(y)); - point b; - - m.transform_by_inverse(&b, a); - - fn.result->set_double(TWIPS_TO_PIXELS(b.m_x)); - } - else // setter - { - IF_VERBOSE_ASCODING_ERRORS( - log_aserror("Attempt to set read-only property '_xmouse'"); - ); - } -} - -// TODO: consider using this same function for *every* character -static void -character_ymouse_getset(const fn_call& fn) -{ - character* ptr = ensure_character(fn.this_ptr); - - if ( fn.nargs == 0 ) // getter - { - // Local coord of mouse IN PIXELS. - int x, y, buttons; - VM::get().getRoot().get_mouse_state(x, y, buttons); - - matrix m = ptr->get_world_matrix(); - - point a(PIXELS_TO_TWIPS(x), PIXELS_TO_TWIPS(y)); - point b; - - m.transform_by_inverse(&b, a); - - fn.result->set_double(TWIPS_TO_PIXELS(b.m_y)); - } - else // setter - { - IF_VERBOSE_ASCODING_ERRORS( - log_aserror("Attempt to set read-only property '_ymouse'"); - ); - } -} - -// TODO: consider using this same function for *every* character -static void -character_alpha_getset(const fn_call& fn) -{ - character* ptr = ensure_character(fn.this_ptr); - - if ( fn.nargs == 0 ) // getter - { - fn.result->set_double(ptr->get_cxform().m_[3][0] * 100.f); - } - else // setter - { - // Set alpha modulate, in percent. - cxform cx = ptr->get_cxform(); - cx.m_[3][0] = infinite_to_fzero(fn.arg(0).to_number()) / 100.f; - ptr->set_cxform(cx); - ptr->transformedByScript(); // m_accept_anim_moves = false; - } - -} - -// TODO: consider using this same function for *every* character -static void -character_visible_getset(const fn_call& fn) -{ - character* ptr = ensure_character(fn.this_ptr); - - if ( fn.nargs == 0 ) // getter - { - fn.result->set_bool(ptr->get_visible()); - } - else // setter - { - ptr->set_visible(fn.arg(0).to_bool()); - ptr->transformedByScript(); // m_accept_anim_moves = false; - } - -} - -// TODO: consider using this same function for *every* character -static void -character_width_getset(const fn_call& fn) -{ - character* ptr = ensure_character(fn.this_ptr); - - if ( fn.nargs == 0 ) // getter - { - fn.result->set_double(TWIPS_TO_PIXELS(ptr->get_width())); - } - else // setter - { - // @@ tulrich: is parameter in world-coords or local-coords? - matrix m = ptr->get_matrix(); - m.m_[0][0] = infinite_to_fzero(PIXELS_TO_TWIPS(fn.arg(0).to_number())); - float w = ptr->get_width(); - if (fabsf(w) > 1e-6f) - { - m.m_[0][0] /= w; - } - ptr->set_matrix(m); - ptr->transformedByScript(); // m_accept_anim_moves = false; - } -} -// TODO: consider using this same function for *every* character -static void -character_height_getset(const fn_call& fn) -{ - character* ptr = ensure_character(fn.this_ptr); - - if ( fn.nargs == 0 ) // getter - { - fn.result->set_double(TWIPS_TO_PIXELS(ptr->get_height())); - } - else // setter - { - // @@ tulrich: is parameter in world-coords or local-coords? - matrix m = ptr->get_matrix(); - m.m_[1][1] = infinite_to_fzero(PIXELS_TO_TWIPS(fn.arg(0).to_number())); - float h = ptr->get_height(); // WARNING: was get_width originally, sounds as a bug - if (fabsf(h) > 1e-6f) - { - m.m_[1][1] /= h; - } - ptr->set_matrix(m); - ptr->transformedByScript(); // m_accept_anim_moves = false; - } -} - -// TODO: consider using this same function for *every* character -static void -character_rotation_getset(const fn_call& fn) -{ - character* ptr = ensure_character(fn.this_ptr); - - if ( fn.nargs == 0 ) // getter - { - // Verified against Macromedia player using samples/test_rotation.swf - float angle = ptr->get_matrix().get_rotation(); - - // Result is CLOCKWISE DEGREES, [-180,180] - angle *= 180.0f / float(M_PI); - - fn.result->set_double(angle); - } - else // setter - { - // @@ tulrich: is parameter in world-coords or local-coords? - matrix m = ptr->get_matrix(); - - // Decompose matrix and insert the desired value. - float x_scale = m.get_x_scale(); - float y_scale = m.get_y_scale(); - // input is in degrees - float rotation = (float) fn.arg(0).to_number() * float(M_PI) / 180.f; - m.set_scale_rotation(x_scale, y_scale, rotation); - - ptr->set_matrix(m); - ptr->transformedByScript(); // m_accept_anim_moves = false; - } -} - -// TODO: consider using this same function for *every* character -static void -character_parent_getset(const fn_call& fn) -{ - character* ptr = ensure_character(fn.this_ptr); - - if ( fn.nargs == 0 ) // getter - { - // NOTE: will be NULL for root frame ! - // should it be 'ptr' instead ? - fn.result->set_as_object(ptr->get_parent()); - } - else // setter - { - IF_VERBOSE_ASCODING_ERRORS( - log_aserror("Attempt to set read-only property '_parent'"); - ); - } -} static void sprite_currentframe_getset(const fn_call& fn) @@ -1356,22 +1014,6 @@ } static void -sprite_onrollover_getset(const fn_call& fn) -{ - sprite_instance* ptr = ensure_sprite(fn.this_ptr); - - if ( fn.nargs == 0 ) // getter - { - ptr->get_event_handler(event_id::ROLL_OVER, fn.result); - } - else // setter - { - ptr->set_event_handler(event_id::ROLL_OVER, fn.arg(0)); - } - -} - -static void sprite_onrollout_getset(const fn_call& fn) { sprite_instance* ptr = ensure_sprite(fn.this_ptr); @@ -1480,40 +1122,40 @@ // Properties (TODO: move to appropriate SWF version section) // - gettersetter = new builtin_function(&character_x_getset, NULL); + gettersetter = new builtin_function(&character::x_getset, NULL); o.init_property("_x", *gettersetter, *gettersetter); - gettersetter = new builtin_function(&character_y_getset, NULL); + gettersetter = new builtin_function(&character::y_getset, NULL); o.init_property("_y", *gettersetter, *gettersetter); - gettersetter = new builtin_function(&character_xscale_getset, NULL); + gettersetter = new builtin_function(&character::xscale_getset, NULL); o.init_property("_xscale", *gettersetter, *gettersetter); - gettersetter = new builtin_function(&character_yscale_getset, NULL); + gettersetter = new builtin_function(&character::yscale_getset, NULL); o.init_property("_yscale", *gettersetter, *gettersetter); - gettersetter = new builtin_function(&character_xmouse_getset, NULL); + gettersetter = new builtin_function(&character::xmouse_getset, NULL); o.init_property("_xmouse", *gettersetter, *gettersetter); - gettersetter = new builtin_function(&character_ymouse_getset, NULL); + gettersetter = new builtin_function(&character::ymouse_getset, NULL); o.init_property("_ymouse", *gettersetter, *gettersetter); - gettersetter = new builtin_function(&character_alpha_getset, NULL); + gettersetter = new builtin_function(&character::alpha_getset, NULL); o.init_property("_alpha", *gettersetter, *gettersetter); - gettersetter = new builtin_function(&character_visible_getset, NULL); + gettersetter = new builtin_function(&character::visible_getset, NULL); o.init_property("_visible", *gettersetter, *gettersetter); - gettersetter = new builtin_function(&character_width_getset, NULL); + gettersetter = new builtin_function(&character::width_getset, NULL); o.init_property("_width", *gettersetter, *gettersetter); - gettersetter = new builtin_function(&character_height_getset, NULL); + gettersetter = new builtin_function(&character::height_getset, NULL); o.init_property("_height", *gettersetter, *gettersetter); - gettersetter = new builtin_function(&character_rotation_getset, NULL); + gettersetter = new builtin_function(&character::rotation_getset, NULL); o.init_property("_rotation", *gettersetter, *gettersetter); - gettersetter = new builtin_function(&character_parent_getset, NULL); + gettersetter = new builtin_function(&character::parent_getset, NULL); o.init_property("_parent", *gettersetter, *gettersetter); gettersetter = new builtin_function(&sprite_currentframe_getset, NULL); @@ -1546,7 +1188,7 @@ gettersetter = new builtin_function(&sprite_soundbuftime_getset, NULL); o.init_property("_soundbuftime", *gettersetter, *gettersetter); - gettersetter = new builtin_function(&sprite_onrollover_getset, NULL); + gettersetter = new builtin_function(&character::onrollover_getset, NULL); o.init_property("onRollOver", *gettersetter, *gettersetter); gettersetter = new builtin_function(&sprite_onrollout_getset, NULL); From MAILER-DAEMON Tue Jan 30 16:58:56 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HC10C-0008To-Db for mharc-gnash-commit@gnu.org; Tue, 30 Jan 2007 16:58:56 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HC10B-0008Tb-BR for gnash-commit@gnu.org; Tue, 30 Jan 2007 16:58:55 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HC10A-0008TM-Rr for gnash-commit@gnu.org; Tue, 30 Jan 2007 16:58:55 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HC10A-0008TJ-Op for gnash-commit@gnu.org; Tue, 30 Jan 2007 16:58:54 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HC10A-0003bt-DR for gnash-commit@gnu.org; Tue, 30 Jan 2007 16:58:54 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HC109-0007R8-NW for gnash-commit@gnu.org; Tue, 30 Jan 2007 21:58:53 +0000 Received: from martinwguy by savannah.gnu.org with local (Exim 4.50) id 1HC109-0007R5-GK for gnash-commit@gnu.org; Tue, 30 Jan 2007 21:58:53 +0000 To: gnash-commit@gnu.org Message-Id: From: Martin Guy Date: Tue, 30 Jan 2007 21:58:53 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash configure.ac X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jan 2007 21:58:55 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Martin Guy 07/01/30 21:58:53 Modified files: . : configure.ac Log message: Make libjpeg presence mandatory and fail otherwise CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/configure.ac?cvsroot=gnash&r1=1.244&r2=1.245 Patches: Index: configure.ac =================================================================== RCS file: /sources/gnash/gnash/configure.ac,v retrieving revision 1.244 retrieving revision 1.245 diff -u -b -r1.244 -r1.245 --- configure.ac 30 Jan 2007 17:41:17 -0000 1.244 +++ configure.ac 30 Jan 2007 21:58:53 -0000 1.245 @@ -15,7 +15,7 @@ dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA dnl -dnl $Id: configure.ac,v 1.244 2007/01/30 17:41:17 martinwguy Exp $ +dnl $Id: configure.ac,v 1.245 2007/01/30 21:58:53 martinwguy Exp $ AC_PREREQ(2.50) AC_INIT(gnash, cvs) @@ -412,7 +412,7 @@ dnl AC_CHECK_LIB(c, mremap) GNASH_PKG_FIND(z, [zlib.h], [zlib compression library], compress) -dnl GNASH_PKG_FIND(jpeg, [jpeglib.h], [jpeg images], jpeg_mem_init) +GNASH_PKG_FIND(jpeg, [jpeglib.h], [jpeg images], jpeg_mem_init) GNASH_PATH_JPEG dnl if we're not building the extensions, then the _FLAGS and _LIBS settings @@ -434,7 +434,7 @@ AM_CONDITIONAL(ENABLE_DOXYGEN, [ test x"$DOXYGEN" != x ]) dnl currently unused -dnl GNASH_PKG_FIND(ogg, [ogg.h], [jpeg images], jpeg_mem_init) +dnl GNASH_PKG_FIND(ogg, [ogg.h], [decode ogg streams], ogg_stream_init) if test x$gui = xsdl -o x$sound_handler = xsdl; then GNASH_PATH_SDL @@ -1312,6 +1312,17 @@ nogo=true fi +if test x"$JPEG" != x; then + echo " JPEG flags are: $JPEG_CFLAGS" + echo " JPEG libs are: $JPEG_LIBS" +else + echo "ERROR: No JPEG development package installed!\ + You need to have the libjpeg package installed\ + to compile, or install libjpeg-dev (using apt-get)\ + or libjpeg-devel (using yum)." + nogo=true +fi + if test x"$MING_LIBS" != x; then echo " MING version code is $MING_VERSION_CODE" echo " MING flags are $MING_CFLAGS" From MAILER-DAEMON Tue Jan 30 17:15:06 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HC1Fq-0003rd-Iq for mharc-gnash-commit@gnu.org; Tue, 30 Jan 2007 17:15:06 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HC1Fo-0003rR-Bk for gnash-commit@gnu.org; Tue, 30 Jan 2007 17:15:04 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HC1Fn-0003rE-Qj for gnash-commit@gnu.org; Tue, 30 Jan 2007 17:15:03 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HC1Fn-0003rB-LV for gnash-commit@gnu.org; Tue, 30 Jan 2007 17:15:03 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HC1Fn-0006hZ-EN for gnash-commit@gnu.org; Tue, 30 Jan 2007 17:15:03 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HC1Fm-0007gb-Uc for gnash-commit@gnu.org; Tue, 30 Jan 2007 22:15:03 +0000 Received: from martinwguy by savannah.gnu.org with local (Exim 4.50) id 1HC1Fm-0007gY-LA for gnash-commit@gnu.org; Tue, 30 Jan 2007 22:15:02 +0000 To: gnash-commit@gnu.org Message-Id: From: Martin Guy Date: Tue, 30 Jan 2007 22:15:02 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash configure.ac X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jan 2007 22:15:05 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Martin Guy 07/01/30 22:15:02 Modified files: . : configure.ac Log message: Fix previous commit CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/configure.ac?cvsroot=gnash&r1=1.245&r2=1.246 Patches: Index: configure.ac =================================================================== RCS file: /sources/gnash/gnash/configure.ac,v retrieving revision 1.245 retrieving revision 1.246 diff -u -b -r1.245 -r1.246 --- configure.ac 30 Jan 2007 21:58:53 -0000 1.245 +++ configure.ac 30 Jan 2007 22:15:02 -0000 1.246 @@ -15,7 +15,7 @@ dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA dnl -dnl $Id: configure.ac,v 1.245 2007/01/30 21:58:53 martinwguy Exp $ +dnl $Id: configure.ac,v 1.246 2007/01/30 22:15:02 martinwguy Exp $ AC_PREREQ(2.50) AC_INIT(gnash, cvs) @@ -1312,7 +1312,7 @@ nogo=true fi -if test x"$JPEG" != x; then +if test x"$JPEG_LIBS" != x; then echo " JPEG flags are: $JPEG_CFLAGS" echo " JPEG libs are: $JPEG_LIBS" else From MAILER-DAEMON Tue Jan 30 18:05:46 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HC22s-0000zG-1W for mharc-gnash-commit@gnu.org; Tue, 30 Jan 2007 18:05:46 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HC22q-0000yv-Lf for gnash-commit@gnu.org; Tue, 30 Jan 2007 18:05:44 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HC22q-0000yj-1h for gnash-commit@gnu.org; Tue, 30 Jan 2007 18:05:44 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HC22p-0000yg-VG for gnash-commit@gnu.org; Tue, 30 Jan 2007 18:05:43 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HC22p-0007HG-Mm for gnash-commit@gnu.org; Tue, 30 Jan 2007 18:05:43 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HC22p-0001jA-6A for gnash-commit@gnu.org; Tue, 30 Jan 2007 23:05:43 +0000 Received: from martinwguy by savannah.gnu.org with local (Exim 4.50) id 1HC22o-0001j7-Q3 for gnash-commit@gnu.org; Tue, 30 Jan 2007 23:05:43 +0000 To: gnash-commit@gnu.org Message-Id: From: Martin Guy Date: Tue, 30 Jan 2007 23:05:42 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash ChangeLog config.mk.in compatibility_incl... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jan 2007 23:05:44 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Martin Guy 07/01/30 23:05:42 Modified files: . : ChangeLog config.mk.in compatibility_include.h Log message: Remove unused GAMESWF defines CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2199&r2=1.2200 http://cvs.savannah.gnu.org/viewcvs/gnash/config.mk.in?cvsroot=gnash&r1=1.3&r2=1.4 http://cvs.savannah.gnu.org/viewcvs/gnash/compatibility_include.h?cvsroot=gnash&r1=1.1&r2=1.2 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2199 retrieving revision 1.2200 diff -u -b -r1.2199 -r1.2200 --- ChangeLog 30 Jan 2007 18:29:40 -0000 1.2199 +++ ChangeLog 30 Jan 2007 23:05:42 -0000 1.2200 @@ -1,3 +1,7 @@ +2007-01-30 Martin Guy + + * config.mk.in, compatibility_include.h: Remove unused GAMESWF defines + 2007-01-30 Sandro Santilli * server/: character.{h,cpp}, sprite_instance.cpp: @@ -6,7 +10,12 @@ instances and whichever other ActionScript class associated with a character (_x,_y,_width...). -2007-01-30 Martin Guy +2007-01-25 Martin Guy + + * configure.ac: Make libjpeg presence mandatory and fail otherwise; + otherwise compilation fails. + +2007-01-25 Martin Guy * configure.ac: Fix message about Debian packages required for boost Index: config.mk.in =================================================================== RCS file: /sources/gnash/gnash/config.mk.in,v retrieving revision 1.3 retrieving revision 1.4 diff -u -b -r1.3 -r1.4 --- config.mk.in 15 Oct 2006 09:11:20 -0000 1.3 +++ config.mk.in 30 Jan 2007 23:05:42 -0000 1.4 @@ -1,5 +1,5 @@ # make configuration for the tu-testbed engine library -# $Id: config.mk.in,v 1.3 2006/10/15 09:11:20 nihilus Exp $ +# $Id: config.mk.in,v 1.4 2007/01/30 23:05:42 martinwguy Exp $ CC = @CC@ CXX = @CXX@ @@ -31,18 +31,8 @@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ -# If you have libmad installed -# (http://www.underbit.com/products/mad/), and you want to compile -# gameswf with mp3 support, uncomment below. Note that libmad is -# GPL'd, so if you want to distribute binaries based on this, you must -# distribute the associated source under GPL as well. -#GAMESWF_MP3_SUPPORT=-DGAMESWF_MP3_SUPPORT=1 -##LIBMAD_LIB=-lmad -#LIBMAD_LIB=../../libmad-0.15.1b/msvc++/Release/libmad.lib -#LIBMAD_INCLUDE=-I../../libmad-0.15.1b - DEFS = @DEFS@ -CFLAGS := $(DEFS) $(CFLAGS) $(SDL_CFLAGS) -fPIC -Wall $(GAMESWF_MP3_SUPPORT) +CFLAGS := $(DEFS) $(CFLAGS) $(SDL_CFLAGS) -fPIC -Wall MAKE_DLL := $(CC) -shared #include $(top_srcdir)/config @@ -55,7 +45,7 @@ SDL_INCLUDE := -I "$(SDL_DIR)/include" SDL_LIBS := winmm.lib dxguid.lib kernel32.lib user32.lib gdi32.lib # winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib LIBS := opengl32.lib glu32.lib $(SDL_DIR)/lib/SDLmain.lib $(SDL_DIR)/lib/SDL.lib gdi32.lib oldnames.lib $(SDL_LIBS) -CFLAGS := $(CFLAGS) /MD -GR -GX -DWIN32=1 -D_WIN32=1 $(USE_DL_MALLOC_FLAG) -W3 $(SDL_CFLAGS) $(GAMESWF_MP3_SUPPORT) +CFLAGS := $(CFLAGS) /MD -GR -GX -DWIN32=1 -D_WIN32=1 $(USE_DL_MALLOC_FLAG) -W3 $(SDL_CFLAGS) LDFLAGS := /link /NODEFAULTLIB:libc.lib /NODEFAULTLIB:libcd.lib /INCREMENTAL:NO /subsystem:console endif ifeq ($(DEBUG),1) Index: compatibility_include.h =================================================================== RCS file: /sources/gnash/gnash/compatibility_include.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -b -r1.1 -r1.2 --- compatibility_include.h 20 Dec 2005 21:12:01 -0000 1.1 +++ compatibility_include.h 30 Jan 2007 23:05:42 -0000 1.2 @@ -27,11 +27,6 @@ // Some optional gameswf configuration. // -// #define GAMESWF_FONT_NOMINAL_GLYPH_SIZE_DEFAULT 32 - -// Define this to avoid using mesh shapes to render large text -// #define GAMESWF_ALWAYS_USE_TEXTURES_FOR_TEXT_WHEN_POSSIBLE 1 - // For disabling zlib and jpeg functionality; you may be able to use // this in final builds of gameswf, if you preprocess all your SWF // content to make unpacked formats. From MAILER-DAEMON Tue Jan 30 18:22:09 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HC2Ij-0007wx-5p for mharc-gnash-commit@gnu.org; Tue, 30 Jan 2007 18:22:09 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HC2Ii-0007wE-Kp for gnash-commit@gnu.org; Tue, 30 Jan 2007 18:22:08 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HC2Ih-0007v1-6d for gnash-commit@gnu.org; Tue, 30 Jan 2007 18:22:07 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HC2Ih-0007uu-1Y for gnash-commit@gnu.org; Tue, 30 Jan 2007 18:22:07 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HC2Ih-0001U7-2o for gnash-commit@gnu.org; Tue, 30 Jan 2007 18:22:07 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HC2Ig-00025E-IE for gnash-commit@gnu.org; Tue, 30 Jan 2007 23:22:06 +0000 Received: from martinwguy by savannah.gnu.org with local (Exim 4.50) id 1HC2Ig-00025B-BD for gnash-commit@gnu.org; Tue, 30 Jan 2007 23:22:06 +0000 To: gnash-commit@gnu.org Message-Id: From: Martin Guy Date: Tue, 30 Jan 2007 23:22:06 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash configure.ac X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jan 2007 23:22:08 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Martin Guy 07/01/30 23:22:06 Modified files: . : configure.ac Log message: Remove duplication of jpeg test introduced in previous commit CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/configure.ac?cvsroot=gnash&r1=1.246&r2=1.247 Patches: Index: configure.ac =================================================================== RCS file: /sources/gnash/gnash/configure.ac,v retrieving revision 1.246 retrieving revision 1.247 diff -u -b -r1.246 -r1.247 --- configure.ac 30 Jan 2007 22:15:02 -0000 1.246 +++ configure.ac 30 Jan 2007 23:22:06 -0000 1.247 @@ -15,7 +15,7 @@ dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA dnl -dnl $Id: configure.ac,v 1.246 2007/01/30 22:15:02 martinwguy Exp $ +dnl $Id: configure.ac,v 1.247 2007/01/30 23:22:06 martinwguy Exp $ AC_PREREQ(2.50) AC_INIT(gnash, cvs) @@ -413,7 +413,6 @@ dnl AC_CHECK_LIB(c, mremap) GNASH_PKG_FIND(z, [zlib.h], [zlib compression library], compress) GNASH_PKG_FIND(jpeg, [jpeglib.h], [jpeg images], jpeg_mem_init) -GNASH_PATH_JPEG dnl if we're not building the extensions, then the _FLAGS and _LIBS settings dnl found in these tests are blank. This way they can be used in From MAILER-DAEMON Tue Jan 30 18:31:20 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HC2Rc-0002St-0N for mharc-gnash-commit@gnu.org; Tue, 30 Jan 2007 18:31:20 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HC2Ra-0002Sb-Gl for gnash-commit@gnu.org; Tue, 30 Jan 2007 18:31:18 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HC2RY-0002SD-5C for gnash-commit@gnu.org; Tue, 30 Jan 2007 18:31:17 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HC2RX-0002SA-Vw for gnash-commit@gnu.org; Tue, 30 Jan 2007 18:31:16 -0500 Received: from moongulch.net ([69.15.127.230] helo=darkstar.moongulch.net) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HC2RX-00030y-SI for gnash-commit@gnu.org; Tue, 30 Jan 2007 18:31:16 -0500 Received: from [192.168.2.11] (bertha.welcomehome.org [192.168.2.11]) by darkstar.moongulch.net (8.13.8/8.13.8) with ESMTP id l0UNVPjD012622; Tue, 30 Jan 2007 16:31:25 -0700 Message-ID: <45BFD534.2080205@welcomehome.org> Date: Tue, 30 Jan 2007 16:31:00 -0700 From: Rob Savoye User-Agent: Thunderbird 1.5.0.9 (X11/20070102) MIME-Version: 1.0 To: Martin Guy Subject: Re: [Gnash-commit] gnash configure.ac References: In-Reply-To: X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-yoursite-MailScanner-Information: Please contact the ISP for more information X-yoursite-MailScanner: Found to be clean X-MailScanner-From: rob@welcomehome.org X-detected-kernel: Linux 2.6? (barebone, rare!) Cc: gnash-commit@gnu.org X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jan 2007 23:31:18 -0000 Martin Guy wrote: > GNASH_PKG_FIND(jpeg, [jpeglib.h], [jpeg images], jpeg_mem_init) > -GNASH_PATH_JPEG I'd test this with one of my cross tool chains. I had to add this back in on Jan 8. Because of the way name munging works, GNASH_PKG_FIND was sufficient. So this may have just broke things subtly. - rob - From MAILER-DAEMON Tue Jan 30 18:55:21 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HC2or-0001gl-HN for mharc-gnash-commit@gnu.org; Tue, 30 Jan 2007 18:55:21 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HC2oq-0001gg-G7 for gnash-commit@gnu.org; Tue, 30 Jan 2007 18:55:20 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HC2op-0001gU-63 for gnash-commit@gnu.org; Tue, 30 Jan 2007 18:55:19 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HC2op-0001gR-0f for gnash-commit@gnu.org; Tue, 30 Jan 2007 18:55:19 -0500 Received: from moongulch.net ([69.15.127.230] helo=darkstar.moongulch.net) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HC2oo-0006WG-S6 for gnash-commit@gnu.org; Tue, 30 Jan 2007 18:55:19 -0500 Received: from [192.168.2.11] (bertha.welcomehome.org [192.168.2.11]) by darkstar.moongulch.net (8.13.8/8.13.8) with ESMTP id l0UNte7S012962; Tue, 30 Jan 2007 16:55:40 -0700 Message-ID: <45BFDAE2.2050402@welcomehome.org> Date: Tue, 30 Jan 2007 16:55:14 -0700 From: Rob Savoye User-Agent: Thunderbird 1.5.0.9 (X11/20070102) MIME-Version: 1.0 Subject: Re: [Gnash-commit] gnash configure.ac References: <45BFD534.2080205@welcomehome.org> In-Reply-To: <45BFD534.2080205@welcomehome.org> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-yoursite-MailScanner-Information: Please contact the ISP for more information X-yoursite-MailScanner: Found to be clean X-MailScanner-From: rob@welcomehome.org X-detected-kernel: Linux 2.6? (barebone, rare!) Cc: gnash-commit@gnu.org X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jan 2007 23:55:20 -0000 Rob Savoye wrote: > I'd test this with one of my cross tool chains. I had to add this back > in on Jan 8. Because of the way name munging works, GNASH_PKG_FIND was > sufficient. So this may have just broke things subtly. Ok, I tested this with my ARM tool chain and the OLPC one, all is good with your patch. - rob - From MAILER-DAEMON Tue Jan 30 21:54:02 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HC5bl-0006yR-T0 for mharc-gnash-commit@gnu.org; Tue, 30 Jan 2007 21:54:01 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HC5bj-0006y9-TI for gnash-commit@gnu.org; Tue, 30 Jan 2007 21:53:59 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HC5bj-0006xs-1I for gnash-commit@gnu.org; Tue, 30 Jan 2007 21:53:59 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HC5bi-0006xp-Sy for gnash-commit@gnu.org; Tue, 30 Jan 2007 21:53:58 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HC5bi-0006Kt-JB for gnash-commit@gnu.org; Tue, 30 Jan 2007 21:53:58 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HC5bH-0003sv-Qd for gnash-commit@gnu.org; Wed, 31 Jan 2007 02:53:31 +0000 Received: from ann by savannah.gnu.org with local (Exim 4.50) id 1HC5bH-0003ss-LE for gnash-commit@gnu.org; Wed, 31 Jan 2007 02:53:31 +0000 To: gnash-commit@gnu.org Message-Id: From: Ann Barcomb Date: Wed, 31 Jan 2007 02:53:31 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash/devtools/lib X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jan 2007 02:54:00 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Ann Barcomb 07/01/31 02:53:31 New directory: devtools/lib CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/devtools/lib/?cvsroot=gnash From MAILER-DAEMON Tue Jan 30 21:54:12 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HC5bw-00078f-20 for mharc-gnash-commit@gnu.org; Tue, 30 Jan 2007 21:54:12 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HC5bv-00078X-HH for gnash-commit@gnu.org; Tue, 30 Jan 2007 21:54:11 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HC5bv-000789-03 for gnash-commit@gnu.org; Tue, 30 Jan 2007 21:54:11 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HC5bu-000786-SQ for gnash-commit@gnu.org; Tue, 30 Jan 2007 21:54:10 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HC5bu-0006M8-GH for gnash-commit@gnu.org; Tue, 30 Jan 2007 21:54:10 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HC5bT-0003tN-Vw for gnash-commit@gnu.org; Wed, 31 Jan 2007 02:53:44 +0000 Received: from ann by savannah.gnu.org with local (Exim 4.50) id 1HC5bT-0003tK-Pn for gnash-commit@gnu.org; Wed, 31 Jan 2007 02:53:43 +0000 To: gnash-commit@gnu.org Message-Id: From: Ann Barcomb Date: Wed, 31 Jan 2007 02:53:43 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash/devtools/lib/Gnash X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jan 2007 02:54:11 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Ann Barcomb 07/01/31 02:53:43 New directory: devtools/lib/Gnash CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/devtools/lib/Gnash/?cvsroot=gnash From MAILER-DAEMON Tue Jan 30 21:55:05 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HC5cn-0007DF-8o for mharc-gnash-commit@gnu.org; Tue, 30 Jan 2007 21:55:05 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HC5ck-0007D1-OO for gnash-commit@gnu.org; Tue, 30 Jan 2007 21:55:02 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HC5cj-0007BC-0H for gnash-commit@gnu.org; Tue, 30 Jan 2007 21:55:01 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HC5ci-0007B9-RI for gnash-commit@gnu.org; Tue, 30 Jan 2007 21:55:00 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HC5ci-0006Ua-AL for gnash-commit@gnu.org; Tue, 30 Jan 2007 21:55:00 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HC5ch-0003vB-T7 for gnash-commit@gnu.org; Wed, 31 Jan 2007 02:54:59 +0000 Received: from ann by savannah.gnu.org with local (Exim 4.50) id 1HC5ch-0003v8-Lz for gnash-commit@gnu.org; Wed, 31 Jan 2007 02:54:59 +0000 To: gnash-commit@gnu.org Message-Id: From: Ann Barcomb Date: Wed, 31 Jan 2007 02:54:59 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash ChangeLog devtools/lib/Gnash/Distribution... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jan 2007 02:55:02 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Ann Barcomb 07/01/31 02:54:59 Modified files: . : ChangeLog Added files: devtools/lib/Gnash: Distribution.pm Utils.pm devtools/testsuite: uncuddled_else.t Log message: This change introduces some libraries and an initial coding standards test. More will be written about it on the dev mailing list. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2200&r2=1.2201 http://cvs.savannah.gnu.org/viewcvs/gnash/devtools/lib/Gnash/Distribution.pm?cvsroot=gnash&rev=1.1 http://cvs.savannah.gnu.org/viewcvs/gnash/devtools/lib/Gnash/Utils.pm?cvsroot=gnash&rev=1.1 http://cvs.savannah.gnu.org/viewcvs/gnash/devtools/testsuite/uncuddled_else.t?cvsroot=gnash&rev=1.1 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2200 retrieving revision 1.2201 diff -u -b -r1.2200 -r1.2201 --- ChangeLog 30 Jan 2007 23:05:42 -0000 1.2200 +++ ChangeLog 31 Jan 2007 02:54:59 -0000 1.2201 @@ -1,3 +1,14 @@ +2007-01-30 Ann Barcomb + + * Added: devtools/lib/Gnash/Distribution.pm and + devtools/lib/Gnash/Utils.pm + These libraries will be used to support the devtools/testsuite + tests, which are tests intended to increase conformance with + coding standards. + * Added devtools/testsuite/uncuddled_else.t + It is a test which searches for instances of uncuddled elses + in C++ source files. + 2007-01-30 Martin Guy * config.mk.in, compatibility_include.h: Remove unused GAMESWF defines Index: devtools/lib/Gnash/Distribution.pm =================================================================== RCS file: devtools/lib/Gnash/Distribution.pm diff -N devtools/lib/Gnash/Distribution.pm --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ devtools/lib/Gnash/Distribution.pm 31 Jan 2007 02:54:59 -0000 1.1 @@ -0,0 +1,288 @@ +package Gnash::Distribution; + +use strict; +use warnings; + +use Data::Dumper; +use File::Spec; +use FindBin qw/$Bin/; +use File::Find; + +my $dist; + +sub new { + my( $class ) = @_; + + return $dist if defined $dist; + my $self = bless {}, $class; + return $self->_initialize; +} + +{ + no warnings 'File::Find'; + my @found_files; + sub _initialize { + my( $self ) = @_; + + my $dist = $Bin.'/../..'; + _croak(undef, + "Failed to find distribution root; did you move the test directory?" + ) unless (-d $dist); + + find(\&_search_for_files, $dist); + if( defined $dist ) { + $self->_dist_files( [ + @found_files + ] ); + } + + return $self; + } + + sub _search_for_files { + ## Get only files, which are not in the CVS directory or otherwise + ## related to CVS/subversion. Prune might make this more efficient. + return unless (-f $_); + return if ($File::Find::name =~ m|/CVS/| || + $File::Find::name =~ m|/\.svn/| || + $File::Find::name =~ m|\.svnignore/| || + $File::Find::name =~ m|/\.cvsignore/|); + + push @found_files, $File::Find::name; + } + +} + +sub _croak { + my( $self, @message ) = @_; + require Carp; + Carp::croak(@message); +} + +BEGIN { + my @getter_setters = qw{ _dist_files }; + + for my $method ( @getter_setters ) { + no strict 'refs'; + + *$method = sub { + my $self = shift; + unless (@_) { + $self->{$method} ||= []; + return wantarray + ? @{ $self->{$method} } + : $self->{$method}; + } + $self->{$method} = shift; + return $self; + }; + } +} + + +BEGIN { + my %file_class = ( + source => { + cpp => { file_exts => ['cpp', 'cc'] }, + m4 => { file_exts => ['m4'] }, + }, + header => { + cpp => { file_exts => ['h'] }, + }, + ); + + ## Some of this can probably be cropped out, since we're ignoring dirs + my @ignore_dirs = qw{ .svn CVS }; + + for my $class ( keys %file_class ) { + for my $type ( keys %{ $file_class{$class} } ) { + no strict 'refs'; + + my @exts = @{ $file_class{$class}{$type}{file_exts} }; + my @exceptions = defined $file_class{$class}{$type}{except_dirs} + ? @{ $file_class{$class}{$type}{except_dirs} } + : (); + my $method = join '_' => $type, $class; + my $filter_ext = join '|' => map { "\\.${_}\$" } @exts; + my $filter_dir = join '|' => + map { qr{\b$_\b} } + map { quotemeta($_) } + @ignore_dirs, + @exceptions; + + next unless $method; + + *{ $method . '_file_directories' } = sub { + my $self = shift; + + # Look through the distribution files for + # file endings in the proper extensions and make + # a hash out of the directories. + my %dirs = + map { ( ( File::Spec->splitpath($_) )[1] => 1 ) } + grep { m|(?i)(?:$filter_ext)| } + $self->_dist_files; + + # Filter out ignored directories + # and return the results + return + sort + grep { + -d File::Spec->catdir($_) and File::Spec->catdir($_) + } grep { !m|(?:$filter_dir)| + } keys %dirs; + }; + + + *{ $method . '_files' } = sub { + my( $self ) = @_; + + # Look through the filelist + # for files ending in the proper extension(s) + # and return a sorted list of filenames + return + sort + grep { m|(?i)(?:$filter_ext)| } + $self->_dist_files; + }; + } + } +} + + +sub get_m4_language_files { + my $self = shift; + + my @files = ( + $self->m4_source_files, + ); + + my @m4_language_files = (); + foreach my $file ( @files ) { + next if $self->is_m4_exemption($file); + push @m4_language_files, $file; + } + + return @m4_language_files; +} + +{ + my @exemptions; + + sub is_m4_exemption { + my( $self, $file ) = @_; + + push @exemptions => map { File::Spec->canonpath($_) } qw{ + } unless @exemptions; + + $file->path =~ /\Q$_\E$/ && return 1 + for @exemptions; + return; + } +} + +sub get_cpp_language_files { + my $self = shift; + + my @files = ( + $self->cpp_source_files, + $self->cpp_header_files, + ); + + my @cpp_language_files = (); + foreach my $file ( @files ) { + next if $self->is_cpp_exemption($file); + push @cpp_language_files, $file; + } + + return @cpp_language_files; +} + + +{ + my @exemptions; + + sub is_cpp_exemption { + my( $self, $file ) = @_; + + push @exemptions => map { File::Spec->canonpath($_) } qw{ + } unless @exemptions; + + $file->path =~ /\Q$_\E$/ && return 1 + for @exemptions; + return; + } +} + + +1; + +=pod + +=head1 NAME + +Gnash::Distribution - Get information about files in the Gnash distribution + +=head1 SYNOPSIS + + use Gnash::Distribution; + + my $dist = Gnash::Distribution->new(); + my @cpp = $dist->get_cpp_language_files(); ## Get all C++ files + +=head1 DESCRIPTION + +This module can generate a list of all files found in your checkout of +the Gnash distribution. Particular categories of files can then be +requested. + +In order to find files, it works on the assumption that it will be used +by files in the directory devtools/testsuite, which will be located within +the Gnash top-level checkout directory. + +=head1 METHODS + +=over 4 + +=item new() + +The constructor will search the file system as described above, then +create a list of all files in the top-level checkout directory or in +nested directories. It will throw an exception if the distribution +root is not found. + +=item get_cpp_language_files() + +This method will return an array containing all C++ files, which includes +files ending with the following extensions: .h, .cc, and .cpp. + +=item get_m4_language_files() + +This method returns an array containing all files ending with the .m4 +extension. + +=back + +=head1 AUTHORS + +Ann Barcomb and Jerry Gay, based upon ideas from the Parrot +L test suite. + +=head1 COPYRIGHT + +Copyright (C) 2007 Free Software Foundation, Inc. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +=cut Index: devtools/lib/Gnash/Utils.pm =================================================================== RCS file: devtools/lib/Gnash/Utils.pm diff -N devtools/lib/Gnash/Utils.pm --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ devtools/lib/Gnash/Utils.pm 31 Jan 2007 02:54:59 -0000 1.1 @@ -0,0 +1,150 @@ +package Gnash::Utils; + +use strict; +use warnings; +use Exporter 'import'; +our @EXPORT_OK = qw/ + clean + clean_cpp_comment + clean_c_comment + clean_single_quoted_string + clean_double_quoted_string +/; + +sub clean { + return + clean_cpp_comment( + clean_c_comment( + clean_single_quoted_string( + clean_double_quoted_string( + $_[0] + ) + ) + ) + ); +} + +sub clean_cpp_comment { + my $string = shift; + $string =~ s{ // .* }{}gx; + return $string; +} + +sub clean_c_comment { + my $string = shift; + $string =~ s{ /\* .*? \*/ }{}gsx; + return $string; +} + +sub clean_single_quoted_string { + my $string = shift; + $string =~ s{ (?: ' (?: \\\\ | \\' | [^'] )* ' ) }{}gsx; + return $string; +} + +sub clean_double_quoted_string { + my $string = shift; + $string =~ s{ (?: " (?: \\\\ | \\" | [^"] )* " ) }{}gsx; + return $string; +} + +1; + +=pod + +=head1 NAME + +Gnash::Utils - Utility functions for the coding standards test suite. + +=head1 SYNOPSIS + + use Gnash::Utils qw/clean/; + + clean($source_code); + +=head1 DESCRIPTION + +It is easier to run tests which check code quality if the code doesn't +contain comments or quoted strings. This module provides some functions +to remove these distractions from the source code. + +=head1 FUNCTIONS + +All functions may be optionally imported. + +=over 4 + +=item clean($source) + +This function calls C, +C, C, and C +and returns a string. It expects to receive the entire contents of a source +file. + +=item clean_cpp_comment($source) + +This routine removes comments which begin with C. It can operate on +an entire file or on just a single line of source code. It returns the +modified input as a string. For instance, + return 1; // return true + +becomes: + return 1; + +=item clean_c_comment($source) + +This function removes comments of the C style. It expects +to receive the entire source code and will return the modified code as a +string. For example, + /* This is a + comment */ + return 1; + +becomes: + return 1; + +=item clean_single_quoted_string($source) + +This routine will remove single quoted strings. It expects to receive the +entire source code and will return the modified code as a string. For +instance, + return 'hello world'; + +becomes + return ; + +=item clean_double_quoted_string($source) + +This routine will remove double quoted strings. It expects to receive the +entire source code and will return the modified code as a string. For +instance, + return "hello world"; + +becomes + return ; + +=back + +=head1 AUTHORS + +Ann Barcomb + +=head1 COPYRIGHT + +Copyright (C) 2007 Free Software Foundation, Inc. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +=cut + Index: devtools/testsuite/uncuddled_else.t =================================================================== RCS file: devtools/testsuite/uncuddled_else.t diff -N devtools/testsuite/uncuddled_else.t --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ devtools/testsuite/uncuddled_else.t 31 Jan 2007 02:54:59 -0000 1.1 @@ -0,0 +1,102 @@ +#! perl + +use strict; +use warnings; + +use FindBin qw/$Bin/; +use lib $Bin.'/../lib'; +use Test::More tests => 1; +use Gnash::Distribution; +use Gnash::Utils qw/clean/; + +my $DIST = Gnash::Distribution->new; + +## Jerry Gay explained that this construction was needed because Windows +## does not get @ARGV the same way as most systems. +my @files = @ARGV + ? ( $^O eq 'MSwin32' ? <@ARGV> : @ARGV ) + : $DIST->get_cpp_language_files(); + +my @failures; + +foreach my $path (@files) { + open my $fh, '<', $path + or die "Cannot open '$path' for reading: $!\n"; + + my $prefix = qq< $path line(s):>; + my $message = ''; + + ## Read in the entire file, as some of the cleaning spans lines + local $/ = undef; + my $entire_file = clean(<$fh>); + my @lines = split /\n/, $entire_file; + + ## We need the array index to report the correct line number. + foreach my $i (0..$#lines) { + my $string = $lines[$i]; + + ## Skip unless we find uncuddled elses. First look for left-hand + ## failures, then right-hand failures. + next unless ($string =~ /^\s*else/ || + $string =~ /^\s*}?\s*else[^{]*$/); + $message .= " ".($i+1); + } + push @failures => "$prefix$message\n" if ($message); + close $fh; +} + +ok( !scalar(@failures), "uncuddled else" ) + or diag( "uncuddled else found in ".scalar @failures." files:\n@failures" ); + +=head1 NAME + +devtools/testsuite/uncuddled_else.t - checks for uncuddled elses in C++ source and headers + +=head1 SYNOPSIS + + # test all files + % prove devtools/testsuite/uncuddled_else.t + + # test specific files + % perl devtools/testsuite/uncuddled_else.t recently/modified/file + +=head1 DESCRIPTION + +This test checks for code which contains uncuddled elses. + +These are examples of cuddled elses: + } else { + } else (blah) { + +And these are examples of uncuddled elses, which will make the test fail: + } else + { + + } + else { + + else return false; + +=head1 AUTHORS + +Ann Barcomb , based upon ideas from the Parrot +L test suite. + +=head1 COPYRIGHT + +Copyright (C) 2007 Free Software Foundation, Inc. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +=cut From MAILER-DAEMON Wed Jan 31 03:14:57 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HCAcL-0003oA-Q5 for mharc-gnash-commit@gnu.org; Wed, 31 Jan 2007 03:14:57 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HCAcJ-0003nd-6C for gnash-commit@gnu.org; Wed, 31 Jan 2007 03:14:55 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HCAcI-0003nR-Ow for gnash-commit@gnu.org; Wed, 31 Jan 2007 03:14:54 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HCAcI-0003nO-In for gnash-commit@gnu.org; Wed, 31 Jan 2007 03:14:54 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HCAcI-0001zU-Bo for gnash-commit@gnu.org; Wed, 31 Jan 2007 03:14:54 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HCAcH-0000B8-By for gnash-commit@gnu.org; Wed, 31 Jan 2007 08:14:53 +0000 Received: from zoulunkai by savannah.gnu.org with local (Exim 4.50) id 1HCAcH-0000B5-4P for gnash-commit@gnu.org; Wed, 31 Jan 2007 08:14:53 +0000 To: gnash-commit@gnu.org Message-Id: From: Zou Lunkai Date: Wed, 31 Jan 2007 08:14:53 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash/testsuite/misc-ming.all goto_frame_test.c X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jan 2007 08:14:55 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Zou Lunkai 07/01/31 08:14:53 Modified files: testsuite/misc-ming.all: goto_frame_test.c Log message: add test for consecutive goto CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/goto_frame_test.c?cvsroot=gnash&r1=1.3&r2=1.4 Patches: Index: goto_frame_test.c =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/goto_frame_test.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -b -r1.3 -r1.4 --- goto_frame_test.c 29 Jan 2007 07:44:46 -0000 1.3 +++ goto_frame_test.c 31 Jan 2007 08:14:53 -0000 1.4 @@ -21,8 +21,6 @@ * * Test for ActionGotoFrame * - * the root movie has 4 frames which contains another 3-framed movieClip named mc_red. - * At _root's 2st frame, tell mc_red to goto 3rd frame and stop. */ #include @@ -67,25 +65,38 @@ SWFMovieClip_add(mc_red, (SWFBlock)sh_red); SWFMovieClip_nextFrame(mc_red);//1st frame SWFMovieClip_nextFrame(mc_red);//2st frame - add_clip_actions(mc_red, "var flag = \"action_executed\"; "); + add_clip_actions(mc_red, "var flag = \"action_executed\"; \ + var x = \"mc_red.frame3\";\ + play();"); SWFMovieClip_nextFrame(mc_red);//3nd frame + add_clip_actions(mc_red, "x = \"mc_red.frame4\"; \ + stop();"); + SWFMovieClip_nextFrame(mc_red);//4th frame + SWFDisplayItem it_red; it_red = SWFMovie_add(mo, (SWFBlock)mc_red); SWFDisplayItem_setDepth(it_red, 3); SWFDisplayItem_setName(it_red, "mc_red"); add_actions(mo, " check_equals(mc_red._currentframe, 1); \ mc_red.gotoAndStop(3); \ - check_equals(mc_red._currentframe, 3);"); - + check_equals(mc_red._currentframe, 3); \ + _root.goAndStop(3); "); SWFMovie_nextFrame(mo); //2nd frame + add_actions(mo, " _root.gotoAndStop(4); \ + mc_red.x = \"_root.frame3\"; "); SWFMovie_nextFrame(mo); //3nd frame + add_actions(mo, " _root.gotoAndStop(5); \ + mc_red.x = \"_root.frame4\"; "); + SWFMovie_nextFrame(mo); //4nd frame + //checks check_equals(mo, "_root.mc_red.flag", "'action_executed'"); + check_equals(mo, "_root.mc_red.x", "'_root.frame4'"); add_actions(mo, " _root.totals(); stop(); "); - SWFMovie_nextFrame(mo); //4th frame + SWFMovie_nextFrame(mo); //5th frame //Output movie puts("Saving " OUTPUT_FILENAME ); From MAILER-DAEMON Wed Jan 31 04:01:24 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HCBLI-0000Wd-50 for mharc-gnash-commit@gnu.org; Wed, 31 Jan 2007 04:01:24 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HCBLG-0000WA-Px for gnash-commit@gnu.org; Wed, 31 Jan 2007 04:01:22 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HCBLF-0000Va-VB for gnash-commit@gnu.org; Wed, 31 Jan 2007 04:01:22 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HCBLF-0000VV-R5 for gnash-commit@gnu.org; Wed, 31 Jan 2007 04:01:21 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HCBLF-0000CL-DM for gnash-commit@gnu.org; Wed, 31 Jan 2007 04:01:21 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HCBLE-0002mq-JU for gnash-commit@gnu.org; Wed, 31 Jan 2007 09:01:20 +0000 Received: from zoulunkai by savannah.gnu.org with local (Exim 4.50) id 1HCBLE-0002mn-6C for gnash-commit@gnu.org; Wed, 31 Jan 2007 09:01:20 +0000 To: gnash-commit@gnu.org Message-Id: From: Zou Lunkai Date: Wed, 31 Jan 2007 09:01:20 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash ChangeLog X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jan 2007 09:01:23 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Zou Lunkai 07/01/31 09:01:20 Modified files: . : ChangeLog Log message: update goto_frame_test.c CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2201&r2=1.2202 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2201 retrieving revision 1.2202 diff -u -b -r1.2201 -r1.2202 --- ChangeLog 31 Jan 2007 02:54:59 -0000 1.2201 +++ ChangeLog 31 Jan 2007 09:01:19 -0000 1.2202 @@ -1,3 +1,8 @@ +2007-01-29 Zou Lunkai + + * testsuite/misc-ming.all/goto_frame_test.c: + add test for consecutive goto + 2007-01-30 Ann Barcomb * Added: devtools/lib/Gnash/Distribution.pm and From MAILER-DAEMON Wed Jan 31 04:17:53 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HCBbF-0004qR-4G for mharc-gnash-commit@gnu.org; Wed, 31 Jan 2007 04:17:53 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HCBbD-0004qA-BF for gnash-commit@gnu.org; Wed, 31 Jan 2007 04:17:51 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HCBbB-0004py-N1 for gnash-commit@gnu.org; Wed, 31 Jan 2007 04:17:50 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HCBbB-0004pt-D8 for gnash-commit@gnu.org; Wed, 31 Jan 2007 04:17:49 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HCBbB-0002iP-2E for gnash-commit@gnu.org; Wed, 31 Jan 2007 04:17:49 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HCBav-0003Ek-ST for gnash-commit@gnu.org; Wed, 31 Jan 2007 09:17:33 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1HCBav-0003Ee-JT for gnash-commit@gnu.org; Wed, 31 Jan 2007 09:17:33 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Wed, 31 Jan 2007 09:17:33 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/ButtonE... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jan 2007 09:17:51 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/31 09:17:33 Modified files: . : ChangeLog testsuite/misc-ming.all: ButtonEventsTest-Runner.cpp ButtonEventsTest.c Log message: * testsuite/misc-ming.all/: ButtonEventTest.c, ButtonEventTest-Runner.cpp: added some (failing) tests for user defined event handlers. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2202&r2=1.2203 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/ButtonEventsTest-Runner.cpp?cvsroot=gnash&r1=1.8&r2=1.9 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/ButtonEventsTest.c?cvsroot=gnash&r1=1.4&r2=1.5 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2202 retrieving revision 1.2203 diff -u -b -r1.2202 -r1.2203 --- ChangeLog 31 Jan 2007 09:01:19 -0000 1.2202 +++ ChangeLog 31 Jan 2007 09:17:32 -0000 1.2203 @@ -1,4 +1,10 @@ -2007-01-29 Zou Lunkai +2007-01-31 Sandro Santilli + + * testsuite/misc-ming.all/: ButtonEventTest.c, + ButtonEventTest-Runner.cpp: added some (failing) + tests for user defined event handlers. + +2007-01-30 Zou Lunkai * testsuite/misc-ming.all/goto_frame_test.c: add test for consecutive goto Index: testsuite/misc-ming.all/ButtonEventsTest-Runner.cpp =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/ButtonEventsTest-Runner.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -b -r1.8 -r1.9 --- testsuite/misc-ming.all/ButtonEventsTest-Runner.cpp 29 Nov 2006 08:23:45 -0000 1.8 +++ testsuite/misc-ming.all/ButtonEventsTest-Runner.cpp 31 Jan 2007 09:17:32 -0000 1.9 @@ -34,12 +34,13 @@ using namespace std; void -test_mouse_activity(MovieTester& tester, const character* text) +test_mouse_activity(MovieTester& tester, const character* text, const character* text2) { // roll over the middle of the square, this should change // the textfield value. tester.movePointerTo(60, 60); check_equals(string(text->get_text_value()), string("MouseOver")); + xcheck_equals(string(text2->get_text_value()), string("RollOver")); check(tester.isMouseOverMouseEntity()); // TODO: check that pixel @ 60,60 is yellow ! @@ -47,6 +48,7 @@ // the textfield value. tester.pressMouseButton(); check_equals(string(text->get_text_value()), string("MouseDown")); + xcheck_equals(string(text2->get_text_value()), string("Press")); check(tester.isMouseOverMouseEntity()); // TODO: check that pixel @ 60,60 is green ! @@ -54,6 +56,7 @@ // the textfield value. tester.depressMouseButton(); check_equals(string(text->get_text_value()), string("MouseUp")); + xcheck_equals(string(text2->get_text_value()), string("Release")); check(tester.isMouseOverMouseEntity()); // TODO: check that pixel @ 60,60 is yellow ! @@ -61,6 +64,7 @@ // the textfield value. tester.movePointerTo(39, 60); check_equals(string(text->get_text_value()), string("MouseOut")); + xcheck_equals(string(text2->get_text_value()), string("RollOut")); check(!tester.isMouseOverMouseEntity()); // TODO: check that pixel @ 60,60 is red ! @@ -68,6 +72,7 @@ // as we're outside of the button. tester.pressMouseButton(); check_equals(string(text->get_text_value()), string("MouseOut")); + xcheck_equals(string(text2->get_text_value()), string("RollOut")); check(!tester.isMouseOverMouseEntity()); // TODO: check that pixel @ 60,60 is red ! @@ -75,8 +80,27 @@ // as we're outside of the button. tester.depressMouseButton(); check_equals(string(text->get_text_value()), string("MouseOut")); + xcheck_equals(string(text2->get_text_value()), string("RollOut")); check(!tester.isMouseOverMouseEntity()); // TODO: check that pixel @ 60,60 is red ! + + // Now press the mouse inside and release outside + tester.movePointerTo(60, 60); + check_equals(string(text->get_text_value()), string("MouseOver")); + xcheck_equals(string(text2->get_text_value()), string("RollOver")); + check(tester.isMouseOverMouseEntity()); + // TODO: check that pixel @ 60,60 is yellow ! + tester.pressMouseButton(); + check_equals(string(text->get_text_value()), string("MouseDown")); + xcheck_equals(string(text2->get_text_value()), string("Press")); + check(tester.isMouseOverMouseEntity()); + // TODO: check that pixel @ 60,60 is green ! + tester.movePointerTo(39, 60); + // The following might be correct, as the character still catches releaseOutside events + //check(tester.isMouseOverMouseEntity()); + tester.depressMouseButton(); + xcheck_equals(string(text->get_text_value()), string("MouseUpOutside")); + xcheck_equals(string(text2->get_text_value()), string("ReleaseOutside")); } int @@ -85,6 +109,8 @@ string filename = INPUT_FILENAME; MovieTester tester(filename); + std::string idleString = "Idle"; + sprite_instance* root = tester.getRootMovie(); assert(root); @@ -99,11 +125,19 @@ const character* text = tester.findDisplayItemByName(*root, "textfield"); check(text); - check_equals(string(text->get_text_value()), string("Play with the button")); + const character* text2 = tester.findDisplayItemByName(*root, "textfield2"); + check(text2); + + const character* text3 = tester.findDisplayItemByName(*root, "textfield3"); + check(text3); + + check_equals(string(text->get_text_value()), idleString); + check_equals(string(text2->get_text_value()), idleString); + check_equals(string(text3->get_text_value()), idleString); check(!tester.isMouseOverMouseEntity()); // TODO: check that pixel @ 60,60 is red ! - for (int fno=0; fnoget_frame_count(); fno++) + for (size_t fno=0; fnoget_frame_count(); fno++) { const character* square_back = tester.findDisplayItemByDepth(*root, 1); const character* square_front = tester.findDisplayItemByDepth(*root, 3); @@ -127,10 +161,11 @@ check_equals(root->get_current_frame(), fno); info (("testing mouse activity in frame %d", root->get_current_frame())); - test_mouse_activity(tester, text); + test_mouse_activity(tester, text, text2); + + // TODO: test key presses ! + // They seem NOT to trigger immediate redraw - // TODO: check why we need this !! - // I wouldn't want the first advance to be needed tester.advance(); } Index: testsuite/misc-ming.all/ButtonEventsTest.c =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/ButtonEventsTest.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- testsuite/misc-ming.all/ButtonEventsTest.c 22 Nov 2006 11:44:40 -0000 1.4 +++ testsuite/misc-ming.all/ButtonEventsTest.c 31 Jan 2007 09:17:32 -0000 1.5 @@ -50,7 +50,7 @@ void add_event(SWFMovie mo, const char* name, const char* event, const char* action); void add_code(SWFMovie mo, const char* code); -void add_text_field(SWFMovie mo, const char* name, int depth); +void add_text_field(SWFMovie mo, const char* name, const char* varname, const char* initial_label, int depth, int x, int y); void set_text(SWFMovie mo, const char* text); SWFDisplayItem add_square(SWFMovie mo, byte r, byte g, byte b, int depth); @@ -104,8 +104,10 @@ SWFButton_addAction(bu, compileSWFActionCode("_root.msg=\"MouseOver\";"), SWFBUTTON_MOUSEOVER); SWFButton_addAction(bu, compileSWFActionCode("_root.msg=\"MouseDown\";"), SWFBUTTON_MOUSEDOWN); SWFButton_addAction(bu, compileSWFActionCode("_root.msg=\"MouseUp\";"), SWFBUTTON_MOUSEUP); + SWFButton_addAction(bu, compileSWFActionCode("_root.msg=\"MouseUpOutside\";"), SWFBUTTON_MOUSEUPOUTSIDE); - SWFMovieClip_add(mc, (SWFBlock)bu); + it = SWFMovieClip_add(mc, (SWFBlock)bu); + SWFDisplayItem_setName(it, "button"); SWFMovieClip_nextFrame(mc); /* showFrame */ it = SWFMovie_add(mo, (SWFBlock)mc); @@ -113,23 +115,31 @@ } void -add_text_field(SWFMovie mo, const char* name, int depth) +add_text_field(SWFMovie mo, const char* name, const char* varname, const char* initial_label, int depth, int x, int y) { SWFDisplayItem it; SWFTextField tf = newSWFTextField(); - /*SWFTextField_setFlags(tf, SWFTEXTFIELD_DRAWBOX);*/ - SWFTextField_setFont(tf, (void*)font); SWFTextField_addChars(tf, " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ012345689:.,/\\#@?!"); - SWFTextField_addString(tf, "Play with the button"); - SWFTextField_setVariableName(tf, name); + SWFTextField_setVariableName(tf, varname); + SWFTextField_addString(tf, "Idle"); + SWFTextField_setBounds(tf, 120, 12); + SWFTextField_setFlags(tf, SWFTEXTFIELD_DRAWBOX|SWFTEXTFIELD_NOEDIT); it = SWFMovie_add(mo, (SWFBlock)tf); - //SWFDisplayItem_scale(it, 0.3, 0.3); - SWFDisplayItem_moveTo(it, 0, 10); - //SWFTextField_setBounds(tf, 120*(1/0.3), 10*(1/0.3)); + SWFDisplayItem_moveTo(it, x, y+2); SWFDisplayItem_setDepth(it, depth); - SWFDisplayItem_setName(it, "textfield"); + SWFDisplayItem_setName(it, name); // "textfield"); + + // Label + tf = newSWFTextField(); + SWFTextField_setFont(tf, (void*)font); + SWFTextField_addString(tf, initial_label); + SWFTextField_setFlags(tf, SWFTEXTFIELD_DRAWBOX|SWFTEXTFIELD_NOEDIT); + it = SWFMovie_add(mo, (SWFBlock)tf); + SWFDisplayItem_scale(it, 0.3, 0.3); + SWFDisplayItem_setDepth(it, depth*10); + SWFDisplayItem_moveTo(it, x, y); } void @@ -162,7 +172,7 @@ mo = newSWFMovie(); SWFMovie_setDimension(mo, 120, 120); - SWFMovie_setRate(mo, 0.2); + SWFMovie_setRate(mo, 1); if ( argc>1 ) srcdir=argv[1]; else @@ -181,7 +191,9 @@ /*SWFBrowserFont bfont = newSWFBrowserFont("_sans");*/ font = loadSWFFontFromFile(font_file); - add_text_field(mo, "_root.msg", 10); + add_text_field(mo, "textfield", "_root.msg", "Button events", 10, 0, 5); + add_text_field(mo, "textfield2", "_root.msg2", "Key events", 11, 0, 100); + add_text_field(mo, "textfield3", "_root.msg3", "Mouse events", 12, 0, 80); /***************************************************** * @@ -190,10 +202,27 @@ *****************************************************/ it = add_button(mo); - SWFDisplayItem_moveTo(it, 40, 40); + SWFDisplayItem_moveTo(it, 40, 30); SWFDisplayItem_setName(it, "square1"); SWFDisplayItem_setDepth(it, 2); + // Mouse pointer events + add_actions(mo, "square1.button.onRollOver = function() { _root.msg2 = 'RollOver'; };"); + add_actions(mo, "square1.button.onRollOut = function() { _root.msg2 = 'RollOut'; };"); + + // Mouse buttons events + add_actions(mo, "square1.button.onPress = function() { _root.msg2 = 'Press'; };"); + add_actions(mo, "square1.button.onRelease = function() { _root.msg2 = 'Release'; };"); + add_actions(mo, "square1.button.onReleaseOutside = function() { _root.msg2 = 'ReleaseOutside'; };"); + + // Focus events + add_actions(mo, "square1.button.onSetFocus = function() { _root.msg3 = 'SetFocus'; };"); + + // Key events - button needs focus for these to work + add_actions(mo, "square1.button.onKeyDown = function() { _root.msg3 = 'KeyDown'; };"); + add_actions(mo, "square1.button.onKeyUp = function() { _root.msg3 = 'KeyUp'; };"); + + SWFMovie_nextFrame(mo); /* showFrame */ /***************************************************** From MAILER-DAEMON Wed Jan 31 04:21:57 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HCBfA-0006HS-Vz for mharc-gnash-commit@gnu.org; Wed, 31 Jan 2007 04:21:57 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HCBf9-0006H7-9s for gnash-commit@gnu.org; Wed, 31 Jan 2007 04:21:55 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HCBf0-0006G0-Qz for gnash-commit@gnu.org; Wed, 31 Jan 2007 04:21:55 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HCBf0-0006Fw-CG for gnash-commit@gnu.org; Wed, 31 Jan 2007 04:21:46 -0500 Received: from [217.59.8.147] (helo=freek.keybit.net) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.52) id 1HCBey-0003KG-Mv for gnash-commit@gnu.org; Wed, 31 Jan 2007 04:21:45 -0500 Received: (from strk@localhost) by freek.keybit.net (8.11.1/8.11.1) id l0V9KDD93337; Wed, 31 Jan 2007 10:20:13 +0100 (CET) (envelope-from strk@keybit.net) From: strk Date: Wed, 31 Jan 2007 10:20:13 +0100 To: Zou Lunkai Subject: Re: [Gnash-commit] gnash/testsuite/misc-ming.all goto_frame_test.c Message-ID: <20070131092013.GA92023@keybit.net> Mail-Followup-To: Zou Lunkai , gnash-commit@gnu.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-detected-kernel: FreeBSD 2.0-4.2 Cc: gnash-commit@gnu.org X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jan 2007 09:21:55 -0000 On Wed, Jan 31, 2007 at 08:14:53AM +0000, Zou Lunkai wrote: > CVSROOT: /sources/gnash > Module name: gnash > Changes by: Zou Lunkai 07/01/31 08:14:53 > > Modified files: > testsuite/misc-ming.all: goto_frame_test.c > > Log message: > add test for consecutive goto > add_actions(mo, " check_equals(mc_red._currentframe, 1); \ > mc_red.gotoAndStop(3); \ > - check_equals(mc_red._currentframe, 3);"); > - > + check_equals(mc_red._currentframe, 3); \ > + _root.goAndStop(3); "); Is this a typo ? ^^^^^^ --strk; From MAILER-DAEMON Wed Jan 31 04:28:49 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HCBlp-0008NC-EM for mharc-gnash-commit@gnu.org; Wed, 31 Jan 2007 04:28:49 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HCBln-0008My-QF for gnash-commit@gnu.org; Wed, 31 Jan 2007 04:28:47 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HCBlm-0008Mm-LB for gnash-commit@gnu.org; Wed, 31 Jan 2007 04:28:47 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HCBlm-0008Mj-DL for gnash-commit@gnu.org; Wed, 31 Jan 2007 04:28:46 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HCBlm-0004w3-3k for gnash-commit@gnu.org; Wed, 31 Jan 2007 04:28:46 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HCBlk-0003R9-P0 for gnash-commit@gnu.org; Wed, 31 Jan 2007 09:28:44 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1HCBlk-0003R5-8j for gnash-commit@gnu.org; Wed, 31 Jan 2007 09:28:44 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Wed, 31 Jan 2007 09:28:44 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash ChangeLog server/button_character_instanc... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jan 2007 09:28:48 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/31 09:28:44 Modified files: . : ChangeLog server : button_character_instance.cpp Log message: * server/button_character_instance.cpp (on_event): added verbose output for unsupported button events. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2203&r2=1.2204 http://cvs.savannah.gnu.org/viewcvs/gnash/server/button_character_instance.cpp?cvsroot=gnash&r1=1.24&r2=1.25 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2203 retrieving revision 1.2204 diff -u -b -r1.2203 -r1.2204 --- ChangeLog 31 Jan 2007 09:17:32 -0000 1.2203 +++ ChangeLog 31 Jan 2007 09:28:43 -0000 1.2204 @@ -1,5 +1,7 @@ 2007-01-31 Sandro Santilli + * server/button_character_instance.cpp (on_event): + added verbose output for unsupported button events. * testsuite/misc-ming.all/: ButtonEventTest.c, ButtonEventTest-Runner.cpp: added some (failing) tests for user defined event handlers. Index: server/button_character_instance.cpp =================================================================== RCS file: /sources/gnash/gnash/server/button_character_instance.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -u -b -r1.24 -r1.25 --- server/button_character_instance.cpp 18 Jan 2007 22:53:21 -0000 1.24 +++ server/button_character_instance.cpp 31 Jan 2007 09:28:44 -0000 1.25 @@ -196,12 +196,14 @@ } // called from keypress listener only +// (the above line is wrong, it's also called with onConstruct, for instance) bool button_character_instance::on_event(const event_id& id) { if (id.m_id != event_id::KEY_PRESS) { + log_warning("Unsupported event for button instance: %s", id.get_function_name().c_str()); return false; } From MAILER-DAEMON Wed Jan 31 05:01:50 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HCCHm-0001qB-5k for mharc-gnash-commit@gnu.org; Wed, 31 Jan 2007 05:01:50 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HCCHj-0001q5-Ms for gnash-commit@gnu.org; Wed, 31 Jan 2007 05:01:47 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HCCHh-0001pt-LG for gnash-commit@gnu.org; Wed, 31 Jan 2007 05:01:47 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HCCHh-0001pq-Fl for gnash-commit@gnu.org; Wed, 31 Jan 2007 05:01:45 -0500 Received: from wr-out-0506.google.com ([64.233.184.227]) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HCCHg-00027f-Uy for gnash-commit@gnu.org; Wed, 31 Jan 2007 05:01:45 -0500 Received: by wr-out-0506.google.com with SMTP id i22so143167wra for ; Wed, 31 Jan 2007 02:01:44 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=FdxY9N+iBG4hBexd9FuAkO/rG0DMbsv9vNb4LhM66GQ11+XyM4La0eXJxNzs+nFx155DvhmVJn4CozRzrcekKMlcIcKX3L3k3dtkfybY7aarqLsW2/F6JTQnnAMORWAS6AgKksC/MTs6iqXaTb3/yWqGXIs0/MwbcH4/XsY6Itw= Received: by 10.115.17.1 with SMTP id u1mr36718wai.1170237704070; Wed, 31 Jan 2007 02:01:44 -0800 (PST) Received: by 10.114.109.18 with HTTP; Wed, 31 Jan 2007 02:01:43 -0800 (PST) Message-ID: Date: Wed, 31 Jan 2007 18:01:43 +0800 From: "zou lunkai" To: "Zou Lunkai" , gnash-commit@gnu.org Subject: Re: [Gnash-commit] gnash/testsuite/misc-ming.all goto_frame_test.c In-Reply-To: <20070131092013.GA92023@keybit.net> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_69_28422830.1170237703994" References: <20070131092013.GA92023@keybit.net> X-detected-kernel: Linux 2.4-2.6 (Google crawlbot) Cc: X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jan 2007 10:01:48 -0000 ------=_Part_69_28422830.1170237703994 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 1/31/07, strk wrote: > > On Wed, Jan 31, 2007 at 08:14:53AM +0000, Zou Lunkai wrote: > > CVSROOT: /sources/gnash > > Module name: gnash > > Changes by: Zou Lunkai 07/01/31 08:14:53 > > > > Modified files: > > testsuite/misc-ming.all: goto_frame_test.c > > > > Log message: > > add test for consecutive goto > > > add_actions(mo, " check_equals(mc_red._currentframe, 1); \ > > mc_red.gotoAndStop(3); \ > > - check_equals(mc_red._currentframe, 3);"); > > - > > + check_equals(mc_red._currentframe, 3); \ > > + _root.goAndStop(3); "); > > Is this a typo ? ^^^^^^ > > It's not. Dose it fail anything there? I just add more tests, but not > fail anything here right now. ------=_Part_69_28422830.1170237703994 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
On 1/31/07, strk <strk@keybit.net> wrote:
On Wed, Jan 31, 2007 at 08:14:53AM +0000, Zou Lunkai wrote:
> CVSROOT:      /sources/gnash
> Module name:  gnash
> Changes by:   Zou Lunkai <zoulunkai>  07/01/31 08:14:53
>
> Modified files:
>       testsuite/misc-ming.all: goto_frame_test.c
>
> Log message:
>       add test for consecutive goto

>    add_actions(mo, " check_equals(mc_red._currentframe, 1);  \
>                      mc_red.gotoAndStop(3); \
> -                    check_equals(mc_red._currentframe, 3);");
> -
> +                    check_equals(mc_red._currentframe, 3); \
> +                    _root.goAndStop(3); ");

Is this a typo ?             ^^^^^^

It's not. Dose it fail anything  there? I just add more tests, but not fail anything here right now.
 
 

 

 

------=_Part_69_28422830.1170237703994-- From MAILER-DAEMON Wed Jan 31 06:06:13 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HCDI5-00037L-R6 for mharc-gnash-commit@gnu.org; Wed, 31 Jan 2007 06:06:13 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HCDI4-00036D-FK for gnash-commit@gnu.org; Wed, 31 Jan 2007 06:06:12 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HCDI3-00034d-Qj for gnash-commit@gnu.org; Wed, 31 Jan 2007 06:06:12 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HCDI3-00034T-Nh for gnash-commit@gnu.org; Wed, 31 Jan 2007 06:06:11 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HCDI2-00035P-N3 for gnash-commit@gnu.org; Wed, 31 Jan 2007 06:06:10 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HCDI1-0008KQ-OJ for gnash-commit@gnu.org; Wed, 31 Jan 2007 11:06:09 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1HCDI1-0008KN-CT for gnash-commit@gnu.org; Wed, 31 Jan 2007 11:06:09 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Wed, 31 Jan 2007 11:06:09 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash ChangeLog server/sprite_instance.cpp X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jan 2007 11:06:12 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/31 11:06:09 Modified files: . : ChangeLog server : sprite_instance.cpp Log message: * server/sprite_instance.cpp (goto_frame): fix check for target frame being already loaded. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2204&r2=1.2205 http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.141&r2=1.142 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2204 retrieving revision 1.2205 diff -u -b -r1.2204 -r1.2205 --- ChangeLog 31 Jan 2007 09:28:43 -0000 1.2204 +++ ChangeLog 31 Jan 2007 11:06:09 -0000 1.2205 @@ -1,5 +1,7 @@ 2007-01-31 Sandro Santilli + * server/sprite_instance.cpp (goto_frame): fix + check for target frame being already loaded. * server/button_character_instance.cpp (on_event): added verbose output for unsupported button events. * testsuite/misc-ming.all/: ButtonEventTest.c, Index: server/sprite_instance.cpp =================================================================== RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v retrieving revision 1.141 retrieving revision 1.142 diff -u -b -r1.141 -r1.142 --- server/sprite_instance.cpp 30 Jan 2007 18:29:40 -0000 1.141 +++ server/sprite_instance.cpp 31 Jan 2007 11:06:09 -0000 1.142 @@ -2665,18 +2665,22 @@ } size_t loaded_frames = get_loaded_frames(); - if ( target_frame_number > loaded_frames ) + // target_frame_number is 0-based, get_loaded_frames() is 1-based + // so in order to goto_frame(3) loaded_frames must be at least 4 + // if goto_frame(4) is called, and loaded_frames is 4 we're jumping + // forward + if ( target_frame_number >= loaded_frames ) { IF_VERBOSE_ASCODING_ERRORS( log_aserror("GotoFrame(" SIZET_FMT ") targets a yet " "to be loaded frame (" SIZET_FMT ") loaded).\n" "We'll wait for it but a more correct form " "is explicitly using WaitForFrame instead.", - target_frame_number, + target_frame_number+1, loaded_frames); ); - m_def->ensure_frame_loaded(target_frame_number); + m_def->ensure_frame_loaded(target_frame_number+1); } m_current_frame = target_frame_number; From MAILER-DAEMON Wed Jan 31 06:10:15 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HCDLz-0004JK-00 for mharc-gnash-commit@gnu.org; Wed, 31 Jan 2007 06:10:15 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HCDLx-0004JB-Ht for gnash-commit@gnu.org; Wed, 31 Jan 2007 06:10:13 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HCDLx-0004Iz-4C for gnash-commit@gnu.org; Wed, 31 Jan 2007 06:10:13 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HCDLx-0004Iw-0W for gnash-commit@gnu.org; Wed, 31 Jan 2007 06:10:13 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HCDLw-0003bZ-NF for gnash-commit@gnu.org; Wed, 31 Jan 2007 06:10:12 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HCDLw-0008Se-99 for gnash-commit@gnu.org; Wed, 31 Jan 2007 11:10:12 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1HCDLv-0008Sb-WB for gnash-commit@gnu.org; Wed, 31 Jan 2007 11:10:12 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Wed, 31 Jan 2007 11:10:11 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash/server sprite_instance.cpp X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jan 2007 11:10:13 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/31 11:10:11 Modified files: server : sprite_instance.cpp Log message: print actionscript error on a single line to be grep-friendly CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.142&r2=1.143 Patches: Index: sprite_instance.cpp =================================================================== RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v retrieving revision 1.142 retrieving revision 1.143 diff -u -b -r1.142 -r1.143 --- sprite_instance.cpp 31 Jan 2007 11:06:09 -0000 1.142 +++ sprite_instance.cpp 31 Jan 2007 11:10:11 -0000 1.143 @@ -2673,7 +2673,7 @@ { IF_VERBOSE_ASCODING_ERRORS( log_aserror("GotoFrame(" SIZET_FMT ") targets a yet " - "to be loaded frame (" SIZET_FMT ") loaded).\n" + "to be loaded frame (" SIZET_FMT ") loaded). " "We'll wait for it but a more correct form " "is explicitly using WaitForFrame instead.", target_frame_number+1, From MAILER-DAEMON Wed Jan 31 06:18:24 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HCDTs-0005rb-2M for mharc-gnash-commit@gnu.org; Wed, 31 Jan 2007 06:18:24 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HCDTq-0005rP-3t for gnash-commit@gnu.org; Wed, 31 Jan 2007 06:18:22 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HCDTp-0005rD-ME for gnash-commit@gnu.org; Wed, 31 Jan 2007 06:18:21 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HCDTp-0005rA-KC for gnash-commit@gnu.org; Wed, 31 Jan 2007 06:18:21 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HCDTp-0004dl-Cx for gnash-commit@gnu.org; Wed, 31 Jan 2007 06:18:21 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HCDTp-0000R0-1p for gnash-commit@gnu.org; Wed, 31 Jan 2007 11:18:21 +0000 Received: from zoulunkai by savannah.gnu.org with local (Exim 4.50) id 1HCDTo-0000Qx-S2 for gnash-commit@gnu.org; Wed, 31 Jan 2007 11:18:21 +0000 To: gnash-commit@gnu.org Message-Id: From: Zou Lunkai Date: Wed, 31 Jan 2007 11:18:20 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash/testsuite/misc-ming.all goto_frame_test.c X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jan 2007 11:18:22 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Zou Lunkai 07/01/31 11:18:20 Modified files: testsuite/misc-ming.all: goto_frame_test.c Log message: typos CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/goto_frame_test.c?cvsroot=gnash&r1=1.4&r2=1.5 Patches: Index: goto_frame_test.c =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/goto_frame_test.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- goto_frame_test.c 31 Jan 2007 08:14:53 -0000 1.4 +++ goto_frame_test.c 31 Jan 2007 11:18:20 -0000 1.5 @@ -81,7 +81,7 @@ add_actions(mo, " check_equals(mc_red._currentframe, 1); \ mc_red.gotoAndStop(3); \ check_equals(mc_red._currentframe, 3); \ - _root.goAndStop(3); "); + _root.gotoAndStop(3); "); SWFMovie_nextFrame(mo); //2nd frame add_actions(mo, " _root.gotoAndStop(4); \ From MAILER-DAEMON Wed Jan 31 10:12:07 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HCH82-0002iD-Vp for mharc-gnash-commit@gnu.org; Wed, 31 Jan 2007 10:12:07 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HCH80-0002i8-Tx for gnash-commit@gnu.org; Wed, 31 Jan 2007 10:12:04 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HCH7w-0002hw-WE for gnash-commit@gnu.org; Wed, 31 Jan 2007 10:12:04 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HCH7w-0002ht-Q4 for gnash-commit@gnu.org; Wed, 31 Jan 2007 10:12:00 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HCH7w-0001Al-AS for gnash-commit@gnu.org; Wed, 31 Jan 2007 10:12:00 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HCH7u-0002mW-Px for gnash-commit@gnu.org; Wed, 31 Jan 2007 15:11:58 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1HCH7u-0002mT-EU for gnash-commit@gnu.org; Wed, 31 Jan 2007 15:11:58 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Wed, 31 Jan 2007 15:11:58 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash ChangeLog server/button_character_instanc... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jan 2007 15:12:05 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/31 15:11:58 Modified files: . : ChangeLog server : button_character_instance.cpp button_character_instance.h character.cpp character.h sprite_instance.cpp testsuite/misc-ming.all: ButtonEventsTest-Runner.cpp Log message: * server/button_character_instance.{h,cpp}: Use getter-setter properties, and avoid override of get_member/set_member methods. * server/character.{cpp,h}: define more generic getter-setters. * server/sprite_instance.cpp: use character class statics for onload and onrollout events * testsuite/misc-ming.all/ButtonEventsTest-Runner.cpp: expect less failures :) CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2205&r2=1.2206 http://cvs.savannah.gnu.org/viewcvs/gnash/server/button_character_instance.cpp?cvsroot=gnash&r1=1.25&r2=1.26 http://cvs.savannah.gnu.org/viewcvs/gnash/server/button_character_instance.h?cvsroot=gnash&r1=1.10&r2=1.11 http://cvs.savannah.gnu.org/viewcvs/gnash/server/character.cpp?cvsroot=gnash&r1=1.16&r2=1.17 http://cvs.savannah.gnu.org/viewcvs/gnash/server/character.h?cvsroot=gnash&r1=1.42&r2=1.43 http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.143&r2=1.144 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/ButtonEventsTest-Runner.cpp?cvsroot=gnash&r1=1.9&r2=1.10 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2205 retrieving revision 1.2206 diff -u -b -r1.2205 -r1.2206 --- ChangeLog 31 Jan 2007 11:06:09 -0000 1.2205 +++ ChangeLog 31 Jan 2007 15:11:57 -0000 1.2206 @@ -1,5 +1,17 @@ 2007-01-31 Sandro Santilli + * server/button_character_instance.{h,cpp}: + Use getter-setter properties, and avoid override + of get_member/set_member methods. + * server/character.{cpp,h}: define more generic + getter-setters. + * server/sprite_instance.cpp: use character class + statics for onload and onrollout events + * testsuite/misc-ming.all/ButtonEventsTest-Runner.cpp: + expect less failures :) + +2007-01-31 Sandro Santilli + * server/sprite_instance.cpp (goto_frame): fix check for target frame being already loaded. * server/button_character_instance.cpp (on_event): Index: server/button_character_instance.cpp =================================================================== RCS file: /sources/gnash/gnash/server/button_character_instance.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -u -b -r1.25 -r1.26 --- server/button_character_instance.cpp 31 Jan 2007 09:28:44 -0000 1.25 +++ server/button_character_instance.cpp 31 Jan 2007 15:11:58 -0000 1.26 @@ -18,6 +18,7 @@ #include "sprite_instance.h" #include "movie_root.h" #include "VM.h" +#include "builtin_function.h" /** \page buttons Buttons and mouse behaviour @@ -149,6 +150,73 @@ namespace gnash { +static void +attachButtonInterface(as_object& o) +{ + //int target_version = o.getVM().getSWFVersion(); + + boost::intrusive_ptr gettersetter; + + // + // Properties (TODO: move to appropriate SWF version section) + // + + gettersetter = new builtin_function(&character::x_getset, NULL); + o.init_property("_x", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&character::y_getset, NULL); + o.init_property("_y", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&character::xscale_getset, NULL); + o.init_property("_xscale", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&character::yscale_getset, NULL); + o.init_property("_yscale", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&character::xmouse_getset, NULL); + o.init_property("_xmouse", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&character::ymouse_getset, NULL); + o.init_property("_ymouse", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&character::alpha_getset, NULL); + o.init_property("_alpha", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&character::visible_getset, NULL); + o.init_property("_visible", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&character::width_getset, NULL); + o.init_property("_width", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&character::height_getset, NULL); + o.init_property("_height", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&character::rotation_getset, NULL); + o.init_property("_rotation", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&character::parent_getset, NULL); + o.init_property("_parent", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&character::onrollover_getset, NULL); + o.init_property("onRollOver", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&character::onrollout_getset, NULL); + o.init_property("onRollOut", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&character::onpress_getset, NULL); + o.init_property("onPress", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&character::onrelease_getset, NULL); + o.init_property("onRelease", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&character::onreleaseoutside_getset, NULL); + o.init_property("onReleaseOutside", *gettersetter, *gettersetter); + + gettersetter = new builtin_function(&character::onload_getset, NULL); + o.init_property("onLoad", *gettersetter, *gettersetter); + +} + button_character_instance::button_character_instance( button_character_definition* def, character* parent, int id) @@ -161,6 +229,8 @@ { assert(m_def); + attachButtonInterface(*this); + int r, r_num = m_def->m_button_records.size(); m_record_character.resize(r_num); @@ -201,13 +271,13 @@ button_character_instance::on_event(const event_id& id) { +#if 0 if (id.m_id != event_id::KEY_PRESS) { log_warning("Unsupported event for button instance: %s", id.get_function_name().c_str()); return false; } - - bool called = false; +#endif static const event_id s_key[32] = { @@ -233,8 +303,13 @@ // 32-126 folows ASCII }; + bool called = false; + + sprite_instance* parent = get_parent()->to_movie(); + assert ( parent ); // Add appropriate actions to the movie's execute list... + // TODO: should we execute immediately instead ? for (size_t i = 0, ie=m_def->m_button_actions.size(); im_button_actions[i]; @@ -246,9 +321,7 @@ // Matching action. for (size_t j=0, je=ba.m_actions.size(); jto_movie(); - assert ( si ); - si->add_action_buffer(ba.m_actions[j]); + parent->add_action_buffer(ba.m_actions[j]); } called = true; } @@ -500,11 +573,22 @@ ActionExec exec(*ab, get_environment()); exec(); - //get_parent()->add_action_buffer(ab); } } }} + // check for built-in event handler. + as_value method; + if ( get_event_handler(event, &method) && ! method.is_undefined() ) + { + call_method0(method, &(get_environment()), this); + } + else + { + log_warning("No handler for event: %s", event.get_function_name().c_str()); + } + + // Call conventional attached method. // @@ TODO } @@ -547,157 +631,6 @@ // ActionScript overrides // -void -button_character_instance::set_member(const std::string& name, - const as_value& val) -{ - - // TODO: pull these up into a base class, to - // share as much as possible with sprite_instance. - as_standard_member std_member = get_standard_member(name); - switch (std_member) - { - default: - case M_INVALID_MEMBER: - break; - case M_VISIBLE: // _visible - { - m_visible = val.to_bool(); - return; - } - case M_ALPHA: // _alpha - { - // Set alpha modulate, in percent. - cxform cx = get_cxform(); - cx.m_[3][0] = infinite_to_fzero(val.to_number()) / 100.f; - set_cxform(cx); - //m_accept_anim_moves = false; - return; - } - case M_X: // _x - { - matrix m = get_matrix(); // @@ get_world_matrix()??? - m.m_[0][2] = infinite_to_fzero(PIXELS_TO_TWIPS(val.to_number())); - this->set_matrix(m); - return; - } - case M_Y: // _y - { - matrix m = get_matrix(); // @@ get_world_matrix()??? - m.m_[1][2] = infinite_to_fzero(PIXELS_TO_TWIPS(val.to_number())); - this->set_matrix(m); - return; - } -// evan : need set_width and set_height function for struct character -#if 0 - case M_WIDTH: // _width - { - for (int i = 0; i < m_def->m_button_records.size(); i++) - { - button_record& rec = m_def->m_button_records[i]; - if (m_record_character[i] == NULL) - { - continue; - } - if ((m_mouse_state == UP && rec.m_up) - || (m_mouse_state == DOWN && rec.m_down) - || (m_mouse_state == OVER && rec.m_over)) - { - m_record_character[i]->set_width(val.to_number); - // @@ evan: should we return here? - return; - } - } - - return; - } - //What is this from??? - /*else if (name == "enabled") - { - m_enabled = val.to_bool(); - }*/ - case M_HEIGHT: // _height - { - for (int i = 0; i < m_def->m_button_records.size(); i++) - { - button_record& rec = m_def->m_button_records[i]; - if (m_record_character[i] == NULL) - { - continue; - } - if ((m_mouse_state == UP && rec.m_up) - || (m_mouse_state == DOWN && rec.m_down) - || (m_mouse_state == OVER && rec.m_over)) - { - m_record_character[i]->set_height(val.to_number); - // @@ evan: should we return here? - return; - } - } - - return; - } -#endif - } - - log_error("button_character_instance::set_member('%s', '%s') not implemented yet", - name.c_str(), - val.to_string()); -} - -bool -button_character_instance::get_member(const std::string& name, as_value* val) -{ - // TODO: pull these up into a base class, to - // share as much as possible with sprite_instance. - as_standard_member std_member = get_standard_member(name); - switch (std_member) - { - default: - case M_INVALID_MEMBER: - break; - case M_VISIBLE: // _visible - { - val->set_bool(this->get_visible()); - return true; - } - case M_ALPHA: // _alpha - { - // @@ TODO this should be generic to struct character! - // Alpha units are in percent. - val->set_double(get_cxform().m_[3][0] * 100.f); - return true; - } - case M_X: // _x - { - matrix m = get_matrix(); // @@ get_world_matrix()??? - val->set_double(TWIPS_TO_PIXELS(m.m_[0][2])); - return true; - } - case M_Y: // _y - { - matrix m = get_matrix(); // @@ get_world_matrix()??? - val->set_double(TWIPS_TO_PIXELS(m.m_[1][2])); - return true; - } - case M_WIDTH: // _width - { - float width = get_width(); - if ( width ) width = TWIPS_TO_PIXELS(width); - val->set_double(width); - return true; - } - case M_HEIGHT: // _height - { - float width = get_height(); - if ( width ) width = TWIPS_TO_PIXELS(width); - val->set_double(width); - return true; - } - } // end of switch - - return false; -} void button_character_instance::get_invalidated_bounds(rect* bounds, bool force) Index: server/button_character_instance.h =================================================================== RCS file: /sources/gnash/gnash/server/button_character_instance.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -b -r1.10 -r1.11 --- server/button_character_instance.h 18 Jan 2007 22:53:21 -0000 1.10 +++ server/button_character_instance.h 31 Jan 2007 15:11:58 -0000 1.11 @@ -5,7 +5,7 @@ // SWF buttons. Mouse-sensitive update/display, actions, etc. -/* $Id: button_character_instance.h,v 1.10 2007/01/18 22:53:21 strk Exp $ */ +/* $Id: button_character_instance.h,v 1.11 2007/01/31 15:11:58 strk Exp $ */ #ifndef GNASH_BUTTON_CHARACTER_INSTANCE_H #define GNASH_BUTTON_CHARACTER_INSTANCE_H @@ -103,10 +103,6 @@ // ActionScript overrides // - virtual void set_member(const std::string& name, const as_value& val); - - virtual bool get_member(const std::string& name, as_value* val); - void get_invalidated_bounds(rect* bounds, bool force); Index: server/character.cpp =================================================================== RCS file: /sources/gnash/gnash/server/character.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -u -b -r1.16 -r1.17 --- server/character.cpp 30 Jan 2007 18:29:40 -0000 1.16 +++ server/character.cpp 31 Jan 2007 15:11:58 -0000 1.17 @@ -18,7 +18,7 @@ // // -/* $Id: character.cpp,v 1.16 2007/01/30 18:29:40 strk Exp $ */ +/* $Id: character.cpp,v 1.17 2007/01/31 15:11:58 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -225,6 +225,81 @@ } void +character::onrollout_getset(const fn_call& fn) +{ + character* ptr = ensure_character(fn.this_ptr); + + if ( fn.nargs == 0 ) // getter + { + ptr->get_event_handler(event_id::ROLL_OUT, fn.result); + } + else // setter + { + ptr->set_event_handler(event_id::ROLL_OUT, fn.arg(0)); + } +} + +void +character::onpress_getset(const fn_call& fn) +{ + character* ptr = ensure_character(fn.this_ptr); + + if ( fn.nargs == 0 ) // getter + { + ptr->get_event_handler(event_id::PRESS, fn.result); + } + else // setter + { + ptr->set_event_handler(event_id::PRESS, fn.arg(0)); + } +} + +void +character::onrelease_getset(const fn_call& fn) +{ + character* ptr = ensure_character(fn.this_ptr); + + if ( fn.nargs == 0 ) // getter + { + ptr->get_event_handler(event_id::RELEASE, fn.result); + } + else // setter + { + ptr->set_event_handler(event_id::RELEASE, fn.arg(0)); + } +} + +void +character::onreleaseoutside_getset(const fn_call& fn) +{ + character* ptr = ensure_character(fn.this_ptr); + + if ( fn.nargs == 0 ) // getter + { + ptr->get_event_handler(event_id::RELEASE_OUTSIDE, fn.result); + } + else // setter + { + ptr->set_event_handler(event_id::RELEASE_OUTSIDE, fn.arg(0)); + } +} + +void +character::onload_getset(const fn_call& fn) +{ + character* ptr = ensure_character(fn.this_ptr); + + if ( fn.nargs == 0 ) // getter + { + ptr->get_event_handler(event_id::LOAD, fn.result); + } + else // setter + { + ptr->set_event_handler(event_id::LOAD, fn.arg(0)); + } +} + +void character::x_getset(const fn_call& fn) { character* ptr = ensure_character(fn.this_ptr); Index: server/character.h =================================================================== RCS file: /sources/gnash/gnash/server/character.h,v retrieving revision 1.42 retrieving revision 1.43 diff -u -b -r1.42 -r1.43 --- server/character.h 30 Jan 2007 18:29:40 -0000 1.42 +++ server/character.h 31 Jan 2007 15:11:58 -0000 1.43 @@ -18,7 +18,7 @@ // // -/* $Id: character.h,v 1.42 2007/01/30 18:29:40 strk Exp $ */ +/* $Id: character.h,v 1.43 2007/01/31 15:11:58 strk Exp $ */ #ifndef GNASH_CHARACTER_H #define GNASH_CHARACTER_H @@ -134,6 +134,16 @@ static void onrollover_getset(const fn_call& fn); + static void onrollout_getset(const fn_call& fn); + + static void onload_getset(const fn_call& fn); + + static void onpress_getset(const fn_call& fn); + + static void onrelease_getset(const fn_call& fn); + + static void onreleaseoutside_getset(const fn_call& fn); + static void x_getset(const fn_call& fn); static void y_getset(const fn_call& fn); Index: server/sprite_instance.cpp =================================================================== RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v retrieving revision 1.143 retrieving revision 1.144 diff -u -b -r1.143 -r1.144 --- server/sprite_instance.cpp 31 Jan 2007 11:10:11 -0000 1.143 +++ server/sprite_instance.cpp 31 Jan 2007 15:11:58 -0000 1.144 @@ -1014,36 +1014,6 @@ } static void -sprite_onrollout_getset(const fn_call& fn) -{ - sprite_instance* ptr = ensure_sprite(fn.this_ptr); - - if ( fn.nargs == 0 ) // getter - { - ptr->get_event_handler(event_id::ROLL_OUT, fn.result); - } - else // setter - { - ptr->set_event_handler(event_id::ROLL_OUT, fn.arg(0)); - } -} - -static void -sprite_onload_getset(const fn_call& fn) -{ - sprite_instance* ptr = ensure_sprite(fn.this_ptr); - - if ( fn.nargs == 0 ) // getter - { - ptr->get_event_handler(event_id::LOAD, fn.result); - } - else // setter - { - ptr->set_event_handler(event_id::LOAD, fn.arg(0)); - } -} - -static void sprite_highquality_getset(const fn_call& fn) { sprite_instance* ptr = ensure_sprite(fn.this_ptr); @@ -1064,6 +1034,7 @@ } } +// TODO: move this to character class, _focusrect seems a generic property static void sprite_focusrect_getset(const fn_call& fn) { @@ -1191,10 +1162,10 @@ gettersetter = new builtin_function(&character::onrollover_getset, NULL); o.init_property("onRollOver", *gettersetter, *gettersetter); - gettersetter = new builtin_function(&sprite_onrollout_getset, NULL); + gettersetter = new builtin_function(&character::onrollout_getset, NULL); o.init_property("onRollOut", *gettersetter, *gettersetter); - gettersetter = new builtin_function(&sprite_onload_getset, NULL); + gettersetter = new builtin_function(&character::onload_getset, NULL); o.init_property("onLoad", *gettersetter, *gettersetter); #endif // ndef OLD_GET_MEMBER Index: testsuite/misc-ming.all/ButtonEventsTest-Runner.cpp =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/ButtonEventsTest-Runner.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -b -r1.9 -r1.10 --- testsuite/misc-ming.all/ButtonEventsTest-Runner.cpp 31 Jan 2007 09:17:32 -0000 1.9 +++ testsuite/misc-ming.all/ButtonEventsTest-Runner.cpp 31 Jan 2007 15:11:58 -0000 1.10 @@ -40,7 +40,7 @@ // the textfield value. tester.movePointerTo(60, 60); check_equals(string(text->get_text_value()), string("MouseOver")); - xcheck_equals(string(text2->get_text_value()), string("RollOver")); + check_equals(string(text2->get_text_value()), string("RollOver")); check(tester.isMouseOverMouseEntity()); // TODO: check that pixel @ 60,60 is yellow ! @@ -48,7 +48,7 @@ // the textfield value. tester.pressMouseButton(); check_equals(string(text->get_text_value()), string("MouseDown")); - xcheck_equals(string(text2->get_text_value()), string("Press")); + check_equals(string(text2->get_text_value()), string("Press")); check(tester.isMouseOverMouseEntity()); // TODO: check that pixel @ 60,60 is green ! @@ -56,7 +56,7 @@ // the textfield value. tester.depressMouseButton(); check_equals(string(text->get_text_value()), string("MouseUp")); - xcheck_equals(string(text2->get_text_value()), string("Release")); + check_equals(string(text2->get_text_value()), string("Release")); check(tester.isMouseOverMouseEntity()); // TODO: check that pixel @ 60,60 is yellow ! @@ -64,7 +64,7 @@ // the textfield value. tester.movePointerTo(39, 60); check_equals(string(text->get_text_value()), string("MouseOut")); - xcheck_equals(string(text2->get_text_value()), string("RollOut")); + check_equals(string(text2->get_text_value()), string("RollOut")); check(!tester.isMouseOverMouseEntity()); // TODO: check that pixel @ 60,60 is red ! @@ -72,7 +72,7 @@ // as we're outside of the button. tester.pressMouseButton(); check_equals(string(text->get_text_value()), string("MouseOut")); - xcheck_equals(string(text2->get_text_value()), string("RollOut")); + check_equals(string(text2->get_text_value()), string("RollOut")); check(!tester.isMouseOverMouseEntity()); // TODO: check that pixel @ 60,60 is red ! @@ -80,19 +80,19 @@ // as we're outside of the button. tester.depressMouseButton(); check_equals(string(text->get_text_value()), string("MouseOut")); - xcheck_equals(string(text2->get_text_value()), string("RollOut")); + check_equals(string(text2->get_text_value()), string("RollOut")); check(!tester.isMouseOverMouseEntity()); // TODO: check that pixel @ 60,60 is red ! // Now press the mouse inside and release outside tester.movePointerTo(60, 60); check_equals(string(text->get_text_value()), string("MouseOver")); - xcheck_equals(string(text2->get_text_value()), string("RollOver")); + check_equals(string(text2->get_text_value()), string("RollOver")); check(tester.isMouseOverMouseEntity()); // TODO: check that pixel @ 60,60 is yellow ! tester.pressMouseButton(); check_equals(string(text->get_text_value()), string("MouseDown")); - xcheck_equals(string(text2->get_text_value()), string("Press")); + check_equals(string(text2->get_text_value()), string("Press")); check(tester.isMouseOverMouseEntity()); // TODO: check that pixel @ 60,60 is green ! tester.movePointerTo(39, 60); From MAILER-DAEMON Wed Jan 31 10:24:25 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HCHJx-0005bH-7L for mharc-gnash-commit@gnu.org; Wed, 31 Jan 2007 10:24:25 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HCHJu-0005aO-Uf for gnash-commit@gnu.org; Wed, 31 Jan 2007 10:24:22 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HCHJu-0005a4-1C for gnash-commit@gnu.org; Wed, 31 Jan 2007 10:24:22 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HCHJt-0005a1-SX for gnash-commit@gnu.org; Wed, 31 Jan 2007 10:24:21 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HCHJt-0003TY-8u for gnash-commit@gnu.org; Wed, 31 Jan 2007 10:24:21 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HCHJm-00030q-CW for gnash-commit@gnu.org; Wed, 31 Jan 2007 15:24:14 +0000 Received: from bjacques by savannah.gnu.org with local (Exim 4.50) id 1HCHJm-00030n-19 for gnash-commit@gnu.org; Wed, 31 Jan 2007 15:24:14 +0000 To: gnash-commit@gnu.org Message-Id: From: Bastiaan Jacques Date: Wed, 31 Jan 2007 15:24:14 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash backend/render_handler_agg.cpp gui/README... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jan 2007 15:24:23 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Bastiaan Jacques 07/01/31 15:24:13 Modified files: backend : render_handler_agg.cpp gui : README fb.cpp fbsup.h fltk.cpp fltksup.h fltk_glue_agg.cpp fltk_glue_agg.h gtk.cpp gtk_glue_agg.cpp gtksup.h gui.cpp gui.h riscos.cpp riscossup.h sdl.cpp server : movie_root.h . : ChangeLog Log message: * backend/render_handler_agg.cpp, gui/{gui.cpp, gtk.cpp}: Do not subtract 1 from the rendering width and height (fixes bug #18904). * gui/README: update to current status. * gui: Rename Gui::set_invalidated_region to setInvalidatedRegion to match naming style. * gui/fltk{.cpp, sup.h, _glue_agg.cpp, _glue_agg.h}: Add a menu bar to the FLTK window. Make the AGG glue inherit from fltk::Widget, so it can be added to the FLTK window without interfering with menu drawing. Since the same hasn't yet been done for the Cairo glue, disable Cairo/FLTK for now. Account for the menu height when passing the mouse position to the rest of Gnash. Delay initialisation of the Glue until we are ready to add it to the FLTK window. Until we can solve rendering issues, disable region based clipping for AGG. Note that some FLTK menu items are not yet implemented. * gui/gtk{.cpp, _glue_agg.cpp}: Remove the unused valid_coord method. * gui/gui{.cpp, .h}: Declarations in the header, implementation in the .cpp file. Shuffle the order of declarations so they are grouped by type. * server/movie_root.h: set_invalidated_region is used across libraries, so visibility should be DSO_EXPORT. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/backend/render_handler_agg.cpp?cvsroot=gnash&r1=1.54&r2=1.55 http://cvs.savannah.gnu.org/viewcvs/gnash/gui/README?cvsroot=gnash&r1=1.5&r2=1.6 http://cvs.savannah.gnu.org/viewcvs/gnash/gui/fb.cpp?cvsroot=gnash&r1=1.20&r2=1.21 http://cvs.savannah.gnu.org/viewcvs/gnash/gui/fbsup.h?cvsroot=gnash&r1=1.12&r2=1.13 http://cvs.savannah.gnu.org/viewcvs/gnash/gui/fltk.cpp?cvsroot=gnash&r1=1.5&r2=1.6 http://cvs.savannah.gnu.org/viewcvs/gnash/gui/fltksup.h?cvsroot=gnash&r1=1.2&r2=1.3 http://cvs.savannah.gnu.org/viewcvs/gnash/gui/fltk_glue_agg.cpp?cvsroot=gnash&r1=1.3&r2=1.4 http://cvs.savannah.gnu.org/viewcvs/gnash/gui/fltk_glue_agg.h?cvsroot=gnash&r1=1.3&r2=1.4 http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gtk.cpp?cvsroot=gnash&r1=1.64&r2=1.65 http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gtk_glue_agg.cpp?cvsroot=gnash&r1=1.11&r2=1.12 http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gtksup.h?cvsroot=gnash&r1=1.33&r2=1.34 http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gui.cpp?cvsroot=gnash&r1=1.58&r2=1.59 http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gui.h?cvsroot=gnash&r1=1.43&r2=1.44 http://cvs.savannah.gnu.org/viewcvs/gnash/gui/riscos.cpp?cvsroot=gnash&r1=1.2&r2=1.3 http://cvs.savannah.gnu.org/viewcvs/gnash/gui/riscossup.h?cvsroot=gnash&r1=1.2&r2=1.3 http://cvs.savannah.gnu.org/viewcvs/gnash/gui/sdl.cpp?cvsroot=gnash&r1=1.50&r2=1.51 http://cvs.savannah.gnu.org/viewcvs/gnash/server/movie_root.h?cvsroot=gnash&r1=1.32&r2=1.33 http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2206&r2=1.2207 Patches: Index: backend/render_handler_agg.cpp =================================================================== RCS file: /sources/gnash/gnash/backend/render_handler_agg.cpp,v retrieving revision 1.54 retrieving revision 1.55 diff -u -b -r1.54 -r1.55 --- backend/render_handler_agg.cpp 17 Jan 2007 16:31:30 -0000 1.54 +++ backend/render_handler_agg.cpp 31 Jan 2007 15:24:13 -0000 1.55 @@ -16,7 +16,7 @@ -/* $Id: render_handler_agg.cpp,v 1.54 2007/01/17 16:31:30 bjacques Exp $ */ +/* $Id: render_handler_agg.cpp,v 1.55 2007/01/31 15:24:13 bjacques Exp $ */ // Original version by Udo Giacomozzi and Hannes Mayr, // INDUNET GmbH (www.indunet.it) @@ -523,7 +523,7 @@ m_pixf = new PixelFormat(m_rbuf); //m_rbase = new renderer_base(*m_pixf); --> does not work!!?? - _clipbounds.setTo(0, 0, xres-1, yres-1); + _clipbounds.setTo(0, 0, xres, yres); log_msg("initialized AGG buffer <%p>, %d bytes, %dx%d, rowsize is %d bytes", mem, size, x, y, row_size); @@ -1441,7 +1441,7 @@ // TODO: cache 'visiblerect' and maintain in sync with // xres/yres. - Range2d visiblerect(0, 0, xres-1, yres-1); + Range2d visiblerect(0, 0, xres, yres); _clipbounds = Intersection(pixbounds, visiblerect); } Index: gui/README =================================================================== RCS file: /sources/gnash/gnash/gui/README,v retrieving revision 1.5 retrieving revision 1.6 diff -u -b -r1.5 -r1.6 --- gui/README 16 Oct 2006 15:27:53 -0000 1.5 +++ gui/README 31 Jan 2007 15:24:13 -0000 1.6 @@ -32,10 +32,10 @@ GTK2: - implemented OpenGL, Agg and Cairo backends. - Events work. -- Pop-up menu is available. +- Pop-up menu is available. Window menu available for standalone. - Firefox plugin works. -SDL: +SDL: deprecated in favour of FLTK. - OpenGL, Agg and Cairo backends. - Mouse events work (keyboard events don't). - There's no pop-up menu (and there probably never will be one). @@ -47,7 +47,11 @@ - Klash plugin for konqueror is available. FLTK: -- Doesn't work just yet. +- Requires FLTK2. +- Implements Agg and Cairo backends. +- Events work. +- Popup menu is available. +- Firefox plugin and KDE Kpart work. Framebuffer: - Working as output device only, no input devices currently supported. Index: gui/fb.cpp =================================================================== RCS file: /sources/gnash/gnash/gui/fb.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -u -b -r1.20 -r1.21 --- gui/fb.cpp 2 Dec 2006 21:28:06 -0000 1.20 +++ gui/fb.cpp 31 Jan 2007 15:24:13 -0000 1.21 @@ -401,7 +401,7 @@ return y; } -void FBGui::set_invalidated_region(const rect& bounds) { +void FBGui::setInvalidatedRegion(const rect& bounds) { #ifdef DOUBLE_BUFFER @@ -419,7 +419,7 @@ #endif -} // set_invalidated_region +} // setInvalidatedRegion void FBGui::disable_terminal() { /* Index: gui/fbsup.h =================================================================== RCS file: /sources/gnash/gnash/gui/fbsup.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -b -r1.12 -r1.13 --- gui/fbsup.h 6 Dec 2006 10:58:34 -0000 1.12 +++ gui/fbsup.h 31 Jan 2007 15:24:13 -0000 1.13 @@ -105,7 +105,7 @@ virtual void setInterval(unsigned int interval); virtual void setTimeout(unsigned int timeout); - virtual void set_invalidated_region(const rect& bounds); + virtual void setInvalidatedRegion(const rect& bounds); }; // end of namespace gnash Index: gui/fltk.cpp =================================================================== RCS file: /sources/gnash/gnash/gui/fltk.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -b -r1.5 -r1.6 --- gui/fltk.cpp 25 Jan 2007 17:24:35 -0000 1.5 +++ gui/fltk.cpp 31 Jan 2007 15:24:13 -0000 1.6 @@ -25,6 +25,9 @@ #include #include #include +#include +#include +#include #include "fltksup.h" #include "gnash.h" @@ -36,13 +39,16 @@ using namespace std; using namespace fltk; + + namespace gnash { FltkGui::FltkGui(unsigned long xid, float scale, bool loop, unsigned int depth) : Window(0, 0), - Gui(xid, scale, loop, depth) + Gui(xid, scale, loop, depth), + _menu_height(_xid ? 0 : 20) { } @@ -55,14 +61,6 @@ void FltkGui::renderBuffer() { - redraw(); -} - -// All drawing operations (i.e., the drawing calls the renderer makes) must take -// place in draw(). -void -FltkGui::draw() -{ // FLTK has a nice mechanism where you can set damage() to whatever you want // so in draw() you can check what exactly you want to redraw. But // unfortunately it doesn't seem to remember what bits you turn on. So I'll @@ -71,12 +69,12 @@ if (firstRun) { // Redraw the whole rendering area. - rect draw_bounds(-1e10f, -1e10f, +1e10f, +1e10f); - set_invalidated_region(draw_bounds); + rect draw_bounds(0, 0, _width, _height); + setInvalidatedRegion(draw_bounds); firstRun = false; } - _glue.draw(); + _glue->redraw(); } int @@ -97,10 +95,13 @@ return true; case MOVE: { + if (!_xid && event_y() < _menu_height) { + return Window::handle(event); + } int x = event_x() / _xscale; - int y = event_y() / _yscale; + int y = (event_y() - _menu_height) / _yscale; notify_mouse_moved(x, y); - return true; + return Window::handle(event);; } case KEY: handleKey(event_key()); @@ -158,6 +159,7 @@ #endif }; + for (int i = 0; table[i].fltkKey; i++) { if (key == table[i].fltkKey) { gnash::notify_key_event(table[i].gnashKey, true); @@ -177,8 +179,6 @@ bool FltkGui::init(int argc, char **argv[]) { - _renderer = _glue.createRenderHandler(); - set_render_handler(_renderer); return true; } @@ -204,15 +204,32 @@ bool FltkGui::createWindow(const char* title, int width, int height) { - resize(width, height); + resize(width, _menu_height + height); - _glue.initBuffer(width, height); label(title); begin(); + + if (!_xid) { + MenuBar* menubar = new MenuBar(0, 0, width, _menu_height); + menubar->begin(); + addMenuItems(); + menubar->end(); + } +#ifdef RENDERER_AGG + _glue = new FltkAggGlue(0, _menu_height, width, height); +#elif defined(RENDERER_CAIRO) +#error FLTK/Cairo is currently broken. Please try again soon... + FltkCairoGlue _glue; +#endif createMenu(); end(); + _renderer = _glue->createRenderHandler(); + set_render_handler(_renderer); + + _glue->initBuffer(width, height); + // The minimum size of the window is 1x1 pixels. size_range (1, 1); @@ -221,15 +238,72 @@ return true; } -bool -FltkGui::createMenu() + +static void menu_fltk_open_file() { - _popup_menu = new PopupMenu(0, 0, w(), h()); - _popup_menu->type(PopupMenu::POPUP3); + const char *newfile = fltk::file_chooser("Open File", "*.swf", NULL); + if (!newfile) { + return; + } - _popup_menu->begin(); + // menu_open_file().. +} + +static void menu_fltk_save_file_as() +{ + const char* savefile = file_chooser("Save File as", NULL, NULL); + if (!savefile) { + return; + } + + // menu_save_file(); +} + +static void full(Widget*, void* ptr) +{ + GNASH_REPORT_FUNCTION; + + static bool fullscreen = false; + static Rectangle oldBounds; + + fullscreen = !fullscreen; + + FltkGui* gui = static_cast(ptr); + if (fullscreen) { + oldBounds.set(gui->x(), gui->y(), gui->w(), gui->h()); + gui->fullscreen(); + } else { + gui->fullscreen_off(oldBounds.x(), oldBounds.y(), oldBounds.w(), oldBounds.h()); + } +} + + +void +FltkGui::addMenuItems() +{ #define callback_cast(ptr) reinterpret_cast(ptr) + ItemGroup* file = new ItemGroup("File"); + file->begin(); + new Item("Open", 0, callback_cast(menu_fltk_open_file)); + new Item("Save as", 0, callback_cast(menu_fltk_save_file_as)); + //new Item("Save as..." 0, callback_cast(menu_fltk_save_as)); + new Item("Quit", 0, callback_cast(menu_quit)); + file->end(); + + ItemGroup* edit = new ItemGroup("Edit"); + edit->begin(); + new Item("Preferences"); + edit->end(); + + ItemGroup* view = new ItemGroup("View"); + view->begin(); + new Item("Double size"); + new Item("Fullscreen", 0, callback_cast(full), this); + view->end(); + + ItemGroup* movie_ctrl = new ItemGroup("Movie control"); + movie_ctrl->begin(); new Item("Play Movie", 0, callback_cast(menu_play)); new Item("Pause Movie", 0, callback_cast(menu_pause)); new Item("Stop Movie", 0, callback_cast(menu_stop)); @@ -239,8 +313,27 @@ new Item("Jump Forward 10 Frames", 0, callback_cast(menu_jump_forward)); new Item("Jump Backward 10 Frames", 0, callback_cast(menu_jump_backward)); new Item("Toggle Sound", 0, callback_cast(menu_toggle_sound)); - new Item("Quit", 0, callback_cast(menu_quit)); + movie_ctrl->end(); + + ItemGroup* help = new ItemGroup("Help"); + help->begin(); + new Item("About"); + help->end(); + #undef callback_cast +} + + + +bool +FltkGui::createMenu() +{ + _popup_menu = new PopupMenu(0, 0, w(), h()); + _popup_menu->type(PopupMenu::POPUP3); + + _popup_menu->begin(); + + addMenuItems(); _popup_menu->end(); @@ -250,10 +343,6 @@ void FltkGui::layout() { - if ((layout_damage() & LAYOUT_CHILD )) { - // We're not interested in children. Sorry. - return; - } if (!VM::isInitialized()) { // No movie yet; don't bother resizing anything. return; @@ -263,15 +352,15 @@ Window::layout(); if ((layout_damage() & LAYOUT_WH)) { - _glue.resize(w(), h()); - resize_view(w(), h()); + _glue->resize(w(), h() - _menu_height); + resize_view(w(), h() - _menu_height); } // Invalidate the whole drawing area. - rect draw_bounds(-1e10f, -1e10f, +1e10f, +1e10f); - set_invalidated_region(draw_bounds); + rect draw_bounds(0, 0, _width, _height); + setInvalidatedRegion(draw_bounds); - redraw(); + _glue->redraw(); } void @@ -294,9 +383,12 @@ } void -FltkGui::set_invalidated_region(const rect& bounds) +FltkGui::setInvalidatedRegion(const rect& bounds) { - _glue.invalidateRegion(bounds); +#if 0 + // temporarily disabled + _glue->invalidateRegion(bounds); +#endif } Index: gui/fltksup.h =================================================================== RCS file: /sources/gnash/gnash/gui/fltksup.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- gui/fltksup.h 16 Jan 2007 14:02:45 -0000 1.2 +++ gui/fltksup.h 31 Jan 2007 15:24:13 -0000 1.3 @@ -55,21 +55,23 @@ virtual void setCursor(gnash_cursor_type newcursor); virtual bool setupEvents() { return true;} - void set_invalidated_region(const rect& bounds); + void setInvalidatedRegion(const rect& bounds); void create(); - void draw(); int handle(int event); void layout(); + void addMenuItems(); private: void handleKey(unsigned key); fltk::PopupMenu *_popup_menu; float _interval; + unsigned int _menu_height; + #ifdef RENDERER_AGG - FltkAggGlue _glue; + FltkAggGlue *_glue; #elif defined(RENDERER_CAIRO) - FltkCairoGlue _glue; + FltkCairoGlue* _glue; #endif }; Index: gui/fltk_glue_agg.cpp =================================================================== RCS file: /sources/gnash/gnash/gui/fltk_glue_agg.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -b -r1.3 -r1.4 --- gui/fltk_glue_agg.cpp 16 Jan 2007 14:02:45 -0000 1.3 +++ gui/fltk_glue_agg.cpp 31 Jan 2007 15:24:13 -0000 1.4 @@ -32,8 +32,9 @@ namespace gnash { -FltkAggGlue::FltkAggGlue() - : _offscreenbuf(NULL) +FltkAggGlue::FltkAggGlue(int x, int y, int width, int height) + : Widget(x, y, width, height), + _offscreenbuf(NULL) { } @@ -77,7 +78,7 @@ _width = width; _height = height; - _validbounds.setTo(0, 0, _width-1, _height-1); + _validbounds.setTo(0, 0, _width, _height); _drawbounds = _validbounds; } @@ -93,7 +94,7 @@ fltk::drawimage(_offscreenbuf + offset, fltk::RGB, bounds, _stride); } -//miny*(_width*(_bpp/8)) + minx*(_bpp/8) + void FltkAggGlue::resize(int width, int height) { Index: gui/fltk_glue_agg.h =================================================================== RCS file: /sources/gnash/gnash/gui/fltk_glue_agg.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -b -r1.3 -r1.4 --- gui/fltk_glue_agg.h 16 Jan 2007 14:02:45 -0000 1.3 +++ gui/fltk_glue_agg.h 31 Jan 2007 15:24:13 -0000 1.4 @@ -21,6 +21,8 @@ #include "config.h" #endif +#include + #include "gnash.h" #include "log.h" #include "gui.h" @@ -33,10 +35,10 @@ namespace gnash { -class FltkAggGlue +class FltkAggGlue : public fltk::Widget { public: - FltkAggGlue(); + FltkAggGlue(int x, int y, int width, int height); ~FltkAggGlue(); // resize(int width, int height); void draw(); Index: gui/gtk.cpp =================================================================== RCS file: /sources/gnash/gnash/gui/gtk.cpp,v retrieving revision 1.64 retrieving revision 1.65 diff -u -b -r1.64 -r1.65 --- gui/gtk.cpp 23 Jan 2007 19:53:41 -0000 1.64 +++ gui/gtk.cpp 31 Jan 2007 15:24:13 -0000 1.65 @@ -17,7 +17,7 @@ // // -/* $Id: gtk.cpp,v 1.64 2007/01/23 19:53:41 martinwguy Exp $ */ +/* $Id: gtk.cpp,v 1.65 2007/01/31 15:24:13 bjacques Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -234,7 +234,7 @@ _width = width; _height = height; - _validbounds.setTo(0, 0, _width-1, _height-1); + _validbounds.setTo(0, 0, _width, _height); _drawbounds = _validbounds; glue.setRenderHandlerSize(_width, _height); @@ -251,16 +251,8 @@ _drawbounds.getMaxX(), _drawbounds.getMaxY()); } -int -GtkGui::valid_coord(int coord, int max) -{ - if (coord<0) return 0; - else if (coord>=max) return max; - return coord; -} - void -GtkGui::set_invalidated_region(const rect& bounds) +GtkGui::setInvalidatedRegion(const rect& bounds) { #ifdef RENDERER_AGG // forward to renderer @@ -998,7 +990,7 @@ // (look at the GdkEventExpose) rect draw_bounds; draw_bounds.set_world(); - gui->set_invalidated_region(draw_bounds); + gui->setInvalidatedRegion(draw_bounds); gui->renderBuffer(); Index: gui/gtk_glue_agg.cpp =================================================================== RCS file: /sources/gnash/gnash/gui/gtk_glue_agg.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -u -b -r1.11 -r1.12 --- gui/gtk_glue_agg.cpp 2 Nov 2006 14:00:12 -0000 1.11 +++ gui/gtk_glue_agg.cpp 31 Jan 2007 15:24:13 -0000 1.12 @@ -17,7 +17,7 @@ // // -/* $Id: gtk_glue_agg.cpp,v 1.11 2006/11/02 14:00:12 udog Exp $ */ +/* $Id: gtk_glue_agg.cpp,v 1.12 2007/01/31 15:24:13 bjacques Exp $ */ #include #include @@ -123,16 +123,6 @@ } -static int -valid_coord(int coord, int max) -{ - if (coord<0) return 0; - else if (coord>=max) return max; - - return coord; -} - - void GtkAggGlue::render() { Index: gui/gtksup.h =================================================================== RCS file: /sources/gnash/gnash/gui/gtksup.h,v retrieving revision 1.33 retrieving revision 1.34 diff -u -b -r1.33 -r1.34 --- gui/gtksup.h 10 Jan 2007 14:17:34 -0000 1.33 +++ gui/gtksup.h 31 Jan 2007 15:24:13 -0000 1.34 @@ -131,7 +131,7 @@ GdkPixbuf* create_pixbuf(const gchar *filename); - void set_invalidated_region(const rect& bounds); + void setInvalidatedRegion(const rect& bounds); virtual void setCursor(gnash_cursor_type newcursor); @@ -157,7 +157,6 @@ static gnash::key::code gdk_to_gnash_key(guint key); static void open_file(GtkWidget* dialog, gpointer data); - int valid_coord(int coord, int max); }; Index: gui/gui.cpp =================================================================== RCS file: /sources/gnash/gnash/gui/gui.cpp,v retrieving revision 1.58 retrieving revision 1.59 diff -u -b -r1.58 -r1.59 --- gui/gui.cpp 29 Jan 2007 09:31:39 -0000 1.58 +++ gui/gui.cpp 31 Jan 2007 15:24:13 -0000 1.59 @@ -132,7 +132,7 @@ // set new size ? _width = width; _height = height; - _validbounds.setTo(0, 0, _width-1, _height-1); + _validbounds.setTo(0, 0, _width, _height); //log_msg("new size (in twips) is: %dx%d", _width*20, _height*20); } @@ -302,9 +302,9 @@ // *new* invalidated region is visible // (helps debugging) rect worldregion; worldregion.set_world(); - set_invalidated_region(worldregion); + setInvalidatedRegion(worldregion); #else - set_invalidated_region(changed_bounds); + setInvalidatedRegion(changed_bounds); #endif // render the frame. @@ -392,6 +392,35 @@ { } +bool +Gui::want_redraw() +{ + return false; +} + +float +Gui::getXScale() +{ + return _xscale; +} + +float +Gui::getYScale() +{ + return _yscale; +} + +bool +Gui::loops() +{ + return _loop; +} + +void +Gui::setInvalidatedRegion (const rect& bounds) +{ +} + // end of namespace } Index: gui/gui.h =================================================================== RCS file: /sources/gnash/gnash/gui/gui.h,v retrieving revision 1.43 retrieving revision 1.44 diff -u -b -r1.43 -r1.44 --- gui/gui.h 10 Jan 2007 19:21:15 -0000 1.43 +++ gui/gui.h 31 Jan 2007 15:24:13 -0000 1.44 @@ -104,6 +104,11 @@ /// Register event handlers. virtual bool setupEvents() = 0; + /// Render the current buffer. + + /// For OpenGL, this means that the front and back buffers are swapped. + virtual void renderBuffer() = 0; + /// Gives the GUI a *hint* which region of the stage should be redrawn. // /// There is *no* restriction what the GUI might do with these coordinates. @@ -119,7 +124,6 @@ /// correct results. It is up to the GUI to forward this information to /// the renderer. /// - virtual void set_invalidated_region(const rect& /*bounds*/) { // does not need to be implemented (optional feature), // but still needs to be available. // @@ -130,52 +134,27 @@ // coordinate space, which is integer values... // The question really is: why floats for TWIPS ? // (guess this goes deep in the core/server libs) - } + virtual void setInvalidatedRegion(const rect& bounds); /// Asks the GUI handler if the next frame should be redrawn completely. // /// For example, when the contents of the player window have been destroyed, - /// then want_redraw() should return true so that set_invalidated_region() is + /// then want_redraw() should return true so that setInvalidatedRegion() is /// called with the coordinates of the complete screen. - virtual bool want_redraw() { - return false; - } + virtual bool want_redraw(); /// Sets the current mouse cursor for the Gui window. virtual void setCursor(gnash_cursor_type newcursor); - - /// Render the current buffer. - // - /// For OpenGL, this means that the buffer is swapped. - virtual void renderBuffer() = 0; - /// @return The value to which the movie width should be scaled. - float getXScale() { return _xscale; } + float getXScale(); /// @return The value to which the movie height shold be scaled. - float getYScale() { return _yscale; } + float getYScale(); /// @return Whether or not the movie should be looped indefinitely. - bool loops() { return _loop; } - - /** @name Menu callbacks - * These callbacks will be called when a menu item is clicked. - * @{ - */ - static void menu_restart(); - static void menu_quit(); - static void menu_about(); - static void menu_play(); - static void menu_pause(); - static void menu_stop(); - static void menu_step_forward(); - static void menu_step_backward(); - static void menu_jump_forward(); - static void menu_jump_backward(); - static void menu_toggle_sound(); - /// @} + bool loops(); /// Mouse notification callback to be called when the mouse is moved. // @@ -190,17 +169,35 @@ /// @param mask A binary representation of the buttons currently pressed. void notify_mouse_clicked(bool mouse_pressed, int mask); - /// \brief - /// Advances the movie to the next frame. This is to take place after the - /// interval specified in the call to setInterval(). - static bool advance_movie(Gui* gui); - /// Resize the client area view and the window accordingly. // /// @param width The desired width in pixels. /// @param height The desired height in pixels. void resize_view(int width, int height); + + /// \brief + /// Advances the movie to the next frame. This is to take place after the + /// interval specified in the call to setInterval(). + static bool advance_movie(Gui* gui); + + /** @name Menu callbacks + * These callbacks will be called when a menu item is clicked. + * @{ + */ + static void menu_restart(); + static void menu_quit(); + static void menu_about(); + static void menu_play(); + static void menu_pause(); + static void menu_stop(); + static void menu_step_forward(); + static void menu_step_backward(); + static void menu_jump_forward(); + static void menu_jump_backward(); + static void menu_toggle_sound(); + /// @} + protected: /// Determines if playback should restart after the movie ends. bool _loop; Index: gui/riscos.cpp =================================================================== RCS file: /sources/gnash/gnash/gui/riscos.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- gui/riscos.cpp 28 Nov 2006 12:34:47 -0000 1.2 +++ gui/riscos.cpp 31 Jan 2007 15:24:13 -0000 1.3 @@ -17,7 +17,7 @@ // // -/* $Id: riscos.cpp,v 1.2 2006/11/28 12:34:47 nihilus Exp $ */ +/* $Id: riscos.cpp,v 1.3 2007/01/31 15:24:13 bjacques Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -191,7 +191,7 @@ } void -RiscosGui::set_invalidated_region(const rect& bounds) +RiscosGui::setInvalidatedRegion(const rect& bounds) { // Note: Bounds coordinates are in TWIPS @@ -277,7 +277,7 @@ // TODO: Make this use the clipping rectangle (convert to TWIPS) rect bounds(-1e10f, -1e10f, 1e10f, 1e10f); #ifdef RENDERER_AGG - set_invalidated_region(bounds); + setInvalidatedRegion(bounds); #endif renderBuffer(); error = xwimp_get_rectangle(&block.redraw, &more); Index: gui/riscossup.h =================================================================== RCS file: /sources/gnash/gnash/gui/riscossup.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- gui/riscossup.h 28 Nov 2006 12:34:47 -0000 1.2 +++ gui/riscossup.h 31 Jan 2007 15:24:13 -0000 1.3 @@ -17,7 +17,7 @@ // // -/* $Id: riscossup.h,v 1.2 2006/11/28 12:34:47 nihilus Exp $ */ +/* $Id: riscossup.h,v 1.3 2007/01/31 15:24:13 bjacques Exp $ */ #ifndef __ROSUP_H__ #define __ROSUP_H__ @@ -55,7 +55,7 @@ virtual void renderBuffer(); virtual void setInterval(unsigned int interval); virtual void setTimeout(unsigned int timeout); - virtual void set_invalidated_region(const rect& bounds); + virtual void setInvalidatedRegion(const rect& bounds); private: Index: gui/sdl.cpp =================================================================== RCS file: /sources/gnash/gnash/gui/sdl.cpp,v retrieving revision 1.50 retrieving revision 1.51 diff -u -b -r1.50 -r1.51 --- gui/sdl.cpp 22 Dec 2006 09:21:00 -0000 1.50 +++ gui/sdl.cpp 31 Jan 2007 15:24:13 -0000 1.51 @@ -17,7 +17,7 @@ // // -/* $Id: sdl.cpp,v 1.50 2006/12/22 09:21:00 strk Exp $ */ +/* $Id: sdl.cpp,v 1.51 2007/01/31 15:24:13 bjacques Exp $ */ // XXXbjacques: Screw up the indentation in this file, and you're dead. And by // screw up, I mean not adhering the indentation used throughout @@ -324,7 +324,7 @@ void SDLGui::expose_event() { - // TODO: implement and use set_invalidated_region instead? + // TODO: implement and use setInvalidatedRegion instead? renderBuffer(); } Index: server/movie_root.h =================================================================== RCS file: /sources/gnash/gnash/server/movie_root.h,v retrieving revision 1.32 retrieving revision 1.33 diff -u -b -r1.32 -r1.33 --- server/movie_root.h 18 Jan 2007 22:53:21 -0000 1.32 +++ server/movie_root.h 31 Jan 2007 15:24:13 -0000 1.33 @@ -14,7 +14,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -/* $Id: movie_root.h,v 1.32 2007/01/18 22:53:21 strk Exp $ */ +/* $Id: movie_root.h,v 1.33 2007/01/31 15:24:13 bjacques Exp $ */ /// \page events_handling Handling of user events /// @@ -342,7 +342,7 @@ /// void set_active_entity(character* ch); - void get_invalidated_bounds(rect* bounds, bool force); + DSOEXPORT void get_invalidated_bounds(rect* bounds, bool force); /// Return true if the mouse pointer is over an active entity bool isMouseOverActiveEntity() const; Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2206 retrieving revision 1.2207 diff -u -b -r1.2206 -r1.2207 --- ChangeLog 31 Jan 2007 15:11:57 -0000 1.2206 +++ ChangeLog 31 Jan 2007 15:24:13 -0000 1.2207 @@ -1,3 +1,26 @@ +2007-01-31 Bastiaan Jacques + + * backend/render_handler_agg.cpp, gui/{gui.cpp, gtk.cpp}: Do not + subtract 1 from the rendering width and height (fixes bug #18904). + * gui/README: update to current status. + * gui: Rename Gui::set_invalidated_region to setInvalidatedRegion to + match naming style. + * gui/fltk{.cpp, sup.h, _glue_agg.cpp, _glue_agg.h}: Add a menu bar + to the FLTK window. Make the AGG glue inherit from fltk::Widget, so + it can be added to the FLTK window without interfering with menu + drawing. Since the same hasn't yet been done for the Cairo glue, + disable Cairo/FLTK for now. Account for the menu height when passing + the mouse position to the rest of Gnash. Delay initialisation of the + Glue until we are ready to add it to the FLTK window. Until we can + solve rendering issues, disable region based clipping for AGG. + Note that some FLTK menu items are not yet implemented. + * gui/gtk{.cpp, _glue_agg.cpp}: Remove the unused valid_coord method. + * gui/gui{.cpp, .h}: Declarations in the header, implementation in + the .cpp file. Shuffle the order of declarations so they are grouped + by type. + * server/movie_root.h: set_invalidated_region is used across libraries, + so visibility should be DSO_EXPORT. + 2007-01-31 Sandro Santilli * server/button_character_instance.{h,cpp}: From MAILER-DAEMON Wed Jan 31 10:50:13 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HCHiv-0004i9-GB for mharc-gnash-commit@gnu.org; Wed, 31 Jan 2007 10:50:13 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HCHiu-0004i4-UJ for gnash-commit@gnu.org; Wed, 31 Jan 2007 10:50:12 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HCHit-0004gQ-8O for gnash-commit@gnu.org; Wed, 31 Jan 2007 10:50:11 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HCHit-0004gM-2h for gnash-commit@gnu.org; Wed, 31 Jan 2007 10:50:11 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HCHis-0008Jx-P5 for gnash-commit@gnu.org; Wed, 31 Jan 2007 10:50:10 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HCHir-0004ru-Mo for gnash-commit@gnu.org; Wed, 31 Jan 2007 15:50:09 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1HCHir-0004rq-AU for gnash-commit@gnu.org; Wed, 31 Jan 2007 15:50:09 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Wed, 31 Jan 2007 15:50:09 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash server/as_object.cpp ChangeLog X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jan 2007 15:50:13 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/31 15:50:09 Modified files: server : as_object.cpp . : ChangeLog Log message: * server/as_object.cpp (set_member_default): more verbose warning for invalid properties found in the inheritance chain. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_object.cpp?cvsroot=gnash&r1=1.30&r2=1.31 http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2207&r2=1.2208 Patches: Index: server/as_object.cpp =================================================================== RCS file: /sources/gnash/gnash/server/as_object.cpp,v retrieving revision 1.30 retrieving revision 1.31 diff -u -b -r1.30 -r1.31 --- server/as_object.cpp 23 Jan 2007 22:38:34 -0000 1.30 +++ server/as_object.cpp 31 Jan 2007 15:50:09 -0000 1.31 @@ -210,7 +210,7 @@ } catch (ActionException& exc) { - log_warning("%s", exc.what()); + log_warning("%s: %s. Will create a new member.", key.c_str(), exc.what()); } } Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2207 retrieving revision 1.2208 diff -u -b -r1.2207 -r1.2208 --- ChangeLog 31 Jan 2007 15:24:13 -0000 1.2207 +++ ChangeLog 31 Jan 2007 15:50:09 -0000 1.2208 @@ -1,3 +1,8 @@ +2007-01-31 Sandro Santilli + + * server/as_object.cpp (set_member_default): more verbose warning + for invalid properties found in the inheritance chain. + 2007-01-31 Bastiaan Jacques * backend/render_handler_agg.cpp, gui/{gui.cpp, gtk.cpp}: Do not From MAILER-DAEMON Wed Jan 31 11:12:11 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HCI4B-0003KQ-BB for mharc-gnash-commit@gnu.org; Wed, 31 Jan 2007 11:12:11 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HCI49-0003Jg-Ev for gnash-commit@gnu.org; Wed, 31 Jan 2007 11:12:09 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HCI48-0003Ip-PB for gnash-commit@gnu.org; Wed, 31 Jan 2007 11:12:09 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HCI48-0003IY-Ek for gnash-commit@gnu.org; Wed, 31 Jan 2007 11:12:08 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HCI48-0004Hs-4Z for gnash-commit@gnu.org; Wed, 31 Jan 2007 11:12:08 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HCI47-0005PE-16 for gnash-commit@gnu.org; Wed, 31 Jan 2007 16:12:07 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1HCI46-0005PB-Se for gnash-commit@gnu.org; Wed, 31 Jan 2007 16:12:06 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Wed, 31 Jan 2007 16:12:06 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash ChangeLog server/mouse_button_state.h ser... X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jan 2007 16:12:09 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/31 16:12:06 Modified files: . : ChangeLog server : mouse_button_state.h movie_root.cpp Log message: * server/mouse_button_state.h: symbolic button states. * server/movie_root.cpp (generate_mouse_button_events): use symbolic names for button states. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2208&r2=1.2209 http://cvs.savannah.gnu.org/viewcvs/gnash/server/mouse_button_state.h?cvsroot=gnash&r1=1.6&r2=1.7 http://cvs.savannah.gnu.org/viewcvs/gnash/server/movie_root.cpp?cvsroot=gnash&r1=1.34&r2=1.35 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2208 retrieving revision 1.2209 diff -u -b -r1.2208 -r1.2209 --- ChangeLog 31 Jan 2007 15:50:09 -0000 1.2208 +++ ChangeLog 31 Jan 2007 16:12:06 -0000 1.2209 @@ -1,5 +1,8 @@ 2007-01-31 Sandro Santilli + * server/mouse_button_state.h: symbolic button states. + * server/movie_root.cpp (generate_mouse_button_events): + use symbolic names for button states. * server/as_object.cpp (set_member_default): more verbose warning for invalid properties found in the inheritance chain. Index: server/mouse_button_state.h =================================================================== RCS file: /sources/gnash/gnash/server/mouse_button_state.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -b -r1.6 -r1.7 --- server/mouse_button_state.h 21 Nov 2006 08:56:12 -0000 1.6 +++ server/mouse_button_state.h 31 Jan 2007 16:12:06 -0000 1.7 @@ -27,6 +27,16 @@ public: + /// Possible button states + enum state { + + /// Button is depressed + UP=0, + + /// Button is pressed + DOWN=1 + }; + /// entity that currently owns the mouse pointer boost::intrusive_ptr m_active_entity; @@ -44,8 +54,8 @@ mouse_button_state() : - m_mouse_button_state_last(0), - m_mouse_button_state_current(0), + m_mouse_button_state_last(UP), + m_mouse_button_state_current(UP), m_mouse_inside_entity_last(false) { } Index: server/movie_root.cpp =================================================================== RCS file: /sources/gnash/gnash/server/movie_root.cpp,v retrieving revision 1.34 retrieving revision 1.35 diff -u -b -r1.34 -r1.35 --- server/movie_root.cpp 7 Dec 2006 11:52:39 -0000 1.34 +++ server/movie_root.cpp 31 Jan 2007 16:12:06 -0000 1.35 @@ -170,7 +170,7 @@ // Did this event trigger any action that needs redisplay ? bool need_redisplay = false; - if (ms->m_mouse_button_state_last == 1) + if (ms->m_mouse_button_state_last == mouse_button_state::DOWN) { // Mouse button was down. @@ -244,7 +244,7 @@ } } - if (ms->m_mouse_button_state_last == 0) + if ( ms->m_mouse_button_state_last == mouse_button_state::UP ) { // Mouse button was up. @@ -277,7 +277,7 @@ } // mouse button press - if (ms->m_mouse_button_state_current == 1) + if (ms->m_mouse_button_state_current == mouse_button_state::DOWN ) { // onPress @@ -318,7 +318,7 @@ need_redisplay=true; } ms->m_mouse_inside_entity_last = true; - ms->m_mouse_button_state_last = 1; + ms->m_mouse_button_state_last = mouse_button_state::DOWN; } } From MAILER-DAEMON Wed Jan 31 11:42:47 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HCIXn-0002l7-Ke for mharc-gnash-commit@gnu.org; Wed, 31 Jan 2007 11:42:47 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HCIXm-0002l2-5K for gnash-commit@gnu.org; Wed, 31 Jan 2007 11:42:46 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HCIXk-0002kq-Qx for gnash-commit@gnu.org; Wed, 31 Jan 2007 11:42:44 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HCIXk-0002kn-Le for gnash-commit@gnu.org; Wed, 31 Jan 2007 11:42:44 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HCIXk-0003Zk-CG for gnash-commit@gnu.org; Wed, 31 Jan 2007 11:42:44 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HCIXj-0000DZ-7a for gnash-commit@gnu.org; Wed, 31 Jan 2007 16:42:43 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1HCIXj-0000DW-1V for gnash-commit@gnu.org; Wed, 31 Jan 2007 16:42:43 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Wed, 31 Jan 2007 16:42:43 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash/server movie_root.cpp X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jan 2007 16:42:46 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/31 16:42:43 Modified files: server : movie_root.cpp Log message: other two uses for simbolic mouse button states CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/server/movie_root.cpp?cvsroot=gnash&r1=1.35&r2=1.36 Patches: Index: movie_root.cpp =================================================================== RCS file: /sources/gnash/gnash/server/movie_root.cpp,v retrieving revision 1.35 retrieving revision 1.36 diff -u -b -r1.35 -r1.36 --- movie_root.cpp 31 Jan 2007 16:12:06 -0000 1.35 +++ movie_root.cpp 31 Jan 2007 16:42:42 -0000 1.36 @@ -213,10 +213,10 @@ } // Handle onRelease, onReleaseOutside - if (ms->m_mouse_button_state_current == 0) + if (ms->m_mouse_button_state_current == mouse_button_state::UP) { // Mouse button just went up. - ms->m_mouse_button_state_last = 0; + ms->m_mouse_button_state_last = mouse_button_state::UP; if (active_entity != NULL) { From MAILER-DAEMON Wed Jan 31 12:25:57 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HCJDZ-0006so-A2 for mharc-gnash-commit@gnu.org; Wed, 31 Jan 2007 12:25:57 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HCJDX-0006rt-1Q for gnash-commit@gnu.org; Wed, 31 Jan 2007 12:25:55 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HCJDW-0006rL-8r for gnash-commit@gnu.org; Wed, 31 Jan 2007 12:25:54 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HCJDW-0006rG-4o for gnash-commit@gnu.org; Wed, 31 Jan 2007 12:25:54 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HCJDV-0002tB-RV for gnash-commit@gnu.org; Wed, 31 Jan 2007 12:25:53 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HCJDV-0001hs-El for gnash-commit@gnu.org; Wed, 31 Jan 2007 17:25:53 +0000 Received: from martinwguy by savannah.gnu.org with local (Exim 4.50) id 1HCJDV-0001hp-6b for gnash-commit@gnu.org; Wed, 31 Jan 2007 17:25:53 +0000 To: gnash-commit@gnu.org Message-Id: From: Martin Guy Date: Wed, 31 Jan 2007 17:25:53 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash configure.ac ChangeLog X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jan 2007 17:25:55 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Martin Guy 07/01/31 17:25:53 Modified files: . : configure.ac ChangeLog Log message: Remove check for png.h; it is not required by gtk-less gnash builds. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/configure.ac?cvsroot=gnash&r1=1.247&r2=1.248 http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2209&r2=1.2210 Patches: Index: configure.ac =================================================================== RCS file: /sources/gnash/gnash/configure.ac,v retrieving revision 1.247 retrieving revision 1.248 diff -u -b -r1.247 -r1.248 --- configure.ac 30 Jan 2007 23:22:06 -0000 1.247 +++ configure.ac 31 Jan 2007 17:25:52 -0000 1.248 @@ -15,7 +15,7 @@ dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA dnl -dnl $Id: configure.ac,v 1.247 2007/01/30 23:22:06 martinwguy Exp $ +dnl $Id: configure.ac,v 1.248 2007/01/31 17:25:52 martinwguy Exp $ AC_PREREQ(2.50) AC_INIT(gnash, cvs) @@ -423,9 +423,6 @@ fi AM_CONDITIONAL(ENABLE_MYSQL, [ test x"$mysql" = xyes ]) -dnl currently used by Fedora Core 6 -GNASH_PKG_FIND(png, [png.h], [decode PNG images], png_process_data) - AC_PATH_MING AM_CONDITIONAL(ENABLE_MING, [ test x"$MAKESWF" != x ]) @@ -942,18 +939,6 @@ fi fi -if test x"${png}" != x ; then - if test x"${PNG_CFLAGS}" != x ; then - echo " PNG flags are: $PNG_CFLAGS" - else - echo " PNG flags are: default include path" - fi - echo " PNG libs are: $PNG_LIBS" -else - echo " ERROR: No PNG library development package installed!" - nogo=true -fi - if test x"${JPEG_LIBS}" != x ; then if test x"${JPEG_CFLAGS}" != x ; then echo " JPEG flags are: $JPEG_CFLAGS" Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2209 retrieving revision 1.2210 diff -u -b -r1.2209 -r1.2210 --- ChangeLog 31 Jan 2007 16:12:06 -0000 1.2209 +++ ChangeLog 31 Jan 2007 17:25:52 -0000 1.2210 @@ -1,3 +1,9 @@ +2007-01-31 Martin Guy + + * configure.ac: Remove check for png.h; it is not a Gnash dependency. + It is a sub-dependency of gtk and pango, not required for gtk-less + builds. + 2007-01-31 Sandro Santilli * server/mouse_button_state.h: symbolic button states. From MAILER-DAEMON Wed Jan 31 16:10:10 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HCMiX-0000jR-Qu for mharc-gnash-commit@gnu.org; Wed, 31 Jan 2007 16:10:09 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HCMiW-0000ir-5A for gnash-commit@gnu.org; Wed, 31 Jan 2007 16:10:08 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HCMiU-0000i5-M1 for gnash-commit@gnu.org; Wed, 31 Jan 2007 16:10:07 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HCMiU-0000ht-I4 for gnash-commit@gnu.org; Wed, 31 Jan 2007 16:10:06 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HCMiT-0002da-PO for gnash-commit@gnu.org; Wed, 31 Jan 2007 16:10:06 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HCMiQ-00046q-Cv for gnash-commit@gnu.org; Wed, 31 Jan 2007 21:10:02 +0000 Received: from bjacques by savannah.gnu.org with local (Exim 4.50) id 1HCMiP-00046j-UW for gnash-commit@gnu.org; Wed, 31 Jan 2007 21:10:02 +0000 To: gnash-commit@gnu.org Message-Id: From: Bastiaan Jacques Date: Wed, 31 Jan 2007 21:10:01 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash ChangeLog server/sprite_instance.cpp X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jan 2007 21:10:08 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Bastiaan Jacques 07/01/31 21:10:01 Modified files: . : ChangeLog server : sprite_instance.cpp Log message: Assert that our pointer is non-NULL before attempting to dereference it. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2210&r2=1.2211 http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.144&r2=1.145 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2210 retrieving revision 1.2211 diff -u -b -r1.2210 -r1.2211 --- ChangeLog 31 Jan 2007 17:25:52 -0000 1.2210 +++ ChangeLog 31 Jan 2007 21:10:01 -0000 1.2211 @@ -34,6 +34,8 @@ by type. * server/movie_root.h: set_invalidated_region is used across libraries, so visibility should be DSO_EXPORT. + * server/sprite_instance.cpp: Assert that our pointer is non-NULL + before attempting to dereference it. 2007-01-31 Sandro Santilli Index: server/sprite_instance.cpp =================================================================== RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v retrieving revision 1.144 retrieving revision 1.145 diff -u -b -r1.144 -r1.145 --- server/sprite_instance.cpp 31 Jan 2007 15:11:58 -0000 1.144 +++ server/sprite_instance.cpp 31 Jan 2007 21:10:01 -0000 1.145 @@ -225,6 +225,7 @@ /// because attachCharacter() will reset matrix !! if (fn.nargs > 3 ) { as_object* initObject = fn.arg(3).to_object(); + assert(initObject); log_msg("Initializing properties from object"); newch->copyProperties(*initObject); } From MAILER-DAEMON Wed Jan 31 17:06:00 2007 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HCNaZ-0003NV-Ux for mharc-gnash-commit@gnu.org; Wed, 31 Jan 2007 17:05:59 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HCNaX-0003NQ-TA for gnash-commit@gnu.org; Wed, 31 Jan 2007 17:05:57 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HCNaW-0003NB-HQ for gnash-commit@gnu.org; Wed, 31 Jan 2007 17:05:57 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HCNaW-0003N6-CY for gnash-commit@gnu.org; Wed, 31 Jan 2007 17:05:56 -0500 Received: from savannah.gnu.org ([199.232.41.3]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HCNaV-0002Rv-Uy for gnash-commit@gnu.org; Wed, 31 Jan 2007 17:05:56 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69] helo=savannah.gnu.org) by savannah.gnu.org with esmtp (Exim 4.50) id 1HCNaV-0006kB-0c for gnash-commit@gnu.org; Wed, 31 Jan 2007 22:05:55 +0000 Received: from strk by savannah.gnu.org with local (Exim 4.50) id 1HCNaU-0006k8-Nx for gnash-commit@gnu.org; Wed, 31 Jan 2007 22:05:54 +0000 To: gnash-commit@gnu.org Message-Id: From: Sandro Santilli Date: Wed, 31 Jan 2007 22:05:54 +0000 X-detected-kernel: Linux 2.6 (newer, 1) Subject: [Gnash-commit] gnash ChangeLog server/sprite_instance.cpp X-BeenThere: gnash-commit@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gnash CVS commit messages List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jan 2007 22:05:58 -0000 CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli 07/01/31 22:05:54 Modified files: . : ChangeLog server : sprite_instance.cpp Log message: * server/sprite_instance.cpp (sprite_attach_movie): tolerate bogus third argument to attachMovie(). Fixes bug #18920. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2211&r2=1.2212 http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.145&r2=1.146 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.2211 retrieving revision 1.2212 diff -u -b -r1.2211 -r1.2212 --- ChangeLog 31 Jan 2007 21:10:01 -0000 1.2211 +++ ChangeLog 31 Jan 2007 22:05:54 -0000 1.2212 @@ -1,3 +1,9 @@ +2007-01-31 Sandro Santilli + + * server/sprite_instance.cpp (sprite_attach_movie): + tolerate bogus third argument to attachMovie(). + Fixes bug #18920. + 2007-01-31 Martin Guy * configure.ac: Remove check for png.h; it is not a Gnash dependency. Index: server/sprite_instance.cpp =================================================================== RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v retrieving revision 1.145 retrieving revision 1.146 diff -u -b -r1.145 -r1.146 --- server/sprite_instance.cpp 31 Jan 2007 21:10:01 -0000 1.145 +++ server/sprite_instance.cpp 31 Jan 2007 22:05:54 -0000 1.146 @@ -225,9 +225,16 @@ /// because attachCharacter() will reset matrix !! if (fn.nargs > 3 ) { as_object* initObject = fn.arg(3).to_object(); - assert(initObject); + if ( initObject ) { log_msg("Initializing properties from object"); newch->copyProperties(*initObject); + } else { + IF_VERBOSE_MALFORMED_SWF( + log_aserror("Third argument to attachMovie " + "doesn't cast to an object (%s)", + fn.arg(3).to_string()); + ); + } } fn.result->set_as_object(newch.get());