Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No ftell in the Unix module while there is an lseek #5915

Closed
vicuna opened this issue Feb 5, 2013 · 3 comments
Closed

No ftell in the Unix module while there is an lseek #5915

vicuna opened this issue Feb 5, 2013 · 3 comments

Comments

@vicuna
Copy link

vicuna commented Feb 5, 2013

Original bug ID: 5915
Reporter: berenger
Status: closed (set by @xavierleroy on 2013-03-24T14:34:04Z)
Resolution: not a bug
Priority: normal
Severity: feature
Platform: all POSIX compliant ones
Version: 4.00.1
Category: standard library

Bug description

Hello,

It is a little cumbersome for system programming that there is no ftell in the Unix module.

Regards,
Francois.

@vicuna
Copy link
Author

vicuna commented Feb 5, 2013

Comment author: berenger

If it has a chance for inclusion in the source tree, I can provide a patch
to add it, so that lseek feels less lonely.

@vicuna
Copy link
Author

vicuna commented Feb 7, 2013

Comment author: @chambart

The unix library uses file descriptors, not streams. ftell is a stream function.

If you want to know the current offset of a file descritor, use:

lseek fd 0 SEEK_CUR

@vicuna
Copy link
Author

vicuna commented Feb 8, 2013

Comment author: berenger

I see. Thanks!
It's OK to close my stupid request then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant