summaryrefslogtreecommitdiffstats
path: root/bin/sh/mkbuiltins
diff options
context:
space:
mode:
Diffstat (limited to 'bin/sh/mkbuiltins')
-rwxr-xr-xbin/sh/mkbuiltins10
1 files changed, 8 insertions, 2 deletions
diff --git a/bin/sh/mkbuiltins b/bin/sh/mkbuiltins
index 144505c..7b77649 100755
--- a/bin/sh/mkbuiltins
+++ b/bin/sh/mkbuiltins
@@ -66,9 +66,14 @@ echo '};
const struct builtincmd builtincmd[] = {'
awk '{ for (i = 2 ; i <= NF ; i++) {
- printf "\t{ \"%s\", %d },\n", $i, NR-1
+ if ($i == "-s") {
+ spc = 1;
+ } else {
+ printf "\t{ \"%s\", %d, %d },\n", $i, NR-1, spc
+ spc = 0;
+ }
}}' $temp
-echo ' { NULL, 0 }
+echo ' { NULL, 0, 0 }
};'
exec > ${objdir}/builtins.h
@@ -85,6 +90,7 @@ echo '
struct builtincmd {
char *name;
int code;
+ int special;
};
extern int (*const builtinfunc[])(int, char **);
OpenPOWER on IntegriCloud