Changeset 533 for trunk/dll/newview.c
- Timestamp:
- Nov 4, 2006, 10:07:44 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note:
See TracChangeset
for help on using the changeset viewer.