From dea5819d672e28a7438cf252dd172e71982e3aa3 Mon Sep 17 00:00:00 2001 From: Peter McGoron Date: Mon, 9 Aug 2021 13:44:06 -0400 Subject: [PATCH] input.c: namespace enum --- input.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/input.c b/input.c index a2b1555..6b9dd0b 100644 --- a/input.c +++ b/input.c @@ -1,9 +1,9 @@ #include "input.h" -enum { READ, DISCARD }; +enum { LIBSCOMM_READ, LIBSCOMM_DISCARD }; void libscomm_reset(struct libscomm_input *in) { - in->state = READ; + in->state = LIBSCOMM_READ; in->len = 0; } @@ -40,7 +40,7 @@ enum libscomm_input_r libscomm_read(struct libscomm_input *in, while ((c = **s)) { (*s)++; - if (in->state == DISCARD) { + if (in->state == LIBSCOMM_DISCARD) { if (c == '\n') { libscomm_reset(in); return LIBSCOMM_OVERFLOW; @@ -53,7 +53,7 @@ enum libscomm_input_r libscomm_read(struct libscomm_input *in, default: in->intbuf[in->len++] = c; if (in->len == LIBSCOMM_MAXBUF) - in->state = DISCARD; + in->state = LIBSCOMM_DISCARD; } } }