Menu

#223 LABEL not printing return+line feed on exit.

freedos12
closed
nobody
LABEL (2)
5
2024-08-03
2018-10-19
Tom Moss
No

The current version of LABEL (1.4b) fails to print a CR+LF on exit, which causes the command prompt to write over the last line of text outputted by the program as it terminates.

e.g.

C:\FDOS\>label
Volume in drive C is TEST
Volume serial number is 2023-OBE5
Volume label (11 characters, ENTER for none)?
C:\FDOS>urrent volume label (Y/N)? y

The fix is to append myprintf("\r\n",0); to the beginning of void on_exit(), as follows.

void on_exit()
{

    myprintf("\r\n",0);
    if (curdir[0] != 0)            /* Originally at root? */
        SetCurDir(curdir);        /* Change to original dir. */

} /* end on_exit. */

See https://pastebin.com/euNgXuxU for full patched source.
Regards,
-Tom

Discussion

  • John Stogner

    John Stogner - 2021-05-12

    Hi Tom, I am having this condition on FreeDOS 13 RC4 as well. I am running on physical hardware. The command does successfully update the label, it just leaves the cursor in the middle of text instead of a clear prompt for me. Thank you for the fix!

     
  • fritz.mueller

    fritz.mueller - 2024-07-31

    I justed version 1.5, published on 2021-11-20 and could no longer reproduce this behaviour.
    So I think this thread can be closed.

     
  • Shidel

    Shidel - 2024-08-03
    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB