Closed MicroVirus closed 4 years ago
Actually, ignore the two last commits (Misc->FileSystem and Misc) for now please. These two commits were older and more has changed than I was aware of. I need to review them more in depth first.
OK. I'm still not seeing why we need a filesystem class. The other two patches are merged.
OK. I'm still not seeing why we need a filesystem class.
Just a bit of good coding practice / separation of concerns. The filesystem stuff in Misc and OSYS requires additional headers and these are different between windows and linux (and if we'll support Mac or so they might yet again be different), so isolating them into their own cpp file localises specific portability concerns and simplifies Misc.
So maybe a convenience header? Most of what is there is already portable at a C-lib API level, and this includes the Windows CRT, and the file system code has been tested to work on Mac with USE_POSIX. The game used these functions to begin with. What portability concerns are there?
GNU autotools best feature is finding which header file you need to include, across any platform. I decided not to rely on that though, since we have been using Visual Studio periodically, so we have the USE_WINDOWS and USE_POSIX to select the headers. All you need to set is USE_WINDOWS to get started.
Two patches to SpyProcess. Cleaning up Misc a bit -- isolate the file system stuff.