summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorrillig <rillig@NetBSD.org>2021-09-11 19:05:06 +0000
committerrillig <rillig@NetBSD.org>2021-09-11 19:05:06 +0000
commitda923807cbf93102136ed9137165e518b1fec8bf (patch)
tree8ec5d2dbffecc3a825a3deac36972f7022d52731 /include
parent235cceb6ea93514d829706840c254f497c1750be (diff)
stdio.h: sync comment for struct __sFILE with reality
In stdio.h 1.1 from 1993-03-21, the struct had a member named _ub for the ungetc buffer. That member was repurposed in stdio.h 1.42 from 2001-12-07 in order to support wide characters. Remove the reference to the 'WARNING above' since there is no such warning and even when this comment was added in stdio.h 1.20 from 1998-02-02, there was none.
Diffstat (limited to 'include')
-rw-r--r--include/stdio.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/include/stdio.h b/include/stdio.h
index 0380344fd93..274c304dfba 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -1,4 +1,4 @@
-/* $NetBSD: stdio.h,v 1.102 2021/09/11 18:38:25 rillig Exp $ */
+/* $NetBSD: stdio.h,v 1.103 2021/09/11 19:05:06 rillig Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -103,13 +103,12 @@ struct __sbuf {
* _lbfsize is used only to make the inline line-buffered output stream
* code as compact as possible.
*
- * _ub, _up, and _ur are used when ungetc() pushes back more characters
- * than fit in the current _bf, or when ungetc() pushes back a character
- * that does not match the previous one in _bf. When this happens,
- * _ub._base becomes non-nil (i.e., a stream has ungetc() data iff
- * _ub._base!=NULL) and _up and _ur save the current values of _p and _r.
- *
- * NB: see WARNING above before changing the layout of this structure!
+ * _ub (via _ext and struct __sfileext), _up, and _ur are used when ungetc()
+ * pushes back more characters than fit in the current _bf, or when ungetc()
+ * pushes back a character that does not match the previous one in _bf.
+ * When this happens, _ext._base becomes non-nil (i.e., a stream has ungetc()
+ * data iff _ub._base != NULL) and _up and _ur save the current values of _p
+ * and _r.
*/
typedef struct __sFILE {
unsigned char *_p; /* current position in (some) buffer */