From 00ceb34960f3ff4af436e189d61817c54dc15410 Mon Sep 17 00:00:00 2001 From: Masatake YAMATO Date: Sun, 14 May 2023 06:36:09 +0900 Subject: [PATCH] readtags: fix a bug compiling a formatter wrongly if giving --formater long option Signed-off-by: Masatake YAMATO --- Tmain/readtags-formatter.d/run.sh | 2 +- extra-cmds/readtags-cmd.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Tmain/readtags-formatter.d/run.sh b/Tmain/readtags-formatter.d/run.sh index e726b4c7b7..d0da980024 100644 --- a/Tmain/readtags-formatter.d/run.sh +++ b/Tmain/readtags-formatter.d/run.sh @@ -23,7 +23,7 @@ if ! ( "${READTAGS}" -h | grep -q -e -F ); then fi echo '# FQ' && - ${V} ${READTAGS} -t output.tags -Q '(eq? $kind "function")' -F '(list $name #t)' -l && + ${V} ${READTAGS} -t output.tags -Q '(eq? $kind "function")' --formatter '(list $name #t)' -l && echo '# F' && ${V} ${READTAGS} -t output.tags -F '(if (eq? $kind "function") (list $name #t) #f)' -l && echo '# F declarations' && diff --git a/extra-cmds/readtags-cmd.c b/extra-cmds/readtags-cmd.c index 641a6600ab..e2284e8cc3 100644 --- a/extra-cmds/readtags-cmd.c +++ b/extra-cmds/readtags-cmd.c @@ -826,9 +826,9 @@ extern int main (int argc, char **argv) else if (strcmp (optname, "formatter") == 0) { if (i + 1 < argc) - Sorter = compileExpression (argv[++i], - (void * (*)(EsObject *))f_compile, - optname); + Formatter = compileExpression (argv[++i], + (void * (*)(EsObject *))f_compile, + optname); else { fprintf (stderr, "%s: missing formatter expression for --%s option\n",