From 03be4ba79f2fa68d966c81be4f32b36f9fe09813 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sat, 5 Feb 2022 14:25:59 -0800 Subject: Use null_string throughout code base. * eval.c (load): Use null_string instead of lit(""). * lib.c (obj_init): Likewise. * match.c (LOG_MATCH, LOG_MISMATCH, do_txeval): Likewise. * parser.c (regex_parse, lisp_parse_impl, find_matching_syms): Likewise. * stream.c (do_parse_mode): Likewise. * txr.c (sysroot_init): Likewise. (txr_main): Replace string(L"") with null_string. --- match.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'match.c') diff --git a/match.c b/match.c index e2d01b80..81cf7c8d 100644 --- a/match.c +++ b/match.c @@ -519,14 +519,14 @@ typedef val (*h_match_func)(match_line_ctx *c); plus(c->pos, c->base), c->file, c->data_lineno, nao); \ debuglf(elem, lit(" ~a"), c->dataline, nao); \ if (c_num(c->pos, lit("txr")) < 77) \ - debuglf(elem, lit(" ~*a^"), c->pos, lit(""), nao) + debuglf(elem, lit(" ~*a^"), c->pos, null_string, nao) #define LOG_MATCH(KIND, EXTENT) \ debuglf(elem, lit(KIND " matched, position ~a-~a (~a:~d)"), \ plus(c->pos, c->base), EXTENT, c->file, c->data_lineno, nao); \ debuglf(elem, lit(" ~a"), c->dataline, nao); \ if (c_num(EXTENT, lit("txr")) < 77) \ - debuglf(elem, lit(" ~*a~<*a^"), c->pos, lit(""), \ + debuglf(elem, lit(" ~*a~<*a^"), c->pos, null_string, \ minus(EXTENT, c->pos), lit("^"), nao) #define elem_bind(elem_var, directive_var, specline) \ @@ -2005,7 +2005,7 @@ static val do_txeval(val spec, val form, val bindings, val allow_unbound) uw_catch (exc_sym, exc) { val msg = if3(consp(exc), car(exc), exc); - if (stringp(msg) && !equal(msg, lit("")) && + if (stringp(msg) && !equal(msg, null_string) && chr_str(msg, zero) == chr('(')) { uw_throw (exc_sym, exc); -- cgit v1.2.3