aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--teco.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/teco.h b/teco.h
index 87af8b8..c77efa1 100644
--- a/teco.h
+++ b/teco.h
@@ -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