diff options
author | Ian McFarlane <i.mcfarlane2002@gmail.com> | 2025-05-06 15:14:11 -0400 |
---|---|---|
committer | Ian McFarlane <i.mcfarlane2002@gmail.com> | 2025-05-06 15:14:11 -0400 |
commit | da396afa8b612b8f8ff07d71c57761a627b158eb (patch) | |
tree | b4935b29aca686c6ee17a583cffe149d7bb3c819 /user/lib/fseek.c | |
parent | update forkman with spinlock (diff) | |
parent | start docs (diff) | |
download | comus-forkman.tar.gz comus-forkman.tar.bz2 comus-forkman.zip |
merge main into forkmanforkman
Diffstat (limited to '')
-rw-r--r-- | user/lib/fseek.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/user/lib/fseek.c b/user/lib/fseek.c new file mode 100644 index 0000000..a7a3377 --- /dev/null +++ b/user/lib/fseek.c @@ -0,0 +1,16 @@ +#include <stdio.h> +#include <unistd.h> + +int fseek(FILE *stream, long off, int whence) +{ + int fd; + fd = (uintptr_t)stream; + return seek(fd, off, whence); +} + +long ftell(FILE *stream) +{ + int fd; + fd = (uintptr_t)stream; + return seek(fd, 0, SEEK_CUR); +} |