Case-insensitive fopen and chdir definition for case-sensitive file-systems.
A dissection of the code and explanation of it.
To be used outside function:
const char* casepath(const char *path)
FILE* fcaseopen(char const *path, char const *mode)
void casechdir(char const *path)