[CMD] Fix missing/misplaced newlines at end of displayed errors and prompts.

ConInString() should display a newline when it encounters the terminating
carriage-return pressed by the user for ending string output.
+ Remove the extra \n hacks in FilePromptYN[A].

Improve outputted strings from DATE and TIME commands.
+ Rename some STRING_***_ERROR defines.

CORE-18489
This commit is contained in:
Hermès Bélusca-Maïto 2023-11-15 22:00:59 +01:00
parent cef9f5c4a6
commit db219e45c0
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
33 changed files with 450 additions and 451 deletions

View file

@ -44,7 +44,7 @@ static WORD awMonths[2][13] =
static VOID
PrintDateString (VOID)
PromptDateString(VOID)
{
switch (nDateFormat)
{
@ -203,8 +203,9 @@ INT cmd_date(LPTSTR param)
nDateString = i;
}
// TODO: Should prepend a "Current date is: " prompt, as done with TIME.
if (nDateString == -1)
ConOutPrintf(_T("%s"), GetDateString());
ConOutPrintf(_T("%s\n"), GetDateString());
if (!bPrompt)
{
@ -216,7 +217,7 @@ INT cmd_date(LPTSTR param)
{
if (nDateString == -1)
{
PrintDateString();
PromptDateString();
ConInString(szDate, ARRAYSIZE(szDate));
TRACE("\'%s\'\n", debugstr_aw(szDate));