diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-12-12 22:17:44 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-12-12 22:17:44 +0100 |
commit | 3e97eeb408a1107b0ffacc6ba39682428c4598f1 (patch) | |
tree | f6f7df81821d543bef855f961a76b09e79d49855 /shell | |
parent | 8cbc300d083001bccac4f33bf61b9dc97f29cb04 (diff) | |
download | busybox-w32-3e97eeb408a1107b0ffacc6ba39682428c4598f1.tar.gz busybox-w32-3e97eeb408a1107b0ffacc6ba39682428c4598f1.tar.bz2 busybox-w32-3e97eeb408a1107b0ffacc6ba39682428c4598f1.zip |
apply post-1.15.2 fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash.c | 773 |
1 files changed, 384 insertions, 389 deletions
diff --git a/shell/ash.c b/shell/ash.c index a9529f86b..3ca7fa376 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -258,9 +258,6 @@ static void trace_vprintf(const char *fmt, va_list va); | |||
258 | /* ============ Utility functions */ | 258 | /* ============ Utility functions */ |
259 | #define xbarrier() do { __asm__ __volatile__ ("": : :"memory"); } while (0) | 259 | #define xbarrier() do { __asm__ __volatile__ ("": : :"memory"); } while (0) |
260 | 260 | ||
261 | /* C99 says: "char" declaration may be signed or unsigned by default */ | ||
262 | #define signed_char2int(sc) ((int)(signed char)(sc)) | ||
263 | |||
264 | static int isdigit_str9(const char *str) | 261 | static int isdigit_str9(const char *str) |
265 | { | 262 | { |
266 | int maxlen = 9 + 1; /* max 9 digits: 999999999 */ | 263 | int maxlen = 9 + 1; /* max 9 digits: 999999999 */ |
@@ -718,17 +715,17 @@ trace_puts_quoted(char *s) | |||
718 | return; | 715 | return; |
719 | putc('"', tracefile); | 716 | putc('"', tracefile); |
720 | for (p = s; *p; p++) { | 717 | for (p = s; *p; p++) { |
721 | switch (*p) { | 718 | switch ((unsigned char)*p) { |
722 | case '\n': c = 'n'; goto backslash; | 719 | case '\n': c = 'n'; goto backslash; |
723 | case '\t': c = 't'; goto backslash; | 720 | case '\t': c = 't'; goto backslash; |
724 | case '\r': c = 'r'; goto backslash; | 721 | case '\r': c = 'r'; goto backslash; |
725 | case '"': c = '"'; goto backslash; | 722 | case '\"': c = '\"'; goto backslash; |
726 | case '\\': c = '\\'; goto backslash; | 723 | case '\\': c = '\\'; goto backslash; |
727 | case CTLESC: c = 'e'; goto backslash; | 724 | case CTLESC: c = 'e'; goto backslash; |
728 | case CTLVAR: c = 'v'; goto backslash; | 725 | case CTLVAR: c = 'v'; goto backslash; |
729 | case CTLVAR+CTLQUOTE: c = 'V'; goto backslash; | 726 | case CTLVAR+CTLQUOTE: c = 'V'; goto backslash; |
730 | case CTLBACKQ: c = 'q'; goto backslash; | 727 | case CTLBACKQ: c = 'q'; goto backslash; |
731 | case CTLBACKQ+CTLQUOTE: c = 'Q'; goto backslash; | 728 | case CTLBACKQ+CTLQUOTE: c = 'Q'; goto backslash; |
732 | backslash: | 729 | backslash: |
733 | putc('\\', tracefile); | 730 | putc('\\', tracefile); |
734 | putc(c, tracefile); | 731 | putc(c, tracefile); |
@@ -738,8 +735,8 @@ trace_puts_quoted(char *s) | |||
738 | putc(*p, tracefile); | 735 | putc(*p, tracefile); |
739 | else { | 736 | else { |
740 | putc('\\', tracefile); | 737 | putc('\\', tracefile); |
741 | putc(*p >> 6 & 03, tracefile); | 738 | putc((*p >> 6) & 03, tracefile); |
742 | putc(*p >> 3 & 07, tracefile); | 739 | putc((*p >> 3) & 07, tracefile); |
743 | putc(*p & 07, tracefile); | 740 | putc(*p & 07, tracefile); |
744 | } | 741 | } |
745 | break; | 742 | break; |
@@ -823,7 +820,7 @@ sharg(union node *arg, FILE *fp) | |||
823 | { | 820 | { |
824 | char *p; | 821 | char *p; |
825 | struct nodelist *bqlist; | 822 | struct nodelist *bqlist; |
826 | int subtype; | 823 | unsigned char subtype; |
827 | 824 | ||
828 | if (arg->type != NARG) { | 825 | if (arg->type != NARG) { |
829 | out1fmt("<node type %d>\n", arg->type); | 826 | out1fmt("<node type %d>\n", arg->type); |
@@ -831,7 +828,7 @@ sharg(union node *arg, FILE *fp) | |||
831 | } | 828 | } |
832 | bqlist = arg->narg.backquote; | 829 | bqlist = arg->narg.backquote; |
833 | for (p = arg->narg.text; *p; p++) { | 830 | for (p = arg->narg.text; *p; p++) { |
834 | switch (*p) { | 831 | switch ((unsigned char)*p) { |
835 | case CTLESC: | 832 | case CTLESC: |
836 | putc(*++p, fp); | 833 | putc(*++p, fp); |
837 | break; | 834 | break; |
@@ -1581,21 +1578,21 @@ single_quote(const char *s) | |||
1581 | 1578 | ||
1582 | STADJUST(q - p, p); | 1579 | STADJUST(q - p, p); |
1583 | 1580 | ||
1584 | len = strspn(s, "'"); | 1581 | if (*s != '\'') |
1585 | if (!len) | ||
1586 | break; | 1582 | break; |
1583 | len = 0; | ||
1584 | do len++; while (*++s == '\''); | ||
1587 | 1585 | ||
1588 | q = p = makestrspace(len + 3, p); | 1586 | q = p = makestrspace(len + 3, p); |
1589 | 1587 | ||
1590 | *q++ = '"'; | 1588 | *q++ = '"'; |
1591 | q = (char *)memcpy(q, s, len) + len; | 1589 | q = (char *)memcpy(q, s - len, len) + len; |
1592 | *q++ = '"'; | 1590 | *q++ = '"'; |
1593 | s += len; | ||
1594 | 1591 | ||
1595 | STADJUST(q - p, p); | 1592 | STADJUST(q - p, p); |
1596 | } while (*s); | 1593 | } while (*s); |
1597 | 1594 | ||
1598 | USTPUTC(0, p); | 1595 | USTPUTC('\0', p); |
1599 | 1596 | ||
1600 | return stackblock(); | 1597 | return stackblock(); |
1601 | } | 1598 | } |
@@ -2603,14 +2600,10 @@ pwdcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | |||
2603 | #define CIGN 14 /* character should be ignored */ | 2600 | #define CIGN 14 /* character should be ignored */ |
2604 | 2601 | ||
2605 | #if ENABLE_ASH_ALIAS | 2602 | #if ENABLE_ASH_ALIAS |
2606 | #define SYNBASE 130 | 2603 | # define PEOA 256 |
2607 | #define PEOF -130 | 2604 | # define PEOF 257 |
2608 | #define PEOA -129 | ||
2609 | #define PEOA_OR_PEOF PEOA | ||
2610 | #else | 2605 | #else |
2611 | #define SYNBASE 129 | 2606 | # define PEOF 256 |
2612 | #define PEOF -129 | ||
2613 | #define PEOA_OR_PEOF PEOF | ||
2614 | #endif | 2607 | #endif |
2615 | 2608 | ||
2616 | /* number syntax index */ | 2609 | /* number syntax index */ |
@@ -2621,14 +2614,14 @@ pwdcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | |||
2621 | #define PSSYNTAX 4 /* prompt */ | 2614 | #define PSSYNTAX 4 /* prompt */ |
2622 | 2615 | ||
2623 | #if ENABLE_ASH_OPTIMIZE_FOR_SIZE | 2616 | #if ENABLE_ASH_OPTIMIZE_FOR_SIZE |
2624 | #define USE_SIT_FUNCTION | 2617 | # define USE_SIT_FUNCTION |
2625 | #endif | 2618 | #endif |
2626 | 2619 | ||
2627 | #if ENABLE_SH_MATH_SUPPORT | 2620 | #if ENABLE_SH_MATH_SUPPORT |
2628 | static const char S_I_T[][4] = { | 2621 | static const uint8_t S_I_T[][4] = { |
2629 | #if ENABLE_ASH_ALIAS | 2622 | # if ENABLE_ASH_ALIAS |
2630 | { CSPCL, CIGN, CIGN, CIGN }, /* 0, PEOA */ | 2623 | { CSPCL, CIGN, CIGN, CIGN }, /* 0, PEOA */ |
2631 | #endif | 2624 | # endif |
2632 | { CSPCL, CWORD, CWORD, CWORD }, /* 1, ' ' */ | 2625 | { CSPCL, CWORD, CWORD, CWORD }, /* 1, ' ' */ |
2633 | { CNL, CNL, CNL, CNL }, /* 2, \n */ | 2626 | { CNL, CNL, CNL, CNL }, /* 2, \n */ |
2634 | { CWORD, CCTL, CCTL, CWORD }, /* 3, !*-/:=?[]~ */ | 2627 | { CWORD, CCTL, CCTL, CWORD }, /* 3, !*-/:=?[]~ */ |
@@ -2640,17 +2633,17 @@ static const char S_I_T[][4] = { | |||
2640 | { CBACK, CBACK, CCTL, CBACK }, /* 9, \ */ | 2633 | { CBACK, CBACK, CCTL, CBACK }, /* 9, \ */ |
2641 | { CBQUOTE, CBQUOTE, CWORD, CBQUOTE }, /* 10, ` */ | 2634 | { CBQUOTE, CBQUOTE, CWORD, CBQUOTE }, /* 10, ` */ |
2642 | { CENDVAR, CENDVAR, CWORD, CENDVAR }, /* 11, } */ | 2635 | { CENDVAR, CENDVAR, CWORD, CENDVAR }, /* 11, } */ |
2643 | #ifndef USE_SIT_FUNCTION | 2636 | # ifndef USE_SIT_FUNCTION |
2644 | { CENDFILE, CENDFILE, CENDFILE, CENDFILE }, /* 12, PEOF */ | 2637 | { CENDFILE, CENDFILE, CENDFILE, CENDFILE }, /* 12, PEOF */ |
2645 | { CWORD, CWORD, CWORD, CWORD }, /* 13, 0-9A-Za-z */ | 2638 | { CWORD, CWORD, CWORD, CWORD }, /* 13, 0-9A-Za-z */ |
2646 | { CCTL, CCTL, CCTL, CCTL } /* 14, CTLESC ... */ | 2639 | { CCTL, CCTL, CCTL, CCTL } /* 14, CTLESC ... */ |
2647 | #endif | 2640 | # endif |
2648 | }; | 2641 | }; |
2649 | #else | 2642 | #else |
2650 | static const char S_I_T[][3] = { | 2643 | static const uint8_t S_I_T[][3] = { |
2651 | #if ENABLE_ASH_ALIAS | 2644 | # if ENABLE_ASH_ALIAS |
2652 | { CSPCL, CIGN, CIGN }, /* 0, PEOA */ | 2645 | { CSPCL, CIGN, CIGN }, /* 0, PEOA */ |
2653 | #endif | 2646 | # endif |
2654 | { CSPCL, CWORD, CWORD }, /* 1, ' ' */ | 2647 | { CSPCL, CWORD, CWORD }, /* 1, ' ' */ |
2655 | { CNL, CNL, CNL }, /* 2, \n */ | 2648 | { CNL, CNL, CNL }, /* 2, \n */ |
2656 | { CWORD, CCTL, CCTL }, /* 3, !*-/:=?[]~ */ | 2649 | { CWORD, CCTL, CCTL }, /* 3, !*-/:=?[]~ */ |
@@ -2662,46 +2655,50 @@ static const char S_I_T[][3] = { | |||
2662 | { CBACK, CBACK, CCTL }, /* 9, \ */ | 2655 | { CBACK, CBACK, CCTL }, /* 9, \ */ |
2663 | { CBQUOTE, CBQUOTE, CWORD }, /* 10, ` */ | 2656 | { CBQUOTE, CBQUOTE, CWORD }, /* 10, ` */ |
2664 | { CENDVAR, CENDVAR, CWORD }, /* 11, } */ | 2657 | { CENDVAR, CENDVAR, CWORD }, /* 11, } */ |
2665 | #ifndef USE_SIT_FUNCTION | 2658 | # ifndef USE_SIT_FUNCTION |
2666 | { CENDFILE, CENDFILE, CENDFILE }, /* 12, PEOF */ | 2659 | { CENDFILE, CENDFILE, CENDFILE }, /* 12, PEOF */ |
2667 | { CWORD, CWORD, CWORD }, /* 13, 0-9A-Za-z */ | 2660 | { CWORD, CWORD, CWORD }, /* 13, 0-9A-Za-z */ |
2668 | { CCTL, CCTL, CCTL } /* 14, CTLESC ... */ | 2661 | { CCTL, CCTL, CCTL } /* 14, CTLESC ... */ |
2669 | #endif | 2662 | # endif |
2670 | }; | 2663 | }; |
2671 | #endif /* SH_MATH_SUPPORT */ | 2664 | #endif /* SH_MATH_SUPPORT */ |
2672 | 2665 | ||
2666 | /* c in SIT(c, syntax) must be an *unsigned char* or PEOA or PEOF, | ||
2667 | * caller must ensure proper cast on it if c is *char_ptr! | ||
2668 | */ | ||
2669 | |||
2673 | #ifdef USE_SIT_FUNCTION | 2670 | #ifdef USE_SIT_FUNCTION |
2674 | 2671 | ||
2675 | static int | 2672 | static int |
2676 | SIT(int c, int syntax) | 2673 | SIT(int c, int syntax) |
2677 | { | 2674 | { |
2678 | static const char spec_symbls[] ALIGN1 = "\t\n !\"$&'()*-/:;<=>?[\\]`|}~"; | 2675 | static const char spec_symbls[] ALIGN1 = "\t\n !\"$&'()*-/:;<=>?[\\]`|}~"; |
2679 | #if ENABLE_ASH_ALIAS | 2676 | # if ENABLE_ASH_ALIAS |
2680 | static const char syntax_index_table[] ALIGN1 = { | 2677 | static const uint8_t syntax_index_table[] ALIGN1 = { |
2681 | 1, 2, 1, 3, 4, 5, 1, 6, /* "\t\n !\"$&'" */ | 2678 | 1, 2, 1, 3, 4, 5, 1, 6, /* "\t\n !\"$&'" */ |
2682 | 7, 8, 3, 3, 3, 3, 1, 1, /* "()*-/:;<" */ | 2679 | 7, 8, 3, 3, 3, 3, 1, 1, /* "()*-/:;<" */ |
2683 | 3, 1, 3, 3, 9, 3, 10, 1, /* "=>?[\\]`|" */ | 2680 | 3, 1, 3, 3, 9, 3, 10, 1, /* "=>?[\\]`|" */ |
2684 | 11, 3 /* "}~" */ | 2681 | 11, 3 /* "}~" */ |
2685 | }; | 2682 | }; |
2686 | #else | 2683 | # else |
2687 | static const char syntax_index_table[] ALIGN1 = { | 2684 | static const uint8_t syntax_index_table[] ALIGN1 = { |
2688 | 0, 1, 0, 2, 3, 4, 0, 5, /* "\t\n !\"$&'" */ | 2685 | 0, 1, 0, 2, 3, 4, 0, 5, /* "\t\n !\"$&'" */ |
2689 | 6, 7, 2, 2, 2, 2, 0, 0, /* "()*-/:;<" */ | 2686 | 6, 7, 2, 2, 2, 2, 0, 0, /* "()*-/:;<" */ |
2690 | 2, 0, 2, 2, 8, 2, 9, 0, /* "=>?[\\]`|" */ | 2687 | 2, 0, 2, 2, 8, 2, 9, 0, /* "=>?[\\]`|" */ |
2691 | 10, 2 /* "}~" */ | 2688 | 10, 2 /* "}~" */ |
2692 | }; | 2689 | }; |
2693 | #endif | 2690 | # endif |
2694 | const char *s; | 2691 | const char *s; |
2695 | int indx; | 2692 | int indx; |
2696 | 2693 | ||
2697 | if (c == PEOF) { /* 2^8+2 */ | 2694 | if (c == PEOF) { /* 2^8+2 */ |
2698 | return CENDFILE; | 2695 | return CENDFILE; |
2699 | } | 2696 | } |
2700 | #if ENABLE_ASH_ALIAS | 2697 | # if ENABLE_ASH_ALIAS |
2701 | if (c == PEOA) { /* 2^8+1 */ | 2698 | if (c == PEOA) { /* 2^8+1 */ |
2702 | indx = 0; | 2699 | indx = 0; |
2703 | } else | 2700 | } else |
2704 | #endif | 2701 | # endif |
2705 | { | 2702 | { |
2706 | if ((unsigned char)c >= CTLESC | 2703 | if ((unsigned char)c >= CTLESC |
2707 | && (unsigned char)c <= CTLQUOTEMARK | 2704 | && (unsigned char)c <= CTLQUOTEMARK |
@@ -2719,304 +2716,304 @@ SIT(int c, int syntax) | |||
2719 | 2716 | ||
2720 | #else /* !USE_SIT_FUNCTION */ | 2717 | #else /* !USE_SIT_FUNCTION */ |
2721 | 2718 | ||
2722 | #if ENABLE_ASH_ALIAS | 2719 | # if ENABLE_ASH_ALIAS |
2723 | #define CSPCL_CIGN_CIGN_CIGN 0 | 2720 | # define CSPCL_CIGN_CIGN_CIGN 0 |
2724 | #define CSPCL_CWORD_CWORD_CWORD 1 | 2721 | # define CSPCL_CWORD_CWORD_CWORD 1 |
2725 | #define CNL_CNL_CNL_CNL 2 | 2722 | # define CNL_CNL_CNL_CNL 2 |
2726 | #define CWORD_CCTL_CCTL_CWORD 3 | 2723 | # define CWORD_CCTL_CCTL_CWORD 3 |
2727 | #define CDQUOTE_CENDQUOTE_CWORD_CWORD 4 | 2724 | # define CDQUOTE_CENDQUOTE_CWORD_CWORD 4 |
2728 | #define CVAR_CVAR_CWORD_CVAR 5 | 2725 | # define CVAR_CVAR_CWORD_CVAR 5 |
2729 | #define CSQUOTE_CWORD_CENDQUOTE_CWORD 6 | 2726 | # define CSQUOTE_CWORD_CENDQUOTE_CWORD 6 |
2730 | #define CSPCL_CWORD_CWORD_CLP 7 | 2727 | # define CSPCL_CWORD_CWORD_CLP 7 |
2731 | #define CSPCL_CWORD_CWORD_CRP 8 | 2728 | # define CSPCL_CWORD_CWORD_CRP 8 |
2732 | #define CBACK_CBACK_CCTL_CBACK 9 | 2729 | # define CBACK_CBACK_CCTL_CBACK 9 |
2733 | #define CBQUOTE_CBQUOTE_CWORD_CBQUOTE 10 | 2730 | # define CBQUOTE_CBQUOTE_CWORD_CBQUOTE 10 |
2734 | #define CENDVAR_CENDVAR_CWORD_CENDVAR 11 | 2731 | # define CENDVAR_CENDVAR_CWORD_CENDVAR 11 |
2735 | #define CENDFILE_CENDFILE_CENDFILE_CENDFILE 12 | 2732 | # define CENDFILE_CENDFILE_CENDFILE_CENDFILE 12 |
2736 | #define CWORD_CWORD_CWORD_CWORD 13 | 2733 | # define CWORD_CWORD_CWORD_CWORD 13 |
2737 | #define CCTL_CCTL_CCTL_CCTL 14 | 2734 | # define CCTL_CCTL_CCTL_CCTL 14 |
2738 | #else | 2735 | # else |
2739 | #define CSPCL_CWORD_CWORD_CWORD 0 | 2736 | # define CSPCL_CWORD_CWORD_CWORD 0 |
2740 | #define CNL_CNL_CNL_CNL 1 | 2737 | # define CNL_CNL_CNL_CNL 1 |
2741 | #define CWORD_CCTL_CCTL_CWORD 2 | 2738 | # define CWORD_CCTL_CCTL_CWORD 2 |
2742 | #define CDQUOTE_CENDQUOTE_CWORD_CWORD 3 | 2739 | # define CDQUOTE_CENDQUOTE_CWORD_CWORD 3 |
2743 | #define CVAR_CVAR_CWORD_CVAR 4 | 2740 | # define CVAR_CVAR_CWORD_CVAR 4 |
2744 | #define CSQUOTE_CWORD_CENDQUOTE_CWORD 5 | 2741 | # define CSQUOTE_CWORD_CENDQUOTE_CWORD 5 |
2745 | #define CSPCL_CWORD_CWORD_CLP 6 | 2742 | # define CSPCL_CWORD_CWORD_CLP 6 |
2746 | #define CSPCL_CWORD_CWORD_CRP 7 | 2743 | # define CSPCL_CWORD_CWORD_CRP 7 |
2747 | #define CBACK_CBACK_CCTL_CBACK 8 | 2744 | # define CBACK_CBACK_CCTL_CBACK 8 |
2748 | #define CBQUOTE_CBQUOTE_CWORD_CBQUOTE 9 | 2745 | # define CBQUOTE_CBQUOTE_CWORD_CBQUOTE 9 |
2749 | #define CENDVAR_CENDVAR_CWORD_CENDVAR 10 | 2746 | # define CENDVAR_CENDVAR_CWORD_CENDVAR 10 |
2750 | #define CENDFILE_CENDFILE_CENDFILE_CENDFILE 11 | 2747 | # define CENDFILE_CENDFILE_CENDFILE_CENDFILE 11 |
2751 | #define CWORD_CWORD_CWORD_CWORD 12 | 2748 | # define CWORD_CWORD_CWORD_CWORD 12 |
2752 | #define CCTL_CCTL_CCTL_CCTL 13 | 2749 | # define CCTL_CCTL_CCTL_CCTL 13 |
2753 | #endif | 2750 | # endif |
2754 | 2751 | ||
2755 | static const char syntax_index_table[258] = { | 2752 | static const uint8_t syntax_index_table[258] = { |
2756 | /* BASESYNTAX_DQSYNTAX_SQSYNTAX_ARISYNTAX */ | 2753 | /* BASESYNTAX_DQSYNTAX_SQSYNTAX_ARISYNTAX */ |
2757 | /* 0 PEOF */ CENDFILE_CENDFILE_CENDFILE_CENDFILE, | 2754 | /* 0 */ CWORD_CWORD_CWORD_CWORD, |
2758 | #if ENABLE_ASH_ALIAS | 2755 | /* 1 */ CWORD_CWORD_CWORD_CWORD, |
2759 | /* 1 PEOA */ CSPCL_CIGN_CIGN_CIGN, | 2756 | /* 2 */ CWORD_CWORD_CWORD_CWORD, |
2760 | #endif | 2757 | /* 3 */ CWORD_CWORD_CWORD_CWORD, |
2761 | /* 2 -128 0x80 */ CWORD_CWORD_CWORD_CWORD, | 2758 | /* 4 */ CWORD_CWORD_CWORD_CWORD, |
2762 | /* 3 -127 CTLESC */ CCTL_CCTL_CCTL_CCTL, | 2759 | /* 5 */ CWORD_CWORD_CWORD_CWORD, |
2763 | /* 4 -126 CTLVAR */ CCTL_CCTL_CCTL_CCTL, | 2760 | /* 6 */ CWORD_CWORD_CWORD_CWORD, |
2764 | /* 5 -125 CTLENDVAR */ CCTL_CCTL_CCTL_CCTL, | 2761 | /* 7 */ CWORD_CWORD_CWORD_CWORD, |
2765 | /* 6 -124 CTLBACKQ */ CCTL_CCTL_CCTL_CCTL, | 2762 | /* 8 */ CWORD_CWORD_CWORD_CWORD, |
2766 | /* 7 -123 CTLQUOTE */ CCTL_CCTL_CCTL_CCTL, | 2763 | /* 9 "\t" */ CSPCL_CWORD_CWORD_CWORD, |
2767 | /* 8 -122 CTLARI */ CCTL_CCTL_CCTL_CCTL, | 2764 | /* 10 "\n" */ CNL_CNL_CNL_CNL, |
2768 | /* 9 -121 CTLENDARI */ CCTL_CCTL_CCTL_CCTL, | 2765 | /* 11 */ CWORD_CWORD_CWORD_CWORD, |
2769 | /* 10 -120 CTLQUOTEMARK */ CCTL_CCTL_CCTL_CCTL, | 2766 | /* 12 */ CWORD_CWORD_CWORD_CWORD, |
2770 | /* 11 -119 */ CWORD_CWORD_CWORD_CWORD, | 2767 | /* 13 */ CWORD_CWORD_CWORD_CWORD, |
2771 | /* 12 -118 */ CWORD_CWORD_CWORD_CWORD, | 2768 | /* 14 */ CWORD_CWORD_CWORD_CWORD, |
2772 | /* 13 -117 */ CWORD_CWORD_CWORD_CWORD, | 2769 | /* 15 */ CWORD_CWORD_CWORD_CWORD, |
2773 | /* 14 -116 */ CWORD_CWORD_CWORD_CWORD, | 2770 | /* 16 */ CWORD_CWORD_CWORD_CWORD, |
2774 | /* 15 -115 */ CWORD_CWORD_CWORD_CWORD, | 2771 | /* 17 */ CWORD_CWORD_CWORD_CWORD, |
2775 | /* 16 -114 */ CWORD_CWORD_CWORD_CWORD, | 2772 | /* 18 */ CWORD_CWORD_CWORD_CWORD, |
2776 | /* 17 -113 */ CWORD_CWORD_CWORD_CWORD, | 2773 | /* 19 */ CWORD_CWORD_CWORD_CWORD, |
2777 | /* 18 -112 */ CWORD_CWORD_CWORD_CWORD, | 2774 | /* 20 */ CWORD_CWORD_CWORD_CWORD, |
2778 | /* 19 -111 */ CWORD_CWORD_CWORD_CWORD, | 2775 | /* 21 */ CWORD_CWORD_CWORD_CWORD, |
2779 | /* 20 -110 */ CWORD_CWORD_CWORD_CWORD, | 2776 | /* 22 */ CWORD_CWORD_CWORD_CWORD, |
2780 | /* 21 -109 */ CWORD_CWORD_CWORD_CWORD, | 2777 | /* 23 */ CWORD_CWORD_CWORD_CWORD, |
2781 | /* 22 -108 */ CWORD_CWORD_CWORD_CWORD, | 2778 | /* 24 */ CWORD_CWORD_CWORD_CWORD, |
2782 | /* 23 -107 */ CWORD_CWORD_CWORD_CWORD, | 2779 | /* 25 */ CWORD_CWORD_CWORD_CWORD, |
2783 | /* 24 -106 */ CWORD_CWORD_CWORD_CWORD, | 2780 | /* 26 */ CWORD_CWORD_CWORD_CWORD, |
2784 | /* 25 -105 */ CWORD_CWORD_CWORD_CWORD, | 2781 | /* 27 */ CWORD_CWORD_CWORD_CWORD, |
2785 | /* 26 -104 */ CWORD_CWORD_CWORD_CWORD, | 2782 | /* 28 */ CWORD_CWORD_CWORD_CWORD, |
2786 | /* 27 -103 */ CWORD_CWORD_CWORD_CWORD, | 2783 | /* 29 */ CWORD_CWORD_CWORD_CWORD, |
2787 | /* 28 -102 */ CWORD_CWORD_CWORD_CWORD, | 2784 | /* 30 */ CWORD_CWORD_CWORD_CWORD, |
2788 | /* 29 -101 */ CWORD_CWORD_CWORD_CWORD, | 2785 | /* 31 */ CWORD_CWORD_CWORD_CWORD, |
2789 | /* 30 -100 */ CWORD_CWORD_CWORD_CWORD, | 2786 | /* 32 " " */ CSPCL_CWORD_CWORD_CWORD, |
2790 | /* 31 -99 */ CWORD_CWORD_CWORD_CWORD, | 2787 | /* 33 "!" */ CWORD_CCTL_CCTL_CWORD, |
2791 | /* 32 -98 */ CWORD_CWORD_CWORD_CWORD, | 2788 | /* 34 """ */ CDQUOTE_CENDQUOTE_CWORD_CWORD, |
2792 | /* 33 -97 */ CWORD_CWORD_CWORD_CWORD, | 2789 | /* 35 "#" */ CWORD_CWORD_CWORD_CWORD, |
2793 | /* 34 -96 */ CWORD_CWORD_CWORD_CWORD, | 2790 | /* 36 "$" */ CVAR_CVAR_CWORD_CVAR, |
2794 | /* 35 -95 */ CWORD_CWORD_CWORD_CWORD, | 2791 | /* 37 "%" */ CWORD_CWORD_CWORD_CWORD, |
2795 | /* 36 -94 */ CWORD_CWORD_CWORD_CWORD, | 2792 | /* 38 "&" */ CSPCL_CWORD_CWORD_CWORD, |
2796 | /* 37 -93 */ CWORD_CWORD_CWORD_CWORD, | 2793 | /* 39 "'" */ CSQUOTE_CWORD_CENDQUOTE_CWORD, |
2797 | /* 38 -92 */ CWORD_CWORD_CWORD_CWORD, | 2794 | /* 40 "(" */ CSPCL_CWORD_CWORD_CLP, |
2798 | /* 39 -91 */ CWORD_CWORD_CWORD_CWORD, | 2795 | /* 41 ")" */ CSPCL_CWORD_CWORD_CRP, |
2799 | /* 40 -90 */ CWORD_CWORD_CWORD_CWORD, | 2796 | /* 42 "*" */ CWORD_CCTL_CCTL_CWORD, |
2800 | /* 41 -89 */ CWORD_CWORD_CWORD_CWORD, | 2797 | /* 43 "+" */ CWORD_CWORD_CWORD_CWORD, |
2801 | /* 42 -88 */ CWORD_CWORD_CWORD_CWORD, | 2798 | /* 44 "," */ CWORD_CWORD_CWORD_CWORD, |
2802 | /* 43 -87 */ CWORD_CWORD_CWORD_CWORD, | 2799 | /* 45 "-" */ CWORD_CCTL_CCTL_CWORD, |
2803 | /* 44 -86 */ CWORD_CWORD_CWORD_CWORD, | 2800 | /* 46 "." */ CWORD_CWORD_CWORD_CWORD, |
2804 | /* 45 -85 */ CWORD_CWORD_CWORD_CWORD, | 2801 | /* 47 "/" */ CWORD_CCTL_CCTL_CWORD, |
2805 | /* 46 -84 */ CWORD_CWORD_CWORD_CWORD, | 2802 | /* 48 "0" */ CWORD_CWORD_CWORD_CWORD, |
2806 | /* 47 -83 */ CWORD_CWORD_CWORD_CWORD, | 2803 | /* 49 "1" */ CWORD_CWORD_CWORD_CWORD, |
2807 | /* 48 -82 */ CWORD_CWORD_CWORD_CWORD, | 2804 | /* 50 "2" */ CWORD_CWORD_CWORD_CWORD, |
2808 | /* 49 -81 */ CWORD_CWORD_CWORD_CWORD, | 2805 | /* 51 "3" */ CWORD_CWORD_CWORD_CWORD, |
2809 | /* 50 -80 */ CWORD_CWORD_CWORD_CWORD, | 2806 | /* 52 "4" */ CWORD_CWORD_CWORD_CWORD, |
2810 | /* 51 -79 */ CWORD_CWORD_CWORD_CWORD, | 2807 | /* 53 "5" */ CWORD_CWORD_CWORD_CWORD, |
2811 | /* 52 -78 */ CWORD_CWORD_CWORD_CWORD, | 2808 | /* 54 "6" */ CWORD_CWORD_CWORD_CWORD, |
2812 | /* 53 -77 */ CWORD_CWORD_CWORD_CWORD, | 2809 | /* 55 "7" */ CWORD_CWORD_CWORD_CWORD, |
2813 | /* 54 -76 */ CWORD_CWORD_CWORD_CWORD, | 2810 | /* 56 "8" */ CWORD_CWORD_CWORD_CWORD, |
2814 | /* 55 -75 */ CWORD_CWORD_CWORD_CWORD, | 2811 | /* 57 "9" */ CWORD_CWORD_CWORD_CWORD, |
2815 | /* 56 -74 */ CWORD_CWORD_CWORD_CWORD, | 2812 | /* 58 ":" */ CWORD_CCTL_CCTL_CWORD, |
2816 | /* 57 -73 */ CWORD_CWORD_CWORD_CWORD, | 2813 | /* 59 ";" */ CSPCL_CWORD_CWORD_CWORD, |
2817 | /* 58 -72 */ CWORD_CWORD_CWORD_CWORD, | 2814 | /* 60 "<" */ CSPCL_CWORD_CWORD_CWORD, |
2818 | /* 59 -71 */ CWORD_CWORD_CWORD_CWORD, | 2815 | /* 61 "=" */ CWORD_CCTL_CCTL_CWORD, |
2819 | /* 60 -70 */ CWORD_CWORD_CWORD_CWORD, | 2816 | /* 62 ">" */ CSPCL_CWORD_CWORD_CWORD, |
2820 | /* 61 -69 */ CWORD_CWORD_CWORD_CWORD, | 2817 | /* 63 "?" */ CWORD_CCTL_CCTL_CWORD, |
2821 | /* 62 -68 */ CWORD_CWORD_CWORD_CWORD, | 2818 | /* 64 "@" */ CWORD_CWORD_CWORD_CWORD, |
2822 | /* 63 -67 */ CWORD_CWORD_CWORD_CWORD, | 2819 | /* 65 "A" */ CWORD_CWORD_CWORD_CWORD, |
2823 | /* 64 -66 */ CWORD_CWORD_CWORD_CWORD, | 2820 | /* 66 "B" */ CWORD_CWORD_CWORD_CWORD, |
2824 | /* 65 -65 */ CWORD_CWORD_CWORD_CWORD, | 2821 | /* 67 "C" */ CWORD_CWORD_CWORD_CWORD, |
2825 | /* 66 -64 */ CWORD_CWORD_CWORD_CWORD, | 2822 | /* 68 "D" */ CWORD_CWORD_CWORD_CWORD, |
2826 | /* 67 -63 */ CWORD_CWORD_CWORD_CWORD, | 2823 | /* 69 "E" */ CWORD_CWORD_CWORD_CWORD, |
2827 | /* 68 -62 */ CWORD_CWORD_CWORD_CWORD, | 2824 | /* 70 "F" */ CWORD_CWORD_CWORD_CWORD, |
2828 | /* 69 -61 */ CWORD_CWORD_CWORD_CWORD, | 2825 | /* 71 "G" */ CWORD_CWORD_CWORD_CWORD, |
2829 | /* 70 -60 */ CWORD_CWORD_CWORD_CWORD, | 2826 | /* 72 "H" */ CWORD_CWORD_CWORD_CWORD, |
2830 | /* 71 -59 */ CWORD_CWORD_CWORD_CWORD, | 2827 | /* 73 "I" */ CWORD_CWORD_CWORD_CWORD, |
2831 | /* 72 -58 */ CWORD_CWORD_CWORD_CWORD, | 2828 | /* 74 "J" */ CWORD_CWORD_CWORD_CWORD, |
2832 | /* 73 -57 */ CWORD_CWORD_CWORD_CWORD, | 2829 | /* 75 "K" */ CWORD_CWORD_CWORD_CWORD, |
2833 | /* 74 -56 */ CWORD_CWORD_CWORD_CWORD, | 2830 | /* 76 "L" */ CWORD_CWORD_CWORD_CWORD, |
2834 | /* 75 -55 */ CWORD_CWORD_CWORD_CWORD, | 2831 | /* 77 "M" */ CWORD_CWORD_CWORD_CWORD, |
2835 | /* 76 -54 */ CWORD_CWORD_CWORD_CWORD, | 2832 | /* 78 "N" */ CWORD_CWORD_CWORD_CWORD, |
2836 | /* 77 -53 */ CWORD_CWORD_CWORD_CWORD, | 2833 | /* 79 "O" */ CWORD_CWORD_CWORD_CWORD, |
2837 | /* 78 -52 */ CWORD_CWORD_CWORD_CWORD, | 2834 | /* 80 "P" */ CWORD_CWORD_CWORD_CWORD, |
2838 | /* 79 -51 */ CWORD_CWORD_CWORD_CWORD, | 2835 | /* 81 "Q" */ CWORD_CWORD_CWORD_CWORD, |
2839 | /* 80 -50 */ CWORD_CWORD_CWORD_CWORD, | 2836 | /* 82 "R" */ CWORD_CWORD_CWORD_CWORD, |
2840 | /* 81 -49 */ CWORD_CWORD_CWORD_CWORD, | 2837 | /* 83 "S" */ CWORD_CWORD_CWORD_CWORD, |
2841 | /* 82 -48 */ CWORD_CWORD_CWORD_CWORD, | 2838 | /* 84 "T" */ CWORD_CWORD_CWORD_CWORD, |
2842 | /* 83 -47 */ CWORD_CWORD_CWORD_CWORD, | 2839 | /* 85 "U" */ CWORD_CWORD_CWORD_CWORD, |
2843 | /* 84 -46 */ CWORD_CWORD_CWORD_CWORD, | 2840 | /* 86 "V" */ CWORD_CWORD_CWORD_CWORD, |
2844 | /* 85 -45 */ CWORD_CWORD_CWORD_CWORD, | 2841 | /* 87 "W" */ CWORD_CWORD_CWORD_CWORD, |
2845 | /* 86 -44 */ CWORD_CWORD_CWORD_CWORD, | 2842 | /* 88 "X" */ CWORD_CWORD_CWORD_CWORD, |
2846 | /* 87 -43 */ CWORD_CWORD_CWORD_CWORD, | 2843 | /* 89 "Y" */ CWORD_CWORD_CWORD_CWORD, |
2847 | /* 88 -42 */ CWORD_CWORD_CWORD_CWORD, | 2844 | /* 90 "Z" */ CWORD_CWORD_CWORD_CWORD, |
2848 | /* 89 -41 */ CWORD_CWORD_CWORD_CWORD, | 2845 | /* 91 "[" */ CWORD_CCTL_CCTL_CWORD, |
2849 | /* 90 -40 */ CWORD_CWORD_CWORD_CWORD, | 2846 | /* 92 "\" */ CBACK_CBACK_CCTL_CBACK, |
2850 | /* 91 -39 */ CWORD_CWORD_CWORD_CWORD, | 2847 | /* 93 "]" */ CWORD_CCTL_CCTL_CWORD, |
2851 | /* 92 -38 */ CWORD_CWORD_CWORD_CWORD, | 2848 | /* 94 "^" */ CWORD_CWORD_CWORD_CWORD, |
2852 | /* 93 -37 */ CWORD_CWORD_CWORD_CWORD, | 2849 | /* 95 "_" */ CWORD_CWORD_CWORD_CWORD, |
2853 | /* 94 -36 */ CWORD_CWORD_CWORD_CWORD, | 2850 | /* 96 "`" */ CBQUOTE_CBQUOTE_CWORD_CBQUOTE, |
2854 | /* 95 -35 */ CWORD_CWORD_CWORD_CWORD, | 2851 | /* 97 "a" */ CWORD_CWORD_CWORD_CWORD, |
2855 | /* 96 -34 */ CWORD_CWORD_CWORD_CWORD, | 2852 | /* 98 "b" */ CWORD_CWORD_CWORD_CWORD, |
2856 | /* 97 -33 */ CWORD_CWORD_CWORD_CWORD, | 2853 | /* 99 "c" */ CWORD_CWORD_CWORD_CWORD, |
2857 | /* 98 -32 */ CWORD_CWORD_CWORD_CWORD, | 2854 | /* 100 "d" */ CWORD_CWORD_CWORD_CWORD, |
2858 | /* 99 -31 */ CWORD_CWORD_CWORD_CWORD, | 2855 | /* 101 "e" */ CWORD_CWORD_CWORD_CWORD, |
2859 | /* 100 -30 */ CWORD_CWORD_CWORD_CWORD, | 2856 | /* 102 "f" */ CWORD_CWORD_CWORD_CWORD, |
2860 | /* 101 -29 */ CWORD_CWORD_CWORD_CWORD, | 2857 | /* 103 "g" */ CWORD_CWORD_CWORD_CWORD, |
2861 | /* 102 -28 */ CWORD_CWORD_CWORD_CWORD, | 2858 | /* 104 "h" */ CWORD_CWORD_CWORD_CWORD, |
2862 | /* 103 -27 */ CWORD_CWORD_CWORD_CWORD, | 2859 | /* 105 "i" */ CWORD_CWORD_CWORD_CWORD, |
2863 | /* 104 -26 */ CWORD_CWORD_CWORD_CWORD, | 2860 | /* 106 "j" */ CWORD_CWORD_CWORD_CWORD, |
2864 | /* 105 -25 */ CWORD_CWORD_CWORD_CWORD, | 2861 | /* 107 "k" */ CWORD_CWORD_CWORD_CWORD, |
2865 | /* 106 -24 */ CWORD_CWORD_CWORD_CWORD, | 2862 | /* 108 "l" */ CWORD_CWORD_CWORD_CWORD, |
2866 | /* 107 -23 */ CWORD_CWORD_CWORD_CWORD, | 2863 | /* 109 "m" */ CWORD_CWORD_CWORD_CWORD, |
2867 | /* 108 -22 */ CWORD_CWORD_CWORD_CWORD, | 2864 | /* 110 "n" */ CWORD_CWORD_CWORD_CWORD, |
2868 | /* 109 -21 */ CWORD_CWORD_CWORD_CWORD, | 2865 | /* 111 "o" */ CWORD_CWORD_CWORD_CWORD, |
2869 | /* 110 -20 */ CWORD_CWORD_CWORD_CWORD, | 2866 | /* 112 "p" */ CWORD_CWORD_CWORD_CWORD, |
2870 | /* 111 -19 */ CWORD_CWORD_CWORD_CWORD, | 2867 | /* 113 "q" */ CWORD_CWORD_CWORD_CWORD, |
2871 | /* 112 -18 */ CWORD_CWORD_CWORD_CWORD, | 2868 | /* 114 "r" */ CWORD_CWORD_CWORD_CWORD, |
2872 | /* 113 -17 */ CWORD_CWORD_CWORD_CWORD, | 2869 | /* 115 "s" */ CWORD_CWORD_CWORD_CWORD, |
2873 | /* 114 -16 */ CWORD_CWORD_CWORD_CWORD, | 2870 | /* 116 "t" */ CWORD_CWORD_CWORD_CWORD, |
2874 | /* 115 -15 */ CWORD_CWORD_CWORD_CWORD, | 2871 | /* 117 "u" */ CWORD_CWORD_CWORD_CWORD, |
2875 | /* 116 -14 */ CWORD_CWORD_CWORD_CWORD, | 2872 | /* 118 "v" */ CWORD_CWORD_CWORD_CWORD, |
2876 | /* 117 -13 */ CWORD_CWORD_CWORD_CWORD, | 2873 | /* 119 "w" */ CWORD_CWORD_CWORD_CWORD, |
2877 | /* 118 -12 */ CWORD_CWORD_CWORD_CWORD, | 2874 | /* 120 "x" */ CWORD_CWORD_CWORD_CWORD, |
2878 | /* 119 -11 */ CWORD_CWORD_CWORD_CWORD, | 2875 | /* 121 "y" */ CWORD_CWORD_CWORD_CWORD, |
2879 | /* 120 -10 */ CWORD_CWORD_CWORD_CWORD, | 2876 | /* 122 "z" */ CWORD_CWORD_CWORD_CWORD, |
2880 | /* 121 -9 */ CWORD_CWORD_CWORD_CWORD, | 2877 | /* 123 "{" */ CWORD_CWORD_CWORD_CWORD, |
2881 | /* 122 -8 */ CWORD_CWORD_CWORD_CWORD, | 2878 | /* 124 "|" */ CSPCL_CWORD_CWORD_CWORD, |
2882 | /* 123 -7 */ CWORD_CWORD_CWORD_CWORD, | 2879 | /* 125 "}" */ CENDVAR_CENDVAR_CWORD_CENDVAR, |
2883 | /* 124 -6 */ CWORD_CWORD_CWORD_CWORD, | 2880 | /* 126 "~" */ CWORD_CCTL_CCTL_CWORD, |
2884 | /* 125 -5 */ CWORD_CWORD_CWORD_CWORD, | 2881 | /* 127 del */ CWORD_CWORD_CWORD_CWORD, |
2885 | /* 126 -4 */ CWORD_CWORD_CWORD_CWORD, | 2882 | /* 128 0x80 */ CWORD_CWORD_CWORD_CWORD, |
2886 | /* 127 -3 */ CWORD_CWORD_CWORD_CWORD, | 2883 | /* 129 CTLESC */ CCTL_CCTL_CCTL_CCTL, |
2887 | /* 128 -2 */ CWORD_CWORD_CWORD_CWORD, | 2884 | /* 130 CTLVAR */ CCTL_CCTL_CCTL_CCTL, |
2888 | /* 129 -1 */ CWORD_CWORD_CWORD_CWORD, | 2885 | /* 131 CTLENDVAR */ CCTL_CCTL_CCTL_CCTL, |
2889 | /* 130 0 */ CWORD_CWORD_CWORD_CWORD, | 2886 | /* 132 CTLBACKQ */ CCTL_CCTL_CCTL_CCTL, |
2890 | /* 131 1 */ CWORD_CWORD_CWORD_CWORD, | 2887 | /* 133 CTLQUOTE */ CCTL_CCTL_CCTL_CCTL, |
2891 | /* 132 2 */ CWORD_CWORD_CWORD_CWORD, | 2888 | /* 134 CTLARI */ CCTL_CCTL_CCTL_CCTL, |
2892 | /* 133 3 */ CWORD_CWORD_CWORD_CWORD, | 2889 | /* 135 CTLENDARI */ CCTL_CCTL_CCTL_CCTL, |
2893 | /* 134 4 */ CWORD_CWORD_CWORD_CWORD, | 2890 | /* 136 CTLQUOTEMARK */ CCTL_CCTL_CCTL_CCTL, |
2894 | /* 135 5 */ CWORD_CWORD_CWORD_CWORD, | 2891 | /* 137 */ CWORD_CWORD_CWORD_CWORD, |
2895 | /* 136 6 */ CWORD_CWORD_CWORD_CWORD, | 2892 | /* 138 */ CWORD_CWORD_CWORD_CWORD, |
2896 | /* 137 7 */ CWORD_CWORD_CWORD_CWORD, | 2893 | /* 139 */ CWORD_CWORD_CWORD_CWORD, |
2897 | /* 138 8 */ CWORD_CWORD_CWORD_CWORD, | 2894 | /* 140 */ CWORD_CWORD_CWORD_CWORD, |
2898 | /* 139 9 "\t" */ CSPCL_CWORD_CWORD_CWORD, | 2895 | /* 141 */ CWORD_CWORD_CWORD_CWORD, |
2899 | /* 140 10 "\n" */ CNL_CNL_CNL_CNL, | 2896 | /* 142 */ CWORD_CWORD_CWORD_CWORD, |
2900 | /* 141 11 */ CWORD_CWORD_CWORD_CWORD, | 2897 | /* 143 */ CWORD_CWORD_CWORD_CWORD, |
2901 | /* 142 12 */ CWORD_CWORD_CWORD_CWORD, | 2898 | /* 144 */ CWORD_CWORD_CWORD_CWORD, |
2902 | /* 143 13 */ CWORD_CWORD_CWORD_CWORD, | 2899 | /* 145 */ CWORD_CWORD_CWORD_CWORD, |
2903 | /* 144 14 */ CWORD_CWORD_CWORD_CWORD, | 2900 | /* 146 */ CWORD_CWORD_CWORD_CWORD, |
2904 | /* 145 15 */ CWORD_CWORD_CWORD_CWORD, | 2901 | /* 147 */ CWORD_CWORD_CWORD_CWORD, |
2905 | /* 146 16 */ CWORD_CWORD_CWORD_CWORD, | 2902 | /* 148 */ CWORD_CWORD_CWORD_CWORD, |
2906 | /* 147 17 */ CWORD_CWORD_CWORD_CWORD, | 2903 | /* 149 */ CWORD_CWORD_CWORD_CWORD, |
2907 | /* 148 18 */ CWORD_CWORD_CWORD_CWORD, | 2904 | /* 150 */ CWORD_CWORD_CWORD_CWORD, |
2908 | /* 149 19 */ CWORD_CWORD_CWORD_CWORD, | 2905 | /* 151 */ CWORD_CWORD_CWORD_CWORD, |
2909 | /* 150 20 */ CWORD_CWORD_CWORD_CWORD, | 2906 | /* 152 */ CWORD_CWORD_CWORD_CWORD, |
2910 | /* 151 21 */ CWORD_CWORD_CWORD_CWORD, | 2907 | /* 153 */ CWORD_CWORD_CWORD_CWORD, |
2911 | /* 152 22 */ CWORD_CWORD_CWORD_CWORD, | 2908 | /* 154 */ CWORD_CWORD_CWORD_CWORD, |
2912 | /* 153 23 */ CWORD_CWORD_CWORD_CWORD, | 2909 | /* 155 */ CWORD_CWORD_CWORD_CWORD, |
2913 | /* 154 24 */ CWORD_CWORD_CWORD_CWORD, | 2910 | /* 156 */ CWORD_CWORD_CWORD_CWORD, |
2914 | /* 155 25 */ CWORD_CWORD_CWORD_CWORD, | 2911 | /* 157 */ CWORD_CWORD_CWORD_CWORD, |
2915 | /* 156 26 */ CWORD_CWORD_CWORD_CWORD, | 2912 | /* 158 */ CWORD_CWORD_CWORD_CWORD, |
2916 | /* 157 27 */ CWORD_CWORD_CWORD_CWORD, | 2913 | /* 159 */ CWORD_CWORD_CWORD_CWORD, |
2917 | /* 158 28 */ CWORD_CWORD_CWORD_CWORD, | 2914 | /* 160 */ CWORD_CWORD_CWORD_CWORD, |
2918 | /* 159 29 */ CWORD_CWORD_CWORD_CWORD, | 2915 | /* 161 */ CWORD_CWORD_CWORD_CWORD, |
2919 | /* 160 30 */ CWORD_CWORD_CWORD_CWORD, | 2916 | /* 162 */ CWORD_CWORD_CWORD_CWORD, |
2920 | /* 161 31 */ CWORD_CWORD_CWORD_CWORD, | 2917 | /* 163 */ CWORD_CWORD_CWORD_CWORD, |
2921 | /* 162 32 " " */ CSPCL_CWORD_CWORD_CWORD, | 2918 | /* 164 */ CWORD_CWORD_CWORD_CWORD, |
2922 | /* 163 33 "!" */ CWORD_CCTL_CCTL_CWORD, | 2919 | /* 165 */ CWORD_CWORD_CWORD_CWORD, |
2923 | /* 164 34 """ */ CDQUOTE_CENDQUOTE_CWORD_CWORD, | 2920 | /* 166 */ CWORD_CWORD_CWORD_CWORD, |
2924 | /* 165 35 "#" */ CWORD_CWORD_CWORD_CWORD, | 2921 | /* 167 */ CWORD_CWORD_CWORD_CWORD, |
2925 | /* 166 36 "$" */ CVAR_CVAR_CWORD_CVAR, | 2922 | /* 168 */ CWORD_CWORD_CWORD_CWORD, |
2926 | /* 167 37 "%" */ CWORD_CWORD_CWORD_CWORD, | 2923 | /* 169 */ CWORD_CWORD_CWORD_CWORD, |
2927 | /* 168 38 "&" */ CSPCL_CWORD_CWORD_CWORD, | 2924 | /* 170 */ CWORD_CWORD_CWORD_CWORD, |
2928 | /* 169 39 "'" */ CSQUOTE_CWORD_CENDQUOTE_CWORD, | 2925 | /* 171 */ CWORD_CWORD_CWORD_CWORD, |
2929 | /* 170 40 "(" */ CSPCL_CWORD_CWORD_CLP, | 2926 | /* 172 */ CWORD_CWORD_CWORD_CWORD, |
2930 | /* 171 41 ")" */ CSPCL_CWORD_CWORD_CRP, | 2927 | /* 173 */ CWORD_CWORD_CWORD_CWORD, |
2931 | /* 172 42 "*" */ CWORD_CCTL_CCTL_CWORD, | 2928 | /* 174 */ CWORD_CWORD_CWORD_CWORD, |
2932 | /* 173 43 "+" */ CWORD_CWORD_CWORD_CWORD, | 2929 | /* 175 */ CWORD_CWORD_CWORD_CWORD, |
2933 | /* 174 44 "," */ CWORD_CWORD_CWORD_CWORD, | 2930 | /* 176 */ CWORD_CWORD_CWORD_CWORD, |
2934 | /* 175 45 "-" */ CWORD_CCTL_CCTL_CWORD, | 2931 | /* 177 */ CWORD_CWORD_CWORD_CWORD, |
2935 | /* 176 46 "." */ CWORD_CWORD_CWORD_CWORD, | 2932 | /* 178 */ CWORD_CWORD_CWORD_CWORD, |
2936 | /* 177 47 "/" */ CWORD_CCTL_CCTL_CWORD, | 2933 | /* 179 */ CWORD_CWORD_CWORD_CWORD, |
2937 | /* 178 48 "0" */ CWORD_CWORD_CWORD_CWORD, | 2934 | /* 180 */ CWORD_CWORD_CWORD_CWORD, |
2938 | /* 179 49 "1" */ CWORD_CWORD_CWORD_CWORD, | 2935 | /* 181 */ CWORD_CWORD_CWORD_CWORD, |
2939 | /* 180 50 "2" */ CWORD_CWORD_CWORD_CWORD, | 2936 | /* 182 */ CWORD_CWORD_CWORD_CWORD, |
2940 | /* 181 51 "3" */ CWORD_CWORD_CWORD_CWORD, | 2937 | /* 183 */ CWORD_CWORD_CWORD_CWORD, |
2941 | /* 182 52 "4" */ CWORD_CWORD_CWORD_CWORD, | 2938 | /* 184 */ CWORD_CWORD_CWORD_CWORD, |
2942 | /* 183 53 "5" */ CWORD_CWORD_CWORD_CWORD, | 2939 | /* 185 */ CWORD_CWORD_CWORD_CWORD, |
2943 | /* 184 54 "6" */ CWORD_CWORD_CWORD_CWORD, | 2940 | /* 186 */ CWORD_CWORD_CWORD_CWORD, |
2944 | /* 185 55 "7" */ CWORD_CWORD_CWORD_CWORD, | 2941 | /* 187 */ CWORD_CWORD_CWORD_CWORD, |
2945 | /* 186 56 "8" */ CWORD_CWORD_CWORD_CWORD, | 2942 | /* 188 */ CWORD_CWORD_CWORD_CWORD, |
2946 | /* 187 57 "9" */ CWORD_CWORD_CWORD_CWORD, | 2943 | /* 189 */ CWORD_CWORD_CWORD_CWORD, |
2947 | /* 188 58 ":" */ CWORD_CCTL_CCTL_CWORD, | 2944 | /* 190 */ CWORD_CWORD_CWORD_CWORD, |
2948 | /* 189 59 ";" */ CSPCL_CWORD_CWORD_CWORD, | 2945 | /* 191 */ CWORD_CWORD_CWORD_CWORD, |
2949 | /* 190 60 "<" */ CSPCL_CWORD_CWORD_CWORD, | 2946 | /* 192 */ CWORD_CWORD_CWORD_CWORD, |
2950 | /* 191 61 "=" */ CWORD_CCTL_CCTL_CWORD, | 2947 | /* 193 */ CWORD_CWORD_CWORD_CWORD, |
2951 | /* 192 62 ">" */ CSPCL_CWORD_CWORD_CWORD, | 2948 | /* 194 */ CWORD_CWORD_CWORD_CWORD, |
2952 | /* 193 63 "?" */ CWORD_CCTL_CCTL_CWORD, | 2949 | /* 195 */ CWORD_CWORD_CWORD_CWORD, |
2953 | /* 194 64 "@" */ CWORD_CWORD_CWORD_CWORD, | 2950 | /* 196 */ CWORD_CWORD_CWORD_CWORD, |
2954 | /* 195 65 "A" */ CWORD_CWORD_CWORD_CWORD, | 2951 | /* 197 */ CWORD_CWORD_CWORD_CWORD, |
2955 | /* 196 66 "B" */ CWORD_CWORD_CWORD_CWORD, | 2952 | /* 198 */ CWORD_CWORD_CWORD_CWORD, |
2956 | /* 197 67 "C" */ CWORD_CWORD_CWORD_CWORD, | 2953 | /* 199 */ CWORD_CWORD_CWORD_CWORD, |
2957 | /* 198 68 "D" */ CWORD_CWORD_CWORD_CWORD, | 2954 | /* 200 */ CWORD_CWORD_CWORD_CWORD, |
2958 | /* 199 69 "E" */ CWORD_CWORD_CWORD_CWORD, | 2955 | /* 201 */ CWORD_CWORD_CWORD_CWORD, |
2959 | /* 200 70 "F" */ CWORD_CWORD_CWORD_CWORD, | 2956 | /* 202 */ CWORD_CWORD_CWORD_CWORD, |
2960 | /* 201 71 "G" */ CWORD_CWORD_CWORD_CWORD, | 2957 | /* 203 */ CWORD_CWORD_CWORD_CWORD, |
2961 | /* 202 72 "H" */ CWORD_CWORD_CWORD_CWORD, | 2958 | /* 204 */ CWORD_CWORD_CWORD_CWORD, |
2962 | /* 203 73 "I" */ CWORD_CWORD_CWORD_CWORD, | 2959 | /* 205 */ CWORD_CWORD_CWORD_CWORD, |
2963 | /* 204 74 "J" */ CWORD_CWORD_CWORD_CWORD, | 2960 | /* 206 */ CWORD_CWORD_CWORD_CWORD, |
2964 | /* 205 75 "K" */ CWORD_CWORD_CWORD_CWORD, | 2961 | /* 207 */ CWORD_CWORD_CWORD_CWORD, |
2965 | /* 206 76 "L" */ CWORD_CWORD_CWORD_CWORD, | 2962 | /* 208 */ CWORD_CWORD_CWORD_CWORD, |
2966 | /* 207 77 "M" */ CWORD_CWORD_CWORD_CWORD, | 2963 | /* 209 */ CWORD_CWORD_CWORD_CWORD, |
2967 | /* 208 78 "N" */ CWORD_CWORD_CWORD_CWORD, | 2964 | /* 210 */ CWORD_CWORD_CWORD_CWORD, |
2968 | /* 209 79 "O" */ CWORD_CWORD_CWORD_CWORD, | 2965 | /* 211 */ CWORD_CWORD_CWORD_CWORD, |
2969 | /* 210 80 "P" */ CWORD_CWORD_CWORD_CWORD, | 2966 | /* 212 */ CWORD_CWORD_CWORD_CWORD, |
2970 | /* 211 81 "Q" */ CWORD_CWORD_CWORD_CWORD, | 2967 | /* 213 */ CWORD_CWORD_CWORD_CWORD, |
2971 | /* 212 82 "R" */ CWORD_CWORD_CWORD_CWORD, | 2968 | /* 214 */ CWORD_CWORD_CWORD_CWORD, |
2972 | /* 213 83 "S" */ CWORD_CWORD_CWORD_CWORD, | 2969 | /* 215 */ CWORD_CWORD_CWORD_CWORD, |
2973 | /* 214 84 "T" */ CWORD_CWORD_CWORD_CWORD, | 2970 | /* 216 */ CWORD_CWORD_CWORD_CWORD, |
2974 | /* 215 85 "U" */ CWORD_CWORD_CWORD_CWORD, | 2971 | /* 217 */ CWORD_CWORD_CWORD_CWORD, |
2975 | /* 216 86 "V" */ CWORD_CWORD_CWORD_CWORD, | 2972 | /* 218 */ CWORD_CWORD_CWORD_CWORD, |
2976 | /* 217 87 "W" */ CWORD_CWORD_CWORD_CWORD, | 2973 | /* 219 */ CWORD_CWORD_CWORD_CWORD, |
2977 | /* 218 88 "X" */ CWORD_CWORD_CWORD_CWORD, | 2974 | /* 220 */ CWORD_CWORD_CWORD_CWORD, |
2978 | /* 219 89 "Y" */ CWORD_CWORD_CWORD_CWORD, | 2975 | /* 221 */ CWORD_CWORD_CWORD_CWORD, |
2979 | /* 220 90 "Z" */ CWORD_CWORD_CWORD_CWORD, | 2976 | /* 222 */ CWORD_CWORD_CWORD_CWORD, |
2980 | /* 221 91 "[" */ CWORD_CCTL_CCTL_CWORD, | 2977 | /* 223 */ CWORD_CWORD_CWORD_CWORD, |
2981 | /* 222 92 "\" */ CBACK_CBACK_CCTL_CBACK, | 2978 | /* 224 */ CWORD_CWORD_CWORD_CWORD, |
2982 | /* 223 93 "]" */ CWORD_CCTL_CCTL_CWORD, | 2979 | /* 225 */ CWORD_CWORD_CWORD_CWORD, |
2983 | /* 224 94 "^" */ CWORD_CWORD_CWORD_CWORD, | 2980 | /* 226 */ CWORD_CWORD_CWORD_CWORD, |
2984 | /* 225 95 "_" */ CWORD_CWORD_CWORD_CWORD, | 2981 | /* 227 */ CWORD_CWORD_CWORD_CWORD, |
2985 | /* 226 96 "`" */ CBQUOTE_CBQUOTE_CWORD_CBQUOTE, | 2982 | /* 228 */ CWORD_CWORD_CWORD_CWORD, |
2986 | /* 227 97 "a" */ CWORD_CWORD_CWORD_CWORD, | 2983 | /* 229 */ CWORD_CWORD_CWORD_CWORD, |
2987 | /* 228 98 "b" */ CWORD_CWORD_CWORD_CWORD, | 2984 | /* 230 */ CWORD_CWORD_CWORD_CWORD, |
2988 | /* 229 99 "c" */ CWORD_CWORD_CWORD_CWORD, | 2985 | /* 231 */ CWORD_CWORD_CWORD_CWORD, |
2989 | /* 230 100 "d" */ CWORD_CWORD_CWORD_CWORD, | 2986 | /* 232 */ CWORD_CWORD_CWORD_CWORD, |
2990 | /* 231 101 "e" */ CWORD_CWORD_CWORD_CWORD, | 2987 | /* 233 */ CWORD_CWORD_CWORD_CWORD, |
2991 | /* 232 102 "f" */ CWORD_CWORD_CWORD_CWORD, | 2988 | /* 234 */ CWORD_CWORD_CWORD_CWORD, |
2992 | /* 233 103 "g" */ CWORD_CWORD_CWORD_CWORD, | 2989 | /* 235 */ CWORD_CWORD_CWORD_CWORD, |
2993 | /* 234 104 "h" */ CWORD_CWORD_CWORD_CWORD, | 2990 | /* 236 */ CWORD_CWORD_CWORD_CWORD, |
2994 | /* 235 105 "i" */ CWORD_CWORD_CWORD_CWORD, | 2991 | /* 237 */ CWORD_CWORD_CWORD_CWORD, |
2995 | /* 236 106 "j" */ CWORD_CWORD_CWORD_CWORD, | 2992 | /* 238 */ CWORD_CWORD_CWORD_CWORD, |
2996 | /* 237 107 "k" */ CWORD_CWORD_CWORD_CWORD, | 2993 | /* 239 */ CWORD_CWORD_CWORD_CWORD, |
2997 | /* 238 108 "l" */ CWORD_CWORD_CWORD_CWORD, | 2994 | /* 230 */ CWORD_CWORD_CWORD_CWORD, |
2998 | /* 239 109 "m" */ CWORD_CWORD_CWORD_CWORD, | 2995 | /* 241 */ CWORD_CWORD_CWORD_CWORD, |
2999 | /* 240 110 "n" */ CWORD_CWORD_CWORD_CWORD, | 2996 | /* 242 */ CWORD_CWORD_CWORD_CWORD, |
3000 | /* 241 111 "o" */ CWORD_CWORD_CWORD_CWORD, | 2997 | /* 243 */ CWORD_CWORD_CWORD_CWORD, |
3001 | /* 242 112 "p" */ CWORD_CWORD_CWORD_CWORD, | 2998 | /* 244 */ CWORD_CWORD_CWORD_CWORD, |
3002 | /* 243 113 "q" */ CWORD_CWORD_CWORD_CWORD, | 2999 | /* 245 */ CWORD_CWORD_CWORD_CWORD, |
3003 | /* 244 114 "r" */ CWORD_CWORD_CWORD_CWORD, | 3000 | /* 246 */ CWORD_CWORD_CWORD_CWORD, |
3004 | /* 245 115 "s" */ CWORD_CWORD_CWORD_CWORD, | 3001 | /* 247 */ CWORD_CWORD_CWORD_CWORD, |
3005 | /* 246 116 "t" */ CWORD_CWORD_CWORD_CWORD, | 3002 | /* 248 */ CWORD_CWORD_CWORD_CWORD, |
3006 | /* 247 117 "u" */ CWORD_CWORD_CWORD_CWORD, | 3003 | /* 249 */ CWORD_CWORD_CWORD_CWORD, |
3007 | /* 248 118 "v" */ CWORD_CWORD_CWORD_CWORD, | 3004 | /* 250 */ CWORD_CWORD_CWORD_CWORD, |
3008 | /* 249 119 "w" */ CWORD_CWORD_CWORD_CWORD, | 3005 | /* 251 */ CWORD_CWORD_CWORD_CWORD, |
3009 | /* 250 120 "x" */ CWORD_CWORD_CWORD_CWORD, | 3006 | /* 252 */ CWORD_CWORD_CWORD_CWORD, |
3010 | /* 251 121 "y" */ CWORD_CWORD_CWORD_CWORD, | 3007 | /* 253 */ CWORD_CWORD_CWORD_CWORD, |
3011 | /* 252 122 "z" */ CWORD_CWORD_CWORD_CWORD, | 3008 | /* 254 */ CWORD_CWORD_CWORD_CWORD, |
3012 | /* 253 123 "{" */ CWORD_CWORD_CWORD_CWORD, | 3009 | /* 255 */ CWORD_CWORD_CWORD_CWORD, |
3013 | /* 254 124 "|" */ CSPCL_CWORD_CWORD_CWORD, | 3010 | # if ENABLE_ASH_ALIAS |
3014 | /* 255 125 "}" */ CENDVAR_CENDVAR_CWORD_CENDVAR, | 3011 | /* PEOA */ CSPCL_CIGN_CIGN_CIGN, |
3015 | /* 256 126 "~" */ CWORD_CCTL_CCTL_CWORD, | 3012 | # endif |
3016 | /* 257 127 */ CWORD_CWORD_CWORD_CWORD, | 3013 | /* PEOF */ CENDFILE_CENDFILE_CENDFILE_CENDFILE, |
3017 | }; | 3014 | }; |
3018 | 3015 | ||
3019 | #define SIT(c, syntax) (S_I_T[(int)syntax_index_table[(int)(c) + SYNBASE]][syntax]) | 3016 | # define SIT(c, syntax) (S_I_T[syntax_index_table[c]][syntax]) |
3020 | 3017 | ||
3021 | #endif /* USE_SIT_FUNCTION */ | 3018 | #endif /* USE_SIT_FUNCTION */ |
3022 | 3019 | ||
@@ -4229,9 +4226,10 @@ cmdputs(const char *s) | |||
4229 | }; | 4226 | }; |
4230 | 4227 | ||
4231 | const char *p, *str; | 4228 | const char *p, *str; |
4232 | char c, cc[2] = " "; | 4229 | char cc[2] = " "; |
4233 | char *nextc; | 4230 | char *nextc; |
4234 | int subtype = 0; | 4231 | unsigned char c; |
4232 | unsigned char subtype = 0; | ||
4235 | int quoted = 0; | 4233 | int quoted = 0; |
4236 | 4234 | ||
4237 | nextc = makestrspace((strlen(s) + 1) * 8, cmdnextc); | 4235 | nextc = makestrspace((strlen(s) + 1) * 8, cmdnextc); |
@@ -5454,7 +5452,7 @@ rmescapes(char *str, int flag) | |||
5454 | globbing = flag & RMESCAPE_GLOB; | 5452 | globbing = flag & RMESCAPE_GLOB; |
5455 | protect_against_glob = globbing; | 5453 | protect_against_glob = globbing; |
5456 | while (*p) { | 5454 | while (*p) { |
5457 | if (*p == CTLQUOTEMARK) { | 5455 | if ((unsigned char)*p == CTLQUOTEMARK) { |
5458 | // TODO: if no RMESCAPE_QUOTED in flags, inquotes never becomes 0 | 5456 | // TODO: if no RMESCAPE_QUOTED in flags, inquotes never becomes 0 |
5459 | // (alternates between RMESCAPE_QUOTED and ~RMESCAPE_QUOTED). Is it ok? | 5457 | // (alternates between RMESCAPE_QUOTED and ~RMESCAPE_QUOTED). Is it ok? |
5460 | // Note: both inquotes and protect_against_glob only affect whether | 5458 | // Note: both inquotes and protect_against_glob only affect whether |
@@ -5469,7 +5467,7 @@ rmescapes(char *str, int flag) | |||
5469 | protect_against_glob = 0; | 5467 | protect_against_glob = 0; |
5470 | goto copy; | 5468 | goto copy; |
5471 | } | 5469 | } |
5472 | if (*p == CTLESC) { | 5470 | if ((unsigned char)*p == CTLESC) { |
5473 | p++; | 5471 | p++; |
5474 | if (protect_against_glob && inquotes && *p != '/') { | 5472 | if (protect_against_glob && inquotes && *p != '/') { |
5475 | *q++ = '\\'; | 5473 | *q++ = '\\'; |
@@ -5514,8 +5512,8 @@ memtodest(const char *p, size_t len, int syntax, int quotes) | |||
5514 | q = makestrspace(quotes ? len * 2 : len, q); | 5512 | q = makestrspace(quotes ? len * 2 : len, q); |
5515 | 5513 | ||
5516 | while (len--) { | 5514 | while (len--) { |
5517 | int c = signed_char2int(*p++); | 5515 | unsigned char c = *p++; |
5518 | if (!c) | 5516 | if (c == '\0') |
5519 | continue; | 5517 | continue; |
5520 | if (quotes) { | 5518 | if (quotes) { |
5521 | int n = SIT(c, syntax); | 5519 | int n = SIT(c, syntax); |
@@ -5600,7 +5598,7 @@ removerecordregions(int endoff) | |||
5600 | static char * | 5598 | static char * |
5601 | exptilde(char *startp, char *p, int flags) | 5599 | exptilde(char *startp, char *p, int flags) |
5602 | { | 5600 | { |
5603 | char c; | 5601 | unsigned char c; |
5604 | char *name; | 5602 | char *name; |
5605 | struct passwd *pw; | 5603 | struct passwd *pw; |
5606 | const char *home; | 5604 | const char *home; |
@@ -5795,7 +5793,7 @@ expari(int quotes) | |||
5795 | do { | 5793 | do { |
5796 | int esc; | 5794 | int esc; |
5797 | 5795 | ||
5798 | while (*p != CTLARI) { | 5796 | while ((unsigned char)*p != CTLARI) { |
5799 | p--; | 5797 | p--; |
5800 | #if DEBUG | 5798 | #if DEBUG |
5801 | if (p < start) { | 5799 | if (p < start) { |
@@ -5857,10 +5855,9 @@ argstr(char *p, int flags, struct strlist *var_str_list) | |||
5857 | #if ENABLE_SH_MATH_SUPPORT | 5855 | #if ENABLE_SH_MATH_SUPPORT |
5858 | CTLENDARI, | 5856 | CTLENDARI, |
5859 | #endif | 5857 | #endif |
5860 | 0 | 5858 | '\0' |
5861 | }; | 5859 | }; |
5862 | const char *reject = spclchars; | 5860 | const char *reject = spclchars; |
5863 | int c; | ||
5864 | int quotes = flags & (EXP_FULL | EXP_CASE | EXP_REDIR); /* do CTLESC */ | 5861 | int quotes = flags & (EXP_FULL | EXP_CASE | EXP_REDIR); /* do CTLESC */ |
5865 | int breakall = flags & EXP_WORD; | 5862 | int breakall = flags & EXP_WORD; |
5866 | int inquotes; | 5863 | int inquotes; |
@@ -5888,8 +5885,10 @@ argstr(char *p, int flags, struct strlist *var_str_list) | |||
5888 | start: | 5885 | start: |
5889 | startloc = expdest - (char *)stackblock(); | 5886 | startloc = expdest - (char *)stackblock(); |
5890 | for (;;) { | 5887 | for (;;) { |
5888 | unsigned char c; | ||
5889 | |||
5891 | length += strcspn(p + length, reject); | 5890 | length += strcspn(p + length, reject); |
5892 | c = (unsigned char) p[length]; | 5891 | c = p[length]; |
5893 | if (c) { | 5892 | if (c) { |
5894 | if (!(c & 0x80) | 5893 | if (!(c & 0x80) |
5895 | #if ENABLE_SH_MATH_SUPPORT | 5894 | #if ENABLE_SH_MATH_SUPPORT |
@@ -6044,7 +6043,7 @@ scanleft(char *startp, char *rmesc, char *rmescend UNUSED_PARAM, char *str, int | |||
6044 | *loc2 = c; | 6043 | *loc2 = c; |
6045 | if (match) // if (!match) | 6044 | if (match) // if (!match) |
6046 | return loc; | 6045 | return loc; |
6047 | if (quotes && *loc == CTLESC) | 6046 | if (quotes && (unsigned char)*loc == CTLESC) |
6048 | loc++; | 6047 | loc++; |
6049 | loc++; | 6048 | loc++; |
6050 | loc2++; | 6049 | loc2++; |
@@ -6096,7 +6095,7 @@ varunset(const char *end, const char *var, const char *umsg, int varflags) | |||
6096 | tail = nullstr; | 6095 | tail = nullstr; |
6097 | msg = "parameter not set"; | 6096 | msg = "parameter not set"; |
6098 | if (umsg) { | 6097 | if (umsg) { |
6099 | if (*end == CTLENDVAR) { | 6098 | if ((unsigned char)*end == CTLENDVAR) { |
6100 | if (varflags & VSNUL) | 6099 | if (varflags & VSNUL) |
6101 | tail = " or null"; | 6100 | tail = " or null"; |
6102 | } else { | 6101 | } else { |
@@ -6180,7 +6179,7 @@ subevalvar(char *p, char *str, int strloc, int subtype, | |||
6180 | 6179 | ||
6181 | /* Adjust the length by the number of escapes */ | 6180 | /* Adjust the length by the number of escapes */ |
6182 | for (ptr = startp; ptr < (str - 1); ptr++) { | 6181 | for (ptr = startp; ptr < (str - 1); ptr++) { |
6183 | if (*ptr == CTLESC) { | 6182 | if ((unsigned char)*ptr == CTLESC) { |
6184 | len--; | 6183 | len--; |
6185 | ptr++; | 6184 | ptr++; |
6186 | } | 6185 | } |
@@ -6214,11 +6213,11 @@ subevalvar(char *p, char *str, int strloc, int subtype, | |||
6214 | len = orig_len - pos; | 6213 | len = orig_len - pos; |
6215 | 6214 | ||
6216 | for (str = startp; pos; str++, pos--) { | 6215 | for (str = startp; pos; str++, pos--) { |
6217 | if (quotes && *str == CTLESC) | 6216 | if (quotes && (unsigned char)*str == CTLESC) |
6218 | str++; | 6217 | str++; |
6219 | } | 6218 | } |
6220 | for (loc = startp; len; len--) { | 6219 | for (loc = startp; len; len--) { |
6221 | if (quotes && *str == CTLESC) | 6220 | if (quotes && (unsigned char)*str == CTLESC) |
6222 | *loc++ = *str++; | 6221 | *loc++ = *str++; |
6223 | *loc++ = *str++; | 6222 | *loc++ = *str++; |
6224 | } | 6223 | } |
@@ -6282,7 +6281,7 @@ subevalvar(char *p, char *str, int strloc, int subtype, | |||
6282 | /* No match, advance */ | 6281 | /* No match, advance */ |
6283 | restart_detect = stackblock(); | 6282 | restart_detect = stackblock(); |
6284 | STPUTC(*idx, expdest); | 6283 | STPUTC(*idx, expdest); |
6285 | if (quotes && *idx == CTLESC) { | 6284 | if (quotes && (unsigned char)*idx == CTLESC) { |
6286 | idx++; | 6285 | idx++; |
6287 | len++; | 6286 | len++; |
6288 | STPUTC(*idx, expdest); | 6287 | STPUTC(*idx, expdest); |
@@ -6297,7 +6296,7 @@ subevalvar(char *p, char *str, int strloc, int subtype, | |||
6297 | 6296 | ||
6298 | if (subtype == VSREPLACEALL) { | 6297 | if (subtype == VSREPLACEALL) { |
6299 | while (idx < loc) { | 6298 | while (idx < loc) { |
6300 | if (quotes && *idx == CTLESC) | 6299 | if (quotes && (unsigned char)*idx == CTLESC) |
6301 | idx++; | 6300 | idx++; |
6302 | idx++; | 6301 | idx++; |
6303 | rmesc++; | 6302 | rmesc++; |
@@ -6416,7 +6415,7 @@ varvalue(char *name, int varflags, int flags, struct strlist *var_str_list) | |||
6416 | goto param; | 6415 | goto param; |
6417 | /* fall through */ | 6416 | /* fall through */ |
6418 | case '*': | 6417 | case '*': |
6419 | sep = ifsset() ? signed_char2int(ifsval()[0]) : ' '; | 6418 | sep = ifsset() ? (unsigned char)(ifsval()[0]) : ' '; |
6420 | if (quotes && (SIT(sep, syntax) == CCTL || SIT(sep, syntax) == CBACK)) | 6419 | if (quotes && (SIT(sep, syntax) == CCTL || SIT(sep, syntax) == CBACK)) |
6421 | sepq = 1; | 6420 | sepq = 1; |
6422 | param: | 6421 | param: |
@@ -6634,7 +6633,7 @@ evalvar(char *p, int flags, struct strlist *var_str_list) | |||
6634 | if (subtype != VSNORMAL) { /* skip to end of alternative */ | 6633 | if (subtype != VSNORMAL) { /* skip to end of alternative */ |
6635 | int nesting = 1; | 6634 | int nesting = 1; |
6636 | for (;;) { | 6635 | for (;;) { |
6637 | char c = *p++; | 6636 | unsigned char c = *p++; |
6638 | if (c == CTLESC) | 6637 | if (c == CTLESC) |
6639 | p++; | 6638 | p++; |
6640 | else if (c == CTLBACKQ || c == (CTLBACKQ|CTLQUOTE)) { | 6639 | else if (c == CTLBACKQ || c == (CTLBACKQ|CTLQUOTE)) { |
@@ -6682,7 +6681,7 @@ ifsbreakup(char *string, struct arglist *arglist) | |||
6682 | ifsspc = 0; | 6681 | ifsspc = 0; |
6683 | while (p < string + ifsp->endoff) { | 6682 | while (p < string + ifsp->endoff) { |
6684 | q = p; | 6683 | q = p; |
6685 | if (*p == CTLESC) | 6684 | if ((unsigned char)*p == CTLESC) |
6686 | p++; | 6685 | p++; |
6687 | if (!strchr(ifs, *p)) { | 6686 | if (!strchr(ifs, *p)) { |
6688 | p++; | 6687 | p++; |
@@ -6708,7 +6707,7 @@ ifsbreakup(char *string, struct arglist *arglist) | |||
6708 | break; | 6707 | break; |
6709 | } | 6708 | } |
6710 | q = p; | 6709 | q = p; |
6711 | if (*p == CTLESC) | 6710 | if ((unsigned char)*p == CTLESC) |
6712 | p++; | 6711 | p++; |
6713 | if (strchr(ifs, *p) == NULL) { | 6712 | if (strchr(ifs, *p) == NULL) { |
6714 | p = q; | 6713 | p = q; |
@@ -9434,12 +9433,6 @@ preadfd(void) | |||
9434 | */ | 9433 | */ |
9435 | //#define pgetc_debug(...) bb_error_msg(__VA_ARGS__) | 9434 | //#define pgetc_debug(...) bb_error_msg(__VA_ARGS__) |
9436 | #define pgetc_debug(...) ((void)0) | 9435 | #define pgetc_debug(...) ((void)0) |
9437 | /* | ||
9438 | * NB: due to SIT(c) internals (syntax_index_table[] vector), | ||
9439 | * pgetc() and related functions must return chars SIGN-EXTENDED into ints, | ||
9440 | * not zero-extended. Seems fragile to me. Affects only !USE_SIT_FUNCTION case, | ||
9441 | * so we can fix it by ditching !USE_SIT_FUNCTION if Unicode requires that. | ||
9442 | */ | ||
9443 | static int | 9436 | static int |
9444 | preadbuffer(void) | 9437 | preadbuffer(void) |
9445 | { | 9438 | { |
@@ -9540,12 +9533,12 @@ preadbuffer(void) | |||
9540 | g_parsefile->left_in_line, | 9533 | g_parsefile->left_in_line, |
9541 | g_parsefile->next_to_pgetc, | 9534 | g_parsefile->next_to_pgetc, |
9542 | g_parsefile->next_to_pgetc); | 9535 | g_parsefile->next_to_pgetc); |
9543 | return signed_char2int(*g_parsefile->next_to_pgetc++); | 9536 | return (unsigned char)*g_parsefile->next_to_pgetc++; |
9544 | } | 9537 | } |
9545 | 9538 | ||
9546 | #define pgetc_as_macro() \ | 9539 | #define pgetc_as_macro() \ |
9547 | (--g_parsefile->left_in_line >= 0 \ | 9540 | (--g_parsefile->left_in_line >= 0 \ |
9548 | ? signed_char2int(*g_parsefile->next_to_pgetc++) \ | 9541 | ? (unsigned char)*g_parsefile->next_to_pgetc++ \ |
9549 | : preadbuffer() \ | 9542 | : preadbuffer() \ |
9550 | ) | 9543 | ) |
9551 | 9544 | ||
@@ -10431,16 +10424,14 @@ fixredir(union node *n, const char *text, int err) | |||
10431 | static int | 10424 | static int |
10432 | noexpand(const char *text) | 10425 | noexpand(const char *text) |
10433 | { | 10426 | { |
10434 | const char *p; | 10427 | unsigned char c; |
10435 | char c; | ||
10436 | 10428 | ||
10437 | p = text; | 10429 | while ((c = *text++) != '\0') { |
10438 | while ((c = *p++) != '\0') { | ||
10439 | if (c == CTLQUOTEMARK) | 10430 | if (c == CTLQUOTEMARK) |
10440 | continue; | 10431 | continue; |
10441 | if (c == CTLESC) | 10432 | if (c == CTLESC) |
10442 | p++; | 10433 | text++; |
10443 | else if (SIT((signed char)c, BASESYNTAX) == CCTL) | 10434 | else if (SIT(c, BASESYNTAX) == CCTL) |
10444 | return 0; | 10435 | return 0; |
10445 | } | 10436 | } |
10446 | return 1; | 10437 | return 1; |
@@ -10825,7 +10816,7 @@ static int decode_dollar_squote(void) | |||
10825 | * If eofmark is NULL, read a word or a redirection symbol. If eofmark | 10816 | * If eofmark is NULL, read a word or a redirection symbol. If eofmark |
10826 | * is not NULL, read a here document. In the latter case, eofmark is the | 10817 | * is not NULL, read a here document. In the latter case, eofmark is the |
10827 | * word which marks the end of the document and striptabs is true if | 10818 | * word which marks the end of the document and striptabs is true if |
10828 | * leading tabs should be stripped from the document. The argument firstc | 10819 | * leading tabs should be stripped from the document. The argument c |
10829 | * is the first character of the input token or document. | 10820 | * is the first character of the input token or document. |
10830 | * | 10821 | * |
10831 | * Because C does not have internal subroutines, I have simulated them | 10822 | * Because C does not have internal subroutines, I have simulated them |
@@ -10839,10 +10830,10 @@ static int decode_dollar_squote(void) | |||
10839 | #define PARSEBACKQNEW() {oldstyle = 0; goto parsebackq; parsebackq_newreturn:;} | 10830 | #define PARSEBACKQNEW() {oldstyle = 0; goto parsebackq; parsebackq_newreturn:;} |
10840 | #define PARSEARITH() {goto parsearith; parsearith_return:;} | 10831 | #define PARSEARITH() {goto parsearith; parsearith_return:;} |
10841 | static int | 10832 | static int |
10842 | readtoken1(int firstc, int syntax, char *eofmark, int striptabs) | 10833 | readtoken1(int c, int syntax, char *eofmark, int striptabs) |
10843 | { | 10834 | { |
10844 | /* NB: syntax parameter fits into smallint */ | 10835 | /* NB: syntax parameter fits into smallint */ |
10845 | int c = firstc; | 10836 | /* c parameter is an unsigned char or PEOF or PEOA */ |
10846 | char *out; | 10837 | char *out; |
10847 | int len; | 10838 | int len; |
10848 | char line[EOFMARKLEN + 1]; | 10839 | char line[EOFMARKLEN + 1]; |
@@ -11207,14 +11198,14 @@ parseredir: { | |||
11207 | (((unsigned)(c) - 33 < 32) \ | 11198 | (((unsigned)(c) - 33 < 32) \ |
11208 | && ((0xc1ff920dU >> ((unsigned)(c) - 33)) & 1)) | 11199 | && ((0xc1ff920dU >> ((unsigned)(c) - 33)) & 1)) |
11209 | parsesub: { | 11200 | parsesub: { |
11210 | int subtype; | 11201 | unsigned char subtype; |
11211 | int typeloc; | 11202 | int typeloc; |
11212 | int flags; | 11203 | int flags; |
11213 | char *p; | 11204 | char *p; |
11214 | static const char types[] ALIGN1 = "}-+?="; | 11205 | static const char types[] ALIGN1 = "}-+?="; |
11215 | 11206 | ||
11216 | c = pgetc(); | 11207 | c = pgetc(); |
11217 | if (c <= PEOA_OR_PEOF | 11208 | if (c > 255 /* PEOA or PEOF */ |
11218 | || (c != '(' && c != '{' && !is_name(c) && !is_special(c)) | 11209 | || (c != '(' && c != '{' && !is_name(c) && !is_special(c)) |
11219 | ) { | 11210 | ) { |
11220 | #if ENABLE_ASH_BASH_COMPAT | 11211 | #if ENABLE_ASH_BASH_COMPAT |
@@ -11251,11 +11242,11 @@ parsesub: { | |||
11251 | } else | 11242 | } else |
11252 | subtype = 0; | 11243 | subtype = 0; |
11253 | } | 11244 | } |
11254 | if (c > PEOA_OR_PEOF && is_name(c)) { | 11245 | if (c <= 255 /* not PEOA or PEOF */ && is_name(c)) { |
11255 | do { | 11246 | do { |
11256 | STPUTC(c, out); | 11247 | STPUTC(c, out); |
11257 | c = pgetc(); | 11248 | c = pgetc(); |
11258 | } while (c > PEOA_OR_PEOF && is_in_name(c)); | 11249 | } while (c <= 255 /* not PEOA or PEOF */ && is_in_name(c)); |
11259 | } else if (isdigit(c)) { | 11250 | } else if (isdigit(c)) { |
11260 | do { | 11251 | do { |
11261 | STPUTC(c, out); | 11252 | STPUTC(c, out); |
@@ -11317,7 +11308,7 @@ parsesub: { | |||
11317 | } | 11308 | } |
11318 | if (dblquote || arinest) | 11309 | if (dblquote || arinest) |
11319 | flags |= VSQUOTE; | 11310 | flags |= VSQUOTE; |
11320 | *((char *)stackblock() + typeloc) = subtype | flags; | 11311 | ((unsigned char *)stackblock())[typeloc] = subtype | flags; |
11321 | if (subtype != VSNORMAL) { | 11312 | if (subtype != VSNORMAL) { |
11322 | varnest++; | 11313 | varnest++; |
11323 | if (dblquote || arinest) { | 11314 | if (dblquote || arinest) { |
@@ -11401,7 +11392,7 @@ parsebackq: { | |||
11401 | if (pc != '\\' && pc != '`' && pc != '$' | 11392 | if (pc != '\\' && pc != '`' && pc != '$' |
11402 | && (!dblquote || pc != '"')) | 11393 | && (!dblquote || pc != '"')) |
11403 | STPUTC('\\', pout); | 11394 | STPUTC('\\', pout); |
11404 | if (pc > PEOA_OR_PEOF) { | 11395 | if (pc <= 255 /* not PEOA or PEOF */) { |
11405 | break; | 11396 | break; |
11406 | } | 11397 | } |
11407 | /* fall through */ | 11398 | /* fall through */ |
@@ -13056,6 +13047,10 @@ init(void) | |||
13056 | 13047 | ||
13057 | /* from trap.c: */ | 13048 | /* from trap.c: */ |
13058 | signal(SIGCHLD, SIG_DFL); | 13049 | signal(SIGCHLD, SIG_DFL); |
13050 | /* bash re-enables SIGHUP which is SIG_IGNed on entry. | ||
13051 | * Try: "trap '' HUP; bash; echo RET" and type "kill -HUP $$" | ||
13052 | */ | ||
13053 | signal(SIGHUP, SIG_DFL); | ||
13059 | 13054 | ||
13060 | /* from var.c: */ | 13055 | /* from var.c: */ |
13061 | { | 13056 | { |
@@ -13311,7 +13306,7 @@ int ash_main(int argc UNUSED_PARAM, char **argv) | |||
13311 | } | 13306 | } |
13312 | 13307 | ||
13313 | if (sflag || minusc == NULL) { | 13308 | if (sflag || minusc == NULL) { |
13314 | #if MAX_HISTORY > 0 && ENABLE_FEATURE_EDITING_SAVEHISTORY | 13309 | #if defined MAX_HISTORY && MAX_HISTORY > 0 && ENABLE_FEATURE_EDITING_SAVEHISTORY |
13315 | if (iflag) { | 13310 | if (iflag) { |
13316 | const char *hp = lookupvar("HISTFILE"); | 13311 | const char *hp = lookupvar("HISTFILE"); |
13317 | if (hp) | 13312 | if (hp) |