MCPcopy Create free account
hub / github.com/ProgerXP/Notepad2e / IniSectionGetString

Function IniSectionGetString

src/Helpers.c:78–103  ·  view source on GitHub ↗

============================================================================= Manipulation of (cached) ini file sections

Source from the content-addressed store, hash-verified

76// Manipulation of (cached) ini file sections
77//
78int IniSectionGetString (
79 LPCWSTR lpCachedIniSection,
80 LPCWSTR lpName,
81 LPCWSTR lpDefault,
82 LPWSTR lpReturnedString,
83 int cchReturnedString )
84{
85 WCHAR *p = ( WCHAR * ) lpCachedIniSection;
86 WCHAR tch[256];
87 int ich;
88 if ( p ) {
89 lstrcpy ( tch, lpName );
90 lstrcat ( tch, L"=" );
91 ich = lstrlen ( tch );
92 while ( *p ) {
93 if ( StrCmpNI ( p, tch, ich ) == 0 ) {
94 lstrcpyn ( lpReturnedString, p + ich, cchReturnedString );
95 return ( lstrlen ( lpReturnedString ) );
96 } else {
97 p = StrEnd ( p ) + 1;
98 }
99 }
100 }
101 lstrcpyn ( lpReturnedString, lpDefault, cchReturnedString );
102 return ( lstrlen ( lpReturnedString ) );
103}
104
105
106int IniSectionGetInt (

Callers 6

MRU_LoadFunction · 0.85
Style_LoadFunction · 0.85
Style_ImportFunction · 0.85
CreateBarsFunction · 0.85
LoadSettingsFunction · 0.85
LoadFlagsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected