* [Edbrowse-dev] scandir
@ 2014-04-28 12:38 Karl Dahlke
2014-04-30 15:54 ` Adam Thompson
2014-05-02 3:05 ` Chris Brannon
0 siblings, 2 replies; 4+ messages in thread
From: Karl Dahlke @ 2014-04-28 12:38 UTC (permalink / raw)
To: Edbrowse-dev
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.
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.
Karl Dahlke
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Edbrowse-dev] scandir
2014-04-28 12:38 [Edbrowse-dev] scandir Karl Dahlke
@ 2014-04-30 15:54 ` Adam Thompson
2014-05-02 3:05 ` Chris Brannon
1 sibling, 0 replies; 4+ messages in thread
From: Adam Thompson @ 2014-04-30 15:54 UTC (permalink / raw)
To: Karl Dahlke; +Cc: Edbrowse-dev
[-- 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 --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Edbrowse-dev] scandir
2014-04-28 12:38 [Edbrowse-dev] scandir Karl Dahlke
2014-04-30 15:54 ` Adam Thompson
@ 2014-05-02 3:05 ` Chris Brannon
2014-05-02 11:57 ` Adam Thompson
1 sibling, 1 reply; 4+ messages in thread
From: Chris Brannon @ 2014-05-02 3:05 UTC (permalink / raw)
To: Edbrowse-dev
Karl Dahlke <eklhad@comcast.net> writes:
> 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 don't really have any input on this, but maybe one way to get started
would be to see if we can build edbrowse against mingw32 or cygwin?
Both provide POSIX C libraries for Windows, I believe.
-- Chris
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Edbrowse-dev] scandir
2014-05-02 3:05 ` Chris Brannon
@ 2014-05-02 11:57 ` Adam Thompson
0 siblings, 0 replies; 4+ messages in thread
From: Adam Thompson @ 2014-05-02 11:57 UTC (permalink / raw)
To: Chris Brannon; +Cc: Edbrowse-dev
[-- Attachment #1: Type: text/plain, Size: 749 bytes --]
On Thu, May 01, 2014 at 08:05:24PM -0700, Chris Brannon wrote:
> Karl Dahlke <eklhad@comcast.net> writes:
>
> > 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 don't really have any input on this, but maybe one way to get started
> would be to see if we can build edbrowse against mingw32 or cygwin?
> Both provide POSIX C libraries for Windows, I believe.
Mingw's a good shout actually. When I get a Windows machine again (my friend's
borrowing mine at the moment) I'll try this.
In general I'd prefer a build against mingw as I've generally found it easier
to install than cygwin, though that may have changed.
Cheers,
Adam.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-05-02 11:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-28 12:38 [Edbrowse-dev] scandir Karl Dahlke
2014-04-30 15:54 ` Adam Thompson
2014-05-02 3:05 ` Chris Brannon
2014-05-02 11:57 ` Adam Thompson
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).