Changeset 1506
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/mainwnd.c
r1498 r1506 104 104 aren't user settable; realappname should be used for setting applicable to 105 105 one or more miniapp but not to FM/2 106 17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast CHAR CONSTANT * as CHAR *. 106 17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast 107 CHAR CONSTANT * as CHAR *. 108 11 Apr 10 GKY Fix drive tree rescan failure and program hang caused by event sem 109 never being posted 107 110 108 111 ***********************************************************************/ … … 353 356 } 354 357 if (fInitialDriveScan) { 358 fInitialDriveScan = FALSE; 355 359 DosPostEventSem(hevInitialCnrScanComplete); 356 360 DosCloseEventSem(hevInitialCnrScanComplete); 357 fInitialDriveScan = FALSE;358 361 } 359 362 return 0; … … 3057 3060 if (*lasttoolbar) { 3058 3061 sprintf(szKey, "%sToolbar", szPrefix); 3059 PrfWriteProfileString(fmprof, (CHAR *) (CHAR *)FM3Str, szKey, lasttoolbar);3062 PrfWriteProfileString(fmprof, FM3Str, szKey, lasttoolbar); 3060 3063 } 3061 3064 3062 3065 if (!fIsShutDownState) { 3063 3066 sprintf(szKey, "%sTargetDir", szPrefix); 3064 PrfWriteProfileString(fmprof, (CHAR *)FM3Str, szKey, targetdir);3067 PrfWriteProfileString(fmprof, FM3Str, szKey, targetdir); 3065 3068 sprintf(szKey, "%sVersion", szPrefix); 3066 PrfWriteProfileString(fmprof, (CHAR *)FM3Str, szKey, "3.16");3069 PrfWriteProfileString(fmprof, FM3Str, szKey, "3.16"); 3067 3070 } 3068 3071 … … 3088 3091 eos = &szKey[strlen(szKey)]; 3089 3092 strcpy(eos, "Pos"); 3090 PrfWriteProfileData(fmprof, (CHAR *)FM3Str, szKey, (PVOID) & swp,3093 PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & swp, 3091 3094 sizeof(SWP)); 3092 3095 dcd = WinQueryWindowPtr(WinWindowFromID(hwndC, DIR_CNR), QWL_USER); 3093 3096 if (dcd) { 3094 3097 strcpy(eos, "Sort"); 3095 PrfWriteProfileData(fmprof, (CHAR *)FM3Str, szKey, (PVOID) & dcd->sortFlags,3098 PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->sortFlags, 3096 3099 sizeof(INT)); 3097 3100 strcpy(eos, "Filter"); 3098 PrfWriteProfileData(fmprof, (CHAR *)FM3Str, szKey, (PVOID) & dcd->mask,3101 PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->mask, 3099 3102 sizeof(MASK)); 3100 3103 strcpy(eos, "View"); … … 3115 3118 flWindowAttr |= CV_NAME; 3116 3119 } 3117 PrfWriteProfileData(fmprof, (CHAR *)FM3Str, szKey, (PVOID) &flWindowAttr,3120 PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) &flWindowAttr, 3118 3121 sizeof(ULONG)); 3119 3122 WriteDetailsSwitches(szKeyBase, &dcd->ds, TRUE); … … 3121 3124 } 3122 3125 strcpy(eos, "Dir"); 3123 PrfWriteProfileString(fmprof, (CHAR *)FM3Str, szKey, szDir);3126 PrfWriteProfileString(fmprof, FM3Str, szKey, szDir); 3124 3127 numsaves++; 3125 3128 } … … 3131 3134 3132 3135 sprintf(szKey, "%sNumDirsLastTime", szPrefix); 3133 if (PrfQueryProfileData(fmprof, (CHAR *)FM3Str, szKey, (PVOID) &previous_numsaves, &ulTemp)) {3136 if (PrfQueryProfileData(fmprof, FM3Str, szKey, (PVOID) &previous_numsaves, &ulTemp)) { 3134 3137 ULONG size = 0; 3135 3138 3136 3139 sprintf(szKey, "%sVersion", szPrefix); 3137 PrfQueryProfileSize(fmprof, (CHAR *)FM3Str, szKey, &size);3140 PrfQueryProfileSize(fmprof, FM3Str, szKey, &size); 3138 3141 if (!size && fSaveState) { 3139 3142 for (ulTemp = 0; ulTemp < previous_numsaves; ulTemp++) 3140 3143 RemoveOldCnrSwitches(szPrefix, ulTemp); 3141 3144 sprintf(szKey, "%sVersion", szPrefix); 3142 PrfWriteProfileString(fmprof, (CHAR *)FM3Str, szKey, "3.16");3145 PrfWriteProfileString(fmprof, FM3Str, szKey, "3.16"); 3143 3146 } 3144 3147 for (ulTemp = numsaves; ulTemp < previous_numsaves; ulTemp++) { … … 3149 3152 sprintf(szKey, "%sNumDirsLastTime", szPrefix); 3150 3153 if (numsaves) { 3151 PrfWriteProfileData(fmprof, (CHAR *)FM3Str, szKey, (PVOID) &numsaves, sizeof(ULONG));3154 PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) &numsaves, sizeof(ULONG)); 3152 3155 WinQueryWindowPos(WinQueryWindow(hwndClient, QW_PARENT), &swp); 3153 3156 sprintf(szKey, "%sMySizeLastTime", szPrefix); 3154 PrfWriteProfileData(fmprof, (CHAR *)FM3Str, szKey, (PVOID) &swp, sizeof(SWP));3157 PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) &swp, sizeof(SWP)); 3155 3158 if (WinQueryWindowPos(hwndTree, &swp)) { 3156 3159 sprintf(szKey, "%sLastTreePos", szPrefix); 3157 PrfWriteProfileData(fmprof, (CHAR *)FM3Str, szKey, (PVOID) &swp, sizeof(SWP));3160 PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) &swp, sizeof(SWP)); 3158 3161 } 3159 3162 } 3160 3163 else if (fIsShutDownState) { 3161 PrfWriteProfileData(fmprof, (CHAR *)FM3Str, szKey, (PVOID) &numsaves, sizeof(ULONG));3164 PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) &numsaves, sizeof(ULONG)); 3162 3165 } 3163 3166 return numsaves; … … 3240 3243 if (fToolsChanged) 3241 3244 save_tools(NULL); 3242 PrfQueryProfileString(fmprof, (CHAR *)FM3Str, szKey, NULL, lasttoolbar, sizeof(lasttoolbar));3243 PrfWriteProfileString(fmprof, (CHAR *)FM3Str, "LastToolbar", lasttoolbar);3245 PrfQueryProfileString(fmprof, FM3Str, szKey, NULL, lasttoolbar, sizeof(lasttoolbar)); 3246 PrfWriteProfileString(fmprof, FM3Str, "LastToolbar", lasttoolbar); 3244 3247 load_tools(NULL); 3245 3248 PostMsg(hwndToolback, UM_SETUP2, MPVOID, MPVOID); … … 3247 3250 sprintf(szKey, "%sTargetDir", szPrefix); 3248 3251 { 3249 PrfQueryProfileString(fmprof, (CHAR *)FM3Str, szKey, NULL, targetdir, sizeof(targetdir));3250 PrfWriteProfileString(fmprof, (CHAR *)FM3Str, "TargetDir", targetdir);3252 PrfQueryProfileString(fmprof, FM3Str, szKey, NULL, targetdir, sizeof(targetdir)); 3253 PrfWriteProfileString(fmprof, FM3Str, "TargetDir", targetdir); 3251 3254 SetTargetDir(NULLHANDLE, TRUE); 3252 3255 } 3253 3256 size = sizeof(SWP); 3254 3257 sprintf(szKey, "%sMySizeLastTime", szPrefix); 3255 if (!PrfQueryProfileData(fmprof, (CHAR *)FM3Str, szKey, (PVOID) &swpO, &size) ||3258 if (!PrfQueryProfileData(fmprof, FM3Str, szKey, (PVOID) &swpO, &size) || 3256 3259 size != sizeof(SWP) || !swp.cx || !swp.cy) 3257 3260 { … … 3260 3263 // If restoring internally saved state, forget info 3261 3264 if (fDeleteState) 3262 PrfWriteProfileData(fmprof, (CHAR *)FM3Str, szKey, NULL, 0L);3265 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L); 3263 3266 WinQueryWindowPos(WinQueryWindow(hwndClient, QW_PARENT), &swpN); 3264 3267 if (swpN.fl & (SWP_MINIMIZE | SWP_HIDE)) … … 3268 3271 size = sizeof(SWP); 3269 3272 sprintf(szKey, "%sLastTreePos", szPrefix); 3270 if (PrfQueryProfileData(fmprof, (CHAR *)FM3Str, szKey, (PVOID) &swp, &size)) {3273 if (PrfQueryProfileData(fmprof, FM3Str, szKey, (PVOID) &swp, &size)) { 3271 3274 if (fDeleteState) 3272 PrfWriteProfileData(fmprof, (CHAR *)FM3Str, szKey, NULL, 0L);3275 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L); 3273 3276 swp.hwnd = hwndTree; 3274 3277 TransformSwp(&swp, xtrans, ytrans); … … 3299 3302 sprintf(szKey, "%sNumDirsLastTime", szPrefix); 3300 3303 size = sizeof(ULONG); 3301 if (PrfQueryProfileData(fmprof, (CHAR *)FM3Str, szKey, (PVOID) &numsaves, &size)) {3304 if (PrfQueryProfileData(fmprof, FM3Str, szKey, (PVOID) &numsaves, &size)) { 3302 3305 if (fDeleteState) 3303 PrfWriteProfileData(fmprof, (CHAR *)FM3Str, szKey, NULL, 0L);3306 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L); 3304 3307 for (x = numsaves - 1; x >= 0; x--) { 3305 3308 CHAR *eos = szKey; … … 3311 3314 strcpy(eos, "Pos"); 3312 3315 size = sizeof(SWP); 3313 if (PrfQueryProfileData(fmprof, (CHAR *)FM3Str, szKey, (PVOID) &swp, &size)) {3316 if (PrfQueryProfileData(fmprof, FM3Str, szKey, (PVOID) &swp, &size)) { 3314 3317 strcpy(eos, "Dir"); ; 3315 3318 size = sizeof(szDir); 3316 if (PrfQueryProfileData(fmprof, (CHAR *)FM3Str, szKey, (PVOID) szDir, &size)) {3319 if (PrfQueryProfileData(fmprof, FM3Str, szKey, (PVOID) szDir, &size)) { 3317 3320 // If restoring shutdown state and drive marked no prescan 3318 3321 // bypass window restore … … 3363 3366 strcpy(eos, "Sort"); 3364 3367 size = sizeof(INT); 3365 if (PrfQueryProfileData(fmprof, (CHAR *)FM3Str, szKey, (PVOID) &dcd->sortFlags,3368 if (PrfQueryProfileData(fmprof, FM3Str, szKey, (PVOID) &dcd->sortFlags, 3366 3369 &size)) { 3367 3370 if (!dcd->sortFlags) … … 3370 3373 size = sizeof(MASK); 3371 3374 strcpy(eos, "Filter"); 3372 if (PrfQueryProfileData(fmprof, (CHAR *)FM3Str, szKey, (PVOID) &dcd->mask, &size)) {3375 if (PrfQueryProfileData(fmprof, FM3Str, szKey, (PVOID) &dcd->mask, &size)) { 3373 3376 if (*dcd->mask.szMask) 3374 3377 WinSendMsg(WinWindowFromID(hwndC, DIR_CNR), … … 3379 3382 if (!noview) { 3380 3383 size = sizeof(ULONG); 3381 if (PrfQueryProfileData(fmprof, (CHAR *)FM3Str, szKey, (PVOID) &dcd->flWindowAttr,3384 if (PrfQueryProfileData(fmprof, FM3Str, szKey, (PVOID) &dcd->flWindowAttr, 3382 3385 &size)) { 3383 3386 … … 4718 4721 sprintf(szKey, "%s.NumDirsLastTime", szStateName); 4719 4722 size = sizeof(ULONG); 4720 if (!PrfQueryProfileData(fmprof, (CHAR *)FM3Str, szKey, (PVOID) &numsaves, &size)) {4723 if (!PrfQueryProfileData(fmprof, FM3Str, szKey, (PVOID) &numsaves, &size)) { 4721 4724 saymsg(MB_ENTER | MB_ICONASTERISK, hwnd, 4722 4725 GetPString(IDS_WARNINGTEXT), … … 4726 4729 Runtime_Error(pszSrcFile, __LINE__, NULL); 4727 4730 else { 4728 PrfWriteProfileData(fmprof, (CHAR *)FM3Str, szKey, NULL, 0L);4731 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L); 4729 4732 for (x = 0; x < numsaves; x++) { 4730 4733 sprintf(szKeyBase, "%s.DirCnr.%lu", szStateName, x); … … 4732 4735 size = 0; 4733 4736 sprintf(szKey, "%sVersion", szStateName); 4734 if (PrfQueryProfileSize(fmprof, (CHAR *)FM3Str, szKey, &size) && size)4737 if (PrfQueryProfileSize(fmprof, FM3Str, szKey, &size) && size) 4735 4738 RemoveOldCnrSwitches(szStateName, x); 4736 4739 } … … 5053 5056 else 5054 5057 fComments = TRUE; 5055 PrfWriteProfileData(fmprof, (CHAR *)FM3Str, "Comments", &fComments, sizeof(BOOL));5058 PrfWriteProfileData(fmprof, FM3Str, "Comments", &fComments, sizeof(BOOL)); 5056 5059 WinSetWindowText((fComments) ? hwndAutoview : hwndAutoMLE, NullStr); 5057 5060 goto AutoChange; … … 5125 5128 PostMsg(WinQueryWindow(hwnd, QW_PARENT), WM_UPDATEFRAME, 5126 5129 MPFROMLONG(FCF_MENU), MPVOID); 5127 PrfWriteProfileData(fmprof, (CHAR *)FM3Str, "MenuInvisible",5130 PrfWriteProfileData(fmprof, FM3Str, "MenuInvisible", 5128 5131 &MenuInvisible, sizeof(BOOL)); 5129 5132 } … … 5399 5402 strcpy(lasttoolbar, 5400 5403 quicktool[SHORT1FROMMP(mp1) - IDM_QUICKTOOLSTART - 1]); 5401 PrfWriteProfileString(fmprof, (CHAR *)FM3Str, "LastToolbar", lasttoolbar);5404 PrfWriteProfileString(fmprof, FM3Str, "LastToolbar", lasttoolbar); 5402 5405 } 5403 5406 PostMsg(hwndToolback, UM_SETUP2, MPVOID, MPVOID); … … 5707 5710 5708 5711 size = sizeof(BOOL); 5709 if (PrfQueryProfileData(fmprof, (CHAR *)FM3Str, "MenuInvisible", &temp, &size) &&5712 if (PrfQueryProfileData(fmprof, FM3Str, "MenuInvisible", &temp, &size) && 5710 5713 size && temp) 5711 5714 WinSendMsg(hwnd, WM_COMMAND, MPFROM2SHORT(IDM_HIDEMENU, 0), MPVOID); 5712 5715 size = sizeof(BOOL); 5713 if (PrfQueryProfileData(fmprof, (CHAR *)FM3Str, "FreeTree", &temp, &size) &&5716 if (PrfQueryProfileData(fmprof, FM3Str, "FreeTree", &temp, &size) && 5714 5717 size && temp) 5715 5718 WinSendMsg(hwnd, WM_COMMAND, MPFROM2SHORT(IDM_FREETREE, 0), MPVOID); 5716 5719 size = sizeof(BOOL); 5717 if (PrfQueryProfileData(fmprof, (CHAR *)FM3Str, "AutoTile", &temp, &size) &&5720 if (PrfQueryProfileData(fmprof, FM3Str, "AutoTile", &temp, &size) && 5718 5721 size && !temp) 5719 5722 WinSendMsg(hwnd, WM_COMMAND, MPFROM2SHORT(IDM_AUTOTILE, 0), MPVOID); … … 5746 5749 if (!fSaveState || 5747 5750 !PrfQueryProfileData(fmprof, 5748 (CHAR *)FM3Str,5751 FM3Str, 5749 5752 "LastTreePos", 5750 5753 &swp, &size) || size != sizeof(SWP)) { … … 5756 5759 size = sizeof(ratio); 5757 5760 if (!PrfQueryProfileData(fmprof, 5758 (CHAR *)FM3Str,5761 FM3Str, 5759 5762 "TreeWindowRatio", 5760 5763 (PVOID) & ratio, … … 5798 5801 PostMsg(hwndToolback, UM_SETUP2, MPVOID, MPVOID); 5799 5802 if (fInitialDriveScan) { 5803 fInitialDriveScan = FALSE; 5800 5804 DosPostEventSem(hevInitialCnrScanComplete); 5801 5805 DosCloseEventSem(hevInitialCnrScanComplete); … … 6296 6300 load_tools(path); 6297 6301 PrfWriteProfileString(fmprof, 6298 (CHAR *)FM3Str, "LastToolbar", lasttoolbar);6302 FM3Str, "LastToolbar", lasttoolbar); 6299 6303 PostMsg(hwndToolback, UM_SETUP2, MPVOID, MPVOID); 6300 6304 WinSetWindowText(hwndButtonlist, (CHAR *) GetPString(IDS_TOOLBARTEXT)); … … 6309 6313 sprintf(szKey, "%s.NumDirsLastTime", path); // path is state name 6310 6314 if (!PrfQueryProfileData(fmprof, 6311 (CHAR *)FM3Str,6315 FM3Str, 6312 6316 szKey, 6313 6317 (PVOID)&numsaves, -
trunk/dll/mainwnd2.c
r1498 r1506 39 39 one or more miniapp but not to FM/2 40 40 17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast CHAR CONSTANT * as CHAR *. 41 11 Apr 10 GKY Fix drive tree rescan failure and program hang caused by event sem 42 never being posted 41 43 42 44 ***********************************************************************/ … … 605 607 fTileBackwards = (fTileBackwards) ? FALSE : TRUE; 606 608 PrfWriteProfileData(fmprof, 607 (CHAR *)FM3Str,609 FM3Str, 608 610 "TileBackwards", 609 611 (PVOID) & fTileBackwards, sizeof(BOOL)); … … 887 889 pd->hwndDir2 = StartDirCnr(hwnd, s, (HWND) 0, 3); 888 890 if (fInitialDriveScan) { 891 fInitialDriveScan = FALSE; 889 892 DosPostEventSem(hevInitialCnrScanComplete); 890 893 DosCloseEventSem(hevInitialCnrScanComplete); 891 fInitialDriveScan = FALSE;892 894 } 893 895 WinSetFocus(HWND_DESKTOP, pd->hwndCurr); -
trunk/dll/treecnr.c
r1498 r1506 80 80 before scan completes 81 81 22 Nov 09 GKY Add LVM.EXE to partition submenu 82 17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast CHAR CONSTANT * as CHAR *. 82 17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast 83 CHAR CONSTANT * as CHAR *. 84 11 Apr 10 GKY Fix drive tree rescan failure and program hang caused by event sem 85 never being posted 83 86 84 87 ***********************************************************************/ … … 649 652 temptop = fTopDir; 650 653 fTopDir = TRUE; 651 } 652 DosWaitEventSem(hevInitialCnrScanComplete, SEM_INDEFINITE_WAIT); 654 } 655 if (fInitialDriveScan) 656 DosWaitEventSem(hevInitialCnrScanComplete, SEM_INDEFINITE_WAIT); 653 657 ShowTreeRec(dcd->hwndCnr, (CHAR *)mp1, fCollapseFirst, TRUE); 654 658 PostMsg(hwndTree, WM_COMMAND, MPFROM2SHORT(IDM_UPDATE, 0), MPVOID); … … 3272 3276 WinSetWindowText(WinWindowFromID(hwndFrame, FID_TITLEBAR), "VTree"); 3273 3277 FixSwitchList(hwndFrame, "VTree"); 3278 fInitialDriveScan = FALSE; 3274 3279 DosPostEventSem(hevInitialCnrScanComplete); 3275 3280 DosCloseEventSem(hevInitialCnrScanComplete); 3276 fInitialDriveScan = FALSE;3277 3281 } 3278 3282 else {
Note:
See TracChangeset
for help on using the changeset viewer.