diff options
author | Shav Kinderlehrer <[email protected]> | 2023-04-18 08:58:23 -0400 |
---|---|---|
committer | Shav Kinderlehrer <[email protected]> | 2023-04-18 08:58:23 -0400 |
commit | e586f29e6d2974be68994405ff35684353883444 (patch) | |
tree | 9d659a1319629e78372b22873eb6d51327c1fa84 /src/main.c | |
parent | 0e1183a62cb98f52393961f7d40524f3754ec22e (diff) | |
download | lat-e586f29e6d2974be68994405ff35684353883444.tar.gz lat-e586f29e6d2974be68994405ff35684353883444.zip |
Revise --binary functionalityv0.9.3
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -23,8 +23,10 @@ void run(FILE *fp, char *filename, bool tty) { struct filedata f; f = readfile(fp, conf.stdin); - if (conf.force_binary) { - f.binary = !f.binary; + if (conf.force_binary > 0) { + f.binary = true; + } else if (conf.force_binary == 0) { + f.binary = false; } conf.headers = conf.headers && tty; // tty still overrides user @@ -72,7 +74,7 @@ void run(FILE *fp, char *filename, bool tty) { void initconf(void) { conf.stdin = false; - conf.force_binary = false; + conf.force_binary = -1; conf.has_read_stdin = false; conf.process = true; conf.headers = true; |