diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2014-09-15 09:43:03 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2014-09-15 09:43:03 +0000 |
commit | 3e926073114d4f044bcc02ba243023dea4aafa97 (patch) | |
tree | d02e671c23d15b0d0ee6e1cbf4086c6c3fe4a6ad /Build/source/texk/dvipdfm-x/numbers.h | |
parent | ac391ad3f024072af6dbc29e6242e01626fa68e3 (diff) |
texk/dvipdfm-x: General cleanup: No reason to use long for 32-bit integers
git-svn-id: svn://tug.org/texlive/trunk@35176 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipdfm-x/numbers.h')
-rw-r--r-- | Build/source/texk/dvipdfm-x/numbers.h | 43 |
1 files changed, 25 insertions, 18 deletions
diff --git a/Build/source/texk/dvipdfm-x/numbers.h b/Build/source/texk/dvipdfm-x/numbers.h index 5b45fd37ade..3b7b3924f0a 100644 --- a/Build/source/texk/dvipdfm-x/numbers.h +++ b/Build/source/texk/dvipdfm-x/numbers.h @@ -32,6 +32,16 @@ # include <stdint.h> #endif +#ifndef PRId64 +# ifdef _WIN32 +# define PRId64 "I64d" +# elif SIZEOF_LONG == 8 +# define PRId64 "ld" +# else +# define PRId64 "lld" +# endif +#endif + /* When reading numbers from binary files 1, 2, or 3 bytes are interpreted as either signed or unsigned. @@ -42,25 +52,22 @@ mostly unsigned (uint32_t) and occasionally signed (int32_t). */ -typedef int UNSIGNED_BYTE, SIGNED_BYTE, SIGNED_PAIR; -typedef unsigned UNSIGNED_PAIR; -typedef long UNSIGNED_TRIPLE, SIGNED_TRIPLE, SIGNED_QUAD; -typedef unsigned long UNSIGNED_QUAD; - -extern UNSIGNED_BYTE get_unsigned_byte (FILE *); +extern unsigned char get_unsigned_byte (FILE *); extern void skip_bytes (unsigned int, FILE *); -extern SIGNED_BYTE get_signed_byte (FILE *); -extern UNSIGNED_PAIR get_unsigned_pair (FILE *); -extern UNSIGNED_PAIR sget_unsigned_pair (unsigned char *); -extern SIGNED_PAIR get_signed_pair (FILE *); -extern UNSIGNED_TRIPLE get_unsigned_triple (FILE *); -extern SIGNED_TRIPLE get_signed_triple (FILE *); -extern SIGNED_QUAD get_signed_quad (FILE *); -extern UNSIGNED_QUAD get_unsigned_quad (FILE *); - -typedef signed long fixword; - -extern SIGNED_QUAD sqxfw (SIGNED_QUAD sq, fixword fw); +extern signed char get_signed_byte (FILE *); +extern unsigned short get_unsigned_pair (FILE *); +extern unsigned short sget_unsigned_pair (unsigned char *); +extern signed short get_signed_pair (FILE *); +extern unsigned int get_unsigned_triple (FILE *); +extern signed int get_signed_triple (FILE *); +extern int32_t get_signed_quad (FILE *); +extern uint32_t get_unsigned_quad (FILE *); +extern int32_t get_unsigned_num (FILE *, unsigned char); +extern uint32_t get_positive_quad (FILE *, const char *, const char *); + +typedef int32_t fixword; + +extern int32_t sqxfw (int32_t sq, fixword fw); #ifndef MAX # define MAX(a,b) ((a)>(b)?(a):(b)) |