diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2011-07-17 23:52:23 +0200 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2011-07-17 23:52:23 +0200 |
commit | 418314e809358f324095d18267a71a2d4da79bcd (patch) | |
tree | 8712ef5231b0025e5f1969c6f0e8c80fdc5d9797 | |
parent | 1b3b8ac2c6b8e652a56b6da71b6287e5d888a26d (diff) | |
download | videoteco-fork-418314e809358f324095d18267a71a2d4da79bcd.tar.gz |
compute BITS_PER_INT automatically based on BITS_PER_CHAR
this is possible since BITS_PER_INT is not used in any preprocessor
expression
-rw-r--r-- | teco.h | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -80,16 +80,17 @@ * conditional compilation based on different machines quirks can be done. */ +#ifndef BITS_PER_CHAR /** - * Unless defined otherwise, we assume 32 bits to an integer and 8 bits / char + * Unless defined otherwise, we assume 8 bits / char */ -#ifndef BITS_PER_INT -#define BITS_PER_INT 32 -#endif -#ifndef BITS_PER_CHAR #define BITS_PER_CHAR 8 #endif +#ifndef BITS_PER_INT +#define BITS_PER_INT (BITS_PER_CHAR * (int)sizeof(int)) +#endif + #define ESCAPE 27 #define RUBOUT 127 |