adding #![no-]fold-case syntax

This commit is contained in:
Alex Shinn 2011-05-23 04:49:35 -07:00
parent 955fc708e9
commit cf2adc79f5

21
sexp.c
View file

@ -1902,10 +1902,23 @@ sexp sexp_read_raw (sexp ctx, sexp in) {
goto scan_loop;
break;
case '!':
while ((c1 = sexp_read_char(ctx, in)) != EOF)
if (c1 == '\n')
break;
sexp_port_line(in)++;
#if SEXP_USE_FOLD_CASE_SYMS
res = sexp_read_symbol(ctx, in, '!', 0);
if (sexp_stringp(res)
&& strcmp("!fold-case", sexp_string_data(res)) == 0) {
sexp_port_fold_casep(in) = 1;
} else if (sexp_stringp(res)
&& strcmp("!no-fold-case", sexp_string_data(res)) == 0) {
sexp_port_fold_casep(in) = 0;
} else {
#endif
while ((c1 = sexp_read_char(ctx, in)) != EOF)
if (c1 == '\n')
break;
sexp_port_line(in)++;
#if SEXP_USE_FOLD_CASE_SYMS
}
#endif
goto scan_loop;
case '\\':
c1 = sexp_read_char(ctx, in);