summaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
authorLaslo Hunhold <dev@frign.de>2017-04-13 00:07:10 +0200
committerLaslo Hunhold <dev@frign.de>2017-04-13 00:07:10 +0200
commit17f09e2cea4dda0f54841f7a273e347b53f4996e (patch)
treeef8083df2105f8ed06b79f281316b537e836764b /util.h
parentbc03439e0e0c439bb9c6c3167d9c272f3b7d5632 (diff)
Use fshut() to properly flush the output stream
For small images, it could happen that the output stream would not be flushed before exit(), resulting in a lack of error-reporting on a full device. Using fflush(), a function I first introduced in sbase, we do the flushing before returning manually and report errors if they occurred.
Diffstat (limited to 'util.h')
-rw-r--r--util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/util.h b/util.h
index 93492a5..fcb5257 100644
--- a/util.h
+++ b/util.h
@@ -11,6 +11,8 @@ void ff_write_header(uint32_t width, uint32_t height);
int parse_mask(const char *, uint16_t mask[3]);
+int fshut(FILE *, const char *);
+
#undef reallocarray
void *reallocarray(void *, size_t, size_t);
void *ereallocarray(void *optr, size_t nmemb, size_t size);