Changeset 850 for trunk/dll/newview.c
- Timestamp:
- Oct 7, 2007, 4:50:15 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/newview.c
r844 r850 24 24 26 Aug 07 GKY Fixed fast viewer text load failure 25 25 28 Aug 07 GKY Reversed horizontal scrollbar behavior to be present for unwrapped text and absent for wrapped text & hex. 26 26 14 Sep 07 SHL Another attempt to correct the fast viewer text load failure 27 27 28 28 ***********************************************************************/ … … 1093 1093 IncrThreadUsage(); 1094 1094 ad = WinQueryWindowPtr(hwnd, QWL_USER); 1095 if (ad) { 1096 if (ad->text && ad->textsize && !ad->hex) 1097 DosSleep(32); // 26 Aug 07 GKY Fixes failure to load text file in some cases 1098 ad->relining = TRUE; 1095 if (ad) 1096 Runtime_Error(pszSrcFile, __LINE__, "no data"); 1097 else { 1099 1098 if (!DosRequestMutexSem(ad->ScanSem, SEM_INDEFINITE_WAIT)) { 1099 ad->relining = TRUE; 1100 1100 ad->busy++; 1101 1101 ad->maxx = 0; … … 1185 1185 for (x = 0; x < ad->numlines; x++) { 1186 1186 if ((LONG) (Rectl.yTop - 1187 1188 1189 1187 (ad->lMaxHeight * (((x + 1) - 1188 ad->topline) + 1))) < 0) 1189 break; 1190 1190 PaintLine(hwnd, ad->hps, x, 1, &Rectl); 1191 1191 } … … 1236 1236 PostMsg(hwnd, UM_SETUP4, MPVOID, MPVOID); 1237 1237 ad->busy--; 1238 } 1239 } 1238 } // if got sim 1239 } // if got VIEWDATA 1240 1240 WinDestroyMsgQueue(hmq2); 1241 1241 } … … 1314 1314 } 1315 1315 else { 1316 ad->text = xmalloc(len + 2, pszSrcFile, __LINE__); 1316 // 06 Oct 07 SHL Protect against 4096 NFTS driver small buffer defect 1317 ad->text = xmalloc(min(len + 2, 4096), 1318 pszSrcFile, 1319 __LINE__); 1317 1320 if (ad->text) { 1318 1321 *ad->text = 0; … … 1871 1874 1872 1875 if (ad->wrapon || ad->hex) { // GKY reverse case where hscroll bar is presnt 1873 1874 1875 1876 1877 1878 1879 1876 if (WinQueryWindow(ad->hhscroll, QW_PARENT) == ad->hwndFrame) { 1877 invalidate = TRUE; 1878 WinSetOwner(ad->hhscroll, HWND_OBJECT); 1879 WinSetParent(ad->hhscroll, HWND_OBJECT, TRUE); 1880 ad->maxx = 0; 1881 ad->horzscroll = 0; 1882 } 1880 1883 } 1881 1884 else {
Note:
See TracChangeset
for help on using the changeset viewer.