From 2b97473c5e4e5b1e478cf80b9a96511d388df66d Mon Sep 17 00:00:00 2001 From: "hyunghwan.chung" Date: Wed, 7 Sep 2016 07:51:04 +0000 Subject: [PATCH] removed the unneeded code --- stix/lib/comp.c | 34 ---------------------------------- stix/lib/stix-cmn.h | 1 - 2 files changed, 35 deletions(-) diff --git a/stix/lib/comp.c b/stix/lib/comp.c index 47fc1ac..a925542 100644 --- a/stix/lib/comp.c +++ b/stix/lib/comp.c @@ -669,40 +669,6 @@ static int get_char (stix_t* stix) } lc = stix->c->curinp->buf[stix->c->curinp->b.pos++]; - if (lc == '\n' || lc == '\r') - { - /* handle common newline conventions. - * LF+CR - * CR+LF - * LF - * CR - */ - if (stix->c->curinp->b.pos >= stix->c->curinp->b.len) - { - n = stix->c->impl (stix, STIX_IO_READ, stix->c->curinp); - if (n <= -1) - { - stix->c->curinp->b.state = -1; - goto done; - } - else if (n == 0) - { - stix->c->curinp->b.state = 1; - goto done; - } - else - { - stix->c->curinp->b.pos = 0; - stix->c->curinp->b.len = n; - } - } - - ec = (lc == '\n')? '\r': '\n'; - if (stix->c->curinp->buf[stix->c->curinp->b.pos] == ec) stix->c->curinp->b.pos++; - - done: - lc = STIX_UCI_NL; - } stix->c->curinp->lxc.c = lc; stix->c->curinp->lxc.l.line = stix->c->curinp->line; diff --git a/stix/lib/stix-cmn.h b/stix/lib/stix-cmn.h index 457c435..cf6ec5e 100644 --- a/stix/lib/stix-cmn.h +++ b/stix/lib/stix-cmn.h @@ -395,7 +395,6 @@ struct stix_ntime_t * PRIMITIVE MACROS * ========================================================================= */ #define STIX_UCI_EOF ((stix_ooci_t)-1) -#define STIX_UCI_NL ((stix_ooci_t)'\n') #define STIX_SIZEOF(x) (sizeof(x)) #define STIX_COUNTOF(x) (sizeof(x) / sizeof(x[0]))