Backport finished (I hope.) Again, can't find anything wrong, but as soon as I say that.....
Back port wasn't really that difficult, I just took the some of the code cleanup and put it in the old. Did manage to break a couple of things doing that, though. Fixed them up (I think.) I also liked my new time date method, but it didn't port well 🙁 Putting the old one back - later, (will be v2.5.0 assuming I don't have other things to fix crop up,) right now, I have a rather clunky fix in place (new sort code,) but I also now know why DOS measures file time in 2 second intervals. Going to take a programming break for a bit (starting to dream in code again.) I'm hoping people will be willing to test this for me and find the bugs I missed. Feel free to pm me, or just post I guess, any you find. When I'm satisfied that I can't find any more bugs (and I might try to streamline things a bit more, add in detection if file list exceeds the counters for example.) I'll move on to the next stages.
If everything comes out ok, the next stage is to get the 32-bit code old OS friendly (Win95,98) if I can. Then see if I can use the 64-bit addressing without going full out 64-bit (will need someone with a 32-bit system to test that part out.) Like the idea of being able to get rid of my rather clunky 32bit size + overflow conversion mess. Couldn't think of any way around that though. I'm hoping that since a 16-bit system can perform 32-bit math, a 32-bit system will be able to perform the 64-bit math. The final step, just for completeness sake, will be to do a full on 64-bit port. <edit> p.s. - Also plan to put LFN support in there if I can work out an acceptable way to figure the column width's and such. Also, putting in mention to the originator's and such (rewrote all of it, but they were the inspiration.)
Again, the DOS version comes in 2 flavors. The .com version that is limited to 1600ish entries in a directory, but is smaller, and should be faster. And the .exe version, which is limited to 2800ish entries. Personally, I rename the D.exe to E.exe, and if D comes up with "Too Many Files" I just use E instead. Not likely to ever happen, but....
The Windows version, is actually limited to 65,535 files & 65,535 Directories (because the counters for each are 16-bit.) I intend to put in a means to detect overflow eventually, just don't see a real need right now (still in beta.) Nothing bad happens, the counters just wrap around and you end up with fewer entries being displayed than are actually there (65,536 get left out.) Really though, if you have that many files in a directory, be prepared to wait as the computer reads/sorts them all. I was expecting not to have to worry about it, as I was expecting to have a memory allocation limit. However, all my testing puts that limit at extremely high values. Sure, I could re-code and actually set that high limit, but is there really a need to try and sort 50 million file/directory entries?