1. 增加HShell支持简易标准库不支持stdout的情况
This commit is contained in:
parent
399db9f4e9
commit
bbac687ce0
@ -17,6 +17,9 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef stdout
|
||||
#define NOT_SUPPORT_STDOUT
|
||||
#endif
|
||||
|
||||
#define CTRL_KEY(k) ((k) & 0x1f)
|
||||
|
||||
@ -154,7 +157,9 @@ static void PrintCmdLine() {
|
||||
// 用户已经输入
|
||||
if (shellInfo_.password == 1 && shellInfo_.userName == 0) {
|
||||
HSHELL_PRINTF("password: \033[0m");
|
||||
#ifndef NOT_SUPPORT_STDOUT
|
||||
fflush(stdout);
|
||||
#endif
|
||||
return ;
|
||||
}
|
||||
|
||||
@ -168,7 +173,9 @@ static void PrintCmdLine() {
|
||||
HSHELL_PRINTF("password: \033[0m");
|
||||
}
|
||||
|
||||
#ifndef NOT_SUPPORT_STDOUT
|
||||
fflush(stdout);
|
||||
#endif
|
||||
return ;
|
||||
}
|
||||
#endif
|
||||
@ -178,7 +185,9 @@ static void PrintCmdLine() {
|
||||
HSHELL_PRINTF("\033[%dD", len - shellInfo_.cursorPos);
|
||||
}
|
||||
|
||||
#ifndef NOT_SUPPORT_STDOUT
|
||||
fflush(stdout);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void DeleteBeginByte() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user