Package init

This commit is contained in:
dogsheng 2019-12-25 16:08:50 +08:00
parent f07153d5b4
commit 512af87cae
3 changed files with 132 additions and 1 deletions

View File

@ -0,0 +1,95 @@
From 4679bde3e1ceca63d6eb4de5ce41c996405e61aa Mon Sep 17 00:00:00 2001
From: Christos Zoulas <christos@zoulas.com>
Date: Mon, 29 Jul 2019 09:03:40 -0400
Subject: [PATCH 48/58] PR/81: oldping: Fix range matching issue where we were
comparing with the range character instead of the start of range.
---
glob.c | 27 +++++++++++++++------------
1 file changed, 15 insertions(+), 12 deletions(-)
diff --git a/glob.c b/glob.c
index c2bc95f..dbdfa1e 100644
--- a/glob.c
+++ b/glob.c
@@ -100,7 +100,7 @@ static int Lstat (const char *, struct stat *);
static int Stat (const char *, struct stat *sb);
static Char *Strchr (Char *, int);
#ifdef DEBUG
-static void qprintf (const Char *);
+static void qprintf (const char *, const Char *);
#endif
#define DOLLAR '$'
@@ -254,19 +254,20 @@ Strchr(Char *str, int ch)
#ifdef DEBUG
static void
-qprintf(const Char *s)
+qprintf(const char *pre, const Char *s)
{
const Char *p;
-
+
+ xprintf("%s", pre);
for (p = s; *p; p++)
- printf("%c", *p & 0xff);
- printf("\n");
+ xprintf("%c", *p & 0xff);
+ xprintf("\n%s", pre);
for (p = s; *p; p++)
- printf("%c", *p & M_PROTECT ? '"' : ' ');
- printf("\n");
+ xprintf("%c", *p & M_PROTECT ? '"' : ' ');
+ xprintf("\n%s", pre);
for (p = s; *p; p++)
- printf("%c", *p & M_META ? '_' : ' ');
- printf("\n");
+ xprintf("%c", *p & M_META ? '_' : ' ');
+ xprintf("\n");
}
#endif /* DEBUG */
@@ -410,7 +411,7 @@ glob(const char *pattern, int flags, int (*errfunc) (const char *, int),
}
*bufnext = EOS;
#ifdef DEBUG
- qprintf(patbuf);
+ qprintf("patbuf=", patbuf);
#endif
if ((err = glob1(patbuf, pglob, no_match)) != 0) {
@@ -707,7 +708,7 @@ match(const char *name, const Char *pat, const Char *patend, int m_not)
while (pat < patend || *name) {
size_t lwk, pwk;
- __Char wc, wk;
+ __Char wc, wk, wc1;
c = *pat; /* Only for M_MASK bits */
if (*name == EOS)
@@ -742,18 +743,20 @@ match(const char *name, const Char *pat, const Char *patend, int m_not)
pat += pwk;
pwk = One_Char_mbtowc(&wc, pat, MB_LEN_MAX);
}
+ wc1 = wc;
while ((*pat & M_MASK) != M_END) {
if ((*pat & M_MASK) == M_RNG) {
__Char wc2;
pat += pwk;
pwk = One_Char_mbtowc(&wc2, pat, MB_LEN_MAX);
- if (globcharcoll(wc, wk, 0) <= 0 &&
+ if (globcharcoll(wc1, wk, 0) <= 0 &&
globcharcoll(wk, wc2, 0) <= 0)
ok = 1;
} else if (wc == wk)
ok = 1;
pat += pwk;
+ wc1 = wc;
pwk = One_Char_mbtowc(&wc, pat, MB_LEN_MAX);
}
pat += pwk;
--
1.8.3.1

View File

@ -0,0 +1,28 @@
From 51f7c9361de62d7106eafc6cb0c33cc6701de9e2 Mon Sep 17 00:00:00 2001
From: Christos Zoulas <christos@zoulas.com>
Date: Thu, 1 Aug 2019 10:28:50 -0400
Subject: [PATCH 50/58] PR/88: sharifib: Preserve empty arguments in arrays as
quoted NUL's
---
sh.lex.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sh.lex.c b/sh.lex.c
index b879a1d..2893768 100644
--- a/sh.lex.c
+++ b/sh.lex.c
@@ -1020,8 +1020,10 @@ domod(Char *cp, Char type)
switch (type) {
- case 'x':
case 'q':
+ case 'x':
+ if (*cp == '\0')
+ return Strsave(STRQNULL);
wp = Strsave(cp);
for (xp = wp; (c = *xp) != 0; xp++)
if ((c != ' ' && c != '\t') || type == 'q')
--
1.8.3.1

View File

@ -1,6 +1,6 @@
Name: tcsh
Version: 6.21.00
Release: 1
Release: 2
Summary: C shell with file name completion and command line editing
License: BSD
URL: http://www.tcsh.org/
@ -12,6 +12,8 @@ Requires(postun): sed
Provides: /bin/csh /bin/tcsh
Provides: csh = %{version}
Patch6000: 0061-PR-81-oldping-Fix-range-matching-issue-where-we-were.patch
Patch6001: 0063-PR-88-sharifib-Preserve-empty-arguments-in-arrays-as.patch
%description
Tcsh is an enhanced but completely compatible version of the Berkeley
@ -93,6 +95,12 @@ fi
%changelog
* Wed Dec 18 2019 jiangchuangang <jiangchuangang@huawei.com> - 6.21.00-2
- Type:enhancement
- ID:NA
- SUG:restart
- DESC:Synchronize patches
* Wed Sep 04 2019 Huiming Xue <xiehuiming@huawei.com> - 6.21.00.1
- modify spec file