- some more keys supported by user shortcut feature with new-style syntax

- usage of old-style syntax for 'user_shortcut' now causes a warning
- deprecated options 'pit' and 'time0' now cause an error
- old disk options completely removed from bochsrc parser
- documentation changes: 'pit' and 'time0' removed, 'user_shortcut' updated
This commit is contained in:
Volker Ruppert 2005-10-10 19:32:53 +00:00
parent da60d13325
commit 847f1d293e
5 changed files with 60 additions and 166 deletions

View File

@ -640,10 +640,12 @@ keyboard_mapping: enabled=0, map=
# This defines the keyboard shortcut to be sent when you press the "user"
# button in the headerbar. The shortcut string is a combination of maximum
# 3 key names (listed below) separated with a '-' character. The old-style
# syntax (without the '-') is still supported for a few key combinations.
# Valid key names: "f1", ... "f12", "alt", "bksp", "ctrl", "del", "down",
# "enter", "esc", "left", "menu", "minus", "plus", "right", "space", "tab",
# "up", and "win".
# syntax (without the '-') still works for the key combinations supported
# in Bochs 2.2.1.
# Valid key names:
# "alt", "bksp", "ctrl", "del", "down", "end", "enter", "esc", "f1", ... "f12",
# "home", "ins", "left", "menu", "minus", "pgdwn", "pgup", "plus", "right",
# "shift", "space", "tab", "up", and "win".
#
# Example:
# user_shortcut: keys=ctrl-alt-del
@ -716,44 +718,3 @@ keyboard_mapping: enabled=0, map=
# romimage: file=:bios:BIOS-bochs-latest, address=0xf0000
# floppya: 1_44=[fd:], status=inserted
#=======================================================================
#=======================================================================
#
# The following directives are DEPRECATED
# Please convert them to the new syntax or remove them
#
#=======================================================================
#=======================================================================
#
# The TIME0 directive is DEPRECATED. Use the CLOCK directive instead
#
# TIME0:
# Specifies the start (boot) time of the virtual machine. Use a time
# value as returned by the time(2) system call. If no time0 value is
# set or if time0 equal to 1 (special case), the simulation will be
# started at the current time of the host.
#
# Examples:
# time0: 1 # Now
# time0: 315529200 # Tue Jan 1 00:00:00 1980
# time0: 631148400 # Mon Jan 1 00:00:00 1990
# time0: 938581955 # Wed Sep 29 07:12:35 1999
# time0: 946681200 # Sat Jan 1 00:00:00 2000
#=======================================================================
#time0: 938581955
#=======================================================================
#
# The PIT directive is DEPRECATED. Use the CLOCK directive instead
#
# PIT:
# The PIT is the programmable interval timer. It has an option that tries to
# keep the PIT in sync with real time. This feature is still experimental,
# but it may be useful if you want to prevent Bochs from running too fast, for
# example a DOS video game. Be aware that with the realtime pit option, your
# simulation will not be repeatable; this can a problem if you are debugging.
#=======================================================================
#pit: realtime=1

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: config.cc,v 1.47 2005-10-02 10:16:53 vruppert Exp $
// $Id: config.cc,v 1.48 2005-10-10 19:32:53 vruppert Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002 MandrakeSoft S.A.
@ -3159,75 +3159,52 @@ parse_line_formatted(char *context, int num_params, char *params[])
}
}
}
else if (!strcmp(params[0], "user_shortcut")) {
else if (!strcmp(params[0], "user_shortcut"))
{
if (num_params != 2) {
PARSE_ERR(("%s: user_shortcut directive: wrong # args.", context));
}
}
if(!strncmp(params[1], "keys=", 4)) {
bx_options.Ouser_shortcut->set (strdup(&params[1][5]));
}
if (strchr(&params[1][5], '-') == NULL)
PARSE_WARN(("user_shortcut: old-style syntax detected"));
} else {
PARSE_ERR(("%s: user_shortcut directive malformed.", context));
}
else if (!strcmp(params[0], "config_interface")) {
}
else if (!strcmp(params[0], "config_interface"))
{
if (num_params != 2) {
PARSE_ERR(("%s: config_interface directive: wrong # args.", context));
}
}
if (!bx_options.Osel_config->set_by_name (params[1]))
PARSE_ERR(("%s: config_interface '%s' not available", context, params[1]));
}
}
else if (!strcmp(params[0], "display_library")) {
if ((num_params < 2) || (num_params > 3)) {
PARSE_ERR(("%s: display_library directive: wrong # args.", context));
}
}
if (!bx_options.Osel_displaylib->set_by_name (params[1]))
PARSE_ERR(("%s: display library '%s' not available", context, params[1]));
if (num_params == 3) {
if (!strncmp(params[2], "options=", 8)) {
bx_options.Odisplaylib_options->set (strdup(&params[2][8]));
}
}
}
}
// Old timing options have been replaced by the 'clock' option
else if (!strcmp(params[0], "pit")) { // Deprecated
if (num_params != 2) {
PARSE_ERR(("%s: pit directive: wrong # args.", context));
}
BX_INFO(("WARNING: pit directive is deprecated, use clock: instead"));
if (!strncmp(params[1], "realtime=", 9)) {
switch (params[1][9]) {
case '0':
BX_INFO(("WARNING: not disabling realtime pit"));
break;
case '1': bx_options.clock.Osync->set (BX_CLOCK_SYNC_REALTIME); break;
default: PARSE_ERR(("%s: pit expected realtime=[0|1] arg", context));
}
}
else PARSE_ERR(("%s: pit expected realtime=[0|1] arg", context));
}
else if (!strcmp(params[0], "time0")) { // Deprectated
BX_INFO(("WARNING: time0 directive is deprecated, use clock: instead"));
if (num_params != 2) {
PARSE_ERR(("%s: time0 directive: wrong # args.", context));
}
bx_options.clock.Otime0->set (atoi(params[1]));
}
// Old disk options are no longer supported
else if (!strcmp(params[0], "diskc")) { // DEPRECATED
PARSE_ERR(("diskc directive is deprecated, use ata0-master: instead"));
}
else if (!strcmp(params[0], "diskd")) { // DEPRECATED
PARSE_ERR(("diskd directive is deprecated, use ata0-slave: instead"));
}
else if (!strcmp(params[0], "cdromd")) { // DEPRECATED
PARSE_ERR(("cdromd directive is deprecated, use ata0-slave: instead"));
}
else if (!strcmp(params[0], "newharddrivesupport")) { // DEPRECATED
PARSE_ERR(("newharddrivesupport directive is deprecated and should be removed."));
}
else {
else if (!strcmp(params[0], "pit")) // Deprecated
{
PARSE_ERR(("WARNING: pit directive is deprecated, use clock: instead"));
}
else if (!strcmp(params[0], "time0")) // Deprectated
{
PARSE_ERR(("WARNING: time0 directive is deprecated, use clock: instead"));
}
else
{
PARSE_ERR(( "%s: directive '%s' not understood", context, params[0]));
}
}
return 0;
}

View File

@ -1,7 +1,7 @@
<!--
================================================================
doc/docbook/user/user.dbk
$Id: user.dbk,v 1.183 2005-10-08 11:41:18 vruppert Exp $
$Id: user.dbk,v 1.184 2005-10-10 19:32:53 vruppert Exp $
This is the top level file for the Bochs Users Manual.
================================================================
@ -4101,10 +4101,16 @@ Examples:
This defines the keyboard shortcut to be sent when you press the "user" button
in the <link linkend="headerbar">headerbar</link>. The shortcut string is a
combination of maximum 3 key names (listed below) separated with a '-' character.
The old-style syntax (without the '-') is still supported for a few key combinations.
Valid key names: "f1", ... "f12", "alt", "bksp", "ctrl", "del", "down",
"enter", "esc", "left", "menu", "minus", "plus", "right", "space", "tab",
"up", and "win".
The old-style syntax (without the '-') still works for the key combinations
supported in Bochs 2.2.1.
</para>
<para>
Valid key names:
</para>
<para>
"alt", "bksp", "ctrl", "del", "down", "end", "enter", "esc", "f1", ... "f12",
"home", "ins", "left", "menu", "minus", "pgdwn", "pgup", "plus", "right",
"shift", "space", "tab", "up", and "win".
</para>
</section>
@ -4122,41 +4128,6 @@ the image is the source for the initial time.
</para>
</section>
<section><title>pit</title>
<para>
The pit option is deprecated. Use the <link linkend="bochsopt-clock">clock option</link> instead.
</para>
<para>
Examples:
<screen>
pit: realtime=0
pit: realtime=1
</screen>
The PIT is the programmable interval timer. Bochs' PIT model was written by
Greg Alexander. It has a real-time option that tries to keep the PIT in sync
with the host time. This feature is still experimental, but it may be useful
if you want to prevent Bochs from running too fast, for example a DOS video
game. Be aware that with the realtime pit option, your simulation will not be
repeatable; this can a problem if you are debugging.
</para>
</section>
<section id="bochsopt-time0"><title>time0</title>
<para>
The time0 option is deprecated. Use the <link linkend="bochsopt-clock">clock option</link> instead.
</para>
<para>
Example:
<screen>
time0: 938581955
</screen>
Specifies the start (boot) time of the virtual machine. Use a
time value as returned by the time(2) system call. Time
equal to 1 is a special case which starts the virtual machine at the
current time of the simulator host.
</para>
</section>
</section> <!--end of bochsrc section-->
<section id="sb16-emulation"> <!-- start of SB16 section-->

View File

@ -1,5 +1,5 @@
.\Document Author: Timothy R. Butler - tbutler@uninetsolutions.com
.TH bochsrc 5 "8 Oct 2005" "bochsrc" "The Bochs Project"
.TH bochsrc 5 "10 Oct 2005" "bochsrc" "The Bochs Project"
.\"SKIP_SECTION"
.SH NAME
bochsrc \- Configuration file for Bochs.
@ -730,10 +730,14 @@ Example:
This defines the keyboard shortcut to be sent when you press the "user"
button in the headerbar. The shortcut string is a combination of maximum
3 key names (listed below) separated with a '-' character. The old-style
syntax (without the '-') is still supported for a few key combinations.
Valid key names: "f1", ... "f12", "alt", "bksp", "ctrl", "del", "down",
"enter", "esc", "left", "menu", "minus", "plus", "right", "space", "tab",
"up", and "win".
syntax (without the '-') still works for the key combinations supported
in Bochs 2.2.1.
Valid key names:
"alt", "bksp", "ctrl", "del", "down", "end", "enter", "esc", "f1", ... "f12",
"home", "ins", "left", "menu", "minus", "pgdwn", "pgup", "plus", "right",
"shift", "space", "tab", "up", and "win".
Example:
user_shortcut: keys=ctrl-alt-del
@ -759,31 +763,6 @@ have a 3-button USB mouse.
Example:
usb1: enabled=1, port1=mouse, port2=keypad
.TP
.I "pit:"
The \fBpit\fR option is deprecated. Use the \fBclock\fR option instead.
The PIT is the programmable interval timer. It has an option that tries to
keep the PIT in sync with real time. This feature is still experimental,
but it may be useful if you want to prevent Bochs from running too fast, for
example a DOS video game. Be aware that with the realtime pit option, your
simulation will not be repeatable; this can a problem if you are debugging.
Example:
pit: realtime=1
.TP
.I "time0:"
The \fBtime0\fR option is deprecated. Use the \fBclock\fR option instead.
Specifies the start (boot) time of the virtual machine. Use a
time value as returned by the time(2) system call. Time
equal to 1 is a special case which starts the virtual machine at the
current time of the simulator host.
Example:
time0: 938581955
.\"SKIP_SECTION"
.SH LICENSE
This program is distributed under the terms of the GNU

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: gui.cc,v 1.81 2005-10-08 11:41:18 vruppert Exp $
// $Id: gui.cc,v 1.82 2005-10-10 19:32:53 vruppert Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002 MandrakeSoft S.A.
@ -49,7 +49,7 @@ bx_gui_c *bx_gui = NULL;
#define LOG_THIS BX_GUI_THIS
#define BX_KEY_UNKNOWN 0x7fffffff
#define N_USER_KEYS 28
#define N_USER_KEYS 34
typedef struct {
char *key;
@ -75,13 +75,19 @@ static user_key_t user_keys[N_USER_KEYS] =
"ctrl", BX_KEY_CTRL_L,
"del", BX_KEY_DELETE,
"down", BX_KEY_DOWN,
"end", BX_KEY_END,
"enter", BX_KEY_ENTER,
"esc", BX_KEY_ESC,
"home", BX_KEY_HOME,
"ins", BX_KEY_INSERT,
"left", BX_KEY_LEFT,
"menu", BX_KEY_MENU,
"minus", BX_KEY_MINUS,
"pgdwn", BX_KEY_PAGE_DOWN,
"pgup", BX_KEY_PAGE_UP,
"plus", BX_KEY_KP_ADD,
"right", BX_KEY_RIGHT,
"shift", BX_KEY_SHIFT_L,
"space", BX_KEY_SPACE,
"tab", BX_KEY_TAB,
"up", BX_KEY_UP,