Changeset 533
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/dll/inis.c ¶
r377 r533 12 12 05 Jun 05 SHL Use QWL_USER 13 13 17 Jul 06 SHL Use Runtime_Error 14 03 Nov 06 SHL Renames 15 03 Nov 06 SHL Count thread usage 14 16 15 17 ***********************************************************************/ … … 36 38 static PSZ pszSrcFile = __FILE__; 37 39 38 #pragma alloc_text(INIS,EnumAppNames,GetKeyData,EnumKeyNames,AddIniProc,IniProc,BackupIni ,ChangeIniProc,SwapIniProc,IniLBSubProc,IniLBSubProc2,CopyIni,CompareIni,IntraIniProc,FilterIniProc)40 #pragma alloc_text(INIS,EnumAppNames,GetKeyData,EnumKeyNames,AddIniProc,IniProc,BackupIniThread,ChangeIniProc,SwapIniProc,IniLBSubProc,IniLBSubProc2,CopyIniThread,CompareIniThread,IntraIniProc,FilterIniProc) 39 41 #pragma alloc_text(STARTUP,StartIniEditor) 40 42 … … 79 81 80 82 81 VOID CopyIni (VOID *args)83 VOID CopyIniThread (VOID *args) 82 84 { 83 85 INIREC *inirec = (INIREC *)args; … … 94 96 if(hmq2) { 95 97 WinCancelShutdown(hmq2,TRUE); 98 IncrThreadUsage(); 96 99 *userini = *sysini = 0; 97 100 memset(&cprfp,0,sizeof(PRFPROFILE)); … … 246 249 WinDestroyMsgQueue(hmq2); 247 250 } 251 DecrThreadUsage(); 248 252 WinTerminate(hab2); 249 253 } … … 259 263 260 264 261 VOID CompareIni(VOID *args)265 static VOID CompareIniThread (VOID *args) 262 266 { 263 267 INIREC *inirec = (INIREC *)args; … … 271 275 if(hmq2) { 272 276 WinCancelShutdown(hmq2,TRUE); 277 IncrThreadUsage(); 278 279 // fixme to do something? 273 280 274 281 WinDestroyMsgQueue(hmq2); 275 282 } 283 DecrThreadUsage(); 276 284 WinTerminate(hab2); 277 285 } … … 281 289 282 290 283 VOID BackupIni(VOID *args)291 static VOID BackupIniThread (VOID *args) 284 292 { 285 293 PPRFPROFILE prfp = (PPRFPROFILE)args; … … 299 307 if(hmq2) { 300 308 WinCancelShutdown(hmq2,TRUE); 309 IncrThreadUsage(); 301 310 *userini = *sysini = 0; 302 311 memset(&cprfp,0,sizeof(PRFPROFILE)); … … 375 384 WinDestroyMsgQueue(hmq2); 376 385 } 386 DecrThreadUsage(); 377 387 WinTerminate(hab2); 378 388 } … … 2559 2569 inirec->confirm = inidata->confirm; 2560 2570 strcpy(inirec->filename1,inidata->ininame); 2561 if (_beginthread(CopyIni ,NULL,122880,(PVOID)inirec) == -1) {2571 if (_beginthread(CopyIniThread,NULL,122880,(PVOID)inirec) == -1) { 2562 2572 Runtime_Error(pszSrcFile, __LINE__, GetPString(IDS_COULDNTSTARTTHREADTEXT)); 2563 2573 free(inirec); … … 2580 2590 strcpy(inirec->filename1,inidata->ininame); 2581 2591 inirec->hwndDlg = hwnd; 2582 if (_beginthread(CompareIni ,NULL,122880,(PVOID)inirec) == -1) {2592 if (_beginthread(CompareIniThread,NULL,122880,(PVOID)inirec) == -1) { 2583 2593 Runtime_Error(pszSrcFile, __LINE__, GetPString(IDS_COULDNTSTARTTHREADTEXT)); 2584 2594 free(inirec); … … 2626 2636 break; 2627 2637 } 2628 if (_beginthread(CopyIni ,NULL,122880,(PVOID)inirec) == -1) {2638 if (_beginthread(CopyIniThread,NULL,122880,(PVOID)inirec) == -1) { 2629 2639 Runtime_Error(pszSrcFile, __LINE__, GetPString(IDS_COULDNTSTARTTHREADTEXT)); 2630 2640 free(inirec); … … 2673 2683 else { 2674 2684 prfp->cchSysName = strlen(prfp->pszSysName); 2675 if (_beginthread(BackupIni ,NULL,122880,(PVOID)prfp) == -1) {2685 if (_beginthread(BackupIniThread,NULL,122880,(PVOID)prfp) == -1) { 2676 2686 Runtime_Error(pszSrcFile, __LINE__, GetPString(IDS_COULDNTSTARTTHREADTEXT)); 2677 2687 free(prfp->pszSysName); -
TabularUnified trunk/dll/killproc.c ¶
r451 r533 12 12 14 Jul 06 SHL Use Runtime_Error 13 13 29 Jul 06 SHL Use xfgets 14 03 Nov 06 SHL Renames 15 03 Nov 06 SHL Count thread usage 14 16 15 17 ***********************************************************************/ … … 37 39 static PSZ pszSrcFile = __FILE__; 38 40 39 #pragma alloc_text(KILLPROC,FillKillList ,FillKillList2,GetDosPgmName,KillDlgProc)41 #pragma alloc_text(KILLPROC,FillKillListThread,FillKillListThread2,GetDosPgmName,KillDlgProc) 40 42 41 43 CHAR *GetDosPgmName (PID pid,CHAR *string) … … 69 71 70 72 71 VOID FillKillList2 (VOID *arg)73 static VOID FillKillListThread2 (VOID *arg) 72 74 { 73 75 HWND hwnd = *(HWND *)arg; … … 83 85 thmq = WinCreateMsgQueue(thab,0); 84 86 WinCancelShutdown(thmq,TRUE); 87 IncrThreadUsage(); 85 88 86 89 WinSendDlgItemMsg(hwnd,KILL_LISTBOX,LM_DELETEALL,MPVOID,MPVOID); … … 126 129 PostMsg(hwnd,UM_CONTAINER_FILLED,MPVOID,MPVOID); 127 130 WinDestroyMsgQueue(thmq); 131 DecrThreadUsage(); 128 132 WinTerminate(thab); 129 133 } 130 134 131 135 132 VOID FillKillList(VOID *arg)136 static VOID FillKillListThread (VOID *arg) 133 137 { 134 138 HWND hwnd = *(HWND *)arg; … … 149 153 thmq = WinCreateMsgQueue(thab,0); 150 154 WinCancelShutdown(thmq,TRUE); 155 IncrThreadUsage(); 151 156 152 157 WinSendDlgItemMsg(hwnd, … … 227 232 Abort: 228 233 DosForceDelete("$PSTAT#$.#$#"); 229 PostMsg(hwnd, 230 UM_CONTAINER_FILLED, 231 MPVOID, 232 MPVOID); 234 PostMsg(hwnd,UM_CONTAINER_FILLED,MPVOID,MPVOID); 233 235 WinDestroyMsgQueue(thmq); 236 DecrThreadUsage(); 234 237 WinTerminate(thab); 235 238 } … … 355 358 listdone = FALSE; 356 359 if(fUseQProcStat) { 357 if(_beginthread(FillKillList 2,360 if(_beginthread(FillKillListThread2, 358 361 NULL, 359 362 65536, … … 364 367 } 365 368 else { 366 if(_beginthread(FillKillList ,369 if(_beginthread(FillKillListThread, 367 370 NULL, 368 371 65536, -
TabularUnified trunk/dll/newview.c ¶
r396 r533 16 16 17 Jul 06 SHL Use Runtime_Error 17 17 26 Jul 06 SHL Use chop_at_crnl and convert_nl_to_nul 18 03 Nov 06 SHL Renames 19 03 Nov 06 SHL Count thread usage 18 20 19 21 ***********************************************************************/ … … 41 43 static PSZ pszSrcFile = __FILE__; 42 44 43 #pragma alloc_text(NEWVIEW,ViewStatusProc,FreeViewerMem,LoadFile )45 #pragma alloc_text(NEWVIEW,ViewStatusProc,FreeViewerMem,LoadFileThread) 44 46 #pragma alloc_text(NEWVIEW,InitWindow,PaintLine,ViewWndProc) 45 #pragma alloc_text(NEWVIEW,ViewFrameWndProc,StartViewer,ReLine )46 #pragma alloc_text(NEWVIEW,BuildAList,Search ,Clipboard,FindStrDlgProc)47 #pragma alloc_text(NEWVIEW,ViewFrameWndProc,StartViewer,ReLineThread) 48 #pragma alloc_text(NEWVIEW,BuildAList,SearchThread,ClipboardThread,FindStrDlgProc) 47 49 #pragma alloc_text(NEWVIEW,BuildAList2,UrlDlgProc) 48 50 … … 893 895 } 894 896 895 static VOID Search (VOID * args)897 static VOID SearchThread(VOID * args) 896 898 { 897 899 HWND hwnd = (HWND)args; … … 910 912 { 911 913 hmq2 = WinCreateMsgQueue(hab2, 0); 912 if (hmq2) 913 { 914 if (hmq2) { 914 915 WinCancelShutdown(hmq2, TRUE); 916 IncrThreadUsage(); 915 917 ad = WinQueryWindowPtr(hwnd, QWL_USER); 916 918 if (ad) … … 1060 1062 WinDestroyMsgQueue(hmq2); 1061 1063 } 1064 DecrThreadUsage(); 1062 1065 WinTerminate(hab2); 1063 1066 } … … 1065 1068 } 1066 1069 1067 static VOID Clipboard (VOID * args)1070 static VOID ClipboardThread(VOID * args) 1068 1071 { 1069 1072 HWND hwnd = (HWND)args; … … 1081 1084 { 1082 1085 hmq2 = WinCreateMsgQueue(hab2, 0); 1083 if (hmq2) 1084 { 1086 if (hmq2) { 1085 1087 WinCancelShutdown(hmq2, TRUE); 1088 IncrThreadUsage(); 1086 1089 ad = WinQueryWindowPtr(hwnd, QWL_USER); 1087 1090 if (ad) … … 1168 1171 WinDestroyMsgQueue(hmq2); 1169 1172 } 1173 DecrThreadUsage(); 1170 1174 WinTerminate(hab2); 1171 1175 } … … 1173 1177 } 1174 1178 1175 static VOID ReLine (VOID * args)1179 static VOID ReLineThread(VOID * args) 1176 1180 { 1177 1181 HWND hwnd = (HWND)args; … … 1185 1189 priority_normal(); 1186 1190 hab2 = WinInitialize(0); 1187 if (hab2) 1188 { 1191 if (hab2) { 1189 1192 hmq2 = WinCreateMsgQueue(hab2, 0); 1190 if (hmq2) 1191 { 1193 if (hmq2) { 1192 1194 WinCancelShutdown(hmq2, TRUE); 1195 IncrThreadUsage(); 1193 1196 ad = WinQueryWindowPtr(hwnd, QWL_USER); 1194 if (ad) 1195 { 1197 if (ad) { 1196 1198 ad -> relining = TRUE; 1197 if (!DosRequestMutexSem(ad -> ScanSem, SEM_INDEFINITE_WAIT)) 1198 { 1199 if (!DosRequestMutexSem(ad -> ScanSem, SEM_INDEFINITE_WAIT)) { 1199 1200 ad -> busy++; 1200 1201 ad -> maxx = 0; … … 1358 1359 WinDestroyMsgQueue(hmq2); 1359 1360 } 1361 DecrThreadUsage(); 1360 1362 WinTerminate(hab2); 1361 1363 } 1362 1364 DosPostEventSem(CompactSem); 1363 if (ad && !ad -> stopflag) 1364 { 1365 if (ad && !ad -> stopflag) { 1365 1366 PostMsg(hwnd, UM_CONTAINER_FILLED, MPFROMLONG(firstline), 1366 1367 MPFROMLONG(cursored)); … … 1369 1370 } 1370 1371 1371 static VOID LoadFile (VOID * args)1372 static VOID LoadFileThread(VOID * args) 1372 1373 { 1373 1374 HWND hwnd = (HWND)args; … … 1387 1388 { 1388 1389 WinCancelShutdown(hmq2, TRUE); 1390 IncrThreadUsage(); 1389 1391 ad = WinQueryWindowPtr(hwnd, QWL_USER); 1390 1392 if (ad) … … 1465 1467 } 1466 1468 if (ad -> textsize) { 1467 if (_beginthread(ReLine , NULL, 524288, (PVOID) hwnd) == -1)1469 if (_beginthread(ReLineThread, NULL, 524288, (PVOID) hwnd) == -1) 1468 1470 Runtime_Error(pszSrcFile, __LINE__, GetPString(IDS_COULDNTSTARTTHREADTEXT)); 1469 1471 else … … 1482 1484 WinDestroyMsgQueue(hmq2); 1483 1485 } 1486 DecrThreadUsage(); 1484 1487 WinTerminate(hab2); 1485 1488 } … … 1958 1961 WinSetWindowPtr(hwndFrame, QWL_USER, (PVOID)oldproc); 1959 1962 ad -> hps = InitWindow(hwnd); 1960 if (_beginthread(LoadFile , NULL, 524288, (PVOID) hwnd) == -1)1963 if (_beginthread(LoadFileThread, NULL, 524288, (PVOID) hwnd) == -1) 1961 1964 Runtime_Error(pszSrcFile, __LINE__, GetPString(IDS_COULDNTSTARTTHREADTEXT)); 1962 1965 else { … … 2093 2096 if (!ad -> relining) 2094 2097 { 2095 if (_beginthread(ReLine , NULL, 524288, (PVOID) hwnd) == -1)2098 if (_beginthread(ReLineThread, NULL, 524288, (PVOID) hwnd) == -1) 2096 2099 { 2097 2100 Runtime_Error(pszSrcFile, __LINE__, GetPString(IDS_COULDNTSTARTTHREADTEXT)); … … 3679 3682 "Viewer.Searchtext", 3680 3683 (PVOID) ad -> searchtext); 3681 if (_beginthread(Search , NULL, 524288, (PVOID) hwnd) == -1)3684 if (_beginthread(SearchThread, NULL, 524288, (PVOID) hwnd) == -1) 3682 3685 Runtime_Error(pszSrcFile, __LINE__, GetPString(IDS_COULDNTSTARTTHREADTEXT)); 3683 3686 } … … 3967 3970 { 3968 3971 ad -> cliptype = SHORT1FROMMP(mp1); 3969 if (_beginthread(Clipboard ,NULL,524288,(PVOID) hwnd) == -1)3972 if (_beginthread(ClipboardThread,NULL,524288,(PVOID) hwnd) == -1) 3970 3973 Runtime_Error(pszSrcFile, __LINE__, GetPString(IDS_COULDNTSTARTTHREADTEXT)); 3971 3974 } -
TabularUnified trunk/dll/printer.c ¶
r355 r533 11 11 01 Aug 04 SHL Rework lstrip/rstrip usage 12 12 17 Jul 06 SHL Use Runtime_Error 13 03 Nov 06 SHL Renames 14 03 Nov 06 SHL Count thread usage 13 15 14 16 ***********************************************************************/ … … 34 36 35 37 #pragma alloc_text(PRINTER,PrinterReady,SayPrinterReady) 36 #pragma alloc_text(PRINTER2,PrintList )38 #pragma alloc_text(PRINTER2,PrintListThread) 37 39 #pragma alloc_text(PRINTER3,PrintDlgProc) 38 40 … … 92 94 93 95 94 //=== PrintList - background-print a list of files ===95 96 VOID PrintList (VOID *arg)96 //=== PrintListThread - background-print a list of files === 97 98 VOID PrintListThread (VOID *arg) 97 99 { 98 100 HAB hab2; … … 122 124 if(hmq2) { 123 125 WinCancelShutdown(hmq2,TRUE); 124 if(hwndMain) 125 WinSendMsg(hwndMain,UM_THREADUSE,MPFROMLONG(1L),MPVOID); 126 IncrThreadUsage(); 126 127 if(li && li->list && li->list[0]) { 127 128 AddNote(GetPString(IDS_PRINTINGLISTTEXT)); … … 321 322 AddNote(GetPString(IDS_PRINTEDLISTTEXT)); 322 323 } 323 if(hwndMain)324 WinSendMsg(hwndMain,UM_THREADUSE,MPVOID,MPVOID);325 324 WinDestroyMsgQueue(hmq2); 326 325 } 326 DecrThreadUsage(); 327 327 WinTerminate(hab2); 328 328 } -
TabularUnified trunk/dll/seeall.c ¶
r517 r533 19 19 17 Jul 06 SHL Use Runtime_Error 20 20 19 Oct 06 SHL Correct . and .. detect 21 03 Nov 06 SHL Renames 22 03 Nov 06 SHL Count thread usage 21 23 22 24 ***********************************************************************/ … … 48 50 #pragma alloc_text(SEEALL,UpdateList,CollectList,ReSort,Mark) 49 51 #pragma alloc_text(SEEALL,BuildAList,RemoveDeleted,SeeFrameWndProc,FilterList) 50 #pragma alloc_text(SEEALL2,SeeObjWndProc,MakeSeeObj ,FindDupes,DupeDlgProc)52 #pragma alloc_text(SEEALL2,SeeObjWndProc,MakeSeeObjWinThread,FindDupes,DupeDlgProc) 51 53 #pragma alloc_text(SEEALL3,FreeAllFilesList,DoADir,FindAllThread,AFDrvsWndProc) 52 54 #pragma alloc_text(SEEALL3,StartSeeAll) … … 398 400 if(li && li->list && li->list[0]) { 399 401 strcpy(li->targetpath,printer); 400 if(_beginthread(PrintList ,NULL,65536,(PVOID)li) == -1) {402 if(_beginthread(PrintListThread,NULL,65536,(PVOID)li) == -1) { 401 403 Runtime_Error(pszSrcFile, __LINE__, GetPString(IDS_COULDNTSTARTTHREADTEXT)); 402 404 FreeListInfo(li); … … 1261 1263 1262 1264 1263 static VOID MakeSeeObj 1265 static VOID MakeSeeObjWinThread(VOID *args) 1264 1266 { 1265 1267 HAB hab2; … … 1792 1794 if(hmq2) { 1793 1795 WinCancelShutdown(hmq2,TRUE); 1796 IncrThreadUsage(); 1794 1797 if(ad->cursored <= ad->afifiles) { 1795 1798 for(x = 0;x < ad->affiles;x++) … … 1886 1889 PostMsg(hwnd,UM_RESCAN,MPVOID,MPVOID); 1887 1890 DosReleaseMutexSem(ad->hmtxScan); 1891 } // if got sem 1892 if(hmq2) { 1893 PostMsg(hwnd,UM_CONTAINER_FILLED,MPVOID,MPVOID); 1894 WinDestroyMsgQueue(hmq2); 1888 1895 } 1889 PostMsg(hwnd,UM_CONTAINER_FILLED,MPVOID,MPVOID); 1890 if(hmq2) 1891 WinDestroyMsgQueue(hmq2); 1892 if(hab2) 1896 if(hab2) { 1897 DecrThreadUsage(); 1893 1898 WinTerminate(hab2); 1899 } 1894 1900 } 1895 1901 … … 2136 2142 priority_normal(); 2137 2143 hab2 = WinInitialize(0); 2138 if(hab2) 2139 { 2144 if(hab2) { 2140 2145 hmq2 = WinCreateMsgQueue(hab2,0); 2141 if(hmq2) 2142 { 2146 if(hmq2) { 2143 2147 WinCancelShutdown(hmq2,TRUE); 2148 IncrThreadUsage(); 2144 2149 ad->afFilesToGet = min(FilesToGet,128); 2145 2150 if(!*ad->szFindPath) { … … 2184 2189 DosReleaseMutexSem(ad->hmtxScan); 2185 2190 } 2186 PostMsg(hwnd,UM_CONTAINER_FILLED,MPVOID,MPVOID);2187 if(hmq2)2191 if(hmq2) { 2192 PostMsg(hwnd,UM_CONTAINER_FILLED,MPVOID,MPVOID); 2188 2193 WinDestroyMsgQueue(hmq2); 2189 if(hab2) 2194 } 2195 if(hab2) { 2196 DecrThreadUsage(); 2190 2197 WinTerminate(hab2); 2198 } 2191 2199 } 2192 2200 … … 2655 2663 FID_HORZSCROLL); 2656 2664 pAD->multiplier = 1; 2657 if(_beginthread(MakeSeeObj ,NULL,122880,(PVOID)pAD) == -1)2665 if(_beginthread(MakeSeeObjWinThread,NULL,122880,(PVOID)pAD) == -1) 2658 2666 Runtime_Error(pszSrcFile, __LINE__, GetPString(IDS_COULDNTSTARTTHREADTEXT)); 2659 2667 else { -
TabularUnified trunk/dll/viewinf.c ¶
r377 r533 11 11 01 Aug 04 SHL Rework lstrip/rstrip usage 12 12 17 Jul 06 SHL Use Runtime_Error 13 03 Nov 06 SHL Renames 14 03 Nov 06 SHL Count thread usage 13 15 14 16 ***********************************************************************/ … … 34 36 static PSZ pszSrcFile = __FILE__; 35 37 36 #pragma alloc_text(VIEWINFS,FillListbox ,ViewInfProc)38 #pragma alloc_text(VIEWINFS,FillListboxThread,ViewInfProc) 37 39 38 40 typedef struct { … … 43 45 44 46 45 static VOID FillListbox 47 static VOID FillListboxThread(VOID *args) 46 48 { 47 49 HWND hwnd; … … 62 64 63 65 WinCancelShutdown(hmq2,TRUE); 66 IncrThreadUsage(); 64 67 priority_normal(); 65 68 if(!dummy->help) … … 185 188 WinDestroyMsgQueue(hmq2); 186 189 } 190 PostMsg(hwnd,UM_CONTAINER_FILLED,MPVOID,MPVOID); 191 DecrThreadUsage(); 187 192 WinTerminate(hab2); 188 193 } 189 PostMsg(hwnd,UM_CONTAINER_FILLED,MPVOID,MPVOID);190 194 free(dummy); 191 195 } … … 281 285 if (help) 282 286 d->help = 1; 283 if(_beginthread(FillListbox ,NULL,65536,(PVOID)d) == -1) {287 if(_beginthread(FillListboxThread,NULL,65536,(PVOID)d) == -1) { 284 288 Runtime_Error(pszSrcFile, __LINE__, GetPString(IDS_COULDNTSTARTTHREADTEXT)); 285 289 free(d); -
TabularUnified trunk/dll/worker.c ¶
r396 r533 16 16 22 Jul 06 SHL Comments 17 17 22 Jul 06 SHL Check more run time errors 18 03 Nov 06 SHL Renames 19 03 Nov 06 SHL Count thread usage 18 20 19 21 ***********************************************************************/ … … 119 121 CHAR **files = NULL; 120 122 INT numfiles = 0, numalloc = 0, plen = 0; 121 register CHAR *p, *pp; 122 123 if (wk) 124 { 123 CHAR *p, *pp; 124 125 if (wk) { 125 126 if (wk -> li && 126 127 wk -> li -> list && … … 128 129 { 129 130 hab2 = WinInitialize(0); 130 if (hab2) 131 { 131 if (hab2) { 132 132 hmq2 = WinCreateMsgQueue(hab2, 0); 133 if (hmq2) 134 { 135 133 if (hmq2) { 136 134 CHAR message[(CCHMAXPATH * 2) + 80], wildname[CCHMAXPATH]; 137 135 register INT x; … … 140 138 141 139 WinCancelShutdown(hmq2, TRUE); 142 if (hwndMain) 143 WinSendMsg(hwndMain, 144 UM_THREADUSE, 145 MPFROMLONG(1L), 146 MPVOID); 140 IncrThreadUsage(); 147 141 *wildname = 0; 148 142 switch (wk -> li -> type) … … 1027 1021 else if (*compare) 1028 1022 { 1029 1030 1023 CHAR *fakelist[3]; 1031 1024 … … 1042 1035 else 1043 1036 { 1044 1045 1037 FCOMPARE fc; 1046 1038 … … 1059 1051 } 1060 1052 break; 1061 } 1053 } // switch 1062 1054 DosSleep(0L); 1063 } 1055 } // for list 1064 1056 1065 1057 switch (wk -> li -> type) … … 1112 1104 Abort: 1113 1105 1114 if (files) 1115 { 1106 if (files) { 1116 1107 Broadcast(hab2, 1117 1108 wk -> hwndCnr, … … 1123 1114 1124 1115 if (WinIsWindow(hab2, wk -> hwndCnr)) 1125 PostMsg(wk -> hwndCnr, 1126 UM_RESCAN, 1127 MPVOID, 1128 MPVOID); 1129 1130 if (hwndMain) 1131 WinSendMsg(hwndMain, 1132 UM_THREADUSE, 1133 MPVOID, 1134 MPVOID); 1116 PostMsg(wk -> hwndCnr,UM_RESCAN,MPVOID,MPVOID); 1117 1135 1118 WinDestroyMsgQueue(hmq2); 1136 1119 } 1120 DecrThreadUsage(); 1137 1121 WinTerminate(hab2); 1138 1122 } … … 1163 1147 { 1164 1148 hmq2 = WinCreateMsgQueue(hab2, 0); 1165 if (hmq2) 1166 { 1149 if (hmq2) { 1167 1150 WinCancelShutdown(hmq2, TRUE); 1168 if (hwndMain) 1169 WinSendMsg(hwndMain, 1170 UM_THREADUSE, 1171 MPFROMLONG(1L), 1172 MPVOID); 1151 IncrThreadUsage(); 1173 1152 DosError(FERR_DISABLEHARDERR); 1174 1153 if (IsRoot(wk -> li -> list[0]) || … … 1180 1159 wk -> li -> type = IDM_EAS; 1181 1160 } 1182 switch (wk -> li -> type) 1183 { 1161 switch (wk -> li -> type) { 1184 1162 case IDM_INFO: 1185 1163 if (WinDlgBox(HWND_DESKTOP, … … 1689 1667 { 1690 1668 strcpy(wk -> li -> targetpath, printer); 1691 if (_beginthread(PrintList ,NULL,65536,(PVOID) wk -> li) == -1)1669 if (_beginthread(PrintListThread,NULL,65536,(PVOID) wk -> li) == -1) 1692 1670 Runtime_Error(pszSrcFile, __LINE__, GetPString(IDS_COULDNTSTARTTHREADTEXT)); 1693 1671 else … … 1922 1900 break; 1923 1901 } 1924 if (files) 1925 { 1902 if (files) { 1926 1903 Broadcast(hab2, 1927 1904 wk -> hwndCnr, … … 1933 1910 Abort: 1934 1911 if (WinIsWindow(hab2, wk -> hwndCnr)) 1935 PostMsg(wk -> hwndCnr, 1936 UM_RESCAN, 1937 MPVOID, 1938 MPVOID); 1939 1940 if (hwndMain) 1941 WinSendMsg(hwndMain, 1942 UM_THREADUSE, 1943 MPVOID, 1944 MPVOID); 1912 PostMsg(wk -> hwndCnr,UM_RESCAN,MPVOID,MPVOID); 1913 1945 1914 WinDestroyMsgQueue(hmq2); 1946 1915 } 1916 DecrThreadUsage(); 1947 1917 WinTerminate(hab2); 1948 1918 }
Note:
See TracChangeset
for help on using the changeset viewer.