diff options
Diffstat (limited to 'src/stdio/fgetpos.c')
-rw-r--r-- | src/stdio/fgetpos.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/stdio/fgetpos.c b/src/stdio/fgetpos.c new file mode 100644 index 00000000..177519d1 --- /dev/null +++ b/src/stdio/fgetpos.c @@ -0,0 +1,23 @@ +#include <stdio.h> +#include "nonstd/io.h" + +/** get the file stream position indicator **/ +int fgetpos(FILE * restrict stream, fpos_t * restrict pos) +{ + flockfile(stream); + *pos = stream->pos; + funlockfile(stream); + return 0; +} + +/*** +stores the current value of the file position indicator +for ARGUMENT(stream) into the TYPEDEF(fpos_t) at ARGUMENT(pos). +***/ + +/* +UNSPECIFIED(The information stored in TYPEDEF(fpos_t)) +*/ +/* +STDC(1) +*/ |