aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorShav Kinderlehrer <[email protected]>2023-04-19 13:28:06 -0400
committerShav Kinderlehrer <[email protected]>2023-04-19 13:28:06 -0400
commitc713312b2281787030602e6d1e10d5a65cd2dbce (patch)
tree451fd848013461ba1da9abf39b9dd2d0817b47c2 /src/main.c
parent219075499f0c7307cbf9fb3a6c3561cf6c99aeb0 (diff)
downloadlat-c713312b2281787030602e6d1e10d5a65cd2dbce.tar.gz
lat-c713312b2281787030602e6d1e10d5a65cd2dbce.zip
Check stdin for binary toov0.10.2
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index 3758713..42ebe6e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -42,11 +42,11 @@ void run(FILE *fp, char *filename, bool tty) {
if (conf.headers) {
char *addon = f.binary ? "<binary>" : "";
- if (!conf.pager)
+ if (conf.pager)
+ fprintf(err, "%s%s%s%s\r\n", invert_t, basename(filename), addon, reset);
+ else
fprintf(err, "\x1b[2K\r%s%s%s%s\r\n", invert_t, basename(filename), addon,
reset);
- else
- fprintf(err, "%s%s%s%s\r\n", invert_t, basename(filename), addon, reset);
}
conf.process = (tty && !f.binary);
@@ -147,6 +147,7 @@ int main(int argc, char *argv[]) {
run(fp, argv[i], tty);
fclose(fp);
if (tty && (i + 1 != argc)) {
+ printf("offset: %d argc: %d\n", i, argc);
fprintf(err, "\r\n"); // separate concurrent files in tty
}
}