Module Name: src
Committed By: rillig
Date: Sat Sep 11 19:05:06 UTC 2021
Modified Files:
src/include: stdio.h
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/include/stdio.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/include/stdio.h
diff -u src/include/stdio.h:1.102 src/include/stdio.h:1.103
--- src/include/stdio.h:1.102 Sat Sep 11 18:38:25 2021
+++ src/include/stdio.h Sat Sep 11 19:05:06 2021
@@ -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 */