diff options
author | Mattias Andrée <maandree@member.fsf.org> | 2015-12-11 16:13:45 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@member.fsf.org> | 2015-12-11 16:13:45 +0100 |
commit | 50da9e696d7be359cdbeaf22bd643f3885827a55 (patch) | |
tree | c6fdbf869057e5f21155613c1dec2090c096b029 /src/pnm.c | |
parent | make: missed to add a variable needed at dist (diff) | |
download | scrotty-50da9e696d7be359cdbeaf22bd643f3885827a55.tar.gz scrotty-50da9e696d7be359cdbeaf22bd643f3885827a55.tar.bz2 scrotty-50da9e696d7be359cdbeaf22bd643f3885827a55.tar.xz |
the kernel-specific functions can fetch and use additional data it may need
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to 'src/pnm.c')
-rw-r--r-- | src/pnm.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -55,10 +55,12 @@ const char* inttable[] = * @param width The width of the image. * @param height The height of the image. * @param imgfd The file descriptor connected to conversion process's stdin. + * @param data Additional data for `convert_fb_to_pnm` + * and `convert_fb_to_png`. * @return Zero on success, -1 on error. */ int -save_pnm (int fbfd, long width, long height, int imgfd) +save_pnm (int fbfd, long width, long height, int imgfd, void *restrict data) { char buf[8 << 10]; FILE *file = NULL; @@ -88,7 +90,7 @@ save_pnm (int fbfd, long width, long height, int imgfd) got += off; /* Convert read pixels. */ - if (convert_fb_to_pnm (file, buf, (size_t)got, &adjustment) < 0) + if (convert_fb_to_pnm (file, buf, (size_t)got, &adjustment, data) < 0) goto fail; /* If we read a whole number of pixels, reset the buffer, otherwise, |