diff --git a/src/HShellLex.c b/src/HShellLex.c index a961c22..be1391a 100644 --- a/src/HShellLex.c +++ b/src/HShellLex.c @@ -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() {