From 7bd1282fba79997816521e25485ab890a0a0126d Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 15 Jan 2017 17:40:22 +0100 Subject: Fix some minor errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- TODO | 2 -- src/blind-arithm.c | 6 ++++-- src/blind-from-image.c | 1 + src/blind-single-colour.c | 2 +- src/stream.h | 8 ++++---- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/TODO b/TODO index 67ce5e7..943f8a0 100644 --- a/TODO +++ b/TODO @@ -10,7 +10,6 @@ blind-apply-kernel apply a convolution matrix blind-find-frame a graphical tool for locating frames, should highlight key frames UNTESTED: - blind-arithm blind-colour-srgb blind-crop blind-cut @@ -23,6 +22,5 @@ UNTESTED: blind-set-alpha blind-set-luma blind-set-saturation - blind-single-colour blind-split blind-to-text diff --git a/src/blind-arithm.c b/src/blind-arithm.c index ce85287..015df42 100644 --- a/src/blind-arithm.c +++ b/src/blind-arithm.c @@ -8,7 +8,7 @@ #include #include -USAGE("right-hand-stream") +USAGE("operation right-hand-stream") /* Because the syntax for a function returning a function pointer is disgusting. */ typedef void (*process_func)(struct stream *left, struct stream *right, size_t n); @@ -60,7 +60,7 @@ main(int argc, char *argv[]) struct stream left, right; process_func process = NULL; - ENOFLAGS(argc != 1); + ENOFLAGS(argc != 2); left.file = ""; left.fd = STDIN_FILENO; @@ -75,6 +75,8 @@ main(int argc, char *argv[]) else eprintf("pixel format %s is not supported, try xyza\n", left.pixfmt); + fprint_stream_head(stdout, &left); + efflush(stdout, ""); process_two_streams(&left, &right, STDOUT_FILENO, "", process); return 0; } diff --git a/src/blind-from-image.c b/src/blind-from-image.c index 0a3f767..b66d127 100644 --- a/src/blind-from-image.c +++ b/src/blind-from-image.c @@ -1,4 +1,5 @@ /* See LICENSE file for copyright and license details. */ +#include "stream.h" #include "util.h" #include diff --git a/src/blind-single-colour.c b/src/blind-single-colour.c index 254ea2a..4046f3e 100644 --- a/src/blind-single-colour.c +++ b/src/blind-single-colour.c @@ -49,7 +49,7 @@ main(int argc, char *argv[]) if (argc < 3) { X = D65_XYY_X / D65_XYY_Y; Z = 1 / D65_XYY_Y - 1 - X; - Y = etolf_arg("the Y value", argv[1]); + Y = etolf_arg("the Y value", argv[0]); } else { X = etolf_arg("the X value", argv[0]); Y = etolf_arg("the Y value", argv[1]); diff --git a/src/stream.h b/src/stream.h index 53b7113..5fa3eea 100644 --- a/src/stream.h +++ b/src/stream.h @@ -6,15 +6,15 @@ #define SPRINTF_HEAD_ZN(BUF, FRAMES, WIDTH, HEIGHT, PIXFMT, LENP)\ sprintf(BUF, "%zu %zu %zu %s\n%cuivf%zn",\ - FRAMES, WIDTH, HEIGHT, PIXFMT, 0, LENP) + (size_t)(FRAMES), (size_t)(WIDTH), (size_t)(HEIGHT), PIXFMT, 0, LENP) #define SPRINTF_HEAD(BUF, FRAMES, WIDTH, HEIGHT, PIXFMT)\ sprintf(BUF, "%zu %zu %zu %s\n%cuivf",\ - FRAMES, WIDTH, HEIGHT, PIXFMT, 0) + (size_t)(FRAMES), (size_t)(WIDTH), (size_t)(HEIGHT), PIXFMT, 0) #define FPRINTF_HEAD(FP, FRAMES, WIDTH, HEIGHT, PIXFMT)\ - fprintf(fp, "%zu %zu %zu %s\n%cuivf",\ - FRAMES, WIDTH, HEIGHT, PIXFMT, 0) + fprintf(FP, "%zu %zu %zu %s\n%cuivf",\ + (size_t)(FRAMES), (size_t)(WIDTH), (size_t)(HEIGHT), PIXFMT, 0) #define einit_stream(...) eninit_stream(1, __VA_ARGS__) #define eset_pixel_size(...) enset_pixel_size(1, __VA_ARGS__) -- cgit v1.2.3-70-g09d2