aboutsummaryrefslogtreecommitdiffstats
path: root/src/vu-next-frame.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2017-01-12 07:53:06 +0100
committerMattias Andrée <maandree@kth.se>2017-01-12 07:53:06 +0100
commitae811c3ce7b71902b508c65278050f0358471e98 (patch)
treee6f802e8476da87c4f53320128e674c58ee9c6a3 /src/vu-next-frame.c
parentMakefile: clean: do not list .o files explicitly (diff)
downloadblind-ae811c3ce7b71902b508c65278050f0358471e98.tar.gz
blind-ae811c3ce7b71902b508c65278050f0358471e98.tar.bz2
blind-ae811c3ce7b71902b508c65278050f0358471e98.tar.xz
m + Add vu-gauss-blur
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/vu-next-frame.c')
-rw-r--r--src/vu-next-frame.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/vu-next-frame.c b/src/vu-next-frame.c
index 667acf5..6a55790 100644
--- a/src/vu-next-frame.c
+++ b/src/vu-next-frame.c
@@ -6,9 +6,6 @@
#include <string.h>
#include <unistd.h>
-#undef eprintf
-#define eprintf(...) enprintf(2, __VA_ARGS__)
-
USAGE("width height pixel-format ...")
int
@@ -26,8 +23,8 @@ main(int argc, char *argv[])
stream.file = "<stdin>";
stream.pixfmt[0] = '\0';
- stream.width = etozu_arg("the width", argv[0], 1, SIZE_MAX);
- stream.height = etozu_arg("the height", argv[1], 1, SIZE_MAX);
+ 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;
n = (size_t)argc - 1;
@@ -41,26 +38,26 @@ main(int argc, char *argv[])
}
}
- eset_pixel_size(&stream);
+ enset_pixel_size(2, &stream);
fprint_stream_head(stdout, &stream);
- efflush(stdout, "<stdout>");
+ enfflush(2, stdout, "<stdout>");
w = stream.width * stream.pixel_size;
while (stream.height) {
stream.height--;
for (n = w; n; n -= stream.ptr) {
stream.ptr = 0;
- if (!eread_stream(&stream, n))
+ if (!enread_stream(2, &stream, n))
goto done;
anything = 1;
- ewriteall(STDOUT_FILENO, stream.buf, stream.ptr, "<stdout>");
+ enwriteall(2, STDOUT_FILENO, stream.buf, stream.ptr, "<stdout>");
}
}
done:
if (stream.height || n)
- eprintf("incomplete frame\n");
+ enprintf(2, "incomplete frame\n");
return !anything;
}