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

Function CheckIniFileRedirect

src/Notepad2.c:5130–5151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5128 return ( 0 );
5129}
5130int CheckIniFileRedirect ( LPWSTR lpszFile, LPCWSTR lpszModule )
5131{
5132 WCHAR tch[MAX_PATH];
5133 if ( GetPrivateProfileString ( L"Notepad2", L"Notepad2.ini", L"", tch, COUNTOF ( tch ), lpszFile ) ) {
5134 if ( CheckIniFile ( tch, lpszModule ) ) {
5135 lstrcpy ( lpszFile, tch );
5136 return ( 1 );
5137 } else {
5138 WCHAR tchFileExpanded[MAX_PATH];
5139 ExpandEnvironmentStrings ( tch, tchFileExpanded, COUNTOF ( tchFileExpanded ) );
5140 if ( PathIsRelative ( tchFileExpanded ) ) {
5141 lstrcpy ( lpszFile, lpszModule );
5142 lstrcpy ( PathFindFileName ( lpszFile ), tchFileExpanded );
5143 return ( 1 );
5144 } else {
5145 lstrcpy ( lpszFile, tchFileExpanded );
5146 return ( 1 );
5147 }
5148 }
5149 }
5150 return ( 0 );
5151}
5152int FindIniFile()
5153{
5154 int bFound = 0;

Callers 1

FindIniFileFunction · 0.85

Calls 1

CheckIniFileFunction · 0.85

Tested by

no test coverage detected