summaryrefslogtreecommitdiff
path: root/libc/stdio/stdio_ext.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2017-08-01 15:16:36 -0700
committerElliott Hughes <enh@google.com>2017-08-01 15:27:27 -0700
commit5ba2c21159f0bb4c0f7f1fbdbd4671f381b75816 (patch)
tree6e4626b224d4105a66be2dfc265b982badf7ca3f /libc/stdio/stdio_ext.cpp
parent1bac61f09f46ac3c0a73387613dfd20023e39772 (diff)
Finish <stdio_ext.h>.
Implement __freading and __fwriting, and clarify the documentation that was the cause of these not being implemented for years. Bug: http://b/17157253 Test: ran tests Change-Id: I89542c8131b13889e2585417a024050ecf2abcb7
Diffstat (limited to 'libc/stdio/stdio_ext.cpp')
-rw-r--r--libc/stdio/stdio_ext.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/libc/stdio/stdio_ext.cpp b/libc/stdio/stdio_ext.cpp
index ebc705c87..8cf4f4b3d 100644
--- a/libc/stdio/stdio_ext.cpp
+++ b/libc/stdio/stdio_ext.cpp
@@ -39,17 +39,13 @@ size_t __fbufsize(FILE* fp) {
return fp->_bf._size;
}
-/* For a _SRW stream, we don't know whether we last read or wrote.
int __freading(FILE* fp) {
- return (fp->_flags & _SRD) != 0 || ...;
+ return (fp->_flags & __SRD) != 0;
}
-*/
-/* For a _SRW stream, we don't know whether we last read or wrote.
-int __fwriting(FILE*) {
- return (fp->_flags & _SWR) != 0 || ...;
+int __fwriting(FILE* fp) {
+ return (fp->_flags & __SWR) != 0;
}
-*/
int __freadable(FILE* fp) {
return (fp->_flags & (__SRD|__SRW)) != 0;