Changeset 1551
- Timestamp:
- Nov 15, 2010, 4:33:25 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/debugtools/mapsymw.pl
r1342 r1551 1 1 #!perl -w 2 # mapsymw - mapsym Watcom map files3 4 # Copyright (c) 2007, 20 08Steven Levine and Associates, Inc.2 # mapsymw - mapsym wrapper Watcom map files 3 # $Id: $ 4 # Copyright (c) 2007, 2010 Steven Levine and Associates, Inc. 5 5 # All rights reserved. 6 7 # $TLIB$: $ &(#) %n - Ver %v, %f $8 # TLIB: $ $9 6 10 7 # This program is free software licensed under the terms of the GNU … … 19 16 # 08 Nov 07 SHL Drop leading keywords from function definitions 20 17 # 14 Dec 08 SHL Ensure symbols sorted by value - some apps care 18 # 03 May 10 SHL Comments 19 # 14 Jun 10 SHL Avoid missing C++ symbols 21 20 22 21 # mapsym requires each segment to have at least 1 symbol … … 165 164 # Address Symbol 166 165 # 0002:0004ae46+ ArcTextProc 166 # 0002:0d11+ void near IoctlAudioCapability( __2bd9g9REQPACKET far *, short unsigned ) 167 167 # Out 168 168 # 0 1 2 3 4 5 6 … … 171 171 # 0000:00000000 Imp WinEmptyClipbrd (PMWIN.733) 172 172 # 0002:0001ED40 __towlower_dummy 173 if (/^([[:xdigit:]]+):([[:xdigit:]]+)[+*]?\s+( \w+)$/) {173 if (/^([[:xdigit:]]+):([[:xdigit:]]+)[+*]?\s+(.+)$/) { 174 174 $segnum = $1; 175 175 $offset = $2; … … 195 195 196 196 # Convert C++ symbols to something mapsym will accept 197 # warn "$sym\n"; 197 198 198 199 $_ = $sym; 199 200 200 # s/\bIdle\b/ /; # Drop Idle keyword 201 s/\(.*\).*$//; # Drop (... tails202 203 s/::~/_ x/; # Replace ::~ with_x204 s/::/_ /; # Replace :: with_201 # s/\bIdle\b/ /; # Drop Idle keyword - obsolete done later 202 s/\(.*\).*$//; # Drop (...) tails 203 204 s/::~/__x/; # Replace ::~ with __x 205 s/::/__/; # Replace :: with __ 205 206 206 207 s/[<,]/_/g; # Replace < and , with _ 207 208 s/[>]//g; # Replace > with nothing 208 209 s/[\[\]]//g; # Replace [] with nothing 209 s/_*$//; # Drop trailing _ 210 s/\W+\w//; # Drop leading keywords (including Idle) 210 # s/_*$//; # Drop trailing _ 211 # s/\W+\w//; # Drop leading keywords (including Idle) 212 s/\b.*\b\s+//g; # Drop leading keywords (including Idle) 211 213 212 214 # Drop leading and trailing _ to match source code … … 214 216 s/^_//; # Drop leading _ (cdecl) 215 217 s/_$//; # Drop trailing _ (watcall) 218 219 # warn "$_\n"; 216 220 217 221 # Prune some libc symbols to avoid mapsym overflows … … 242 246 close MAPFILE; 243 247 244 # Generate dummy symbols as needed248 # Sort segments 245 249 246 250 my @keys = sort keys %segsinfo; … … 249 253 @keys = '0000'..$maxseg; 250 254 } 255 256 # Generate dummy symbols for 32-bit segments smaller than 64KB 251 257 252 258 foreach $segnum (@keys) { … … 280 286 } # foreach 281 287 288 # Generate symbols by value listing 289 290 my $lastsym = ''; 291 my $seq = 0; 282 292 @keys = sort keys %syms; 283 293 foreach $segaddr (@keys) { 284 294 my $sym = $syms{$segaddr}; 285 295 my $imp = substr($segaddr, 0, 4) eq '0000' ? 'Imp' : ''; 296 if ($sym ne $lastsym) { 297 $lastsym = $sym; 298 $seq = 0; 299 } else { 300 $seq++; 301 $sym = "${sym}_$seq"; 302 } 286 303 printf WRKFILE $symfmt, $segaddr, $imp, $sym; 287 304 } -
trunk/dll/dircnrs.c
r1549 r1551 1386 1386 LastDir = hwnd; 1387 1387 PostMsg(hwnd, UM_RESCAN, MPVOID, MPVOID); 1388 if ( !fInitialDriveScan &&fSwitchTreeOnFocus && hwndTree && dcd && *dcd->directory) {1389 1390 1388 if (fSwitchTreeOnFocus && hwndTree && dcd && *dcd->directory) { 1389 PSZ pszTempDir = xstrdup(dcd->directory, pszSrcFile, __LINE__); 1390 if (pszTempDir) { 1391 1391 if (!PostMsg(hwndTree, UM_SHOWME, MPFROMP(pszTempDir), MPVOID)) 1392 1392 free(pszTempDir); // Failed -
trunk/dll/filldir.c
r1550 r1551 261 261 DbgMsg(pszSrcFile, __LINE__, "ProcessDirCount %i FixedVolume %i", 262 262 ProcessDirCount, FixedVolume); 263 if (fInitialDriveScan && ProcessDirCount >= FixedVolume) { 264 fInitialDriveScan = FALSE; 265 DosPostEventSem(hevInitialCnrScanComplete); 266 DosCloseEventSem(hevInitialCnrScanComplete); 267 if (fSwitchTree && hwndTree && fSaveState && pszFocusDir) { 263 if (ProcessDirCount >= FixedVolume) { 264 DosPostEventSem(hevTreeCnrScanComplete); 265 if (fInitialDriveScan && fSwitchTree && hwndTree && fSaveState && pszFocusDir) { 268 266 // Keep drive tree in sync with directory container 269 267 if (hwndMain) { … … 277 275 } 278 276 } 277 fInitialDriveScan = FALSE; 279 278 } 280 279 # ifdef FORTIFY … … 1709 1708 fDummy = FALSE; 1710 1709 DosPostEventSem(CompactSem); 1711 DosReleaseMutexSem(hmtFillingTreeCnr);1712 1710 1713 1711 if (!fDontSuggestAgain) { -
trunk/dll/flesh.c
r1550 r1551 279 279 * Fill in drive tree subtree 280 280 * @return TRUE if OK, else FALSE 281 * This only scans the root directory and adds the first level directories 282 * Flesh does a recursive scan and should be used on fast hardware. 281 283 */ 282 284 -
trunk/dll/init.c
r1546 r1551 196 196 HMTX hmtxFM2Delete; 197 197 HMTX hmtxFM2Globals; 198 HMTX hmtFillingTreeCnr; 199 HEV hevInitialCnrScanComplete; 198 HEV hevTreeCnrScanComplete; 200 199 ULONG OS2ver[2]; 201 200 PFNWP PFNWPCnr; … … 206 205 ULONG ulTimeFmt; 207 206 ULONG ulDateFmt; 207 ULONG ulScanPostCnt; 208 208 BOOL fDontSuggestAgain; 209 209 BOOL fInitialDriveScan; … … 1112 1112 Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__, 1113 1113 PCSZ_DOSCREATEMUTEXSEM); 1114 if (DosCreateMutexSem(NULL, &hmtFillingTreeCnr, 0L, FALSE)) 1115 Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__, 1116 PCSZ_DOSCREATEMUTEXSEM); 1117 if (DosCreateEventSem(NULL, &hevInitialCnrScanComplete, 0L, FALSE)) 1114 if (DosCreateEventSem(NULL, &hevTreeCnrScanComplete, 0L, TRUE)) 1118 1115 Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__, 1119 1116 PCSZ_DOSCREATEEVENTSEM); -
trunk/dll/init.h
r1498 r1551 86 86 extern ULONG ulTimeFmt; 87 87 extern ULONG ulDateFmt; 88 extern ULONG ulScanPostCnt; 88 89 extern PCSZ FNT_HELVETICA; 89 90 extern PCSZ FNT_6HELVETICA; … … 206 207 extern HMTX hmtxFM2Globals; 207 208 extern HMTX hmtxFM2Delete; 208 extern HMTX hmtFillingTreeCnr; 209 extern HEV hevInitialCnrScanComplete; 209 extern HEV hevTreeCnrScanComplete; 210 210 #endif 211 211 -
trunk/dll/mainwnd.c
r1550 r1551 1862 1862 1863 1863 case WM_COMMAND: 1864 if (fInitialDriveScan) 1865 DosWaitEventSem(hevInitialCnrScanComplete, SEM_INDEFINITE_WAIT); 1864 DosWaitEventSem(hevTreeCnrScanComplete, SEM_INDEFINITE_WAIT); 1866 1865 switch(SHORT1FROMMP(mp1)) { 1867 1866 case IDM_RESCAN: -
trunk/dll/treecnr.c
r1550 r1551 646 646 BOOL tempsusp, tempfollow, temptop; 647 647 648 DosWaitEventSem(hevTreeCnrScanComplete, SEM_INDEFINITE_WAIT); 648 649 tempsusp = dcd->suspendview; 649 650 dcd->suspendview = TRUE; … … 857 858 * populate container 858 859 */ 860 DosWaitEventSem(hevTreeCnrScanComplete, SEM_INDEFINITE_WAIT); 861 DosResetEventSem(hevTreeCnrScanComplete, &ulScanPostCnt); 859 862 dcd = WinQueryWindowPtr(hwnd, QWL_USER); 860 863 if (!dcd) … … 867 870 CM_SCROLLWINDOW, 868 871 MPFROMSHORT(CMA_HORIZONTAL), MPFROMLONG(-1)); 869 DosRequestMutexSem(hmtFillingTreeCnr, SEM_INDEFINITE_WAIT);870 872 FillTreeCnr(dcd->hwndCnr, dcd->hwndParent); 871 873 if (fOkayMinimize) { … … 1216 1218 else 1217 1219 WinSetWindowText(WinWindowFromID(dcd->hwndFrame, 1218 1220 MAIN_STATUS), pci->pszFileName); 1219 1221 if (fMoreButtons && hwndName) { 1220 1222 CHAR szDate[DATE_BUF_BYTES]; … … 1902 1904 INT x; 1903 1905 1904 DosRequestMutexSem(hmtFillingTreeCnr, SEM_INDEFINITE_WAIT); 1906 DosWaitEventSem(hevTreeCnrScanComplete, SEM_INDEFINITE_WAIT); 1907 DosResetEventSem(hevTreeCnrScanComplete, &ulScanPostCnt); 1905 1908 if (fFollowTree) 1906 1909 fl = 0; … … 1917 1920 if (hwndStatus) 1918 1921 WinSetWindowText(hwndStatus, (CHAR *) GetPString(IDS_RESCANSUGTEXT)); 1919 DosReleaseMutexSem(hmtFillingTreeCnr);1922 DosPostEventSem(hevTreeCnrScanComplete); 1920 1923 return 0; 1921 1924 } … … 1937 1940 } // for 1938 1941 RemoveCnrItems(hwnd, pciP, 1, CMA_FREE | CMA_INVALIDATE); 1939 DosReleaseMutexSem(hmtFillingTreeCnr);1942 DosPostEventSem(hevTreeCnrScanComplete); 1940 1943 return 0; 1941 1944 } … … 2009 2012 PostMsg(hwnd, UM_RESCAN, MPVOID, MPVOID); 2010 2013 PostMsg(hwnd, UM_SETUP2, MPFROMP(pci), MPFROMLONG(status)); 2011 DosReleaseMutexSem(hmtFillingTreeCnr);2014 DosPostEventSem(hevTreeCnrScanComplete); 2012 2015 return 0; 2013 2016 } … … 2032 2035 PostMsg(hwnd, 2033 2036 WM_COMMAND, MPFROM2SHORT(IDM_SHOWALLFILES, 0), MPVOID); 2034 DosReleaseMutexSem(hmtFillingTreeCnr);2037 DosPostEventSem(hevTreeCnrScanComplete); 2035 2038 return 0; 2036 2039 } 2037 2040 if ((shiftstate & (KC_CTRL | KC_SHIFT)) == (KC_CTRL | KC_SHIFT)) { 2038 2041 OpenObject(pci->pszFileName, Settings, dcd->hwndFrame); 2039 DosReleaseMutexSem(hmtFillingTreeCnr);2042 DosPostEventSem(hevTreeCnrScanComplete); 2040 2043 return 0; 2041 2044 } … … 2043 2046 if (!ParentIsDesktop(hwnd, dcd->hwndParent)) { 2044 2047 if (FindDirCnrByName(pci->pszFileName, TRUE)) { 2045 DosReleaseMutexSem(hmtFillingTreeCnr);2048 DosPostEventSem(hevTreeCnrScanComplete); 2046 2049 return 0; 2047 2050 } … … 2067 2070 } 2068 2071 OpenObject(pci->pszFileName, s, dcd->hwndFrame); 2069 DosReleaseMutexSem(hmtFillingTreeCnr);2072 DosPostEventSem(hevTreeCnrScanComplete); 2070 2073 return 0; 2071 2074 } … … 2111 2114 if (fFollowTree) 2112 2115 WinSetFocus(HWND_DESKTOP, hwnd); 2113 Dos ReleaseMutexSem(hmtFillingTreeCnr);2116 DosPostEventSem(hevTreeCnrScanComplete); 2114 2117 } 2115 2118 return 0; … … 2785 2788 if (pci->attrFile & FILE_DIRECTORY) { 2786 2789 if (pci->flags & RECFLAGS_UNDERENV) 2787 break; 2788 DosRequestMutexSem(hmtFillingTreeCnr, SEM_INDEFINITE_WAIT); 2790 break; 2791 DosWaitEventSem(hevTreeCnrScanComplete, SEM_INDEFINITE_WAIT); 2792 DosResetEventSem(hevTreeCnrScanComplete, &ulScanPostCnt); 2789 2793 UnFlesh(hwnd, pci); 2790 2794 // Check if drive type might need update … … 2816 2820 if (~driveflag & DRIVE_INVALID) 2817 2821 Flesh(hwnd, pci); 2818 DosReleaseMutexSem(hmtFillingTreeCnr);2822 DosPostEventSem(hevTreeCnrScanComplete); 2819 2823 } 2820 2824 }
Note:
See TracChangeset
for help on using the changeset viewer.