From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-x234.google.com (mail-we0-x234.google.com [IPv6:2a00:1450:400c:c03::234]) by hurricane.the-brannons.com (Postfix) with ESMTPS id 2F61677AD6 for ; Tue, 24 Dec 2013 00:53:06 -0800 (PST) Received: by mail-we0-f180.google.com with SMTP id t61so5692689wes.39 for ; Tue, 24 Dec 2013 00:52:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=39Bgi6NcP6yqiSIIBV5iFYllees6D6EGd67sAvvUkGw=; b=xDgr2tWyVBLxjyNUg1OTEyazq7oZBigCYfEvFAmo74QCOz2a1n5pvcpmWO5onVi9AN x1vj2RLjKxgfQC8tVYeP+hGlZKd082nsiW0aHIUDu4BEEaio6gYvelvlSvAV10E7Ps1U Y3a+whkv9+780n7U/cgiQcjaFNVcIvr/AVtIAL62GRSjj547wj0WBXCK8PGQcF3UACdY O9Z+53T/sieaFWufxranFF7ldKIGraKTu8fd3JFhXtAapPyYqJ4535EDrLa3VBP4d3+u 8rv7t3pf2JrnHngfxaPJ8QeUhXVPlycR5Uh8thdDDXRvoVuPmwSK7m0GWKf9MhXs41GI cTvQ== X-Received: by 10.194.6.161 with SMTP id c1mr638709wja.89.1387875179246; Tue, 24 Dec 2013 00:52:59 -0800 (PST) Received: from toaster.adamthompson.me.uk (toaster.adamthompson.me.uk. [2001:8b0:1142:9042::2]) by mx.google.com with ESMTPSA id fu1sm35085977wib.9.2013.12.24.00.52.58 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 24 Dec 2013 00:52:58 -0800 (PST) Date: Tue, 24 Dec 2013 08:52:56 +0000 From: Adam Thompson To: Karl Dahlke Message-ID: <20131224085256.GD16257@toaster.adamthompson.me.uk> References: <20131123103625.eklhad@comcast.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20131123103625.eklhad@comcast.net> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Edbrowse-dev@lists.the-brannons.com Subject: Re: [Edbrowse-dev] Mix X-BeenThere: edbrowse-dev@lists.the-brannons.com X-Mailman-Version: 2.1.17 Precedence: list List-Id: Edbrowse Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 08:53:06 -0000 On Mon, Dec 23, 2013 at 10:36:25AM -0500, Karl Dahlke wrote: > It is reassuring, and unsettling, that you can mix C and C++. > Here is a little program that is a mix of both, yet it compiles and runs fine. > > -------------------------------------------------- > #include > #include > #include > > using namespace std; > > void duplicate( int& a, int& b) > { > a *= 2; > b *= 2; > } > > int main() > { > string s; > getline(cin, s); > cout << s << endl; > int x = 6, y(7); > duplicate(x, y); > printf("%d,%d\n", x, y); > } > -------------------------------------------------- Slightly pedantic note about this, in c++ you *should* really use #include Rather than #include You could also use cin >> s; Instead of getline(cin, s); For added c++-ness (due to stream operators). > > The point for us is that jsdom.c and jsdom.cpp > might not have to be very different at all, > since most of the c should carry along. > Maybe we can get lucky and just change the calls to the js engine. Hopefully, that and a few datatype changes. Cheers, Adam.