diff options
author | das <das@FreeBSD.org> | 2004-06-08 05:45:32 +0000 |
---|---|---|
committer | das <das@FreeBSD.org> | 2004-06-08 05:45:32 +0000 |
commit | a1e60d89fb009ab28b4b2d277495309756b79ff3 (patch) | |
tree | 32c47a37c84438fc9b0379f295a4d6bd77642d2b /lib/libc/stdio/local.h | |
parent | 55edbf12e79020526adb2c4cd6d16638c3f7f15a (diff) | |
download | FreeBSD-src-a1e60d89fb009ab28b4b2d277495309756b79ff3.zip FreeBSD-src-a1e60d89fb009ab28b4b2d277495309756b79ff3.tar.gz |
Rename cantwrite() to prepwrite(). The latter is less confusing,
since the macro isn't really a predicate, and it has side-effects.
Diffstat (limited to 'lib/libc/stdio/local.h')
-rw-r--r-- | lib/libc/stdio/local.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libc/stdio/local.h b/lib/libc/stdio/local.h index b8bf81a..b1d92d9 100644 --- a/lib/libc/stdio/local.h +++ b/lib/libc/stdio/local.h @@ -93,9 +93,10 @@ struct __sFILEX { }; /* - * Return true iff the given FILE cannot be written now. + * Prepare the given FILE for writing, and return 0 iff it + * can be written now. Otherwise, return EOF and set errno. */ -#define cantwrite(fp) \ +#define prepwrite(fp) \ ((((fp)->_flags & __SWR) == 0 || \ ((fp)->_bf._base == NULL && ((fp)->_flags & __SSTR) == 0)) && \ __swsetup(fp)) |