aboutsummaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authorJan Sucan <jan@jansucan.com>2021-05-02 10:19:23 +0200
committerJan Sucan <jan@jansucan.com>2021-05-02 10:20:29 +0200
commit02ffe0ed4113e7b479197d0ba1b160e6280b4099 (patch)
treec7a3573039ba02983eec38267d61d86e1965bbab /file.c
parent36a92af6ee3c20c93835a34ddeb148c34ccf023c (diff)
Move the source files to a src directory
Diffstat (limited to 'file.c')
-rw-r--r--file.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/file.c b/file.c
deleted file mode 100644
index c6823b9..0000000
--- a/file.c
+++ /dev/null
@@ -1,23 +0,0 @@
-#include <errno.h>
-#include <string.h>
-
-#include "file.h"
-#include "print.h"
-
-long
-file_size(FILE *const file)
-{
- fpos_t p;
-
- if ((fgetpos(file, &p) != 0) || (fseek(file, 0L, SEEK_END) != 0)) {
- return -1;
- }
-
- const long size = ftell(file);
-
- if (fsetpos(file, &p) != 0) {
- return -1;
- }
-
- return size;
-}