diff options
author | Jakob Kaivo <jkk@ung.org> | 2020-08-16 12:35:49 -0400 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2020-08-16 12:35:49 -0400 |
commit | 8fd71ec34243fcee92c84548dbb3ef4f4316ccb3 (patch) | |
tree | d014c98126a0a34c9ccf283985a8577c33e6847b | |
parent | 75f2a7c3d2bed3c1c5add63325c8052ab6749afe (diff) |
use an enum for bmode to make for easier symbolic debugging
-rw-r--r-- | src/stdio/_stdio.h | 8 |
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 */ |