blind

suckless command-line video editing utility
git clone git://git.suckless.org/blind
Log | Files | Refs | README | LICENSE

commit 7bd1282fba79997816521e25485ab890a0a0126d
parent d6c07e7fa021e13b5b9914cb15f13c711ecd387d
Author: Mattias Andrée <maandree@kth.se>
Date:   Sun, 15 Jan 2017 17:40:22 +0100

Fix some minor errors

Signed-off-by: Mattias Andrée <maandree@kth.se>

Diffstat:
MTODO | 2--
Msrc/blind-arithm.c | 6++++--
Msrc/blind-from-image.c | 1+
Msrc/blind-single-colour.c | 2+-
Msrc/stream.h | 8++++----
5 files changed, 10 insertions(+), 9 deletions(-)

diff --git 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 @@ -8,7 +8,7 @@ #include <string.h> #include <unistd.h> -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 = "<stdin>"; 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, "<stdout>"); process_two_streams(&left, &right, STDOUT_FILENO, "<stdout>", process); return 0; } diff --git 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 <arpa/inet.h> diff --git 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 @@ -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__)