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