]> TLD Linux GIT Repositories - packages/mksh.git/blobdiff - mksh-circumflex.patch
- PLD merge
[packages/mksh.git] / mksh-circumflex.patch
index 97ddc42feb9186673efc120862a8c4bc94be383f..dc6276b71e80e4e398dc12d517929a26b4eda6b2 100644 (file)
@@ -1,45 +1,45 @@
-diff -urp mksh.orig/check.t mksh/check.t
---- mksh.orig/check.t  2016-08-12 16:48:28.000000000 +0000
-+++ mksh/check.t       2016-08-18 06:51:31.069554000 +0000
-@@ -2274,7 +2274,7 @@ expected-stdout:
-       cbc
-       -bc cbc
+diff -urNp -x '*.orig' mksh-59c.org/check.t mksh-59c/check.t
+--- mksh-59c.org/check.t       2020-10-31 04:53:30.000000000 +0100
++++ mksh-59c/check.t   2021-03-20 19:53:40.714261839 +0100
+@@ -2484,7 +2484,7 @@ expected-stdout:
+       !bc +bc ,bc 0bc 1bc ^bc cbc
+       !bc +bc ,bc -bc 0bc 1bc ^bc cbc
        abc bbc
 -      ^bc abc bbc
-+      !bc -bc ^bc cbc
-       !bc -bc ^bc cbc
++      !bc +bc ,bc -bc 0bc 1bc ^bc cbc
+       +bc ,bc -bc
+       -bc 0bc 1bc
  ---
- name: glob-range-2
-diff -urp mksh.orig/eval.c mksh/eval.c
---- mksh.orig/eval.c   2016-08-01 21:38:27.000000000 +0000
-+++ mksh/eval.c        2016-08-18 06:51:31.063554000 +0000
-@@ -972,6 +972,7 @@ expand(
-                               switch (c) {
-                               case '[':
-                               case '!':
-+                              case NOT2:
-                               case '-':
-                               case ']':
+diff -urNp -x '*.orig' mksh-59c.org/eval.c mksh-59c/eval.c
+--- mksh-59c.org/eval.c        2020-05-05 23:34:54.000000000 +0200
++++ mksh-59c/eval.c    2021-03-20 19:53:40.717595272 +0100
+@@ -1108,6 +1108,7 @@ expand(
+                               switch (ord(c)) {
+                               case ORD('['):
+                               case ORD('!'):
++                              case ORD(NOT2):
+                               case ORD('-'):
+                               case ORD(']'):
                                        /*
-diff -urp mksh.orig/misc.c mksh/misc.c
---- mksh.orig/misc.c   2016-08-01 18:43:08.000000000 +0000
-+++ mksh/misc.c        2016-08-18 06:51:31.064554000 +0000
-@@ -902,7 +902,7 @@ gmatch_cclass(const unsigned char *p, un
-       bool notp, found = false;
-       const unsigned char *orig_p = p;
+diff -urNp -x '*.orig' mksh-59c.org/misc.c mksh-59c/misc.c
+--- mksh-59c.org/misc.c        2020-08-27 21:53:12.000000000 +0200
++++ mksh-59c/misc.c    2021-03-20 19:53:40.717595272 +0100
+@@ -1018,7 +1018,7 @@ gmatch_cclass(const unsigned char *pat,
+       char *subp;
  
--      if ((notp = tobool(ISMAGIC(*p) && *++p == '!')))
-+      if ((notp = tobool(ISMAGIC(*p) && (*++p == '!' || *p == NOT2))))
-               p++;
-       do {
-               c = *p++;
-diff -urp mksh.orig/sh.h mksh/sh.h
---- mksh.orig/sh.h     2016-08-12 16:48:31.000000000 +0000
-+++ mksh/sh.h  2016-08-18 06:51:31.066554000 +0000
-@@ -501,6 +501,7 @@ extern int __cdecl setegid(gid_t);
+       /* check for negation */
+-      if (ISMAGIC(p[0]) && ord(p[1]) == ORD('!')) {
++      if (ISMAGIC(p[0]) && (ord(p[1]) == ORD('!') || ord(p[1]) == ORD(NOT2))) {
+               p += 2;
+               negated = true;
+       }
+diff -urNp -x '*.orig' mksh-59c.org/sh.h mksh-59c/sh.h
+--- mksh-59c.org/sh.h  2020-10-31 04:53:33.000000000 +0100
++++ mksh-59c/sh.h      2021-03-20 19:53:40.717595272 +0100
+@@ -580,6 +580,7 @@ extern int __cdecl setegid(gid_t);
   */
- #define MAGIC         (7)     /* prefix for *?[!{,} during expand */
- #define ISMAGIC(c)    ((unsigned char)(c) == MAGIC)
+ #define MAGIC         KSH_BEL /* prefix for *?[!{,} during expand */
+ #define ISMAGIC(c)    (ord(c) == ORD(MAGIC))
 +#define NOT2          '^'
  
  EXTERN const char *safe_prompt; /* safe prompt if PS1 substitution fails */