Changeset 21827 for branches/gcc-kmk/src
- Timestamp:
- Nov 29, 2011, 12:18:51 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gcc-kmk/src/kernel32/profile.cpp
r21755 r21827 219 219 PROFILESECTION **next_section; 220 220 PROFILEKEY *key, *prev_key, **next_key; 221 222 if (file == NULL) 223 return NULL; 221 224 222 225 first_section = (PROFILESECTION *)HEAP_xalloc( SystemHeap, 0, sizeof(*section) ); … … 1004 1007 if ( (p = getenv( "ODIN_INI" )) && (f = fopen( p, "r" )) ) 1005 1008 { 1006 PROFILE_OdinProfile = PROFILE_Load( f );1007 fclose( f );1008 strncpy(PROFILE_OdinIniUsed,p,MAX_PATHNAME_LEN);1009 PROFILE_OdinIniUsed[MAX_PATHNAME_LEN-1] = 0;1009 PROFILE_OdinProfile = PROFILE_Load( f ); 1010 fclose( f ); 1011 strncpy(PROFILE_OdinIniUsed,p,MAX_PATHNAME_LEN); 1012 PROFILE_OdinIniUsed[MAX_PATHNAME_LEN-1] = 0; 1010 1013 } 1011 1014 else 1012 1015 { 1013 #if 0 /* Aug 27 2000 4:26am: Why not use the global kernel32Path 1014 * (LoadLibrary may cause harm if used...) */ 1015 HINSTANCE hInstance = LoadLibraryA("KERNEL32.DLL"); 1016 GetModuleFileNameA(hInstance,PROFILE_OdinIniUsed,sizeof(PROFILE_OdinIniUsed)); 1017 FreeLibrary(hInstance); 1018 strcpy(strrchr(PROFILE_OdinIniUsed,'\\')+1,ODINININAME); 1019 #else 1020 strcpy(PROFILE_OdinIniUsed, kernel32Path); 1021 strcat(PROFILE_OdinIniUsed, ODINININAME); 1022 #endif 1023 f = fopen(PROFILE_OdinIniUsed, "r"); 1024 PROFILE_OdinProfile = PROFILE_Load(f); 1025 fclose(f); 1016 strcpy(PROFILE_OdinIniUsed, kernel32Path); 1017 strcat(PROFILE_OdinIniUsed, ODINININAME); 1018 if ((f = fopen(PROFILE_OdinIniUsed, "r"))) 1019 { 1020 PROFILE_OdinProfile = PROFILE_Load(f); 1021 fclose(f); 1022 } 1026 1023 } 1027 1024
Note:
See TracChangeset
for help on using the changeset viewer.