projects
/
tfcrypt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update copyright year.
[tfcrypt.git]
/
tfc_misc.c
diff --git
a/tfc_misc.c
b/tfc_misc.c
index d1bb78368d2126bfa1a1b411178b1b79561a6d9f..f55726ac897974471b33f9ad4422bc4463ddccfe 100644
(file)
--- a/
tfc_misc.c
+++ b/
tfc_misc.c
@@
-2,7
+2,7
@@
* tfcrypt -- high security Threefish encryption tool.
*
* tfcrypt is copyrighted:
* tfcrypt -- high security Threefish encryption tool.
*
* tfcrypt is copyrighted:
- * Copyright (C) 2012-201
8
Andrey Rys. All rights reserved.
+ * Copyright (C) 2012-201
9
Andrey Rys. All rights reserved.
*
* tfcrypt is licensed to you under the terms of std. MIT/X11 license:
*
*
* tfcrypt is licensed to you under the terms of std. MIT/X11 license:
*
@@
-100,14
+100,23
@@
tfc_fsize tfc_fdsize(int fd)
cur = lseek(fd, 0L, SEEK_CUR);
l = lseek(fd, 0L, SEEK_SET);
cur = lseek(fd, 0L, SEEK_CUR);
l = lseek(fd, 0L, SEEK_SET);
- if (l == -1) return
-1
;
+ if (l == -1) return
NOFSIZE
;
l = lseek(fd, 0L, SEEK_END);
l = lseek(fd, 0L, SEEK_END);
- if (l == -1) return
-1
;
+ if (l == -1) return
NOFSIZE
;
lseek(fd, cur, SEEK_SET);
return (tfc_fsize)l;
}
lseek(fd, cur, SEEK_SET);
return (tfc_fsize)l;
}
+tfc_fsize tfc_fdgetpos(int fd)
+{
+ off_t t;
+
+ t = lseek(fd, 0L, SEEK_CUR);
+ if (t == -1) return NOFSIZE;
+ return (tfc_fsize)t;
+}
+
tfc_fsize tfc_fnamesize(char *fname, tfc_yesno noexit)
{
int fnmfd;
tfc_fsize tfc_fnamesize(char *fname, tfc_yesno noexit)
{
int fnmfd;