- execute_bashrc_file: execute whatever find_bashrc_file() returns
if bashrc_file is NULL
From a patch from Allison Karlitskaya <allison.karlitskaya@redhat.com>
+
+ 1/3/2024
+ --------
+print_cmd.c
+ - print_case_clauses: if we're printing a comsub for subsequent parsing,
+ don't add a newline before the first case clause, since it adds a
+ token after the `in' that will allow reserved words to be parsed.
+ Report from Oguz <oguzismailuysal@gmail.com>
+
+ 1/5
+ ---
+lib/readline/doc/rltech.texi,lib/readline/doc/readline.3
+ - Note that since quoted characters are possible, the line readline()
+ returns may contain embedded newlines.
+ From a report by Martin Buck <mb-tmp-tah.bet@gromit.dyndns.org>
+
+ 1/8
+ ---
+parse.y
+ - parse_compound_assignment,parse_string_to_word_list: if we call
+ reset_parser, directly or indirectly via yyerror, make sure to set
+ the pushed_strings member of the saved parser state to NULL, since
+ reset_parser already freed it and we don't want to try and restore
+ it in restore_parser_state.
+ From a report by Nathan Mills <the.true.nathan.mills@gmail.com>
GCOV_XCFLAGS = -fprofile-arcs -ftest-coverage
GCOV_XLDFLAGS = -fprofile-arcs -ftest-coverage
+# these need CC=clang
+LSAN_CC = clang
+LSAN_XCFLAGS = -fsanitize=leak -fno-common -fno-omit-frame-pointer -fno-optimize-sibling-calls
+LSAN_XLDFLAGS = -fsanitize=leak
+
INCLUDES = -I. @RL_INCLUDE@ -I$(srcdir) -I$(BASHINCDIR) -I$(LIBSRC) $(INTL_INC)
# Maybe add: -Wextra
valgrind:
${MAKE} ${MFLAGS} ADDON_CFLAGS='-DDISABLE_MALLOC_WRAPPERS' ADDON_LDFLAGS= .made
+lsan:
+ ${MAKE} ${MFLAGS} CC=${LSAN_CC} ADDON_CFLAGS='${LSAN_XCFLAGS}' ADDON_LDFLAGS='${LSAN_XLDFLAGS}' .made
+
# cheating
gcov:
${MAKE} ${MFLAGS} CFLAGS=-g ADDON_CFLAGS='${GCOV_XCFLAGS}' ADDON_LDFLAGS='${GCOV_XLDFLAGS}' .made
+
# have to make this separate because making tests depend on $(PROGRAM)
asan-tests: asan $(TESTS_SUPPORT)
@-test -d tests || mkdir tests
@( cd $(srcdir)/tests && \
BUILD_DIR=$(BUILD_DIR) PATH=$(BUILD_DIR)/tests:$$PATH THIS_SH=$(THIS_SH) $(SHELL) ${TESTSCRIPT} )
+# have to make this separate because making tests depend on $(PROGRAM)
+lsan-tests: lsan $(TESTS_SUPPORT)
+ @-test -d tests || mkdir tests
+ @cp $(TESTS_SUPPORT) tests
+ @( cd $(srcdir)/tests && \
+ BUILD_DIR=$(BUILD_DIR) PATH=$(BUILD_DIR)/tests:$$PATH THIS_SH=$(THIS_SH) $(SHELL) ${TESTSCRIPT} )
+
profiling-tests: ${PROGRAM}
@test "X$$PROFILE_FLAGS" == "X" && { echo "profiling-tests: must be built with profiling enabled" >&2; exit 1; }
@${MAKE} ${MFLAGS} tests TESTSCRIPT=run-gprof
.\" Case Western Reserve University
.\" chet.ramey@case.edu
.\"
-.\" Last Change: Thu Dec 21 09:29:52 EST 2023
+.\" Last Change: Fri Jan 5 11:02:00 EST 2024
.\"
-.TH READLINE 3 "2023 December 21" "GNU Readline 8.3"
+.TH READLINE 3 "2024 January 5" "GNU Readline 8.3"
.\"
.\" File Name macro. This used to be `.PN', for Path Name,
.\" but Sun doesn't seem to like that very much.
\fBreadline\fP (\fIconst char *prompt\fP);
.fi
.SH COPYRIGHT
-.if n Readline is Copyright (C) 1989\-2023 Free Software Foundation, Inc.
-.if t Readline is Copyright \(co 1989\-2023 Free Software Foundation, Inc.
+.if n Readline is Copyright (C) 1989\-2024 Free Software Foundation, Inc.
+.if t Readline is Copyright \(co 1989\-2024 Free Software Foundation, Inc.
.SH DESCRIPTION
.LP
.B readline
the caller must free it when finished. The line returned
has the final newline removed, so only the text of the line
remains.
+Since it's possible to enter characters into the line while quoting
+them to disable any \fBreadline\fP editing function they might normally have,
+this line may include embedded newlines and other special characters.
.LP
.B readline
offers editing capabilities while the user is entering the
The function @code{readline()} prints a prompt @var{prompt}
and then reads and returns a single line of text from the user.
+Since it's possible to enter characters into the line while quoting
+them to disable any Readline editing function they might normally have,
+this line may include embedded newlines and other special characters.
If @var{prompt} is @code{NULL} or the empty string, no prompt is displayed.
The line @code{readline} returns is allocated with @code{malloc()};
the caller should @code{free()} the line when it has finished with it.
@ignore
-Copyright (C) 1988-2023 Free Software Foundation, Inc.
+Copyright (C) 1988-2024 Free Software Foundation, Inc.
@end ignore
@set EDITION 8.3
@set VERSION 8.3
-@set UPDATED 14 December 2023
-@set UPDATED-MONTH December 2023
+@set UPDATED 5 January 2024
+@set UPDATED-MONTH January 2024
-@set LASTCHANGE Thu Dec 14 15:45:46 EST 2023
+@set LASTCHANGE Fri Jan 5 11:01:44 EST 2024
orig_current_token = current_token;
current_token = tok;
yyerror (NULL); /* does the right thing */
+ ps.pushed_strings = NULL; /* freed by reset_parser */
current_token = orig_current_token;
if (wl)
dispose_words (wl);
current_token = tok; /* for error reporting */
if (tok == yacc_EOF) /* ( */
parser_error (orig_line_number, _("unexpected EOF while looking for matching `)'"));
+ /* XXX - reset_parser here, even at EOF? */
else
- yyerror(NULL); /* does the right thing */
+ {
+ yyerror(NULL); /* does the right thing */
+ ps.pushed_strings = NULL; /* freed by reset_parser */
+ }
if (wl)
dispose_words (wl);
wl = &parse_string_error;
# liushuyu <liushuyu011@gmail.com>, 2016.
# Mingye Wang <arthur200126@gmail.com>, 2015, 2016.
# Boyuan Yang <073plan@gmail.com>, 2018, 2019, 2020.
-# Wenbin Lv <wenbin816@gmail.com>, 2021, 2022.
+# Wenbin Lv <wenbin816@gmail.com>, 2021, 2022, 2024.
#
# 本翻译目前采用的格式约定,和其他注意事项:
#
"Project-Id-Version: bash 5.2-rc1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-01-11 14:50-0500\n"
-"PO-Revision-Date: 2022-06-18 14:25+0800\n"
+"PO-Revision-Date: 2024-01-09 22:43+0800\n"
"Last-Translator: Wenbin Lv <wenbin816@gmail.com>\n"
"Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n"
"Language: zh_CN\n"
" \n"
" 不带有 <表达式> 时,返回 \"$line $filename\"。带有 <表达式> 时,\n"
" 返回 \"$line $subroutine $filename\";这个额外的信息可以用来提供\n"
-" æ \88è·\9f踪 (stack trace)。\n"
+" æ \88追踪 (stack trace)。\n"
" \n"
" <表达式> 的值表示从当前调用帧需要回去多少个调用帧;栈顶帧是第 0 帧。"
#: siglist.c:67
msgid "BPT trace/trap"
-msgstr "æ\96ç\82¹è·\9f踪或陷阱"
+msgstr "æ\96ç\82¹è¿½踪或陷阱"
#: siglist.c:75
msgid "ABORT instruction"
#: variables.c:6405
#, c-format
msgid "%s: %s: invalid value for trace file descriptor"
-msgstr "%s: %s: è·\9f踪文件描述符的值无效"
+msgstr "%s: %s: 追踪文件描述符的值无效"
#: variables.c:6450
#, c-format
" \n"
" 不带有 <表达式> 时,返回 \"$line $filename\"。带有 <表达式> 时,\n"
" 返回 \"$line $subroutine $filename\";这个额外的信息可以用来提供\n"
-" æ \88è·\9f踪 (stack trace)。\n"
+" æ \88追踪 (stack trace)。\n"
" \n"
" <表达式> 的值表示从当前调用帧需要回去多少个调用帧;栈顶帧是第 0 帧。\n"
" \n"
" -l\t将 <名称> 的值在赋值时转换为小写\n"
" -n\t使 <名称> 成为一个对以它的值为名称的变量的引用\n"
" -r\t将 <名称> 变为只读\n"
-" -t\t使 <å\90\8dç§°> 带æ\9c\89 \"è·\9f踪\" (trace) 属性\n"
+" -t\t使 <å\90\8dç§°> 带æ\9c\89 \"追踪\" (trace) 属性\n"
" -u\t使 <名称> 的值在赋值时转换为大写\n"
" -x\t将 <名称> 导出\n"
" \n"
" -s\t仅打印 Posix \"特殊\" 内建的名称\n"
" \n"
" 控制动态加载的选项:\n"
-" -f\t从共享对象 <文件名> 中加载 <名称> 内建\n"
+" -f\t从共享目标 <文件名> 中加载 <名称> 内建\n"
" -d\t删除以 -f 选项加载的内建\n"
" \n"
" 不带选项时,启用每一个 <名称>。\n"
static void
print_case_clauses (PATTERN_LIST *clauses)
{
+ int first = 1;
+
indentation += indentation_amount;
while (clauses)
{
- newline ("");
+ /* If we're printing a comsub, the result will be reparsed later, so
+ we don't want to insert a newline after the `in': that could cause
+ the parser to parse a reserved word in error, since the newline
+ inserts a token after the `in'. */
+ if (printing_comsub == 0 || first == 0)
+ newline ("");
+ first = 0;
command_print_word_list (clauses->patterns, " | ");
cprintf (")\n");
indentation += indentation_amount;