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

Function MRU_DeleteFileFromStore

src/Helpers.c:1562–1580  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1560}
1561
1562BOOL MRU_DeleteFileFromStore ( LPMRULIST pmru, LPCWSTR pszFile )
1563{
1564 int i = 0;
1565 LPMRULIST pmruStore;
1566 WCHAR wchItem[256];
1567 pmruStore = MRU_Create ( pmru->szRegKey, pmru->iFlags, pmru->iSize );
1568 MRU_Load ( pmruStore );
1569 while ( MRU_Enum ( pmruStore, i, wchItem, COUNTOF ( wchItem ) ) != -1 ) {
1570 PathAbsoluteFromApp ( wchItem, wchItem, COUNTOF ( wchItem ), TRUE );
1571 if ( lstrcmpi ( wchItem, pszFile ) == 0 ) {
1572 MRU_Delete ( pmruStore, i );
1573 } else {
1574 i++;
1575 }
1576 }
1577 MRU_Save ( pmruStore );
1578 MRU_Destroy ( pmruStore );
1579 return ( 1 );
1580}
1581
1582BOOL MRU_Empty ( LPMRULIST pmru )
1583{

Callers 2

HL_OpenMRU_LastFunction · 0.85
FileMRUDlgProcFunction · 0.85

Calls 7

MRU_CreateFunction · 0.85
MRU_LoadFunction · 0.85
MRU_EnumFunction · 0.85
PathAbsoluteFromAppFunction · 0.85
MRU_DeleteFunction · 0.85
MRU_SaveFunction · 0.85
MRU_DestroyFunction · 0.85

Tested by

no test coverage detected