diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-02-05 14:25:59 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-02-05 14:25:59 -0800 |
commit | 03be4ba79f2fa68d966c81be4f32b36f9fe09813 (patch) | |
tree | 1532b50183d934167344604358b7583448f2043b /match.c | |
parent | 1be4447a30aa5787b99ce2dec5c6977322aefebe (diff) | |
download | txr-03be4ba79f2fa68d966c81be4f32b36f9fe09813.tar.gz txr-03be4ba79f2fa68d966c81be4f32b36f9fe09813.tar.bz2 txr-03be4ba79f2fa68d966c81be4f32b36f9fe09813.zip |
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.
Diffstat (limited to 'match.c')
-rw-r--r-- | match.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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); |