- Timestamp:
- Oct 25, 2004, 12:02:36 AM (21 years ago)
- Location:
- branches/branch-1-0
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/branch-1-0/include/helpers/exeh.h
r136 r262 63 63 USHORT usIPStartup; // 14: IP at startup 64 64 USHORT usCodeSegOfs; // 16: code segment offset from EXE start 65 USHORT usRelocTableOfs; // 18: reloc table ofs.header (Win: >= 0x40 )65 USHORT usRelocTableOfs; // 18: reloc table ofs.header (Win: >= 0x40 || 0) 66 66 USHORT usOverlayNo; // 1a: overlay no. 67 67 USHORT usLinkerVersion; // 1c: linker version (if 0x18 > 0x28) … … 77 77 ULONG ulUnused6; // 34: 78 78 ULONG ulUnused7; // 38: 79 ULONG ulNewHeaderOfs; // 3c: new header ofs (if 0x18 > 0x40)79 ULONG ulNewHeaderOfs; // 3c: new header ofs (if 0x18 >= 0x40 || 0) 80 80 // fixed this from USHORT, thanks Martin Lafaix 81 81 // V0.9.7 (2000-12-20) [umoeller] … … 231 231 typedef struct _LXHEADER 232 232 { 233 CHAR achLX[2];// 00: e32_magic "LX" or "LE" magic233 CHAR achLX[2]; // 00: e32_magic "LX" or "LE" magic 234 234 // this is "LX" for 32-bit OS/2 programs, but 235 235 // "LE" for MS-DOS progs which use this format -
branches/branch-1-0/src/helpers/exeh.c
r229 r262 292 292 else 293 293 { 294 // V1.0.3 (2004-10-24) [pr]: Some non-DOS EXEs have a relocation table 295 // offset which is 0 - these were previously identified as DOS EXEs. 294 296 // we have a DOS header: 295 if (pExec->pDosExeHeader->usRelocTableOfs < 0x40) 296 { 297 // neither LX nor PE nor NE: 298 pExec->ulOS = EXEOS_DOS3; 299 pExec->ulExeFormat = EXEFORMAT_OLDDOS; 300 } 301 else 297 if ( ( (pExec->pDosExeHeader->usRelocTableOfs == 0) 298 || (pExec->pDosExeHeader->usRelocTableOfs >= sizeof(DOSEXEHEADER)) 299 ) 300 && (pExec->pDosExeHeader->ulNewHeaderOfs != 0) 301 ) 302 302 { 303 303 // we have a new header offset: 304 304 fLoadNewHeader = TRUE; 305 305 ulNewHeaderOfs = pExec->pDosExeHeader->ulNewHeaderOfs; 306 } 307 else 308 { 309 // else DOS: 310 pExec->ulOS = EXEOS_DOS3; 311 pExec->ulExeFormat = EXEFORMAT_OLDDOS; 306 312 } 307 313 } -
branches/branch-1-0/src/helpers/makefile
r227 r262 157 157 +$(OBJS: =&^ 158 158 ); 159 << KEEP159 << 160 160 !endif 161 161 … … 169 169 +$(CPOBJS: =&^ 170 170 ); 171 << KEEP171 << 172 172 !endif 173 173 … … 181 181 +$(PLAINCOBJS: =&^ 182 182 ); 183 << KEEP183 << 184 184 !endif 185 185
Note:
See TracChangeset
for help on using the changeset viewer.