From 482e0d79a91010afcc9abc20b5014c93afcbd1c4 Mon Sep 17 00:00:00 2001 From: Alex Shinn <ashinn@users.noreply.github.com> Date: Sun, 27 Dec 2009 16:08:27 +0900 Subject: [PATCH] #t and #f are case-insensitive tokens --- sexp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sexp.c b/sexp.c index bcdb619f..2df64934 100644 --- a/sexp.c +++ b/sexp.c @@ -1464,11 +1464,11 @@ sexp sexp_read_raw (sexp ctx, sexp in) { if (sexp_fixnump(res)) res = sexp_make_flonum(ctx, sexp_unbox_fixnum(res)); break; - case 'f': - case 't': + case 'f': case 'F': + case 't': case 'T': c2 = sexp_read_char(ctx, in); if (c2 == EOF || is_separator(c2)) { - res = (c1 == 't' ? SEXP_TRUE : SEXP_FALSE); + res = (tolower(c1) == 't' ? SEXP_TRUE : SEXP_FALSE); sexp_push_char(ctx, c2, in); } else { tmp = sexp_list2(ctx, sexp_make_character(c1), sexp_make_character(c2));