Use prototypes in the generated builtins.{c,h} files.

This commit is contained in:
stefanf 2005-08-13 08:09:22 +00:00
parent 55d94ede25
commit e015332965

View File

@ -58,9 +58,9 @@ cat <<\!
!
awk '/^[^#]/ {if(('$havejobs' || $2 != "-j") && ('$havehist' || $2 != "-h")) \
print $0}' builtins.def | sed 's/-[hj]//' > $temp
awk '{ printf "int %s();\n", $1}' $temp
awk '{ printf "int %s(int, char **);\n", $1}' $temp
echo '
int (*const builtinfunc[])() = {'
int (*const builtinfunc[])(int, char **) = {'
awk '/^[^#]/ { printf "\t%s,\n", $1}' $temp
echo '};
@ -87,6 +87,6 @@ struct builtincmd {
int code;
};
extern int (*const builtinfunc[])();
extern int (*const builtinfunc[])(int, char **);
extern const struct builtincmd builtincmd[];'
rm -f $temp