aboutsummaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2009-04-02 12:57:38 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2009-04-02 12:57:38 +0000
commit0dfe1d26a9000da4925f64c07a96b3e09ba175b1 (patch)
tree83f5161417ab92d09f43e216032a4125f25f8932 /shell/ash.c
parent98c52645c02dacebccae7d68d6c2627f9318fcf7 (diff)
downloadbusybox-w32-0dfe1d26a9000da4925f64c07a96b3e09ba175b1.tar.gz
busybox-w32-0dfe1d26a9000da4925f64c07a96b3e09ba175b1.tar.bz2
busybox-w32-0dfe1d26a9000da4925f64c07a96b3e09ba175b1.zip
fix ash-alias/alias.tests failure
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c51
1 files changed, 20 insertions, 31 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 0d3ab0ff5..4aaea2803 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -354,39 +354,25 @@ raise_interrupt(void)
354} while (0) 354} while (0)
355#endif 355#endif
356 356
357#if ENABLE_ASH_OPTIMIZE_FOR_SIZE 357static USE_ASH_OPTIMIZE_FOR_SIZE(inline) void
358static void
359int_on(void) 358int_on(void)
360{ 359{
360 xbarrier();
361 if (--suppressint == 0 && intpending) { 361 if (--suppressint == 0 && intpending) {
362 raise_interrupt(); 362 raise_interrupt();
363 } 363 }
364} 364}
365#define INT_ON int_on() 365#define INT_ON int_on()
366static void 366static USE_ASH_OPTIMIZE_FOR_SIZE(inline) void
367force_int_on(void) 367force_int_on(void)
368{ 368{
369 xbarrier();
369 suppressint = 0; 370 suppressint = 0;
370 if (intpending) 371 if (intpending)
371 raise_interrupt(); 372 raise_interrupt();
372} 373}
373#define FORCE_INT_ON force_int_on() 374#define FORCE_INT_ON force_int_on()
374 375
375#else /* !ASH_OPTIMIZE_FOR_SIZE */
376
377#define INT_ON do { \
378 xbarrier(); \
379 if (--suppressint == 0 && intpending) \
380 raise_interrupt(); \
381} while (0)
382#define FORCE_INT_ON do { \
383 xbarrier(); \
384 suppressint = 0; \
385 if (intpending) \
386 raise_interrupt(); \
387} while (0)
388#endif /* !ASH_OPTIMIZE_FOR_SIZE */
389
390#define SAVE_INT(v) ((v) = suppressint) 376#define SAVE_INT(v) ((v) = suppressint)
391 377
392#define RESTORE_INT(v) do { \ 378#define RESTORE_INT(v) do { \
@@ -2700,23 +2686,26 @@ SIT(int c, int syntax)
2700 const char *s; 2686 const char *s;
2701 int indx; 2687 int indx;
2702 2688
2703 if (c == PEOF) /* 2^8+2 */ 2689 if (c == PEOF) { /* 2^8+2 */
2704 return CENDFILE; 2690 return CENDFILE;
2691 }
2705#if ENABLE_ASH_ALIAS 2692#if ENABLE_ASH_ALIAS
2706 if (c == PEOA) /* 2^8+1 */ 2693 if (c == PEOA) { /* 2^8+1 */
2707 indx = 0; 2694 indx = 0;
2708 else 2695 } else
2709#endif 2696#endif
2710 2697 {
2711 if ((unsigned char)c >= (unsigned char)(CTLESC) 2698 if ((unsigned char)c >= (unsigned char)(CTLESC)
2712 && (unsigned char)c <= (unsigned char)(CTLQUOTEMARK) 2699 && (unsigned char)c <= (unsigned char)(CTLQUOTEMARK)
2713 ) { 2700 ) {
2714 return CCTL; 2701 return CCTL;
2702 }
2703 s = strchrnul(spec_symbls, c);
2704 if (*s == '\0') {
2705 return CWORD;
2706 }
2707 indx = syntax_index_table[s - spec_symbls];
2715 } 2708 }
2716 s = strchrnul(spec_symbls, c);
2717 if (*s == '\0')
2718 return CWORD;
2719 indx = syntax_index_table[s - spec_symbls];
2720 return S_I_T[indx][syntax]; 2709 return S_I_T[indx][syntax];
2721} 2710}
2722 2711
@@ -3019,7 +3008,7 @@ static const char syntax_index_table[258] = {
3019 /* 257 127 */ CWORD_CWORD_CWORD_CWORD, 3008 /* 257 127 */ CWORD_CWORD_CWORD_CWORD,
3020}; 3009};
3021 3010
3022#define SIT(c, syntax) (S_I_T[(int)syntax_index_table[((int)c)+SYNBASE]][syntax]) 3011#define SIT(c, syntax) (S_I_T[(int)syntax_index_table[(int)(c) + SYNBASE]][syntax])
3023 3012
3024#endif /* USE_SIT_FUNCTION */ 3013#endif /* USE_SIT_FUNCTION */
3025 3014