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

Function MRU_Save

src/Helpers.c:1637–1660  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1635}
1636
1637BOOL MRU_Save ( LPMRULIST pmru )
1638{
1639 int i;
1640 WCHAR tchName[32];
1641 WCHAR *pIniSection = LocalAlloc ( LPTR, sizeof ( WCHAR ) * 32 * 1024 );
1642 //IniDeleteSection(pmru->szRegKey);
1643 for ( i = 0; i < pmru->iSize; i++ ) {
1644 if ( pmru->pszItems[i] ) {
1645 wsprintf ( tchName, L"%.2i", i + 1 );
1646 /*if (pmru->iFlags & MRU_UTF8) {
1647 WCHAR tchItem[1024];
1648 WCHAR wchItem[1024];
1649 int cbw = MultiByteToWideChar(CP_UTF8,0,pmru->pszItems[i],-1,wchItem,COUNTOF(wchItem));
1650 WideCharToMultiByte(CP_UTF7,0,wchItem,cbw,tchItem,COUNTOF(tchItem),NULL,NULL);
1651 IniSectionSetString(pIniSection,tchName,tchItem);
1652 }
1653 else*/
1654 IniSectionSetString ( pIniSection, tchName, pmru->pszItems[i] );
1655 }
1656 }
1657 SaveIniSection ( pmru->szRegKey, pIniSection );
1658 LocalFree ( pIniSection );
1659 return ( 1 );
1660}
1661
1662
1663BOOL MRU_MergeSave ( LPMRULIST pmru, BOOL bAddFiles, BOOL bRelativePath, BOOL bUnexpandMyDocs )

Callers 3

MRU_DeleteFileFromStoreFunction · 0.85
MRU_MergeSaveFunction · 0.85
MainWndProcFunction · 0.85

Calls 1

IniSectionSetStringFunction · 0.85

Tested by

no test coverage detected