Changeset 3441 for trunk/tools/dbginfo/Sym2Hll.cpp
- Timestamp:
- Apr 24, 2000, 11:38:12 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/dbginfo/Sym2Hll.cpp
r3334 r3441 1 /* $Id: Sym2Hll.cpp,v 1. 4 2000-04-07 02:49:36bird Exp $1 /* $Id: Sym2Hll.cpp,v 1.5 2000-04-24 21:38:11 bird Exp $ 2 2 * 3 3 * Sym2Hll - Symbol file to HLL debuginfo converter. … … 38 38 * Internal Functions * 39 39 *******************************************************************************/ 40 void syntax(void); 40 41 void * readfile(const char *pszFilename); 41 42 signed long fsize(FILE *phFile); … … 60 61 if (argc != 3) 61 62 { 63 syntax(); 62 64 fprintf(stderr, "syntax error\n"); 63 65 return -87; … … 83 85 if (pbSym != NULL) 84 86 { 85 intrc;86 kHllModuleEntry *pModule;87 PMAPDEF pMapDef;/* Mapfile header */87 APIRET rc; 88 kHllModuleEntry * pModule; 89 PMAPDEF pMapDef; /* Mapfile header */ 88 90 89 91 pMapDef = (PMAPDEF)pbSym; … … 91 93 { 92 94 int iSegment; 93 PSEGDEF pSegDef; 95 PSEGDEF pSegDef; /* Segment header */ 94 96 95 97 /* … … 186 188 * Add segment to the module - FIXME - need info from the LX Object table... 187 189 */ 188 pLXObject = pFileLX->getObject( iSegment-1);190 pLXObject = pFileLX->getObject((USHORT)iSegment-1); 189 191 if (pLXObject) 190 192 { 191 if (!pModule->addSegInfo( iSegment, 0, pLXObject->o32_size))193 if (!pModule->addSegInfo((USHORT)iSegment, 0, pLXObject->o32_size)) 192 194 fprintf(stderr, "warning: addseginfo failed!\n"); 193 195 } … … 228 230 * Add symbol - currently we define it as public - it's a symbol local to this module really. 229 231 */ 230 pModule->addPublicSymbol(pachName, cchName, offset, iSegment, 0);232 pModule->addPublicSymbol(pachName, cchName, offset, (USHORT)iSegment, 0); 231 233 } 232 234 … … 293 295 294 296 297 /** 298 * Syntax. 299 */ 300 void syntax(void) 301 { 302 printf("Sym2Hll.exe <symfile> <lxfile>\n"); 303 } 304 295 305 296 306 … … 314 324 if (cbFile > 0) 315 325 { 316 pvFile = malloc( cbFile + 1);326 pvFile = malloc((size_t)cbFile + 1); 317 327 if (pvFile != NULL) 318 328 { 319 memset(pvFile, 0, cbFile + 1);320 if (fread(pvFile, 1, cbFile, phFile) == 0)329 memset(pvFile, 0, (size_t)cbFile + 1); 330 if (fread(pvFile, 1, (size_t)cbFile, phFile) == 0) 321 331 { /* failed! */ 322 332 free(pvFile);
Note:
See TracChangeset
for help on using the changeset viewer.