summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2020-08-16 12:35:49 -0400
committerJakob Kaivo <jkk@ung.org>2020-08-16 12:35:49 -0400
commit8fd71ec34243fcee92c84548dbb3ef4f4316ccb3 (patch)
treed014c98126a0a34c9ccf283985a8577c33e6847b
parent75f2a7c3d2bed3c1c5add63325c8052ab6749afe (diff)
use an enum for bmode to make for easier symbolic debugging
-rw-r--r--src/stdio/_stdio.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/stdio/_stdio.h b/src/stdio/_stdio.h
index a613f45b..056d58e5 100644
--- a/src/stdio/_stdio.h
+++ b/src/stdio/_stdio.h
@@ -28,8 +28,12 @@ struct __FILE {
char ibuf[BUFSIZ]; /* statically allocated buffer */
size_t bsize; /* how big is the buffer */
size_t bpos; /* current position of next character */
- int bmode; /* 0, _IONBF, _IOLBF, _IOFBF */
- /* 0 means this FILE is currently free */
+ enum {
+ UNUSED = 0,
+ FULL = _IOFBF,
+ LINE = _IOLBF,
+ NONE = _IONBF,
+ } bmode; /* buffer mode or stream available */
int fd; /* the backing file descriptor */