Rebase to tcsh-6.20.00
This commit is contained in:
parent
835eab2454
commit
9e4ae64908
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,3 +5,4 @@ tcsh-6.17.00.tar.gz
|
||||
/tcsh-6.18.00.tar.gz
|
||||
/tcsh-6.18.01.tar.gz
|
||||
/tcsh-6.19.00.tar.gz
|
||||
/tcsh-6.20.00.tar.gz
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
f5f854833578647795bc906dd4bcb5d5 tcsh-6.19.00.tar.gz
|
||||
59d40ef40a68e790d95e182069431834 tcsh-6.20.00.tar.gz
|
||||
|
@ -1,49 +0,0 @@
|
||||
From e14e62c9353e3e1d0583c549cd7ef23ab9417083 Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Thu, 21 May 2015 21:50:25 +0000
|
||||
Subject: [PATCH] announcement for 6.19.00
|
||||
|
||||
---
|
||||
Announce-6.19.00 | 30 ++++++++++++++++++++++++++++++
|
||||
1 file changed, 30 insertions(+)
|
||||
create mode 100644 Announce-6.19.00
|
||||
|
||||
diff --git a/Announce-6.19.00 b/Announce-6.19.00
|
||||
new file mode 100644
|
||||
index 0000000..c12d1b4
|
||||
--- /dev/null
|
||||
+++ b/Announce-6.19.00
|
||||
@@ -0,0 +1,30 @@
|
||||
+Hello,
|
||||
+
|
||||
+I am pleased to announce that tcsh-6.19 is now available; this is a mainly a
|
||||
+bug fix release (after 3 years) with few new features:
|
||||
+
|
||||
+ 1. new cdtohome variable
|
||||
+ 2. locking in history files
|
||||
+ 3. history speedups.
|
||||
+
|
||||
+Please consult the Fixes files for a complete list of changes.
|
||||
+
|
||||
+Tcsh is an enhanced version of the Berkeley C-shell that offers command
|
||||
+line editing and completion plus many other little things that preserve
|
||||
+the length of your fingers.
|
||||
+
|
||||
+Tcsh runs on most UNIX machines, VMS_POSIX, OS/2 EMX, WIN32, Amiga...
|
||||
+
|
||||
+You can get tcsh from ftp://ftp.astron.com/pub/tcsh/tcsh-6.19.00.tar.gz
|
||||
+
|
||||
+RMD160 (tcsh-6.19.00.tar.gz) = 0f1e8c5fdee634baff6670290bd30074db965da3
|
||||
+
|
||||
+This is a gzip (GNU zip) tar archive. If you don't have GNU zip you can
|
||||
+get it from ftp.gnu.org or other GNU mirrors.
|
||||
+
|
||||
+I would like to thank:
|
||||
+
|
||||
+ * everyone who sent bug reports
|
||||
+ * the beta team for all their help, bug fixes, and suggestions
|
||||
+
|
||||
+christos
|
||||
--
|
||||
2.5.5
|
||||
|
@ -1,25 +0,0 @@
|
||||
From 0ec81072bff28befe1337612d4ec7a2d12028c9d Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Tue, 26 May 2015 11:59:47 +0000
|
||||
Subject: [PATCH] Remove CFLAGS for gethost to ease cross-compilation
|
||||
|
||||
---
|
||||
Makefile.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index b557cfa..bfe51b6 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -449,7 +449,7 @@ pure:$(P) ${OBJS}
|
||||
|
||||
gethost: gethost.c sh.err.h tc.const.h sh.h
|
||||
rm -f gethost
|
||||
- ${CC_FOR_GETHOST} -o gethost ${CPPFLAGS} ${CFLAGS} $(srcdir)/gethost.c
|
||||
+ ${CC_FOR_GETHOST} -o gethost ${CPPFLAGS} $(srcdir)/gethost.c
|
||||
|
||||
tc.defs.c: gethost host.defs
|
||||
@rm -f $@.tmp
|
||||
--
|
||||
2.5.5
|
||||
|
@ -1,852 +0,0 @@
|
||||
From 191ba90359eba81793ba6cbe7240803416f8e763 Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Tue, 26 May 2015 17:32:45 +0000
|
||||
Subject: [PATCH 1/4] PR/451: Fix error messages containing %c to be always
|
||||
'%c'
|
||||
|
||||
---
|
||||
sh.err.c | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/sh.err.c b/sh.err.c
|
||||
index 9111ed9..acbf1f1 100644
|
||||
--- a/sh.err.c
|
||||
+++ b/sh.err.c
|
||||
@@ -218,7 +218,7 @@ errinit(void)
|
||||
elst[ERR_DOLZERO] = CSAVS(1, 5, "No file for $0");
|
||||
elst[ERR_INCBR] = CSAVS(1, 6, "Incomplete [] modifier");
|
||||
elst[ERR_EXPORD] = CSAVS(1, 7, "$ expansion must end before ]");
|
||||
- elst[ERR_BADMOD] = CSAVS(1, 8, "Bad : modifier in $ (%c)");
|
||||
+ elst[ERR_BADMOD] = CSAVS(1, 8, "Bad : modifier in $ '%c'");
|
||||
elst[ERR_SUBSCRIPT] = CSAVS(1, 9, "Subscript error");
|
||||
elst[ERR_BADNUM] = CSAVS(1, 10, "Badly formed number");
|
||||
elst[ERR_NOMORE] = CSAVS(1, 11, "No more words");
|
||||
@@ -262,8 +262,8 @@ errinit(void)
|
||||
elst[ERR_NOTWHILE] = CSAVS(1, 48, "Not in while/foreach");
|
||||
elst[ERR_NOPROC] = CSAVS(1, 49, "No more processes");
|
||||
elst[ERR_NOMATCH] = CSAVS(1, 50, "No match");
|
||||
- elst[ERR_MISSING] = CSAVS(1, 51, "Missing %c");
|
||||
- elst[ERR_UNMATCHED] = CSAVS(1, 52, "Unmatched %c");
|
||||
+ elst[ERR_MISSING] = CSAVS(1, 51, "Missing '%c'");
|
||||
+ elst[ERR_UNMATCHED] = CSAVS(1, 52, "Unmatched '%c'");
|
||||
elst[ERR_NOMEM] = CSAVS(1, 53, "Out of memory");
|
||||
elst[ERR_PIPE] = CSAVS(1, 54, "Can't make pipe");
|
||||
elst[ERR_SYSTEM] = CSAVS(1, 55, "%s: %s");
|
||||
@@ -309,7 +309,7 @@ errinit(void)
|
||||
elst[ERR_BADSUBST] = CSAVS(1, 90, "Bad substitute");
|
||||
elst[ERR_LHS] = CSAVS(1, 91, "No previous left hand side");
|
||||
elst[ERR_RHSLONG] = CSAVS(1, 92, "Right hand side too long");
|
||||
- elst[ERR_BADBANGMOD] = CSAVS(1, 93, "Bad ! modifier: %c");
|
||||
+ elst[ERR_BADBANGMOD] = CSAVS(1, 93, "Bad ! modifier: '%c'");
|
||||
elst[ERR_MODFAIL] = CSAVS(1, 94, "Modifier failed");
|
||||
elst[ERR_SUBOVFL] = CSAVS(1, 95, "Substitution buffer overflow");
|
||||
elst[ERR_BADBANGARG] = CSAVS(1, 96, "Bad ! arg selector");
|
||||
@@ -335,7 +335,7 @@ errinit(void)
|
||||
elst[ERR_TCNOSTR] = CSAVS(1, 115, "Out of termcap string space");
|
||||
elst[ERR_SETTCUS] = CSAVS(1, 116, "Usage: settc %s [yes|no]");
|
||||
elst[ERR_TCCAP] = CSAVS(1, 117, "Unknown capability `%s'");
|
||||
- elst[ERR_TCPARM] = CSAVS(1, 118, "Unknown termcap parameter `%%%c'");
|
||||
+ elst[ERR_TCPARM] = CSAVS(1, 118, "Unknown termcap parameter '%%%c'");
|
||||
elst[ERR_TCARGS] = CSAVS(1, 119, "Too many arguments for `%s' (%d)");
|
||||
elst[ERR_TCNARGS] = CSAVS(1, 120, "`%s' requires %d arguments");
|
||||
elst[ERR_TCUSAGE] = CSAVS(1, 121,
|
||||
@@ -365,7 +365,7 @@ errinit(void)
|
||||
elst[ERR_ULIMUS] = CSAVS(1, 134, "Usage: unlimit [-fh] [limits]");
|
||||
elst[ERR_READONLY] = CSAVS(1, 135, "$%S is read-only");
|
||||
elst[ERR_BADJOB] = CSAVS(1, 136, "No such job (badjob)");
|
||||
- elst[ERR_BADCOLORVAR] = CSAVS(1, 137, "Unknown colorls variable `%c%c'");
|
||||
+ elst[ERR_BADCOLORVAR] = CSAVS(1, 137, "Unknown colorls variable '%c%c'");
|
||||
elst[ERR_EOF] = CSAVS(1, 138, "Unexpected end of file");
|
||||
}
|
||||
|
||||
--
|
||||
2.5.5
|
||||
|
||||
|
||||
From 7daf93b26acd6119e52a72bc00428ffb5b0f8589 Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Tue, 26 May 2015 17:38:25 +0000
|
||||
Subject: [PATCH 2/4] PR/451: Quote %c consistently as '%c'
|
||||
|
||||
---
|
||||
nls/C/set1 | 12 ++++++------
|
||||
nls/C/set9 | 2 +-
|
||||
nls/et/set1 | 12 ++++++------
|
||||
nls/et/set9 | 2 +-
|
||||
nls/finnish/set1 | 12 ++++++------
|
||||
nls/finnish/set9 | 2 +-
|
||||
nls/french/set1 | 12 ++++++------
|
||||
nls/french/set9 | 2 +-
|
||||
nls/german/set1 | 12 ++++++------
|
||||
nls/german/set9 | 2 +-
|
||||
nls/greek/set1 | 12 ++++++------
|
||||
nls/greek/set9 | 2 +-
|
||||
nls/italian/set1 | 12 ++++++------
|
||||
nls/italian/set9 | 2 +-
|
||||
nls/ja/set1 | 12 ++++++------
|
||||
nls/pl/set1 | 12 ++++++------
|
||||
nls/pl/set9 | 2 +-
|
||||
nls/russian/set1 | 12 ++++++------
|
||||
nls/russian/set9 | 2 +-
|
||||
nls/spanish/set1 | 12 ++++++------
|
||||
nls/spanish/set9 | 2 +-
|
||||
nls/ukrainian/set1 | 12 ++++++------
|
||||
nls/ukrainian/set9 | 2 +-
|
||||
23 files changed, 83 insertions(+), 83 deletions(-)
|
||||
|
||||
diff --git a/nls/C/set1 b/nls/C/set1
|
||||
index ed64413..1512d4c 100644
|
||||
--- a/nls/C/set1
|
||||
+++ b/nls/C/set1
|
||||
@@ -8,7 +8,7 @@ $set 1
|
||||
5 No file for $0
|
||||
6 Incomplete [] modifier
|
||||
7 $ expansion must end before ]
|
||||
-8 Bad : modifier in $ (%c)
|
||||
+8 Bad : modifier in $ '%c'
|
||||
9 Subscript error
|
||||
10 Badly formed number
|
||||
11 No more words
|
||||
@@ -51,8 +51,8 @@ $set 1
|
||||
48 Not in while/foreach
|
||||
49 No more processes
|
||||
50 No match
|
||||
-51 Missing %c
|
||||
-52 Unmatched %c
|
||||
+51 Missing '%c'
|
||||
+52 Unmatched '%c'
|
||||
53 Out of memory
|
||||
54 Can't make pipe
|
||||
55 %s: %s
|
||||
@@ -93,7 +93,7 @@ $set 1
|
||||
90 Bad substitute
|
||||
91 No previous left hand side
|
||||
92 Right hand side too long
|
||||
-93 Bad ! modifier: %c
|
||||
+93 Bad ! modifier: '%c'
|
||||
94 Modifier failed
|
||||
95 Substitution buffer overflow
|
||||
96 Bad ! arg selector
|
||||
@@ -118,7 +118,7 @@ $set 1
|
||||
115 Out of termcap string space
|
||||
116 Usage: settc %s [yes|no]
|
||||
117 Unknown capability `%s'
|
||||
-118 Unknown termcap parameter `%%%c'
|
||||
+118 Unknown termcap parameter '%%%c'
|
||||
119 Too many arguments for `%s' (%d)
|
||||
120 `%s' requires %d arguments
|
||||
121 Usage: echotc [-v|-s] [<capability> [<args>]]
|
||||
@@ -137,4 +137,4 @@ $set 1
|
||||
134 Usage: unlimit [-fh] [limits]
|
||||
135 $%S is read-only
|
||||
136 No such job
|
||||
-137 Unknown colorls variable `%c%c'
|
||||
+137 Unknown colorls variable '%c%c'
|
||||
diff --git a/nls/C/set9 b/nls/C/set9
|
||||
index debe7eb..2d61e0e 100644
|
||||
--- a/nls/C/set9
|
||||
+++ b/nls/C/set9
|
||||
@@ -8,5 +8,5 @@ $set 9
|
||||
5 Some extended keys too long for internal print buffer
|
||||
6 Enumerate: BUG!! Null ptr passed\n!
|
||||
7 no input
|
||||
-8 Something must follow: %c\n
|
||||
+8 Something must follow: '%c'\n
|
||||
9 Octal constant does not fit in a char.\n
|
||||
diff --git a/nls/et/set1 b/nls/et/set1
|
||||
index 66a7122..4fb6db0 100644
|
||||
--- a/nls/et/set1
|
||||
+++ b/nls/et/set1
|
||||
@@ -8,7 +8,7 @@ $set 1
|
||||
5 $0 jaoks pole faili
|
||||
6 Mittetäielik [] muutja
|
||||
7 $ laiendus peab lõppema enne ]
|
||||
-8 Halb : täiendaja $ (%c)
|
||||
+8 Halb : täiendaja $ '%c'
|
||||
9 Viga indeksis
|
||||
10 Vigane number
|
||||
11 Sõnad on otsas
|
||||
@@ -51,8 +51,8 @@ $set 1
|
||||
48 Pole while/foreach sees
|
||||
49 Protsessid on otsas
|
||||
50 Ei leia
|
||||
-51 Puuduv %c
|
||||
-52 Ei leia sümbolit %c
|
||||
+51 Puuduv '%c'
|
||||
+52 Ei leia sümbolit '%c'
|
||||
53 Mälu on otsas
|
||||
54 Toru ei saa luua
|
||||
55 %s: %s
|
||||
@@ -93,7 +93,7 @@ $set 1
|
||||
90 Vigane asendamine
|
||||
91 Eelmist vasakut poolt pole
|
||||
92 Parem pool on liiga pikk
|
||||
-93 Vigane ! modifikaator: %c
|
||||
+93 Vigane ! modifikaator: '%c'
|
||||
94 Modifikaator ebaõnnestus
|
||||
95 Asenduse puhvri ületäitumine
|
||||
96 Vigane ! argumendi valik
|
||||
@@ -118,7 +118,7 @@ $set 1
|
||||
115 Termcap sõne on liiga pikk
|
||||
116 Kasuta: settc %s [yes|no]
|
||||
117 Tundmatu omadus `%s'
|
||||
-118 Tundmatu termcap parameeter `%%%c'
|
||||
+118 Tundmatu termcap parameeter '%%%c'
|
||||
119 `%s' jaoks on liiga palju argumente (%d)
|
||||
120 `%s' nõuab %d argumenti
|
||||
121 Kasuta: echotc [-v|-s] [<omadus> [<argumendid>]]
|
||||
@@ -137,4 +137,4 @@ $set 1
|
||||
134 Kasuta: unlimit [-fh] [limiidid]
|
||||
135 $%S on ainult lugemiseks
|
||||
136 Pole sellist tööd
|
||||
-137 Tundmatu colorls muutuja `%c%c'
|
||||
+137 Tundmatu colorls muutuja '%c%c'
|
||||
diff --git a/nls/et/set9 b/nls/et/set9
|
||||
index bf6841f..f94b102 100644
|
||||
--- a/nls/et/set9
|
||||
+++ b/nls/et/set9
|
||||
@@ -8,5 +8,5 @@ $set 9
|
||||
5 Mõned laiendatud klahvid on sisemise trükipuhvri jaoks liiga pikad
|
||||
6 Enumerate: BUG!! Null viit anti\n!
|
||||
7 sisendit pole
|
||||
-8 Midagi peab järgnema: %c\n
|
||||
+8 Midagi peab järgnema: '%c'\n
|
||||
9 kaheksand-konstant ei mahu sümbolisse.\n
|
||||
diff --git a/nls/finnish/set1 b/nls/finnish/set1
|
||||
index 7abca24..d526ad2 100644
|
||||
--- a/nls/finnish/set1
|
||||
+++ b/nls/finnish/set1
|
||||
@@ -8,7 +8,7 @@ $set 1
|
||||
5 Puuttuva tiedosto $0
|
||||
6 Vajavainen [] muunnos
|
||||
7 $ -laajennuksen on päätyttävä ennen ']'-merkkiä
|
||||
-8 Virheellinen : -muunnos $ (%c)
|
||||
+8 Virheellinen : -muunnos $ '%c'
|
||||
9 Indeksivirhe
|
||||
10 Virheellinen numero
|
||||
11 Liian vähän sanoja
|
||||
@@ -51,8 +51,8 @@ $set 1
|
||||
48 Silmukan (while/foreach) ulkopuolella
|
||||
49 Lisää prosesseja ei voida luoda
|
||||
50 Ei vastaavuuksia (match)
|
||||
-51 Puuttuva %c
|
||||
-52 Ylimääräinen/pariton %c
|
||||
+51 Puuttuva '%c'
|
||||
+52 Ylimääräinen/pariton '%c'
|
||||
53 Muisti loppu
|
||||
54 Putkea ei voida luoda
|
||||
55 %s: %s
|
||||
@@ -93,7 +93,7 @@ $set 1
|
||||
90 Virheellinen korvaava merkkijono
|
||||
91 Edellistä vasemmanpuolista merkkijonoa ei ole
|
||||
92 Oikeanpuolinen merkkijono on liian pitkä
|
||||
-93 Virheellinen ! -muunnos: %c
|
||||
+93 Virheellinen ! -muunnos: '%c'
|
||||
94 Muunnos epäonnistui
|
||||
95 Korvauspuskurin ylivuoto
|
||||
96 Virheellinen ! argumenttivalitsin
|
||||
@@ -118,7 +118,7 @@ $set 1
|
||||
115 Päätetyypin kuvaukselle (termcap) ei ole tarpeeksi tilaa
|
||||
116 Käyttö: settc %s [yes|no]
|
||||
117 Tuntematon toiminne `%s'
|
||||
-118 Tuntematon päätetyypin (termcap) parameteri `%%%c'
|
||||
+118 Tuntematon päätetyypin (termcap) parameteri '%%%c'
|
||||
119 Liian paljon argumentteja käskylle `%s' (%d)
|
||||
120 `%s' edellyttää %d argumenttia
|
||||
121 Käyttö: echotc [-v|-s] [<toiminne> [<argumentit>]]
|
||||
@@ -137,4 +137,4 @@ $set 1
|
||||
134 Käyttö: unlimit [-fh] [rajoitteet (limits)]
|
||||
135 Muuttujalle $%S ei voida asettaa arvoa
|
||||
136 Viitattua työtä ei ole
|
||||
-137 Tuntematon colorls-muuttuja `%c%c'
|
||||
+137 Tuntematon colorls-muuttuja '%c%c'
|
||||
diff --git a/nls/finnish/set9 b/nls/finnish/set9
|
||||
index 695ce46..ec50ac6 100644
|
||||
--- a/nls/finnish/set9
|
||||
+++ b/nls/finnish/set9
|
||||
@@ -8,5 +8,5 @@ $set 9
|
||||
5 Jotkin laajennetut näppäimet ovat liian pitkiä sisäiseen tulostuspuskurille
|
||||
6 Enumerate: VIKA!! Välitetty null-osoitin\n!
|
||||
7 ei syötettä
|
||||
-8 Jotain on seurattava: %c\n
|
||||
+8 Jotain on seurattava: '%c'\n
|
||||
9 Oktaalivakio ei mahdu char-tyypin muuttujaan.\n
|
||||
diff --git a/nls/french/set1 b/nls/french/set1
|
||||
index d1419f3..2421282 100644
|
||||
--- a/nls/french/set1
|
||||
+++ b/nls/french/set1
|
||||
@@ -8,7 +8,7 @@ $set 1
|
||||
5 Pas de fichier pour $0
|
||||
6 Modificateur [] incomplet
|
||||
7 $ l'expansion doit se terminer avant ]
|
||||
-8 Mauvais : modificateur dans $ (%c)
|
||||
+8 Mauvais : modificateur dans $ '%c'
|
||||
9 Erreur d'indice
|
||||
10 Numéro mal formé
|
||||
11 Plus de mots
|
||||
@@ -51,8 +51,8 @@ $set 1
|
||||
48 Vous n'êtes pas dans une boucle while ou foreach
|
||||
49 Plus de processus
|
||||
50 Pas de correspondance
|
||||
-51 %c manquant
|
||||
-52 %c sans correspondance
|
||||
+51 '%c' manquant
|
||||
+52 '%c' sans correspondance
|
||||
53 Mémoire insuffisante
|
||||
54 Impossible de créer un tube
|
||||
55 %s: %s
|
||||
@@ -93,7 +93,7 @@ $set 1
|
||||
90 Remplacement incorrect
|
||||
91 Pas de partie gauche précédente
|
||||
92 Partie droite trop longue
|
||||
-93 Modificateur ! incorrect: %c
|
||||
+93 Modificateur ! incorrect: '%c'
|
||||
94 Echec du modificateur
|
||||
95 Dépassement de capacité de la mémoire tampon de substitution
|
||||
96 Sélecteur d'argument ! incorrect
|
||||
@@ -118,7 +118,7 @@ $set 1
|
||||
115 Pas assez de place pour la chaine termcap
|
||||
116 Syntaxe: settc %s [yes|no]
|
||||
117 Capacité `%s' inconnue
|
||||
-118 Paramètre termcap inconnu `%%%c'
|
||||
+118 Paramètre termcap inconnu '%%%c'
|
||||
119 Trop d'arguments pour `%s' (%d)
|
||||
120 `%s' nécessite %d arguments
|
||||
121 Syntaxe: echotc [-v|-s] [<capacité> [<args>]]
|
||||
@@ -137,4 +137,4 @@ $set 1
|
||||
134 Syntaxe: unlimit [-fh] [limites]
|
||||
135 $%S est en lecture seule
|
||||
136 Pas de travail de ce type
|
||||
-137 Unknown colorls variable `%c%c'
|
||||
+137 Unknown colorls variable '%c%c'
|
||||
diff --git a/nls/french/set9 b/nls/french/set9
|
||||
index 30a5ca4..8f37a2f 100644
|
||||
--- a/nls/french/set9
|
||||
+++ b/nls/french/set9
|
||||
@@ -8,5 +8,5 @@ $set 9
|
||||
5 Certaines touches d'extension trop longues pour tampon d'impression interne
|
||||
6 Enumerate: BUG!! Pointeur Null passé!\n
|
||||
7 pas d'entrée
|
||||
-8 Quelque chose doit suivre: %c\n
|
||||
+8 Quelque chose doit suivre: '%c'\n
|
||||
9 Une constante Octale ne peut pas tenir dans un caractère.\n
|
||||
diff --git a/nls/german/set1 b/nls/german/set1
|
||||
index f4ece70..1d35913 100644
|
||||
--- a/nls/german/set1
|
||||
+++ b/nls/german/set1
|
||||
@@ -8,7 +8,7 @@ $set 1
|
||||
5 Keine Datei für $0
|
||||
6 Unvollständiger [] Modifizierer
|
||||
7 $ Ausweitung muß vor ] enden
|
||||
-8 Falscher : Modifizierer in $ (%c)
|
||||
+8 Falscher : Modifizierer in $ '%c'
|
||||
9 Indexfehler
|
||||
10 Falsche Nummer
|
||||
11 Keine Worte mehr
|
||||
@@ -51,8 +51,8 @@ $set 1
|
||||
48 Nicht in while/foreach
|
||||
49 Keine Prozesse mehr
|
||||
50 Kein Treffer
|
||||
-51 Fehlendes %c
|
||||
-52 Überflüssiges %c
|
||||
+51 Fehlendes '%c'
|
||||
+52 Überflüssiges '%c'
|
||||
53 Kein Speicher mehr
|
||||
54 Kann keine Pipe erzeugen
|
||||
55 %s: %s
|
||||
@@ -93,7 +93,7 @@ $set 1
|
||||
90 Falsche Ersetzung
|
||||
91 Keine vorhergehende linke Seite
|
||||
92 Rechte Seite zu lang
|
||||
-93 Falscher ! Modifizierer: %c
|
||||
+93 Falscher ! Modifizierer: '%c'
|
||||
94 Modifizierer fehlgeschlagen
|
||||
95 Überlauf des Ersetzungspuffers
|
||||
96 Falscher ! Argumentbezeichner
|
||||
@@ -118,7 +118,7 @@ $set 1
|
||||
115 Kein Platz mehr für Termcap-Eintrag
|
||||
116 Benutzung: settc %s [yes|no]
|
||||
117 Unbekannte Fähigkeit `%s'
|
||||
-118 Unbekannter Termcap-Parameter `%%%c'
|
||||
+118 Unbekannter Termcap-Parameter '%%%c'
|
||||
119 Zu viele Argumente für `%s' (%d)
|
||||
120 `%s' erfordert %d Argumente
|
||||
121 Benutzung: echotc [-v|-s] [<Fähigkeit> [<Argumente>]]
|
||||
@@ -137,4 +137,4 @@ $set 1
|
||||
134 Benutzung: unlimit [-fh] [Grenzen]
|
||||
135 $%S ist nur lesbar
|
||||
136 Kein solcher Job
|
||||
-137 Unknown colorls variable `%c%c'
|
||||
+137 Unknown colorls variable '%c%c'
|
||||
diff --git a/nls/german/set9 b/nls/german/set9
|
||||
index 57d84df..c413d1c 100644
|
||||
--- a/nls/german/set9
|
||||
+++ b/nls/german/set9
|
||||
@@ -8,5 +8,5 @@ $set 9
|
||||
5 Some extended keys too long for internal print buffer
|
||||
6 Enumerate: BUG!! Null ptr passed\n!
|
||||
7 keine Eingabe
|
||||
-8 Es muß noch etwas folgen: %c\n
|
||||
+8 Es muß noch etwas folgen: '%c'\n
|
||||
9 Oktal-Konstante paßt nicht in ein Zeichen.\n
|
||||
diff --git a/nls/greek/set1 b/nls/greek/set1
|
||||
index c0658db..1a5c10d 100644
|
||||
--- a/nls/greek/set1
|
||||
+++ b/nls/greek/set1
|
||||
@@ -8,7 +8,7 @@ $set 1
|
||||
5 Δεν υπάρχει αρχείο γιά το $0
|
||||
6 Ελλιπής μετατροπέας []
|
||||
7 Η ανάπτυξη του $ πρέπει να τελειώνει πριν το ]
|
||||
-8 Λάθος μετατροπέας : στο $ (%c)
|
||||
+8 Λάθος μετατροπέας : στο $ '%c'
|
||||
9 Λάθος όρισμα
|
||||
10 Κακοσχηματισμένος αριθμός
|
||||
11 Δεν υπάρχουν άλλες λέξεις
|
||||
@@ -51,8 +51,8 @@ $set 1
|
||||
48 Εκτός while/foreach
|
||||
49 Δεν υπάρχουν άλλες διεργασίες
|
||||
50 Δεν υπάρχει ταίριασμα
|
||||
-51 Απόν %c
|
||||
-52 Μη ταιριασμένο %c
|
||||
+51 Απόν '%c'
|
||||
+52 Μη ταιριασμένο '%c'
|
||||
53 Δεν υπάρχει άλλη μνήμη
|
||||
54 Δεν μπορώ να δημιουργήσω pipe
|
||||
55 %s: %s
|
||||
@@ -93,7 +93,7 @@ $set 1
|
||||
90 Λάθος αντικατάσταση
|
||||
91 Δεν υπάρχει προηγούμενο αριστερό μέρος
|
||||
92 Tο δεξί μέρος είναι πολύ μεγάλο
|
||||
-93 Κακός μετατροπέας !: %c
|
||||
+93 Κακός μετατροπέας !: '%c'
|
||||
94 Ο μετατροπέας απέτυχε
|
||||
95 Υπερχείλιση του buffer αντικαταστάσεων
|
||||
96 Λάθος επιλογέας ορίσματος !
|
||||
@@ -118,7 +118,7 @@ $set 1
|
||||
115 Δεν υπάρχει χώρος γιά το termcap string
|
||||
116 Χρήση: settc %s [yes|no]
|
||||
117 Αγνωστη ικανότητα `%s'
|
||||
-118 Αγνωστη παράμετρος του termcap `%%%c'
|
||||
+118 Αγνωστη παράμετρος του termcap '%%%c'
|
||||
119 Υπερβολικά πολλά ορίσματα γιά το `%s' (%d)
|
||||
120 Tο `%s' απαιτεί %d ορίσματα
|
||||
121 Χρήση: echotc [-v|-s] [<ικανότητα> [<ορίσματα>]]
|
||||
@@ -137,4 +137,4 @@ $set 1
|
||||
134 Χρήση: unlimit [-fh] [όρια]
|
||||
135 Tο $%S είναι μόνο γιά διάβασμα
|
||||
136 Δεν υπάρχει τέτοια εργασία
|
||||
-137 Unknown colorls variable `%c%c'
|
||||
+137 Unknown colorls variable '%c%c'
|
||||
diff --git a/nls/greek/set9 b/nls/greek/set9
|
||||
index 800c473..c51bf91 100644
|
||||
--- a/nls/greek/set9
|
||||
+++ b/nls/greek/set9
|
||||
@@ -8,5 +8,5 @@ $set 9
|
||||
5 Μερικά extended keys είναι πολύ μεγάλα γιά τον εσωτερικό print buffer
|
||||
6 Enumerate: BUG!! Πέρασμα μηδενικού pointer!\n
|
||||
7 δεν υπάρχει είσοδος
|
||||
-8 Κάτι πρέπει να ακολουθεί: %c\n
|
||||
+8 Κάτι πρέπει να ακολουθεί: '%c'\n
|
||||
9 Η οκταδική σταθερά δε χωράει στο μέγεθος ενός char.\n
|
||||
diff --git a/nls/italian/set1 b/nls/italian/set1
|
||||
index 6a6e03b..87669e6 100644
|
||||
--- a/nls/italian/set1
|
||||
+++ b/nls/italian/set1
|
||||
@@ -8,7 +8,7 @@ $set 1
|
||||
5 Nessun file per $0
|
||||
6 Modificatore [] incompleto
|
||||
7 L'espansione $ deve terminare prima di ]
|
||||
-8 Modificatore sbagliato in $ (%c)
|
||||
+8 Modificatore sbagliato in $ '%c'
|
||||
9 Errore di indice
|
||||
10 Numero non corretto
|
||||
11 Sono senza parole
|
||||
@@ -51,8 +51,8 @@ $set 1
|
||||
48 Non in un while/foreach
|
||||
49 Ho finito i processi
|
||||
50 Corrispondenza non esistente
|
||||
-51 %c mancante
|
||||
-52 %c non corrispondente
|
||||
+51 '%c' mancante
|
||||
+52 '%c' non corrispondente
|
||||
53 Memoria esaurita
|
||||
54 Non posso creare una pipe
|
||||
55 %s: %s
|
||||
@@ -93,7 +93,7 @@ $set 1
|
||||
90 Sostituzione sbagliata
|
||||
91 Non esiste il precedente lato sinistro
|
||||
92 Lato destro troppo lungo
|
||||
-93 Modificatore ! errato: %c
|
||||
+93 Modificatore ! errato: '%c'
|
||||
94 Il modificatore non ha funzionato
|
||||
95 Overflow di buffer nella sostituzione
|
||||
96 Errato selettore ! di argomento
|
||||
@@ -118,7 +118,7 @@ $set 1
|
||||
115 Al di fuori dello spazio stringa del termcap
|
||||
116 Utilizzo: settc %s [yes|no]
|
||||
117 Capacità `%s' sconosciuta
|
||||
-118 Parametro del termcap `%%%c' sconosciuto
|
||||
+118 Parametro del termcap '%%%c' sconosciuto
|
||||
119 Troppi argomenti per `%s' (%d)
|
||||
120 `%s' richiede %d argomenti
|
||||
121 Utilizzo: echotc [-v|-s] [<capacità> [<argomenti>]]
|
||||
@@ -137,4 +137,4 @@ $set 1
|
||||
134 Utilizzo: unlimit [-fh] [limiti]
|
||||
135 $%S è a sola lettura
|
||||
136 Non esiste il lavoro
|
||||
-137 Variabile `%c%c colorls' sconosciuta
|
||||
+137 Variabile '%c%c colorls' sconosciuta
|
||||
diff --git a/nls/italian/set9 b/nls/italian/set9
|
||||
index e20ac20..b00f076 100644
|
||||
--- a/nls/italian/set9
|
||||
+++ b/nls/italian/set9
|
||||
@@ -8,5 +8,5 @@ $set 9
|
||||
5 Alcuni tasti estesi sono troppo grandi per il buffer interno di stampa
|
||||
6 Enumerate: BACO!! ho ricevuto un puntatore nullo\n!
|
||||
7 niente in ingresso
|
||||
-8 Qualcosa deve seguire: %c\n
|
||||
+8 Qualcosa deve seguire: '%c'\n
|
||||
9 Costante ottale non adeguata per un char.\n
|
||||
diff --git a/nls/ja/set1 b/nls/ja/set1
|
||||
index 09499e4..d37dbc4 100644
|
||||
--- a/nls/ja/set1
|
||||
+++ b/nls/ja/set1
|
||||
@@ -8,7 +8,7 @@ $set 1
|
||||
5 $0 用のファイルがありません
|
||||
6 [] 修飾子が不完全です
|
||||
7 $ 展開は ] の前に終わる必要があります
|
||||
-8 $ 内の : 修飾子が間違っています (%c)
|
||||
+8 $ 内の : 修飾子が間違っています '%c'
|
||||
9 配列の添え字が間違っています
|
||||
10 番号が正しい書式になっていません
|
||||
11 文字列はもうありません
|
||||
@@ -51,8 +51,8 @@ $set 1
|
||||
48 while/foreachの中ではありません
|
||||
49 プロセスを生成できません
|
||||
50 照合パターンに合いません
|
||||
-51 %c が欠けている箇所があります
|
||||
-52 %c が対応しません
|
||||
+51 '%c' が欠けている箇所があります
|
||||
+52 '%c' が対応しません
|
||||
53 メモリが不足しています
|
||||
54 パイプを作れません
|
||||
55 %s: %s
|
||||
@@ -93,7 +93,7 @@ $set 1
|
||||
90 不正な置換です
|
||||
91 直前の左サイドがありません
|
||||
92 右サイドが長過ぎます
|
||||
-93 間違った ! 修飾子です: %c
|
||||
+93 間違った ! 修飾子です: '%c'
|
||||
94 修飾子の失敗です
|
||||
95 置換バッファがオーバーフローしました
|
||||
96 間違った ! 引数のセレクターです
|
||||
@@ -118,7 +118,7 @@ $set 1
|
||||
115 termcapの文字列領域不足です
|
||||
116 形式: settc %s [yes|no]
|
||||
117 知らないcapability `%s'
|
||||
-118 知らないtermcapパラメタ `%%%c'
|
||||
+118 知らないtermcapパラメタ '%%%c'
|
||||
119 `%s' に対する引数が多過ぎます (%d)
|
||||
120 `%s' には %d 引数が必要です
|
||||
121 形式: echotc [-v|-s] [<capability> [<args>]]
|
||||
@@ -137,4 +137,4 @@ $set 1
|
||||
134 形式: unlimit [-fh] [limits]
|
||||
135 $%S は読取専用です
|
||||
136 jobが見つかりません
|
||||
-137 不明のcolorls変数です `%c%c'
|
||||
+137 不明のcolorls変数です '%c%c'
|
||||
diff --git a/nls/pl/set1 b/nls/pl/set1
|
||||
index 19b107b..ebf1817 100644
|
||||
--- a/nls/pl/set1
|
||||
+++ b/nls/pl/set1
|
||||
@@ -8,7 +8,7 @@ $set 1
|
||||
5 Brak pliku dla $0
|
||||
6 Niekompletny modyfikator []
|
||||
7 ekspansja $ musi zakończyć się przed ]
|
||||
-8 Błąd : modyfikator w $ (%c)
|
||||
+8 Błąd : modyfikator w $ '%c'
|
||||
9 Błąd subskrypcji
|
||||
10 Źle stworzona liczba
|
||||
11 Brak słów
|
||||
@@ -51,8 +51,8 @@ $set 1
|
||||
48 Nie w while/foreach
|
||||
49 Brak innych procesów
|
||||
50 Brak pasujących
|
||||
-51 Brakuje %c
|
||||
-52 Niedopasowany %c
|
||||
+51 Brakuje '%c'
|
||||
+52 Niedopasowany '%c'
|
||||
53 Brak pamięci
|
||||
54 Nie mogę stworzyć potoku
|
||||
55 %s: %s
|
||||
@@ -93,7 +93,7 @@ $set 1
|
||||
90 Złe dopasowanie
|
||||
91 No previous left hand side
|
||||
92 Right hand side too long
|
||||
-93 Zły modyfikator ! : %c
|
||||
+93 Zły modyfikator ! : '%c'
|
||||
94 Modyfikator zawiódł
|
||||
95 Przepełnienie bufora dopasowania
|
||||
96 Zły ! selektor argumentów
|
||||
@@ -118,7 +118,7 @@ $set 1
|
||||
115 Brak miejsc w łańcuchu termcap
|
||||
116 Użycie: settc %s [yes|no]
|
||||
117 Nieznana zdolność `%s'
|
||||
-118 Nieznany parametr termcap `%%%c'
|
||||
+118 Nieznany parametr termcap '%%%c'
|
||||
119 Zbyt wiele argumentów dla `%s' (%d)
|
||||
120 `%s' requires %d arguments
|
||||
121 Użycie: echotc [-v|-s] [<zdolność> [<argumenty>]]
|
||||
@@ -137,4 +137,4 @@ $set 1
|
||||
134 Użycie: unlimit [-fh] [limity]
|
||||
135 $%S jest tylko-do-odczytu
|
||||
136 Brak takiej pracy
|
||||
-137 Nieznana zmienna colorls `%c%c'
|
||||
+137 Nieznana zmienna colorls '%c%c'
|
||||
diff --git a/nls/pl/set9 b/nls/pl/set9
|
||||
index 8e3aeec..4ba4032 100644
|
||||
--- a/nls/pl/set9
|
||||
+++ b/nls/pl/set9
|
||||
@@ -8,5 +8,5 @@ $set 9
|
||||
5 Some extended keys too long for internal print buffer
|
||||
6 Enumerate: BUG!! Null ptr passed\n!
|
||||
7 no input
|
||||
-8 Something must follow: %c\n
|
||||
+8 Something must follow: '%c'\n
|
||||
9 Octal constant does not fit in a char.\n
|
||||
diff --git a/nls/russian/set1 b/nls/russian/set1
|
||||
index d872a5b..feac1e6 100644
|
||||
--- a/nls/russian/set1
|
||||
+++ b/nls/russian/set1
|
||||
@@ -8,7 +8,7 @@ $set 1
|
||||
5 Нет файла для $0
|
||||
6 Незавершённый модификатор []
|
||||
7 $ расширение должно оканчиваться перед ]
|
||||
-8 Плохой модификатор в $ (%c)
|
||||
+8 Плохой модификатор в $ '%c'
|
||||
9 Ошибка подпрограммы
|
||||
10 Неправильно сформированное число
|
||||
11 Нет больше слов
|
||||
@@ -51,8 +51,8 @@ $set 1
|
||||
48 Не внутри while/foreach
|
||||
49 Нет больше процессов
|
||||
50 Нет соответствий
|
||||
-51 Отсутствует %c
|
||||
-52 Нет соответствия для %c
|
||||
+51 Отсутствует '%c'
|
||||
+52 Нет соответствия для '%c'
|
||||
53 Нет памяти
|
||||
54 Не могу создать неименованный канал
|
||||
55 %s: %s
|
||||
@@ -93,7 +93,7 @@ $set 1
|
||||
90 Плохая подстановка
|
||||
91 Отсутствует предыдущая левая сторона
|
||||
92 Правая сторона слишком длинная
|
||||
-93 Плохой модификатор !: %c
|
||||
+93 Плохой модификатор !: '%c'
|
||||
94 Ошибка модификатора
|
||||
95 Переполнение буфера подстановки
|
||||
96 Плохой селектор для аргумента !
|
||||
@@ -118,7 +118,7 @@ $set 1
|
||||
115 Переполнение строки termcap
|
||||
116 Использование: settc %s [yes|no]
|
||||
117 Неизвестная capability `%s'
|
||||
-118 Неизвестный параметр termcap `%%%c'
|
||||
+118 Неизвестный параметр termcap '%%%c'
|
||||
119 Слишком много аргументов для `%s' (%d)
|
||||
120 `%s' требует %d аргументов
|
||||
121 Использование: echotc [-v|-s] [<capability> [<аргументы>]]
|
||||
@@ -137,4 +137,4 @@ $set 1
|
||||
134 Использование: unlimit [-fh] [пределы]
|
||||
135 $%S только для чтения
|
||||
136 Нет такого задания
|
||||
-137 Неизвестное значение `%c%c' переменной colorls
|
||||
+137 Неизвестное значение '%c%c' переменной colorls
|
||||
diff --git a/nls/russian/set9 b/nls/russian/set9
|
||||
index d5bc1b7..27aed9e 100644
|
||||
--- a/nls/russian/set9
|
||||
+++ b/nls/russian/set9
|
||||
@@ -8,5 +8,5 @@ $set 9
|
||||
5 Some extended keys too long for internal print buffer
|
||||
6 Enumerate: BUG!! Передан нулевой указатель!\n
|
||||
7 нет вводимых данных
|
||||
-8 Something must follow: %c\n
|
||||
+8 Something must follow: '%c'\n
|
||||
9 Восьмеричная константа не умещается в char.\n
|
||||
diff --git a/nls/spanish/set1 b/nls/spanish/set1
|
||||
index f38d63f..58dc40c 100644
|
||||
--- a/nls/spanish/set1
|
||||
+++ b/nls/spanish/set1
|
||||
@@ -8,7 +8,7 @@ $set 1
|
||||
5 No hay fichero para $0
|
||||
6 Modificador [] incompleto
|
||||
7 $ expansión debe terminar antes de ]
|
||||
-8 Modificador erróneo : en $ (%c)
|
||||
+8 Modificador erróneo : en $ '%c'
|
||||
9 Error de índice
|
||||
10 Número erróneamente formado
|
||||
11 No hay más palabras
|
||||
@@ -51,8 +51,8 @@ $set 1
|
||||
48 No se encuentra en bucle while/foreach
|
||||
49 No hay más procesos
|
||||
50 No existe correspondencia
|
||||
-51 Falta %c
|
||||
-52 No se ha hallado correspondencia con %c
|
||||
+51 Falta '%c'
|
||||
+52 No se ha hallado correspondencia con '%c'
|
||||
53 Memoria insuficiente
|
||||
54 No se puede crear la tubería
|
||||
55 %s: %s
|
||||
@@ -93,7 +93,7 @@ $set 1
|
||||
90 Sustituto erróneo
|
||||
91 No existe `lado izquierdo' previo
|
||||
92 Valor de asignación demasiado largo
|
||||
-93 Modificador de ! incorrecto: %c
|
||||
+93 Modificador de ! incorrecto: '%c'
|
||||
94 Error de modificador
|
||||
95 Desborde el el buffer de sustitución
|
||||
96 Selector de argumento de ! erróneo
|
||||
@@ -118,7 +118,7 @@ $set 1
|
||||
115 Se ha agotado el espacio para cadenas termcap
|
||||
116 Uso: settc %s [yes|no]
|
||||
117 Característica `%s' desconocida
|
||||
-118 Parámetro termcap `%%%c' desconocido
|
||||
+118 Parámetro termcap '%%%c' desconocido
|
||||
119 Demasiados argumentos para `%s' (%d)
|
||||
120 `%s' requiere %d argumentos
|
||||
121 Uso: echotc [-v|-s] [<característica> [<args>]]
|
||||
@@ -137,4 +137,4 @@ $set 1
|
||||
134 Uso: unlimit [-fh] [límites]
|
||||
135 $%S es de sólo-lectura
|
||||
136 No existe ese trabajo
|
||||
-137 Unknown colorls variable `%c%c'
|
||||
+137 Unknown colorls variable '%c%c'
|
||||
diff --git a/nls/spanish/set9 b/nls/spanish/set9
|
||||
index 4a69647..faa03d8 100644
|
||||
--- a/nls/spanish/set9
|
||||
+++ b/nls/spanish/set9
|
||||
@@ -8,5 +8,5 @@ $set 9
|
||||
5 Algunas teclas extendidas son demasiado grandes para el buffer de impresión interno
|
||||
6 Enumerate: ¡¡BUG!! Se ha pasado un puntero nulo!\n
|
||||
7 no hay entrada
|
||||
-8 Falta algo a continuación: %c\n
|
||||
+8 Falta algo a continuación: '%c'\n
|
||||
9 Una constante octal no cabe en un carácter.\n
|
||||
diff --git a/nls/ukrainian/set1 b/nls/ukrainian/set1
|
||||
index b0ba5f2..b6226b6 100644
|
||||
--- a/nls/ukrainian/set1
|
||||
+++ b/nls/ukrainian/set1
|
||||
@@ -8,7 +8,7 @@ $set 1
|
||||
5 Немає файлу для $0
|
||||
6 Неповний модифікатор []
|
||||
7 Розширення $ має бути перед ]
|
||||
-8 Поганий модифікатор : в $ (%c)
|
||||
+8 Поганий модифікатор : в $ '%c'
|
||||
9 Помилковий індекс
|
||||
10 Число погано сформоване
|
||||
11 Не можна більше слів
|
||||
@@ -51,8 +51,8 @@ $set 1
|
||||
48 Не у while/foreach
|
||||
49 Не можна більше процесів
|
||||
50 Немає співпадань
|
||||
-51 Пропущено %c
|
||||
-52 Відсутній відповідник до %c
|
||||
+51 Пропущено '%c'
|
||||
+52 Відсутній відповідник до '%c'
|
||||
53 Мало пам'яті
|
||||
54 Не можу створити канал
|
||||
55 %s: %s
|
||||
@@ -93,7 +93,7 @@ $set 1
|
||||
90 Погана підстановка
|
||||
91 No previous left hand side
|
||||
92 Right hand side too long
|
||||
-93 Поганий модифікатор !: %c
|
||||
+93 Поганий модифікатор !: '%c'
|
||||
94 Невдача модифікатора
|
||||
95 Переповнення буферу підстановки
|
||||
96 Bad ! arg selector
|
||||
@@ -118,7 +118,7 @@ $set 1
|
||||
115 Out of termcap string space
|
||||
116 Використання: settc %s [yes|no]
|
||||
117 Unknown capability `%s'
|
||||
-118 Невідомий параметр termcap `%%%c'
|
||||
+118 Невідомий параметр termcap '%%%c'
|
||||
119 Забагато аргументів для `%s' (%d)
|
||||
120 `%s' вимагає %d аргумент(ів)
|
||||
121 Використання: echotc [-v|-s] [<capability> [<args>]]
|
||||
@@ -137,4 +137,4 @@ $set 1
|
||||
134 Використання: unlimit [-fh] [ліміти]
|
||||
135 $%S лише для читання
|
||||
136 Немає такої задачі
|
||||
-137 Невідоме значення змінної colorls: `%c%c'
|
||||
+137 Невідоме значення змінної colorls: '%c%c'
|
||||
diff --git a/nls/ukrainian/set9 b/nls/ukrainian/set9
|
||||
index 845c7e2..1db8a3d 100644
|
||||
--- a/nls/ukrainian/set9
|
||||
+++ b/nls/ukrainian/set9
|
||||
@@ -8,5 +8,5 @@ $set 9
|
||||
5 Some extended keys too long for internal print buffer
|
||||
6 Enumerate: ПОМИЛКА!! Null ptr passed\n!
|
||||
7 no input
|
||||
-8 Something must follow: %c\n
|
||||
+8 Something must follow: '%c'\n
|
||||
9 Octal constant does not fit in a char.\n
|
||||
--
|
||||
2.5.5
|
||||
|
||||
|
||||
From 0daf444f7062dc6c3f3bf4fbfaa5d06c09b5eea4 Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Tue, 26 May 2015 17:41:51 +0000
|
||||
Subject: [PATCH 3/4] mention %c fix.
|
||||
|
||||
---
|
||||
Fixes | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Fixes b/Fixes
|
||||
index 65f73c4..7d0ceac 100644
|
||||
--- a/Fixes
|
||||
+++ b/Fixes
|
||||
@@ -1,4 +1,6 @@
|
||||
- 41 V6.19.00 - 20150521
|
||||
+ 1. PR/451: Fix error messages containing %c to be always '%c'
|
||||
+
|
||||
+ 41. V6.19.00 - 20150521
|
||||
40. V6.18.05 - 20150510
|
||||
39. fix reseting when interrupted inside an eval "eval sleep 10^C"
|
||||
(paulo.cesar.pereira.de.andrade)
|
||||
--
|
||||
2.5.5
|
||||
|
||||
|
||||
From 6b8845edb04c0872f02be3b9e514626fd97886ce Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Wed, 9 Dec 2015 17:04:34 +0000
|
||||
Subject: [PATCH 4/4] Adjust to new error message
|
||||
|
||||
---
|
||||
tests/lexical.at | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tests/lexical.at b/tests/lexical.at
|
||||
index 885a940..5fa37bd 100644
|
||||
--- a/tests/lexical.at
|
||||
+++ b/tests/lexical.at
|
||||
@@ -71,11 +71,11 @@ Invalid null command.
|
||||
|
||||
# backslash handling tested with $backslash_quote
|
||||
|
||||
-AT_CHECK([tcsh -f -c 'echo "foo\"bar"'], 1, , [Unmatched ".
|
||||
+AT_CHECK([tcsh -f -c 'echo "foo\"bar"'], 1, , [Unmatched '"'.
|
||||
])
|
||||
dnl " Pacify emacs
|
||||
|
||||
-AT_CHECK([tcsh -f -c "echo 'foo\'bar'"], 1, , [Unmatched '.
|
||||
+AT_CHECK([tcsh -f -c "echo 'foo\'bar'"], 1, , [Unmatched '''.
|
||||
])
|
||||
|
||||
AT_CLEANUP
|
||||
--
|
||||
2.5.5
|
||||
|
@ -1,59 +0,0 @@
|
||||
From 624d3aebb6e6afadb4f35e894d11b5ebe290cd87 Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Thu, 28 May 2015 11:47:03 +0000
|
||||
Subject: [PATCH 1/2] avoid gcc-5 optimization malloc + memset = calloc
|
||||
(Fridolin Pokorny)
|
||||
|
||||
---
|
||||
tc.alloc.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tc.alloc.c b/tc.alloc.c
|
||||
index b9aec63..c1cb330 100644
|
||||
--- a/tc.alloc.c
|
||||
+++ b/tc.alloc.c
|
||||
@@ -348,10 +348,13 @@ calloc(size_t i, size_t j)
|
||||
{
|
||||
#ifndef lint
|
||||
char *cp;
|
||||
+ size_t k;
|
||||
|
||||
i *= j;
|
||||
cp = xmalloc(i);
|
||||
- memset(cp, 0, i);
|
||||
+ /* Stop gcc 5.x from optimizing malloc+memset = calloc */
|
||||
+ k = i;
|
||||
+ memset(cp, 0, k);
|
||||
|
||||
return ((memalign_t) cp);
|
||||
#else
|
||||
--
|
||||
2.5.5
|
||||
|
||||
|
||||
From 05e7406049bd2686dee0ee8d819dcd38eb131f6f Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Tue, 7 Jul 2015 12:24:54 +0000
|
||||
Subject: [PATCH 2/2] make k volatile to prevent gcc-5 memset() optimization
|
||||
(Fridolin Pokorny)
|
||||
|
||||
---
|
||||
tc.alloc.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tc.alloc.c b/tc.alloc.c
|
||||
index c1cb330..f68a8c5 100644
|
||||
--- a/tc.alloc.c
|
||||
+++ b/tc.alloc.c
|
||||
@@ -348,7 +348,7 @@ calloc(size_t i, size_t j)
|
||||
{
|
||||
#ifndef lint
|
||||
char *cp;
|
||||
- size_t k;
|
||||
+ volatile size_t k;
|
||||
|
||||
i *= j;
|
||||
cp = xmalloc(i);
|
||||
--
|
||||
2.5.5
|
||||
|
@ -1,32 +0,0 @@
|
||||
From 1cec6d7d4387793a4a98c38313cfd74a8f5600b3 Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Thu, 28 May 2015 11:53:49 +0000
|
||||
Subject: [PATCH] remove unused variable.
|
||||
|
||||
---
|
||||
tw.color.c | 5 +----
|
||||
1 file changed, 1 insertion(+), 4 deletions(-)
|
||||
|
||||
diff --git a/tw.color.c b/tw.color.c
|
||||
index 45dacc1..3969193 100644
|
||||
--- a/tw.color.c
|
||||
+++ b/tw.color.c
|
||||
@@ -241,14 +241,11 @@ init(size_t colorlen, size_t extnum)
|
||||
static int
|
||||
color(Char x)
|
||||
{
|
||||
- int c;
|
||||
static const char ccolors[] = "abcdefghx";
|
||||
char *p;
|
||||
if (Isupper(x)) {
|
||||
x = Tolower(x);
|
||||
- c |= TCSH_BOLD;
|
||||
- } else
|
||||
- c = 0;
|
||||
+ }
|
||||
|
||||
if (x == '\0' || (p = strchr(ccolors, x)) == NULL)
|
||||
return -1;
|
||||
--
|
||||
2.5.5
|
||||
|
@ -1,26 +0,0 @@
|
||||
From 99b0265fd9734996ed863328bf23dd42647c1aa0 Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Thu, 28 May 2015 14:03:00 +0000
|
||||
Subject: [PATCH] >= 0 is always true if unsigned (c11 allows wint_t to be
|
||||
unsigned), and we handle the 0 case above anyway.
|
||||
|
||||
---
|
||||
sh.glob.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/sh.glob.c b/sh.glob.c
|
||||
index d4a118d..fc510bf 100644
|
||||
--- a/sh.glob.c
|
||||
+++ b/sh.glob.c
|
||||
@@ -880,7 +880,7 @@ backeval(struct blk_buf *bb, struct Strbuf *word, Char *cp, int literal)
|
||||
if (c != 0 && (cnt || literal))
|
||||
pword(bb, word);
|
||||
hadnl = 0;
|
||||
- } while (c >= 0);
|
||||
+ } while (c > 0);
|
||||
eof:
|
||||
cleanup_until(&pvec[0]);
|
||||
pwait();
|
||||
--
|
||||
2.5.5
|
||||
|
@ -1,25 +0,0 @@
|
||||
From bf5d07281bfb936eb9d52fc3ec1ff50dd883f934 Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Thu, 28 May 2015 14:04:09 +0000
|
||||
Subject: [PATCH] Added _SIGWINCH
|
||||
|
||||
---
|
||||
tc.const.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tc.const.c b/tc.const.c
|
||||
index 9f658d7..f4969ff 100644
|
||||
--- a/tc.const.c
|
||||
+++ b/tc.const.c
|
||||
@@ -453,7 +453,7 @@ Char STRLC_MONETARY[] = { 'L', 'C', '_', 'M', 'O', 'N', 'E', 'T', 'A',
|
||||
'R', 'Y', '\0' };
|
||||
Char STRNOREBIND[] = { 'N', 'O', 'R', 'E', 'B', 'I', 'N', 'D', '\0' };
|
||||
|
||||
-#if defined(SIG_WINDOW) || defined(SIGWINCH) || defined(SIGWINDOW) || defined (_VMS_POSIX)
|
||||
+#if defined(SIG_WINDOW) || defined(SIGWINCH) || defined(SIGWINDOW) || defined (_VMS_POSIX) || defined(_SIGWINCH)
|
||||
/* atp - problem with declaration of str{lines,columns} in sh.func.c (1277) */
|
||||
Char STRLINES[] = { 'L', 'I', 'N', 'E', 'S', '\0'};
|
||||
Char STRCOLUMNS[] = { 'C', 'O', 'L', 'U', 'M', 'N', 'S', '\0'};
|
||||
--
|
||||
2.5.5
|
||||
|
@ -1,502 +0,0 @@
|
||||
From d5c106a95c49508f5e214f2fa174968eee2352fc Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Sat, 6 Jun 2015 21:19:07 +0000
|
||||
Subject: [PATCH] PR/437: Fix handling of invalid unicode characters. tcsh uses
|
||||
the high order bits to encode attributes in the prompt and the high bit in
|
||||
regular characters. Make the drawing routines take an argument indicating if
|
||||
we are drawing the prompt or not, so that we can decide how to deal with the
|
||||
high bits. This solution is the minimum diff and does not allow "large valued"
|
||||
unicode characters to be in the prompt (because they would conflict with the
|
||||
attribute bits). A better solution would be to have a struct for each
|
||||
character so we could encode extra attributes.
|
||||
|
||||
---
|
||||
Fixes | 1 +
|
||||
ed.chared.c | 2 +-
|
||||
ed.refresh.c | 54 ++++++++++++++++++++++++++++++++++++++++++------------
|
||||
ed.xmap.c | 2 +-
|
||||
sh.file.c | 2 +-
|
||||
sh.glob.c | 9 +++++++--
|
||||
sh.h | 15 ++++++++++++---
|
||||
sh.hist.c | 2 +-
|
||||
sh.misc.c | 22 ++++++++++++++++++----
|
||||
tc.func.c | 7 +++++++
|
||||
tc.nls.c | 40 ++++++++++++++++++++++++++++++----------
|
||||
tc.nls.h | 3 ++-
|
||||
tc.printf.c | 2 +-
|
||||
tc.str.c | 22 ++++++++++++++++++----
|
||||
tw.parse.c | 7 ++++++-
|
||||
15 files changed, 148 insertions(+), 42 deletions(-)
|
||||
|
||||
diff --git a/Fixes b/Fixes
|
||||
index 7d0ceac..aa779b1 100644
|
||||
--- a/Fixes
|
||||
+++ b/Fixes
|
||||
@@ -1,3 +1,4 @@
|
||||
+ 2. PR/437: Fix handling of invalid unicode characters.
|
||||
1. PR/451: Fix error messages containing %c to be always '%c'
|
||||
|
||||
41. V6.19.00 - 20150521
|
||||
diff --git a/ed.chared.c b/ed.chared.c
|
||||
index bade211..c0bd41b 100644
|
||||
--- a/ed.chared.c
|
||||
+++ b/ed.chared.c
|
||||
@@ -3387,7 +3387,7 @@ e_stuff_char(Char c)
|
||||
(void) Cookedmode();
|
||||
|
||||
(void) xwrite(SHIN, "\n", 1);
|
||||
- len = one_wctomb(buf, c & CHAR);
|
||||
+ len = one_wctomb(buf, c);
|
||||
for (i = 0; i < len; i++)
|
||||
(void) ioctl(SHIN, TIOCSTI, (ioctl_t) &buf[i]);
|
||||
|
||||
diff --git a/ed.refresh.c b/ed.refresh.c
|
||||
index 9e6da00..a88c5e5 100644
|
||||
--- a/ed.refresh.c
|
||||
+++ b/ed.refresh.c
|
||||
@@ -46,7 +46,7 @@ static int vcursor_h, vcursor_v;
|
||||
static int rprompt_h, rprompt_v;
|
||||
|
||||
static int MakeLiteral (Char *, int, Char);
|
||||
-static int Draw (Char *, int);
|
||||
+static int Draw (Char *, int, int);
|
||||
static void Vdraw (Char, int);
|
||||
static void RefreshPromptpart (Char *);
|
||||
static void update_line (Char *, Char *, int);
|
||||
@@ -159,15 +159,44 @@ static int MakeLiteral(Char *str, int len, Char addlit)
|
||||
return i | LITERAL;
|
||||
}
|
||||
|
||||
+/* draw char at cp, expand tabs, ctl chars */
|
||||
static int
|
||||
-Draw(Char *cp, int nocomb) /* draw char at cp, expand tabs, ctl chars */
|
||||
+Draw(Char *cp, int nocomb, int drawPrompt)
|
||||
{
|
||||
int w, i, lv, lh;
|
||||
Char c, attr;
|
||||
|
||||
+#ifdef WIDE_STRINGS
|
||||
+ if (!drawPrompt) { /* draw command-line */
|
||||
+ attr = 0;
|
||||
+ c = *cp;
|
||||
+ } else { /* draw prompt */
|
||||
+ /* prompt with attributes(UNDER,BOLD,STANDOUT) */
|
||||
+ if (*cp & (UNDER | BOLD | STANDOUT)) { /* *cp >= STANDOUT */
|
||||
+
|
||||
+ /* example)
|
||||
+ * We can't distinguish whether (*cp=)0x02ffffff is
|
||||
+ * U+02FFFFFF or U+00FFFFFF|STANDOUT.
|
||||
+ * We handle as U+00FFFFFF|STANDOUT, only when drawing prompt. */
|
||||
+ attr = (*cp & ATTRIBUTES);
|
||||
+ /* ~(UNDER | BOLD | STANDOUT) = 0xf1ffffff */
|
||||
+ c = *cp & ~(UNDER | BOLD | STANDOUT);
|
||||
+
|
||||
+ /* if c is ctrl code, we handle *cp as havnig no attributes */
|
||||
+ if ((c < 0x20 && c >= 0) || c == 0x7f) {
|
||||
+ attr = 0;
|
||||
+ c = *cp;
|
||||
+ }
|
||||
+ } else { /* prompt without attributes */
|
||||
+ attr = 0;
|
||||
+ c = *cp;
|
||||
+ }
|
||||
+ }
|
||||
+#else
|
||||
attr = *cp & ~CHAR;
|
||||
c = *cp & CHAR;
|
||||
- w = NLSClassify(c, nocomb);
|
||||
+#endif
|
||||
+ w = NLSClassify(c, nocomb, drawPrompt);
|
||||
switch (w) {
|
||||
case NLSCLASS_NL:
|
||||
Vdraw('\0', 0); /* assure end of line */
|
||||
@@ -201,10 +230,11 @@ Draw(Char *cp, int nocomb) /* draw char at cp, expand tabs, ctl chars */
|
||||
case NLSCLASS_ILLEGAL2:
|
||||
case NLSCLASS_ILLEGAL3:
|
||||
case NLSCLASS_ILLEGAL4:
|
||||
- Vdraw('\\' | attr, 1);
|
||||
- Vdraw('U' | attr, 1);
|
||||
- Vdraw('+' | attr, 1);
|
||||
- for (i = 8 * NLSCLASS_ILLEGAL_SIZE(w) - 4; i >= 0; i -= 4)
|
||||
+ case NLSCLASS_ILLEGAL5:
|
||||
+ Vdraw('\\', 1);
|
||||
+ Vdraw('U', 1);
|
||||
+ Vdraw('+', 1);
|
||||
+ for (i = 16 + 4 * (-w-5); i >= 0; i -= 4)
|
||||
Vdraw("0123456789ABCDEF"[(c >> i) & 15] | attr, 1);
|
||||
break;
|
||||
case 0:
|
||||
@@ -302,7 +332,7 @@ RefreshPromptpart(Char *buf)
|
||||
}
|
||||
}
|
||||
else
|
||||
- cp += Draw(cp, cp == buf);
|
||||
+ cp += Draw(cp, cp == buf, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -354,7 +384,7 @@ Refresh(void)
|
||||
cur_v = vcursor_v;
|
||||
Cursor = cp;
|
||||
}
|
||||
- cp += Draw(cp, cp == InputBuf);
|
||||
+ cp += Draw(cp, cp == InputBuf, 0);
|
||||
}
|
||||
|
||||
if (cur_h == -1) { /* if I haven't been set yet, I'm at the end */
|
||||
@@ -1126,7 +1156,7 @@ RefCursor(void)
|
||||
cp++;
|
||||
continue;
|
||||
}
|
||||
- w = NLSClassify(*cp & CHAR, cp == Prompt);
|
||||
+ w = NLSClassify(*cp & CHAR, cp == Prompt, 0);
|
||||
cp++;
|
||||
switch(w) {
|
||||
case NLSCLASS_NL:
|
||||
@@ -1158,7 +1188,7 @@ RefCursor(void)
|
||||
}
|
||||
|
||||
for (cp = InputBuf; cp < Cursor;) { /* do input buffer to Cursor */
|
||||
- w = NLSClassify(*cp & CHAR, cp == InputBuf);
|
||||
+ w = NLSClassify(*cp & CHAR, cp == InputBuf, 0);
|
||||
cp++;
|
||||
switch(w) {
|
||||
case NLSCLASS_NL:
|
||||
@@ -1251,7 +1281,7 @@ RefPlusOne(int l)
|
||||
}
|
||||
cp = Cursor - l;
|
||||
c = *cp & CHAR;
|
||||
- w = NLSClassify(c, cp == InputBuf);
|
||||
+ w = NLSClassify(c, cp == InputBuf, 0);
|
||||
switch(w) {
|
||||
case NLSCLASS_CTRL:
|
||||
PutPlusOne('^', 1);
|
||||
diff --git a/ed.xmap.c b/ed.xmap.c
|
||||
index 6e1d56e..36bce1e 100644
|
||||
--- a/ed.xmap.c
|
||||
+++ b/ed.xmap.c
|
||||
@@ -743,7 +743,7 @@ unparsestring(const CStr *str, const Char *sep)
|
||||
*b++ = (unsigned char) p;
|
||||
}
|
||||
else if (p == ' ' || (Isprint(p) && !Isspace(p)))
|
||||
- b += one_wctomb((char *)b, p & CHAR);
|
||||
+ b += one_wctomb((char *)b, p);
|
||||
else {
|
||||
*b++ = '\\';
|
||||
*b++ = ((p >> 6) & 7) + '0';
|
||||
diff --git a/sh.file.c b/sh.file.c
|
||||
index 343b774..3989d8a 100644
|
||||
--- a/sh.file.c
|
||||
+++ b/sh.file.c
|
||||
@@ -249,7 +249,7 @@ pushback(const Char *string)
|
||||
char buf[MB_LEN_MAX];
|
||||
size_t i, len;
|
||||
|
||||
- len = one_wctomb(buf, *p & CHAR);
|
||||
+ len = one_wctomb(buf, *p);
|
||||
for (i = 0; i < len; i++)
|
||||
(void) ioctl(SHOUT, TIOCSTI, (ioctl_t) &buf[i]);
|
||||
}
|
||||
diff --git a/sh.glob.c b/sh.glob.c
|
||||
index fc510bf..7d008aa 100644
|
||||
--- a/sh.glob.c
|
||||
+++ b/sh.glob.c
|
||||
@@ -594,8 +594,13 @@ trim(Char **t)
|
||||
Char *p;
|
||||
|
||||
while ((p = *t++) != '\0')
|
||||
- while (*p)
|
||||
- *p++ &= TRIM;
|
||||
+ while (*p) {
|
||||
+#if INVALID_BYTE != 0
|
||||
+ if ((*p & INVALID_BYTE) != INVALID_BYTE) /* *p < INVALID_BYTE */
|
||||
+#endif
|
||||
+ *p &= TRIM;
|
||||
+ p++;
|
||||
+ }
|
||||
}
|
||||
|
||||
int
|
||||
diff --git a/sh.h b/sh.h
|
||||
index e71a24e..75de557 100644
|
||||
--- a/sh.h
|
||||
+++ b/sh.h
|
||||
@@ -707,14 +707,21 @@ extern struct sigaction parterm; /* Parents terminate catch */
|
||||
#define ASCII 0177
|
||||
#ifdef WIDE_STRINGS /* Implies SHORT_STRINGS */
|
||||
/* 31st char bit used for 'ing (not 32nd, we want all values nonnegative) */
|
||||
-# define QUOTE 0x40000000
|
||||
-# define TRIM 0x3FFFFFFF /* Mask to strip quote bit */
|
||||
+/*
|
||||
+ * Notice
|
||||
+ *
|
||||
+ * By fix for handling unicode name file, 32nd bit is used.
|
||||
+ * We need use '&' instead of '> or <' when comparing with INVALID_BYTE etc..
|
||||
+ * Cast to uChar is not recommended,
|
||||
+ * becase Char is 4bytes but uChar is 8bytes on I32LP64. */
|
||||
+# define QUOTE 0x80000000
|
||||
+# define TRIM 0x7FFFFFFF /* Mask to strip quote bit */
|
||||
# define UNDER 0x08000000 /* Underline flag */
|
||||
# define BOLD 0x04000000 /* Bold flag */
|
||||
# define STANDOUT 0x02000000 /* Standout flag */
|
||||
# define LITERAL 0x01000000 /* Literal character flag */
|
||||
# define ATTRIBUTES 0x0F000000 /* The bits used for attributes */
|
||||
-# define INVALID_BYTE 0x00800000 /* Invalid character on input */
|
||||
+# define INVALID_BYTE 0xF0000000 /* Invalid character on input */
|
||||
# ifdef SOLARIS2
|
||||
# define CHAR 0x30FFFFFF /* Mask to mask out the character */
|
||||
# else
|
||||
@@ -743,6 +750,8 @@ extern struct sigaction parterm; /* Parents terminate catch */
|
||||
#endif
|
||||
#define CHAR_DBWIDTH (LITERAL|(LITERAL-1))
|
||||
|
||||
+# define MAX_UTF32 0x7FFFFFFF /* max UTF32 is U+7FFFFFFF */
|
||||
+
|
||||
EXTERN int AsciiOnly; /* If set only 7 bits expected in characters */
|
||||
|
||||
/*
|
||||
diff --git a/sh.hist.c b/sh.hist.c
|
||||
index b8f71b7..c0eded5 100644
|
||||
--- a/sh.hist.c
|
||||
+++ b/sh.hist.c
|
||||
@@ -1199,7 +1199,7 @@ fmthist(int fmt, ptr_t ptr)
|
||||
buf = xmalloc(Strlen(istr) * MB_LEN_MAX + 1);
|
||||
|
||||
for (p = buf, ip = istr; *ip != '\0'; ip++)
|
||||
- p += one_wctomb(p, CHAR & *ip);
|
||||
+ p += one_wctomb(p, *ip);
|
||||
|
||||
*p = '\0';
|
||||
xfree(istr);
|
||||
diff --git a/sh.misc.c b/sh.misc.c
|
||||
index 7232b12..233ba5f 100644
|
||||
--- a/sh.misc.c
|
||||
+++ b/sh.misc.c
|
||||
@@ -450,8 +450,13 @@ strip(Char *cp)
|
||||
|
||||
if (!cp)
|
||||
return (cp);
|
||||
- while ((*dp++ &= TRIM) != '\0')
|
||||
- continue;
|
||||
+ while (*dp != '\0') {
|
||||
+#if INVALID_BYTE != 0
|
||||
+ if ((*dp & INVALID_BYTE) != INVALID_BYTE) /* *dp < INVALID_BYTE */
|
||||
+#endif
|
||||
+ *dp &= TRIM;
|
||||
+ dp++;
|
||||
+ }
|
||||
return (cp);
|
||||
}
|
||||
|
||||
@@ -462,8 +467,17 @@ quote(Char *cp)
|
||||
|
||||
if (!cp)
|
||||
return (cp);
|
||||
- while (*dp != '\0')
|
||||
- *dp++ |= QUOTE;
|
||||
+ while (*dp != '\0') {
|
||||
+#ifdef WIDE_STRINGS
|
||||
+ if ((*dp & 0xffffff80) == 0) /* *dp < 0x80 */
|
||||
+#elif defined SHORT_STRINGS
|
||||
+ if ((*dp & 0xff80) == 0) /* *dp < 0x80 */
|
||||
+#else
|
||||
+ if ((*dp & 0x80) == 0) /* *dp < 0x80 */
|
||||
+#endif
|
||||
+ *dp |= QUOTE;
|
||||
+ dp++;
|
||||
+ }
|
||||
return (cp);
|
||||
}
|
||||
|
||||
diff --git a/tc.func.c b/tc.func.c
|
||||
index 2b28a68..5a909d6 100644
|
||||
--- a/tc.func.c
|
||||
+++ b/tc.func.c
|
||||
@@ -124,7 +124,14 @@ expand_lex(const struct wordent *sp0, int from, int to)
|
||||
(((*s & TRIM) == '\\') && (prev_c != '\\')))) {
|
||||
Strbuf_append1(&buf, '\\');
|
||||
}
|
||||
+#if INVALID_BYTE != 0
|
||||
+ if ((*s & INVALID_BYTE) != INVALID_BYTE) /* *s < INVALID_BYTE */
|
||||
+ Strbuf_append1(&buf, *s & TRIM);
|
||||
+ else
|
||||
+ Strbuf_append1(&buf, *s);
|
||||
+#else
|
||||
Strbuf_append1(&buf, *s & TRIM);
|
||||
+#endif
|
||||
prev_c = *s;
|
||||
}
|
||||
Strbuf_append1(&buf, ' ');
|
||||
diff --git a/tc.nls.c b/tc.nls.c
|
||||
index 2c38f3f..22ad173 100644
|
||||
--- a/tc.nls.c
|
||||
+++ b/tc.nls.c
|
||||
@@ -64,7 +64,11 @@ NLSWidth(Char c)
|
||||
{
|
||||
# ifdef HAVE_WCWIDTH
|
||||
int l;
|
||||
+#if INVALID_BYTE != 0
|
||||
+ if ((c & INVALID_BYTE) == INVALID_BYTE) /* c >= INVALID_BYTE */
|
||||
+#else
|
||||
if (c & INVALID_BYTE)
|
||||
+#endif
|
||||
return 1;
|
||||
l = xwcwidth((wchar_t) c);
|
||||
return l >= 0 ? l : 0;
|
||||
@@ -116,12 +120,36 @@ NLSChangeCase(const Char *p, int mode)
|
||||
}
|
||||
|
||||
int
|
||||
-NLSClassify(Char c, int nocomb)
|
||||
+NLSClassify(Char c, int nocomb, int drawPrompt)
|
||||
{
|
||||
int w;
|
||||
- if (c & INVALID_BYTE)
|
||||
+#ifndef SHORT_STRINGS
|
||||
+ if ((c & 0x80) != 0) /* c >= 0x80 */
|
||||
return NLSCLASS_ILLEGAL;
|
||||
+#endif
|
||||
+ if (!drawPrompt) { /* draw command-line */
|
||||
+#if INVALID_BYTE != 0
|
||||
+ if ((c & INVALID_BYTE) == INVALID_BYTE) /* c >= INVALID_BYTE */
|
||||
+ return NLSCLASS_ILLEGAL;
|
||||
+ if ((c & INVALID_BYTE) == QUOTE && (c & 0x80) == 0) /* c >= QUOTE */
|
||||
+ return 1;
|
||||
+ if (c >= 0x10000000) /* U+10000000 = FC 90 80 80 80 80 */
|
||||
+ return NLSCLASS_ILLEGAL5;
|
||||
+ if (c >= 0x1000000) /* U+1000000 = F9 80 80 80 80 */
|
||||
+ return NLSCLASS_ILLEGAL4;
|
||||
+ if (c >= 0x100000) /* U+100000 = F4 80 80 80 */
|
||||
+ return NLSCLASS_ILLEGAL3;
|
||||
+#endif
|
||||
+ if (c >= 0x10000) /* U+10000 = F0 90 80 80 */
|
||||
+ return NLSCLASS_ILLEGAL2;
|
||||
+ }
|
||||
w = NLSWidth(c);
|
||||
+ if (drawPrompt) { /* draw prompt */
|
||||
+ if (w > 0)
|
||||
+ return w;
|
||||
+ if (w == 0)
|
||||
+ return 1;
|
||||
+ }
|
||||
if ((w > 0 && !(Iscntrl(c) && (c & CHAR) < 0x100)) || (Isprint(c) && !nocomb))
|
||||
return w;
|
||||
if (Iscntrl(c) && (c & CHAR) < 0x100) {
|
||||
@@ -131,13 +159,5 @@ NLSClassify(Char c, int nocomb)
|
||||
return NLSCLASS_TAB;
|
||||
return NLSCLASS_CTRL;
|
||||
}
|
||||
-#ifdef WIDE_STRINGS
|
||||
- if (c >= 0x1000000)
|
||||
- return NLSCLASS_ILLEGAL4;
|
||||
- if (c >= 0x10000)
|
||||
- return NLSCLASS_ILLEGAL3;
|
||||
-#endif
|
||||
- if (c >= 0x100)
|
||||
- return NLSCLASS_ILLEGAL2;
|
||||
return NLSCLASS_ILLEGAL;
|
||||
}
|
||||
diff --git a/tc.nls.h b/tc.nls.h
|
||||
index 4d27741..6930682 100644
|
||||
--- a/tc.nls.h
|
||||
+++ b/tc.nls.h
|
||||
@@ -43,7 +43,7 @@ extern int NLSStringWidth (const Char *);
|
||||
#endif
|
||||
|
||||
extern Char *NLSChangeCase (const Char *, int);
|
||||
-extern int NLSClassify (Char, int);
|
||||
+extern int NLSClassify (Char, int, int);
|
||||
|
||||
#define NLSCLASS_CTRL (-1)
|
||||
#define NLSCLASS_TAB (-2)
|
||||
@@ -52,6 +52,7 @@ extern int NLSClassify (Char, int);
|
||||
#define NLSCLASS_ILLEGAL2 (-5)
|
||||
#define NLSCLASS_ILLEGAL3 (-6)
|
||||
#define NLSCLASS_ILLEGAL4 (-7)
|
||||
+#define NLSCLASS_ILLEGAL5 (-8)
|
||||
|
||||
#define NLSCLASS_ILLEGAL_SIZE(x) (-(x) - (-(NLSCLASS_ILLEGAL) - 1))
|
||||
|
||||
diff --git a/tc.printf.c b/tc.printf.c
|
||||
index 7f2612d..c6be145 100644
|
||||
--- a/tc.printf.c
|
||||
+++ b/tc.printf.c
|
||||
@@ -289,7 +289,7 @@ doprnt(void (*addchar) (int), const char *sfmt, va_list ap)
|
||||
(*addchar) ('\\' | attributes);
|
||||
count++;
|
||||
}
|
||||
- len = one_wctomb(cbuf, *Bp & CHAR);
|
||||
+ len = one_wctomb(cbuf, *Bp);
|
||||
for (pos = 0; pos < len; pos++) {
|
||||
(*addchar) ((unsigned char)cbuf[pos] | attributes
|
||||
| (*Bp & ATTRIBUTES));
|
||||
diff --git a/tc.str.c b/tc.str.c
|
||||
index c407cb8..c2b5ac8 100644
|
||||
--- a/tc.str.c
|
||||
+++ b/tc.str.c
|
||||
@@ -66,10 +66,24 @@ one_wctomb(char *s, Char wchar)
|
||||
{
|
||||
int len;
|
||||
|
||||
- if (wchar & INVALID_BYTE) {
|
||||
- s[0] = wchar & 0xFF;
|
||||
+#if INVALID_BYTE != 0
|
||||
+ if ((wchar & INVALID_BYTE) == INVALID_BYTE) { /* wchar >= INVALID_BYTE */
|
||||
+ /* invalid char
|
||||
+ * exmaple)
|
||||
+ * if wchar = f0000090(=90|INVALID_BYTE), then *s = ffffff90 */
|
||||
+ *s = (char)wchar;
|
||||
len = 1;
|
||||
+#else
|
||||
+ if (wchar & (CHAR & INVALID_BYTE)) {
|
||||
+ s[0] = wchar & (CHAR & 0xFF);
|
||||
+ len = 1;
|
||||
+#endif
|
||||
} else {
|
||||
+#if INVALID_BYTE != 0
|
||||
+ wchar &= MAX_UTF32;
|
||||
+#else
|
||||
+ wchar &= CHAR;
|
||||
+#endif
|
||||
#ifdef UTF16_STRINGS
|
||||
if (wchar >= 0x10000) {
|
||||
/* UTF-16 systems can't handle these values directly in calls to
|
||||
@@ -224,7 +238,7 @@ short2str(const Char *src)
|
||||
dst = sdst;
|
||||
edst = &dst[dstsize];
|
||||
while (*src) {
|
||||
- dst += one_wctomb(dst, *src & CHAR);
|
||||
+ dst += one_wctomb(dst, *src);
|
||||
src++;
|
||||
if (dst >= edst) {
|
||||
char *wdst = dst;
|
||||
@@ -544,7 +558,7 @@ short2qstr(const Char *src)
|
||||
dst = &edst[-MALLOC_INCR];
|
||||
}
|
||||
}
|
||||
- dst += one_wctomb(dst, *src & CHAR);
|
||||
+ dst += one_wctomb(dst, *src);
|
||||
src++;
|
||||
if (dst >= edst) {
|
||||
ptrdiff_t i = dst - edst;
|
||||
diff --git a/tw.parse.c b/tw.parse.c
|
||||
index 8309ed8..94982d6 100644
|
||||
--- a/tw.parse.c
|
||||
+++ b/tw.parse.c
|
||||
@@ -618,7 +618,12 @@ insert_meta(const Char *cp, const Char *cpend, const Char *word,
|
||||
break;
|
||||
|
||||
wq = w & QUOTE;
|
||||
- w &= ~QUOTE;
|
||||
+#if INVALID_BYTE != 0
|
||||
+ /* add checking INVALID_BYTE for FIX UTF32 */
|
||||
+ if ((w & INVALID_BYTE) != INVALID_BYTE) /* w < INVALID_BYTE */
|
||||
+#else
|
||||
+ w &= ~QUOTE;
|
||||
+#endif
|
||||
|
||||
if (cmap(w, _ESC | _QF))
|
||||
wq = QUOTE; /* quotes are always quoted */
|
||||
--
|
||||
2.5.5
|
||||
|
@ -1,27 +0,0 @@
|
||||
From 33f2a2b3e17194b38f68d710f200fca63bc91a38 Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Fri, 3 Jul 2015 16:52:47 +0000
|
||||
Subject: [PATCH] Fix ln(1) completion. next word completions don't do partial
|
||||
matches anymore (since the word has been completed...) so n/-/f etc don't
|
||||
match -s anymore; change it to n/-*/f so that it works.
|
||||
|
||||
---
|
||||
complete.tcsh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/complete.tcsh b/complete.tcsh
|
||||
index 41bdbb0..cceab4f 100644
|
||||
--- a/complete.tcsh
|
||||
+++ b/complete.tcsh
|
||||
@@ -1009,7 +1009,7 @@ complete ln c/--/"(backup directory force no-dereference \
|
||||
c/-/"(b d F f i n S s V v -)"/ \
|
||||
n/{-S,--suffix}/x:'<suffix>'/ \
|
||||
n/{-V,--version-control}/"(t numbered nil existing \
|
||||
- never simple)"/ n/-/f/ N/-/x:'<link_name>'/ \
|
||||
+ never simple)"/ n/-*/f/ N/-*/x:'<link_name>'/ \
|
||||
p/1/f/ p/2/x:'<link_name>'/
|
||||
complete touch c/--/"(date reference time help version)"/ \
|
||||
c/-/"(a c d f m r t -)"/ \
|
||||
--
|
||||
2.5.5
|
||||
|
@ -1,145 +0,0 @@
|
||||
From 132f9f91a87e313d3702aaa3ac85bdf060207564 Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Mon, 6 Jul 2015 21:52:45 +0000
|
||||
Subject: [PATCH] Fix parsing of if statement with a missing space after
|
||||
the if closing parenthesis (Fridolin Pokorny)
|
||||
|
||||
---
|
||||
Fixes | 1 +
|
||||
Makefile.in | 4 ++--
|
||||
sh.func.c | 11 +++++++++
|
||||
tests/parenthesis.at | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
tests/testsuite.at | 1 +
|
||||
5 files changed, 78 insertions(+), 2 deletions(-)
|
||||
create mode 100644 tests/parenthesis.at
|
||||
|
||||
diff --git a/Fixes b/Fixes
|
||||
index aa779b1..07afe71 100644
|
||||
--- a/Fixes
|
||||
+++ b/Fixes
|
||||
@@ -1,3 +1,4 @@
|
||||
+ 3. Fix parsing of 'if (cond)then' (Fridolin Pokorny)
|
||||
2. PR/437: Fix handling of invalid unicode characters.
|
||||
1. PR/451: Fix error messages containing %c to be always '%c'
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index bfe51b6..6d1f964 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -415,8 +415,8 @@ AVSRCS= Fixes MAKEDIFFS MAKESHAR NewThings README FAQ \
|
||||
tests/testsuite.at aclocal.m4
|
||||
TESTFILES= tests/aliases.at tests/arguments.at tests/commands.at \
|
||||
tests/expr.at tests/lexical.at tests/mb-eucjp.at \
|
||||
- tests/mb-utf8.at tests/noexec.at tests/syntax.at tests/subst.at \
|
||||
- tests/variables.at tests/sh.dol.at
|
||||
+ tests/mb-utf8.at tests/noexec.at tests/parenthesis.at tests/syntax.at \
|
||||
+ tests/subst.at tests/variables.at tests/sh.dol.at
|
||||
|
||||
VHSRCS=${PVSRCS} ${AVSRCS}
|
||||
|
||||
diff --git a/sh.func.c b/sh.func.c
|
||||
index 7b70760..bb670b8 100644
|
||||
--- a/sh.func.c
|
||||
+++ b/sh.func.c
|
||||
@@ -1045,6 +1045,17 @@ getword(struct Strbuf *wp)
|
||||
goto past;
|
||||
if (wp)
|
||||
Strbuf_append1(wp, (Char) c);
|
||||
+ if (!d && c == ')') {
|
||||
+ if (!first && wp) {
|
||||
+ goto past_word_end;
|
||||
+ } else {
|
||||
+ if (wp) {
|
||||
+ wp->len = 1;
|
||||
+ Strbuf_terminate(wp);
|
||||
+ }
|
||||
+ return found;
|
||||
+ }
|
||||
+ }
|
||||
if (!first && !d && c == '(') {
|
||||
if (wp)
|
||||
goto past_word_end;
|
||||
diff --git a/tests/parenthesis.at b/tests/parenthesis.at
|
||||
new file mode 100644
|
||||
index 0000000..2832b50
|
||||
--- /dev/null
|
||||
+++ b/tests/parenthesis.at
|
||||
@@ -0,0 +1,63 @@
|
||||
+# Parenthesis handling
|
||||
+
|
||||
+AT_SETUP([Parenthesis no space])
|
||||
+AT_DATA([no-space.csh],
|
||||
+[[
|
||||
+if(1 == 1) then
|
||||
+ echo 1
|
||||
+else
|
||||
+ if (2 == 22 )then
|
||||
+ echo 2
|
||||
+ endif
|
||||
+ echo 3
|
||||
+endif
|
||||
+]])
|
||||
+AT_CHECK([tcsh -f < no-space.csh], ,[1
|
||||
+])
|
||||
+
|
||||
+AT_CLEANUP
|
||||
+
|
||||
+AT_SETUP([Parenthesis space])
|
||||
+AT_DATA([space.csh],
|
||||
+[[
|
||||
+if (1 == 1) then
|
||||
+ echo 1
|
||||
+else
|
||||
+ if (2 == 22 ) then
|
||||
+ echo 2
|
||||
+ endif
|
||||
+ echo 3
|
||||
+endif
|
||||
+]])
|
||||
+AT_CHECK([tcsh -f < space.csh], ,[1
|
||||
+])
|
||||
+
|
||||
+AT_CLEANUP
|
||||
+
|
||||
+AT_SETUP([Parenthesis space escaped])
|
||||
+AT_DATA([space-escaped.csh],
|
||||
+[[
|
||||
+if (1 == 1) then
|
||||
+ echo 1
|
||||
+else
|
||||
+ if (2 == 22 )\ then
|
||||
+ echo 2
|
||||
+ endif
|
||||
+ echo 3
|
||||
+endif
|
||||
+]])
|
||||
+AT_CHECK([tcsh -f < space-escaped.csh], ,[1
|
||||
+])
|
||||
+AT_CLEANUP
|
||||
+
|
||||
+AT_SETUP([Parenthesis escaped])
|
||||
+AT_DATA([parenthesis-escaped.csh],
|
||||
+[[
|
||||
+if ( ')' == \) ) then
|
||||
+ echo 1
|
||||
+endif
|
||||
+]])
|
||||
+AT_CHECK([tcsh -f < parenthesis-escaped.csh], ,[1
|
||||
+])
|
||||
+AT_CLEANUP
|
||||
+
|
||||
diff --git a/tests/testsuite.at b/tests/testsuite.at
|
||||
index fd1d7b9..d358a7f 100644
|
||||
--- a/tests/testsuite.at
|
||||
+++ b/tests/testsuite.at
|
||||
@@ -18,6 +18,7 @@ m4_include([expr.at])
|
||||
m4_include([lexical.at])
|
||||
m4_include([mb-eucjp.at])
|
||||
m4_include([mb-utf8.at])
|
||||
+m4_include([parenthesis.at])
|
||||
m4_include([subst.at])
|
||||
m4_include([syntax.at])
|
||||
m4_include([variables.at])
|
||||
--
|
||||
2.5.5
|
||||
|
@ -1,290 +0,0 @@
|
||||
From acf067ec992e78e370f1101ba87d508774c32ed5 Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Fri, 31 Jul 2015 08:57:13 +0000
|
||||
Subject: [PATCH 1/5] typo in comment (lukem)
|
||||
|
||||
---
|
||||
sh.proc.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/sh.proc.c b/sh.proc.c
|
||||
index aa2ee58..76eca3b 100644
|
||||
--- a/sh.proc.c
|
||||
+++ b/sh.proc.c
|
||||
@@ -1003,7 +1003,7 @@ pprint(struct process *pp, int flag)
|
||||
tp = pp;
|
||||
status = reason = -1;
|
||||
jobflags = 0;
|
||||
- haderr = 1; /* Print statuc to stderr */
|
||||
+ haderr = 1; /* Print status to stderr */
|
||||
do {
|
||||
#ifdef BACKPIPE
|
||||
/*
|
||||
--
|
||||
2.5.5
|
||||
|
||||
|
||||
From e8eb0eba59a96e90e2a63952aaf7092b5e5569d2 Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Fri, 31 Jul 2015 08:58:37 +0000
|
||||
Subject: [PATCH 2/5] From lukem: run-fg-editor: don't prefix match $EDITOR,
|
||||
$VISUAL
|
||||
|
||||
Fix comparison of $EDITOR or $VISUAL against names of background
|
||||
processes so that it doesn't just prefix match.
|
||||
Previously, if EDITOR=vi it would match any command starting with "vi".
|
||||
|
||||
Move check for backgrounded jobs earlier to avoid unnecessary work.
|
||||
---
|
||||
tc.func.c | 16 ++++++++++------
|
||||
1 file changed, 10 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/tc.func.c b/tc.func.c
|
||||
index 5a909d6..7ed32cf 100644
|
||||
--- a/tc.func.c
|
||||
+++ b/tc.func.c
|
||||
@@ -520,6 +520,9 @@ find_stop_ed(void)
|
||||
struct varent *varp;
|
||||
Char **vv;
|
||||
|
||||
+ if (pcurrent == NULL) /* see if we have any jobs */
|
||||
+ return NULL; /* nope */
|
||||
+
|
||||
if ((ep = getenv("EDITOR")) != NULL) { /* if we have a value */
|
||||
if ((p = strrchr(ep, '/')) != NULL) /* if it has a path */
|
||||
ep = p + 1; /* then we want only the last part */
|
||||
@@ -539,9 +542,6 @@ find_stop_ed(void)
|
||||
for (epl = 0; ep[epl] && !isspace((unsigned char)ep[epl]); epl++)
|
||||
continue;
|
||||
|
||||
- if (pcurrent == NULL) /* see if we have any jobs */
|
||||
- return NULL; /* nope */
|
||||
-
|
||||
if ((varp = adrof(STReditors)) != NULL)
|
||||
vv = varp->vec;
|
||||
else
|
||||
@@ -572,9 +572,13 @@ find_stop_ed(void)
|
||||
else
|
||||
cp = p; /* else we get all of it */
|
||||
|
||||
- /* if we find either in the current name, fg it */
|
||||
- if (strncmp(ep, cp, epl) == 0 ||
|
||||
- strncmp(vp, cp, vpl) == 0 || findvv(vv, cp)) {
|
||||
+ /*
|
||||
+ * If we find the current name as $EDITOR or $VISUAL,
|
||||
+ * or in $editors array, fg it
|
||||
+ */
|
||||
+ if ((strncmp(ep, cp, epl) == 0 && cp[epl] == '\0') ||
|
||||
+ (strncmp(vp, cp, vpl) == 0 && cp[vpl] == '\0') ||
|
||||
+ findvv(vv, cp)) {
|
||||
|
||||
/*
|
||||
* If there is a choice, then choose the current process if
|
||||
--
|
||||
2.5.5
|
||||
|
||||
|
||||
From 39822a2b0d29d2314da10c7a94f7ad0cdaf80509 Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Fri, 31 Jul 2015 08:59:53 +0000
|
||||
Subject: [PATCH 3/5] Rework run-fg-editor to use $editors exclusively if its
|
||||
set, and ignore the use of $EDITOR (default "ed") and $VISUAL (default "vi").
|
||||
If $editors is not set, fallback to the previous use of $EDITOR and $VISUAL.
|
||||
(from lukem)
|
||||
|
||||
---
|
||||
tc.func.c | 55 ++++++++++++++++++++++++++++---------------------------
|
||||
1 file changed, 28 insertions(+), 27 deletions(-)
|
||||
|
||||
diff --git a/tc.func.c b/tc.func.c
|
||||
index 7ed32cf..9af4858 100644
|
||||
--- a/tc.func.c
|
||||
+++ b/tc.func.c
|
||||
@@ -513,9 +513,9 @@ struct process *
|
||||
find_stop_ed(void)
|
||||
{
|
||||
struct process *pp, *retp;
|
||||
- const char *ep, *vp;
|
||||
+ const char *ep = NULL, *vp = NULL;
|
||||
char *cp, *p;
|
||||
- size_t epl, vpl;
|
||||
+ size_t epl = 0, vpl = 0;
|
||||
int pstatus;
|
||||
struct varent *varp;
|
||||
Char **vv;
|
||||
@@ -523,30 +523,32 @@ find_stop_ed(void)
|
||||
if (pcurrent == NULL) /* see if we have any jobs */
|
||||
return NULL; /* nope */
|
||||
|
||||
- if ((ep = getenv("EDITOR")) != NULL) { /* if we have a value */
|
||||
- if ((p = strrchr(ep, '/')) != NULL) /* if it has a path */
|
||||
- ep = p + 1; /* then we want only the last part */
|
||||
- }
|
||||
- else
|
||||
- ep = "ed";
|
||||
-
|
||||
- if ((vp = getenv("VISUAL")) != NULL) { /* if we have a value */
|
||||
- if ((p = strrchr(vp, '/')) != NULL) /* and it has a path */
|
||||
- vp = p + 1; /* then we want only the last part */
|
||||
- }
|
||||
- else
|
||||
- vp = "vi";
|
||||
-
|
||||
- for (vpl = 0; vp[vpl] && !isspace((unsigned char)vp[vpl]); vpl++)
|
||||
- continue;
|
||||
- for (epl = 0; ep[epl] && !isspace((unsigned char)ep[epl]); epl++)
|
||||
- continue;
|
||||
-
|
||||
if ((varp = adrof(STReditors)) != NULL)
|
||||
vv = varp->vec;
|
||||
else
|
||||
vv = NULL;
|
||||
|
||||
+ if (! vv) {
|
||||
+ if ((ep = getenv("EDITOR")) != NULL) { /* if we have a value */
|
||||
+ if ((p = strrchr(ep, '/')) != NULL) /* if it has a path */
|
||||
+ ep = p + 1; /* then we want only the last part */
|
||||
+ }
|
||||
+ else
|
||||
+ ep = "ed";
|
||||
+
|
||||
+ if ((vp = getenv("VISUAL")) != NULL) { /* if we have a value */
|
||||
+ if ((p = strrchr(vp, '/')) != NULL) /* and it has a path */
|
||||
+ vp = p + 1; /* then we want only the last part */
|
||||
+ }
|
||||
+ else
|
||||
+ vp = "vi";
|
||||
+
|
||||
+ for (vpl = 0; vp[vpl] && !isspace((unsigned char)vp[vpl]); vpl++)
|
||||
+ continue;
|
||||
+ for (epl = 0; ep[epl] && !isspace((unsigned char)ep[epl]); epl++)
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
retp = NULL;
|
||||
for (pp = proclist.p_next; pp; pp = pp->p_next)
|
||||
if (pp->p_procid == pp->p_jobid) {
|
||||
@@ -573,13 +575,12 @@ find_stop_ed(void)
|
||||
cp = p; /* else we get all of it */
|
||||
|
||||
/*
|
||||
- * If we find the current name as $EDITOR or $VISUAL,
|
||||
- * or in $editors array, fg it
|
||||
+ * If we find the current name in the $editors array (if set)
|
||||
+ * or as $EDITOR or $VISUAL (if $editors not set), fg it.
|
||||
*/
|
||||
- if ((strncmp(ep, cp, epl) == 0 && cp[epl] == '\0') ||
|
||||
- (strncmp(vp, cp, vpl) == 0 && cp[vpl] == '\0') ||
|
||||
- findvv(vv, cp)) {
|
||||
-
|
||||
+ if ((vv && findvv(vv, cp)) ||
|
||||
+ (epl && strncmp(ep, cp, epl) == 0 && cp[epl] == '\0') ||
|
||||
+ (vpl && strncmp(vp, cp, vpl) == 0 && cp[vpl] == '\0')) {
|
||||
/*
|
||||
* If there is a choice, then choose the current process if
|
||||
* available, or the previous process otherwise, or else
|
||||
--
|
||||
2.5.5
|
||||
|
||||
|
||||
From 6ca81f5b7730071db2a414167d3782ce955fb76b Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Fri, 31 Jul 2015 09:00:14 +0000
|
||||
Subject: [PATCH 4/5] Document the $editors support and this new behaviour. (It
|
||||
was originally added in tcsh 6.18.03 without notice). (from lukem)
|
||||
|
||||
---
|
||||
tcsh.man | 27 +++++++++++++++++++--------
|
||||
1 file changed, 19 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/tcsh.man b/tcsh.man
|
||||
index 4fa59d2..1ad5529 100644
|
||||
--- a/tcsh.man
|
||||
+++ b/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 "21 May 2015" "Astron 6.19.00"
|
||||
+.TH TCSH 1 "31 July 2015" "Astron 6.19.00"
|
||||
.SH NAME
|
||||
tcsh \- C shell with file name completion and command line editing
|
||||
.SH SYNOPSIS
|
||||
@@ -723,9 +723,13 @@ Toggles between input and overwrite modes.
|
||||
.TP 8
|
||||
.B run-fg-editor \fR(M-^Z)
|
||||
Saves the current input line and
|
||||
-looks for a stopped job with a name equal to the last component of the
|
||||
-file name part of the \fBEDITOR\fR or \fBVISUAL\fR environment variables,
|
||||
-or, if neither is set, `ed' or `vi'.
|
||||
+looks for a stopped job where the file name portion of its first word
|
||||
+is found in the \fBeditors\fR shell variable.
|
||||
+If \fBeditors\fR is not set, then the file name portion of the
|
||||
+\fBEDITOR\fR environment variable (`ed' if unset)
|
||||
+and the
|
||||
+\fBVISUAL\fR environment variable (`vi' if unset)
|
||||
+will be used.
|
||||
If such a job is found, it is restarted as if `fg %\fIjob\fR' had been
|
||||
typed. This is used to toggle back and forth between an editor and
|
||||
the shell easily. Some people bind this command to `^Z' so they
|
||||
@@ -3884,6 +3888,11 @@ systems.
|
||||
If set, the command-line editor is used. Set by default in interactive
|
||||
shells.
|
||||
.TP 8
|
||||
+.B editors \fR(+)
|
||||
+A list of command names for the \fIrun-fg-editor\fR editor command to match.
|
||||
+If not set, the \fBEDITOR\fR (`ed' if unset) and \fBVISUAL\fR (`vi' if unset)
|
||||
+environment variables will be used instead.
|
||||
+.TP 8
|
||||
.B ellipsis \fR(+)
|
||||
If set, the `%c'/`%.' and `%C' prompt sequences (see the \fBprompt\fR
|
||||
shell variable) indicate skipped directories with an ellipsis (`...')
|
||||
@@ -4783,8 +4792,9 @@ If set, the shell does not set \fBautologout\fR (q.v.).
|
||||
.TP 8
|
||||
.B EDITOR
|
||||
The pathname to a default editor.
|
||||
-See also the \fBVISUAL\fR environment variable
|
||||
-and the \fIrun-fg-editor\fR editor command.
|
||||
+Used by the \fIrun-fg-editor\fR editor command if the
|
||||
+the \fBeditors\fR shell variable is unset.
|
||||
+See also the \fBVISUAL\fR environment variable.
|
||||
.TP 8
|
||||
.B GROUP \fR(+)
|
||||
Equivalent to the \fBgroup\fR shell variable.
|
||||
@@ -5020,8 +5030,9 @@ The vendor, as determined at compile time.
|
||||
.TP 8
|
||||
.B VISUAL
|
||||
The pathname to a default full-screen editor.
|
||||
-See also the \fBEDITOR\fR environment variable
|
||||
-and the \fIrun-fg-editor\fR editor command.
|
||||
+Used by the \fIrun-fg-editor\fR editor command if the
|
||||
+the \fBeditors\fR shell variable is unset.
|
||||
+See also the \fBEDITOR\fR environment variable.
|
||||
.SH FILES
|
||||
.PD 0
|
||||
.TP 16
|
||||
--
|
||||
2.5.5
|
||||
|
||||
|
||||
From a16fbf87a3459c7305755aa301d7e04fa806d2ec Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Fri, 31 Jul 2015 09:01:17 +0000
|
||||
Subject: [PATCH 5/5] mention run-fg-editor fixes
|
||||
|
||||
---
|
||||
Fixes | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/Fixes b/Fixes
|
||||
index 07afe71..e58d879 100644
|
||||
--- a/Fixes
|
||||
+++ b/Fixes
|
||||
@@ -1,3 +1,4 @@
|
||||
+ 4. run-fg-editor improvements and documentation (Luke Mewburn)
|
||||
3. Fix parsing of 'if (cond)then' (Fridolin Pokorny)
|
||||
2. PR/437: Fix handling of invalid unicode characters.
|
||||
1. PR/451: Fix error messages containing %c to be always '%c'
|
||||
--
|
||||
2.5.5
|
||||
|
@ -1,25 +0,0 @@
|
||||
From 53c03efe7c3b1eb0ede568f3e0a304964657ff1e Mon Sep 17 00:00:00 2001
|
||||
From: kim <kim>
|
||||
Date: Tue, 11 Aug 2015 14:42:33 +0000
|
||||
Subject: [PATCH] Spelling fixes.
|
||||
|
||||
---
|
||||
tcsh.man | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tcsh.man b/tcsh.man
|
||||
index 1ad5529..80c14b6 100644
|
||||
--- a/tcsh.man
|
||||
+++ b/tcsh.man
|
||||
@@ -3745,7 +3745,7 @@ periods, hyphens and underscores (`.', `\-' and `_') as word
|
||||
separators.
|
||||
If set to `Enhance', completion matches uppercase and underscore
|
||||
characters explicitly and matches lowercase and hyphens in a
|
||||
-case-insensivite manner; it will treat periods, hypens and underscores
|
||||
+case-insensitive manner; it will treat periods, hyphens and underscores
|
||||
as word separators.
|
||||
.TP 8
|
||||
.B continue \fR(+)
|
||||
--
|
||||
2.5.5
|
||||
|
@ -1,198 +0,0 @@
|
||||
From 3162c42a739fe54e98ebf4a65de6a03026c9082c Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Thu, 13 Aug 2015 08:54:04 +0000
|
||||
Subject: [PATCH] display the default compiled in editor with bindkey -d
|
||||
(Luke Mewburn)
|
||||
|
||||
---
|
||||
Fixes | 1 +
|
||||
nls/C/set20 | 2 +-
|
||||
nls/et/set20 | 2 +-
|
||||
nls/finnish/set20 | 2 +-
|
||||
nls/french/set20 | 2 +-
|
||||
nls/german/set20 | 2 +-
|
||||
nls/greek/set20 | 2 +-
|
||||
nls/italian/set20 | 2 +-
|
||||
nls/pl/set20 | 2 +-
|
||||
nls/russian/set20 | 2 +-
|
||||
nls/spanish/set20 | 2 +-
|
||||
nls/ukrainian/set20 | 2 +-
|
||||
tc.bind.c | 10 ++++++++--
|
||||
13 files changed, 20 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/Fixes b/Fixes
|
||||
index e58d879..811e67c 100644
|
||||
--- a/Fixes
|
||||
+++ b/Fixes
|
||||
@@ -1,3 +1,4 @@
|
||||
+ 5. display what the compiled in editor is in bindkey -d (Luke Mewburn)
|
||||
4. run-fg-editor improvements and documentation (Luke Mewburn)
|
||||
3. Fix parsing of 'if (cond)then' (Fridolin Pokorny)
|
||||
2. PR/437: Fix handling of invalid unicode characters.
|
||||
diff --git a/nls/C/set20 b/nls/C/set20
|
||||
index 8fd21bf..d3a8bbb 100644
|
||||
--- a/nls/C/set20
|
||||
+++ b/nls/C/set20
|
||||
@@ -19,7 +19,7 @@ $set 20
|
||||
16 -c interpret COMMAND as a builtin or external command\n
|
||||
17 -v bind all keys to vi bindings\n
|
||||
18 -e bind all keys to emacs bindings\n
|
||||
-19 -d bind all keys to default editor's bindings\n
|
||||
+19 -d bind all keys to default editor's bindings (%s)\n
|
||||
20 -l list editor commands with descriptions\n
|
||||
21 -r remove KEY's binding\n
|
||||
22 -k interpret KEY as a symbolic arrow-key name\n
|
||||
diff --git a/nls/et/set20 b/nls/et/set20
|
||||
index 61b21eb..deec04d 100644
|
||||
--- a/nls/et/set20
|
||||
+++ b/nls/et/set20
|
||||
@@ -19,7 +19,7 @@ $set 20
|
||||
16 -c käsitle COMMAND kui sisemist või välist käsku\n
|
||||
17 -v seo kõik klahvid vi seostega\n
|
||||
18 -e seo kõik klahvid emacsi seostega\n
|
||||
-19 -d seo kõik klahvid vaikimisi toimeti seostega\n
|
||||
+19 -d seo kõik klahvid vaikimisi toimeti seostega (%s)\n
|
||||
20 -l esita toimeti käsud koos kirjeldustega\n
|
||||
21 -r kustuta KLAHVILT seos\n
|
||||
22 -k kasuta KLAHVI kui noole-klahvi sümbolnime\n
|
||||
diff --git a/nls/finnish/set20 b/nls/finnish/set20
|
||||
index 2ed75b7..65754de 100644
|
||||
--- a/nls/finnish/set20
|
||||
+++ b/nls/finnish/set20
|
||||
@@ -19,7 +19,7 @@ $set 20
|
||||
16 -c interpret COMMAND as a builtin or external command\n
|
||||
17 -v bind all keys to vi bindings\n
|
||||
18 -e bind all keys to emacs bindings\n
|
||||
-19 -d bind all keys to default editor's bindings\n
|
||||
+19 -d bind all keys to default editor's bindings (%s)\n
|
||||
20 -l list editor commands with descriptions\n
|
||||
21 -r remove KEY's binding\n
|
||||
22 -k interpret KEY as a symbolic arrow-key name\n
|
||||
diff --git a/nls/french/set20 b/nls/french/set20
|
||||
index 51db9e5..5cda5a2 100644
|
||||
--- a/nls/french/set20
|
||||
+++ b/nls/french/set20
|
||||
@@ -19,7 +19,7 @@ $set 20
|
||||
16 -c interprète COMMANDE comme une commande intégrée ou externe\n
|
||||
17 -v redéfinit toutes les touches pour vi\n
|
||||
18 -e redéfinit toutes les touches pour emacs\n
|
||||
-19 -d redéfinit toutes les touches pour de l'éditeur par defaut\n
|
||||
+19 -d redéfinit toutes les touches pour de l'éditeur par defaut (%s)\n
|
||||
20 -l liste les commandes de l'éditeur avec descriptions\n
|
||||
21 -r enlève la correspondance pour la TOUCHE\n
|
||||
22 -k interprète TOUCHE comme un nom de touche de direction symbolique\n
|
||||
diff --git a/nls/german/set20 b/nls/german/set20
|
||||
index b8ed65e..e4f0ec9 100644
|
||||
--- a/nls/german/set20
|
||||
+++ b/nls/german/set20
|
||||
@@ -19,7 +19,7 @@ $set 20
|
||||
16 -c belege einen Unix-Befehl anstelle eines Befehls\n
|
||||
17 -v initialisiere Belegungen mit Standard-Vi-Belegungen\n
|
||||
18 -e initialisiere Belegungen mit Standard-Emacs-Belegungen\n
|
||||
-19 -d initialisiere Belegungen mit Standard-Belegungen\n
|
||||
+19 -d initialisiere Belegungen mit Standard-Belegungen (%s)\n
|
||||
20 -l zeige verfügbare Funktionen mit Beschreibungen an\n
|
||||
21 -r entferne Belegung eines Tastes\n
|
||||
22 -k belege Pfeiltaste mit Namen in In-String\n
|
||||
diff --git a/nls/greek/set20 b/nls/greek/set20
|
||||
index 9408253..647021e 100644
|
||||
--- a/nls/greek/set20
|
||||
+++ b/nls/greek/set20
|
||||
@@ -19,7 +19,7 @@ $set 20
|
||||
16 -c ερμηνεία ΕΝΤΟΛΗς ως εσωτερικής ή εξωτερικής εντολής\n
|
||||
17 -v συσχέτιση όλων των πλήκτρων σε αντιστοιχία vi\n
|
||||
18 -e συσχέτιση όλων των πλήκτρων σε αντιστοιχία emacs\n
|
||||
-19 -d συσχέτιση όλων των πλήκτρων στην default του editor\n
|
||||
+19 -d συσχέτιση όλων των πλήκτρων στην default του editor (%s)\n
|
||||
20 -l εμφάνιση των εντολών του editor με περιγραφές\n
|
||||
21 -r κατάργηση συσχέτισης του ΠΛΗΚΤΡΟυ\n
|
||||
22 -k ερμηνεία ΠΛΗΚΤΡΟυ ως συμβολικό όνομα πλήκτρου βέλους\n
|
||||
diff --git a/nls/italian/set20 b/nls/italian/set20
|
||||
index 452601f..fb317cb 100644
|
||||
--- a/nls/italian/set20
|
||||
+++ b/nls/italian/set20
|
||||
@@ -19,7 +19,7 @@ $set 20
|
||||
16 -c interpreta COMANDO come un comando interno o esterno\n
|
||||
17 -v definisce tutti i tasti alla 'vi'\n
|
||||
18 -e definisce tutti i tasti alla 'emacs'\n
|
||||
-19 -d definisce tutti i tasti in base all'editor di default\n
|
||||
+19 -d definisce tutti i tasti in base all'editor di default (%s)\n
|
||||
20 -l elenca i comandi di modifica testo con relativa descrizione\n
|
||||
21 -r rimuove la definizione per TASTO\n
|
||||
22 -k interpreta TASTO come un nome simbolico di tasto freccia\n
|
||||
diff --git a/nls/pl/set20 b/nls/pl/set20
|
||||
index 370e41a..cf8d0b1 100644
|
||||
--- a/nls/pl/set20
|
||||
+++ b/nls/pl/set20
|
||||
@@ -19,7 +19,7 @@ $set 20
|
||||
16 -c interpret COMMAND as a builtin or external command\n
|
||||
17 -v bind all keys to vi bindings\n
|
||||
18 -e bind all keys to emacs bindings\n
|
||||
-19 -d bind all keys to default editor's bindings\n
|
||||
+19 -d bind all keys to default editor's bindings (%s)\n
|
||||
20 -l list editor commands with descriptions\n
|
||||
21 -r remove KEY's binding\n
|
||||
22 -k interpret KEY as a symbolic arrow-key name\n
|
||||
diff --git a/nls/russian/set20 b/nls/russian/set20
|
||||
index 9a3ccae..beb9ee0 100644
|
||||
--- a/nls/russian/set20
|
||||
+++ b/nls/russian/set20
|
||||
@@ -19,7 +19,7 @@ $set 20
|
||||
16 -c воспринимать КОМАНДу как встроенную или внешнюю команду\n
|
||||
17 -v привязать все клавиши в соответствии с редактором vi\n
|
||||
18 -e привязать все клавиши в соответствии с редактором emacs\n
|
||||
-19 -d привязать все клавиши в соответствии с редактором по умолчанию\n
|
||||
+19 -d привязать все клавиши в соответствии с редактором по умолчанию (%s)\n
|
||||
20 -l вывести список команд редактора и их описания\n
|
||||
21 -r удалить привязку КЛАВИШи\n
|
||||
22 -k воспринимать КЛАВИШу как явное название управляющей клавиши\n
|
||||
diff --git a/nls/spanish/set20 b/nls/spanish/set20
|
||||
index db82eba..0b0170d 100644
|
||||
--- a/nls/spanish/set20
|
||||
+++ b/nls/spanish/set20
|
||||
@@ -19,7 +19,7 @@ $set 20
|
||||
16 -c interpreta COMANDO como comando interno o externo\n
|
||||
17 -v usa las definiciones del editor vi\n
|
||||
18 -e usa las definiciones del editor vi\n
|
||||
-19 -d usa las definiciones del editor por defecto\n
|
||||
+19 -d usa las definiciones del editor por defecto (%s)\n
|
||||
20 -l lista los comandos del editor y sus descripciones\n
|
||||
21 -r elimina la definición asociada a TECLA\n
|
||||
22 -k interpreta TECLA como nombre simbólico de tecla de flecha\n
|
||||
diff --git a/nls/ukrainian/set20 b/nls/ukrainian/set20
|
||||
index 0ab79f8..04ae8de 100644
|
||||
--- a/nls/ukrainian/set20
|
||||
+++ b/nls/ukrainian/set20
|
||||
@@ -19,7 +19,7 @@ $set 20
|
||||
16 -c interpret COMMAND as a builtin or external command\n
|
||||
17 -v bind all keys to vi bindings\n
|
||||
18 -e bind all keys to emacs bindings\n
|
||||
-19 -d bind all keys to default editor's bindings\n
|
||||
+19 -d bind all keys to default editor's bindings (%s)\n
|
||||
20 -l list editor commands with descriptions\n
|
||||
21 -r remove KEY's binding\n
|
||||
22 -k interpret KEY as a symbolic arrow-key name\n
|
||||
diff --git a/tc.bind.c b/tc.bind.c
|
||||
index 46d2f17..3b3751a 100644
|
||||
--- a/tc.bind.c
|
||||
+++ b/tc.bind.c
|
||||
@@ -506,8 +506,14 @@ bindkey_usage(void)
|
||||
" -v bind all keys to vi bindings\n"));
|
||||
xprintf("%s", CGETS(20, 18,
|
||||
" -e bind all keys to emacs bindings\n"));
|
||||
- xprintf("%s", CGETS(20, 19,
|
||||
- " -d bind all keys to default editor's bindings\n"));
|
||||
+ xprintf(CGETS(20, 19,
|
||||
+ " -d bind all keys to default editor's bindings (%s)\n"),
|
||||
+#ifdef VIDEFAULT
|
||||
+ "vi"
|
||||
+#else /* EMACSDEFAULT */
|
||||
+ "emacs"
|
||||
+#endif /* VIDEFAULT */
|
||||
+ );
|
||||
xprintf("%s", CGETS(20, 20,
|
||||
" -l list editor commands with descriptions\n"));
|
||||
xprintf("%s", CGETS(20, 21,
|
||||
--
|
||||
2.5.5
|
||||
|
@ -1,647 +0,0 @@
|
||||
From 005513f8fa5235230da88b74cc38886ef22cfc5b Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Thu, 13 Aug 2015 08:55:30 +0000
|
||||
Subject: [PATCH 1/7] Fix the word boundary handling of vi-eword (which uses
|
||||
c_eword()) to be consistent with c_next_word() when VImode is set in the
|
||||
latter, using the word class definition from c_to_class(). Previously
|
||||
c_eword() used isword() which honors $wordchars. (Luke Mewburn)
|
||||
|
||||
---
|
||||
ed.chared.c | 27 ++++++++++++++++++---------
|
||||
1 file changed, 18 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/ed.chared.c b/ed.chared.c
|
||||
index c0bd41b..fc62bc5 100644
|
||||
--- a/ed.chared.c
|
||||
+++ b/ed.chared.c
|
||||
@@ -290,7 +290,7 @@ c_preword(Char *p, Char *low, int n, Char *delim)
|
||||
/*
|
||||
* c_to_class() returns the class of the given character.
|
||||
*
|
||||
- * This is used to make the c_prev_word() and c_next_word() functions
|
||||
+ * This is used to make the c_prev_word(), c_next_word() and c_eword() functions
|
||||
* work like vi's, which classify characters. A word is a sequence of
|
||||
* characters belonging to the same class, classes being defined as
|
||||
* follows:
|
||||
@@ -828,15 +828,24 @@ c_eword(Char *p, Char *high, int n)
|
||||
p++;
|
||||
|
||||
while (n--) {
|
||||
- while ((p < high) && Isspace(*p))
|
||||
- p++;
|
||||
+ int c_class;
|
||||
|
||||
- if (isword(*p))
|
||||
- while ((p < high) && isword(*p))
|
||||
- p++;
|
||||
- else
|
||||
- while ((p < high) && !(Isspace(*p) || isword(*p)))
|
||||
- p++;
|
||||
+ if (p >= high)
|
||||
+ break;
|
||||
+
|
||||
+ /* scan until end of current word (may be all whitespace!) */
|
||||
+ c_class = c_to_class(*p);
|
||||
+ while ((p < high) && c_class == c_to_class(*p))
|
||||
+ p++;
|
||||
+
|
||||
+ /* if this was a non_whitespace word, we're ready */
|
||||
+ if (c_class != C_CLASS_WHITE)
|
||||
+ continue;
|
||||
+
|
||||
+ /* otherwise, move to the end of the word just found */
|
||||
+ c_class = c_to_class(*p);
|
||||
+ while ((p < high) && c_class == c_to_class(*p))
|
||||
+ p++;
|
||||
}
|
||||
|
||||
p--;
|
||||
--
|
||||
2.5.5
|
||||
|
||||
|
||||
From c7619a43032fcc923382a540a364232ce1a92103 Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Thu, 13 Aug 2015 09:04:07 +0000
|
||||
Subject: [PATCH 2/7] Provide shell variable $vimode to control VImode. Set by
|
||||
bindkey -v Unset by bindkey -e If explicitly set or unset by the user,
|
||||
changes VImode appropriately. (Luke Mewburn)
|
||||
|
||||
---
|
||||
Fixes | 1 +
|
||||
ed.defns.c | 4 ++++
|
||||
sh.set.c | 5 +++++
|
||||
tc.const.c | 1 +
|
||||
4 files changed, 11 insertions(+)
|
||||
|
||||
diff --git a/Fixes b/Fixes
|
||||
index 811e67c..71e2c72 100644
|
||||
--- a/Fixes
|
||||
+++ b/Fixes
|
||||
@@ -1,3 +1,4 @@
|
||||
+ 6. expose VImode in $vimode (Luke Mewburn)
|
||||
5. display what the compiled in editor is in bindkey -d (Luke Mewburn)
|
||||
4. run-fg-editor improvements and documentation (Luke Mewburn)
|
||||
3. Fix parsing of 'if (cond)then' (Fridolin Pokorny)
|
||||
diff --git a/ed.defns.c b/ed.defns.c
|
||||
index c3de4be..ff4202f 100644
|
||||
--- a/ed.defns.c
|
||||
+++ b/ed.defns.c
|
||||
@@ -1889,6 +1889,7 @@ ed_InitVIMaps(void)
|
||||
int i;
|
||||
|
||||
VImode = 1;
|
||||
+ setNS(STRvimode);
|
||||
ResetXmap();
|
||||
for (i = 0; i < NT_NUM_KEYS; i++) {
|
||||
CcKeyMap[i] = CcViMap[i];
|
||||
@@ -1910,6 +1911,9 @@ ed_InitEmacsMaps(void)
|
||||
cstr.len = 2;
|
||||
|
||||
VImode = 0;
|
||||
+ if (adrof(STRvimode))
|
||||
+ unsetv(STRvimode);
|
||||
+
|
||||
ResetXmap();
|
||||
for (i = 0; i < NT_NUM_KEYS; i++) {
|
||||
CcKeyMap[i] = CcEmacsMap[i];
|
||||
diff --git a/sh.set.c b/sh.set.c
|
||||
index 1a19713..abb0236 100644
|
||||
--- a/sh.set.c
|
||||
+++ b/sh.set.c
|
||||
@@ -165,6 +165,9 @@ update_vars(Char *vp)
|
||||
noediting = 0;
|
||||
/* PWP: add more stuff in here later */
|
||||
}
|
||||
+ else if (eq(vp, STRvimode)) {
|
||||
+ VImode = 1;
|
||||
+ }
|
||||
else if (eq(vp, STRshlvl)) {
|
||||
tsetenv(STRKSHLVL, varval(vp));
|
||||
}
|
||||
@@ -792,6 +795,8 @@ unset(Char **v, struct command *c)
|
||||
SetKillRing(0);
|
||||
if (did_edit && noediting && adrof(STRedit) == 0)
|
||||
noediting = 0;
|
||||
+ if (adrof(STRvimode) == 0)
|
||||
+ VImode = 0;
|
||||
if (did_roe && adrof(STRrecognize_only_executables) == 0)
|
||||
tw_cmd_free();
|
||||
if (adrof(STRhistory) == 0)
|
||||
diff --git a/tc.const.c b/tc.const.c
|
||||
index f4969ff..06ddd2b 100644
|
||||
--- a/tc.const.c
|
||||
+++ b/tc.const.c
|
||||
@@ -86,6 +86,7 @@ Char STRMACHTYPE[] = { 'M', 'A', 'C', 'H', 'T', 'Y', 'P', 'E', '\0' };
|
||||
Char STROSTYPE[] = { 'O', 'S', 'T', 'Y', 'P', 'E', '\0' };
|
||||
Char STRedit[] = { 'e', 'd', 'i', 't', '\0' };
|
||||
Char STReditors[] = { 'e', 'd', 'i', 't', 'o', 'r', 's', '\0' };
|
||||
+Char STRvimode[] = { 'v', 'i', 'm', 'o', 'd', 'e', '\0' };
|
||||
Char STRaddsuffix[] = { 'a', 'd', 'd', 's', 'u', 'f', 'f', 'i', 'x',
|
||||
'\0' };
|
||||
Char STRcsubstnonl[] = { 'c', 's', 'u', 'b', 's', 't', 'n', 'o', 'n', 'l',
|
||||
--
|
||||
2.5.5
|
||||
|
||||
|
||||
From 8a6d8efbc62e4d52d4121015c5eb97934b687ee2 Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Thu, 13 Aug 2015 09:05:21 +0000
|
||||
Subject: [PATCH 3/7] If VImode=1, use "_" as the default for $wordchars, to
|
||||
match vi's default.
|
||||
|
||||
Provide a separate STR_WORD_CHARS_VI global for the default for vi.
|
||||
Provide update_wordchars() to be called if VImode is changed to change
|
||||
word_char if necessary.
|
||||
---
|
||||
Fixes | 1 +
|
||||
ed.defns.c | 3 +++
|
||||
sh.c | 1 +
|
||||
sh.decls.h | 1 +
|
||||
sh.h | 7 +++++--
|
||||
sh.set.c | 10 ++++++++++
|
||||
6 files changed, 21 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Fixes b/Fixes
|
||||
index 71e2c72..0481286 100644
|
||||
--- a/Fixes
|
||||
+++ b/Fixes
|
||||
@@ -1,3 +1,4 @@
|
||||
+ 7. more correct $wordchars for vimode (Luke Mewburn)
|
||||
6. expose VImode in $vimode (Luke Mewburn)
|
||||
5. display what the compiled in editor is in bindkey -d (Luke Mewburn)
|
||||
4. run-fg-editor improvements and documentation (Luke Mewburn)
|
||||
diff --git a/ed.defns.c b/ed.defns.c
|
||||
index ff4202f..2b2abff 100644
|
||||
--- a/ed.defns.c
|
||||
+++ b/ed.defns.c
|
||||
@@ -1890,6 +1890,8 @@ ed_InitVIMaps(void)
|
||||
|
||||
VImode = 1;
|
||||
setNS(STRvimode);
|
||||
+ update_wordchars();
|
||||
+
|
||||
ResetXmap();
|
||||
for (i = 0; i < NT_NUM_KEYS; i++) {
|
||||
CcKeyMap[i] = CcViMap[i];
|
||||
@@ -1913,6 +1915,7 @@ ed_InitEmacsMaps(void)
|
||||
VImode = 0;
|
||||
if (adrof(STRvimode))
|
||||
unsetv(STRvimode);
|
||||
+ update_wordchars();
|
||||
|
||||
ResetXmap();
|
||||
for (i = 0; i < NT_NUM_KEYS; i++) {
|
||||
diff --git a/sh.c b/sh.c
|
||||
index b941bf7..8d219d3 100644
|
||||
--- a/sh.c
|
||||
+++ b/sh.c
|
||||
@@ -345,6 +345,7 @@ main(int argc, char **argv)
|
||||
# endif
|
||||
#endif
|
||||
STR_WORD_CHARS = SAVE(WORD_CHARS);
|
||||
+ STR_WORD_CHARS_VI = SAVE(WORD_CHARS_VI);
|
||||
|
||||
HIST = '!';
|
||||
HISTSUB = '^';
|
||||
diff --git a/sh.decls.h b/sh.decls.h
|
||||
index 2c29732..78bbed9 100644
|
||||
--- a/sh.decls.h
|
||||
+++ b/sh.decls.h
|
||||
@@ -399,6 +399,7 @@ extern void autoset_dspmbyte (const Char *);
|
||||
#if defined(AUTOSET_KANJI)
|
||||
extern void autoset_kanji (void);
|
||||
#endif
|
||||
+extern void update_wordchars (void);
|
||||
|
||||
/*
|
||||
* sh.time.c
|
||||
diff --git a/sh.h b/sh.h
|
||||
index 75de557..51d3f3b 100644
|
||||
--- a/sh.h
|
||||
+++ b/sh.h
|
||||
@@ -1161,12 +1161,14 @@ extern struct mesg {
|
||||
const char *pname; /* print name */
|
||||
} mesg[];
|
||||
|
||||
-/* word_chars is set by default to WORD_CHARS but can be overridden by
|
||||
- the worchars variable--if unset, reverts to WORD_CHARS */
|
||||
+/* word_chars is set by default to WORD_CHARS (or WORD_CHARS_VI) but can
|
||||
+ be overridden by the wordchars variable--if unset, reverts to
|
||||
+ WORD_CHARS (or WORD_CHARS_VI) */
|
||||
|
||||
EXTERN Char *word_chars;
|
||||
|
||||
#define WORD_CHARS "*?_-.[]~=" /* default chars besides alnums in words */
|
||||
+#define WORD_CHARS_VI "_" /* default chars besides alnums in words */
|
||||
|
||||
EXTERN Char *STR_SHELLPATH;
|
||||
|
||||
@@ -1174,6 +1176,7 @@ EXTERN Char *STR_SHELLPATH;
|
||||
EXTERN Char *STR_BSHELL;
|
||||
#endif
|
||||
EXTERN Char *STR_WORD_CHARS;
|
||||
+EXTERN Char *STR_WORD_CHARS_VI;
|
||||
EXTERN Char **STR_environ IZERO;
|
||||
|
||||
extern int dont_free; /* Tell free that we are in danger if we free */
|
||||
diff --git a/sh.set.c b/sh.set.c
|
||||
index abb0236..52602f0 100644
|
||||
--- a/sh.set.c
|
||||
+++ b/sh.set.c
|
||||
@@ -167,6 +167,7 @@ update_vars(Char *vp)
|
||||
}
|
||||
else if (eq(vp, STRvimode)) {
|
||||
VImode = 1;
|
||||
+ update_wordchars();
|
||||
}
|
||||
else if (eq(vp, STRshlvl)) {
|
||||
tsetenv(STRKSHLVL, varval(vp));
|
||||
@@ -808,6 +809,7 @@ unset(Char **v, struct command *c)
|
||||
#if defined(KANJI) && defined(SHORT_STRINGS) && defined(DSPMBYTE)
|
||||
update_dspmbyte_vars();
|
||||
#endif
|
||||
+ update_wordchars();
|
||||
#ifdef NLS_CATALOGS
|
||||
nlsclose();
|
||||
nlsinit();
|
||||
@@ -1316,3 +1318,11 @@ autoset_kanji(void)
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
+
|
||||
+void
|
||||
+update_wordchars(void)
|
||||
+{
|
||||
+ if ((word_chars == STR_WORD_CHARS) || (word_chars == STR_WORD_CHARS_VI)) {
|
||||
+ word_chars = (VImode ? STR_WORD_CHARS_VI : STR_WORD_CHARS);
|
||||
+ }
|
||||
+}
|
||||
--
|
||||
2.5.5
|
||||
|
||||
|
||||
From 11d982273f8b12271363b530cd0c674b6ce87817 Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Thu, 13 Aug 2015 09:06:33 +0000
|
||||
Subject: [PATCH 4/7] Modify c_to_class() to use isword(); this matches alnum +
|
||||
$wordchars rather than just alnum + "_".
|
||||
|
||||
Rename C_CLASS_ALNUM to C_CLASS_WORD.
|
||||
(Luke Mewburn)
|
||||
---
|
||||
ed.chared.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/ed.chared.c b/ed.chared.c
|
||||
index fc62bc5..800f3ed 100644
|
||||
--- a/ed.chared.c
|
||||
+++ b/ed.chared.c
|
||||
@@ -93,7 +93,7 @@ RCSID("$tcsh$")
|
||||
* from: Gert-Jan Vons <vons@cesar.crbca1.sinet.slb.com>
|
||||
*/
|
||||
#define C_CLASS_WHITE 1
|
||||
-#define C_CLASS_ALNUM 2
|
||||
+#define C_CLASS_WORD 2
|
||||
#define C_CLASS_OTHER 3
|
||||
|
||||
static Char *InsertPos = InputBuf; /* Where insertion starts */
|
||||
@@ -305,8 +305,8 @@ c_to_class(Char ch)
|
||||
if (Isspace(ch))
|
||||
return C_CLASS_WHITE;
|
||||
|
||||
- if (Isdigit(ch) || Isalpha(ch) || ch == '_')
|
||||
- return C_CLASS_ALNUM;
|
||||
+ if (isword(ch))
|
||||
+ return C_CLASS_WORD;
|
||||
|
||||
return C_CLASS_OTHER;
|
||||
}
|
||||
--
|
||||
2.5.5
|
||||
|
||||
|
||||
From 675e8d9b6b26e8f6b2c70b58a928faceb7db10dd Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Wed, 19 Aug 2015 14:29:55 +0000
|
||||
Subject: [PATCH 5/7] rename e_capitolcase ->e_capitalcase (Luke Mewburn)
|
||||
|
||||
---
|
||||
ed.chared.c | 2 +-
|
||||
ed.decls.h | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/ed.chared.c b/ed.chared.c
|
||||
index 800f3ed..1277e53 100644
|
||||
--- a/ed.chared.c
|
||||
+++ b/ed.chared.c
|
||||
@@ -3034,7 +3034,7 @@ e_uppercase(Char c)
|
||||
|
||||
/*ARGSUSED*/
|
||||
CCRETVAL
|
||||
-e_capitolcase(Char c)
|
||||
+e_capitalcase(Char c)
|
||||
{
|
||||
Char *cp, *end;
|
||||
|
||||
diff --git a/ed.decls.h b/ed.decls.h
|
||||
index a2dd671..defb558 100644
|
||||
--- a/ed.decls.h
|
||||
+++ b/ed.decls.h
|
||||
@@ -142,7 +142,7 @@ extern CCRETVAL e_wordfwd (Char);
|
||||
extern CCRETVAL v_wordbegnext (Char);
|
||||
extern CCRETVAL e_uppercase (Char);
|
||||
extern CCRETVAL e_lowercase (Char);
|
||||
-extern CCRETVAL e_capitolcase (Char);
|
||||
+extern CCRETVAL e_capitalcase (Char);
|
||||
extern CCRETVAL e_cleardisp (Char);
|
||||
extern CCRETVAL e_complete (Char);
|
||||
extern CCRETVAL e_correct (Char);
|
||||
--
|
||||
2.5.5
|
||||
|
||||
|
||||
From ee37323a0e2cfc912801350b9d1a8b063b6338a6 Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Thu, 20 Aug 2015 07:56:41 +0000
|
||||
Subject: [PATCH 6/7] Various improvements from Luke Mewburn: * Document vimode
|
||||
state changed by bindkey -e and -d, with manual override. * Document
|
||||
wordchars default changing based on vimode state. * Use "emacs(1)" instead of
|
||||
"GNU Emacs". * Use "...\-style" instead of "...-like" when referring to
|
||||
editor behavior. * Note which key bindings have different word boundary or
|
||||
cursor behavior depending on whether vimode is set or not.
|
||||
|
||||
---
|
||||
tcsh.man | 107 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--------
|
||||
1 file changed, 94 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/tcsh.man b/tcsh.man
|
||||
index 80c14b6..0a35405 100644
|
||||
--- a/tcsh.man
|
||||
+++ b/tcsh.man
|
||||
@@ -256,13 +256,13 @@ Finally, \fBEditor commands\fR lists and describes
|
||||
the editor commands specific to the shell and their default bindings.
|
||||
.SS "The command-line editor (+)"
|
||||
Command-line input can be edited using key sequences much like those used in
|
||||
-GNU Emacs or \fIvi\fR(1).
|
||||
+\fIemacs\fR(1) or \fIvi\fR(1).
|
||||
The editor is active only when the \fBedit\fR shell variable is set, which
|
||||
it is by default in interactive shells.
|
||||
The \fIbindkey\fR builtin can display and change key bindings.
|
||||
-Emacs-style key bindings are used by default
|
||||
+\fIemacs\fR(1)\-style key bindings are used by default
|
||||
(unless the shell was compiled otherwise; see the \fBversion\fR shell variable),
|
||||
-but \fIbindkey\fR can change the key bindings to \fIvi\fR-style bindings en masse.
|
||||
+but \fIbindkey\fR can change the key bindings to \fIvi\fR(1)\-style bindings en masse.
|
||||
.PP
|
||||
The shell always binds the arrow keys (as defined in the \fBTERMCAP\fR
|
||||
environment variable) to
|
||||
@@ -289,10 +289,12 @@ One can set the arrow key escape sequences to the empty string with \fIsettc\fR
|
||||
to prevent these bindings.
|
||||
The ANSI/VT100 sequences for arrow keys are always bound.
|
||||
.PP
|
||||
-Other key bindings are, for the most part, what Emacs and \fIvi\fR(1)
|
||||
+Other key bindings are, for the most part, what \fIemacs\fR(1) and \fIvi\fR(1)
|
||||
users would expect and can easily be displayed by \fIbindkey\fR, so there
|
||||
is no need to list them here. Likewise, \fIbindkey\fR can list the editor
|
||||
commands with a short description of each.
|
||||
+Certain key bindings have different behavior depending if \fIemacs\fR(1) or \fIvi\fR(1)
|
||||
+style bindings are being used; see \fBvimode\fR for more information.
|
||||
.PP
|
||||
Note that editor commands do not have the same notion of a ``word'' as does the
|
||||
shell. The editor delimits words with any non-alphanumeric characters not in
|
||||
@@ -553,6 +555,26 @@ on terminals without a meta key. Case counts, but commands that are bound
|
||||
to letters by default are bound to both lower- and uppercase letters for
|
||||
convenience.
|
||||
.TP 8
|
||||
+.B backward-char \fR(^B, left)
|
||||
+Move back a character.
|
||||
+Cursor behavior modified by \fBvimode\fR.
|
||||
+.TP 8
|
||||
+.B backward-delete-word \fR(M-^H, M-^?)
|
||||
+Cut from beginning of current word to cursor \- saved in cut buffer.
|
||||
+Word boundary behavior modified by \fBvimode\fR.
|
||||
+.TP 8
|
||||
+.B backward-word \fR(M-b, M-B)
|
||||
+Move to beginning of current word.
|
||||
+Word boundary and cursor behavior modified by \fBvimode\fR.
|
||||
+.TP 8
|
||||
+.B beginning-of-line \fR(^A, home)
|
||||
+Move to beginning of line.
|
||||
+Cursor behavior modified by \fBvimode\fR.
|
||||
+.TP 8
|
||||
+.B capitalize-word \fR(M-c, M-C)
|
||||
+Capitalize the characters from cursor to end of current word.
|
||||
+Word boundary behavior modified by \fBvimode\fR.
|
||||
+.TP 8
|
||||
.B complete-word \fR(tab)
|
||||
Completes a word as described under \fBCompletion and listing\fR.
|
||||
.TP 8
|
||||
@@ -570,6 +592,7 @@ Like \fIcomplete-word\fR, but ignores user-defined completions.
|
||||
.B copy-prev-word \fR(M-^_)
|
||||
Copies the previous word in the current line into the input buffer.
|
||||
See also \fIinsert-last-word\fR.
|
||||
+Word boundary behavior modified by \fBvimode\fR.
|
||||
.TP 8
|
||||
.B dabbrev-expand \fR(M-/)
|
||||
Expands the current word to the most recent preceding one for which
|
||||
@@ -582,11 +605,13 @@ much like \fIhistory-search-backward\fR does.
|
||||
.B delete-char \fR(not bound)
|
||||
Deletes the character under the cursor.
|
||||
See also \fIdelete-char-or-list-or-eof\fR.
|
||||
+Cursor behavior modified by \fBvimode\fR.
|
||||
.TP 8
|
||||
.B delete-char-or-eof \fR(not bound)
|
||||
Does \fIdelete-char\fR if there is a character under the cursor
|
||||
or \fIend-of-file\fR on an empty line.
|
||||
See also \fIdelete-char-or-list-or-eof\fR.
|
||||
+Cursor behavior modified by \fBvimode\fR.
|
||||
.TP 8
|
||||
.B delete-char-or-list \fR(not bound)
|
||||
Does \fIdelete-char\fR if there is a character under the cursor
|
||||
@@ -601,14 +626,26 @@ See also those three commands, each of which does only a single action, and
|
||||
\fIdelete-char-or-eof\fR, \fIdelete-char-or-list\fR and \fIlist-or-eof\fR,
|
||||
each of which does a different two out of the three.
|
||||
.TP 8
|
||||
+.B delete-word \fR(M-d, M-D)
|
||||
+Cut from cursor to end of current word \- save in cut buffer.
|
||||
+Word boundary behavior modified by \fBvimode\fR.
|
||||
+.TP 8
|
||||
.B down-history \fR(down-arrow, ^N)
|
||||
Like \fIup-history\fR, but steps down, stopping at the original input line.
|
||||
.TP 8
|
||||
+.B downcase-word \fR(M-l, M-L)
|
||||
+Lowercase the characters from cursor to end of current word.
|
||||
+Word boundary behavior modified by \fBvimode\fR.
|
||||
+.TP 8
|
||||
.B end-of-file \fR(not bound)
|
||||
Signals an end of file, causing the shell to exit unless the \fBignoreeof\fR
|
||||
shell variable (q.v.) is set to prevent this.
|
||||
See also \fIdelete-char-or-list-or-eof\fR.
|
||||
.TP 8
|
||||
+.B end-of-line \fR(^E, end)
|
||||
+Move cursor to end of line.
|
||||
+Cursor behavior modified by \fBvimode\fR.
|
||||
+.TP 8
|
||||
.B expand-history \fR(M-space)
|
||||
Expands history substitutions in the current word.
|
||||
See \fBHistory substitution\fR.
|
||||
@@ -627,6 +664,14 @@ expands history substitutions in each word in the input buffer.
|
||||
Expands the variable to the left of the cursor.
|
||||
See \fBVariable substitution\fR.
|
||||
.TP 8
|
||||
+.B forward-char \fR(^F, right)
|
||||
+Move forward one character.
|
||||
+Cursor behavior modified by \fBvimode\fR.
|
||||
+.TP 8
|
||||
+.B forward-word \fR(M-f, M-F)
|
||||
+Move forward to end of current word.
|
||||
+Word boundary and cursor behavior modified by \fBvimode\fR.
|
||||
+.TP 8
|
||||
.B history-search-backward \fR(M-p, M-P)
|
||||
Searches backwards through the history list for a command beginning with
|
||||
the current contents of the input buffer up to the cursor and copies it
|
||||
@@ -675,12 +720,13 @@ Any other character not bound to \fIself-insert-command\fR terminates the
|
||||
search, leaving the current line in the input buffer, and
|
||||
is then interpreted as normal input. In particular, a carriage return
|
||||
causes the current line to be executed.
|
||||
-Emacs mode only.
|
||||
See also \fIi-search-fwd\fR and \fIhistory-search-backward\fR.
|
||||
+Word boundary behavior modified by \fBvimode\fR.
|
||||
.RE
|
||||
.TP 8
|
||||
.B i-search-fwd \fR(not bound)
|
||||
Like \fIi-search-back\fR, but searches forward.
|
||||
+Word boundary behavior modified by \fBvimode\fR.
|
||||
.TP 8
|
||||
.B insert-last-word \fR(M-_)
|
||||
Inserts the last word of the previous input line (`!$') into the input buffer.
|
||||
@@ -786,6 +832,18 @@ Copies the previous entry in the history list into the input buffer.
|
||||
If \fBhistlit\fR is set, uses the literal form of the entry.
|
||||
May be repeated to step up through the history list, stopping at the top.
|
||||
.TP 8
|
||||
+.B upcase-word \fR(M-u, M-U)
|
||||
+Uppercase the characters from cursor to end of current word.
|
||||
+Word boundary behavior modified by \fBvimode\fR.
|
||||
+.TP 8
|
||||
+.B vi-beginning-of-next-word \fR(not bound)
|
||||
+Vi goto the beginning of next word.
|
||||
+Word boundary and cursor behavior modified by \fBvimode\fR.
|
||||
+.TP 8
|
||||
+.B vi-eword \fR(not bound)
|
||||
+Vi move to the end of the current word.
|
||||
+Word boundary behavior modified by \fBvimode\fR.
|
||||
+.TP 8
|
||||
.B vi-search-back \fR(?)
|
||||
Prompts with `?' for a search string (which may be a glob-pattern, as with
|
||||
\fIhistory-search-backward\fR), searches for it and copies it into the
|
||||
@@ -2179,17 +2237,20 @@ Options include:
|
||||
Lists all editor commands and a short description of each.
|
||||
.TP 4
|
||||
.B \-d
|
||||
-Binds all keys to the standard bindings for the default editor.
|
||||
+Binds all keys to the standard bindings for the default editor,
|
||||
+as per \fB-e\fR and \fB-v\fR below.
|
||||
.TP 4
|
||||
.B \-e
|
||||
-Binds all keys to the standard GNU Emacs-like bindings.
|
||||
+Binds all keys to \fIemacs\fR(1)\-style bindings.
|
||||
+Unsets \fBvimode\fR.
|
||||
.TP 4
|
||||
.B \-v
|
||||
-Binds all keys to the standard \fIvi\fR(1)-like bindings.
|
||||
+Binds all keys to \fIvi\fR(1)\-style bindings.
|
||||
+Sets \fBvimode\fR.
|
||||
.TP 4
|
||||
.B \-a
|
||||
Lists or changes key-bindings in the alternative key map.
|
||||
-This is the key map used in \fIvi\fR command mode.
|
||||
+This is the key map used in \fBvimode\fR command mode.
|
||||
.TP 4
|
||||
.B \-b
|
||||
\fIkey\fR is interpreted as
|
||||
@@ -4675,7 +4736,7 @@ nd
|
||||
`.' is omitted from \fBpath\fR for security
|
||||
.TP 6
|
||||
vi
|
||||
-\fIvi\fR-style editing is the default rather than \fIemacs\fR
|
||||
+\fIvi\fR(1)\-style editing is the default rather than \fIemacs\fR(1)\-style
|
||||
.TP 6
|
||||
dtr
|
||||
Login shells drop DTR when exiting
|
||||
@@ -4713,6 +4774,23 @@ An administrator may enter additional strings to indicate differences
|
||||
in the local version.
|
||||
.RE
|
||||
.TP 8
|
||||
+.B vimode \fR(+)
|
||||
+.RS +8
|
||||
+If unset, various key bindings change behavior to be more \fBemacs\fR(1)\-style:
|
||||
+word boundaries are determined by \fBwordchars\fR versus other characters.
|
||||
+.PP
|
||||
+If set, various key bindings change behavior to be more \fBvi\fR(1)\-style:
|
||||
+word boundaries are determined by \fBwordchars\fR versus whitespace
|
||||
+versus other characters;
|
||||
+cursor behavior depends upon current vi mode (command, delete, insert, replace).
|
||||
+.PP
|
||||
+This variable is unset by \fIbindkey\fR \fB-e\fR and
|
||||
+set by \fIbindkey\fR \fB-v\fR.
|
||||
+.B vimode
|
||||
+may be explicitly set or unset by the user after those \fIbindkey\fR
|
||||
+operations if required.
|
||||
+.RE
|
||||
+.TP 8
|
||||
.B visiblebell \fR(+)
|
||||
If set, a screen flash is used rather than the audible bell.
|
||||
See also \fBnobeep\fR.
|
||||
@@ -4777,7 +4855,9 @@ which don't store the remote hostname.
|
||||
.B wordchars \fR(+)
|
||||
A list of non-alphanumeric characters to be considered part of a word by the
|
||||
\fIforward-word\fR, \fIbackward-word\fR etc., editor commands.
|
||||
-If unset, `*?_\-.[]~=' is used.
|
||||
+If unset, the default value is determined based on the state of \fBvimode\fR:
|
||||
+if \fBvimode\fR is unset, `*?_\-.[]~=' is used as the default;
|
||||
+if \fBvimode\fR is set, `_' is used as the default.
|
||||
.SH ENVIRONMENT
|
||||
.TP 8
|
||||
.B AFSUSER \fR(+)
|
||||
@@ -5100,8 +5180,9 @@ This manual describes \fItcsh\fR as a single entity,
|
||||
but experienced \fIcsh\fR(1) users will want to pay special attention to
|
||||
\fItcsh\fR's new features.
|
||||
.PP
|
||||
-A command-line editor, which supports GNU Emacs or \fIvi\fR(1)-style
|
||||
-key bindings. See \fBThe command-line editor\fR and \fBEditor commands\fR.
|
||||
+A command-line editor, which supports \fIemacs\fR(1)\-style
|
||||
+or \fIvi\fR(1)\-style key bindings.
|
||||
+See \fBThe command-line editor\fR and \fBEditor commands\fR.
|
||||
.PP
|
||||
Programmable, interactive word completion and listing.
|
||||
See \fBCompletion and listing\fR and the \fIcomplete\fR and \fIuncomplete\fR
|
||||
--
|
||||
2.5.5
|
||||
|
||||
|
||||
From 660f11b691b66eb991fd03c644a8b93908b8d844 Mon Sep 17 00:00:00 2001
|
||||
From: kim <kim>
|
||||
Date: Mon, 24 Aug 2015 20:08:24 +0000
|
||||
Subject: [PATCH 7/7] Fix e_capitolcase to e_capitalcase
|
||||
|
||||
---
|
||||
ed.defns.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/ed.defns.c b/ed.defns.c
|
||||
index 2b2abff..60ef193 100644
|
||||
--- a/ed.defns.c
|
||||
+++ b/ed.defns.c
|
||||
@@ -151,7 +151,7 @@ PFCmd CcFuncTbl[] = { /* table of available commands */
|
||||
#define F_CASEUPPER 54
|
||||
e_lowercase,
|
||||
#define F_CASELOWER 55
|
||||
- e_capitolcase,
|
||||
+ e_capitalcase,
|
||||
#define F_CASECAPITAL 56
|
||||
v_zero,
|
||||
#define V_ZERO 57
|
||||
--
|
||||
2.5.5
|
||||
|
@ -1,58 +0,0 @@
|
||||
From c43b072b89f19e9b41d45bdf3946593ae9bc6e5e Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Mon, 24 Aug 2015 07:08:42 +0000
|
||||
Subject: [PATCH 1/2] restrict BSDWAIT to __GLIBC__ because other linux
|
||||
libraries (muslc) don't have the macros.
|
||||
|
||||
---
|
||||
sh.proc.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/sh.proc.c b/sh.proc.c
|
||||
index 76eca3b..ad07250 100644
|
||||
--- a/sh.proc.c
|
||||
+++ b/sh.proc.c
|
||||
@@ -47,7 +47,7 @@ RCSID("$tcsh$")
|
||||
# define HZ 16
|
||||
#endif /* aiws */
|
||||
|
||||
-#if defined(_BSD) || (defined(IRIS4D) && __STDC__) || defined(__lucid) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)
|
||||
+#if defined(_BSD) || (defined(IRIS4D) && __STDC__) || defined(__lucid) || defined(__GLIBC__)
|
||||
# if !defined(__ANDROID__)
|
||||
# define BSDWAIT
|
||||
# endif
|
||||
--
|
||||
2.5.5
|
||||
|
||||
|
||||
From eab72f9797ec4faaf1fb4de491c357f194b84dd6 Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Thu, 14 Apr 2016 11:09:09 +0000
|
||||
Subject: [PATCH 2/2] GLIBC is getting rid of union wait.
|
||||
|
||||
---
|
||||
sh.proc.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/sh.proc.c b/sh.proc.c
|
||||
index ad07250..5c68409 100644
|
||||
--- a/sh.proc.c
|
||||
+++ b/sh.proc.c
|
||||
@@ -47,11 +47,11 @@ RCSID("$tcsh$")
|
||||
# define HZ 16
|
||||
#endif /* aiws */
|
||||
|
||||
-#if defined(_BSD) || (defined(IRIS4D) && __STDC__) || defined(__lucid) || defined(__GLIBC__)
|
||||
-# if !defined(__ANDROID__)
|
||||
+#if defined(_BSD) || (defined(IRIS4D) && __STDC__) || defined(__lucid) || defined(__linux__) || defined(__GNU__)
|
||||
+# if !defined(__ANDROID__) && !defined(__GLIBC__)
|
||||
# define BSDWAIT
|
||||
# endif
|
||||
-#endif /* _BSD || (IRIS4D && __STDC__) || __lucid || glibc */
|
||||
+#endif /* _BSD || (IRIS4D && __STDC__) || __lucid || gnu-linux */
|
||||
#ifndef WTERMSIG
|
||||
# define WTERMSIG(w) (((union wait *) &(w))->w_termsig)
|
||||
# ifndef BSDWAIT
|
||||
--
|
||||
2.5.5
|
||||
|
@ -1,78 +0,0 @@
|
||||
From db1c9b4ef9e30ec12a0a3cd15311ddfb208ef57c Mon Sep 17 00:00:00 2001
|
||||
From: kim <kim>
|
||||
Date: Mon, 24 Aug 2015 20:09:04 +0000
|
||||
Subject: [PATCH 1/2] Set LC_COLLATE=C when calling sort for reproducible
|
||||
results.
|
||||
|
||||
---
|
||||
Makefile.in | 2 +-
|
||||
Makefile.std | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index 6d1f964..1ef8cb7 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -533,7 +533,7 @@ tc.const.h: tc.const.c sh.char.h config.h config_f.h sh.types.h sh.err.h
|
||||
${CPP} $(CPPFLAGS) ${DFLAGS} ${EXTRAFLAGS} -D_h_tc_const\
|
||||
$(srcdir)/tc.const.c | \
|
||||
sed -n -e 's/^\(Char STR[a-zA-Z0-9_]*\) *\[ *\].*/extern \1[];/p' | \
|
||||
- sort >> $@.tmp
|
||||
+ LC_COLLATE=C sort >> $@.tmp
|
||||
@echo '#endif /* _h_tc_const */' >> $@.tmp
|
||||
@if [ -f $@ ] && cmp -s $@.tmp $@; then echo $@ unchanged.; rm -f $@.tmp; else mv -f $@.tmp $@; echo $@ recreated.; fi
|
||||
|
||||
diff --git a/Makefile.std b/Makefile.std
|
||||
index 2cbc1b1..5d2e89f 100644
|
||||
--- a/Makefile.std
|
||||
+++ b/Makefile.std
|
||||
@@ -425,7 +425,7 @@ tc.const.h: tc.const.c sh.char.h config.h config_f.h sh.types.h sh.err.h
|
||||
${CPP} $(INCLUDES) ${DFLAGS} ${EXTRAFLAGS} -D_h_tc_const\
|
||||
$(srcdir)/tc.const.c | grep 'Char STR' | \
|
||||
sed -e 's/Char \([a-zA-Z0-9_]*\) *\[ *\].*/extern Char \1[];/' | \
|
||||
- sort >> $@
|
||||
+ LC_COLLATE=C sort >> $@
|
||||
@echo '#endif /* _h_tc_const */' >> $@
|
||||
|
||||
csh.prof: ${OBJS} sh.prof.${SUF} mcrt0.${SUF}
|
||||
--
|
||||
2.5.5
|
||||
|
||||
|
||||
From 52fb6c229feea0ccaa3002b4d2b681e60922a4df Mon Sep 17 00:00:00 2001
|
||||
From: kim <kim>
|
||||
Date: Wed, 26 Aug 2015 09:50:31 +0000
|
||||
Subject: [PATCH 2/2] Add a Makefile for creating the HTML version of the
|
||||
manual page.
|
||||
|
||||
---
|
||||
Makefile.man2html | 17 +++++++++++++++++
|
||||
1 file changed, 17 insertions(+)
|
||||
create mode 100644 Makefile.man2html
|
||||
|
||||
diff --git a/Makefile.man2html b/Makefile.man2html
|
||||
new file mode 100644
|
||||
index 0000000..a1bd86a
|
||||
--- /dev/null
|
||||
+++ b/Makefile.man2html
|
||||
@@ -0,0 +1,17 @@
|
||||
+#
|
||||
+# Create the HTML version of the manual page
|
||||
+#
|
||||
+
|
||||
+CGI=tcsh.html/tcsh.cgi
|
||||
+
|
||||
+tcsh.html/top.html: tcsh.man tcsh.man2html
|
||||
+ perl tcsh.man2html -i
|
||||
+ -rm -f tcsh.html/index.html
|
||||
+ chmod -R a+rX tcsh.html
|
||||
+ mv ${CGI} ${CGI}.bak
|
||||
+ sed -e '1s,^.*$$,#!/usr/bin/perl,' < ${CGI}.bak > ${CGI}
|
||||
+ chmod a+rx ${CGI}
|
||||
+ rm -f ${CGI}.bak
|
||||
+
|
||||
+clean:
|
||||
+ -rm -rf tcsh.html
|
||||
--
|
||||
2.5.5
|
||||
|
@ -1,62 +0,0 @@
|
||||
From 619fc5790690dc8e0b5b955f7ffb2cd0d0e3626f Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Wed, 26 Aug 2015 07:57:17 +0000
|
||||
Subject: [PATCH 1/2] don't quote the expanded by completion name otherwise "echo
|
||||
$vers<tab><return>" prints Illegal variable name.
|
||||
|
||||
---
|
||||
tw.parse.c | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/tw.parse.c b/tw.parse.c
|
||||
index 94982d6..e506e8d 100644
|
||||
--- a/tw.parse.c
|
||||
+++ b/tw.parse.c
|
||||
@@ -1332,7 +1332,6 @@ tw_fixword(int looking, struct Strbuf *word, Char *dir, Char *exp_name)
|
||||
break;
|
||||
}
|
||||
|
||||
- (void) quote(exp_name);
|
||||
Strbuf_append(word, exp_name); /* add extended name */
|
||||
Strbuf_terminate(word);
|
||||
} /* end tw_fixword */
|
||||
--
|
||||
2.5.5
|
||||
|
||||
From 6988dbc74d5c5ebed0bd8378793f9315dd8f7651 Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Fri, 16 Oct 2015 14:59:56 +0000
|
||||
Subject: [PATCH 2/2] Fix quoting problem with tab completing a file with a
|
||||
space not having a backslash inserted. Revert previous fix and fix the real
|
||||
bug in the quoting invalid byte check.
|
||||
|
||||
---
|
||||
tw.parse.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tw.parse.c b/tw.parse.c
|
||||
index e506e8d..affcf55 100644
|
||||
--- a/tw.parse.c
|
||||
+++ b/tw.parse.c
|
||||
@@ -621,9 +621,8 @@ insert_meta(const Char *cp, const Char *cpend, const Char *word,
|
||||
#if INVALID_BYTE != 0
|
||||
/* add checking INVALID_BYTE for FIX UTF32 */
|
||||
if ((w & INVALID_BYTE) != INVALID_BYTE) /* w < INVALID_BYTE */
|
||||
-#else
|
||||
- w &= ~QUOTE;
|
||||
#endif
|
||||
+ w &= ~QUOTE;
|
||||
|
||||
if (cmap(w, _ESC | _QF))
|
||||
wq = QUOTE; /* quotes are always quoted */
|
||||
@@ -1332,6 +1331,7 @@ tw_fixword(int looking, struct Strbuf *word, Char *dir, Char *exp_name)
|
||||
break;
|
||||
}
|
||||
|
||||
+ (void) quote(exp_name);
|
||||
Strbuf_append(word, exp_name); /* add extended name */
|
||||
Strbuf_terminate(word);
|
||||
} /* end tw_fixword */
|
||||
--
|
||||
2.5.5
|
||||
|
@ -1,55 +0,0 @@
|
||||
From d473b774087562703aac71ae80d9b0e4f9cd2286 Mon Sep 17 00:00:00 2001
|
||||
From: kim <kim>
|
||||
Date: Tue, 1 Sep 2015 14:08:28 +0000
|
||||
Subject: [PATCH] Add/fix some translations.
|
||||
|
||||
---
|
||||
nls/finnish/set3 | 14 +++++++-------
|
||||
nls/finnish/set9 | 6 +++---
|
||||
2 files changed, 10 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/nls/finnish/set3 b/nls/finnish/set3
|
||||
index 92d41d9..03af95c 100644
|
||||
--- a/nls/finnish/set3
|
||||
+++ b/nls/finnish/set3
|
||||
@@ -114,11 +114,11 @@ $set 3
|
||||
111 Vi: peruuta muutos
|
||||
112 Vi: siirry rivin alkuun
|
||||
113 Suorita 'which' tälle komennolle
|
||||
-114 Liimaa/lisää leikkauspuskurin sisältö kursorin paikalle
|
||||
+114 Liitä leikkauspuskurin sisältö kursorin paikalle
|
||||
115 Korvaa viimeksi liimattu teksti aikaisemmalla leikkauksella
|
||||
-116 (WIN32 only) Copy cut buffer to system clipboard
|
||||
-117 (WIN32 only) Paste clipboard buffer at cursor position
|
||||
-118 (WIN32 only) Convert each '/' in next word to '\\\\'
|
||||
-119 (WIN32 only) Convert each '/' in previous word to '\\\\'
|
||||
-120 (WIN32 only) Page visible console window up
|
||||
-121 (WIN32 only) Page visible console window down
|
||||
+116 (Vain WIN32) Kopioi leikkauspuskuri leikepöydälle
|
||||
+117 (Vain WIN32) Liitä leikepöydän sisältö kursorin paikalle
|
||||
+118 (Vain WIN32) Muuta jokainen '/' seuraavassa sanassa merkkijonoksi '\\\\'
|
||||
+119 (Vain WIN32) Muuta jokainen '/' edellisessä sanassa merkkijonoksi '\\\\'
|
||||
+120 (Vain WIN32) Näytä konsoli-ikkunan edellinen sivu
|
||||
+121 (Vain WIN32) Näytä konsoli-ikkunan seuraava sivu
|
||||
diff --git a/nls/finnish/set9 b/nls/finnish/set9
|
||||
index ec50ac6..796f886 100644
|
||||
--- a/nls/finnish/set9
|
||||
+++ b/nls/finnish/set9
|
||||
@@ -1,11 +1,11 @@
|
||||
$ $tcsh: set9,v 1.3 2011/02/04 18:19:34 christos Exp $
|
||||
$ ed.xmap.c
|
||||
$set 9
|
||||
-1 AddXkey: Null extended-key not allowed.\n
|
||||
+1 AddXkey: Tyhjää laajennettua näppäintä ei sallita.\n
|
||||
2 AddXkey: sequence-lead-in command not allowed\n
|
||||
-3 DeleteXkey: Null extended-key not allowed.\n
|
||||
+3 DeleteXkey: Tyhjää laajennettua näppäintä ei sallita.\n
|
||||
4 Sitomaton laajennettu näppäin "%S"\n
|
||||
-5 Jotkin laajennetut näppäimet ovat liian pitkiä sisäiseen tulostuspuskurille
|
||||
+5 Jotkin laajennetut näppäimet ovat liian pitkiä sisäiselle tulostuspuskurille
|
||||
6 Enumerate: VIKA!! Välitetty null-osoitin\n!
|
||||
7 ei syötettä
|
||||
8 Jotain on seurattava: '%c'\n
|
||||
--
|
||||
2.5.5
|
||||
|
@ -1,276 +0,0 @@
|
||||
From 858a705a79a53890eb97bf1f234692c0347c932a Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Tue, 8 Sep 2015 15:49:53 +0000
|
||||
Subject: [PATCH] add noclobber/ask options (Martin Tournoij)
|
||||
|
||||
---
|
||||
Fixes | 1 +
|
||||
sh.decls.h | 1 +
|
||||
sh.func.c | 17 +++++++++++++++++
|
||||
sh.h | 6 ++++++
|
||||
sh.sem.c | 10 +++++++++-
|
||||
sh.set.c | 32 ++++++++++++++++++++++++++++++++
|
||||
tc.const.c | 2 ++
|
||||
tc.func.c | 14 ++------------
|
||||
tcsh.man | 3 +++
|
||||
tests/syntax.at | 26 ++++++++++++++++++++++++++
|
||||
10 files changed, 99 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/Fixes b/Fixes
|
||||
index 0481286..689aeb0 100644
|
||||
--- a/Fixes
|
||||
+++ b/Fixes
|
||||
@@ -1,3 +1,4 @@
|
||||
+ 8. Add notempty and ask values for the noclobber setting (Martin Tournoij)
|
||||
7. more correct $wordchars for vimode (Luke Mewburn)
|
||||
6. expose VImode in $vimode (Luke Mewburn)
|
||||
5. display what the compiled in editor is in bindkey -d (Luke Mewburn)
|
||||
diff --git a/sh.decls.h b/sh.decls.h
|
||||
index 78bbed9..671a0b7 100644
|
||||
--- a/sh.decls.h
|
||||
+++ b/sh.decls.h
|
||||
@@ -185,6 +185,7 @@ extern void unalias (Char **, struct command *);
|
||||
extern void wfree (void);
|
||||
extern void dobuiltins (Char **, struct command *);
|
||||
extern void reexecute (struct command *);
|
||||
+extern int getYN (const char *);
|
||||
|
||||
/*
|
||||
* sh.glob.c
|
||||
diff --git a/sh.func.c b/sh.func.c
|
||||
index bb670b8..41f9e71 100644
|
||||
--- a/sh.func.c
|
||||
+++ b/sh.func.c
|
||||
@@ -2722,3 +2722,20 @@ nlsclose(void)
|
||||
}
|
||||
#endif /* NLS_CATALOGS */
|
||||
}
|
||||
+
|
||||
+int
|
||||
+getYN(const char *prompt)
|
||||
+{
|
||||
+ int doit, c;
|
||||
+ xprintf("%s", prompt);
|
||||
+ flush();
|
||||
+ (void) force_read(SHIN, &c, 1);
|
||||
+ /*
|
||||
+ * Perhaps we should use the yesexpr from the
|
||||
+ * actual locale
|
||||
+ */
|
||||
+ doit = (strchr(CGETS(22, 14, "Yy"), c) != NULL);
|
||||
+ while (c != '\n' && force_read(SHIN, &c, 1) == 1)
|
||||
+ continue;
|
||||
+ return doit;
|
||||
+}
|
||||
diff --git a/sh.h b/sh.h
|
||||
index 51d3f3b..38b7efd 100644
|
||||
--- a/sh.h
|
||||
+++ b/sh.h
|
||||
@@ -193,6 +193,11 @@ static __inline void tcsh_ignore(intptr_t a)
|
||||
# endif /* SYSVREL */
|
||||
#endif /* ECHO_STYLE */
|
||||
|
||||
+/* values for noclobber */
|
||||
+#define NOCLOBBER_DEFAULT 1
|
||||
+#define NOCLOBBER_NOTEMPTY 2
|
||||
+#define NOCLOBBER_ASK 4
|
||||
+
|
||||
/*
|
||||
* The shell moves std in/out/diag and the old std input away from units
|
||||
* 0, 1, and 2 so that it is easy to set up these standards for invoked
|
||||
@@ -577,6 +582,7 @@ EXTERN int arun IZERO; /* Currently running multi-line-aliases */
|
||||
EXTERN int implicit_cd IZERO;/* implicit cd enabled?(1=enabled,2=verbose) */
|
||||
EXTERN int cdtohome IZERO; /* cd without args goes home */
|
||||
EXTERN int inheredoc IZERO; /* Currently parsing a heredoc */
|
||||
+EXTERN int no_clobber IZERO; /* no clobber enabled? 1=yes 2=notempty, 4=ask*/
|
||||
/* We received a window change event */
|
||||
EXTERN volatile sig_atomic_t windowchg IZERO;
|
||||
#if defined(KANJI) && defined(SHORT_STRINGS) && defined(DSPMBYTE)
|
||||
diff --git a/sh.sem.c b/sh.sem.c
|
||||
index c4eb394..4293b1b 100644
|
||||
--- a/sh.sem.c
|
||||
+++ b/sh.sem.c
|
||||
@@ -909,7 +909,7 @@ doio(struct command *t, int *pipein, int *pipeout)
|
||||
else
|
||||
fd = 0;
|
||||
if ((flags & F_APPEND) == 0 || fd == -1) {
|
||||
- if (!(flags & F_OVERWRITE) && adrof(STRnoclobber)) {
|
||||
+ if (!(flags & F_OVERWRITE) && no_clobber) {
|
||||
if (flags & F_APPEND)
|
||||
stderror(ERR_SYSTEM, tmp, strerror(errno));
|
||||
chkclob(tmp);
|
||||
@@ -981,5 +981,13 @@ chkclob(const char *cp)
|
||||
return;
|
||||
if (S_ISCHR(stb.st_mode))
|
||||
return;
|
||||
+ if (no_clobber & NOCLOBBER_NOTEMPTY && stb.st_size == 0)
|
||||
+ return;
|
||||
+ if (no_clobber & NOCLOBBER_ASK) {
|
||||
+ if (getYN(CGETS(22, 15,
|
||||
+ "Do you really want to overwrite an existing file? [N/y] ")))
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
stderror(ERR_EXISTS, cp);
|
||||
}
|
||||
diff --git a/sh.set.c b/sh.set.c
|
||||
index 52602f0..6428562 100644
|
||||
--- a/sh.set.c
|
||||
+++ b/sh.set.c
|
||||
@@ -55,6 +55,7 @@ static struct varent *madrof (Char *, struct varent *);
|
||||
static void unsetv1 (struct varent *);
|
||||
static void exportpath (Char **);
|
||||
static void balance (struct varent *, int, int);
|
||||
+static int set_noclobber (Char **);
|
||||
|
||||
/*
|
||||
* C Shell
|
||||
@@ -72,6 +73,13 @@ update_vars(Char *vp)
|
||||
dohash(NULL, NULL);
|
||||
}
|
||||
}
|
||||
+ else if (eq(vp, STRnoclobber)) {
|
||||
+ struct varent *p = adrof(STRnoclobber);
|
||||
+ if (p == NULL)
|
||||
+ stderror(ERR_NAME | ERR_UNDVAR);
|
||||
+ else
|
||||
+ no_clobber = set_noclobber(p->vec);
|
||||
+ }
|
||||
else if (eq(vp, STRhistchars)) {
|
||||
Char *pn = varval(vp);
|
||||
|
||||
@@ -772,6 +780,8 @@ unset(Char **v, struct command *c)
|
||||
PRCH = tcsh ? '>' : '%';
|
||||
PRCHROOT = '#';
|
||||
}
|
||||
+ if (adrof(STRnoclobber) == 0)
|
||||
+ no_clobber = 0;
|
||||
if (adrof(STRhistlit) == 0)
|
||||
HistLit = 0;
|
||||
if (adrof(STRloginsh) == 0)
|
||||
@@ -937,6 +947,28 @@ exportpath(Char **val)
|
||||
cleanup_until(exppath);
|
||||
}
|
||||
|
||||
+static int
|
||||
+set_noclobber(Char **val)
|
||||
+{
|
||||
+ Char *option;
|
||||
+ int nc = NOCLOBBER_DEFAULT;
|
||||
+
|
||||
+ if (val == NULL)
|
||||
+ return nc;
|
||||
+ while (*val) {
|
||||
+ if (*val == 0 || eq(*val, STRRparen))
|
||||
+ return nc;
|
||||
+
|
||||
+ option = *val++;
|
||||
+
|
||||
+ if (eq(option, STRnotempty))
|
||||
+ nc |= NOCLOBBER_NOTEMPTY;
|
||||
+ else if (eq(option, STRask))
|
||||
+ nc |= NOCLOBBER_ASK;
|
||||
+ }
|
||||
+ return nc;
|
||||
+}
|
||||
+
|
||||
#ifndef lint
|
||||
/*
|
||||
* Lint thinks these have null effect
|
||||
diff --git a/tc.const.c b/tc.const.c
|
||||
index 06ddd2b..d5d0eb4 100644
|
||||
--- a/tc.const.c
|
||||
+++ b/tc.const.c
|
||||
@@ -372,6 +372,8 @@ Char STRsldotcshrc[] = { '/', '.', 'c', 's', 'h', 'r', 'c', '\0' };
|
||||
Char STRsldotlogin[] = { '/', '.', 'l', 'o', 'g', 'i', 'n', '\0' };
|
||||
Char STRignoreeof[] = { 'i', 'g', 'n', 'o', 'r', 'e', 'e', 'o', 'f', '\0' };
|
||||
Char STRnoclobber[] = { 'n', 'o', 'c', 'l', 'o', 'b', 'b', 'e', 'r', '\0' };
|
||||
+Char STRnotempty[] = { 'n', 'o', 't', 'e', 'm', 'p', 't', 'y', '\0' };
|
||||
+Char STRask[] = { 'a', 's', 'k', '\0' };
|
||||
Char STRhelpcommand[] = { 'h', 'e', 'l', 'p', 'c', 'o', 'm', 'm', 'a', 'n',
|
||||
'd', '\0' };
|
||||
Char STRfignore[] = { 'f', 'i', 'g', 'n', 'o', 'r', 'e', '\0' };
|
||||
diff --git a/tc.func.c b/tc.func.c
|
||||
index 9af4858..f2b1a97 100644
|
||||
--- a/tc.func.c
|
||||
+++ b/tc.func.c
|
||||
@@ -1145,7 +1145,6 @@ rmstar(struct wordent *cp)
|
||||
Char *tag;
|
||||
#endif /* RMDEBUG */
|
||||
Char *charac;
|
||||
- char c;
|
||||
int ask, doit, star = 0, silent = 0, opintr_disabled;
|
||||
|
||||
if (!adrof(STRrmstar))
|
||||
@@ -1178,17 +1177,8 @@ rmstar(struct wordent *cp)
|
||||
if (!Strcmp(args->word, STRstar))
|
||||
star = 1;
|
||||
if (ask && star) {
|
||||
- xprintf("%s", CGETS(22, 8,
|
||||
- "Do you really want to delete all files? [n/y] "));
|
||||
- flush();
|
||||
- (void) force_read(SHIN, &c, 1);
|
||||
- /*
|
||||
- * Perhaps we should use the yesexpr from the
|
||||
- * actual locale
|
||||
- */
|
||||
- doit = (strchr(CGETS(22, 14, "Yy"), c) != NULL);
|
||||
- while (c != '\n' && force_read(SHIN, &c, 1) == 1)
|
||||
- continue;
|
||||
+ doit = getYN(CGETS(22, 8,
|
||||
+ "Do you really want to delete all files? [N/y] "));
|
||||
if (!doit) {
|
||||
/* remove the command instead */
|
||||
#ifdef RMDEBUG
|
||||
diff --git a/tcsh.man b/tcsh.man
|
||||
index 0a35405..2aa37ac 100644
|
||||
--- a/tcsh.man
|
||||
+++ b/tcsh.man
|
||||
@@ -1636,6 +1636,9 @@ If the shell variable \fBnoclobber\fR is set, then the file must not exist or be
|
||||
character special file (e.g., a terminal or `/dev/null') or an error results.
|
||||
This helps prevent accidental destruction of files. In this case the `!' forms
|
||||
can be used to suppress this check.
|
||||
+If \fBnotempty\fR is given in \fBnoclobber\fR, `>' is allowed on empty files;
|
||||
+if \fBask\fR is set, an interacive confirmation is presented, rather than an
|
||||
+error.
|
||||
.PP
|
||||
The forms involving `&' route the diagnostic output into the specified file as
|
||||
well as the standard output. \fIname\fR is expanded in the same way as `<'
|
||||
diff --git a/tests/syntax.at b/tests/syntax.at
|
||||
index 23fc8d5..35134d1 100644
|
||||
--- a/tests/syntax.at
|
||||
+++ b/tests/syntax.at
|
||||
@@ -161,4 +161,30 @@ AT_CHECK([tcsh -f -c '(echo $this_does_not_exist) |& cat'], 1,
|
||||
[this_does_not_exist: Undefined variable.
|
||||
])
|
||||
|
||||
+dnl noclobber=notempty
|
||||
+echo Hello > output
|
||||
+AT_CHECK([tcsh -f -c 'set noclobber=notempty; echo OK >& output'], 1, [],
|
||||
+[output: File exists.
|
||||
+])
|
||||
+
|
||||
+rm -f output
|
||||
+touch output
|
||||
+AT_CHECK([tcsh -f -c 'set noclobber=notempty; echo OK >& output'])
|
||||
+AT_CHECK([cat output], ,
|
||||
+[OK
|
||||
+])
|
||||
+
|
||||
+dnl noclobber=ask
|
||||
+dnl touch output
|
||||
+dnl AT_CHECK([tcsh -f -c 'set noclobber=ask; echo "n" | echo OK >& output'], 0, [],
|
||||
+dnl [output: File exists.
|
||||
+dnl ])
|
||||
+dnl T_CHECK([tcsh -f -c 'set noclobber=ask; echo "y" | echo OK >& output'])
|
||||
+
|
||||
+dnl noclobber=(notempty ask)
|
||||
+dnl rm -f output
|
||||
+dnl touch output
|
||||
+dnl AT_CHECK([tcsh -f -c 'set noclobber=(notempty ask); echo OK >& output'])
|
||||
+
|
||||
+
|
||||
AT_CLEANUP
|
||||
--
|
||||
2.5.5
|
||||
|
@ -1,25 +0,0 @@
|
||||
From 86f1ca6000f81be5b3401a2ec102521cb612a518 Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Wed, 30 Sep 2015 13:28:02 +0000
|
||||
Subject: [PATCH] Fix uninitialized estr (Holger Seidel)
|
||||
|
||||
---
|
||||
tw.comp.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tw.comp.c b/tw.comp.c
|
||||
index 03da837..4b4d2ce 100644
|
||||
--- a/tw.comp.c
|
||||
+++ b/tw.comp.c
|
||||
@@ -251,7 +251,7 @@ static int
|
||||
tw_match(const Char *str, const Char *pat, int exact)
|
||||
{
|
||||
const Char *estr;
|
||||
- int rv = exact ? Gmatch(str, pat) : Gnmatch(str, pat, &estr);
|
||||
+ int rv = exact ? Gmatch(estr = str, pat) : Gnmatch(str, pat, &estr);
|
||||
#ifdef TDEBUG
|
||||
xprintf("G%smatch(%s, ", exact ? "" : "n", short2str(str));
|
||||
xprintf("%s, ", short2str(pat));
|
||||
--
|
||||
2.5.5
|
||||
|
@ -1,43 +0,0 @@
|
||||
From 4fc4702ec7b1e46dc620644305a9ac19250f9722 Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Sat, 31 Oct 2015 18:54:42 +0000
|
||||
Subject: [PATCH] Make heredoc interruptible again (Mike Sullivan)
|
||||
|
||||
---
|
||||
bar | 4 ----
|
||||
sh.sem.c | 6 ++++++
|
||||
2 files changed, 6 insertions(+), 4 deletions(-)
|
||||
delete mode 100644 bar
|
||||
|
||||
diff --git a/bar b/bar
|
||||
deleted file mode 100644
|
||||
index 3305e7d..0000000
|
||||
--- a/bar
|
||||
+++ /dev/null
|
||||
@@ -1,4 +0,0 @@
|
||||
-
|
||||
-
|
||||
-
|
||||
-i
|
||||
diff --git a/sh.sem.c b/sh.sem.c
|
||||
index 4293b1b..a904c6e 100644
|
||||
--- a/sh.sem.c
|
||||
+++ b/sh.sem.c
|
||||
@@ -212,8 +212,14 @@ execute(struct command *t, volatile int wanttty, int *pipein, int *pipeout,
|
||||
* If noexec then this is all we do.
|
||||
*/
|
||||
if (t->t_dflg & F_READ) {
|
||||
+ int old_pintr_disabled;
|
||||
+
|
||||
xclose(0);
|
||||
+ if (setintr)
|
||||
+ pintr_push_enable(&old_pintr_disabled);
|
||||
heredoc(t->t_dlef);
|
||||
+ if (setintr)
|
||||
+ cleanup_until(&old_pintr_disabled);
|
||||
if (noexec)
|
||||
xclose(0);
|
||||
}
|
||||
--
|
||||
2.5.5
|
||||
|
@ -1,25 +0,0 @@
|
||||
From 2ca8b902fa190aae70f337f87dd95f7aeffdf173 Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Tue, 3 Nov 2015 21:04:13 +0000
|
||||
Subject: [PATCH] Remove extra ;
|
||||
|
||||
---
|
||||
dotlock.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dotlock.c b/dotlock.c
|
||||
index 193aa17..2571235 100644
|
||||
--- a/dotlock.c
|
||||
+++ b/dotlock.c
|
||||
@@ -24,7 +24,7 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "sh.h"
|
||||
-RCSID("$tcsh: dotlock.c,v 3.3 2014/03/09 00:11:54 christos Exp $");
|
||||
+RCSID("$tcsh: dotlock.c,v 3.3 2014/03/09 00:11:54 christos Exp $")
|
||||
|
||||
#include <stdio.h>
|
||||
#ifndef O_SYNC
|
||||
--
|
||||
2.5.5
|
||||
|
@ -1,189 +0,0 @@
|
||||
From d453a572efce146f3dd6a4884b1d2d3384fd7a4a Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Wed, 9 Dec 2015 15:06:19 +0000
|
||||
Subject: [PATCH 1/3] - make backeval use its own paraml - introduce initlex()
|
||||
and call freelex() before calling lex()
|
||||
|
||||
---
|
||||
Fixes | 1 +
|
||||
sh.c | 2 ++
|
||||
sh.decls.h | 1 +
|
||||
sh.exp.c | 1 +
|
||||
sh.glob.c | 14 +++++++++-----
|
||||
sh.lex.c | 7 +++++++
|
||||
6 files changed, 21 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/Fixes b/Fixes
|
||||
index 689aeb0..1fe33e8 100644
|
||||
--- a/Fixes
|
||||
+++ b/Fixes
|
||||
@@ -1,3 +1,4 @@
|
||||
+ 9. Fix memory leak for paraml
|
||||
8. Add notempty and ask values for the noclobber setting (Martin Tournoij)
|
||||
7. more correct $wordchars for vimode (Luke Mewburn)
|
||||
6. expose VImode in $vimode (Luke Mewburn)
|
||||
diff --git a/sh.c b/sh.c
|
||||
index 8d219d3..c6a0bfe 100644
|
||||
--- a/sh.c
|
||||
+++ b/sh.c
|
||||
@@ -274,6 +274,7 @@ main(int argc, char **argv)
|
||||
#endif
|
||||
|
||||
nlsinit();
|
||||
+ initlex(¶ml);
|
||||
|
||||
#ifdef MALLOC_TRACE
|
||||
mal_setstatsfile(fdopen(dmove(xopen("/tmp/tcsh.trace",
|
||||
@@ -2049,6 +2050,7 @@ process(int catch)
|
||||
*/
|
||||
if (setintr)
|
||||
pintr_push_enable(&old_pintr_disabled);
|
||||
+ freelex(¶ml);
|
||||
hadhist = lex(¶ml);
|
||||
if (setintr)
|
||||
cleanup_until(&old_pintr_disabled);
|
||||
diff --git a/sh.decls.h b/sh.decls.h
|
||||
index 671a0b7..09ac3ab 100644
|
||||
--- a/sh.decls.h
|
||||
+++ b/sh.decls.h
|
||||
@@ -239,6 +239,7 @@ extern void btell (struct Ain *);
|
||||
extern void btoeof (void);
|
||||
extern void copylex (struct wordent *, struct wordent *);
|
||||
extern Char *domod (Char *, Char);
|
||||
+extern void initlex (struct wordent *);
|
||||
extern void freelex (struct wordent *);
|
||||
extern int lex (struct wordent *);
|
||||
extern void lex_cleanup (void *);
|
||||
diff --git a/sh.exp.c b/sh.exp.c
|
||||
index 7e75a45..cf7f69b 100644
|
||||
--- a/sh.exp.c
|
||||
+++ b/sh.exp.c
|
||||
@@ -968,6 +968,7 @@ evalav(Char **v)
|
||||
}
|
||||
hp->prev = wdp;
|
||||
cleanup_push(¶ml1, lex_cleanup);
|
||||
+ initlex(¶ml1);
|
||||
alias(¶ml1);
|
||||
t = syntax(paraml1.next, ¶ml1, 0);
|
||||
cleanup_push(t, syntax_cleanup);
|
||||
diff --git a/sh.glob.c b/sh.glob.c
|
||||
index 7d008aa..dce0217 100644
|
||||
--- a/sh.glob.c
|
||||
+++ b/sh.glob.c
|
||||
@@ -765,6 +765,9 @@ backeval(struct blk_buf *bb, struct Strbuf *word, Char *cp, int literal)
|
||||
omark = cleanup_push_mark();
|
||||
getexit(osetexit);
|
||||
for (;;) {
|
||||
+ struct wordent paraml1;
|
||||
+ initlex(¶ml1);
|
||||
+
|
||||
(void) setexit();
|
||||
justpr = 0;
|
||||
|
||||
@@ -780,12 +783,13 @@ backeval(struct blk_buf *bb, struct Strbuf *word, Char *cp, int literal)
|
||||
seterr = NULL;
|
||||
}
|
||||
|
||||
- (void) lex(¶ml);
|
||||
- cleanup_push(¶ml, lex_cleanup);
|
||||
+ freelex(¶ml1);
|
||||
+ (void) lex(¶ml1);
|
||||
+ cleanup_push(¶ml1, lex_cleanup);
|
||||
if (seterr)
|
||||
stderror(ERR_OLD);
|
||||
- alias(¶ml);
|
||||
- t = syntax(paraml.next, ¶ml, 0);
|
||||
+ alias(¶ml1);
|
||||
+ t = syntax(paraml1.next, ¶ml1, 0);
|
||||
cleanup_push(t, syntax_cleanup);
|
||||
/* The F_BACKQ flag must set so the job output is correct if
|
||||
* printexitvalue is set. If it's not set, the job output
|
||||
@@ -805,7 +809,7 @@ backeval(struct blk_buf *bb, struct Strbuf *word, Char *cp, int literal)
|
||||
#endif
|
||||
execute(t, -1, NULL, NULL, TRUE);
|
||||
|
||||
- cleanup_until(¶ml);
|
||||
+ cleanup_until(¶ml1);
|
||||
}
|
||||
}
|
||||
cleanup_until(&pvec[1]);
|
||||
diff --git a/sh.lex.c b/sh.lex.c
|
||||
index 08520dd..a64c812 100644
|
||||
--- a/sh.lex.c
|
||||
+++ b/sh.lex.c
|
||||
@@ -258,6 +258,13 @@ copylex(struct wordent *hp, struct wordent *fp)
|
||||
}
|
||||
|
||||
void
|
||||
+initlex(struct wordent *vp)
|
||||
+{
|
||||
+ vp->prev = vp;
|
||||
+ vp->next = vp;
|
||||
+}
|
||||
+
|
||||
+void
|
||||
freelex(struct wordent *vp)
|
||||
{
|
||||
struct wordent *fp;
|
||||
--
|
||||
2.5.5
|
||||
|
||||
From 5298f499085f3863b37302290eb7f794acdade6b Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Wed, 9 Dec 2015 17:17:43 +0000
|
||||
Subject: [PATCH 2/3] Call initlex() sooner, instead of hand-crafted code.
|
||||
|
||||
---
|
||||
sh.exp.c | 4 +---
|
||||
1 file changed, 1 insertion(+), 3 deletions(-)
|
||||
|
||||
diff --git a/sh.exp.c b/sh.exp.c
|
||||
index cf7f69b..8838fce 100644
|
||||
--- a/sh.exp.c
|
||||
+++ b/sh.exp.c
|
||||
@@ -955,8 +955,7 @@ evalav(Char **v)
|
||||
struct wordent *wdp = hp;
|
||||
|
||||
setcopy(STRstatus, STR0, VAR_READWRITE);
|
||||
- hp->prev = hp->next = hp;
|
||||
- hp->word = STRNULL;
|
||||
+ initlex(hp);
|
||||
while (*v) {
|
||||
struct wordent *new = xcalloc(1, sizeof *wdp);
|
||||
|
||||
@@ -968,7 +967,6 @@ evalav(Char **v)
|
||||
}
|
||||
hp->prev = wdp;
|
||||
cleanup_push(¶ml1, lex_cleanup);
|
||||
- initlex(¶ml1);
|
||||
alias(¶ml1);
|
||||
t = syntax(paraml1.next, ¶ml1, 0);
|
||||
cleanup_push(t, syntax_cleanup);
|
||||
--
|
||||
2.5.5
|
||||
|
||||
|
||||
From aaf05158924cde1f78d31c67671c38b9f2e8e850 Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Wed, 9 Dec 2015 17:17:55 +0000
|
||||
Subject: [PATCH 3/3] Initialize word in initlex()
|
||||
|
||||
---
|
||||
sh.lex.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/sh.lex.c b/sh.lex.c
|
||||
index a64c812..8a6d1b0 100644
|
||||
--- a/sh.lex.c
|
||||
+++ b/sh.lex.c
|
||||
@@ -260,6 +260,7 @@ copylex(struct wordent *hp, struct wordent *fp)
|
||||
void
|
||||
initlex(struct wordent *vp)
|
||||
{
|
||||
+ vp->word = STRNULL;
|
||||
vp->prev = vp;
|
||||
vp->next = vp;
|
||||
}
|
||||
--
|
||||
2.5.5
|
||||
|
@ -1,87 +0,0 @@
|
||||
From 9fdb7e1f4dadd7996d614b9cab95704fa22cf0d5 Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Fri, 15 Jan 2016 15:28:57 +0000
|
||||
Subject: [PATCH 1/2] PR/510: Masanarid Iida: Add missing paren (in debugging
|
||||
code)
|
||||
|
||||
---
|
||||
ed.defns.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/ed.defns.c b/ed.defns.c
|
||||
index 60ef193..a472e66 100644
|
||||
--- a/ed.defns.c
|
||||
+++ b/ed.defns.c
|
||||
@@ -1805,7 +1805,7 @@ CheckMaps(void)
|
||||
|
||||
if ((sizeof(CcKeyMap)) != c1)
|
||||
xprintf("CcKeyMap should be %d entries, but is %d.\r\n",
|
||||
- NT_NUM_KEYS, sizeof(CcKeyMap) / sizeof(KEYCMD)));
|
||||
+ NT_NUM_KEYS, (sizeof(CcKeyMap) / sizeof(KEYCMD)));
|
||||
|
||||
if ((sizeof(CcAltMap)) != c1)
|
||||
xprintf("CcAltMap should be %d entries, but is %d.\r\n",
|
||||
--
|
||||
2.5.5
|
||||
|
||||
|
||||
From 3512c94faa44497e27959da78814777bdf8e0491 Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Sun, 14 Feb 2016 15:44:18 +0000
|
||||
Subject: [PATCH 2/2] PR/510: Masanari Iida: Fix debugging printfs.
|
||||
|
||||
---
|
||||
ed.defns.c | 32 ++++++++++++++++----------------
|
||||
1 file changed, 16 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/ed.defns.c b/ed.defns.c
|
||||
index a472e66..a4ed6a0 100644
|
||||
--- a/ed.defns.c
|
||||
+++ b/ed.defns.c
|
||||
@@ -1801,27 +1801,27 @@ editinit(void)
|
||||
void
|
||||
CheckMaps(void)
|
||||
{ /* check the size of the key maps */
|
||||
- int c1 = (NT_NUM_KEYS * sizeof(KEYCMD));
|
||||
+ size_t c1 = NT_NUM_KEYS * sizeof(KEYCMD);
|
||||
|
||||
- if ((sizeof(CcKeyMap)) != c1)
|
||||
- xprintf("CcKeyMap should be %d entries, but is %d.\r\n",
|
||||
- NT_NUM_KEYS, (sizeof(CcKeyMap) / sizeof(KEYCMD)));
|
||||
+ if (sizeof(CcKeyMap) != c1)
|
||||
+ xprintf("CcKeyMap should be %u entries, but is %zu.\r\n",
|
||||
+ NT_NUM_KEYS, sizeof(CcKeyMap) / sizeof(KEYCMD));
|
||||
|
||||
- if ((sizeof(CcAltMap)) != c1)
|
||||
- xprintf("CcAltMap should be %d entries, but is %d.\r\n",
|
||||
- NT_NUM_KEYS, (sizeof(CcAltMap) / sizeof(KEYCMD)));
|
||||
+ if (sizeof(CcAltMap) != c1)
|
||||
+ xprintf("CcAltMap should be %u entries, but is %zu.\r\n",
|
||||
+ NT_NUM_KEYS, sizeof(CcAltMap) / sizeof(KEYCMD));
|
||||
|
||||
- if ((sizeof(CcEmacsMap)) != c1)
|
||||
- xprintf("CcEmacsMap should be %d entries, but is %d.\r\n",
|
||||
- NT_NUM_KEYS, (sizeof(CcEmacsMap) / sizeof(KEYCMD)));
|
||||
+ if (sizeof(CcEmacsMap) != c1)
|
||||
+ xprintf("CcEmacsMap should be %u entries, but is %zu.\r\n",
|
||||
+ NT_NUM_KEYS, sizeof(CcEmacsMap) / sizeof(KEYCMD));
|
||||
|
||||
- if ((sizeof(CcViMap)) != c1)
|
||||
- xprintf("CcViMap should be %d entries, but is %d.\r\n",
|
||||
- NT_NUM_KEYS, (sizeof(CcViMap) / sizeof(KEYCMD)));
|
||||
+ if (sizeof(CcViMap) != c1)
|
||||
+ xprintf("CcViMap should be %u entries, but is %zu.\r\n",
|
||||
+ NT_NUM_KEYS, sizeof(CcViMap) / sizeof(KEYCMD));
|
||||
|
||||
- if ((sizeof(CcViCmdMap)) != c1)
|
||||
- xprintf("CcViCmdMap should be %d entries, but is %d.\r\n",
|
||||
- NT_NUM_KEYS, (sizeof(CcViCmdMap) / sizeof(KEYCMD)));
|
||||
+ if (sizeof(CcViCmdMap) != c1)
|
||||
+ xprintf("CcViCmdMap should be %u entries, but is %zu.\r\n",
|
||||
+ NT_NUM_KEYS, sizeof(CcViCmdMap) / sizeof(KEYCMD));
|
||||
}
|
||||
|
||||
#endif
|
||||
--
|
||||
2.5.5
|
||||
|
@ -1,28 +0,0 @@
|
||||
From b2c7dbcf2b32ad5ad6dec5575fb630180677555a Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Tue, 8 Mar 2016 12:42:06 +0000
|
||||
Subject: [PATCH] Detect __GLIBC__ so it uses sysmalloc from <features.h>
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1303323
|
||||
|
||||
---
|
||||
config_f.h | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/config_f.h b/config_f.h
|
||||
index f6fec55..4a9fe3a 100644
|
||||
--- a/config_f.h
|
||||
+++ b/config_f.h
|
||||
@@ -38,6 +38,10 @@
|
||||
#ifndef _h_config_f
|
||||
#define _h_config_f
|
||||
|
||||
+#ifdef HAVE_FEATURES_H
|
||||
+#include <features.h> /* for __GLIBC__ */
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
* SHORT_STRINGS Use at least 16 bit characters instead of 8 bit chars
|
||||
* This fixes up quoting problems and eases implementation
|
||||
--
|
||||
2.5.5
|
||||
|
@ -1,28 +0,0 @@
|
||||
From f71cda754740dbf7a2d6aee848a93a8239ba4480 Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Tue, 8 Mar 2016 12:47:43 +0000
|
||||
Subject: [PATCH] More generous ROUNDUP for _LP64
|
||||
|
||||
---
|
||||
tc.alloc.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/tc.alloc.c b/tc.alloc.c
|
||||
index f68a8c5..86aae80 100644
|
||||
--- a/tc.alloc.c
|
||||
+++ b/tc.alloc.c
|
||||
@@ -134,7 +134,11 @@ union overhead {
|
||||
#endif
|
||||
|
||||
|
||||
+#ifdef _LP64
|
||||
+#define ROUNDUP 15
|
||||
+#else
|
||||
#define ROUNDUP 7
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* nextf[i] is the pointer to the next free block of size 2^(i+3). The
|
||||
--
|
||||
2.5.5
|
||||
|
@ -1,142 +0,0 @@
|
||||
From 9a763dd9b9b88f9c8cd235fddfda839c6b7971cb Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Tue, 8 Mar 2016 15:45:26 +0000
|
||||
Subject: [PATCH 1/4] PR/526: David Kaspar: Quote backslashes properly so that they
|
||||
can be preserved in `` expansions.
|
||||
|
||||
---
|
||||
Fixes | 2 ++
|
||||
sh.glob.c | 4 +++-
|
||||
sh.lex.c | 2 +-
|
||||
3 files changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Fixes b/Fixes
|
||||
index 1fe33e8..b182f1a 100644
|
||||
--- a/Fixes
|
||||
+++ b/Fixes
|
||||
@@ -1,3 +1,5 @@
|
||||
+ 10. PR/526: Quote backslashes properly so they can be preserved in ``
|
||||
+ expansions
|
||||
9. Fix memory leak for paraml
|
||||
8. Add notempty and ask values for the noclobber setting (Martin Tournoij)
|
||||
7. more correct $wordchars for vimode (Luke Mewburn)
|
||||
diff --git a/sh.glob.c b/sh.glob.c
|
||||
index dce0217..895a603 100644
|
||||
--- a/sh.glob.c
|
||||
+++ b/sh.glob.c
|
||||
@@ -878,7 +878,9 @@ backeval(struct blk_buf *bb, struct Strbuf *word, Char *cp, int literal)
|
||||
if (!quoted && (c == ' ' || c == '\t'))
|
||||
break;
|
||||
cnt++;
|
||||
- Strbuf_append1(word, c | quoted);
|
||||
+ if (c == '\\' || quoted)
|
||||
+ c |= QUOTE;
|
||||
+ Strbuf_append1(word, c);
|
||||
}
|
||||
/*
|
||||
* Unless at end-of-file, we will form a new word here if there were
|
||||
diff --git a/sh.lex.c b/sh.lex.c
|
||||
index 8a6d1b0..eae8a03 100644
|
||||
--- a/sh.lex.c
|
||||
+++ b/sh.lex.c
|
||||
@@ -386,7 +386,7 @@ loop:
|
||||
*/
|
||||
c |= QUOTE;
|
||||
ungetC(c);
|
||||
- c = '\\';
|
||||
+ c = '\\' | QUOTE;
|
||||
}
|
||||
}
|
||||
}
|
||||
--
|
||||
2.5.5
|
||||
|
||||
|
||||
From d52d669405da2fce61bd04bf80915e2e6ac5e842 Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Fri, 13 May 2016 15:08:12 +0000
|
||||
Subject: [PATCH 2/4] PR/526: Now that backslashes are quoted, we don't need to
|
||||
handle them specially here. Fixes echo '\n'<enter><ctrl-p> displaying echo
|
||||
'\\n'.
|
||||
|
||||
---
|
||||
tc.func.c | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tc.func.c b/tc.func.c
|
||||
index f2b1a97..97eda4e 100644
|
||||
--- a/tc.func.c
|
||||
+++ b/tc.func.c
|
||||
@@ -120,8 +120,7 @@ expand_lex(const struct wordent *sp0, int from, int to)
|
||||
if ((*s & QUOTE)
|
||||
&& (((*s & TRIM) == HIST && HIST != '\0') ||
|
||||
(((*s & TRIM) == '\'') && (prev_c != '\\')) ||
|
||||
- (((*s & TRIM) == '\"') && (prev_c != '\\')) ||
|
||||
- (((*s & TRIM) == '\\') && (prev_c != '\\')))) {
|
||||
+ (((*s & TRIM) == '\"') && (prev_c != '\\')))) {
|
||||
Strbuf_append1(&buf, '\\');
|
||||
}
|
||||
#if INVALID_BYTE != 0
|
||||
--
|
||||
2.5.5
|
||||
|
||||
|
||||
From b1534dd442e5c1c6d662ea73d3324e10708790ff Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Fri, 13 May 2016 15:08:54 +0000
|
||||
Subject: [PATCH 3/4] History expansion fix.
|
||||
|
||||
---
|
||||
Fixes | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/Fixes b/Fixes
|
||||
index 8962302..ac899dd 100644
|
||||
--- a/Fixes
|
||||
+++ b/Fixes
|
||||
@@ -1,3 +1,4 @@
|
||||
+ 12. PR/526: Fix double \\ printing from previous fix in history expansion.
|
||||
10. PR/526: Quote backslashes properly so they can be preserved in ``
|
||||
expansions
|
||||
9. Fix memory leak for paraml
|
||||
--
|
||||
2.5.5
|
||||
|
||||
|
||||
From 819ab9146f10a3eae77098769210e1751cb7d494 Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Tue, 24 May 2016 19:29:19 +0000
|
||||
Subject: [PATCH 4/4] set myvar=`\echo 1 2 3`
|
||||
and
|
||||
set myvar=`echo 1 2 3`
|
||||
should produce the same result for:
|
||||
$ echo ${myvar[1]}
|
||||
1
|
||||
|
||||
Don't treat the first character of the string specially. If the whole string
|
||||
is quoted, then we are quoted, otherwise not.
|
||||
---
|
||||
sh.glob.c | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/sh.glob.c b/sh.glob.c
|
||||
index 895a603..8279802 100644
|
||||
--- a/sh.glob.c
|
||||
+++ b/sh.glob.c
|
||||
@@ -708,7 +708,12 @@ backeval(struct blk_buf *bb, struct Strbuf *word, Char *cp, int literal)
|
||||
|
||||
hadnl = 0;
|
||||
icnt = 0;
|
||||
- quoted = (literal || (cp[0] & QUOTE)) ? QUOTE : 0;
|
||||
+ if (!literal) {
|
||||
+ for (ip = cp; (*ip & QUOTE) != 0; ip++)
|
||||
+ continue;
|
||||
+ quoted = *ip == '\0';
|
||||
+ } else
|
||||
+ quoted = literal;
|
||||
faket.t_dtyp = NODE_COMMAND;
|
||||
faket.t_dflg = F_BACKQ;
|
||||
faket.t_dlef = 0;
|
||||
--
|
||||
2.5.5
|
||||
|
@ -1,25 +0,0 @@
|
||||
From 554366732a43be40ec8e1394c366c9ae48f37b49 Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Fri, 8 Apr 2016 16:10:52 +0000
|
||||
Subject: [PATCH] fix memory leak when cdpath fails to find a matching path
|
||||
(David Kaspar)
|
||||
|
||||
---
|
||||
sh.dir.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/sh.dir.c b/sh.dir.c
|
||||
index 6921a32..e583bdc 100644
|
||||
--- a/sh.dir.c
|
||||
+++ b/sh.dir.c
|
||||
@@ -676,6 +676,7 @@ dfollow(Char *cp, int old)
|
||||
cleanup_until(cp);
|
||||
return dgoto(cp);
|
||||
}
|
||||
+ xfree(dp);
|
||||
}
|
||||
xfree(buf.s);
|
||||
}
|
||||
--
|
||||
2.5.5
|
||||
|
@ -1,25 +0,0 @@
|
||||
From 4c088bc70c83a89b213e5d803217d4bfa92bfbf5 Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Sat, 16 Apr 2016 14:08:14 +0000
|
||||
Subject: [PATCH] Fix wrong ifdef (Corinna Vinschen)
|
||||
|
||||
---
|
||||
sh.file.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/sh.file.c b/sh.file.c
|
||||
index 3989d8a..a1d766d 100644
|
||||
--- a/sh.file.c
|
||||
+++ b/sh.file.c
|
||||
@@ -564,7 +564,7 @@ again: /* search for matches */
|
||||
}
|
||||
|
||||
if (looking_for_lognames) {
|
||||
-#ifndef HAVE_GETPWENT
|
||||
+#ifdef HAVE_GETPWENT
|
||||
(void) endpwent();
|
||||
#endif
|
||||
} else
|
||||
--
|
||||
2.5.5
|
||||
|
@ -1,107 +0,0 @@
|
||||
From 17d484bfacf46fe1a36a8e4eafa590ad0a13615d Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Tue, 24 May 2016 15:11:30 +0000
|
||||
Subject: [PATCH 1/2] preserve previous value of haderr.
|
||||
|
||||
---
|
||||
sh.proc.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/sh.proc.c b/sh.proc.c
|
||||
index e48a3b4..8472ef5 100644
|
||||
--- a/sh.proc.c
|
||||
+++ b/sh.proc.c
|
||||
@@ -993,6 +993,7 @@ pprint(struct process *pp, int flag)
|
||||
struct process *tp;
|
||||
int jobflags, pstatus, pcond;
|
||||
const char *format;
|
||||
+ int ohaderr;
|
||||
|
||||
#ifdef BACKPIPE
|
||||
struct process *pipehead = NULL, *pipetail = NULL, *pmarker = NULL;
|
||||
@@ -1008,6 +1009,7 @@ pprint(struct process *pp, int flag)
|
||||
tp = pp;
|
||||
status = reason = -1;
|
||||
jobflags = 0;
|
||||
+ ohaderr = haderr;
|
||||
haderr = 1; /* Print status to stderr */
|
||||
do {
|
||||
#ifdef BACKPIPE
|
||||
@@ -1217,7 +1219,7 @@ prcomd:
|
||||
xprintf(" ");
|
||||
ptprint(tp);
|
||||
}
|
||||
- haderr = 0;
|
||||
+ haderr = ohaderr;
|
||||
return (jobflags);
|
||||
}
|
||||
|
||||
--
|
||||
2.5.5
|
||||
|
||||
|
||||
From 50029cb5d4fe43059eacda5a6e5a25db2e94975e Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Tue, 24 May 2016 17:41:12 +0000
|
||||
Subject: [PATCH 2/2] don't print jobs to stderr
|
||||
(paulo.cesar.pereira.de.andrade)
|
||||
|
||||
---
|
||||
sh.proc.c | 5 +++--
|
||||
sh.proc.h | 17 +++++++++--------
|
||||
2 files changed, 12 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/sh.proc.c b/sh.proc.c
|
||||
index 8472ef5..49b199f 100644
|
||||
--- a/sh.proc.c
|
||||
+++ b/sh.proc.c
|
||||
@@ -1010,7 +1010,8 @@ pprint(struct process *pp, int flag)
|
||||
status = reason = -1;
|
||||
jobflags = 0;
|
||||
ohaderr = haderr;
|
||||
- haderr = 1; /* Print status to stderr */
|
||||
+ /* Print status to stderr, except for jobs built-in */
|
||||
+ haderr = !(flag & JOBLIST);
|
||||
do {
|
||||
#ifdef BACKPIPE
|
||||
/*
|
||||
@@ -1318,7 +1319,7 @@ void
|
||||
dojobs(Char **v, struct command *c)
|
||||
{
|
||||
struct process *pp;
|
||||
- int flag = NUMBER | NAME | REASON;
|
||||
+ int flag = NUMBER | NAME | REASON | JOBLIST;
|
||||
int i;
|
||||
|
||||
USE(c);
|
||||
diff --git a/sh.proc.h b/sh.proc.h
|
||||
index 859e55a..919c7c3 100644
|
||||
--- a/sh.proc.h
|
||||
+++ b/sh.proc.h
|
||||
@@ -106,14 +106,15 @@ struct process {
|
||||
#define PBRACE (1<<18) /* Process is {} evaluation */
|
||||
|
||||
/* defines for arguments to pprint */
|
||||
-#define NUMBER 01
|
||||
-#define NAME 02
|
||||
-#define REASON 04
|
||||
-#define AMPERSAND 010
|
||||
-#define FANCY 020
|
||||
-#define SHELLDIR 040 /* print shell's dir if not the same */
|
||||
-#define JOBDIR 0100 /* print job's dir if not the same */
|
||||
-#define AREASON 0200
|
||||
+#define NUMBER 0x001
|
||||
+#define NAME 0x002
|
||||
+#define REASON 0x004
|
||||
+#define AMPERSAND 0x008
|
||||
+#define FANCY 0x010
|
||||
+#define SHELLDIR 0x020 /* print shell's dir if not the same */
|
||||
+#define JOBDIR 0x040 /* print job's dir if not the same */
|
||||
+#define AREASON 0x080
|
||||
+#define JOBLIST 0x100
|
||||
|
||||
EXTERN struct process proclist IZERO_STRUCT;/* list head of all processes */
|
||||
|
||||
--
|
||||
2.5.5
|
||||
|
@ -1,161 +0,0 @@
|
||||
From 37a227b27344ef0b7cfa9d42064f704ffcde9234 Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Fri, 27 May 2016 18:07:58 +0000
|
||||
Subject: [PATCH 1/3] Add a couple of test for PR/526 (David Kaspar)
|
||||
|
||||
---
|
||||
tests/lexical.at | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 59 insertions(+)
|
||||
|
||||
diff --git a/tests/lexical.at b/tests/lexical.at
|
||||
index 5fa37bd..78f66d6 100644
|
||||
--- a/tests/lexical.at
|
||||
+++ b/tests/lexical.at
|
||||
@@ -546,3 +546,62 @@ arg1 arg2
|
||||
])
|
||||
|
||||
AT_CLEANUP
|
||||
+
|
||||
+
|
||||
+AT_SETUP([Quoting of expansions in `...`])
|
||||
+
|
||||
+AT_DATA([batchsystem.properties],
|
||||
+[[# Path to job setting file
|
||||
+asyncjobinfo.uri=file:///usr/bns/stbns01/batch/app/properties/asyncjobinfo.xml
|
||||
+purebatchjobinfo.uri=file:///usr/bns/stbns01/batch/app/properties/purebatchjobinfo.xml
|
||||
+
|
||||
+# DB connection info
|
||||
+jdbc_url=jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=db)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=bns03)))
|
||||
+sub_url=jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=db)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=bns03)))
|
||||
+mss_url=jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=db)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=bns03)))
|
||||
+dbuser=stbns01bt
|
||||
+dbpasswd=stbns01bt
|
||||
+
|
||||
+# OnBatch listener
|
||||
+run=3
|
||||
+]])
|
||||
+AT_DATA([uniformity_test.csh],
|
||||
+[[
|
||||
+set SERVICE_NAME_LOG = `cat batchsystem.properties | grep '^jdbc_url' | sed -ne 's/^[^=]*=[^@]*@[:blank:]*\([^$]*\)$/\1/p' | perl -pe 's/\s//g' | perl -pe 's/\)/\\\)/g' | perl -pe 's/\(/\\\(/g'`
|
||||
+echo -n "$SERVICE_NAME_LOG" > ./output1
|
||||
+
|
||||
+cat batchsystem.properties | grep '^jdbc_url' | sed -ne 's/^[^=]*=[^@]*@[:blank:]*\([^$]*\)$/\1/p' | perl -pe 's/\s//g' | perl -pe 's/\)/\\\)/g' | perl -pe 's/\(/\\\(/g' > ./output2
|
||||
+
|
||||
+diff -uprN ./output1 ./output2 >& /dev/null
|
||||
+
|
||||
+if ( $? != 0 ) then
|
||||
+ echo -n 'FAIL: tcsh does not have uniform output when `...` is used!'
|
||||
+ exit 1
|
||||
+else
|
||||
+ echo -n 'OK'
|
||||
+ exit 0
|
||||
+endif
|
||||
+]])
|
||||
+AT_DATA([quoting_result_test.csh],
|
||||
+[[
|
||||
+echo "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP\)(HOST=db\)(PORT=1521\)\)(CONNECT_DATA=(SERVER=DEDICATED\)(SERVICE_NAME=bns03\)\)\)" > ./expected_result
|
||||
+
|
||||
+set string = "jdbc_url=jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=db)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=bns03)))"
|
||||
+set SERVICE_NAME_LOG = `echo "$string" | grep '^jdbc_url' | sed -ne 's/^[^=]*=[^@]*@[:blank:]*\([^$]*\)$/\1/p' | perl -pe 's/\)/\\\)/g'`
|
||||
+
|
||||
+echo "$SERVICE_NAME_LOG" > ./actual_result
|
||||
+
|
||||
+diff -uprN ./expected_result ./actual_result >& /dev/null
|
||||
+
|
||||
+if ( $? != 0 ) then
|
||||
+ echo -n 'FAIL: tcsh has unexpected result when `...` is used!'
|
||||
+ exit 1
|
||||
+else
|
||||
+ echo -n 'OK'
|
||||
+ exit 0
|
||||
+endif
|
||||
+]])
|
||||
+AT_CHECK([tcsh -f uniformity_test.csh], 0,[OK])
|
||||
+AT_CHECK([tcsh -f quoting_result_test.csh], 0, [OK])
|
||||
+
|
||||
+AT_CLEANUP
|
||||
--
|
||||
2.5.5
|
||||
|
||||
|
||||
From 3e4411aa612d6e70eeaed56ccac824c0c4fe7645 Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Fri, 27 May 2016 18:08:56 +0000
|
||||
Subject: [PATCH 2/3] Test that output of the jobs builtin goes to stdout
|
||||
(David Kaspar)
|
||||
|
||||
---
|
||||
tests/commands.at | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/tests/commands.at b/tests/commands.at
|
||||
index 4ca5a0e..b78fb26 100644
|
||||
--- a/tests/commands.at
|
||||
+++ b/tests/commands.at
|
||||
@@ -1470,4 +1470,20 @@ OK
|
||||
|
||||
AT_CLEANUP
|
||||
|
||||
+AT_SETUP([jobs output])
|
||||
|
||||
+AT_DATA([jobs_stdout.csh],
|
||||
+[[
|
||||
+sleep 3 &
|
||||
+jobs -l > ./stdout
|
||||
+
|
||||
+if ( -z ./stdout ) then
|
||||
+ echo "FAIL: 'jobs' output is not being displayed to stdout!"
|
||||
+ exit 1
|
||||
+else
|
||||
+ exit 0
|
||||
+endif
|
||||
+]])
|
||||
+AT_CHECK([tcsh -f jobs_stdout.csh], 0, [ignore])
|
||||
+
|
||||
+AT_CLEANUP
|
||||
--
|
||||
2.5.5
|
||||
|
||||
|
||||
From 9e4845ba68c3fc4533ac484404752d9b59bef535 Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Fri, 27 May 2016 18:10:15 +0000
|
||||
Subject: [PATCH 3/3] Test that in backquote expansions quoting just the first
|
||||
character does not assume that the whole string is quoted (David Kaspar)
|
||||
|
||||
---
|
||||
tests/lexical.at | 21 +++++++++++++++++++++
|
||||
1 file changed, 21 insertions(+)
|
||||
|
||||
diff --git a/tests/lexical.at b/tests/lexical.at
|
||||
index 78f66d6..7b7da4e 100644
|
||||
--- a/tests/lexical.at
|
||||
+++ b/tests/lexical.at
|
||||
@@ -605,3 +605,24 @@ AT_CHECK([tcsh -f uniformity_test.csh], 0,[OK])
|
||||
AT_CHECK([tcsh -f quoting_result_test.csh], 0, [OK])
|
||||
|
||||
AT_CLEANUP
|
||||
+
|
||||
+AT_SETUP([\echo for git_tcsh_completion])
|
||||
+
|
||||
+AT_DATA([escape_echo.csh],
|
||||
+[[
|
||||
+set myvar = `\echo "1 2 3"`
|
||||
+echo ${myvar}
|
||||
+echo ${myvar[1]}
|
||||
+echo ${myvar[2]}
|
||||
+echo ${myvar[3]}
|
||||
+exit 0
|
||||
+]])
|
||||
+
|
||||
+AT_CHECK([tcsh -f escape_echo.csh], 0,
|
||||
+[1 2 3
|
||||
+1
|
||||
+2
|
||||
+3
|
||||
+])
|
||||
+
|
||||
+AT_CLEANUP
|
||||
--
|
||||
2.5.5
|
||||
|
@ -1,113 +0,0 @@
|
||||
From bd339ea54ce5bd0a4925ae47856cf4bee8174f44 Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Sat, 9 Jul 2016 00:45:29 +0000
|
||||
Subject: [PATCH 1/2] Always send rusage output to stdout (David Kaspar)
|
||||
|
||||
---
|
||||
Fixes | 1 +
|
||||
sh.time.c | 5 +++++
|
||||
2 files changed, 6 insertions(+)
|
||||
|
||||
diff --git a/Fixes b/Fixes
|
||||
index 981d676..ce17ff9 100644
|
||||
--- a/Fixes
|
||||
+++ b/Fixes
|
||||
@@ -1,3 +1,4 @@
|
||||
+ 13. always send prusage to stdout.
|
||||
12. PR/526: Fix double \\ printing from previous fix in history expansion.
|
||||
10. PR/526: Quote backslashes properly so they can be preserved in ``
|
||||
expansions
|
||||
diff --git a/sh.time.c b/sh.time.c
|
||||
index 23fc7d7..5767ae7 100644
|
||||
--- a/sh.time.c
|
||||
+++ b/sh.time.c
|
||||
@@ -293,6 +293,7 @@ prusage(struct tms *bs, struct tms *es, clock_t e, clock_t b)
|
||||
# endif /* _SEQUENT_ */
|
||||
#endif /* BSDTIMES */
|
||||
{
|
||||
+ int ohaderr = haderr;
|
||||
#ifdef BSDTIMES
|
||||
time_t t =
|
||||
(r1->ru_utime.tv_sec - r0->ru_utime.tv_sec) * 100 +
|
||||
@@ -334,12 +335,14 @@ prusage(struct tms *bs, struct tms *es, clock_t e, clock_t b)
|
||||
((e->tv_sec - b->tv_sec) * 100 + (e->tv_usec - b->tv_usec) / 10000);
|
||||
|
||||
cp = "%Uu %Ss %E %P %X+%Dk %I+%Oio %Fpf+%Ww";
|
||||
+ haderr = 0;
|
||||
#else /* !BSDTIMES */
|
||||
# ifdef _SEQUENT_
|
||||
int ms = (int)
|
||||
((e->tv_sec - b->tv_sec) * 100 + (e->tv_usec - b->tv_usec) / 10000);
|
||||
|
||||
cp = "%Uu %Ss %E %P %I+%Oio %Fpf+%Ww";
|
||||
+ haderr = 0;
|
||||
# else /* !_SEQUENT_ */
|
||||
# ifndef POSIX
|
||||
time_t ms = ((time_t)((e - b) / HZ) * 100) +
|
||||
@@ -350,6 +353,7 @@ prusage(struct tms *bs, struct tms *es, clock_t e, clock_t b)
|
||||
# endif /* POSIX */
|
||||
|
||||
cp = "%Uu %Ss %E %P";
|
||||
+ haderr = 0;
|
||||
|
||||
/*
|
||||
* the tms stuff is not very precise, so we fudge it.
|
||||
@@ -678,6 +682,7 @@ prusage(struct tms *bs, struct tms *es, clock_t e, clock_t b)
|
||||
break;
|
||||
}
|
||||
xputchar('\n');
|
||||
+ haderr = ohaderr;
|
||||
}
|
||||
|
||||
#if defined(BSDTIMES) || defined(_SEQUENT_)
|
||||
--
|
||||
2.5.5
|
||||
|
||||
|
||||
From fa50bfd63c4b6c68a75b52da9b0284f0f1fcbd89 Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Sat, 9 Jul 2016 00:49:28 +0000
|
||||
Subject: [PATCH 2/2] add new test for time output.
|
||||
|
||||
---
|
||||
tests/commands.at | 20 ++++++++++++++++++++
|
||||
1 file changed, 20 insertions(+)
|
||||
|
||||
diff --git a/tests/commands.at b/tests/commands.at
|
||||
index b78fb26..cf0fcf0 100644
|
||||
--- a/tests/commands.at
|
||||
+++ b/tests/commands.at
|
||||
@@ -1470,6 +1470,7 @@ OK
|
||||
|
||||
AT_CLEANUP
|
||||
|
||||
+
|
||||
AT_SETUP([jobs output])
|
||||
|
||||
AT_DATA([jobs_stdout.csh],
|
||||
@@ -1487,3 +1488,22 @@ endif
|
||||
AT_CHECK([tcsh -f jobs_stdout.csh], 0, [ignore])
|
||||
|
||||
AT_CLEANUP
|
||||
+
|
||||
+AT_SETUP([time output])
|
||||
+
|
||||
+
|
||||
+AT_DATA([time_output.csh],
|
||||
+[[
|
||||
+set time_output=`time sleep 1 > /dev/null`
|
||||
+echo $time_output > ./output_result
|
||||
+
|
||||
+if ( -z ./output_result) then
|
||||
+ echo "FAIL: 'time' output is not being displayed to stdout!"
|
||||
+ exit 1
|
||||
+else
|
||||
+ exit 0
|
||||
+endif
|
||||
+]])
|
||||
+AT_CHECK([tcsh -f time_output.csh], 0, [ignore])
|
||||
+
|
||||
+AT_CLEANUP
|
||||
--
|
||||
2.5.5
|
||||
|
@ -1,66 +0,0 @@
|
||||
From 2feaa8545dbc8b422d34412698262b3dc860653c Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Sun, 17 Jul 2016 15:02:44 +0000
|
||||
Subject: [PATCH 1/2] For multiline prompt (do control chars first). Kensuke
|
||||
Iwahashi/David Kaspar: set prompt="%~\n%%" ctrl-p, ctrl-u
|
||||
|
||||
---
|
||||
tc.nls.c | 14 +++++++-------
|
||||
1 file changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/tc.nls.c b/tc.nls.c
|
||||
index 6158097..60ce2f7 100644
|
||||
--- a/tc.nls.c
|
||||
+++ b/tc.nls.c
|
||||
@@ -143,6 +143,13 @@ NLSClassify(Char c, int nocomb, int drawPrompt)
|
||||
if (c >= 0x10000) /* U+10000 = F0 90 80 80 */
|
||||
return NLSCLASS_ILLEGAL2;
|
||||
}
|
||||
+ if (Iscntrl(c) && (c & CHAR) < 0x100) {
|
||||
+ if (c == '\n')
|
||||
+ return NLSCLASS_NL;
|
||||
+ if (c == '\t')
|
||||
+ return NLSCLASS_TAB;
|
||||
+ return NLSCLASS_CTRL;
|
||||
+ }
|
||||
w = NLSWidth(c);
|
||||
if (drawPrompt) { /* draw prompt */
|
||||
if (w > 0)
|
||||
@@ -152,12 +159,5 @@ NLSClassify(Char c, int nocomb, int drawPrompt)
|
||||
}
|
||||
if ((w > 0 && !(Iscntrl(c) && (c & CHAR) < 0x100)) || (Isprint(c) && !nocomb))
|
||||
return w;
|
||||
- if (Iscntrl(c) && (c & CHAR) < 0x100) {
|
||||
- if (c == '\n')
|
||||
- return NLSCLASS_NL;
|
||||
- if (c == '\t')
|
||||
- return NLSCLASS_TAB;
|
||||
- return NLSCLASS_CTRL;
|
||||
- }
|
||||
return NLSCLASS_ILLEGAL;
|
||||
}
|
||||
--
|
||||
2.5.5
|
||||
|
||||
|
||||
From 7fe5e55b5ebf819fad8f3571bbc008b2983882de Mon Sep 17 00:00:00 2001
|
||||
From: christos <christos>
|
||||
Date: Sun, 17 Jul 2016 15:03:34 +0000
|
||||
Subject: [PATCH 2/2] mention multi-line prompt fix.
|
||||
|
||||
---
|
||||
Fixes | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/Fixes b/Fixes
|
||||
index ce17ff9..fc7ba77 100644
|
||||
--- a/Fixes
|
||||
+++ b/Fixes
|
||||
@@ -1,3 +1,4 @@
|
||||
+ 14. Fix drawing issu with multi-line prompt (Kensuke Iwahashi/David Kaspar)
|
||||
13. always send prusage to stdout.
|
||||
12. PR/526: Fix double \\ printing from previous fix in history expansion.
|
||||
10. PR/526: Quote backslashes properly so they can be preserved in ``
|
||||
--
|
||||
2.5.5
|
||||
|
40
tcsh.spec
40
tcsh.spec
@ -1,7 +1,7 @@
|
||||
Name: tcsh
|
||||
Summary: An enhanced version of csh, the C shell
|
||||
Version: 6.19.00
|
||||
Release: 15%{?dist}
|
||||
Version: 6.20.00
|
||||
Release: 1%{?dist}
|
||||
License: BSD
|
||||
|
||||
URL: http://www.tcsh.org/
|
||||
@ -42,39 +42,6 @@ BuildRequires: ncurses-devel
|
||||
|
||||
# Upstream patches -- official upstream patches released by upstream since the
|
||||
# ---------------- last rebase that are necessary for any reason:
|
||||
Patch000: tcsh-6.19.00-000-announcement.patch
|
||||
Patch001: tcsh-6.19.00-001-remove-CFLAGS-for-gethost.patch
|
||||
Patch002: tcsh-6.19.00-002-fix-error-messages.patch
|
||||
Patch003: tcsh-6.19.00-003-avoid-gcc5-calloc-optimization.patch
|
||||
Patch004: tcsh-6.19.00-004-remove-unused-variable.patch
|
||||
Patch005: tcsh-6.19.00-005-ge0-is-always-true-for-unsigned.patch
|
||||
Patch006: tcsh-6.19.00-006-_SIGWINCH-added.patch
|
||||
Patch007: tcsh-6.19.00-007-fix-handling-of-invalid-unicode-characters.patch
|
||||
Patch008: tcsh-6.19.00-008-fix-ln-1-completion.patch
|
||||
Patch009: tcsh-6.19.00-009-fix-parsing-of-if-statement.patch
|
||||
Patch010: tcsh-6.19.00-010-fix-editor-and-visual-variables-and-its-behaviour.patch
|
||||
Patch011: tcsh-6.19.00-011-man-page-spelling-fixes.patch
|
||||
Patch012: tcsh-6.19.00-012-display-default-in-editor.patch
|
||||
Patch013: tcsh-6.19.00-013-VImode-variable-provided.patch
|
||||
Patch014: tcsh-6.19.00-014-do-not-use-union-wait.patch
|
||||
Patch015: tcsh-6.19.00-015-set-LC_COLLATE-to-C-and-add-HTML-makefile.patch
|
||||
Patch016: tcsh-6.19.00-016-do-not-quote-name-expanded-by-completion.patch
|
||||
Patch017: tcsh-6.19.00-017-fix-for-finnish-translations.patch
|
||||
Patch018: tcsh-6.19.00-018-add-noclobber-and-ask-options.patch
|
||||
Patch019: tcsh-6.19.00-019-fix-uninitialized-estr.patch
|
||||
Patch020: tcsh-6.19.00-020-make-heredoc-interruptible-again.patch
|
||||
Patch021: tcsh-6.19.00-021-remove-extra-semicolon.patch
|
||||
Patch022: tcsh-6.19.00-022-fix-source-command-memory-leak.patch
|
||||
Patch023: tcsh-6.19.00-023-fix-debugging-code.patch
|
||||
Patch024: tcsh-6.19.00-024-use-sysmalloc.patch
|
||||
Patch025: tcsh-6.19.00-025-more-generous-ROUNDUP-_LP64.patch
|
||||
Patch026: tcsh-6.19.00-026-quote-backslashes-properly.patch
|
||||
Patch027: tcsh-6.19.00-027-fix-memory-leak-when-cdpath-fails.patch
|
||||
Patch028: tcsh-6.19.00-028-fix-wrong-ifdef.patch
|
||||
Patch029: tcsh-6.19.00-029-do-not-print-jobs-to-stderr.patch
|
||||
Patch030: tcsh-6.19.00-030-new-testcases-for-testsuite.patch
|
||||
Patch031: tcsh-6.19.00-031-always-send-prusage-to-stdout.patch
|
||||
Patch032: tcsh-6.19.00-032-fix-multiline-prompt.patch
|
||||
|
||||
|
||||
# Downstream patches -- these should be always included when doing rebase:
|
||||
@ -200,6 +167,9 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Nov 28 2016 David Kaspar [Dee'Kej] <dkaspar@redhat.com> - 6.20.00-1
|
||||
- Rebase to tcsh-6.20.00
|
||||
|
||||
* Tue Sep 6 2016 David Kaspar [Dee'Kej] <dkaspar@redhat.com> - 6.19.00-15
|
||||
- Add a safeguard for installation on UsrMove enabled filesystem only
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user