aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--listamsb.c28
1 files changed, 18 insertions, 10 deletions
diff --git a/listamsb.c b/listamsb.c
index afd4f8a..27a892c 100644
--- a/listamsb.c
+++ b/listamsb.c
@@ -605,20 +605,28 @@ int need_space_between(int ext1, int ext2, unsigned char t1, unsigned char t2) {
if(!ext1) {
/* IF, THEN, and operators like AND/OR/NOT always get a
space after them, for readability. */
- if(t1 == TOK_IF) return 1;
- if(t1 == TOK_THEN) return 1;
- if(t1 == TOK_ELSE) return 1;
- if(t1 == TOK_AND) return 1;
- if(t1 == TOK_OR) return 1;
- if(t1 == TOK_NOT) return 1;
+ switch(t1) {
+ case TOK_IF:
+ case TOK_THEN:
+ case TOK_ELSE:
+ case TOK_AND:
+ case TOK_OR:
+ case TOK_NOT:
+ return 1;
+ default: break;
+ }
}
if(!ext2) {
/* these always get a space before them, for readability. */
- if(t2 == TOK_THEN) return 1;
- if(t2 == TOK_AND) return 1;
- if(t2 == TOK_OR) return 1;
- if(t2 == TOK_NOT) return 1;
+ switch(t2) {
+ case TOK_THEN:
+ case TOK_AND:
+ case TOK_OR:
+ case TOK_NOT:
+ return 1;
+ default: break;
+ }
}
if(t1 >= 0x80 && isalnum(t1last)) {