Changeset 8369 for trunk/tools
- Timestamp:
- May 5, 2002, 9:03:32 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/bin/MapSym.cmd
r8361 r8369 1 /* $Id: MapSym.cmd,v 1. 5 2002-05-01 03:59:24bird Exp $1 /* $Id: MapSym.cmd,v 1.6 2002-05-05 19:03:32 bird Exp $ 2 2 * 3 3 * Helper script for calling MAPSYM.EXE. … … 23 23 24 24 if ( (sDummy <> '') , 25 | (s SymFile = '') ,25 | (sMapFile = '') , 26 26 | (pos(';'translate(sLinker)';', translate(sLinkers)) <= 0) , 27 27 ) … … 37 37 call syntax; 38 38 exit(16); 39 end 40 41 sMapBaseName = filespec('name', sMapFile); 42 if (pos('.', sMapBaseName) > 0) then 43 sMapBaseName = left(sMapBaseName, pos('.', sMapBaseName) - 1); 44 45 if (sSymFile = '') then 46 do 47 if (lastpos('.', filespec('name', sMapFile)) > 0) then 48 sSymFile = left(sMapFile, lastpos('.', sMapFile)) || 'sym'; 49 else 50 sSymFile = sMapFile || '.sym'; 39 51 end 40 52 … … 81 93 * to this file. And call mapsym on it.) 82 94 */ 83 sTmpMapFile = SysTempFileName(sTmp'\ mapsym????.map');95 sTmpMapFile = SysTempFileName(sTmp'\'||sMapBaseName||'.???'); 84 96 if (sTmpMapFile = '') then 85 97 do … … 175 187 */ 176 188 syntax: procedure; 177 say 'syntax: MapSym.cmd <linker> <mapfile> <symfile>';189 say 'syntax: MapSym.cmd <linker> <mapfile> [symfile]'; 178 190 say ' linker watcom, vac3xx, link386 or vac40. All $(BUILD_ENV).'; 179 191 say ' mapfile Name of the input map file.'; 180 say ' symfile Name of the output sym file.'; 192 say ' symfile Name of the output sym file. If not specified'; 193 say ' mapfile is used as a base name.'; 181 194 return 0; 182 195 … … 288 301 if (sState = sNewState) then 289 302 do 303 sLine = translate(sLine, '', '"'); 290 304 if ((strip(sLine) <> '') & (pos('|', sLine) <= 0) & (pos('@', sLine) <= 0)) then 291 305 call lineout sOutFile, sLine; … … 398 412 parse arg sStringHex 399 413 /* say 'HexToDec('sStringHex'):' strip(strip(sStringHex), 'L', '0')*/ 400 return x2d(strip(strip(sStringHex), 'L', '0')); 414 sStringHex = strip(strip(sStringHex), 'L', '0'); 415 if (sStringHex = '') then 416 sStringHex = 0; 417 return x2d(sStringHex); 401 418 402 419 … … 410 427 DecToHex: procedure 411 428 parse arg sStringDec 412 return d2x(strip(strip(sStringDec), 'L', '0')); 429 sStringDec = strip(strip(sStringDec), 'L', '0'); 430 if (sStringDec = '') then 431 sStringDec = 0; 432 return d2x(sStringDec); 413 433 414 434
Note:
See TracChangeset
for help on using the changeset viewer.