Include :

- aggiornamento prototipi.
This commit is contained in:
Dario Sassi
2019-03-18 06:51:20 +00:00
parent 47854794f6
commit fdb711eea6
4 changed files with 20 additions and 20 deletions
+12 -20
View File
@@ -1,7 +1,7 @@
//----------------------------------------------------------------------------
// EgalTech 2013-2013
// EgalTech 2013-2019
//----------------------------------------------------------------------------
// File : EgtIniFile.h Data : 10.12.13 Versione : 1.4a4
// File : EgtIniFile.h Data : 17.03.19 Versione : 2.1c2
// Contenuto : Funzioni per leggere e scrivere stringhe UTF-8 in file INI.
//
//
@@ -21,36 +21,28 @@
inline std::string
GetPrivateProfileStringUtf8( const char* szSection, const char* szKey, const char* szDefault, const char* szIniFile)
{
int nChar ;
wchar_t szBuffW[_MAX_PATH] ;
// leggo la stringa dal file INI come ANSI/UTF-8 in WChar e metto in Char
nChar = GetPrivateProfileStringW( AtoW( szSection), AtoW( szKey), NULL, szBuffW, _MAX_PATH, AtoW( szIniFile)) ;
wchar_t szBuffW[_MAX_PATH] ;
int nChar = GetPrivateProfileStringW( AtoW( szSection), AtoW( szKey), NULL, szBuffW, _MAX_PATH, AtoW( szIniFile)) ;
if ( nChar > 0) {
return LPSTR( WtoAEX<>( szBuffW, CP_ACP)) ;
}
else
if ( nChar <= 0)
return szDefault ;
return LPSTR( WtoAEX<>( szBuffW, CP_ACP)) ;
}
//----------------------------------------------------------------------------
inline std::string
GetPrivateProfileStringUtf8( const char* szSection, const char* szKey, const char* szDefault, const wchar_t* szIniFile)
{
int nChar ;
wchar_t szBuffW[_MAX_PATH] ;
// leggo la stringa dal file INI come ANSI/UTF-8 in WChar e metto in Char
nChar = GetPrivateProfileStringW( AtoW( szSection), AtoW( szKey), NULL, szBuffW, _MAX_PATH, szIniFile) ;
wchar_t szBuffW[_MAX_PATH] ;
int nChar = GetPrivateProfileStringW( AtoW( szSection), AtoW( szKey), NULL, szBuffW, _MAX_PATH, szIniFile) ;
if ( nChar > 0) {
return LPSTR( WtoAEX<>( szBuffW, CP_ACP)) ;
}
else
if ( nChar <= 0)
return szDefault ;
return LPSTR( WtoAEX<>( szBuffW, CP_ACP)) ;
}
//----------------------------------------------------------------------------