- function bx_read_rc() returns -1 when the rcfile is "none". Now the default

option in the start menu doesn't change to "Begin simulation" in that case.
This commit is contained in:
Volker Ruppert 2002-08-07 07:24:32 +00:00
parent c10458ee49
commit 3a294b7521

View File

@ -1,10 +1,10 @@
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
// $Id: control.cc,v 1.52 2002-08-04 08:42:34 vruppert Exp $ // $Id: control.cc,v 1.53 2002-08-07 07:24:32 vruppert Exp $
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
// //
/* /*
* gui/control.cc * gui/control.cc
* $Id: control.cc,v 1.52 2002-08-04 08:42:34 vruppert Exp $ * $Id: control.cc,v 1.53 2002-08-07 07:24:32 vruppert Exp $
* *
* This is code for a text-mode control panel. Note that this file * This is code for a text-mode control panel. Note that this file
* does NOT include bochs.h. Instead, it does all of its contact with * does NOT include bochs.h. Instead, it does all of its contact with
@ -623,7 +623,7 @@ int bx_read_rc (char *rc)
char newrc[CPANEL_PATH_LEN]; char newrc[CPANEL_PATH_LEN];
while (1) { while (1) {
if (ask_string ("\nWhat is the configuration file name?\nTo cancel, type 'none'. [%s] ", oldrc, newrc) < 0) return -1; if (ask_string ("\nWhat is the configuration file name?\nTo cancel, type 'none'. [%s] ", oldrc, newrc) < 0) return -1;
if (!strcmp (newrc, "none")) return 0; if (!strcmp (newrc, "none")) return -1;
if (SIM->read_rc (newrc) >= 0) return 0; if (SIM->read_rc (newrc) >= 0) return 0;
fprintf (stderr, "The file '%s' could not be found.\n", newrc); fprintf (stderr, "The file '%s' could not be found.\n", newrc);
} }