home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Compilers / digital marsC compier / dm / include / Filehdr.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-03-16  |  1.2 KB  |  68 lines

  1. /* Copyright (C) 1986-2001 by Digital Mars. $Revision: 1.1.1.1 $ */
  2. #if __SC__ || __RCC__
  3. #pragma once
  4. #endif
  5.  
  6. #ifndef __FILEHDR_H
  7. #define __FILEHDR_H 1
  8. /* Used when dealing with COFF files. */
  9.  
  10. #if __cplusplus
  11. extern "C" {
  12. #endif
  13.  
  14. #pragma pack(2)
  15.  
  16. #define FILHDR struct filehdr
  17. #define FILHSZ sizeof(FILHDR)
  18.  
  19. struct filehdr
  20. {
  21.   unsigned short f_magic;
  22.  
  23. #define IAPX16          0x144
  24. #define IAPX16TV        0x145
  25. #define IAPX20          0x146
  26. #define IAPX20TV    0x147
  27. #define X86MAGIC    0x148
  28. #define XTVMAGIC    0x149
  29. #define I286SMAGIC      0x14A
  30. #define I286LMAGIC    0x152
  31. #define I386MAGIC       0x14C
  32.  
  33.   unsigned short f_nscns;
  34.   long f_timdat;
  35.   long f_symptr;
  36.   long f_nsyms;
  37.   unsigned short f_opthdr;
  38.   unsigned short f_flags;
  39.  
  40. #define F_RELFLG 1
  41. #define F_EXEC   2
  42. #define F_LNNO   4
  43. #define F_LSYMS  8
  44. #define F_MINMAL 0x10
  45. #define F_UPDATE 0x20
  46. #define F_SWABD  0x40
  47. #define F_AR16WR 0x80
  48. #define F_AR32WR 0x100
  49. #define F_AR32W  0x200
  50. #define F_PATCH  0x400
  51. #define F_NODF   0x400
  52.  
  53. #define F_80186  0x1000
  54. #define F_80286  0x2000
  55.  
  56. };
  57.  
  58. #define ISCOFF(x) (((x)==I386MAGIC) || ((x)==X86MAGIC) || ((x)==XTVMAGIC) ||\
  59.            ((x)==I286SMAGIC)|| ((x)==I286LMAGIC))
  60.  
  61. #pragma pack()
  62.  
  63. #if __cplusplus
  64. }
  65. #endif
  66.  
  67. #endif
  68.