Add missing builtin flash.utils.ObjectInput

error: pathspec 'src/flash/utils/ObjectInput.as' did not match any file(s) known to git

--- src/flash/utils/ObjectInput.as
+++ src/flash/utils/ObjectInput.as
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2014 Mozilla Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package flash.utils {
+
+[native(cls='ObjectInputClass')]
+internal class ObjectInput implements IDataInput {
+  public native function get bytesAvailable(): uint;
+  public native function get objectEncoding(): uint;
+  public native function set objectEncoding(version: uint): void;
+  public native function get endian(): String;
+  public native function set endian(type: String): void;
+  public native function readBytes(bytes: ByteArray, offset: uint = 0, length: uint = 0): void;
+  public native function readBoolean(): Boolean;
+  public native function readByte(): int;
+  public native function readUnsignedByte(): uint;
+  public native function readShort(): int;
+  public native function readUnsignedShort(): uint;
+  public native function readInt(): int;
+  public native function readUnsignedInt(): uint;
+  public native function readFloat(): Number;
+  public native function readDouble(): Number;
+  public native function readMultiByte(length: uint, charSet: String): String;
+  public native function readUTF(): String;
+  public native function readUTFBytes(length: uint): String;
+  public native function readObject(): *;
+}
+}


missing test

missing test

error: pathspec 'test/com/gigya/WildfireTest.as' did not match any file(s) known to git

--- test/com/gigya/WildfireTest.as
+++ test/com/gigya/WildfireTest.as
@@ -0,0 +1,24 @@
+package com.gigya
+{
+	import as3spec.*;
+
+	public class WildfireTest extends Spec
+	{
+		public function run () :void
+		{
+			describe ('a new Wildfire', function () :void
+			{
+				const wildfire:Wildfire = new Wildfire;
+
+				it ('should be a Wildfire', function () :void
+				{
+					so(wildfire).should.be.a.kind_of(Wildfire);
+				});
+
+				it ('should contain real code', function () :void
+				{
+				});
+			});
+		}
+	}
+}


interaction between playas now works properly. adding new version of AS file to the repo

error: pathspec 'script/Playa2.as' did not match any file(s) known to git

--- script/Playa2.as
+++ script/Playa2.as
@@ -0,0 +1,87 @@
+package
+{	import flash.display.Sprite;
+	import flash.events.*;
+	import flash.external.ExternalInterface;
+	import flash.media.Sound;
+	import flash.media.SoundChannel;
+	import flash.net.URLRequest;
+	import flash.utils.Timer;
+
+	public class Playa2 extends Sprite
+	{
+		private var sound:Sound;
+		private var channel:SoundChannel;
+		private var url:String;
+		private var trackTimer:Timer = new Timer(500);
+
+		public function Playa2()
+		{
+			if (ExternalInterface.available) {
+				try {
+					ExternalInterface.addCallback("play", play);
+					ExternalInterface.addCallback("stop", stop);
+					ExternalInterface.addCallback("playheadPosition", playheadPosition);
+				} catch (error:SecurityError) {
+					trace("A SecurityError occurred: " + error.message);
+				} catch (error:Error) {
+					trace("An Error occurred: " + error.message);
+				}
+			} else {
+				trace("External interface is not available for this container.");
+			}
+		}
+		private function playheadPosition(num:Number=-1):Number{
+			if(num == -1){
+				num = channel.position/1000; }
+			return(num);
+		}
+
+		private function soundCompleteHandler(event:Event):void {
+			ExternalInterface.call("Playa.current.playNext()");
+		}
+
+		private function updateTrackTime(timer:TimerEvent):void{
+			var duration:Number = (sound.bytesTotal / (sound.bytesLoaded / sound.length));
+			ExternalInterface.call("Playa.current.setTrackTime("+duration/1000+")");
+		}
+		private function play(address:String, timeEstablished:Boolean, position:Number):void {
+			var req:URLRequest = new URLRequest(address);
+			var newSound:Sound = new Sound();
+			ExternalInterface.call("Playa.pauseAll()");
+
+			try {
+
+
+				sound = newSound;
+				sound.load(req);
+				channel = sound.play(position*1000);
+
+				trackTimer.addEventListener(TimerEvent.TIMER, updateTrackTime);
+				trackTimer.start();
+				channel.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
+			}
+
+			catch (err:Error) {
+				ExternalInterface.call("alert", err.message);
+
+			}
+
+
+		}
+
+		private function stop():void {
+			try{
+				channel.stop();
+				trackTimer.stop();
+				trackTimer.removeEventListener(TimerEvent.TIMER, updateTrackTime);
+			}catch(err:Error){}
+		}
+
+		private function checkJavaScriptReady():Boolean {
+			var isReady:Boolean = ExternalInterface.call("FlashInterface.isReady()");
+			return isReady;
+		}
+	}
+
+
+}


Add AS3 example.

Add AS3 example.

--HG--
branch : trunk

error: pathspec 'tests/examplefiles/as3_test.as' did not match any file(s) known to git

--- tests/examplefiles/as3_test.as
+++ tests/examplefiles/as3_test.as
@@ -0,0 +1,143 @@
+			import flash.events.MouseEvent;
+			import com.example.programmingas3.playlist.PlayList;
+			import com.example.programmingas3.playlist.Song;
+			import com.example.programmingas3.playlist.SortProperty;
+
+			// constants for the different "states" of the song form
+			private static const ADD_SONG:uint = 1;
+			private static const SONG_DETAIL:uint = 2;
+
+			private var playList:PlayList = new PlayList();
+
+			private function initApp():void
+			{
+				// set the initial state of the song form, for adding a new song
+				setFormState(ADD_SONG);
+
+				// prepopulate the list with a few songs
+				playList.addSong(new Song("Nessun Dorma", "Luciano Pavarotti", 1990, "nessundorma.mp3", ["90's", "Opera"]));
+				playList.addSong(new Song("Come Undone", "Duran Duran", 1993, "comeundone.mp3", ["90's", "Pop"]));
+				playList.addSong(new Song("Think of Me", "Sarah Brightman", 1987, "thinkofme.mp3", ["Showtunes"]));
+				playList.addSong(new Song("Unbelievable", "EMF", 1991, "unbelievable.mp3", ["90's", "Pop"]));
+
+				songList.dataProvider = playList.songList;
+			}
+
+
+			private function sortList(sortField:SortProperty):void
+			{
+				// Make all the sort type buttons enabled.
+				// The active one will be grayed-out below
+				sortByTitle.selected = false;
+				sortByArtist.selected = false;
+				sortByYear.selected = false;
+
+				switch (sortField)
+				{
+					case SortProperty.TITLE:
+						sortByTitle.selected = true;
+						break;
+					case SortProperty.ARTIST:
+						sortByArtist.selected = true;
+						break;
+					case SortProperty.YEAR:
+						sortByYear.selected = true;
+						break;
+				}
+
+				playList.sortList(sortField);
+
+				refreshList();
+			}
+
+
+			private function refreshList():void
+			{
+				// remember which song was selected
+				var selectedSong:Song = Song(songList.selectedItem);
+
+				// re-assign the song list as the dataprovider to get the newly sorted list
+				// and force the List control to refresh itself
+				songList.dataProvider = playList.songList;
+
+				// reset the song selection
+				if (selectedSong != null)
+				{
+					songList.selectedItem = selectedSong;
+				}
+			}
+
+
+			private function songSelectionChange():void
+			{
+				if (songList.selectedIndex != -1)
+				{
+					setFormState(SONG_DETAIL);
+				}
+				else
+				{
+					setFormState(ADD_SONG);
+				}
+			}
+
+
+			private function addNewSong():void
+			{
+				// gather the values from the form and add the new song
+				var title:String = newSongTitle.text;
+				var artist:String = newSongArtist.text;
+				var year:uint = newSongYear.value;
+				var filename:String = newSongFilename.text;
+				var genres:Array = newSongGenres.selectedItems;
+
+				playList.addSong(new Song(title, artist, year, filename, genres));
+
+				refreshList();
+
+				// clear out the "add song" form fields
+				setFormState(ADD_SONG);
+			}
+
+
+			private function songListLabel(item:Object):String
+			{
+				return item.toString();
+			}
+
+
+			private function setFormState(state:uint):void
+			{
+				// set the form title and control state
+				switch (state)
+				{
+					case ADD_SONG:
+						formTitle.text = "Add New Song";
+						// show the submit button
+						submitSongData.visible = true;
+						showAddControlsBtn.visible = false;
+						// clear the form fields
+						newSongTitle.text = "";
+						newSongArtist.text = "";
+						newSongYear.value = (new Date()).fullYear;
+						newSongFilename.text = "";
+						newSongGenres.selectedIndex = -1;
+						// deselect the currently selected song (if any)
+						songList.selectedIndex = -1;
+						break;
+
+					case SONG_DETAIL:
+						formTitle.text = "Song Details";
+						// populate the form with the selected item's data
+						var selectedSong:Song = Song(songList.selectedItem);
+						newSongTitle.text = selectedSong.title;
+						newSongArtist.text = selectedSong.artist;
+						newSongYear.value = selectedSong.year;
+						newSongFilename.text = selectedSong.filename;
+						newSongGenres.selectedItems = selectedSong.genres;
+						// hide the submit button
+						submitSongData.visible = false;
+						showAddControlsBtn.visible = true;
+						break;
+				}
+			}
+


Add AS3 example.

Add AS3 example.


refactoring the queue slaves methods;

refactoring the queue slaves methods;

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/rafaelcordoba/cocktail-demo.git/'


added juggleGroupedCallback.as

added juggleGroupedCallback.as

error: pathspec 'WeaveAPI/src/weave/api/juggleGroupedCallback.as' did not match any file(s) known to git

--- WeaveAPI/src/weave/api/juggleGroupedCallback.as
+++ WeaveAPI/src/weave/api/juggleGroupedCallback.as
@@ -0,0 +1,46 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ *
+ * This file is part of the Weave API.
+ *
+ * The Initial Developer of the Weave API is the Institute for Visualization
+ * and Perception Research at the University of Massachusetts Lowell.
+ * Portions created by the Initial Developer are Copyright (C) 2008-2012
+ * the Initial Developer. All Rights Reserved.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
+ * You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+package weave.api
+{
+	import weave.api.core.ICallbackCollection;
+	import weave.api.core.ILinkableObject;
+
+	/**
+	 * This function will remove a grouped callback from one ILinkableObject and add it to another.
+	 * @param oldTarget The old target, which may be null.
+	 * @param newTarget The new target, which may be null.
+	 * @param relevantContext Corresponds to the relevantContext parameter of ICallbackInterface.addGroupedCallback().
+	 * @param groupedCallback Corresponds to the groupedCallback parameter of ICallbackInterface.addGroupedCallback().
+	 * @param triggerCallbackNow Corresponds to the triggerCallbackNow parameter of ICallbackInterface.addGroupedCallback().
+	 * @see weave.api.core.ICallbackInterface#addGroupedCallback
+	 */
+	public function juggleGroupedCallback(oldTarget:ILinkableObject, newTarget:ILinkableObject, relevantContext:Object, groupedCallback:Function, triggerCallbackNow:Boolean = false):void
+	{
+		// do nothing if the targets are the same.
+		if (oldTarget == newTarget)
+			return;
+		if (oldTarget)
+		{
+			var oldCC:ICallbackCollection = WeaveAPI.SessionManager.getCallbackCollection(oldTarget);
+			oldCC.removeCallback(groupedCallback);
+		}
+		if (newTarget)
+		{
+			var newCC:ICallbackCollection = WeaveAPI.SessionManager.getCallbackCollection(newTarget);
+			newCC.addGroupedCallback(relevantContext, groupedCallback, triggerCallbackNow);
+		}
+	}
+}


now our dev code is in trunk

now our dev code is in trunk

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/jisobkim/gaforflash.git/'


more work on closures

more work on closures

error: pathspec 'test/llvm_bugs/bug_trampoline.as' did not match any file(s) known to git

--- test/llvm_bugs/bug_trampoline.as
+++ test/llvm_bugs/bug_trampoline.as
@@ -0,0 +1,36 @@
+; Bugs when interpreted with lli -O0
+
+; ModuleID = 'T'
+
+%0 = type { i32 }
+
+define fastcc i32 @T_add(i32, i32) {
+__tmp48:
+  %__tmp45 = add i32 %0, %1
+  ret i32 %__tmp45
+}
+
+define i32 @f(i8* nest, i32) {
+;  %3 = getelementptr inbounds %0* %0, i32 0, i32 0
+;  %4 = load i32* %3
+;  %5 = call fastcc i32 @T_add(i32 %4, i32 %1)
+  ret i32 0 ; %5
+}
+
+
+define void @main() {
+__tmp44:
+  %0 = alloca %0
+  %1 = getelementptr inbounds %0* %0, i32 0, i32 0
+  store i32 1, i32* %1
+  %2 = alloca [10 x i8], align 4
+  %3 = getelementptr [10 x i8]* %2, i32 0, i32 0
+  %4 = bitcast i32* %1 to i8*
+  %5 = call i8* @llvm.init.trampoline(i8* %3, i8* bitcast (i32 (i8* nest, i32)* @f to i8*), i8* %4)
+  %6 = bitcast i8* %5 to i32 (i32)*
+  %7 = call i32 %6(i32 1)
+  ret void
+}
+
+declare i8* @llvm.init.trampoline(i8*, i8*, i8*) nounwind
+


Scrolling background now wraps when the second image starts leaving the screen.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/c0d3m0nk3y/Konata.git/'


Update Settings.as

Update Settings.as

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/jerome-desmedt/daelysid.git/'


Victim fix

Victim fix


Issue 8; Improve text placement by removing the left gutter of the flash TextField.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/leymannx/svgweb.git/'


Add InetSocketAddress

Add InetSocketAddress

error: pathspec 'src/main/org/shypl/common/net/InetSocketAddress.as' did not match any file(s) known to git

--- src/main/org/shypl/common/net/InetSocketAddress.as
+++ src/main/org/shypl/common/net/InetSocketAddress.as
@@ -0,0 +1,23 @@
+package org.shypl.common.net {
+	public class InetSocketAddress {
+		private var _host:String;
+		private var _port:int;
+
+		public function InetSocketAddress(host:String, port:int) {
+			_host = host;
+			_port = port;
+		}
+
+		public function get host():String {
+			return _host;
+		}
+
+		public function get port():int {
+			return _port;
+		}
+
+		public function toString():String {
+			return _host + ":" + _port;
+		}
+	}
+}


updating example

updating example


Bug 515947: testcase for UTF-16 surrogate pair translation to UTF-8

error: pathspec 'test/acceptance/ecma3/Unicode/ucs4_bug_515947.as' did not match any file(s) known to git

--- test/acceptance/ecma3/Unicode/ucs4_bug_515947.as
+++ test/acceptance/ecma3/Unicode/ucs4_bug_515947.as
@@ -0,0 +1,71 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is [Open Source Virtual Machine.].
+ *
+ * The Initial Developer of the Original Code is
+ * Adobe System Incorporated.
+ * Portions created by the Initial Developer are Copyright (C) 2009
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Adobe AS3 Team
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/**
+ *  This template is a modified version of the test case
+ *  templates taken from mozilla.org.  This template or
+ *  any test cases written from it are not for external
+ *  use or distribution.
+ *
+ *  Author: Brent Baker <brbaker@adobe.com>
+ *  Date: 10/06/2009
+ *
+ *  Modifications: (Name   :Date)
+
+ */
+
+var SECTION = "Unicode";       // provide a document reference (ie, Actionscript section)
+var VERSION = "ECMAScript";        // Version of ECMAScript or ActionScript
+var TITLE   = "UTF16 surrogate pairs not being translated correctly from UTF8";
+var BUGNUMBER = "515947";
+
+startTest();                // leave this alone
+
+// add your tests here
+
+var s:String = "𠂊";
+AddTestCase( "s.length", 2, s.length );
+AddTestCase( "0xd840", "d840", s.charCodeAt(0).toString(16) );
+AddTestCase( "0xdc8a", "dc8a", s.charCodeAt(1).toString(16) );
+
+
+test();       // leave this alone.  this executes the test cases and
+              // displays results.
+
+
+
+


Nalu:  ensure we have enough bytes to read NAL unit type in case NALus are overlapping

when NALus are overlapping accross PES packets,
it can happen that the last 3 bytes of a PES packet are the NALu start code, and that the NAL unit type is on the following PES packet.
that case was not handled properly. ensure we have enough bytes to read NALu type ...

related to https://github.com/dailymotion/hls.js/issues/176

--- src/org/mangui/hls/demux/Nalu.as
+++ src/org/mangui/hls/demux/Nalu.as
@@ -54,7 +54,7 @@
                     case 2:
                     case 3:
                         if(value) {
-                            if(value === 1) {
+                            if(value === 1 && i < len) {
                                 unitType = nalu[i] & 0x1f;
                                 if(unitType == 9) {
                                     audFound = true;


bug 458419: hasAtomProperty should not throw an exception but return false, add testcases for regression to acceptance test suite

error: pathspec 'test/acceptance/es4/vector/in.as' did not match any file(s) known to git

--- test/acceptance/es4/vector/in.as
+++ test/acceptance/es4/vector/in.as
@@ -0,0 +1,60 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/**
+   File Name:    in.es
+   Description:  test 'in' keyword.
+   		 the exception is a current issue with properties defined in the prototype.
+   Author:       dschaffe@adobe.com 27-Aug-2007
+   *
+   */
+
+var SECTION = " ";
+var VERSION = "AS3";
+startTest();
+writeHeaderToLog( SECTION + " Vector in statement");
+
+var v1:Vector.<*>=new Vector.<*>();
+var v2:Vector.<int>=Vector.<int>(["zero","one","two","three","four","five"]);
+AddTestCase(    "in value valid index",
+		true,
+		(0 in v2));
+AddTestCase(    "in value for empty vector",
+		false,
+		(0 in v1));
+
+AddTestCase(    "in value valid index does not exist",
+		false,
+		(6 in v1));
+
+AddTestCase(    "in value valid index in string form",
+		true,
+		("2" in v2));
+
+err1="no exception";
+try {
+AddTestCase(    "in value is push function index ",
+		true,
+		("push" in v1));
+AddTestCase(    "in value is concat function index ",
+		true,
+		("concat" in v1));
+AddTestCase(    "in value negative number index ",
+		false,
+		(-2 in v1));
+AddTestCase(    "in value decimal index",
+		false,
+		(1.1 in v1));
+AddTestCase(    "in value decimal in string index",
+		false,
+		("1.1" in v1));
+AddTestCase(    "in value valid string",
+		false,
+		("string" in v1));
+} catch(e) {
+  err1=e.toString();
+  AddTestCase(    "in throws exception for invalid vector indexes",
+                  "no exception",
+                  err1);
+}
+
+test();
+


I swear I had made one of these way back when. Here it is again.

git-svn-id: a1a4b28b82a3276cc491891159dd9963a0a72fae@5716 542714f4-19e9-0310-aa3c-eee0fc999fb1

error: pathspec 'src/as/com/threerings/util/ImmutableProxyObject.as' did not match any file(s) known to git

--- src/as/com/threerings/util/ImmutableProxyObject.as
+++ src/as/com/threerings/util/ImmutableProxyObject.as
@@ -0,0 +1,116 @@
+//
+// $Id$
+
+package com.threerings.util {
+
+import flash.utils.Proxy;
+import flash.utils.flash_proxy;
+
+use namespace flash_proxy;
+
+/**
+ * Acts like the passed-in Object, but prevents modifications.
+ */
+public class ImmutableProxyObject extends Proxy
+{
+    public function ImmutableProxyObject (source :Object, throwErrors :Boolean = true)
+    {
+        _source = source;
+        _throwErrors = throwErrors;
+    }
+
+    public function hasOwnProperty (name :String) :Boolean
+    {
+        return _source.hasOwnProperty(name);
+    }
+
+    public function isPrototypeOf (theClass :Object) :Boolean
+    {
+        return _source.isPrototypeOf(theClass);
+    }
+
+    public function propertyIsEnumerable (name :String) :Boolean
+    {
+        return _source.propertyIsEnumerable(name);
+    }
+
+    public function setPropertyIsEnumerable (name :String, isEnum :Boolean = true) :void
+    {
+        immutable();
+    }
+
+    public function toString () :String
+    {
+        return _source.toString();
+    }
+
+    // valueOf ?
+
+    override flash_proxy function callProperty (name :*, ... rest) :*
+    {
+        Function(_source[name]).apply(null, rest);
+    }
+
+    override flash_proxy function deleteProperty (name :*) :Boolean
+    {
+        immutable();
+        return false;
+    }
+
+    // omitted: getDescendants
+
+    override flash_proxy function getProperty (key :*) :*
+    {
+        return _source[key];
+    }
+
+    override flash_proxy function hasProperty (key :*) :Boolean
+    {
+        return (key in _source);
+    }
+
+    // omitted: isAttribute
+
+    override flash_proxy function nextName (index :int) :String
+    {
+        return _itrKeys[index - 1];
+    }
+
+    override flash_proxy function nextNameIndex (index :int) :int
+    {
+        if (index == 0) {
+            _itrKeys = Util.keys(_source);
+        }
+
+        if (index < _itrKeys.length) {
+            return index + 1;
+        } else {
+            _itrKeys = null;
+            return 0;
+        }
+    }
+
+    override flash_proxy function nextValue (index :int) :*
+    {
+        return _source[_itrKeys[index - 1]];
+    }
+
+    override flash_proxy function setProperty (name :*, value :*) :void
+    {
+        immutable();
+    }
+
+    protected function immutable () :void
+    {
+        if (_throwErrors) {
+            throw new Error("You may not modify this object.");
+        }
+    }
+
+    protected var _source :Object;
+
+    protected var _throwErrors :Boolean;
+
+    protected var _itrKeys :Array;
+}
+}


Uint64.as ??? UInt64.as

Uint64.as ??? UInt64.as

error: pathspec 'as3/com/netease/protobuf/UInt64.as' did not match any file(s) known to git

--- as3/com/netease/protobuf/UInt64.as
+++ as3/com/netease/protobuf/UInt64.as
@@ -0,0 +1,19 @@
+// vim: tabstop=4 shiftwidth=4
+
+// Copyright (c) 2010 , NetEase.com,Inc. All rights reserved.
+//
+// Author: Yang Bo (pop.atry@gmail.com)
+//
+// Use, modification and distribution are subject to the "New BSD License"
+// as listed at <url: http://www.opensource.org/licenses/bsd-license.php >.
+
+package com.netease.protobuf {
+	public final class UInt64 {
+		public var low:uint;
+		public var high:uint;
+		public function UInt64(low:uint = 0, high:uint = 0) {
+			this.low = low
+			this.high = high
+		}
+	}
+}


React to onError.Connection.error events same as timeouts.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/pubnub/flash.git/'


add FRED data source

add FRED data source

error: pathspec 'WeaveData/src/weave/data/DataSources/FREDDataSource.as' did not match any file(s) known to git

--- WeaveData/src/weave/data/DataSources/FREDDataSource.as
+++ WeaveData/src/weave/data/DataSources/FREDDataSource.as
@@ -0,0 +1,262 @@
+/*
+    Weave (Web-based Analysis and Visualization Environment)
+    Copyright (C) 2008-2011 University of Massachusetts Lowell
+
+    This file is a part of Weave.
+
+    Weave is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License, Version 3,
+    as published by the Free Software Foundation.
+
+    Weave 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 Weave.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+package weave.data.DataSources
+{
+    import flash.net.URLRequest;
+
+    import mx.charts.chartClasses.IColumn;
+    import mx.rpc.events.FaultEvent;
+    import mx.rpc.events.ResultEvent;
+
+    import weave.api.data.ColumnMetadata;
+    import weave.api.data.DataType;
+    import weave.api.data.IAttributeColumn;
+    import weave.api.data.IColumnReference;
+    import weave.api.data.IDataSource;
+    import weave.api.data.IWeaveTreeNode;
+    import weave.api.newDisposableChild;
+    import weave.api.newLinkableChild;
+    import weave.api.registerDisposableChild;
+    import weave.api.registerLinkableChild;
+    import weave.api.reportError;
+    import weave.compiler.Compiler;
+    import weave.compiler.StandardLib;
+    import weave.core.LinkablePromise;
+    import weave.core.LinkableString;
+    import weave.data.AttributeColumns.ProxyColumn;
+    import weave.data.hierarchy.ColumnTreeNode;
+    import weave.primitives.Dictionary2D;
+    import weave.services.JsonCache;
+    import weave.services.addAsyncResponder;
+
+    public class FREDDataSource extends AbstractDataSource
+    {
+        WeaveAPI.ClassRegistry.registerImplementation(IDataSource, FREDDataSource, "Federal Reserve Economic Data");
+
+
+
+        public function FREDDataSource()
+        {
+        }
+
+
+
+        override protected function initialize():void
+        {
+            // recalculate all columns previously requested
+            //refreshAllProxyColumns();
+
+            super.initialize();
+        }
+
+		private const jsonCache:JsonCache = newLinkableChild(this, JsonCache);
+
+		public const apiKey:LinkableString = registerLinkableChild(this, new LinkableString("fa99c080bdbd1d486a55e7cb6ab7acbb"));
+
+		/**
+		 * @param method Examples: "category", "category/series"
+		 * @param params Example: {category_id: 125}
+		 */
+		private function getUrl(method:String, params:Object):String
+		{
+			params['api_key'] = apiKey.value;
+			params['file_type'] = 'json';
+			var paramsStr:String = '';
+			for (var key:String in params)
+				paramsStr += (paramsStr ? '&' : '?') + key + '=' + params[key];
+			return "http://api.stlouisfed.org/fred/" + method + paramsStr;
+		}
+		/**
+		 * @param method Examples: "category", "category/series"
+		 * @param params Example: {category_id: 125}
+		 */
+		private function getJson(method:String, params:Object):Object
+		{
+			return jsonCache.getJsonObject(getUrl(method, params));
+		}
+
+		private var functionCache:Dictionary2D = new Dictionary2D();
+
+		public function createCategoryNode(data:Object = null, ..._):ColumnTreeNode
+		{
+			if (!data)
+			{
+				var name:String = WeaveAPI.globalHashMap.getName(this);
+				data = {id: 0, name: name};
+			}
+			var node:ColumnTreeNode = functionCache.get(createCategoryNode, data.id);
+			if (!node)
+			{
+				node = new ColumnTreeNode({
+					source: this,
+					data: data,
+					label: data.name,
+					isBranch: true,
+					hasChildBranches: true,
+					children: function(node:ColumnTreeNode):Array {
+						return [].concat(
+							getCategoryChildren(node),
+							getCategorySeries(node)
+						);
+					}
+				});
+				functionCache.set(createCategoryNode, data.id, node);
+			}
+			return node;
+		}
+
+		private function getCategoryChildren(node:ColumnTreeNode):Array
+		{
+			var result:Object = getJson('category/children', {category_id: node.data.id});
+
+			if(!result.categories)
+				return [];
+			return result.categories.map(createCategoryNode);
+		}
+
+		private function getCategorySeries(node:ColumnTreeNode):Array
+		{
+			var result:Object = getJson('category/series', {category_id: node.data.id});
+
+			if(!result.seriess)
+				return [];
+
+			return result.seriess.map(createSeriesNode);
+		}
+
+		public function getObservationsCSV(series_id:String):CSVDataSource
+		{
+			var csv:CSVDataSource = functionCache.get(getObservationsCSV, series_id);
+			if (!csv)
+			{
+				csv = newLinkableChild(this, CSVDataSource);
+				functionCache.set(getObservationsCSV, series_id, csv);
+
+				var request1:URLRequest = new URLRequest(getUrl('series', {series_id: series_id}));
+				addAsyncResponder(
+					WeaveAPI.URLRequestUtils.getURL(csv, request1),
+					function(event:ResultEvent, csv:CSVDataSource):void {
+						var data:Object = JsonCache.parseJSON(event.result.toString());
+						data = data.seriess[0];
+						var request2:URLRequest = new URLRequest(getUrl('series/observations', {series_id: series_id}));
+						addAsyncResponder(
+							WeaveAPI.URLRequestUtils.getURL(csv, request2),
+							function(event:ResultEvent, csv:CSVDataSource):void
+							{
+								var result:Object = JsonCache.parseJSON(event.result.toString());
+								var columnOrder:Array = ['date', 'realtime_start', 'realtime_end', 'value'];
+								var rows:Array = WeaveAPI.CSVParser.convertRecordsToRows(result.observations, columnOrder);
+								csv.csvData.setSessionState(rows);
+								var valueTitle:String = lang("{0} ({1})", data.title, data.units);
+								var metadataArray:Array = [
+									{title: 'date', dataType: DataType.DATE, dateFormat: 'YYYY-MM-DD'},
+									{title: 'realtime_start', dataType: DataType.DATE, dateFormat: 'YYYY-MM-DD'},
+									{title: 'realtime_end', dataType: DataType.DATE, dateFormat: 'YYYY-MM-DD'},
+									{title: valueTitle, dataType: DataType.NUMBER},
+								];
+								csv.metadata.setSessionState(metadataArray);
+							},
+							handleFault,
+							csv
+						);
+					},
+					handleFault,
+					csv
+				);
+			}
+			return csv;
+		}
+		private function handleFault(event:FaultEvent, token:Object = null):void
+		{
+			reportError(event);
+		}
+
+		public function createSeriesNode(data:Object, ..._):IWeaveTreeNode
+		{
+			var node:IWeaveTreeNode = functionCache.get(createSeriesNode, data.id);
+			if (!node)
+			{
+				node = new ColumnTreeNode({
+					label: data.title,
+					source: this,
+					data: data,
+					isBranch: true,
+					hasChildBranches: false,
+					children: function(node:ColumnTreeNode):Array {
+						var csv:CSVDataSource = getObservationsCSV(data.id);
+						var csvRoot:IWeaveTreeNode = csv.getHierarchyRoot();
+						node.source = csv;
+						return csvRoot.getChildren().map(function(csvNode:IColumnReference, ..._):IWeaveTreeNode {
+							var meta:Object = csvNode.getColumnMetadata();
+							meta[META_SERIES_ID] = data.id;
+							meta[META_COLUMN_NAME] = meta[CSVDataSource.METADATA_COLUMN_NAME];
+							return generateHierarchyNode(meta);
+						});
+					}
+				});
+				functionCache.set(createSeriesNode, data.id, node);
+			}
+			return node;
+		}
+
+
+        override public function getHierarchyRoot():IWeaveTreeNode
+        {
+
+            if (!_rootNode)
+            {
+                var source:FREDDataSource = this;
+                _rootNode = createCategoryNode();
+            }
+            return _rootNode;
+        }
+
+		public static const META_SERIES_ID:String = 'FRED_series_id';
+		public static const META_COLUMN_NAME:String = 'FRED_column_name';
+
+		public static const META_ID_FIELDS:Array = [META_SERIES_ID, META_COLUMN_NAME];
+
+		override public function findHierarchyNode(metadata:Object):IWeaveTreeNode
+		{
+			return null;
+		}
+
+		override protected function generateHierarchyNode(metadata:Object):IWeaveTreeNode
+		{
+			if (!metadata)
+				return null;
+
+			return new ColumnTreeNode({
+				source: this,
+				idFields: META_ID_FIELDS,
+				columnMetadata: metadata
+			});
+		}
+
+        override protected function requestColumnFromSource(proxyColumn:ProxyColumn):void
+        {
+            var series:String = proxyColumn.getMetadata(META_SERIES_ID);
+			//var columnName:String = proxyColumn.getMetadata(META_COLUMN_NAME);
+			var csv:CSVDataSource = getObservationsCSV(series);
+			var csvColumn:IAttributeColumn = csv.getAttributeColumn(ColumnMetadata.getAllMetadata(proxyColumn));
+			proxyColumn.setInternalColumn(csvColumn);
+        }
+    }
+}


adding mapping routine and a 'random' value to avoid cached fxml file


Add missing builtin flash.utils.IExternalizable

error: pathspec 'src/flash/utils/IExternalizable.as' did not match any file(s) known to git

--- src/flash/utils/IExternalizable.as
+++ src/flash/utils/IExternalizable.as
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2014 Mozilla Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package flash.utils {
+public interface IExternalizable {
+  function writeExternal(output: IDataOutput): void;
+  function readExternal(input: IDataInput): void;
+}
+}


Added default light to viewer.

Added default light to viewer.

--- tools/viewers/flash/src/AWDViewer.as
+++ tools/viewers/flash/src/AWDViewer.as
@@ -17,11 +17,15 @@
 	import away3d.library.AssetLibrary;
 	import away3d.library.assets.AssetType;
 	import away3d.library.utils.AssetLibraryIterator;
+	import away3d.lights.DirectionalLight;
+	import away3d.lights.PointLight;
 	import away3d.loaders.Loader3D;
 	import away3d.loaders.misc.AssetLoaderContext;
 	import away3d.loaders.parsers.AWD2Parser;
 	import away3d.materials.ColorMaterial;
+	import away3d.materials.DefaultMaterialBase;
 	import away3d.materials.TextureMaterial;
+	import away3d.materials.lightpickers.StaticLightPicker;

 	import flash.display.Sprite;
 	import flash.events.Event;
@@ -44,6 +48,10 @@
 		private var _skeleton : Skeleton;
 		private var _animator : SkeletonAnimator;

+		private var _defDirLight : DirectionalLight;
+		private var _defCamLight : PointLight;
+		private var _defLightPicker : StaticLightPicker;
+
 		public function AWDViewer()
 		{
 			init();
@@ -65,6 +73,10 @@
 			_hoverCtrl.minTiltAngle = -60;
 			_hoverCtrl.maxTiltAngle = 60;

+			_defDirLight = new DirectionalLight(1, -3, 1);
+			_defCamLight = new PointLight();
+			_defLightPicker = new StaticLightPicker([_defDirLight,_defCamLight]);
+
 			stage.addEventListener(MouseEvent.MOUSE_DOWN, onStageMouseDown);
 			stage.addEventListener(MouseEvent.MOUSE_MOVE, onStageMouseMove);
 			stage.addEventListener(MouseEvent.MOUSE_WHEEL, onStageMouseWheel);
@@ -90,8 +102,11 @@
 				mesh = Mesh(ev.asset);
 				texMat = mesh.material as TextureMaterial;

-				if (mesh.material == null || (texMat && texMat.texture == null))
+				if (mesh.material == null || (texMat && texMat.texture == null)) {
 					mesh.material = new ColorMaterial(Math.random() * 0xffffff);
+				}
+
+				mesh.material.lightPicker = _defLightPicker;
 			}
 			else if (ev.asset.assetType == AssetType.SKELETON) {
 				_skeleton = Skeleton(ev.asset);
@@ -189,6 +204,11 @@
 		private function onEnterFrame(ev : Event) : void
 		{
 			_hoverCtrl.update();
+
+			_defCamLight.x = _view.camera.x;
+			_defCamLight.y = _view.camera.y;
+			_defCamLight.z = _view.camera.z;
+
 			_view.render();
 		}
 	}


Level : fix getSeqNumNearestPTS() logic

Level : fix getSeqNumNearestPTS() logic

when checking that PTS is more than 10% after fragment start, ensure that PTS is less than frag end PTS
to avoid always finding first SN of quality level ...

--- src/org/mangui/hls/model/Level.as
+++ src/org/mangui/hls/model/Level.as
@@ -129,12 +129,18 @@
                 var start : Number = frag.data.pts_start_computed;
                 var duration :Number = frag.duration;
                 var end : Number = start + 1000*duration;
+
+                // CONFIG::LOGGING {
+                //     Log.debug("getSeqNumNearestPTS: pts/start/end/duration:" + pts + '/' + start + '/' + end + '/' + duration);
+                // }
                 /* check nearest fragment */
                 if ( frag.data.valid &&
                     (duration >= 0) &&
-                    // if PTS is closer from end OR if PTS is greater than start and more than 10% after frag start
+                    // if PTS is closer from end OR
+                    // if PTS is smaller than end PTS and more than 10% after frag start
                     ((Math.abs(start - pts) < Math.abs(end - pts)) ||
-                    (pts - start ) > 100*duration)) {
+                    (   (pts < end) &&
+                        (pts - start ) > 100*duration))) {
                     return frag.seqnum;
                 }
             }


Source of the OSData.swf added

Source of the OSData.swf added

fatal: unable to access 'https://github.com/tstieven/amiunique.git/': The requested URL returned error: 403


starting scheme base class

starting scheme base class


removing ctrace()

removing ctrace()


Bug 532791: add regression testcase (r=dschaffe)

error: pathspec 'test/acceptance/regress/bug_532791.as' did not match any file(s) known to git

--- test/acceptance/regress/bug_532791.as
+++ test/acceptance/regress/bug_532791.as
@@ -0,0 +1,45 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is [Open Source Virtual Machine.].
+ *
+ * The Initial Developer of the Original Code is
+ * Adobe System Incorporated.
+ * Portions created by the Initial Developer are Copyright (C) 2010
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Adobe AS3 Team
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+// Regression testcase for https://bugzilla.mozilla.org/show_bug.cgi?id=532791
+
+startTest();
+
+var r:RegExp = /(^#\{)|(\}$)/;
+AddTestCase("var r:RegExp = /(^#\{)|(\}$)/; r.exec('# {blah blah}')", "},,}", r.exec('# {blah blah}').toString());
+
+test();


add updated select server, cleaner version

git-svn-id: 44dac414ef660a76a1e627c7b7c0e36d248d62e4@20 c2cce57b-6cbb-4450-ba62-5fdab5196ef5

error: pathspec 'src/corsaair/server/spitfire/SimpleSocketServerSelect2.as' did not match any file(s) known to git

--- src/corsaair/server/spitfire/SimpleSocketServerSelect2.as
+++ src/corsaair/server/spitfire/SimpleSocketServerSelect2.as
@@ -0,0 +1,461 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+package corsaair.server.spitfire
+{
+
+    import C.errno.*;
+    import C.arpa.inet.*;
+    import C.netdb.*;
+    import C.netinet.*;
+    import C.sys.socket.*;
+    import C.sys.select.*;
+    import C.stdlib.*;
+    import C.unistd.*;
+
+    import flash.utils.ByteArray;
+
+
+    /**
+     * A simple socket server upgrade 2.
+     *
+     * Let's clean up the code and reorganise it into methods
+     * to spearate responsibility.
+     *
+     */
+    public class SimpleSocketServerSelect2
+    {
+
+        // the port users will be connecting to
+        public const PORT:String = "3490";
+
+        // how many pending connections queue will hold
+        public const BACKLOG:uint = 10;
+
+        private var _address:Array;   // list of addresses
+        private var _info:addrinfo;   // server selected address
+
+        private var _run:Boolean;     // run the server loop
+
+
+        public var serverfd:int;      // server socket descriptor
+        public var selected:int;      // selected socket descriptor
+        public var connections:Array; // list of socket descriptor
+
+        public function SimpleSocketServerSelect2()
+        {
+            super();
+
+            _address    = [];
+            _info       = null;
+            _run        = true;
+            serverfd    = -1;
+            selected    = -1;
+            connections = [];
+        }
+
+        /**
+         * @private
+         *
+         * Use getaddrinfo() to obtain a list of IP addresses we can use
+         * loop trough those addresses and bind to the first one we can
+         *
+         * Two possible outcome
+         *
+         * - we found an address and boudn to it
+         *   we set the _info object with the address
+         *   then we return the socket descriptor
+         *
+         * - we exhausted the list of addresses
+         *   without binding to any of them
+         *   then our _info object is not set
+         *   we return an unusable socket descriptor
+         */
+        private function _getBindingSocket():int
+        {
+
+            var hints:addrinfo = new addrinfo();
+                hints.ai_family   = AF_UNSPEC;
+                hints.ai_socktype = SOCK_STREAM;
+                hints.ai_flags    = AI_PASSIVE; // indicates we want to bind
+
+            var info:addrinfo;
+
+            var eaierr:CEAIrror = new CEAIrror();
+            var addrlist:Array  = getaddrinfo( null, PORT, hints, eaierr );
+
+            if( !addrlist )
+            {
+                throw eaierr;
+            }
+
+            var sockfd:int;
+            var option:int;
+            var bound:int;
+
+            var i:uint;
+            var len:uint = addrlist.length;
+            for( i = 0; i < len; i++ )
+            {
+                info = addrlist[i];
+
+                sockfd = socket( info.ai_family, info.ai_socktype, info.ai_protocol );
+                if( sockfd == -1 )
+                {
+                    trace( "selectserver: socket" )
+                    trace( new CError( "", errno ) );
+                    continue;
+                }
+
+                option = setsockopt( sockfd, SOL_SOCKET, SO_REUSEADDR, 1 );
+                if( option == -1 )
+                {
+                    trace( "setsockopt" );
+                    trace( new CError( "", errno ) );
+                    exit( 1 );
+                }
+
+                bound = bind( sockfd, info.ai_addr );
+                if( bound == -1 )
+                {
+                    close( sockfd );
+                    trace( "selectserver: bind" );
+                    trace( new CError( "", errno ) );
+                    continue;
+                }
+
+                // we save the selected addrinfo
+                _info = info;
+                break;
+            }
+
+            // we merge the addresses found into our list of address
+            _address = _address.concat( addrlist );
+
+            // we return the socket descriptor
+            return sockfd;
+        }
+
+        /**
+         * @private
+         *
+         * Loop trough all the clients connections.
+         *
+         * Yes this is how we do multiplexing I/O
+         * without really using select()
+         *
+         * All the secret is with isReadable()
+         * from that point we know we can read on
+         * the socket and this lead to 2 clear paths
+         *
+         * - the server
+         *   reading on the server socket means
+         *   accepting a new connection with accept()
+         *
+         * - the clients
+         *   reading on a client socket means
+         *   reading data from the client with recv()
+         *
+         * IMPORTANT:
+         * both accept() and recv() are blocking
+         * which means you can freeze your server loop
+         * if something is misshandled or take too long
+         * (this will be explained in the next example)
+         */
+        private function _loopConnections():void
+        {
+            var i:uint;
+            var len:uint = connections.length;
+
+            for( i = 0; i < len; i++ )
+            {
+                selected = connections[i];
+
+                if( isReadable( selected ) )
+                {
+
+                    if( selected == serverfd )
+                    {
+                        _handleNewConnections();
+                    }
+                    else
+                    {
+                        _handleClientData();
+                    }
+
+                }
+
+            }
+
+        }
+
+        /**
+         * @private
+         *
+         * Block on accept()
+         * if accepted
+         * - add the new socket descriptor to the connections
+         * - send a welcome message to the client
+         */
+        private function _handleNewConnections():void
+        {
+            // handle new connections
+
+            var new_fd:int;  // newly accept()ed socket descriptor
+            var client_addr:sockaddr_in = new sockaddr_in();
+
+            new_fd = accept( serverfd, client_addr );
+
+            if( new_fd == -1 )
+            {
+                trace( "accept" );
+                trace( new CError( "", errno ) );
+            }
+            else
+            {
+                connections.push( new_fd );
+
+                var s:String = inet_ntop( client_addr.sin_family, client_addr );
+                trace( "selectserver: new connection from " + s  + ", socket " + new_fd );
+
+                var msg_out:String = "Hello, world!\n";
+                var bytes_out:ByteArray = new ByteArray();
+                    bytes_out.writeUTFBytes( msg_out );
+                    bytes_out.position = 0;
+
+                var sent:int = send( new_fd, bytes_out );
+                if( sent == -1 )
+                {
+                    trace( "send" );
+                    trace( new CError( "", errno ) );
+                }
+                else
+                {
+                    trace( "sent " + sent + " bytes to the client " + new_fd );
+                }
+
+            }
+        }
+
+        /**
+         * @private
+         *
+         * Block on recv()
+         * if receiving data
+         * - write the data to the server log
+         * - check for the "shutdown" command
+         *
+         * How do we know we are not receiving data ?
+         * if you try to recv() on a disconected client
+         * you will automatically recevie 0 which means
+         * the client disconnected or hung up.
+         * Or you will receive a negative integer
+         * for signalling an error.
+         *
+         * In both case, we want to close the socket ot the client
+         * and remove it from the connections list.
+         */
+        private function _handleClientData():void
+        {
+            // handle data from a client
+
+            var msg_in:String;
+            var bytes_in:ByteArray = new ByteArray();
+
+            var received:int = recv( selected, bytes_in );
+            if( received <= 0 )
+            {
+                // got error or connection closed by client
+                if( received == 0 )
+                {
+                    // connection closed
+                    trace( "selectserver: socket " + selected + " hung up" );
+                }
+                else
+                {
+                    trace( "recv" );
+                    trace( new CError( "", errno ) );
+                }
+
+                close( selected ); // bye!
+
+                // remove from master set
+                _removeClient( selected );
+            }
+            else
+            {
+                // we got some data from a client
+                trace( "received " + received + " bytes from client " + selected );
+                bytes_in.position = 0;
+                msg_in = bytes_in.readUTFBytes( bytes_in.length );
+                msg_in = msg_in.split( "\n" ).join( "" );
+                trace( selected + " : " + msg_in );
+
+                if( msg_in == "shutdown" )
+                {
+                    trace( "selectserver: received 'shutdown' command" );
+                    _run = false;
+                }
+            }
+        }
+
+        /**
+         * @private
+         *
+         * add a client to list of connections
+         * so far a 'client' is only the integer of a socket descriptor
+         *
+         * a client can be as well the current server than a remobe client
+         */
+        private function _addClient( sd:int ):void
+        {
+            connections.push( sd );
+        }
+
+        /**
+         * @private
+         *
+         * remove a client from the list of connections
+         */
+        private function _removeClient( sd:int ):void
+        {
+            /* Note:
+               protection from removing the server socket descriptor
+               which would disconnect/crash all other clients
+            */
+            if( sd == serverfd )
+            {
+                return;
+            }
+
+            var i:uint;
+            var len:uint = connections.length;
+            var desc:int;
+            for( i = 0; i < len; i++ )
+            {
+                desc = connections[i];
+                if( desc == sd )
+                {
+                    connections.splice( i, 1 );
+                }
+            }
+        }
+
+        /**
+         * @private
+         *
+         * close the socket descriptor and remove it from the list of connections
+         * we use that to clean after ourselves
+         * but in most case if the server process were to crash
+         * all the descriptor would be automatically closed as
+         * they depend on this process.
+         *
+         * Alternatively you can also use this to disconnect all or parts of the clients.
+         */
+        private function _closeAndRemoveAllClients( removeServer:Boolean = false ):void
+        {
+            var i:uint;
+            var desc:int;
+            for( i = 0; i < connections.length; i++ )
+            {
+                desc = connections[i];
+
+                if( !removeServer && (desc == serverfd) )
+                {
+                    continue;
+                }
+
+                trace( "selectserver: terminate " + desc );
+                close( desc );
+                connections.splice( i, 1 );
+                i = 0; //rewind
+            }
+        }
+
+
+        public function main():void
+        {
+            /* Note:
+               find our IP address and bind thesocket to it
+               in general the IP will be 0.0.0.0
+               which means listen on all interfaces
+            */
+            serverfd = _getBindingSocket();
+
+            /* Note:
+               Verify that we have selected an address
+               if not it is a fatal error.
+               eg. the loop trough the address info
+               did not find an address
+            */
+            if( _info == null )
+            {
+                trace( "selectserver: failed to bind" );
+                exit( 1 );
+            }
+
+            /* Note:
+               The last part of the server setup is to listen()
+               which means "I'm ready to receive data".
+
+               If the server can not listen it is a fatal error.
+
+               About BACKLOG
+               see http://pubs.opengroup.org/onlinepubs/9699919799/functions/listen.html
+               the backlog is here to limit the queue of incoming connections
+               it will not handle multiple connections
+               eg. that's the difference between queueing and multiplexing
+
+               The backlog argument provides a hint to the implementation
+               which the implementation shall use to limit the number of
+               outstanding connections in the socket's listen queue.
+               Implementations may impose a limit on backlog and silently
+               reduce the specified value.
+               Normally, a larger backlog argument value shall result in
+               a larger or equal length of the listen queue.
+               Implementations shall support values of backlog up to SOMAXCONN,
+               defined in `C.sys.socket`.
+            */
+            var listening:int = listen( serverfd, BACKLOG );
+            if( listening == -1 )
+            {
+                trace( "listen" );
+                trace( new CError( "", errno ) );
+                exit( 1 );
+            }
+
+            trace( "selectserver: waiting for connections..." );
+
+            // the server is always the first client to be added to the connections
+            _addClient( serverfd );
+            trace( "selectserver: server on socket " + serverfd );
+
+            /* Note:
+               main server loop
+
+               Keep the server looping as long as
+               run == true
+
+               hopefully now the loop is easier to read :)
+            */
+            while( _run )
+            {
+
+                _loopConnections();
+
+            }
+
+            trace( "selectserver: connections left [" + connections + "]" );
+            _closeAndRemoveAllClients();
+
+            trace( "shutting down server" );
+            shutdown( serverfd, SHUT_RDWR );
+            close( serverfd );
+
+            exit( 0 );
+
+        }
+
+    }
+}


Issue 344; Missing file from r922.

Issue 344; Missing file from r922.


Add template for writing SWF unit tests

Add template for writing SWF unit tests

error: pathspec 'test/swfs/test_Template.as' did not match any file(s) known to git

--- test/swfs/test_Template.as
+++ test/swfs/test_Template.as
@@ -0,0 +1,72 @@
+/* -*- Mode: java; indent-tabs-mode: nil -*- */
+/*
+   Compiled with:
+   java -jar utils/asc.jar -import playerglobal.abc -swf Template,100,100,10 test/swfs/test_TemplateTest.as
+
+   This template is for writing test SWFs using pure AS3. It allows for testing
+   UI events, screen and program state using the Shumway test harness.
+*/
+
+package {
+
+    import flash.display.Sprite;
+    import flash.events.Event;
+
+    public class TemplateTest extends Sprite {
+        public var loader;
+        public function TemplateTest() {
+            var child = new TestObject();
+            addChild(child);
+            addEventListener(Event.ENTER_FRAME, child.enterFrameHandler);
+        }
+    }
+}
+
+import flash.display.*;
+import flash.events.*;
+import flash.net.*;
+
+class TestObject extends Sprite {
+    private var color: uint = 0xFFCC00;
+    private var pos: uint   = 10;
+    private var size: uint  = 80;
+
+    /*
+      In the constructor, install event listeners for testing events, and
+      construct and add child objects.
+    */
+    public function TestObject() {
+    }
+
+    private var frameCount = 0;
+
+    /*
+      In the enterFrameHandler, make API calls per frame to test both
+      screen and program side-effects.
+    */
+    function enterFrameHandler(event:Event):void {
+        frameCount++;
+        var target = event.target;
+        var loader = target.loader;
+        switch (frameCount) {
+        case 1:
+            (function () {
+                /*
+                  Log test results in the standard format shown here to allow
+                  for easy linking with monitor programs.
+                */
+                var result = true ? "PASS" : "FAIL";
+                trace(result + ": test::Template/method ()");
+                trace(result + ": test::Template/get name ()");
+                trace(result + ": test::Template/set name ()");
+            })();
+            break;
+        default:
+            /*
+              Remove enterFrameHandler when done.
+            */
+            parent.removeEventListener(Event.ENTER_FRAME, enterFrameHandler);
+            break;
+        }
+    }
+}


11037 fix false positive fullscreen detection

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/7thsky/openvv.git/'


This is general purposeish and should be here.

git-svn-id: b675b909355d5cf946977f44a8ec5a6ceb3782e4@162 ed5b42cb-e716-0410-a449-f6a68f950b19

error: pathspec 'src/as/com/threerings/flash/ClearingTextField.as' did not match any file(s) known to git

--- src/as/com/threerings/flash/ClearingTextField.as
+++ src/as/com/threerings/flash/ClearingTextField.as
@@ -0,0 +1,56 @@
+package com.threerings.flash {
+
+import flash.events.TimerEvent;
+
+import flash.text.TextField;
+
+import flash.utils.Timer;
+
+/**
+ * A simple TextField with a method for setting text that will auto-clear.
+ */
+public class ClearingTextField extends TextField
+{
+    public function ClearingTextField ()
+    {
+        _timer = new Timer(1, 1);
+        _timer.addEventListener(TimerEvent.TIMER, handleTimer);
+    }
+
+    /**
+     * Set text that will not auto-clear.
+     */
+    override public function set text (str :String) :void
+    {
+        setText(str, 0);
+    }
+
+    /**
+     * Set the specified text on this TextField, and clear the text
+     * after the specified delay. If more text is set prior to the
+     * delay elapsing, the clear is pushed back to that text's delay, if any.
+     */
+    public function setText (str :String, secondsToClear :Number = 5) :void
+    {
+        super.text = str;
+        _timer.reset(); // stop any running timer
+
+        // maybe start a new countdown
+        if (secondsToClear > 0) {
+            _timer.delay = secondsToClear * 1000;
+            _timer.start();
+        }
+    }
+
+    protected function handleTimer (event :TimerEvent) :void
+    {
+        super.text = "";
+
+        // this should be the fragglin' default, and not updating
+        // should be the fragglin' exception. GAWD!
+        event.updateAfterEvent();
+    }
+
+    protected var _timer :Timer;
+}
+}


adding simple uri clean up and TODO notations

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/rafaelcordoba/cocktail-demo.git/'


Added guarding to the basic mediator map build

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/eric-stanley/robotlegs-framework.git/'


 - added new Component "BitmapElement" for displaying BitmapData Object within UIComponent

git-svn-id: e38e7cdd6ace00d8230583a2d3b43e9a55f5c011@710 bc4816be-ef27-423a-9c4d-fc420be121a2

error: pathspec 'src/reprise/controls/BitmapElement.as' did not match any file(s) known to git

--- src/reprise/controls/BitmapElement.as
+++ src/reprise/controls/BitmapElement.as
@@ -0,0 +1,94 @@
+
+package reprise.controls
+{
+	import flash.display.Bitmap;
+	import flash.display.BitmapData;
+
+	import reprise.ui.UIComponent;
+
+	/**
+	 * @author marco
+	 */
+
+	public class BitmapElement extends UIComponent
+	{
+		/***************************************************************************
+		*							public properties							   *
+		***************************************************************************/
+		public static var className : String = 'BitmapElement';
+
+
+		/***************************************************************************
+		*							protected properties						   *
+		***************************************************************************/
+		protected var m_smoothing : Boolean = true;
+		protected var m_image : Bitmap;
+		protected var m_imageDisplayed : Boolean;
+
+
+		/***************************************************************************
+		*							public methods								   *
+		***************************************************************************/
+		public function setSmoothing(enabled : Boolean) : void
+		{
+			m_smoothing = enabled;
+			if(m_image)
+			{
+				setBitmapData(m_image.bitmapData);
+			}
+		}
+
+		public function setBitmapData(bmpData : BitmapData) : void
+		{
+			createBitmapDisplay(bmpData);
+		}
+
+		/***************************************************************************
+		*							protected methods							   *
+		***************************************************************************/
+		override protected function initialize() : void
+		{
+			super.initialize();
+
+		}
+
+		protected override function initDefaultStyles() : void
+		{
+			m_elementDefaultStyles.setStyle('display', 'inline');
+		}
+
+		protected function createBitmapDisplay(bmpData : BitmapData) : void
+		{
+			if (m_image)
+			{
+				m_lowerContentDisplay.removeChild(m_image);
+			}
+			m_image = new Bitmap(bmpData, 'auto', m_smoothing);
+			m_lowerContentDisplay.addChild(m_image);
+			invalidate();
+		}
+
+		protected override function measure() : void
+		{
+			if (!m_image)
+			{
+				m_intrinsicWidth = 0;
+				m_intrinsicHeight = 0;
+				return;
+			}
+			m_intrinsicWidth = m_image.width;
+			m_intrinsicHeight = m_image.height;
+		}
+
+		protected override function draw() : void
+		{
+			if (m_image)
+			{
+				m_image.x = m_currentStyles.paddingLeft || 0;
+				m_image.y = m_currentStyles.paddingTop || 0;
+				m_imageDisplayed = true;
+				m_lowerContentDisplay.visible = true;
+			}
+		}
+	}
+}


updating win logic

updating win logic

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/jkanchelov/VideoPoker.git/'


renaming method

renaming method


Add an RTMFPSocket class.

Add an RTMFPSocket class.

error: pathspec 'RTMFPSocket.as' did not match any file(s) known to git

--- RTMFPSocket.as
+++ RTMFPSocket.as
@@ -0,0 +1,209 @@
+/*
+The RTMFPSocket class provides a socket-like interface around RTMFP
+NetConnection and NetStream. Each RTMFPSocket contains one NetConnection and two
+NetStreams, one for reading and one for writing.
+
+To create a listening socket:
+    var rs:RTMFPSocket = new RTMFPSocket(url, key);
+    rs.addEventListener(Event.COMPLETE, function (e:Event):void {
+        // rs.id is set and can be sent out of band to the client.
+    });
+    rs.addEventListener(RTMFPSocket.ACCEPT_EVENT, function (e:Event):void {
+        // rs.peer_id is the ID of the connected client.
+    });
+    rs.listen();
+To connect to a listening socket:
+    // Receive peer_id out of band.
+    var rs:RTMFPSocket = new RTMFPSocket(url, key);
+    rs.addEventListener(Event.CONNECT, function (e:Event):void {
+        // rs.id and rs.peer_id are now set.
+    });
+*/
+
+package
+{
+    import flash.events.Event;
+    import flash.events.EventDispatcher;
+    import flash.events.IOErrorEvent;
+    import flash.events.NetStatusEvent;
+    import flash.events.ProgressEvent;
+    import flash.net.NetConnection;
+    import flash.net.NetStream;
+    import flash.utils.ByteArray;
+
+    public class RTMFPSocket extends EventDispatcher
+    {
+        public static const ACCEPT_EVENT:String = "accept";
+
+        public var connected:Boolean;
+
+        private var nc:NetConnection;
+        private var incoming:NetStream;
+        private var outgoing:NetStream;
+
+        /* Cache to hold the peer ID between when connect is called and the
+           NetConnection exists. */
+        private var connect_peer_id:String;
+
+        private var buffer:ByteArray;
+
+        private var cirrus_url:String;
+        private var cirrus_key:String;
+
+        public function RTMFPSocket(cirrus_url:String, cirrus_key:String)
+        {
+            connected = false;
+
+            buffer = new ByteArray();
+
+            this.cirrus_url = cirrus_url;
+            this.cirrus_key = cirrus_key;
+
+            nc = new NetConnection();
+        }
+
+        public function get id():String
+        {
+            return nc.nearID;
+        }
+
+        public function get peer_id():String
+        {
+            return incoming.farID;
+        }
+
+        /* NetStatusEvents that aren't handled more specifically in
+           listen_netstatus_event or connect_netstatus_event. */
+        private function generic_netstatus_event(e:NetStatusEvent):void
+        {
+            switch (e.info.code) {
+            case "NetConnection.Connect.Closed":
+                dispatchEvent(new Event(Event.CLOSE));
+                break;
+            case "NetStream.Connect.Closed":
+                connected = false;
+                close();
+                break;
+            default:
+                var event:IOErrorEvent = new IOErrorEvent(IOErrorEvent.IO_ERROR);
+                event.text = e.info.code;
+                dispatchEvent(event);
+                break;
+            }
+        }
+
+        private function listen_netstatus_event(e:NetStatusEvent):void
+        {
+            switch (e.info.code) {
+            case "NetConnection.Connect.Success":
+                outgoing = new NetStream(nc, NetStream.DIRECT_CONNECTIONS);
+                outgoing.client = {
+                    onPeerConnect: listen_onpeerconnect
+                };
+                outgoing.publish("server");
+
+                /* listen is complete, ready to accept. */
+                dispatchEvent(new Event(Event.COMPLETE));
+                break;
+            case "NetStream.Connect.Success":
+                break;
+            default:
+                return generic_netstatus_event(e);
+                break;
+            }
+        }
+
+        private function listen_onpeerconnect(peer:NetStream):Boolean {
+            incoming = new NetStream(nc, peer.farID);
+            incoming.client = {
+                r: receive_data
+            };
+            incoming.play("client");
+
+            connected = true;
+            dispatchEvent(new Event(ACCEPT_EVENT));
+
+            return true;
+        }
+
+        private function connect_netstatus_event(e:NetStatusEvent):void
+        {
+            switch (e.info.code) {
+            case "NetConnection.Connect.Success":
+                outgoing = new NetStream(nc, NetStream.DIRECT_CONNECTIONS);
+                outgoing.publish("client");
+
+                incoming = new NetStream(nc, connect_peer_id);
+                incoming.client = {
+                    r: receive_data
+                };
+                incoming.play("server");
+                break;
+            case "NetStream.Connect.Success":
+                connected = true;
+                dispatchEvent(new Event(Event.CONNECT));
+                break;
+            default:
+                return generic_netstatus_event(e);
+                break;
+            }
+        }
+
+        /* Function called back when the other side does a send. */
+        private function receive_data(bytes:ByteArray):void {
+            var event:ProgressEvent;
+
+            event = new ProgressEvent(ProgressEvent.SOCKET_DATA);
+            event.bytesLoaded = bytes.bytesAvailable;
+
+            bytes.readBytes(buffer, buffer.length, bytes.bytesAvailable);
+            if (bytes.bytesAvailable == 0) {
+                /* Reclaim memory space. */
+                bytes.position = 0;
+                bytes.length = 0;
+            }
+
+            dispatchEvent(event);
+        }
+
+        public function listen():void
+        {
+            nc.addEventListener(NetStatusEvent.NET_STATUS, listen_netstatus_event);
+            nc.connect(cirrus_url, cirrus_key);
+        }
+
+        public function connect(peer_id:String):void
+        {
+            /* Store for later reading by connect_netstatus_event. */
+            this.connect_peer_id = peer_id;
+
+            nc.addEventListener(NetStatusEvent.NET_STATUS, connect_netstatus_event);
+            nc.connect(cirrus_url, cirrus_key);
+        }
+
+        public function close():void
+        {
+            outgoing.close();
+            incoming.close();
+            nc.close();
+        }
+
+        public function readBytes(output:ByteArray, offset:uint = 0, length:uint = 0):void
+        {
+            buffer.readBytes(output, offset, length);
+        }
+
+        public function writeBytes(input:ByteArray, offset:uint = 0, length:uint = 0):void
+        {
+            var sendbuf:ByteArray;
+
+            /* Read into a new buffer, in case offset and length do not
+               completely span input. */
+            sendbuf = new ByteArray();
+            sendbuf.writeBytes(input, offset, length);
+
+            /* Use a short method name because it's sent over the wire. */
+            outgoing.send("r", sendbuf);
+        }
+    }
+}


tweeks message dispatcher

tweeks message dispatcher


AVCC : change log level to debug2

AVCC : change log level to debug2

--- src/org/mangui/hls/demux/AVCC.as
+++ src/org/mangui/hls/demux/AVCC.as
@@ -8,9 +8,9 @@
         import org.mangui.hls.HLSSettings;
     }
     public class AVCC {
-
+
         /** H264 profiles. **/
-        private static const PROFILES : Object = {'66':'H264 Baseline', '77':'H264 Main', '100':'H264 High'};
+        private static const PROFILES : Object = {'66':'H264 Baseline', '77':'H264 Main', '100':'H264 High'};
         /** Get Avcc header from AVC stream
            See ISO 14496-15, 5.2.4.1 for the description of AVCDecoderConfigurationRecord
          **/
@@ -37,7 +37,7 @@
                 avcc.writeBytes(pps, 0, pps.length);
             }
             CONFIG::LOGGING {
-                if (HLSSettings.logDebug) {
+                if (HLSSettings.logDebug2) {
                     // Grab profile/level
                     sps.position = 1;
                     var prf : int = sps.readByte();
@@ -51,4 +51,4 @@
         }
         ;
     }
-}+}


Bug 513020: add testcase that shows null and empty array being returned during a non-match with with /i and /gi

error: pathspec 'test/acceptance/as3/RegExp/bug_513020.as' did not match any file(s) known to git

--- test/acceptance/as3/RegExp/bug_513020.as
+++ test/acceptance/as3/RegExp/bug_513020.as
@@ -0,0 +1,73 @@
+/* -*- c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4 -*- */
+/* vi: set ts=4 sw=4 expandtab: (add to ~/.vimrc: set modeline modelines=5) */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is [Open Source Virtual Machine].
+ *
+ * The Initial Developer of the Original Code is
+ * Adobe System Incorporated.
+ * Portions created by the Initial Developer are Copyright (C) 2011
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK *****
+ *
+ */
+
+var SECTION = "regress_513020";
+var VERSION = "AS3";
+var TITLE   = "[Regexp] String.match with global flag returns null when nothing is found";
+var bug = "513020";
+
+startTest();
+writeHeaderToLog(SECTION + " " + TITLE);
+
+var line:String = "aaa";
+var GIpattern:RegExp = /bbb/gi;
+var Ipattern:RegExp = /bbb/i;
+
+function MyMatch(myPattern:RegExp)
+{
+    var result = line.match(myPattern);
+    if(result == null)
+        return "null";
+    else
+        return "not null";
+}
+
+AddTestCase(
+    "regex non-match returns not null with /gi",
+    "not null",
+    MyMatch(GIpattern));
+
+AddTestCase(
+    "regex non-match returns null with /i",
+    "null",
+    MyMatch(Ipattern));
+
+
+test();


now the Binded class is PUBLIC instead of INTERNAL, and has a new feature called "touch". see the docs for details.


Finished adding Equals module

Finished adding Equals module

error: pathspec 'src/Modules/Equals.as' did not match any file(s) known to git

--- src/Modules/Equals.as
+++ src/Modules/Equals.as
@@ -0,0 +1,74 @@
+package Modules {
+	import Components.Port;
+	import Layouts.PortLayout;
+	import Layouts.InternalLayout;
+	import Layouts.Nodes.TallNode;
+	import Values.Value;
+	import Values.BooleanValue;
+	import flash.geom.Point;
+	/**
+	 * ...
+	 * @author Nicholas "PleasingFungus" Feinberg
+	 */
+	public class Equals extends Module {
+
+		private var width:int;
+		public function Equals(X:int, Y:int, Width:int = 2) {
+			super(X, Y, "Equal", Module.CAT_LOGIC, Width, 1, 0);
+			width = Width;
+			configuration = new Configuration(new Range(2, 8, Width));
+			configurableInPlace = false;
+			delay = Math.ceil(Math.log(Width) / Math.log(2));
+		}
+
+		override protected function generateInternalLayout():InternalLayout {
+			var ports:Array = [];
+			for each (var portLayout:PortLayout in layout.ports)
+				ports.push(portLayout);
+
+			var outport:PortLayout = layout.ports[layout.ports.length - 1];
+
+			return new InternalLayout([new TallNode(this, new Point(outport.offset.x - layout.dim.x / 2 - 1 / 2, outport.offset.y),
+														ports, [], function getValue():Value { return drive(outputs[0]); }, "Equal" )]);
+		}
+
+		protected function resetPorts():void {
+			outputs = new Vector.<Port>;
+			outputs.push(new Port(true, this));
+		}
+
+		override public function renderDetails():String {
+			var out:String = "Equal\n\n";
+			for each (var input:Port in inputs)
+				out += input.getValue() + ',';
+			return out.slice(0, out.length - 1);
+		}
+
+		override public function getDescription():String {
+			return "Outputs "+BooleanValue.TRUE+" if all inputs are equal, else "+BooleanValue.FALSE+"."
+		}
+
+		override protected function getSaveValues():Array {
+			var values:Array = super.getSaveValues();
+			values.push(width);
+			return values;
+		}
+
+		override public function drive(port:Port):Value {
+			var v:Value;
+			for each (var inputPort:Port in inputs) {
+				var inputValue:Value = inputPort.getValue();
+				if (inputValue.unknown || inputValue.unpowered)
+					return inputValue;
+				else if (!v)
+					v = inputValue
+				else if (!v.eq(inputValue))
+					return BooleanValue.FALSE;
+			}
+			return BooleanValue.TRUE;
+		}
+
+
+	}
+
+}


Command: contains bind() for wiring events up commands, without having to
create var-args functions or make your existing functions varargs so that
they can react to events.
This might turn into more. I already did a bunch of impl and then KISS since
we don't use the advanced shit yet. It might be nice to tie this more
closely to CommandButton, et al.

git-svn-id: a1a4b28b82a3276cc491891159dd9963a0a72fae@5300 542714f4-19e9-0310-aa3c-eee0fc999fb1

error: pathspec 'src/as/com/threerings/util/Command.as' did not match any file(s) known to git

--- src/as/com/threerings/util/Command.as
+++ src/as/com/threerings/util/Command.as
@@ -0,0 +1,75 @@
+//
+// $Id$
+
+package com.threerings.util {
+
+import flash.events.Event;
+import flash.events.IEventDispatcher;
+
+/**
+ * Contains a simple binding function to bind events to commands.
+ *
+ * TODO: be able to set up a Command object, and bind it to multiple functions
+ */
+public class Command
+{
+    /**
+     * Bind an event to a command.
+     */
+    public static function bind (
+        source :IEventDispatcher, eventType :String, cmdOrFn :Object, arg :Object = null) :void
+    {
+        source.addEventListener(eventType, function (... ignored) :void {
+            CommandEvent.dispatch(source, cmdOrFn, arg);
+        });
+    }
+
+    /**
+     * Convenience, since otherwise nobody usually needs to ever import CommandEvent.
+     */
+    public static function dispatch (
+        source :IEventDispatcher, cmdOrFn :Object, arg :Object = null) :void
+    {
+        CommandEvent.dispatch(source, cmdOrFn, arg);
+    }
+
+//    public static function bind (
+//        source :IEventDispatcher, eventType :String, cmdOrFn :Object, arg :Object = null) :Command
+//    {
+//        var cmd :Command = new Command(cmdOrFn, arg);
+//        cmd.addBind(source, eventType);
+//        return cmd;
+//    }
+//
+//    public function Command (cmdOrFn :Object, arg :Object = null)
+//    {
+//        _cmdOrFn = cmdOrFn;
+//        _arg = arg;
+//    }
+//
+//    public function setOverrideSource (disp :IEventDispatcher) :void
+//    {
+//        _source = source;
+//    }
+//
+//    public function addBind (source :IEventDispatcher, eventType :String) :void
+//    {
+//        source.addEventListener(eventType, eventHandler);
+//    }
+//
+//    public function removeBind (source :IEventDispatcher, eventType :String) :void
+//    {
+//        source.removeEventListener(eventType, eventHandler);
+//    }
+//
+//    protected function eventHandler (event :Event) :void
+//    {
+//        dispatch(_source || IEventDispatcher(event.source), _cmdOrFn, arg);
+//    }
+//
+//    /** An override source for the command events, or null to use the triggering dispatcher. */
+//    protected var _source :IEventDispatcher;
+//    protected var _cmdOrFn :Object;
+//    protected var _arg :Object;
+}
+}


Fixed adError event.

Fixed adError event.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/OnCircle/vpaid-wrapper.git/'


7 DestroyedInstanceError

7 DestroyedInstanceError

error: pathspec 'raw/src/org/yellcorp/error/DestroyedInstanceError.as' did not match any file(s) known to git

--- raw/src/org/yellcorp/error/DestroyedInstanceError.as
+++ raw/src/org/yellcorp/error/DestroyedInstanceError.as
@@ -0,0 +1,13 @@
+package org.yellcorp.error
+{
+import flash.errors.IllegalOperationError;
+
+
+public class DestroyedInstanceError extends IllegalOperationError
+{
+    public function DestroyedInstanceError(message:String = "Cannot call this method on a destroyed instance", id:int = 0)
+    {
+        super(message, id);
+    }
+}
+}


Issue 59; Implement radial gradient focal point in user space units.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/leymannx/svgweb.git/'


??????? RPC ??

??????? RPC ??

error: pathspec 'as3/com/netease/protobuf/SimpleWebRPC.as' did not match any file(s) known to git

--- as3/com/netease/protobuf/SimpleWebRPC.as
+++ as3/com/netease/protobuf/SimpleWebRPC.as
@@ -0,0 +1,52 @@
+// vim: tabstop=4 shiftwidth=4
+
+// Copyright (c) 2010 , NetEase.com,Inc. All rights reserved.
+//
+// Author: Yang Bo (pop.atry@gmail.com)
+//
+// Use, modification and distribution are subject to the "New BSD License"
+// as listed at <url: http://www.opensource.org/licenses/bsd-license.php >.
+
+package com.netease.protobuf {
+	import flash.net.*;
+	import flash.utils.*;
+	import flash.events.*;
+	public final class SimpleWebRPC {
+		private var urlPrefix:String
+		public function SimpleWebRPC(urlPrefix:String) {
+			this.urlPrefix = urlPrefix;
+		}
+		private static const REF:Dictionary = new Dictionary();
+		public function send(serviceName:String,
+							 methodName:String,
+							 input:IExternalizable,
+							 callback:Function,
+							 outputType:Class):void {
+
+			const loader:URLLoader = new URLLoader
+			REF[loader] = true;
+			loader.dataFormat = URLLoaderDataFormat.BINARY
+			loader.addEventListener(Event.COMPLETE, function(event:Event):void {
+				delete REF[loader]
+				const output:IExternalizable = new outputType
+				output.readExternal(loader.data)
+				callback(output)
+			})
+			function errorEventHandler(event:Event):void {
+				delete REF[loader]
+				callback(event)
+			}
+			loader.addEventListener(IOErrorEvent.IO_ERROR, errorEventHandler)
+			loader.addEventListener(
+					SecurityErrorEvent.SECURITY_ERROR, errorEventHandler)
+			const request:URLRequest = new URLRequest(
+				urlPrefix + serviceName + ":" + methodName)
+			request.method = URLRequestMethod.POST
+			const requestContent:ByteArray = new ByteArray
+			input.writeExternal(requestContent)
+			request.data = requestContent
+			request.contentType = "application/x-protobuf"
+			loader.load(request)
+		}
+	}
+}


FileUtil.getDotSuffix

FileUtil.getDotSuffix

git-svn-id: a1a4b28b82a3276cc491891159dd9963a0a72fae@5388 542714f4-19e9-0310-aa3c-eee0fc999fb1

fatal: unable to access 'https://github.com/threerings/narya.git/': The requested URL returned error: 403


adding functionality to the playSound function


BitArray: initial implementation.

BitArray: initial implementation.

Supports reading bit for bit, or several bits at once.
Also have a build-in function for reading Exponential Golumb
coded integers (unsigned only so far).

error: pathspec 'src/com/axis/rtspclient/BitArray.as' did not match any file(s) known to git

--- src/com/axis/rtspclient/BitArray.as
+++ src/com/axis/rtspclient/BitArray.as
@@ -0,0 +1,55 @@
+package com.axis.rtspclient {
+
+  import flash.utils.ByteArray;
+
+  public class BitArray extends ByteArray
+  {
+    private var src:ByteArray;
+    private var byte:uint;
+    private var bitpos:uint;
+
+    public function BitArray(src:ByteArray)
+    {
+      this.src    = src;
+      this.bitpos = 0;
+      this.byte   = 0; /* This should really be undefied, uint wont allow it though */
+    }
+
+    public function readBits(length:uint):uint
+    {
+      if (32 < length || 0 === length) {
+       /* To big for an uint */
+       throw new Error("Bit ranges must be 1 - 32.");
+      }
+
+      var result:uint = 0;
+      for (var i:uint = 1; i <= length; ++i) {
+        if (0 === bitpos) {
+          /* Previous byte all read out. Get a new one. */
+          byte = src.readUnsignedByte();
+        }
+
+        /* Shift result one left to make room for another bit,
+           then add the next bit on the stream. */
+        result = (result << 1) | ((byte >> (8 - (++bitpos))) & 0x01);
+        bitpos %= 8;
+      }
+
+      return result;
+    }
+
+    public function readUnsignedExpGolomb():uint
+    {
+      var bitsToRead:uint = 0;
+      while (readBits(1) !== 1) bitsToRead++;
+
+      if (bitsToRead == 0) return 0; /* Easy peasy, just a single 1. This is 0 in exp golomb */
+      if (bitsToRead >= 31) throw new Error("exp-golomb larger than 32 bits is unsupported.")
+
+      var n:uint = readBits(bitsToRead); /* Read all bits part of this number */
+      n |= (0x1 << (bitsToRead)); /* Move in the 1 read by while above */
+
+      return n - 1; /* Because result in exp golomb is one larger */
+    }
+  }
+}


Check before removing event listener.

Check before removing event listener.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/pubnub/flash.git/'