Changeset 1302 for trunk/dll/avl.c
- Timestamp:
- Nov 30, 2008, 6:28:52 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/avl.c
r1220 r1302 33 33 22 Jun 08 GKY Added free_archivers for fortify checking 34 34 19 Jul 08 GKY ifdef Fortify free_archivers 35 29 Nov 08 GKY Add ini entry for LastArchiver so the previous archiver is selected in the 36 Select archive dialog if no default is provided. 37 29 Nov 08 GKY Remove or replace with a mutex semaphore DosEnterCriSec where appropriate. 35 38 36 39 ***********************************************************************/ … … 81 84 BOOL arcsigsmodified; 82 85 86 #define ARCHIVER_LINE_BYTES 256 87 83 88 //=== quick_find_type() === 84 89 ARC_TYPE *quick_find_type(CHAR * filespec, ARC_TYPE * topsig) … … 163 168 164 169 // Try to reselect last selection unless user wants default selection 170 if (sOldSelect == LIT_NONE) { 171 ULONG size = sizeof(SHORT); 172 173 PrfQueryProfileData(fmprof, appname, "LastArchiver", &sOldSelect, &size); 174 } 165 175 if (sOldSelect != LIT_NONE && !found) { 166 176 SHORT sItemCount = … … 301 311 //=== get_line_strip_comments() read line, strip comments and whitespace === 302 312 303 #define ARCHIVER_LINE_BYTES 256304 305 313 static PSZ get_line_strip_comments(PSZ pszIn, FILE * fp) 306 314 { … … 359 367 arcsigs_trailer_line_num = 0; 360 368 361 DosEnterCritSec(); 369 //DosEnterCritSec(); //GKY 11-29-08 370 DosRequestMutexSem(hmtxFM2Globals, SEM_INDEFINITE_WAIT); 362 371 psz = searchpath(GetPString(IDS_ARCHIVERBB2)); 363 372 if (!psz || !*psz) { 364 DosExitCritSec(); 373 DosReleaseMutexSem(hmtxFM2Globals); 374 //DosExitCritSec(); 365 375 return -1; 366 376 } 367 377 fp = _fsopen(psz, "r", SH_DENYWR); 368 DosExitCritSec(); 378 DosReleaseMutexSem(hmtxFM2Globals); 379 //DosExitCritSec(); 369 380 if (!fp) 370 381 return -2; … … 818 829 if (!*szItemText) 819 830 pat = NULL; 820 831 else { 821 832 for (; pat; pat = pat->next) { 822 833 if (pat->id && !strcmp(szItemText, pat->id)) … … 839 850 return 0; 840 851 } 852 PrfWriteProfileData(fmprof, appname, "LastArchiver", &sSelect, sizeof(SHORT)); 841 853 sLastSelect = sSelect; 842 854 WinDismissDlg(hwnd, TRUE); … … 858 870 LM_QUERYSELECTION, 859 871 MPFROMSHORT(LIT_FIRST), MPVOID); 860 if (sSelect != LIT_NONE) 861 sLastSelect = sSelect; 872 if (sSelect != LIT_NONE) { 873 sLastSelect = sSelect; 874 PrfWriteProfileData(fmprof, appname, "LastArchiver", &sSelect, sizeof(SHORT)); 875 } 862 876 *ppatReturn = NULL; 863 877 PostMsg(hwnd, WM_CLOSE, MPVOID, MPVOID); // fixme to understand why needed
Note:
See TracChangeset
for help on using the changeset viewer.