projects
/
platform
/
upstream
/
syslinux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8e1e022
)
ftell() operation
author
hpa
<hpa>
Mon, 10 Jan 2005 02:44:17 +0000
(
02:44
+0000)
committer
hpa
<hpa>
Mon, 10 Jan 2005 02:44:17 +0000
(
02:44
+0000)
com32/lib/sys/ftell.c
[new file with mode: 0644]
patch
|
blob
diff --git a/com32/lib/sys/ftell.c
b/com32/lib/sys/ftell.c
new file mode 100644
(file)
index 0000000..
3db2814
--- /dev/null
+++ b/
com32/lib/sys/ftell.c
@@ -0,0
+1,18
@@
+/*
+ * sys/ftell.c
+ *
+ * We can't seek, but we can at least tell...
+ */
+
+#include <stdio.h>
+#include "sys/file.h"
+
+long ftell(FILE *stream)
+{
+ int fd = fileno(stream);
+ struct file_info *fp = &__file_info[fd];
+
+ return fp->i.offset;
+}
+
+