edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Adam Thompson <arthompson1990@gmail.com>
To: Karl Dahlke <eklhad@comcast.net>
Cc: Edbrowse-dev@lists.the-brannons.com
Subject: Re: [Edbrowse-dev] scandir
Date: Wed, 30 Apr 2014 16:54:02 +0100	[thread overview]
Message-ID: <20140430155402.GB17325@toaster.adamthompson.me.uk> (raw)
In-Reply-To: <20140328123843.eklhad@comcast.net>

[-- Attachment #1: Type: text/plain, Size: 1513 bytes --]

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 directory.
> 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.
> 

From 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 linux
(and other unix?) implementations of scandir when in those environments.

Either way, this sounds like a sensible move since (according to the man page)
scandir is in POSIX.
Unfortunately I don't currently have a Windows machine to test any of this.

Cheers,
Adam.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2014-04-30 15:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-28 12:38 Karl Dahlke
2014-04-30 15:54 ` Adam Thompson [this message]
2014-05-02  3:05 ` Chris Brannon
2014-05-02 11:57   ` Adam Thompson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140430155402.GB17325@toaster.adamthompson.me.uk \
    --to=arthompson1990@gmail.com \
    --cc=Edbrowse-dev@lists.the-brannons.com \
    --cc=eklhad@comcast.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).