+ /* Change directory to location of .exe so startup directory can be
+ deleted. */
+ progname = strrchr (modname, '\\');
+ *progname = '\0';
+ SetCurrentDirectory (modname);
+ *progname = '\\';
+
+ /* Due to problems with interaction between API functions that use "OEM"
+ codepage vs API functions that use the "ANSI" codepage, we need to
+ make things consistent by choosing one and sticking with it. */
+ SetConsoleCP (GetACP());
+ SetConsoleOutputCP (GetACP());
+