VOGONS


First post, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

Been fiddling with Turbo Pascal 5.5 in DOSBox today.

Ran into a little snag when I shell'ed out from the IDE - see picture.

1) A newline is missing. It can be argued that TP is at fault here.

2) The intro-screen is a little inappropriate here. Any way to detect if the DOSBox shell is a sub-shell and avoid the intro-screen?

Attachments

  • turbo_000.png
    Filename
    turbo_000.png
    File size
    4.56 KiB
    Views
    1226 views
    File license
    Fair use/fair dealing exception

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 1 of 2, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

One way to do it in shell.cpp:

    /* Start a normal shell and check for a first command init */
if (cmd->FindString("/INIT",line,true)) {
if(machine != MCH_HERC) { //Hide it for hercules as that looks too weird
WriteOut(MSG_Get("SHELL_STARTUP_BEGIN"),VERSION);
#if C_DEBUG
WriteOut(MSG_Get("SHELL_STARTUP_DEBUG"));
#endif
if(machine == MCH_CGA) WriteOut(MSG_Get("SHELL_STARTUP_CGA"));
WriteOut(MSG_Get("SHELL_STARTUP_END"));
}
strcpy(input_line,line.c_str());
line.erase();
ParseLine(input_line);
} else {
WriteOut(MSG_Get("SHELL_NOT_STARTUP"),VERSION);
}
...
void SHELL_Init() {
/* Add messages */
MSG_Add("SHELL_NOT_STARTUP","DOSBox v%-8s\n\n");

In other words, reorganize the code a bit to use the internal /INIT switch to conditionally display the startup message or a "subshell" message. There may be a better test for the first command shell, but this seems to work.