aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-09-04 17:08:45 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-09-04 17:08:45 +0200
commit42f9ede0f584eb20fa0b1f12636352d8d7be0017 (patch)
tree6b8587ea1dcafb80fcc6b3c4dda189edf728fa9e
parent52cf627598c2f124c18665172417bdb36d6fdb1d (diff)
Replace digits with binary
-rw-r--r--src/main.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/main.c b/src/main.c
index e3ab50f..6e52ea0 100644
--- a/src/main.c
+++ b/src/main.c
@@ -30,13 +30,13 @@ typedef enum {
typedef enum {
BS_ALPHA,
- BS_DIGITS,
+ BS_BINARY,
BS_SYMBOLS,
} bool_style_t;
static int rv;
static bool interactive;
-static bool_style_t bflag = BS_DIGITS;
+static bool_style_t bflag = BS_BINARY;
static tbl_style_t tflag = TS_UNSET;
const char *current_file;
@@ -79,8 +79,8 @@ main(int argc, char **argv)
case 'b':
if (strcmp(optarg, "alpha") == 0)
bflag = BS_ALPHA;
- else if (strcmp(optarg, "digits") == 0)
- bflag = BS_DIGITS;
+ else if (strcmp(optarg, "binary") == 0)
+ bflag = BS_BINARY;
else if (strcmp(optarg, "symbols") == 0)
bflag = BS_SYMBOLS;
else {
@@ -102,7 +102,7 @@ main(int argc, char **argv)
break;
default:
usage:
- fprintf(stderr, "Usage: %s [-b alpha|digits|symbols] [-t ascii|latex|utf8] [file ...]\n",
+ fprintf(stderr, "Usage: %s [-b alpha|binary|symbols] [-t ascii|latex|utf8] [file ...]\n",
argv[0]);
exit(EXIT_FAILURE);
}
@@ -168,7 +168,7 @@ astprocess_cli(ast_t a)
static const char *boolsyms[][2] = {
[BS_ALPHA] = {"F", "T"},
- [BS_DIGITS] = {"0", "1"},
+ [BS_BINARY] = {"0", "1"},
[BS_SYMBOLS] = {"⊥", "⊤"},
};
@@ -210,7 +210,7 @@ astprocess_latex(ast_t a)
{
static const char *boolsyms[][2] = {
[BS_ALPHA] = {"F", "T"},
- [BS_DIGITS] = {"0", "1"},
+ [BS_BINARY] = {"0", "1"},
[BS_SYMBOLS] = {"\\bot", "\\top"},
};