aboutsummaryrefslogtreecommitdiffstats
path: root/src/blind-next-frame.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2017-07-16 15:29:43 +0200
committerMattias Andrée <maandree@kth.se>2017-07-16 15:29:43 +0200
commitd05d162cb81664f292834fa5d48d623d2b6147a7 (patch)
tree9d4252fcdfa2210613188d5c965514cfab6a8ec2 /src/blind-next-frame.c
parentUse #include instead of #define (diff)
downloadblind-d05d162cb81664f292834fa5d48d623d2b6147a7.tar.gz
blind-d05d162cb81664f292834fa5d48d623d2b6147a7.tar.bz2
blind-d05d162cb81664f292834fa5d48d623d2b6147a7.tar.xz
Misc code improvements
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/blind-next-frame.c')
-rw-r--r--src/blind-next-frame.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/blind-next-frame.c b/src/blind-next-frame.c
index 260c375..be6c303 100644
--- a/src/blind-next-frame.c
+++ b/src/blind-next-frame.c
@@ -6,13 +6,11 @@ USAGE("[-f frames] width height pixel-format ...")
int
main(int argc, char *argv[])
{
- struct stream stream;
+ struct stream stream = { .frames = 1, .fd = STDIN_FILENO, .file = "<stdin>" };
size_t n;
int i;
char *p;
- stream.frames = 1;
-
ARGBEGIN {
case 'f':
stream.frames = entozu_flag(2, 'f', UARGF(), 1, SIZE_MAX);
@@ -24,10 +22,7 @@ main(int argc, char *argv[])
if (argc < 3)
usage();
- stream.fd = STDIN_FILENO;
- stream.file = "<stdin>";
stream.pixfmt[0] = '\0';
-
stream.width = entozu_arg(2, "the width", argv[0], 1, SIZE_MAX);
stream.height = entozu_arg(2, "the height", argv[1], 1, SIZE_MAX);
argv += 2, argc -= 2;
@@ -42,8 +37,7 @@ main(int argc, char *argv[])
p = stpcpy(p, argv[i]);
}
}
-
- enset_pixel_size(2, &stream);
+ enset_pixel_format(2, &stream, NULL);
fprint_stream_head(stdout, &stream);
enfflush(2, stdout, "<stdout>");