mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-28 14:04:19 -04:00
pack structures in portable fashion, now creates valid bitmap headers for Windows
This commit is contained in:
parent
6dbf817ffa
commit
71a30a9031
2 changed files with 18 additions and 22 deletions
|
@ -36,13 +36,15 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <windows.h>
|
||||
#include "stdint_msvc.h"
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
#ifdef _MSC_VER
|
||||
#include <windows.h>
|
||||
#include "stdint_msvc.h"
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#pragma pack (1)
|
||||
|
||||
typedef struct pcx_header {
|
||||
uint8_t manufacturer;
|
||||
uint8_t version;
|
||||
|
@ -62,12 +64,10 @@ extern "C" {
|
|||
uint16_t horiz_screen_size;
|
||||
uint16_t vert_screen_size;
|
||||
uint8_t filler[54];
|
||||
}
|
||||
#ifdef __GNUC__
|
||||
__attribute__((__packed__ ))
|
||||
#endif
|
||||
pcx_header_t;
|
||||
} pcx_header_t;
|
||||
|
||||
#pragma pack ()
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue