Introduction
Introduction Statistics Contact Development Disclaimer Help
Fix blind-to-image -f - blind - suckless command-line video editing utility
git clone git://git.suckless.org/blind
Log
Files
Refs
README
LICENSE
---
commit 6128aa893ef5180be5280c7e8185bfee85a00a73
parent 969d96f8f5b66c43027422ed6a10dd02db53f1dc
Author: Mattias Andrée <[email protected]>
Date: Mon, 3 Jul 2017 22:58:31 +0200
Fix blind-to-image -f
Signed-off-by: Mattias Andrée <[email protected]>
Diffstat:
M src/blind-to-image.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/src/blind-to-image.c b/src/blind-to-image.c
@@ -119,13 +119,11 @@ main(int argc, char *argv[])
eprintf("%s: frame is too wide\n", stream.file);
if (stream.height > UINT32_MAX)
eprintf("%s: frame is too tall\n", stream.file);
- printf("farbfeld");
- memmove(stream.buf + 8, stream.buf, stream.ptr);
- stream.ptr += 8;
width = htonl(width);
height = htonl(height);
- memcpy(stream.buf + 0, &width, 4);
- memcpy(stream.buf + 4, &height, 4);
+ ewriteall(STDOUT_FILENO, "farbfeld", 8, "<stdout>");
+ ewriteall(STDOUT_FILENO, &width, 4, "<stdout>");
+ ewriteall(STDOUT_FILENO, &height, 4, "<stdout>");
} else {
printf("P7\n"
"WIDTH %zu\n"
@@ -134,8 +132,8 @@ main(int argc, char *argv[])
"MAXVAL %llu\n"
"TUPLTYPE RGB_ALPHA\n"
"ENDHDR\n", stream.width, stream.height, max);
+ efflush(stdout, "<stdout>");
}
- efflush(stdout, "<stdout>");
process_stream(&stream, process);
return 0;
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.