mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-30 08:59:56 +02:00
commit bash-20130301 snapshot
This commit is contained in:
@@ -562,7 +562,11 @@ morecore (nu)
|
||||
/* Block all signals in case we are executed from a signal handler. */
|
||||
blocked_sigs = 0;
|
||||
#ifdef SHELL
|
||||
# if defined (SIGCHLD)
|
||||
if (interrupt_immediately || running_trap || signal_is_trapped (SIGINT) || signal_is_trapped (SIGCHLD))
|
||||
# else
|
||||
if (interrupt_immediately || running_trap || signal_is_trapped (SIGINT))
|
||||
# endif
|
||||
#endif
|
||||
{
|
||||
_malloc_block_signals (&set, &oset);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,12 @@
|
||||
Readline is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Readline is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Readline. If not, see <http://www.gnu.org/licenses/>.
|
||||
@@ -0,0 +1,12 @@
|
||||
History is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
History is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with History. If not, see <http://www.gnu.org/licenses/>.
|
||||
@@ -1718,16 +1718,18 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
|
||||
{
|
||||
open_some_spaces (col_lendiff);
|
||||
_rl_output_some_chars (nfd, bytes_to_insert);
|
||||
_rl_last_c_pos += _rl_col_width (nfd, 0, bytes_to_insert, 1);
|
||||
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
|
||||
_rl_last_c_pos += _rl_col_width (nfd, 0, bytes_to_insert, 1);
|
||||
else
|
||||
_rl_last_c_pos += bytes_to_insert;
|
||||
}
|
||||
else if ((MB_CUR_MAX == 1 || rl_byte_oriented != 0) && *ols == 0 && lendiff > 0)
|
||||
{
|
||||
/* At the end of a line the characters do not have to
|
||||
be "inserted". They can just be placed on the screen. */
|
||||
/* However, this screws up the rest of this block, which
|
||||
assumes you've done the insert because you can. */
|
||||
_rl_output_some_chars (nfd, lendiff);
|
||||
_rl_last_c_pos += col_lendiff;
|
||||
_rl_output_some_chars (nfd, temp);
|
||||
_rl_last_c_pos += col_temp;
|
||||
return;
|
||||
}
|
||||
else /* just write from first difference to end of new line */
|
||||
{
|
||||
@@ -2730,10 +2732,8 @@ _rl_col_width (str, start, end, flags)
|
||||
if (end <= start)
|
||||
return 0;
|
||||
if (MB_CUR_MAX == 1 || rl_byte_oriented)
|
||||
{
|
||||
_rl_ttymsg ("_rl_col_width: called with MB_CUR_MAX == 1");
|
||||
/* this can happen in some cases where it's inconvenient to check */
|
||||
return (end - start);
|
||||
}
|
||||
|
||||
memset (&ps, 0, sizeof (mbstate_t));
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,76 @@
|
||||
# This makefile for Readline library documentation is in -*- text -*- mode.
|
||||
# Emacs likes it that way.
|
||||
RM = rm -f
|
||||
|
||||
MAKEINFO = makeinfo
|
||||
TEXI2DVI = texi2dvi
|
||||
TEXI2HTML = texi2html
|
||||
QUIETPS = #set this to -q to shut up dvips
|
||||
DVIPS = dvips -D 300 $(QUIETPS) -o $@ # tricky
|
||||
|
||||
INSTALL_DATA = cp
|
||||
infodir = /usr/local/info
|
||||
|
||||
RLSRC = rlman.texinfo rluser.texinfo rltech.texinfo
|
||||
HISTSRC = hist.texinfo hsuser.texinfo hstech.texinfo
|
||||
|
||||
DVIOBJ = readline.dvi history.dvi
|
||||
INFOOBJ = readline.info history.info
|
||||
PSOBJ = readline.ps history.ps
|
||||
HTMLOBJ = readline.html history.html
|
||||
|
||||
all: info dvi html ps
|
||||
nodvi: info html
|
||||
|
||||
readline.dvi: $(RLSRC)
|
||||
$(TEXI2DVI) rlman.texinfo
|
||||
mv rlman.dvi readline.dvi
|
||||
|
||||
readline.info: $(RLSRC)
|
||||
$(MAKEINFO) --no-split -o $@ rlman.texinfo
|
||||
|
||||
history.dvi: ${HISTSRC}
|
||||
$(TEXI2DVI) hist.texinfo
|
||||
mv hist.dvi history.dvi
|
||||
|
||||
history.info: ${HISTSRC}
|
||||
$(MAKEINFO) --no-split -o $@ hist.texinfo
|
||||
|
||||
readline.ps: readline.dvi
|
||||
$(RM) $@
|
||||
$(DVIPS) readline.dvi
|
||||
|
||||
history.ps: history.dvi
|
||||
$(RM) $@
|
||||
$(DVIPS) history.dvi
|
||||
|
||||
readline.html: ${RLSRC}
|
||||
$(TEXI2HTML) rlman.texinfo
|
||||
sed -e 's:rlman.html:readline.html:' -e 's:rlman_toc.html:readline_toc.html:' rlman.html > readline.html
|
||||
sed -e 's:rlman.html:readline.html:' -e 's:rlman_toc.html:readline_toc.html:' rlman_toc.html > readline_toc.html
|
||||
$(RM) rlman.html rlman_toc.html
|
||||
|
||||
history.html: ${HISTSRC}
|
||||
$(TEXI2HTML) hist.texinfo
|
||||
sed -e 's:hist.html:history.html:' -e 's:hist_toc.html:history_toc.html:' hist.html > history.html
|
||||
sed -e 's:hist.html:history.html:' -e 's:hist_toc.html:history_toc.html:' hist_toc.html > history_toc.html
|
||||
$(RM) hist.html hist_toc.html
|
||||
|
||||
info: $(INFOOBJ)
|
||||
dvi: $(DVIOBJ)
|
||||
ps: $(PSOBJ)
|
||||
html: $(HTMLOBJ)
|
||||
|
||||
clean:
|
||||
$(RM) *.aux *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.cps *.pgs \
|
||||
*.fns *.kys *.tps *.vrs *.o core
|
||||
|
||||
distclean: clean
|
||||
mostlyclean: clean
|
||||
|
||||
maintainer-clean: clean
|
||||
$(RM) *.dvi *.info *.info-* *.ps *.html
|
||||
|
||||
install: info
|
||||
${INSTALL_DATA} readline.info $(infodir)/readline.info
|
||||
${INSTALL_DATA} history.info $(infodir)/history.info
|
||||
@@ -572,7 +572,9 @@ readline_internal_charloop ()
|
||||
#endif
|
||||
}
|
||||
|
||||
/* EOF typed to a non-blank line is a <NL>. */
|
||||
/* EOF typed to a non-blank line is a <NL>. If we want to change this,
|
||||
to force any existing line to be ignored when read(2) reads EOF,
|
||||
for example, this is the place to change. */
|
||||
if (c == EOF && rl_end)
|
||||
c = NEWLINE;
|
||||
|
||||
@@ -807,6 +809,7 @@ _rl_dispatch_subseq (key, map, got_subseq)
|
||||
{
|
||||
/* Special case rl_do_lowercase_version (). */
|
||||
if (func == rl_do_lowercase_version)
|
||||
/* Should we do anything special if key == ANYOTHERKEY? */
|
||||
return (_rl_dispatch (_rl_to_lower (key), map));
|
||||
|
||||
rl_executing_keymap = map;
|
||||
|
||||
+10
-2
@@ -155,9 +155,12 @@ sh_get_env_value (varname)
|
||||
char *
|
||||
sh_get_home_dir ()
|
||||
{
|
||||
char *home_dir;
|
||||
static char *home_dir = (char *)NULL;
|
||||
struct passwd *entry;
|
||||
|
||||
if (home_dir)
|
||||
return (home_dir);
|
||||
|
||||
home_dir = (char *)NULL;
|
||||
#if defined (HAVE_GETPWUID)
|
||||
# if defined (__TANDEM)
|
||||
@@ -166,8 +169,13 @@ sh_get_home_dir ()
|
||||
entry = getpwuid (getuid ());
|
||||
# endif
|
||||
if (entry)
|
||||
home_dir = entry->pw_dir;
|
||||
home_dir = savestring (entry->pw_dir);
|
||||
#endif
|
||||
|
||||
#if defined (HAVE_GETPWENT)
|
||||
endpwent (); /* some systems need this */
|
||||
#endif
|
||||
|
||||
return (home_dir);
|
||||
}
|
||||
|
||||
|
||||
+14
-3
@@ -55,15 +55,26 @@ get_env_value (varname)
|
||||
return ((char *)getenv (varname));
|
||||
}
|
||||
|
||||
/* If we're not using $HOME, assume that the passwd file information won't
|
||||
change while this shell instance is running. */
|
||||
char *
|
||||
get_home_dir ()
|
||||
{
|
||||
char *home_dir;
|
||||
static char *home_dir = (char *)NULL;
|
||||
struct passwd *entry;
|
||||
|
||||
home_dir = (char *)NULL;
|
||||
if (home_dir)
|
||||
return (home_dir);
|
||||
|
||||
#if defined (HAVE_GETPWUID)
|
||||
entry = getpwuid (getuid ());
|
||||
if (entry)
|
||||
home_dir = entry->pw_dir;
|
||||
home_dir = savestring (entry->pw_dir);
|
||||
#endif
|
||||
|
||||
#if defined (HAVE_GETPWENT)
|
||||
endpwent (); /* some systems need this */
|
||||
#endif
|
||||
|
||||
return (home_dir);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user