up to 50f
[packages/mksh.git] / mksh-circumflex.patch
1 diff -ur mksh-40.org//eval.c mksh-40/eval.c
2 --- mksh-40.org//eval.c 2011-06-12 16:45:57.000000000 +0200
3 +++ mksh-40/eval.c      2011-07-07 18:27:58.891492090 +0200
4 @@ -887,6 +887,7 @@
5                                 switch (c) {
6                                 case '[':
7                                 case '!':
8 +                               case NOT2:
9                                 case '-':
10                                 case ']':
11                                         /*
12 diff -ur mksh-40.org//misc.c mksh-40/misc.c
13 --- mksh-40.org//misc.c 2011-06-12 16:45:58.000000000 +0200
14 +++ mksh-40/misc.c      2011-07-07 18:28:39.015826686 +0200
15 @@ -843,7 +843,7 @@
16         bool notp, found = false;
17         const unsigned char *orig_p = p;
18  
19 -       if ((notp = tobool(ISMAGIC(*p) && *++p == '!')))
20 +       if ((notp = tobool(ISMAGIC(*p) && (*++p == '!' || *p == NOT2))))
21                 p++;
22         do {
23                 c = *p++;
24 diff -ur mksh-40.org//sh.h mksh-40/sh.h
25 --- mksh-40.org//sh.h   2011-06-12 16:59:09.000000000 +0200
26 +++ mksh-40/sh.h        2011-07-07 18:29:16.346761511 +0200
27 @@ -380,5 +380,6 @@
28  #define MAGIC          (7)     /* prefix for *?[!{,} during expand */
29  #define ISMAGIC(c)     ((unsigned char)(c) == MAGIC)
30 +#define NOT2           '^'
31  
32  #define LINE           4096    /* input line size */
33  
34 diff -ur mksh-40.org//tree.c mksh-40/tree.c
35 --- mksh-40.org//tree.c 2011-05-29 04:19:21.000000000 +0200
36 +++ mksh-40/tree.c      2011-07-07 18:30:12.088149284 +0200
37 @@ -289,7 +289,7 @@
38                 case CHAR:
39                         c = *wp++;
40                         if ((opmode & WDS_MAGIC) &&
41 -                           (ISMAGIC(c) || c == '[' || c == '!' ||
42 +                           (ISMAGIC(c) || c == '[' || c == '!' || c == NOT2 ||
43                             c == '-' || c == ']' || c == '*' || c == '?'))
44                                 shf_putc(MAGIC, shf);
45                         shf_putc(c, shf);
46 diff -urN mksh.org/check.t mksh/check.t
47 --- mksh.org/check.t    2014-01-11 19:10:02.000000000 +0100
48 +++ mksh/check.t        2014-01-20 14:12:37.924222697 +0100
49 @@ -2085,7 +2085,7 @@
50         cbc
51         -bc cbc
52         abc bbc
53 -       ^bc abc bbc
54 +       !bc -bc ^bc cbc
55         !bc -bc ^bc cbc
56  ---
57  name: glob-range-2
This page took 0.03772 seconds and 3 git commands to generate.