From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-x22f.google.com (mail-wi0-x22f.google.com [IPv6:2a00:1450:400c:c05::22f]) by hurricane.the-brannons.com (Postfix) with ESMTPS id 1779779E33 for ; Thu, 14 May 2015 15:00:04 -0700 (PDT) Received: by wicnf17 with SMTP id nf17so111820745wic.1 for ; Thu, 14 May 2015 15:00:17 -0700 (PDT) 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=OqSw7sCPYiISRVaURmUX6eEO41XJQPnrvp1fn2N5hsw=; b=lKJ62v2IL6c+VfnFTIv6rZjUskMiuD89MwymNOjLX+k/0nPpqPAoiWv+mUc2+qPFNN YTyN0nmC7/ZHlSmHEpEkxJlVfQso/iolJ/XAhB9lFcyn5T06/5SO5PiVkAxRmkOvVbMN nXt0syj+mBRWkg7tC3g5pAAbEAYMyZZZrWrGtAslFK+ybfJDfXYh+Wr48lsxA/ljgXEh wXnQWtxSnmbZem8TsyFYz0fBOtn2cxxKoaYLlMDxV2QOVJ7YNiDO5pveWxnn+1zRts43 jrcQXTVdotp9rqpvU3lWrkg9jwr2eX+X9ZpQ9BeMv3v5MoBb/Of4Z5ErvOpNNBORppIU ep9w== X-Received: by 10.180.188.4 with SMTP id fw4mr17789191wic.7.1431640816982; Thu, 14 May 2015 15:00:16 -0700 (PDT) Received: from toaster.adamthompson.me.uk (toaster.adamthompson.me.uk. [2001:8b0:1142:9042::2]) by mx.google.com with ESMTPSA id 16sm437712wjs.41.2015.05.14.15.00.15 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 May 2015 15:00:15 -0700 (PDT) Date: Thu, 14 May 2015 23:00:13 +0100 From: Adam Thompson To: Karl Dahlke Message-ID: <20150514220013.GI2917@toaster.adamthompson.me.uk> References: <20150414155503.eklhad@comcast.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GBuTPvBEOL0MYPgd" Content-Disposition: inline In-Reply-To: <20150414155503.eklhad@comcast.net> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Edbrowse-dev@lists.the-brannons.com Subject: Re: [Edbrowse-dev] interprocess shared files X-BeenThere: edbrowse-dev@lists.the-brannons.com X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Edbrowse Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 May 2015 22:00:04 -0000 --GBuTPvBEOL0MYPgd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 14, 2015 at 03:55:03PM -0400, Karl Dahlke wrote: > Ok, that wasn't hard. > stringfile.c url.c messages.c is now a group of code that is > shared between any and all of the edbrowse processes, > even those that are c++. > The tweak that makes the latter possible is this in eb.h. >=20 > #ifndef __cplusplus > typedef uchar bool; > #define false 0 > #define true 1 > #endif >=20 > No other plusplus conditional compilation is necessary, anywhere. > That's good cause I dislike conditional compilation. I've slightly altered this such that we now don't need ++.o versions. This = was achieved by adding: #ifdef __cplusplus extern "C" { #endif After we've ran the above conditional typedef compilation and: #ifdef __cplusplus } #endif At the end of eb.h This means we don't have to duplicate dependancies for these files in the makefile, thus reducing the possibility for build problems later. > I did have to make some other changes in the c files but those are minor > and work fine in either language. > One silly example was the use of new as a variable, > which obviously blows up in c++ so I just rename the variable. > Anyways Adam you are good to go with >=20 > cp jseng-moz.cpp jseng-duk.c >=20 > and give it a whirl. > There are over 500 lines of code less than there use to be, > so you won't have to waste time on that, > and you have access to more functions, > including the string management functions that you will need > to replace the dynamic c++ strings, > which there are only a couple in the file anyways. Thanks for doing this, it'll certainly make things easier. > The only aesthetic downer is jseng use to include ebjs.h, small and conta= ined, > but now it includes eb.h, which is everything. > It might be worth making a common.h intermediate to embrase the common fi= les. > I'll hold that off for another day. I'm not too sure I mind this that much. At the end of the day it's not that bad and we shouldn't really have any conflicting types etc which'd make this a problem. A common.h would potentially be nicer though. Cheers, Adam. --GBuTPvBEOL0MYPgd Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVVRrtAAoJELZ22lNQBzHOvjEIAIU2efBnBxAfkUNWreaWx8uO iTPCxAQt3u7MguvSQEBaGGI7k8E+YTmJP6rWIxGP7ovtmaChlhhlF1MQIlopNJEP FJu868LT7lVyh5p9i6CQO88NjkeVBCCSFwFdkoBLauz1EXhhcQZkShj0BJ8aHjlb cqP4fEUz5UXNj6PfWnLEKMOdMS7rw2Ak/AqlH/26vOHGyJXe0tc83l1zMA9BJODu 1AUiLyochvxZpTqctazOvGA+to2XEI1PSO/9+ZrzAHfRToy9eTRW6HBByi1ciQCX h7A4+AD7tHobkLFuwylnsjrCCPYjfigeb0a9jiX65rl99gmoy0+EPzd2D94ZMYQ= =uVR4 -----END PGP SIGNATURE----- --GBuTPvBEOL0MYPgd--