Started bx_bool to bool type changes in the Bochs core.
This commit is contained in:
parent
bc680908ba
commit
22fabb599a
@ -120,22 +120,22 @@ int bx_parse_cmdline(int arg, int argc, char *argv[]);
|
||||
int bx_read_configuration(const char *rcfile);
|
||||
int bx_write_configuration(const char *rcfile, int overwrite);
|
||||
void bx_reset_options(void);
|
||||
void bx_set_log_actions_by_device(bx_bool panic_flag);
|
||||
void bx_set_log_actions_by_device(bool panic_flag);
|
||||
// special config parameter and options functions for plugins
|
||||
void bx_init_std_nic_options(const char *name, bx_list_c *menu);
|
||||
void bx_init_usb_options(const char *usb_name, const char *pname, int maxports);
|
||||
int bx_parse_param_from_list(const char *context, const char *input, bx_list_c *list);
|
||||
int bx_parse_nic_params(const char *context, const char *param, bx_list_c *base);
|
||||
int bx_parse_usb_port_params(const char *context, bx_bool devopt,
|
||||
int bx_parse_usb_port_params(const char *context, bool devopt,
|
||||
const char *param, int maxports, bx_list_c *base);
|
||||
int bx_split_option_list(const char *msg, const char *rawopt, char **argv, int max_argv);
|
||||
int bx_write_param_list(FILE *fp, bx_list_c *base, const char *optname, bx_bool multiline);
|
||||
int bx_write_param_list(FILE *fp, bx_list_c *base, const char *optname, bool multiline);
|
||||
int bx_write_usb_options(FILE *fp, int maxports, bx_list_c *base);
|
||||
|
||||
Bit32u crc32(const Bit8u *buf, int len);
|
||||
|
||||
// used to print param tree from debugger
|
||||
void print_tree(bx_param_c *node, int level = 0, bx_bool xml = false);
|
||||
void print_tree(bx_param_c *node, int level = 0, bool xml = false);
|
||||
|
||||
#if BX_ENABLE_STATISTICS
|
||||
// print statistics
|
||||
@ -421,20 +421,20 @@ int bx_gdbstub_check(unsigned int eip);
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
bx_bool interrupts;
|
||||
bx_bool exceptions;
|
||||
bx_bool print_timestamps;
|
||||
bool interrupts;
|
||||
bool exceptions;
|
||||
bool print_timestamps;
|
||||
#if BX_DEBUGGER
|
||||
bx_bool magic_break_enabled;
|
||||
bool magic_break_enabled;
|
||||
#endif
|
||||
#if BX_GDBSTUB
|
||||
bx_bool gdbstub_enabled;
|
||||
bool gdbstub_enabled;
|
||||
#endif
|
||||
#if BX_SUPPORT_APIC
|
||||
bx_bool apic;
|
||||
bool apic;
|
||||
#endif
|
||||
#if BX_DEBUG_LINUX
|
||||
bx_bool linux_syscall;
|
||||
bool linux_syscall;
|
||||
#endif
|
||||
} bx_debug_t;
|
||||
|
||||
@ -475,7 +475,7 @@ enum {
|
||||
/* --- EXTERNS --- */
|
||||
|
||||
#if BX_GUI_SIGHANDLER
|
||||
extern bx_bool bx_gui_sighandler;
|
||||
extern bool bx_gui_sighandler;
|
||||
#endif
|
||||
|
||||
// This value controls how often each I/O device's timer handler
|
||||
|
@ -2,7 +2,7 @@
|
||||
// $Id$
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2017-2020 The Bochs Project
|
||||
// Copyright (C) 2017-2021 The Bochs Project
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
@ -55,7 +55,7 @@ void bx_set_event(bx_thread_event_t *thread_ev)
|
||||
#endif
|
||||
}
|
||||
|
||||
bx_bool bx_wait_for_event(bx_thread_event_t *thread_ev)
|
||||
bool bx_wait_for_event(bx_thread_event_t *thread_ev)
|
||||
{
|
||||
#if defined(WIN32)
|
||||
if (WaitForSingleObject(thread_ev->event, 1) == WAIT_OBJECT_0) {
|
||||
|
@ -2,7 +2,7 @@
|
||||
// $Id$
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2017-2020 The Bochs Project
|
||||
// Copyright (C) 2017-2021 The Bochs Project
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
@ -82,7 +82,7 @@ typedef struct
|
||||
void BOCHSAPI_MSVCONLY bx_create_event(bx_thread_event_t *thread_ev);
|
||||
void BOCHSAPI_MSVCONLY bx_destroy_event(bx_thread_event_t *thread_ev);
|
||||
void BOCHSAPI_MSVCONLY bx_set_event(bx_thread_event_t *thread_ev);
|
||||
bx_bool BOCHSAPI_MSVCONLY bx_wait_for_event(bx_thread_event_t *thread_ev);
|
||||
bool BOCHSAPI_MSVCONLY bx_wait_for_event(bx_thread_event_t *thread_ev);
|
||||
bool BOCHSAPI_MSVCONLY bx_create_sem(bx_thread_sem_t *thread_sem);
|
||||
void BOCHSAPI_MSVCONLY bx_destroy_sem(bx_thread_sem_t *thread_sem);
|
||||
void BOCHSAPI_MSVCONLY bx_wait_sem(bx_thread_sem_t *thread_sem);
|
||||
|
@ -270,7 +270,7 @@ void bx_plugin_ctrl_init()
|
||||
#endif
|
||||
}
|
||||
|
||||
void bx_plugin_ctrl_reset(bx_bool init_done)
|
||||
void bx_plugin_ctrl_reset(bool init_done)
|
||||
{
|
||||
bx_list_c *base = (bx_list_c*) SIM->get_param(BXPN_PLUGIN_CTRL);
|
||||
if (init_done) {
|
||||
@ -1912,8 +1912,8 @@ static int parse_line_unformatted(const char *context, char *line)
|
||||
char string[512];
|
||||
char *params[MAX_PARAMS_LEN];
|
||||
int num_params;
|
||||
bx_bool inquotes = 0;
|
||||
bx_bool comment = 0;
|
||||
bool inquotes = 0;
|
||||
bool comment = 0;
|
||||
|
||||
memset(params, 0, sizeof(params));
|
||||
if (line == NULL) return 0;
|
||||
@ -2074,7 +2074,7 @@ int get_floppy_type_from_image(const char *filename)
|
||||
static Bit32s parse_log_options(const char *context, int num_params, char *params[])
|
||||
{
|
||||
int level, action, i;
|
||||
bx_bool def_action = 0;
|
||||
bool def_action = 0;
|
||||
char *param, *module, *actstr;
|
||||
char pname[20];
|
||||
bx_list_c *base;
|
||||
@ -2217,7 +2217,7 @@ int bx_parse_param_from_list(const char *context, const char *input, bx_list_c *
|
||||
return ret;
|
||||
}
|
||||
|
||||
int bx_parse_usb_port_params(const char *context, bx_bool devopt, const char *param, int maxports, bx_list_c *base)
|
||||
int bx_parse_usb_port_params(const char *context, bool devopt, const char *param, int maxports, bx_list_c *base)
|
||||
{
|
||||
int idx, plen;
|
||||
char tmpname[20];
|
||||
@ -2303,7 +2303,7 @@ int bx_split_option_list(const char *msg, const char *rawopt, char **argv, int m
|
||||
return argc;
|
||||
}
|
||||
|
||||
bx_bool is_deprecated_option(const char *oldparam, const char **newparam)
|
||||
bool is_deprecated_option(const char *oldparam, const char **newparam)
|
||||
{
|
||||
if ((!strcmp(oldparam, "keyboard_serial_delay")) ||
|
||||
(!strcmp(oldparam, "keyboard_paste_delay")) ||
|
||||
@ -2856,7 +2856,7 @@ static int parse_line_formatted(const char *context, int num_params, char *param
|
||||
} else if (!strcmp(params[0], "pci")) {
|
||||
char tmpdev[80];
|
||||
int enabled = -1;
|
||||
bx_bool chipset = 0;
|
||||
bool chipset = 0;
|
||||
for (i=1; i<num_params; i++) {
|
||||
if (!strncmp(params[i], "enabled=", 8)) {
|
||||
enabled = atol(¶ms[i][8]);
|
||||
@ -3077,10 +3077,10 @@ static int parse_line_formatted(const char *context, int num_params, char *param
|
||||
}
|
||||
|
||||
|
||||
int bx_write_param_list(FILE *fp, bx_list_c *base, const char *optname, bx_bool multiline)
|
||||
int bx_write_param_list(FILE *fp, bx_list_c *base, const char *optname, bool multiline)
|
||||
{
|
||||
char bxrcline[BX_PATHNAME_LEN], tmpstr[BX_PATHNAME_LEN];
|
||||
bx_bool newline = 1;
|
||||
bool newline = 1;
|
||||
int p = 0;
|
||||
|
||||
if (base == NULL) return -1;
|
||||
@ -3268,7 +3268,7 @@ int bx_write_debugger_options(FILE *fp)
|
||||
#endif
|
||||
#if BX_GDBSTUB
|
||||
bx_list_c *base = (bx_list_c*) SIM->get_param(BXPN_GDBSTUB);
|
||||
bx_bool enabled = SIM->get_param_bool("enabled", base)->get();
|
||||
bool enabled = SIM->get_param_bool("enabled", base)->get();
|
||||
if (enabled) {
|
||||
fprintf(fp, "gdbstub: enabled=%d, port=%d, text_base=%d, data_base=%d, bss_base=%d\n",
|
||||
enabled, SIM->get_param_num("port", base)->get(), SIM->get_param_num("text_base", base)->get(),
|
||||
|
@ -2,7 +2,7 @@
|
||||
// $Id$
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002-2020 The Bochs Project Team
|
||||
// Copyright (C) 2002-2021 The Bochs Project Team
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
@ -399,7 +399,7 @@ static int access_linear(Bit64u laddress,
|
||||
Bit8u* data)
|
||||
{
|
||||
bx_phy_address phys;
|
||||
bx_bool valid;
|
||||
bool valid;
|
||||
|
||||
if (((laddress & 0xfff) + len) > 4096)
|
||||
{
|
||||
|
@ -76,9 +76,9 @@ class bx_real_sim_c : public bx_simulator_interface_c {
|
||||
jmp_buf *quit_context;
|
||||
int exit_code;
|
||||
unsigned param_id;
|
||||
bx_bool bx_debug_gui;
|
||||
bx_bool bx_log_viewer;
|
||||
bx_bool wxsel;
|
||||
bool bx_debug_gui;
|
||||
bool bx_log_viewer;
|
||||
bool wxsel;
|
||||
public:
|
||||
bx_real_sim_c();
|
||||
virtual ~bx_real_sim_c() {}
|
||||
@ -125,19 +125,19 @@ public:
|
||||
virtual BxEvent* sim_to_ci_event(BxEvent *event);
|
||||
virtual int log_dlg(const char *prefix, int level, const char *msg, int mode);
|
||||
virtual void log_msg(const char *prefix, int level, const char *msg);
|
||||
virtual void set_log_viewer(bx_bool val) { bx_log_viewer = val; }
|
||||
virtual bx_bool has_log_viewer() const { return bx_log_viewer; }
|
||||
virtual void set_log_viewer(bool val) { bx_log_viewer = val; }
|
||||
virtual bool has_log_viewer() const { return bx_log_viewer; }
|
||||
virtual int ask_param(bx_param_c *param);
|
||||
virtual int ask_param(const char *pname);
|
||||
// ask the user for a pathname
|
||||
virtual int ask_filename(const char *filename, int maxlen, const char *prompt, const char *the_default, int flags);
|
||||
// yes/no dialog
|
||||
virtual int ask_yes_no(const char *title, const char *prompt, bx_bool the_default);
|
||||
virtual int ask_yes_no(const char *title, const char *prompt, bool the_default);
|
||||
// simple message box
|
||||
virtual void message_box(const char *title, const char *message);
|
||||
// called at a regular interval, currently by the keyboard handler.
|
||||
virtual void periodic();
|
||||
virtual int create_disk_image(const char *filename, int sectors, bx_bool overwrite);
|
||||
virtual int create_disk_image(const char *filename, int sectors, bool overwrite);
|
||||
virtual void refresh_ci();
|
||||
virtual void refresh_vga() {
|
||||
if (init_done) {
|
||||
@ -156,8 +156,8 @@ public:
|
||||
bx_param_c *get_first_hd() {
|
||||
return get_first_atadevice(BX_ATA_DEVICE_DISK);
|
||||
}
|
||||
virtual bx_bool is_pci_device(const char *name);
|
||||
virtual bx_bool is_agp_device(const char *name);
|
||||
virtual bool is_pci_device(const char *name);
|
||||
virtual bool is_agp_device(const char *name);
|
||||
#if BX_DEBUGGER
|
||||
virtual void debug_break();
|
||||
virtual void debug_interpret_cmd(char *cmd);
|
||||
@ -174,21 +174,21 @@ public:
|
||||
virtual void unregister_runtime_config_handler(int id);
|
||||
virtual void update_runtime_options();
|
||||
virtual void set_sim_thread_func(is_sim_thread_func_t func) {}
|
||||
virtual bx_bool is_sim_thread();
|
||||
virtual void set_debug_gui(bx_bool val) { bx_debug_gui = val; }
|
||||
virtual bx_bool has_debug_gui() const { return bx_debug_gui; }
|
||||
virtual bx_bool is_wx_selected() const { return wxsel; }
|
||||
virtual bool is_sim_thread();
|
||||
virtual void set_debug_gui(bool val) { bx_debug_gui = val; }
|
||||
virtual bool has_debug_gui() const { return bx_debug_gui; }
|
||||
virtual bool is_wx_selected() const { return wxsel; }
|
||||
// provide interface to bx_gui->set_display_mode() method for config
|
||||
// interfaces to use.
|
||||
virtual void set_display_mode(disp_mode_t newmode) {
|
||||
if (bx_gui != NULL)
|
||||
bx_gui->set_display_mode(newmode);
|
||||
}
|
||||
virtual bx_bool test_for_text_console();
|
||||
virtual bool test_for_text_console();
|
||||
// add-on config option support
|
||||
virtual bx_bool register_addon_option(const char *keyword, addon_option_parser_t parser, addon_option_save_t save_func);
|
||||
virtual bx_bool unregister_addon_option(const char *keyword);
|
||||
virtual bx_bool is_addon_option(const char *keyword);
|
||||
virtual bool register_addon_option(const char *keyword, addon_option_parser_t parser, addon_option_save_t save_func);
|
||||
virtual bool unregister_addon_option(const char *keyword);
|
||||
virtual bool is_addon_option(const char *keyword);
|
||||
virtual Bit32s parse_addon_option(const char *context, int num_params, char *params []);
|
||||
virtual Bit32s save_addon_options(FILE *fp);
|
||||
|
||||
@ -202,24 +202,24 @@ public:
|
||||
// save/restore support
|
||||
virtual void init_save_restore();
|
||||
virtual void cleanup_save_restore();
|
||||
virtual bx_bool save_state(const char *checkpoint_path);
|
||||
virtual bx_bool restore_config();
|
||||
virtual bx_bool restore_logopts();
|
||||
virtual bx_bool restore_hardware();
|
||||
virtual bool save_state(const char *checkpoint_path);
|
||||
virtual bool restore_config();
|
||||
virtual bool restore_logopts();
|
||||
virtual bool restore_hardware();
|
||||
virtual bx_list_c *get_bochs_root() {
|
||||
return (bx_list_c*)get_param("bochs", NULL);
|
||||
}
|
||||
virtual bx_bool restore_bochs_param(bx_list_c *root, const char *sr_path, const char *restore_name);
|
||||
virtual bool restore_bochs_param(bx_list_c *root, const char *sr_path, const char *restore_name);
|
||||
// special config parameter and options functions for plugins
|
||||
virtual bool opt_plugin_ctrl(const char *plugname, bx_bool load);
|
||||
virtual bool opt_plugin_ctrl(const char *plugname, bool load);
|
||||
virtual void init_std_nic_options(const char *name, bx_list_c *menu);
|
||||
virtual void init_usb_options(const char *usb_name, const char *pname, int maxports);
|
||||
virtual int parse_param_from_list(const char *context, const char *param, bx_list_c *base);
|
||||
virtual int parse_nic_params(const char *context, const char *param, bx_list_c *base);
|
||||
virtual int parse_usb_port_params(const char *context, bx_bool devopt,
|
||||
virtual int parse_usb_port_params(const char *context, bool devopt,
|
||||
const char *param, int maxports, bx_list_c *base);
|
||||
virtual int split_option_list(const char *msg, const char *rawopt, char **argv, int max_argv);
|
||||
virtual int write_param_list(FILE *fp, bx_list_c *base, const char *optname, bx_bool multiline);
|
||||
virtual int write_param_list(FILE *fp, bx_list_c *base, const char *optname, bool multiline);
|
||||
virtual int write_usb_options(FILE *fp, int maxports, bx_list_c *base);
|
||||
#if BX_USE_GUI_CONSOLE
|
||||
virtual int bx_printf(const char *fmt, ...);
|
||||
@ -227,7 +227,7 @@ public:
|
||||
#endif
|
||||
|
||||
private:
|
||||
bx_bool save_sr_param(FILE *fp, bx_param_c *node, const char *sr_path, int level);
|
||||
bool save_sr_param(FILE *fp, bx_param_c *node, const char *sr_path, int level);
|
||||
};
|
||||
|
||||
// recursive function to find parameters from the path
|
||||
@ -633,7 +633,7 @@ int bx_real_sim_c::ask_filename(const char *filename, int maxlen, const char *pr
|
||||
return event.retcode;
|
||||
}
|
||||
|
||||
int bx_real_sim_c::ask_yes_no(const char *title, const char *prompt, bx_bool the_default)
|
||||
int bx_real_sim_c::ask_yes_no(const char *title, const char *prompt, bool the_default)
|
||||
{
|
||||
BxEvent event;
|
||||
char format[512];
|
||||
@ -694,7 +694,7 @@ void bx_real_sim_c::periodic()
|
||||
// write, e.g. disk full.
|
||||
//
|
||||
// wxWidgets: This may be called from the gui thread.
|
||||
int bx_real_sim_c::create_disk_image(const char *filename, int sectors, bx_bool overwrite)
|
||||
int bx_real_sim_c::create_disk_image(const char *filename, int sectors, bool overwrite)
|
||||
{
|
||||
FILE *fp;
|
||||
if (!overwrite) {
|
||||
@ -772,7 +772,7 @@ bx_param_c *bx_real_sim_c::get_first_atadevice(Bit32u search_type)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bx_bool bx_real_sim_c::is_pci_device(const char *name)
|
||||
bool bx_real_sim_c::is_pci_device(const char *name)
|
||||
{
|
||||
#if BX_SUPPORT_PCI
|
||||
unsigned i, max_pci_slots = BX_N_PCI_SLOTS;
|
||||
@ -795,7 +795,7 @@ bx_bool bx_real_sim_c::is_pci_device(const char *name)
|
||||
return 0;
|
||||
}
|
||||
|
||||
bx_bool bx_real_sim_c::is_agp_device(const char *name)
|
||||
bool bx_real_sim_c::is_agp_device(const char *name)
|
||||
{
|
||||
#if BX_SUPPORT_PCI
|
||||
if (get_param_bool(BXPN_PCI_ENABLED)->get() &&
|
||||
@ -946,7 +946,7 @@ void bx_real_sim_c::update_runtime_options()
|
||||
bx_virt_timer.set_realtime_delay();
|
||||
}
|
||||
|
||||
bx_bool bx_real_sim_c::is_sim_thread()
|
||||
bool bx_real_sim_c::is_sim_thread()
|
||||
{
|
||||
if (is_sim_thread_func == NULL) return 1;
|
||||
return (*is_sim_thread_func)();
|
||||
@ -956,7 +956,7 @@ bx_bool bx_real_sim_c::is_sim_thread()
|
||||
// started from the "Start Menu" or by double clicking on it on a Mac,
|
||||
// there may be nothing attached to stdin/stdout/stderr. This function
|
||||
// tests if stdin/stdout/stderr are usable and returns 0 if not.
|
||||
bx_bool bx_real_sim_c::test_for_text_console()
|
||||
bool bx_real_sim_c::test_for_text_console()
|
||||
{
|
||||
#if BX_WITH_CARBON
|
||||
// In a Carbon application, you have a text console if you run the app from
|
||||
@ -967,7 +967,7 @@ bx_bool bx_real_sim_c::test_for_text_console()
|
||||
return 1;
|
||||
}
|
||||
|
||||
bx_bool bx_real_sim_c::is_addon_option(const char *keyword)
|
||||
bool bx_real_sim_c::is_addon_option(const char *keyword)
|
||||
{
|
||||
addon_option_t *addon_option;
|
||||
|
||||
@ -977,7 +977,7 @@ bx_bool bx_real_sim_c::is_addon_option(const char *keyword)
|
||||
return 0;
|
||||
}
|
||||
|
||||
bx_bool bx_real_sim_c::register_addon_option(const char *keyword, addon_option_parser_t parser,
|
||||
bool bx_real_sim_c::register_addon_option(const char *keyword, addon_option_parser_t parser,
|
||||
addon_option_save_t save_func)
|
||||
{
|
||||
addon_option_t *addon_option = new addon_option_t;
|
||||
@ -1003,7 +1003,7 @@ bx_bool bx_real_sim_c::register_addon_option(const char *keyword, addon_option_p
|
||||
return 1;
|
||||
}
|
||||
|
||||
bx_bool bx_real_sim_c::unregister_addon_option(const char *keyword)
|
||||
bool bx_real_sim_c::unregister_addon_option(const char *keyword)
|
||||
{
|
||||
addon_option_t *addon_option, *prev = NULL;
|
||||
|
||||
@ -1077,7 +1077,7 @@ void bx_real_sim_c::cleanup_save_restore()
|
||||
}
|
||||
}
|
||||
|
||||
bx_bool bx_real_sim_c::save_state(const char *checkpoint_path)
|
||||
bool bx_real_sim_c::save_state(const char *checkpoint_path)
|
||||
{
|
||||
char sr_file[BX_PATHNAME_LEN];
|
||||
char devname[20];
|
||||
@ -1122,7 +1122,7 @@ bx_bool bx_real_sim_c::save_state(const char *checkpoint_path)
|
||||
return 1;
|
||||
}
|
||||
|
||||
bx_bool bx_real_sim_c::restore_config()
|
||||
bool bx_real_sim_c::restore_config()
|
||||
{
|
||||
char config[BX_PATHNAME_LEN];
|
||||
sprintf(config, "%s/config", get_param_string(BXPN_RESTORE_PATH)->getptr());
|
||||
@ -1130,7 +1130,7 @@ bx_bool bx_real_sim_c::restore_config()
|
||||
return (read_rc(config) >= 0);
|
||||
}
|
||||
|
||||
bx_bool bx_real_sim_c::restore_logopts()
|
||||
bool bx_real_sim_c::restore_logopts()
|
||||
{
|
||||
char logopts[BX_PATHNAME_LEN];
|
||||
char line[512], string[512], devname[20];
|
||||
@ -1202,7 +1202,7 @@ static int bx_restore_getline(FILE *fp, char *line, int maxlen)
|
||||
return (ret != NULL) ? len : 0;
|
||||
}
|
||||
|
||||
bx_bool bx_real_sim_c::restore_bochs_param(bx_list_c *root, const char *sr_path, const char *restore_name)
|
||||
bool bx_real_sim_c::restore_bochs_param(bx_list_c *root, const char *sr_path, const char *restore_name)
|
||||
{
|
||||
char devstate[BX_PATHNAME_LEN], devdata[BX_PATHNAME_LEN];
|
||||
char line[512], buf[512];
|
||||
@ -1327,7 +1327,7 @@ bx_bool bx_real_sim_c::restore_bochs_param(bx_list_c *root, const char *sr_path,
|
||||
return 1;
|
||||
}
|
||||
|
||||
bx_bool bx_real_sim_c::restore_hardware()
|
||||
bool bx_real_sim_c::restore_hardware()
|
||||
{
|
||||
bx_list_c *sr_list = get_bochs_root();
|
||||
int ndev = sr_list->get_size();
|
||||
@ -1338,7 +1338,7 @@ bx_bool bx_real_sim_c::restore_hardware()
|
||||
return 1;
|
||||
}
|
||||
|
||||
bx_bool bx_real_sim_c::save_sr_param(FILE *fp, bx_param_c *node, const char *sr_path, int level)
|
||||
bool bx_real_sim_c::save_sr_param(FILE *fp, bx_param_c *node, const char *sr_path, int level)
|
||||
{
|
||||
int i, j;
|
||||
char pname[BX_PATHNAME_LEN], tmpstr[BX_PATHNAME_LEN+1];
|
||||
@ -1442,7 +1442,7 @@ bx_bool bx_real_sim_c::save_sr_param(FILE *fp, bx_param_c *node, const char *sr_
|
||||
return 1;
|
||||
}
|
||||
|
||||
bool bx_real_sim_c::opt_plugin_ctrl(const char *plugname, bx_bool load)
|
||||
bool bx_real_sim_c::opt_plugin_ctrl(const char *plugname, bool load)
|
||||
{
|
||||
bx_list_c *plugin_ctrl = (bx_list_c*)SIM->get_param(BXPN_PLUGIN_CTRL);
|
||||
if (!strcmp(plugname, "*")) {
|
||||
@ -1450,7 +1450,7 @@ bool bx_real_sim_c::opt_plugin_ctrl(const char *plugname, bx_bool load)
|
||||
int i = 0;
|
||||
while (i < plugin_ctrl->get_size()) {
|
||||
bx_param_bool_c *plugin = (bx_param_bool_c*)plugin_ctrl->get(i);
|
||||
if (load == (bx_bool)plugin->get()) {
|
||||
if (load == (bool)plugin->get()) {
|
||||
opt_plugin_ctrl(plugin->get_name(), load);
|
||||
}
|
||||
i++;
|
||||
@ -1503,7 +1503,7 @@ int bx_real_sim_c::parse_nic_params(const char *context, const char *param, bx_l
|
||||
return bx_parse_nic_params(context, param, base);
|
||||
}
|
||||
|
||||
int bx_real_sim_c::parse_usb_port_params(const char *context, bx_bool devopt,
|
||||
int bx_real_sim_c::parse_usb_port_params(const char *context, bool devopt,
|
||||
const char *param, int maxports, bx_list_c *base)
|
||||
{
|
||||
return bx_parse_usb_port_params(context, devopt, param, maxports, base);
|
||||
@ -1515,7 +1515,7 @@ int bx_real_sim_c::split_option_list(const char *msg, const char *rawopt,
|
||||
return bx_split_option_list(msg, rawopt, argv, max_argv);
|
||||
}
|
||||
|
||||
int bx_real_sim_c::write_param_list(FILE *fp, bx_list_c *base, const char *optname, bx_bool multiline)
|
||||
int bx_real_sim_c::write_param_list(FILE *fp, bx_list_c *base, const char *optname, bool multiline)
|
||||
{
|
||||
return bx_write_param_list(fp, base, optname, multiline);
|
||||
}
|
||||
|
@ -317,7 +317,7 @@ typedef struct {
|
||||
// what was pressed? This is a BX_KEY_* value. For key releases,
|
||||
// BX_KEY_RELEASED is ORed with the base BX_KEY_*.
|
||||
Bit32u bx_key;
|
||||
bx_bool raw_scancode;
|
||||
bool raw_scancode;
|
||||
} BxKeyEvent;
|
||||
|
||||
// Event type: BX_ASYNC_EVT_MOUSE
|
||||
@ -449,7 +449,7 @@ typedef struct {
|
||||
// the toolbar events.
|
||||
typedef struct {
|
||||
bx_toolbar_buttons button;
|
||||
bx_bool on; // for toggling buttons, on=true means the toolbar button is
|
||||
bool on; // for toggling buttons, on=true means the toolbar button is
|
||||
// pressed. on=false means it is not pressed.
|
||||
} BxToolbarEvent;
|
||||
|
||||
@ -457,8 +457,8 @@ typedef struct {
|
||||
typedef struct {
|
||||
int element;
|
||||
char *text;
|
||||
bx_bool active;
|
||||
bx_bool w;
|
||||
bool active;
|
||||
bool w;
|
||||
} BxStatusbarEvent;
|
||||
|
||||
// The BxEvent structure should be used for all events. Every event has
|
||||
@ -736,8 +736,8 @@ public:
|
||||
// called from simulator when writing a message to log file
|
||||
virtual void log_msg(const char *prefix, int level, const char *msg) {}
|
||||
// set this to 1 if the gui has a log viewer
|
||||
virtual void set_log_viewer(bx_bool val) {}
|
||||
virtual bx_bool has_log_viewer() const {return 0;}
|
||||
virtual void set_log_viewer(bool val) {}
|
||||
virtual bool has_log_viewer() const {return 0;}
|
||||
|
||||
// tell the CI to ask the user for the value of a parameter.
|
||||
virtual int ask_param(bx_param_c *param) {return -1;}
|
||||
@ -746,12 +746,12 @@ public:
|
||||
// ask the user for a pathname
|
||||
virtual int ask_filename(const char *filename, int maxlen, const char *prompt, const char *the_default, int flags) {return -1;}
|
||||
// yes/no dialog
|
||||
virtual int ask_yes_no(const char *title, const char *prompt, bx_bool the_default) {return -1;}
|
||||
virtual int ask_yes_no(const char *title, const char *prompt, bool the_default) {return -1;}
|
||||
// simple message box
|
||||
virtual void message_box(const char *title, const char *message) {}
|
||||
// called at a regular interval, currently by the bx_devices_c::timer()
|
||||
virtual void periodic() {}
|
||||
virtual int create_disk_image(const char *filename, int sectors, bx_bool overwrite) {return -3;}
|
||||
virtual int create_disk_image(const char *filename, int sectors, bool overwrite) {return -3;}
|
||||
// Tell the configuration interface (CI) that some parameter values have
|
||||
// changed. The CI will reread the parameters and change its display if it's
|
||||
// appropriate. Maybe later: mention which params have changed to save time.
|
||||
@ -769,9 +769,9 @@ public:
|
||||
// return first cdrom in ATA interface
|
||||
virtual bx_param_c *get_first_hd() {return NULL;}
|
||||
// return 1 if device is connected to a PCI slot
|
||||
virtual bx_bool is_pci_device(const char *name) {return 0;}
|
||||
virtual bool is_pci_device(const char *name) {return 0;}
|
||||
// return 1 if device is connected to the AGP slot
|
||||
virtual bx_bool is_agp_device(const char *name) {return 0;}
|
||||
virtual bool is_agp_device(const char *name) {return 0;}
|
||||
#if BX_DEBUGGER
|
||||
// for debugger: same behavior as pressing control-C
|
||||
virtual void debug_break() {}
|
||||
@ -788,24 +788,24 @@ public:
|
||||
virtual int register_runtime_config_handler(void *dev, rt_conf_handler_t handler) {return 0;}
|
||||
virtual void unregister_runtime_config_handler(int id) {}
|
||||
virtual void update_runtime_options() {}
|
||||
typedef bx_bool (*is_sim_thread_func_t)();
|
||||
typedef bool (*is_sim_thread_func_t)();
|
||||
is_sim_thread_func_t is_sim_thread_func;
|
||||
virtual void set_sim_thread_func(is_sim_thread_func_t func) {
|
||||
is_sim_thread_func = func;
|
||||
}
|
||||
virtual bx_bool is_sim_thread() {return 1;}
|
||||
virtual bx_bool is_wx_selected() const {return 0;}
|
||||
virtual void set_debug_gui(bx_bool val) {}
|
||||
virtual bx_bool has_debug_gui() const {return 0;}
|
||||
virtual bool is_sim_thread() {return 1;}
|
||||
virtual bool is_wx_selected() const {return 0;}
|
||||
virtual void set_debug_gui(bool val) {}
|
||||
virtual bool has_debug_gui() const {return 0;}
|
||||
// provide interface to bx_gui->set_display_mode() method for config
|
||||
// interfaces to use.
|
||||
virtual void set_display_mode(disp_mode_t newmode) {}
|
||||
virtual bx_bool test_for_text_console() {return 1;}
|
||||
virtual bool test_for_text_console() {return 1;}
|
||||
|
||||
// add-on config option support
|
||||
virtual bx_bool register_addon_option(const char *keyword, addon_option_parser_t parser, addon_option_save_t save_func) {return 0;}
|
||||
virtual bx_bool unregister_addon_option(const char *keyword) {return 0;}
|
||||
virtual bx_bool is_addon_option(const char *keyword) {return 0;}
|
||||
virtual bool register_addon_option(const char *keyword, addon_option_parser_t parser, addon_option_save_t save_func) {return 0;}
|
||||
virtual bool unregister_addon_option(const char *keyword) {return 0;}
|
||||
virtual bool is_addon_option(const char *keyword) {return 0;}
|
||||
virtual Bit32s parse_addon_option(const char *context, int num_params, char *params []) {return -1;}
|
||||
virtual Bit32s save_addon_options(FILE *fp) {return -1;}
|
||||
|
||||
@ -817,23 +817,23 @@ public:
|
||||
// save/restore support
|
||||
virtual void init_save_restore() {}
|
||||
virtual void cleanup_save_restore() {}
|
||||
virtual bx_bool save_state(const char *checkpoint_path) {return 0;}
|
||||
virtual bx_bool restore_config() {return 0;}
|
||||
virtual bx_bool restore_logopts() {return 0;}
|
||||
virtual bx_bool restore_hardware() {return 0;}
|
||||
virtual bool save_state(const char *checkpoint_path) {return 0;}
|
||||
virtual bool restore_config() {return 0;}
|
||||
virtual bool restore_logopts() {return 0;}
|
||||
virtual bool restore_hardware() {return 0;}
|
||||
virtual bx_list_c *get_bochs_root() {return NULL;}
|
||||
virtual bx_bool restore_bochs_param(bx_list_c *root, const char *sr_path, const char *restore_name) { return 0; }
|
||||
virtual bool restore_bochs_param(bx_list_c *root, const char *sr_path, const char *restore_name) { return 0; }
|
||||
|
||||
// special config parameter and options functions for plugins
|
||||
virtual bool opt_plugin_ctrl(const char *plugname, bx_bool load) {return 0;}
|
||||
virtual bool opt_plugin_ctrl(const char *plugname, bool load) {return 0;}
|
||||
virtual void init_std_nic_options(const char *name, bx_list_c *menu) {}
|
||||
virtual void init_usb_options(const char *usb_name, const char *pname, int maxports) {}
|
||||
virtual int parse_param_from_list(const char *context, const char *param, bx_list_c *base) {return 0;}
|
||||
virtual int parse_nic_params(const char *context, const char *param, bx_list_c *base) {return 0;}
|
||||
virtual int parse_usb_port_params(const char *context, bx_bool devopt,
|
||||
virtual int parse_usb_port_params(const char *context, bool devopt,
|
||||
const char *param, int maxports, bx_list_c *base) {return 0;}
|
||||
virtual int split_option_list(const char *msg, const char *rawopt, char **argv, int max_argv) {return 0;}
|
||||
virtual int write_param_list(FILE *fp, bx_list_c *base, const char *optname, bx_bool multiline) {return 0;}
|
||||
virtual int write_param_list(FILE *fp, bx_list_c *base, const char *optname, bool multiline) {return 0;}
|
||||
virtual int write_usb_options(FILE *fp, int maxports, bx_list_c *base) {return 0;}
|
||||
|
||||
#if BX_USE_GUI_CONSOLE
|
||||
@ -871,5 +871,5 @@ typedef struct BOCHSAPI {
|
||||
} bx_startup_flags_t;
|
||||
|
||||
BOCHSAPI extern bx_startup_flags_t bx_startup_flags;
|
||||
BOCHSAPI extern bx_bool bx_user_quit;
|
||||
BOCHSAPI extern bool bx_user_quit;
|
||||
BOCHSAPI extern Bit8u bx_cpu_count;
|
||||
|
@ -56,23 +56,23 @@ extern "C" {
|
||||
}
|
||||
|
||||
#if BX_GUI_SIGHANDLER
|
||||
bx_bool bx_gui_sighandler = 0;
|
||||
bool bx_gui_sighandler = 0;
|
||||
#endif
|
||||
|
||||
int bx_init_main(int argc, char *argv[]);
|
||||
void bx_init_hardware(void);
|
||||
void bx_plugin_ctrl_reset(bx_bool init_done);
|
||||
void bx_plugin_ctrl_reset(bool init_done);
|
||||
void bx_init_options(void);
|
||||
void bx_init_bx_dbg(void);
|
||||
|
||||
static const char *divider = "========================================================================";
|
||||
|
||||
bx_startup_flags_t bx_startup_flags;
|
||||
bx_bool bx_user_quit;
|
||||
bool bx_user_quit;
|
||||
Bit8u bx_cpu_count;
|
||||
#if BX_SUPPORT_APIC
|
||||
Bit32u apic_id_mask; // determinted by XAPIC option
|
||||
bx_bool simulate_xapic;
|
||||
bool simulate_xapic;
|
||||
#endif
|
||||
|
||||
/* typedefs */
|
||||
@ -201,7 +201,7 @@ static void carbonFatalDialog(const char *error, const char *exposition)
|
||||
#endif
|
||||
|
||||
#if BX_DEBUGGER
|
||||
void print_tree(bx_param_c *node, int level, bx_bool xml)
|
||||
void print_tree(bx_param_c *node, int level, bool xml)
|
||||
{
|
||||
int i;
|
||||
char tmpstr[BX_PATHNAME_LEN];
|
||||
@ -397,7 +397,7 @@ int split_string_into_argv(char *string, int *argc_out, char **argv, int max_arg
|
||||
}
|
||||
if (last_nonspace != buf) *(last_nonspace+1) = 0;
|
||||
p = buf;
|
||||
bx_bool done = false;
|
||||
bool done = false;
|
||||
while (!done) {
|
||||
//fprintf (stderr, "parsing '%c' with singlequote=%d, dblquote=%d\n", *p, in_single_quote, in_double_quote);
|
||||
switch (*p) {
|
||||
@ -507,7 +507,7 @@ int WINAPI WinMain(
|
||||
bx_startup_flags.argv = (char**) malloc (max_argv * sizeof (char*));
|
||||
split_string_into_argv(m_lpCmdLine, &bx_startup_flags.argc, bx_startup_flags.argv, max_argv);
|
||||
int arg = 1;
|
||||
bx_bool bx_noconsole = 0;
|
||||
bool bx_noconsole = 0;
|
||||
while (arg < bx_startup_flags.argc) {
|
||||
if (!strcmp("-noconsole", bx_startup_flags.argv[arg])) {
|
||||
bx_noconsole = 1;
|
||||
@ -535,7 +535,7 @@ int CDECL main(int argc, char *argv[])
|
||||
bx_startup_flags.argv = argv;
|
||||
#ifdef WIN32
|
||||
int arg = 1;
|
||||
bx_bool bx_noconsole = 0;
|
||||
bool bx_noconsole = 0;
|
||||
while (arg < argc) {
|
||||
if (!strcmp("-noconsole", argv[arg])) {
|
||||
bx_noconsole = 1;
|
||||
@ -935,7 +935,7 @@ int bx_init_main(int argc, char *argv[])
|
||||
return 0;
|
||||
}
|
||||
|
||||
bx_bool load_and_init_display_lib(void)
|
||||
bool load_and_init_display_lib(void)
|
||||
{
|
||||
if (bx_gui != NULL) {
|
||||
// bx_gui has already been filled in. This happens when you start
|
||||
@ -1134,7 +1134,7 @@ void bx_sr_after_restore_state(void)
|
||||
DEV_after_restore_state();
|
||||
}
|
||||
|
||||
void bx_set_log_actions_by_device(bx_bool panic_flag)
|
||||
void bx_set_log_actions_by_device(bool panic_flag)
|
||||
{
|
||||
int id, l, m, val;
|
||||
bx_list_c *loglev, *level;
|
||||
@ -1214,36 +1214,36 @@ void bx_init_hardware()
|
||||
#endif
|
||||
BX_INFO((" FPU support: %s", BX_SUPPORT_FPU?"yes":"no"));
|
||||
#if BX_CPU_LEVEL >= 5
|
||||
bx_bool mmx_enabled = SIM->get_param_bool(BXPN_CPUID_MMX)->get();
|
||||
bool mmx_enabled = SIM->get_param_bool(BXPN_CPUID_MMX)->get();
|
||||
BX_INFO((" MMX support: %s", mmx_enabled?"yes":"no"));
|
||||
BX_INFO((" 3dnow! support: %s", BX_SUPPORT_3DNOW?"yes":"no"));
|
||||
#endif
|
||||
#if BX_CPU_LEVEL >= 6
|
||||
bx_bool sep_enabled = SIM->get_param_bool(BXPN_CPUID_SEP)->get();
|
||||
bool sep_enabled = SIM->get_param_bool(BXPN_CPUID_SEP)->get();
|
||||
BX_INFO((" SEP support: %s", sep_enabled?"yes":"no"));
|
||||
BX_INFO((" SIMD support: %s", SIM->get_param_enum(BXPN_CPUID_SIMD)->get_selected()));
|
||||
bx_bool xsave_enabled = SIM->get_param_bool(BXPN_CPUID_XSAVE)->get();
|
||||
bx_bool xsaveopt_enabled = SIM->get_param_bool(BXPN_CPUID_XSAVEOPT)->get();
|
||||
bool xsave_enabled = SIM->get_param_bool(BXPN_CPUID_XSAVE)->get();
|
||||
bool xsaveopt_enabled = SIM->get_param_bool(BXPN_CPUID_XSAVEOPT)->get();
|
||||
BX_INFO((" XSAVE support: %s %s",
|
||||
xsave_enabled?"xsave":"no", xsaveopt_enabled?"xsaveopt":""));
|
||||
bx_bool aes_enabled = SIM->get_param_bool(BXPN_CPUID_AES)->get();
|
||||
bool aes_enabled = SIM->get_param_bool(BXPN_CPUID_AES)->get();
|
||||
BX_INFO((" AES support: %s", aes_enabled?"yes":"no"));
|
||||
bx_bool sha_enabled = SIM->get_param_bool(BXPN_CPUID_SHA)->get();
|
||||
bool sha_enabled = SIM->get_param_bool(BXPN_CPUID_SHA)->get();
|
||||
BX_INFO((" SHA support: %s", sha_enabled?"yes":"no"));
|
||||
bx_bool movbe_enabled = SIM->get_param_bool(BXPN_CPUID_MOVBE)->get();
|
||||
bool movbe_enabled = SIM->get_param_bool(BXPN_CPUID_MOVBE)->get();
|
||||
BX_INFO((" MOVBE support: %s", movbe_enabled?"yes":"no"));
|
||||
bx_bool adx_enabled = SIM->get_param_bool(BXPN_CPUID_ADX)->get();
|
||||
bool adx_enabled = SIM->get_param_bool(BXPN_CPUID_ADX)->get();
|
||||
BX_INFO((" ADX support: %s", adx_enabled?"yes":"no"));
|
||||
#if BX_SUPPORT_X86_64
|
||||
bx_bool x86_64_enabled = SIM->get_param_bool(BXPN_CPUID_X86_64)->get();
|
||||
bool x86_64_enabled = SIM->get_param_bool(BXPN_CPUID_X86_64)->get();
|
||||
BX_INFO((" x86-64 support: %s", x86_64_enabled?"yes":"no"));
|
||||
bx_bool xlarge_enabled = SIM->get_param_bool(BXPN_CPUID_1G_PAGES)->get();
|
||||
bool xlarge_enabled = SIM->get_param_bool(BXPN_CPUID_1G_PAGES)->get();
|
||||
BX_INFO((" 1G paging support: %s", xlarge_enabled?"yes":"no"));
|
||||
#else
|
||||
BX_INFO((" x86-64 support: no"));
|
||||
#endif
|
||||
#if BX_SUPPORT_MONITOR_MWAIT
|
||||
bx_bool mwait_enabled = SIM->get_param_bool(BXPN_CPUID_MWAIT)->get();
|
||||
bool mwait_enabled = SIM->get_param_bool(BXPN_CPUID_MWAIT)->get();
|
||||
BX_INFO((" MWAIT support: %s", mwait_enabled?"yes":"no"));
|
||||
#endif
|
||||
#if BX_SUPPORT_VMX
|
||||
@ -1256,7 +1256,7 @@ void bx_init_hardware()
|
||||
}
|
||||
#endif
|
||||
#if BX_SUPPORT_SVM
|
||||
bx_bool svm_enabled = SIM->get_param_bool(BXPN_CPUID_SVM)->get();
|
||||
bool svm_enabled = SIM->get_param_bool(BXPN_CPUID_SVM)->get();
|
||||
BX_INFO((" SVM support: %s", svm_enabled?"yes":"no"));
|
||||
#endif
|
||||
#endif // BX_CPU_LEVEL >= 6
|
||||
|
@ -735,7 +735,7 @@ void pluginUnregisterDeviceDevmodel(const char *name, plugintype_t type)
|
||||
/* Plugin system: Check if a plugin is loaded */
|
||||
/************************************************************************/
|
||||
|
||||
bx_bool pluginDevicePresent(const char *name)
|
||||
bool pluginDevicePresent(const char *name)
|
||||
{
|
||||
device_t *device;
|
||||
|
||||
@ -768,7 +768,7 @@ bool bx_load_plugin(const char *name, plugintype_t type)
|
||||
}
|
||||
}
|
||||
|
||||
bool bx_unload_plugin(const char *name, bx_bool devflag)
|
||||
bool bx_unload_plugin(const char *name, bool devflag)
|
||||
{
|
||||
plugin_t *plugin;
|
||||
bool ret = 0;
|
||||
@ -1117,7 +1117,7 @@ int bx_load_plugin_np(const char *name, plugintype_t type)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int bx_unload_opt_plugin(const char *name, bx_bool devflag)
|
||||
int bx_unload_opt_plugin(const char *name, bool devflag)
|
||||
{
|
||||
int i = 0;
|
||||
while (strcmp(bx_builtin_plugins[i].name, "NULL")) {
|
||||
|
@ -298,7 +298,7 @@ typedef void (*deviceReset_t)(unsigned);
|
||||
|
||||
BOCHSAPI void pluginRegisterDeviceDevmodel(plugin_t *plugin, plugintype_t type, bx_devmodel_c *dev, const char *name);
|
||||
BOCHSAPI void pluginUnregisterDeviceDevmodel(const char *name, plugintype_t type);
|
||||
BOCHSAPI bx_bool pluginDevicePresent(const char *name);
|
||||
BOCHSAPI bool pluginDevicePresent(const char *name);
|
||||
|
||||
/* === IO port stuff === */
|
||||
BOCHSAPI extern int (*pluginRegisterIOReadHandler)(void *thisPtr, ioReadHandler_t callback,
|
||||
@ -337,7 +337,7 @@ Bit8u bx_get_plugins_count(plugintype_t type);
|
||||
const char* bx_get_plugin_name(plugintype_t type, Bit8u index);
|
||||
#endif
|
||||
bool bx_load_plugin(const char *name, plugintype_t type);
|
||||
bool bx_unload_plugin(const char *name, bx_bool devflag);
|
||||
bool bx_unload_plugin(const char *name, bool devflag);
|
||||
extern void bx_unload_plugin_type(const char *name, plugintype_t type);
|
||||
extern void bx_init_plugins(void);
|
||||
extern void bx_reset_plugins(unsigned);
|
||||
@ -350,7 +350,7 @@ extern void bx_plugins_after_restore_state(void);
|
||||
extern plugin_t bx_builtin_plugins[];
|
||||
|
||||
int bx_load_plugin_np(const char *name, plugintype_t type);
|
||||
int bx_unload_opt_plugin(const char *name, bx_bool devflag);
|
||||
int bx_unload_opt_plugin(const char *name, bool devflag);
|
||||
#endif
|
||||
|
||||
// every plugin must define this, within the extern"C" block, so that
|
||||
|
Loading…
Reference in New Issue
Block a user