diff options
| author | Roberto E. Vargas Caballero <k0ga@shike2.com> | 2014-08-18 23:23:51 +0200 |
|---|---|---|
| committer | Roberto E. Vargas Caballero <k0ga@shike2.com> | 2014-08-19 12:57:44 +0200 |
| commit | 8342036f983288046e03a34055c10fc6b6b11017 (patch) | |
| tree | 8214ba3a06e2a0f1863b2cebd33e08511e810c15 /st.c | |
| parent | Make useful DEL in application mode (diff) | |
| download | st-8342036f983288046e03a34055c10fc6b6b11017.tar.gz st-8342036f983288046e03a34055c10fc6b6b11017.zip | |
Fix definition of CONTROLC0
DEL character is not thecnically talking a C0 control character,
although it has some common properties with them, so it is useful
for us consider it as C0. Before this patch DEL (\177), was not
ignored as it ought to be.
Diffstat (limited to '')
| -rw-r--r-- | st.c | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -70,7 +70,7 @@ char *argv0; | |||
| 70 | #define LEN(a) (sizeof(a) / sizeof(a)[0]) | 70 | #define LEN(a) (sizeof(a) / sizeof(a)[0]) |
| 71 | #define DEFAULT(a, b) (a) = (a) ? (a) : (b) | 71 | #define DEFAULT(a, b) (a) = (a) ? (a) : (b) |
| 72 | #define BETWEEN(x, a, b) ((a) <= (x) && (x) <= (b)) | 72 | #define BETWEEN(x, a, b) ((a) <= (x) && (x) <= (b)) |
| 73 | #define ISCONTROLC0(c) (BETWEEN(c, 0, 0x1f)) | 73 | #define ISCONTROLC0(c) (BETWEEN(c, 0, 0x1f) || (c) == '\177') |
| 74 | #define ISCONTROLC1(c) (BETWEEN(c, 0x80, 0x9f)) | 74 | #define ISCONTROLC1(c) (BETWEEN(c, 0x80, 0x9f)) |
| 75 | #define ISCONTROL(c) (ISCONTROLC0(c) || ISCONTROLC1(c)) | 75 | #define ISCONTROL(c) (ISCONTROLC0(c) || ISCONTROLC1(c)) |
| 76 | #define LIMIT(x, a, b) (x) = (x) < (a) ? (a) : (x) > (b) ? (b) : (x) | 76 | #define LIMIT(x, a, b) (x) = (x) < (a) ? (a) : (x) > (b) ? (b) : (x) |
