From 8fd71ec34243fcee92c84548dbb3ef4f4316ccb3 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Sun, 16 Aug 2020 12:35:49 -0400 Subject: use an enum for bmode to make for easier symbolic debugging --- src/stdio/_stdio.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') 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 */ -- cgit v1.2.1