#pragma pack for Borland C++

This commit is contained in:
Dabb 2000-12-11 15:37:48 +00:00
parent 62ec1ccdc0
commit ac50b14d36

View file

@ -32,7 +32,11 @@
#include "gcc_attr.h"
#include "qtypes.h"
#if _MSC_VER
#if (__BORLANDC__ < 0x550)
#define __attribute__(x)
#pragma option -a1
#else
#if _MSC_VER || __BORLANDC__
#define __attribute__(x)
#pragma pack(push, tgainclude)
#pragma pack(1)
@ -41,6 +45,7 @@
#error do some data packing magic here (#pragma pack?)
#endif
#endif
#endif
typedef struct _TargaHeader {
unsigned char id_length __attribute__((packed));
@ -57,9 +62,13 @@ typedef struct _TargaHeader {
unsigned char attributes __attribute__((packed));
} TargaHeader;
#if _MSC_VER
#if (__BORLANDC__ < 0x550)
#pragma option -a4
#else
#if _MSC_VER || __BORLANDC__
#pragma pack(pop, tgainclude)
#endif
#endif
byte *LoadTGA (QFile *fin);
void WriteTGAfile (const char *tganame, byte *data, int width, int height);