diff options
author | Stefan Farfeleder <stefanf@FreeBSD.org> | 2006-04-02 18:43:33 +0000 |
---|---|---|
committer | Stefan Farfeleder <stefanf@FreeBSD.org> | 2006-04-02 18:43:33 +0000 |
commit | 905330ab7815b327116c640ea365f0132e94fdda (patch) | |
tree | 2e6fe76395c7ff7cd45cf3c8720c11c04c3b141c /bin/sh/mkbuiltins | |
parent | 52f4680611c340db633b9cfcf9197c83e384f5a9 (diff) | |
download | src-905330ab7815b327116c640ea365f0132e94fdda.tar.gz src-905330ab7815b327116c640ea365f0132e94fdda.zip |
Notes
Diffstat (limited to 'bin/sh/mkbuiltins')
-rwxr-xr-x | bin/sh/mkbuiltins | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/bin/sh/mkbuiltins b/bin/sh/mkbuiltins index 144505c84307..7b77649de415 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 **); |