mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-16 16:36:03 +02:00
commit bash-20120601 snapshot
This commit is contained in:
@@ -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
|
||||
+31
-2
@@ -1296,11 +1296,19 @@ rl_vi_delete_to (count, key)
|
||||
_rl_vimvcxt->motion = '$';
|
||||
r = rl_domove_motion_callback (_rl_vimvcxt);
|
||||
}
|
||||
else if (vi_redoing)
|
||||
else if (vi_redoing && _rl_vi_last_motion != 'd') /* `dd' is special */
|
||||
{
|
||||
_rl_vimvcxt->motion = _rl_vi_last_motion;
|
||||
r = rl_domove_motion_callback (_rl_vimvcxt);
|
||||
}
|
||||
else if (vi_redoing) /* handle redoing `dd' here */
|
||||
{
|
||||
_rl_vimvcxt->motion = _rl_vi_last_motion;
|
||||
rl_mark = rl_end;
|
||||
rl_beg_of_line (1, key);
|
||||
RL_UNSETSTATE (RL_STATE_VIMOTION);
|
||||
r = vidomove_dispatch (_rl_vimvcxt);
|
||||
}
|
||||
#if defined (READLINE_CALLBACKS)
|
||||
else if (RL_ISSTATE (RL_STATE_CALLBACK))
|
||||
{
|
||||
@@ -1378,11 +1386,19 @@ rl_vi_change_to (count, key)
|
||||
_rl_vimvcxt->motion = '$';
|
||||
r = rl_domove_motion_callback (_rl_vimvcxt);
|
||||
}
|
||||
else if (vi_redoing)
|
||||
else if (vi_redoing && _rl_vi_last_motion != 'c') /* `cc' is special */
|
||||
{
|
||||
_rl_vimvcxt->motion = _rl_vi_last_motion;
|
||||
r = rl_domove_motion_callback (_rl_vimvcxt);
|
||||
}
|
||||
else if (vi_redoing) /* handle redoing `cc' here */
|
||||
{
|
||||
_rl_vimvcxt->motion = _rl_vi_last_motion;
|
||||
rl_mark = rl_end;
|
||||
rl_beg_of_line (1, key);
|
||||
RL_UNSETSTATE (RL_STATE_VIMOTION);
|
||||
r = vidomove_dispatch (_rl_vimvcxt);
|
||||
}
|
||||
#if defined (READLINE_CALLBACKS)
|
||||
else if (RL_ISSTATE (RL_STATE_CALLBACK))
|
||||
{
|
||||
@@ -1439,6 +1455,19 @@ rl_vi_yank_to (count, key)
|
||||
_rl_vimvcxt->motion = '$';
|
||||
r = rl_domove_motion_callback (_rl_vimvcxt);
|
||||
}
|
||||
else if (vi_redoing && _rl_vi_last_motion != 'y') /* `yy' is special */
|
||||
{
|
||||
_rl_vimvcxt->motion = _rl_vi_last_motion;
|
||||
r = rl_domove_motion_callback (_rl_vimvcxt);
|
||||
}
|
||||
else if (vi_redoing) /* handle redoing `yy' here */
|
||||
{
|
||||
_rl_vimvcxt->motion = _rl_vi_last_motion;
|
||||
rl_mark = rl_end;
|
||||
rl_beg_of_line (1, key);
|
||||
RL_UNSETSTATE (RL_STATE_VIMOTION);
|
||||
r = vidomove_dispatch (_rl_vimvcxt);
|
||||
}
|
||||
#if defined (READLINE_CALLBACKS)
|
||||
else if (RL_ISSTATE (RL_STATE_CALLBACK))
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+296
@@ -0,0 +1,296 @@
|
||||
*** savedir/strftime.c.save1 2011-01-16 15:23:14.000000000 -0500
|
||||
--- strftime.c 2012-04-20 10:16:28.000000000 -0400
|
||||
***************
|
||||
*** 39,42 ****
|
||||
--- 39,43 ----
|
||||
* Updated December, 2001
|
||||
* Updated January, 2011
|
||||
+ * Updated April, 2012
|
||||
*
|
||||
* Fixes from ado@elsie.nci.nih.gov,
|
||||
***************
|
||||
*** 76,79 ****
|
||||
--- 77,81 ----
|
||||
#define HPUX_EXT 1 /* non-conflicting stuff in HP-UX date */
|
||||
#define POSIX_SEMANTICS 1 /* call tzset() if TZ changes */
|
||||
+ #define POSIX_2008 1 /* flag and fw for C, F, G, Y formats */
|
||||
|
||||
#undef strchr /* avoid AIX weirdness */
|
||||
***************
|
||||
*** 97,101 ****
|
||||
#define range(low, item, hi) max(low, min(item, hi))
|
||||
|
||||
! #if !defined(OS2) && !defined(MSDOS) && defined(HAVE_TZNAME)
|
||||
extern char *tzname[2];
|
||||
extern int daylight;
|
||||
--- 99,104 ----
|
||||
#define range(low, item, hi) max(low, min(item, hi))
|
||||
|
||||
! /* Whew! This stuff is a mess. */
|
||||
! #if !defined(OS2) && !defined(MSDOS) && !defined(__CYGWIN__) && defined(HAVE_TZNAME)
|
||||
extern char *tzname[2];
|
||||
extern int daylight;
|
||||
***************
|
||||
*** 103,121 ****
|
||||
extern long int timezone, altzone;
|
||||
#else
|
||||
! # if defined (HPUX)
|
||||
extern long int timezone;
|
||||
# else
|
||||
extern int timezone, altzone;
|
||||
! # endif /* !HPUX */
|
||||
! #endif /* !SOLARIS && !mips && !M_UNIX */
|
||||
#endif
|
||||
|
||||
#undef min /* just in case */
|
||||
|
||||
- /* format for %+ -- currently unused */
|
||||
- #ifndef NATIONAL_FORMAT
|
||||
- #define NATIONAL_FORMAT "%a %b %e %H:%M:%S %Z %Y"
|
||||
- #endif
|
||||
-
|
||||
/* min --- return minimum of two numbers */
|
||||
|
||||
--- 106,121 ----
|
||||
extern long int timezone, altzone;
|
||||
#else
|
||||
! # if defined (HPUX) || defined(__hpux)
|
||||
extern long int timezone;
|
||||
# else
|
||||
+ # if !defined(__CYGWIN__)
|
||||
extern int timezone, altzone;
|
||||
! # endif
|
||||
! # endif
|
||||
! #endif
|
||||
#endif
|
||||
|
||||
#undef min /* just in case */
|
||||
|
||||
/* min --- return minimum of two numbers */
|
||||
|
||||
***************
|
||||
*** 136,139 ****
|
||||
--- 136,167 ----
|
||||
}
|
||||
|
||||
+ #ifdef POSIX_2008
|
||||
+ /* iso_8601_2000_year --- format a year per ISO 8601:2000 as in 1003.1 */
|
||||
+
|
||||
+ static void
|
||||
+ iso_8601_2000_year(char *buf, int year, size_t fw)
|
||||
+ {
|
||||
+ int extra;
|
||||
+ char sign = '\0';
|
||||
+
|
||||
+ if (year >= -9999 && year <= 9999) {
|
||||
+ sprintf(buf, "%0*d", fw, year);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ /* now things get weird */
|
||||
+ if (year > 9999) {
|
||||
+ sign = '+';
|
||||
+ } else {
|
||||
+ sign = '-';
|
||||
+ year = -year;
|
||||
+ }
|
||||
+
|
||||
+ extra = year / 10000;
|
||||
+ year %= 10000;
|
||||
+ sprintf(buf, "%c_%04d_%d", sign, extra, year);
|
||||
+ }
|
||||
+ #endif /* POSIX_2008 */
|
||||
+
|
||||
/* strftime --- produce formatted time */
|
||||
|
||||
***************
|
||||
*** 156,165 ****
|
||||
--- 184,200 ----
|
||||
#ifndef HAVE_TM_NAME
|
||||
#ifndef HAVE_TZNAME
|
||||
+ #ifndef __CYGWIN__
|
||||
extern char *timezone();
|
||||
struct timeval tv;
|
||||
struct timezone zone;
|
||||
+ #endif /* __CYGWIN__ */
|
||||
#endif /* HAVE_TZNAME */
|
||||
#endif /* HAVE_TM_NAME */
|
||||
#endif /* HAVE_TM_ZONE */
|
||||
+ #ifdef POSIX_2008
|
||||
+ int pad;
|
||||
+ size_t fw;
|
||||
+ char flag;
|
||||
+ #endif /* POSIX_2008 */
|
||||
|
||||
/* various tables, useful in North America */
|
||||
***************
|
||||
*** 235,238 ****
|
||||
--- 270,307 ----
|
||||
continue;
|
||||
}
|
||||
+ #ifdef POSIX_2008
|
||||
+ pad = '\0';
|
||||
+ fw = 0;
|
||||
+ flag = '\0';
|
||||
+ switch (*++format) {
|
||||
+ case '+':
|
||||
+ flag = '+';
|
||||
+ /* fall through */
|
||||
+ case '0':
|
||||
+ pad = '0';
|
||||
+ format++;
|
||||
+ break;
|
||||
+
|
||||
+ case '1':
|
||||
+ case '2':
|
||||
+ case '3':
|
||||
+ case '4':
|
||||
+ case '5':
|
||||
+ case '6':
|
||||
+ case '7':
|
||||
+ case '8':
|
||||
+ case '9':
|
||||
+ break;
|
||||
+
|
||||
+ default:
|
||||
+ format--;
|
||||
+ goto again;
|
||||
+ }
|
||||
+ for (; isdigit(*format); format++) {
|
||||
+ fw = fw * 10 + (*format - '0');
|
||||
+ }
|
||||
+ format--;
|
||||
+ #endif /* POSIX_2008 */
|
||||
+
|
||||
again:
|
||||
switch (*++format) {
|
||||
***************
|
||||
*** 286,291 ****
|
||||
|
||||
case 'C':
|
||||
century:
|
||||
! sprintf(tbuf, "%02ld", (timeptr->tm_year + 1900L) / 100);
|
||||
break;
|
||||
|
||||
--- 355,371 ----
|
||||
|
||||
case 'C':
|
||||
+ #ifdef POSIX_2008
|
||||
+ if (pad != '\0' && fw > 0) {
|
||||
+ size_t min_fw = (flag ? 3 : 2);
|
||||
+
|
||||
+ fw = max(fw, min_fw);
|
||||
+ sprintf(tbuf, flag
|
||||
+ ? "%+0*ld"
|
||||
+ : "%0*ld", fw,
|
||||
+ (timeptr->tm_year + 1900L) / 100);
|
||||
+ } else
|
||||
+ #endif /* POSIX_2008 */
|
||||
century:
|
||||
! sprintf(tbuf, "%02ld", (timeptr->tm_year + 1900L) / 100);
|
||||
break;
|
||||
|
||||
***************
|
||||
*** 308,312 ****
|
||||
--- 388,415 ----
|
||||
|
||||
case 'F': /* ISO 8601 date representation */
|
||||
+ {
|
||||
+ #ifdef POSIX_2008
|
||||
+ /*
|
||||
+ * Field width for %F is for the whole thing.
|
||||
+ * It must be at least 10.
|
||||
+ */
|
||||
+ char m_d[10];
|
||||
+ strftime(m_d, sizeof m_d, "-%m-%d", timeptr);
|
||||
+ size_t min_fw = 10;
|
||||
+
|
||||
+ if (pad != '\0' && fw > 0) {
|
||||
+ fw = max(fw, min_fw);
|
||||
+ } else {
|
||||
+ fw = min_fw;
|
||||
+ }
|
||||
+
|
||||
+ fw -= 6; /* -XX-XX at end are invariant */
|
||||
+
|
||||
+ iso_8601_2000_year(tbuf, timeptr->tm_year + 1900, fw);
|
||||
+ strcat(tbuf, m_d);
|
||||
+ #else
|
||||
strftime(tbuf, sizeof tbuf, "%Y-%m-%d", timeptr);
|
||||
+ #endif /* POSIX_2008 */
|
||||
+ }
|
||||
break;
|
||||
|
||||
***************
|
||||
*** 330,335 ****
|
||||
y = 1900L + timeptr->tm_year;
|
||||
|
||||
! if (*format == 'G')
|
||||
! sprintf(tbuf, "%ld", y);
|
||||
else
|
||||
sprintf(tbuf, "%02ld", y % 100);
|
||||
--- 433,450 ----
|
||||
y = 1900L + timeptr->tm_year;
|
||||
|
||||
! if (*format == 'G') {
|
||||
! #ifdef POSIX_2008
|
||||
! if (pad != '\0' && fw > 0) {
|
||||
! size_t min_fw = 4;
|
||||
!
|
||||
! fw = max(fw, min_fw);
|
||||
! sprintf(tbuf, flag
|
||||
! ? "%+0*ld"
|
||||
! : "%0*ld", fw,
|
||||
! y);
|
||||
! } else
|
||||
! #endif /* POSIX_2008 */
|
||||
! sprintf(tbuf, "%ld", y);
|
||||
! }
|
||||
else
|
||||
sprintf(tbuf, "%02ld", y % 100);
|
||||
***************
|
||||
*** 456,460 ****
|
||||
|
||||
case 'Y': /* year with century */
|
||||
! fullyear:
|
||||
sprintf(tbuf, "%ld", 1900L + timeptr->tm_year);
|
||||
break;
|
||||
--- 571,585 ----
|
||||
|
||||
case 'Y': /* year with century */
|
||||
! #ifdef POSIX_2008
|
||||
! if (pad != '\0' && fw > 0) {
|
||||
! size_t min_fw = 4;
|
||||
!
|
||||
! fw = max(fw, min_fw);
|
||||
! sprintf(tbuf, flag
|
||||
! ? "%+0*ld"
|
||||
! : "%0*ld", fw,
|
||||
! 1900L + timeptr->tm_year);
|
||||
! } else
|
||||
! #endif /* POSIX_2008 */
|
||||
sprintf(tbuf, "%ld", 1900L + timeptr->tm_year);
|
||||
break;
|
||||
***************
|
||||
*** 497,506 ****
|
||||
* secs west of GMT. Convert to mins east of GMT.
|
||||
*/
|
||||
! # ifdef HPUX
|
||||
off = -timezone / 60;
|
||||
# else
|
||||
/* ADR: 4 August 2001, fixed this per gazelle@interaccess.com */
|
||||
off = -(daylight ? altzone : timezone) / 60;
|
||||
! # endif /* !HPUX */
|
||||
#else /* !HAVE_TZNAME */
|
||||
gettimeofday(& tv, & zone);
|
||||
--- 622,631 ----
|
||||
* secs west of GMT. Convert to mins east of GMT.
|
||||
*/
|
||||
! # if defined(__hpux) || defined (HPUX) || defined(__CYGWIN__)
|
||||
off = -timezone / 60;
|
||||
# else
|
||||
/* ADR: 4 August 2001, fixed this per gazelle@interaccess.com */
|
||||
off = -(daylight ? altzone : timezone) / 60;
|
||||
! # endif
|
||||
#else /* !HAVE_TZNAME */
|
||||
gettimeofday(& tv, & zone);
|
||||
Reference in New Issue
Block a user