Implement WritePrivateProfileSectionA().

This commit is contained in:
Rein Klazes 2000-01-05 01:42:51 +00:00 committed by Alexandre Julliard
parent d2304aa893
commit 7458be0243
1 changed files with 24 additions and 12 deletions

View File

@ -1321,24 +1321,36 @@ BOOL16 WINAPI WritePrivateProfileSection16( LPCSTR section,
}
/***********************************************************************
* WritePrivateProfileSection32A (KERNEL32)
* WritePrivateProfileSectionA (KERNEL32)
*/
BOOL WINAPI WritePrivateProfileSectionA( LPCSTR section,
LPCSTR string, LPCSTR filename )
{
char *p =(char*)string;
BOOL ret = FALSE;
LPSTR p ;
EnterCriticalSection( &PROFILE_CritSect );
if (PROFILE_Open( filename )) {
if (!section && !string && !filename)
PROFILE_ReleaseFile(); /* always return FALSE in this case */
else {
while(*string){
LPSTR buf=HEAP_strdupA( GetProcessHeap(), 0, string );
if((p=strchr( buf, '='))){
*p='\0';
ret = PROFILE_SetString( section, buf, p+1 );
}
HeapFree( GetProcessHeap(), 0, buf );
string += strlen(string)+1;
}
FIXME("WritePrivateProfileSection32A empty stub\n");
if (TRACE_ON(profile)) {
TRACE("(%s) => [%s]\n", filename, section);
while (*(p+1)) {
TRACE("%s\n", p);
p += strlen(p);
p += 1;
}
}
return FALSE;
LeaveCriticalSection( &PROFILE_CritSect );
return ret;
}
/***********************************************************************