From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-x22c.google.com (mail-wg0-x22c.google.com [IPv6:2a00:1450:400c:c00::22c]) by hurricane.the-brannons.com (Postfix) with ESMTPS id 55E6577E2B for ; Wed, 30 Apr 2014 08:54:39 -0700 (PDT) Received: by mail-wg0-f44.google.com with SMTP id a1so383887wgh.3 for ; Wed, 30 Apr 2014 08:54:06 -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=pkA3y9mqDlqrskcj0cWxvmxrb/1yY8CU52bLxTgS19I=; b=jLc6o8p4aIHBX9t8CgmooBhD6oxKLgJLR6GCelEjQfxwoMnoD4CLozQCOvvINW7Dfk kz6d8v4Gds2Jl5SIFdXjOl3TsNZNlxCCjiP2kSHwctAbK/3f9m4/WNuNqcrFoNZWtznw SAWgEBGNwjdCVOwBbBeo3anf0yNDRHCajaygNCAdLOFriTmcZHg6T02W2bH9Mqf2vFQc LK6uzuVsDvq7/Sdw3INDTuOQw1SroHvIKD/rQKxJEOaRmNhvcsbcPbpdfqksGx93n3dq QQJuqmv/UIJDr4cKT3yDxHEcYjXktbEL52+b64V1Ex/GMwVMAa29qVcYoQyLYApmCD9l i0lg== X-Received: by 10.180.218.197 with SMTP id pi5mr4279015wic.21.1398873246662; Wed, 30 Apr 2014 08:54:06 -0700 (PDT) Received: from toaster.adamthompson.me.uk (toaster.adamthompson.me.uk. [2001:8b0:1142:9042::2]) by mx.google.com with ESMTPSA id hg18sm4408726wib.19.2014.04.30.08.54.04 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 30 Apr 2014 08:54:05 -0700 (PDT) Date: Wed, 30 Apr 2014 16:54:02 +0100 From: Adam Thompson To: Karl Dahlke Message-ID: <20140430155402.GB17325@toaster.adamthompson.me.uk> References: <20140328123843.eklhad@comcast.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NU0Ex4SbNnrxsi6C" Content-Disposition: inline In-Reply-To: <20140328123843.eklhad@comcast.net> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Edbrowse-dev@lists.the-brannons.com Subject: Re: [Edbrowse-dev] scandir 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: Wed, 30 Apr 2014 15:54:39 -0000 --NU0Ex4SbNnrxsi6C Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 28, 2014 at 12:38:43PM +0000, Karl Dahlke wrote: > In stringfile.c there's a bunch of code to read the contents of a directo= ry. > It is separated out by linux, bsd unix, and dos/windows. > The calls are different, radically different for dos. > Yes I'm still looking towards the day when edbrowse is ported to windows. > curl and pcre are there so I think it's feasible. Yeah, I'd be interested to see if this is possible. > I was just wondering if we should switch all this over to scandir, > it would definitely be less code and easier to read and understand etc. > I guess the question is whether scandir is in the windows C library, > if not then there's no point in making the switch. > Again not a high priority, I just like letting libraries do the work for = me > when it makes sense. >=20 =46rom what I can find there's no scandir (or an exact equivalent) in the Windows C library, but there apparently is a posix compatible scandir implementation for windows out there. In which case, it *may* be possible to define scandir ourselves if compiling under Windows, then we *may* be able to get some of the benefits (i.e. reduced amounts of code) by using our custom scandir under Windows or the l= inux (and other unix?) implementations of scandir when in those environments. Either way, this sounds like a sensible move since (according to the man pa= ge) scandir is in POSIX. Unfortunately I don't currently have a Windows machine to test any of this. Cheers, Adam. --NU0Ex4SbNnrxsi6C Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJTYRyaAAoJELZ22lNQBzHOHggH/061cY/8Ht16Mbf4ZNLfhF/o lnAv96vPOXSrDdO5EjNk7nG1BbiHJJMj5Gj5SAPcJksztuJGdGlh44vN+rrLtLrK P+QubeqpU2J49x41NjsMhcOjuZ5jH1f3j4jHbebxbvfBFuy99Sbm2UKRM8XCTOpO 7j9tnAtuvcwrxFHv3ZKy8A9qk+yC8C1XiyjaqfsqYIGySt9FtmeCkNQ+QKN+gaR3 Rbvgcgfo0sDCz5iez5BEYFThK3PflM5KfWjjvYvVEwBPFN3EYYD1LfFUaBbJ7IGO 7LRmQ9iyez5ur4GYQRHoVYFpT4B9u6fPy/owMvRDVI+DXw5EE12sdc4U7wXNEGk= =egqY -----END PGP SIGNATURE----- --NU0Ex4SbNnrxsi6C--