summaryrefslogtreecommitdiff
path: root/shell/hush.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2009-04-10 23:23:41 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2009-04-10 23:23:41 +0000
commitce4acbbab664e9ab3432189f88b525f10553f674 (patch)
treed845cf76877865eaa332338bf689f65dda3b1794 /shell/hush.c
parent6ba6f546ac8016a3acccb19b2eff8b6878a3a87c (diff)
downloadbusybox-w32-ce4acbbab664e9ab3432189f88b525f10553f674.tar.gz
busybox-w32-ce4acbbab664e9ab3432189f88b525f10553f674.tar.bz2
busybox-w32-ce4acbbab664e9ab3432189f88b525f10553f674.zip
hush: add function tests
Diffstat (limited to 'shell/hush.c')
-rw-r--r--shell/hush.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/shell/hush.c b/shell/hush.c
index 40fcb7be4..a055ec14f 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -5,7 +5,7 @@
5 * "small and simple is beautiful" philosophy, which 5 * "small and simple is beautiful" philosophy, which
6 * incidentally is a good match to today's BusyBox. 6 * incidentally is a good match to today's BusyBox.
7 * 7 *
8 * Copyright (C) 2000,2001 Larry Doolittle <larry@doolittle.boa.org> 8 * Copyright (C) 2000,2001 Larry Doolittle <larry@doolittle.boa.org>
9 * Copyright (C) 2008,2009 Denys Vlasenko <vda.linux@googlemail.com> 9 * Copyright (C) 2008,2009 Denys Vlasenko <vda.linux@googlemail.com>
10 * 10 *
11 * Credits: 11 * Credits:
@@ -68,7 +68,7 @@
68#include <glob.h> 68#include <glob.h>
69/* #include <dmalloc.h> */ 69/* #include <dmalloc.h> */
70#if ENABLE_HUSH_CASE 70#if ENABLE_HUSH_CASE
71#include <fnmatch.h> 71# include <fnmatch.h>
72#endif 72#endif
73#include "math.h" 73#include "math.h"
74#include "match.h" 74#include "match.h"
@@ -100,31 +100,31 @@
100 100
101#if defined SINGLE_APPLET_MAIN 101#if defined SINGLE_APPLET_MAIN
102/* STANDALONE does not make sense, and won't compile */ 102/* STANDALONE does not make sense, and won't compile */
103#undef CONFIG_FEATURE_SH_STANDALONE 103# undef CONFIG_FEATURE_SH_STANDALONE
104#undef ENABLE_FEATURE_SH_STANDALONE 104# undef ENABLE_FEATURE_SH_STANDALONE
105#undef USE_FEATURE_SH_STANDALONE 105# undef USE_FEATURE_SH_STANDALONE
106#define SKIP_FEATURE_SH_STANDALONE(...) __VA_ARGS__ 106# define SKIP_FEATURE_SH_STANDALONE(...) __VA_ARGS__
107#define ENABLE_FEATURE_SH_STANDALONE 0 107# define ENABLE_FEATURE_SH_STANDALONE 0
108#define USE_FEATURE_SH_STANDALONE(...) 108# define USE_FEATURE_SH_STANDALONE(...)
109#define SKIP_FEATURE_SH_STANDALONE(...) __VA_ARGS__ 109# define SKIP_FEATURE_SH_STANDALONE(...) __VA_ARGS__
110#endif 110#endif
111 111
112#if !ENABLE_HUSH_INTERACTIVE 112#if !ENABLE_HUSH_INTERACTIVE
113#undef ENABLE_FEATURE_EDITING 113# undef ENABLE_FEATURE_EDITING
114#define ENABLE_FEATURE_EDITING 0 114# define ENABLE_FEATURE_EDITING 0
115#undef ENABLE_FEATURE_EDITING_FANCY_PROMPT 115# undef ENABLE_FEATURE_EDITING_FANCY_PROMPT
116#define ENABLE_FEATURE_EDITING_FANCY_PROMPT 0 116# define ENABLE_FEATURE_EDITING_FANCY_PROMPT 0
117#endif 117#endif
118 118
119/* Do we support ANY keywords? */ 119/* Do we support ANY keywords? */
120#if ENABLE_HUSH_IF || ENABLE_HUSH_LOOPS || ENABLE_HUSH_CASE 120#if ENABLE_HUSH_IF || ENABLE_HUSH_LOOPS || ENABLE_HUSH_CASE
121#define HAS_KEYWORDS 1 121# define HAS_KEYWORDS 1
122#define IF_HAS_KEYWORDS(...) __VA_ARGS__ 122# define IF_HAS_KEYWORDS(...) __VA_ARGS__
123#define IF_HAS_NO_KEYWORDS(...) 123# define IF_HAS_NO_KEYWORDS(...)
124#else 124#else
125#define HAS_KEYWORDS 0 125# define HAS_KEYWORDS 0
126#define IF_HAS_KEYWORDS(...) 126# define IF_HAS_KEYWORDS(...)
127#define IF_HAS_NO_KEYWORDS(...) __VA_ARGS__ 127# define IF_HAS_NO_KEYWORDS(...) __VA_ARGS__
128#endif 128#endif
129 129
130/* If you comment out one of these below, it will be #defined later 130/* If you comment out one of these below, it will be #defined later