• R/O
  • SSH
  • HTTPS

yash: Commit


Commit MetaInfo

Revision4165 (tree)
Time2021-04-14 00:52:38
Authormagicant

Log Message

Amend parameter name in parse_cmdsubst_in_backquote

The parameter is about backslash-escaped double-quotes, not backquotes.
This commit fixes the parameter name and the doc comment.

Change Summary

Incremental Difference

--- yash/trunk/parser.c (revision 4164)
+++ yash/trunk/parser.c (revision 4165)
@@ -1,6 +1,6 @@
11 /* Yash: yet another shell */
22 /* parser.c: syntax parser */
3-/* (C) 2007-2020 magicant */
3+/* (C) 2007-2021 magicant */
44
55 /* This program is free software: you can redistribute it and/or modify
66 * it under the terms of the GNU General Public License as published by
@@ -603,7 +603,7 @@
603603 __attribute__((nonnull,warn_unused_result));
604604 static wchar_t *extract_command_in_paren_unparsed(parsestate_T *ps)
605605 __attribute__((nonnull,malloc,warn_unused_result));
606-static wordunit_T *parse_cmdsubst_in_backquote(parsestate_T *ps, bool bsbq)
606+static wordunit_T *parse_cmdsubst_in_backquote(parsestate_T *ps, bool bsdq)
607607 __attribute__((nonnull,malloc,warn_unused_result));
608608 static wordunit_T *tryparse_arith(parsestate_T *ps)
609609 __attribute__((nonnull,malloc,warn_unused_result));
@@ -1590,9 +1590,9 @@
15901590 * When this function is called, the current position must be at the character
15911591 * that just follows the opening backquote L'`'. This function advances the
15921592 * position to the character that just follows the closing backquote L'`'.
1593- * If `bsbq' is true, backslash-escaped backquotes are handled; otherwise, they
1594- * are left intact. */
1595-wordunit_T *parse_cmdsubst_in_backquote(parsestate_T *ps, bool bsbq)
1593+ * If `bsdq' is true, backslash-escaped double-quotes are unquoted; otherwise,
1594+ * they are left intact. */
1595+wordunit_T *parse_cmdsubst_in_backquote(parsestate_T *ps, bool bsdq)
15961596 {
15971597 assert(ps->src.contents[ps->index - 1] == L'`');
15981598
@@ -1614,7 +1614,7 @@
16141614 case L'$': case L'`': case L'\\':
16151615 goto default_;
16161616 case L'"':
1617- if (bsbq)
1617+ if (bsdq)
16181618 goto default_;
16191619 /* falls thru! */
16201620 default:
Show on old repository browser