From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from qmta09.westchester.pa.mail.comcast.net (qmta09.westchester.pa.mail.comcast.net [IPv6:2001:558:fe14:43:76:96:62:96]) by hurricane.the-brannons.com (Postfix) with ESMTP id 673F277C81 for ; Sun, 2 Feb 2014 17:19:26 -0800 (PST) Received: from omta05.westchester.pa.mail.comcast.net ([76.96.62.43]) by qmta09.westchester.pa.mail.comcast.net with comcast id Md1Q1n0030vyq2s59dJyai; Mon, 03 Feb 2014 01:18:58 +0000 Received: from eklhad ([107.5.36.150]) by omta05.westchester.pa.mail.comcast.net with comcast id MdJx1n00Z3EMmQj3RdJxPX; Mon, 03 Feb 2014 01:18:58 +0000 To: Edbrowse-dev@lists.the-brannons.com From: Karl Dahlke User-Agent: edbrowse/3.4.10 Date: Sun, 02 Feb 2014 20:18:59 -0500 Message-ID: <20140102201859.eklhad@comcast.net> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20121106; t=1391390338; bh=cOiBIP5AWMUfJ68i9ZYZVZxuTyyvJ7drHopbOk8atmU=; h=Received:Received:To:From:Reply-to:Subject:Date:Message-ID: Mime-Version:Content-Type; b=infPtEob/wg/CxpNMC5opBh1vnPOFKSwRnzh5oux2+qEtVNcBvd6JdPETISxL0tHu G+ieGsEprwvHXZGnN5QoeQ/12Aiwj1h9oMQu3DQjVWOxXQlT2ZzrhzMX9HKCChPric mRBIq+ygQfs0l3S4xzcCXfhJMFoWxJ1wqKeobNkQxgbF6Ehud8fdPU1BTFJGUy7s8f OYAnYGXRDGhoNmj5h7xJd/C1arg1Z00oGVt6mI4xSUfJ9oP/TOWzj2n/+9ykrUxTfl v/S/4DCWMDlb14eN7AC2rGbQKlt+wT87GSLQ2XnhsQPhK37Iv0+pA59sbqz3SlluOh py6Kawqsb1Nkg== Subject: [Edbrowse-dev] Chris patch is in X-BeenThere: edbrowse-dev@lists.the-brannons.com X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Karl Dahlke List-Id: Edbrowse Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Feb 2014 01:19:26 -0000 Well my question of a few days ago, why not make a vector of structs and really use the power of c++, instead of a list of pointers to structs that I still have to allocate, well I now know the answer, after wasting a couple days of programming and debugging. I should have known from the get-go. If the struct itself moves, because of realloc, all the pointers that use to point to it are invalid, and to try to keep up with that is an impossible bookkeeping nightmare. So Chris was right, keep it simple, just use a list of pointers to the structures that I already allocate, and the structures don't move, and they can point to each other, and all is well. I built and tested and pushed his patch. We can in the future replace tagArray with a c++ array or vector, if that makes sense, but not a big hurry on that. While testing I uncovered a bug, and I thought I caused it, or maybe Chris patch caused it, but no, it was there before. Run edbrowse with this as input. e jsrt b 3g $i3* y /colors qt The form starts out with colors green and white, which are by the way the colors of the Michigan State Spartans, who won the Rose Bowl, thank you very much. But after reset the colors blank out, and they should default back to green and white. This bug only happens with 3g, which pushes the javascript timer button. So next I'll try to track down this bug. But since it was there before, not caused by what Chris and I did, I pushed our change. Karl Dahlke