Vendor import of tcsh-6.22.04
This commit is contained in:
parent
1b174d6cdf
commit
174d8b6032
1
Fixes
1
Fixes
@ -1,3 +1,4 @@
|
||||
15. V6.22.04 - 20210426
|
||||
14. Don't crash with 'bindkey "^0" clear-screen' (Karl Jeacle)
|
||||
13. Fix $x:q:h and $x:q:t return the whole string for strings not containing /
|
||||
12. V6.22.03 - 20201118
|
||||
|
@ -8,7 +8,7 @@ dnl
|
||||
dnl Written by Kaveh Ghazi (ghazi@caip.rutgers.edu) 5/11/96.
|
||||
|
||||
AC_PREREQ([2.59])dnl Minimum Autoconf version required.
|
||||
AC_INIT([tcsh], [6.22.03], [https://bugs.astron.com/])
|
||||
AC_INIT([tcsh], [6.22.04], [https://bugs.astron.com/])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AC_CONFIG_SRCDIR([tc.vers.c])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
|
@ -269,7 +269,7 @@ c_preword(Char *p, Char *low, int n, Char *delim)
|
||||
new = c_endword(prev-1, p, 1, delim); /* Skip to next non-word char */
|
||||
new++; /* Step away from end of word */
|
||||
while (new <= p) { /* Skip trailing non-word chars */
|
||||
if (!Strchr(delim, *new) || new > prev && new[-1] == (Char)'\\')
|
||||
if (!Strchr(delim, *new) || (new > prev && new[-1] == (Char)'\\'))
|
||||
break;
|
||||
new++;
|
||||
}
|
||||
|
8
ed.h
8
ed.h
@ -247,8 +247,12 @@ extern int tgetflag (const char *);
|
||||
extern int tgetnum (const char *);
|
||||
extern char *tgoto (const char *, int, int);
|
||||
extern void tputs (const char *, int, void (*)(int));
|
||||
# define PUTPURE ((void (*)(int)) putpure)
|
||||
# define PUTRAW ((void (*)(int)) putraw)
|
||||
static __inline void PUTPURE(int c) {
|
||||
(void)putpure(c);
|
||||
}
|
||||
static __inline void PUTRAW(int c) {
|
||||
(void)putraw(c);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _h_ed */
|
||||
|
@ -7,7 +7,7 @@
|
||||
#define ORIGIN "Astron"
|
||||
#define REV 6
|
||||
#define VERS 22
|
||||
#define PATCHLEVEL 03
|
||||
#define DATE "2020-11-18"
|
||||
#define PATCHLEVEL 04
|
||||
#define DATE "2021-04-26"
|
||||
|
||||
#endif /* _h_patchlevel */
|
||||
|
@ -37,7 +37,7 @@
|
||||
*/
|
||||
extern Char *gethdir (const Char *);
|
||||
extern void dosource (Char **, struct command *);
|
||||
extern void exitstat (void);
|
||||
extern void exitstat (void) __attribute__((__noreturn__));
|
||||
extern void goodbye (Char **, struct command *);
|
||||
extern void importpath (Char *);
|
||||
extern void initdesc (void);
|
||||
|
2
sh.dol.c
2
sh.dol.c
@ -781,7 +781,7 @@ fixDolMod(void)
|
||||
}
|
||||
|
||||
static int
|
||||
all_dolmcnts_are_0()
|
||||
all_dolmcnts_are_0(void)
|
||||
{
|
||||
int i = 0;
|
||||
for (; i < ndolflags; ++i) {
|
||||
|
34
sh.hist.c
34
sh.hist.c
@ -205,25 +205,35 @@ addWordToHash(struct hashValue *h, const Char *word)
|
||||
{
|
||||
uint32_t a = h->a, b = h->b, c = h->c;
|
||||
#ifdef SHORT_STRINGS
|
||||
#define GETK if ((k = (uChar)*word++) == 0) break
|
||||
#ifdef WIDE_STRINGS
|
||||
assert(sizeof(Char) >= 4);
|
||||
while (1) {
|
||||
unsigned k;
|
||||
if ((k = (uChar)*word++) == 0) break; a += k;
|
||||
if ((k = (uChar)*word++) == 0) break; b += k;
|
||||
if ((k = (uChar)*word++) == 0) break; c += k;
|
||||
GETK;
|
||||
a += k;
|
||||
GETK;
|
||||
b += k;
|
||||
GETK;
|
||||
c += k;
|
||||
mix(a, b, c);
|
||||
}
|
||||
#else
|
||||
assert(sizeof(Char) == 2);
|
||||
while (1) {
|
||||
unsigned k;
|
||||
if ((k = (uChar)*word++) == 0) break; a += k;
|
||||
if ((k = (uChar)*word++) == 0) break; a += k << 16;
|
||||
if ((k = (uChar)*word++) == 0) break; b += k;
|
||||
if ((k = (uChar)*word++) == 0) break; b += k << 16;
|
||||
if ((k = (uChar)*word++) == 0) break; c += k;
|
||||
if ((k = (uChar)*word++) == 0) break; c += k << 16;
|
||||
GETK;
|
||||
a += k;
|
||||
GETK;
|
||||
a += k << 16;
|
||||
GETK;
|
||||
b += k;
|
||||
GETK;
|
||||
b += k << 16;
|
||||
GETK;
|
||||
c += k;
|
||||
GETK;
|
||||
c += k << 16;
|
||||
mix(a, b, c);
|
||||
}
|
||||
#endif
|
||||
@ -1216,18 +1226,20 @@ dotlock_cleanup(void* lockpath)
|
||||
|
||||
/* Save history before exiting the shell. */
|
||||
void
|
||||
rechist(Char *fname, int ref)
|
||||
rechist(Char *xfname, int ref)
|
||||
{
|
||||
Char *snum, *rs;
|
||||
int fp, ftmp, oldidfds, ophup_disabled;
|
||||
struct varent *shist;
|
||||
char path[MAXPATHLEN];
|
||||
struct stat st;
|
||||
static Char *fname;
|
||||
static Char *dumphist[] = {STRhistory, STRmhT, 0, 0};
|
||||
|
||||
if (fname == NULL && !ref)
|
||||
return;
|
||||
|
||||
fname = xfname;
|
||||
ophup_disabled = phup_disabled;
|
||||
phup_disabled = 1;
|
||||
|
||||
@ -1331,7 +1343,7 @@ rechist(Char *fname, int ref)
|
||||
#ifndef WINNT_NATIVE
|
||||
(void)rename(path, short2str(fname));
|
||||
#else
|
||||
(void)ReplaceFile( short2str(fname),path,NULL,0,NULL,NULL);
|
||||
(void)ReplaceFile(short2str(fname), path, NULL, 0, NULL, NULL);
|
||||
#endif
|
||||
cleanup_until(fname);
|
||||
phup_disabled = ophup_disabled;
|
||||
|
4
sh.lex.c
4
sh.lex.c
@ -994,7 +994,7 @@ subword(Char *cp, Char type, int *adid, size_t *start_pos)
|
||||
case '\\':
|
||||
if (np[1] == '&')
|
||||
np++;
|
||||
/* fall into ... */
|
||||
/* FALLTHROUGH */
|
||||
|
||||
default:
|
||||
Strbuf_append1(&wbuf, *np);
|
||||
@ -1205,7 +1205,7 @@ gethent(Char sc)
|
||||
case '-':
|
||||
back = 1;
|
||||
c = getC(0);
|
||||
/* FALLSTHROUGH */
|
||||
/* FALLTHROUGH */
|
||||
|
||||
default:
|
||||
if (any("(=~", c)) {
|
||||
|
@ -620,6 +620,7 @@ again:
|
||||
savep:
|
||||
if (!specp)
|
||||
continue;
|
||||
/* FALLTHROUGH */
|
||||
default:
|
||||
if (l != 0 && !specp)
|
||||
continue;
|
||||
|
4
tcsh.man
4
tcsh.man
@ -77,7 +77,7 @@
|
||||
.\" used here if you can. In particular, please don't use nroff commands
|
||||
.\" which aren't already used herein.
|
||||
.\"
|
||||
.TH TCSH 1 "11 Nov 2020" "Astron 6.22.03"
|
||||
.TH TCSH 1 "26 Apr 2021" "Astron 6.22.04"
|
||||
.SH NAME
|
||||
tcsh \- C shell with file name completion and command line editing
|
||||
.SH SYNOPSIS
|
||||
@ -5355,7 +5355,7 @@ pipe(2), setrlimit(2), sigvec(2), stat(2), umask(2), vfork(2), wait(2),
|
||||
malloc(3), setlocale(3), tty(4), a.out(5), termcap(5), environ(7),
|
||||
termio(7), Introduction to the C Shell
|
||||
.SH VERSION
|
||||
This manual documents tcsh 6.22.03 (Astron) 2020-11-18.
|
||||
This manual documents tcsh 6.22.04 (Astron) 2021-04-26.
|
||||
.SH AUTHORS
|
||||
.PD 0
|
||||
.TP 2
|
||||
|
@ -252,11 +252,13 @@ static void
|
||||
makecolor(char **c, int fg, int bg, Str *v)
|
||||
{
|
||||
int l;
|
||||
if (fg & 0x80)
|
||||
if (fg & 0x80) {
|
||||
l = xsnprintf(*c, 12, "%.2d;%.2d;%.2d;%.2d", ANSI_BOLD_ON,
|
||||
fg & ~TCSH_BOLD, (10 + bg) & ~TCSH_BOLD, ANSI_BOLD_OFF);
|
||||
} else {
|
||||
l = xsnprintf(*c, 6, "%.2d;%.2d",
|
||||
fg & ~TCSH_BOLD, (10 + bg) & ~TCSH_BOLD);
|
||||
}
|
||||
|
||||
v->s = *c;
|
||||
v->len = l;
|
||||
|
Loading…
x
Reference in New Issue
Block a user