-
-#ifdef WITH_LIBCORE
- {
- FILE *f;
-
-#ifdef _WIN32
- char path[MAX_PATH];
- SHGetFolderPath(NULL, CSIDL_LOCAL_APPDATA, NULL, 0, path);
- strncat(path, "\\", sizeof(path));
-#else
- char path[512];
- strcpy(path, getpwuid(getuid())->pw_dir);
- strncat(path, "/", sizeof(path));
-#endif
-
- strncat(path, HOME_DIR_INI_FILE, sizeof(path));
-
- /* Process ini file in user's home. */
- f = fopen(path, "rt");
- if(f) {
- lc_opt_from_file(path, f, NULL);
- fclose(f);
- }
-
- /* Process ini file in current directory. */
- f = fopen(LOCAL_INI_FILE, "rt");
- if(f) {
- lc_opt_from_file(LOCAL_INI_FILE, f, NULL);
- fclose(f);
- }
-
- /* process arguments from the command line */
- lc_opt_from_argv(firm_opt_get_root(), def_params.arg_prefix, def_params.argc, def_params.argv, NULL);
- }
-#endif