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.