diff options
Diffstat (limited to 'src/sciteco.h')
-rw-r--r-- | src/sciteco.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/sciteco.h b/src/sciteco.h index e40b6f4..f22842c 100644 --- a/src/sciteco.h +++ b/src/sciteco.h @@ -24,13 +24,24 @@ #include "interface.h" +#if TECO_INTEGER == 32 +typedef gint32 tecoInt; +#define TECO_INTEGER_FORMAT G_GINT32_FORMAT +#elif TECO_INTEGER == 64 +typedef gint64 tecoInt; +#define TECO_INTEGER_FORMAT G_GINT64_FORMAT +#else +#error Invalid TECO integer storage size +#endif +typedef tecoInt tecoBool; + namespace Flags { enum { ED_HOOKS = (1 << 5), ED_FNKEYS = (1 << 6) }; - extern gint64 ed; + extern tecoInt ed; } extern sig_atomic_t sigint_occurred; @@ -43,8 +54,6 @@ extern sig_atomic_t sigint_occurred; #define CTL_ECHO(C) ((C) | 0x40) #define CTL_KEY(C) ((C) & ~0x40) -typedef gint64 tecoBool; - #define SUCCESS (-1) #define FAILURE (0) #define TECO_BOOL(X) ((X) ? SUCCESS : FAILURE) |