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

Function FileVars_IsValidEncoding

src/Edit.c:6470–6483  ·  view source on GitHub ↗

============================================================================= FileVars_IsValidEncoding()

Source from the content-addressed store, hash-verified

6468// FileVars_IsValidEncoding()
6469//
6470BOOL FileVars_IsValidEncoding ( LPFILEVARS lpfv )
6471{
6472 CPINFO cpi;
6473 if ( lpfv->mask & FV_ENCODING &&
6474 lpfv->iEncoding >= 0 &&
6475 lpfv->iEncoding < COUNTOF ( mEncoding ) ) {
6476 if ( ( mEncoding[lpfv->iEncoding].uFlags & NCP_INTERNAL ) ||
6477 IsValidCodePage ( mEncoding[lpfv->iEncoding].uCodePage ) &&
6478 GetCPInfo ( mEncoding[lpfv->iEncoding].uCodePage, &cpi ) ) {
6479 return ( TRUE );
6480 }
6481 }
6482 return ( FALSE );
6483}
6484
6485
6486//=============================================================================

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected