]> sigrok.org Git - libsigrok.git/commit - src/input/input.c
input: Use fseeko/ftello to get the size of a file
authorDaniel Elstner <redacted>
Sat, 19 Sep 2015 18:43:25 +0000 (20:43 +0200)
committerDaniel Elstner <redacted>
Thu, 1 Oct 2015 13:44:55 +0000 (15:44 +0200)
commit4619fab47acf4fb0a1c035072c2e8552b4bcbae3
tree77b0ed6d4f49fa6a72b17d56b8bf88046d7c9d09
parent5e364d4fe0b6367717d7dcf3389685b8fe985211
input: Use fseeko/ftello to get the size of a file

Introduce the sr_file_get_size() utility function to retrieve the
size of an open FILE stream. This is based on fseeko() followed by
ftello(), which are POSIX functions but quite portable in practice.
Since these calls operate on FILE streams instead of filenames, the
issue of filename encoding no longer arises.
src/input/input.c
src/libsigrok-internal.h