.
This commit is contained in:
parent
c44f737a0e
commit
2dd82c6784
1 changed files with 15 additions and 3 deletions
18
main.c
18
main.c
|
|
@ -41,6 +41,8 @@ struct {
|
|||
bool ternary;
|
||||
} use_operators;
|
||||
|
||||
bool print_truthtable = false;
|
||||
|
||||
bool assume_yes = false;
|
||||
|
||||
bool verbose = false;
|
||||
|
|
@ -59,8 +61,12 @@ static void parse_args(int argc, char* const* argv)
|
|||
|
||||
print_with_color = isatty(1);
|
||||
|
||||
for (int opt; (opt = getopt(argc, argv, "pyqmvc:eEo:C:B")) != -1; ) switch (opt)
|
||||
for (int opt; (opt = getopt(argc, argv, "tpyqmvc:eEo:C:B")) != -1; ) switch (opt)
|
||||
{
|
||||
case 't':
|
||||
print_truthtable = true;
|
||||
break;
|
||||
|
||||
case 'p':
|
||||
print_all_and_quit = true;
|
||||
break;
|
||||
|
|
@ -1514,7 +1520,10 @@ int main(int argc, char* const* argv)
|
|||
{
|
||||
uint16_t truthtable = evaluate(command);
|
||||
|
||||
// printf("truthtable = 0b%016b\n", truthtable);
|
||||
if (print_truthtable)
|
||||
{
|
||||
printf("truthtable: 0b%016b\n", truthtable);
|
||||
}
|
||||
|
||||
if (lookup[truthtable].kind == ek_unreachable)
|
||||
{
|
||||
|
|
@ -1544,7 +1553,10 @@ int main(int argc, char* const* argv)
|
|||
|
||||
uint16_t truthtable = evaluate(line);
|
||||
|
||||
// printf("truthtable = 0b%016b\n", truthtable);
|
||||
if (print_truthtable)
|
||||
{
|
||||
printf("truthtable: 0b%016b\n", truthtable);
|
||||
}
|
||||
|
||||
if (lookup[truthtable].kind == ek_unreachable)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue