Thank you for this. It works on Linux almost without changing anything, and in 64-bit.
The thing is I'm very lame about typing in full paths and I don't often have text files needed to be edited in the same directory as the executable. So I added to it to use "FileSelect$()" function which is documented here:
How I added to it is easy, but if a few people request it then I could post it.
Alternatively, I could have supported a special entry for input filename so it pastes from the clipboard. However, getting a full path into the clipboard could be troublesome on Linux for some reason...
08-31-2022, 01:59 PM (This post was last modified: 08-31-2022, 02:06 PM by SpriggsySpriggs.)
I noticed in your "FINDDATA.BAS" file that you've also declared "FindFirstFileW" and "FindNextFileW". Were you planning on making a version that would enable usage of unicode (wide) strings?
Side note: You should change your declarations from UNSIGNED OFFSET to just OFFSET as an invalid handle return in Win32 API is a -1 but since you are currently casting them to UNSIGNED, you won't notice the failure unless you cast them back to a signed OFFSET. This would be your "FindFirstFileA/W" and "FindNextFileA/W" declarations. Typically, you'd only ever use an UNSIGNED OFFSET for a wParam in Win32.
I'd still change the UNSIGNED OFFSETs to OFFSET just for matching of the data types but it does look like INVALID_HANDLE_VALUE will be caught just fine.
What a wonderful community: helpful and full of imagination!
Here it is like the top hat from which the magician always pulls out some rabbit suddenly! Such a very nice thing.
Basically there is only to do some changes to manage accents and special characters.