diff options
Diffstat (limited to 'shell/ash.c')
-rw-r--r-- | shell/ash.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/shell/ash.c b/shell/ash.c index d312cb8cd..df27e9c8d 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -11253,6 +11253,9 @@ static int readcmd(int, char **) FAST_FUNC; | |||
11253 | static int setcmd(int, char **) FAST_FUNC; | 11253 | static int setcmd(int, char **) FAST_FUNC; |
11254 | static int shiftcmd(int, char **) FAST_FUNC; | 11254 | static int shiftcmd(int, char **) FAST_FUNC; |
11255 | static int timescmd(int, char **) FAST_FUNC; | 11255 | static int timescmd(int, char **) FAST_FUNC; |
11256 | #if ENABLE_PLATFORM_MINGW32 | ||
11257 | static int titlecmd(int, char **) FAST_FUNC; | ||
11258 | #endif | ||
11256 | static int trapcmd(int, char **) FAST_FUNC; | 11259 | static int trapcmd(int, char **) FAST_FUNC; |
11257 | static int umaskcmd(int, char **) FAST_FUNC; | 11260 | static int umaskcmd(int, char **) FAST_FUNC; |
11258 | static int unsetcmd(int, char **) FAST_FUNC; | 11261 | static int unsetcmd(int, char **) FAST_FUNC; |
@@ -11352,6 +11355,9 @@ static const struct builtincmd builtintab[] = { | |||
11352 | { BUILTIN_REGULAR "test" , testcmd }, | 11355 | { BUILTIN_REGULAR "test" , testcmd }, |
11353 | #endif | 11356 | #endif |
11354 | { BUILTIN_SPEC_REG "times" , timescmd }, | 11357 | { BUILTIN_SPEC_REG "times" , timescmd }, |
11358 | #if ENABLE_PLATFORM_MINGW32 | ||
11359 | { BUILTIN_REGULAR "title" , titlecmd }, | ||
11360 | #endif | ||
11355 | { BUILTIN_SPEC_REG "trap" , trapcmd }, | 11361 | { BUILTIN_SPEC_REG "trap" , trapcmd }, |
11356 | { BUILTIN_REGULAR "true" , truecmd }, | 11362 | { BUILTIN_REGULAR "true" , truecmd }, |
11357 | { BUILTIN_REGULAR "type" , typecmd }, | 11363 | { BUILTIN_REGULAR "type" , typecmd }, |
@@ -15549,6 +15555,21 @@ timescmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | |||
15549 | return 0; | 15555 | return 0; |
15550 | } | 15556 | } |
15551 | 15557 | ||
15558 | #if ENABLE_PLATFORM_MINGW32 | ||
15559 | static int FAST_FUNC | ||
15560 | titlecmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | ||
15561 | { | ||
15562 | if (*argptr == NULL) { | ||
15563 | char buffer[256]; | ||
15564 | if (get_title(buffer, sizeof(buffer))) | ||
15565 | puts(buffer); | ||
15566 | } else { | ||
15567 | set_title(*argptr); | ||
15568 | } | ||
15569 | return 0; | ||
15570 | } | ||
15571 | #endif | ||
15572 | |||
15552 | #if ENABLE_FEATURE_SH_MATH | 15573 | #if ENABLE_FEATURE_SH_MATH |
15553 | /* | 15574 | /* |
15554 | * The let builtin. Partially stolen from GNU Bash, the Bourne Again SHell. | 15575 | * The let builtin. Partially stolen from GNU Bash, the Bourne Again SHell. |