now using new bx_param_string_c method sprint() in enhanced debugger
skip special value "none" in display library options
This commit is contained in:
parent
b6f9c738fd
commit
0fbd1b3eff
@ -8,6 +8,7 @@
|
||||
//
|
||||
// Modified by Bruce Ewing
|
||||
//
|
||||
// Copyright (C) 2008-2013 The Bochs Project
|
||||
|
||||
#include "config.h"
|
||||
|
||||
@ -2338,7 +2339,8 @@ void MakeBL(TreeParent *h_P, bx_param_c *p)
|
||||
TreeParent h_new;
|
||||
bx_list_c *as_list = NULL;
|
||||
int n = 0;
|
||||
strcpy (tmpcb, p->get_name());
|
||||
char tmpstr[BX_PATHNAME_LEN];
|
||||
strcpy(tmpcb, p->get_name());
|
||||
int j = strlen (tmpcb);
|
||||
switch (p->get_type())
|
||||
{
|
||||
@ -2359,24 +2361,8 @@ void MakeBL(TreeParent *h_P, bx_param_c *p)
|
||||
sprintf (tmpcb + j,": %s",((bx_param_enum_c*)p)->get_selected());
|
||||
break;
|
||||
case BXT_PARAM_STRING:
|
||||
if (((bx_param_string_c*)p)->get_options() & bx_param_string_c::RAW_BYTES)
|
||||
{
|
||||
char *cp = tmpcb + j;
|
||||
unsigned char *rp = (unsigned char *)((bx_param_string_c*)p)->getptr();
|
||||
char sc = ((bx_param_string_c*)p)->get_separator();
|
||||
int k = ((bx_param_string_c*)p)->get_maxsize();
|
||||
*(cp++) = ':';
|
||||
*(cp++) = ' ';
|
||||
while (k-- > 0)
|
||||
{
|
||||
*(cp++) = AsciiHex[2* *rp];
|
||||
*(cp++) = AsciiHex[2* *rp + 1];
|
||||
*(cp++) = sc;
|
||||
}
|
||||
*--cp = 0; // overwrite the last separator char
|
||||
}
|
||||
else
|
||||
sprintf (tmpcb + j,": %s",((bx_param_string_c*)p)->getptr());
|
||||
((bx_param_string_c*)p)->sprint(tmpstr, BX_PATHNAME_LEN, 0);
|
||||
sprintf(tmpcb + j,": %s", tmpstr);
|
||||
break;
|
||||
case BXT_PARAM_DATA:
|
||||
sprintf (tmpcb + j,": binary data, size=%d",((bx_shadow_data_c*)p)->get_size());
|
||||
|
@ -8,6 +8,7 @@
|
||||
//
|
||||
// Modified by Bruce Ewing
|
||||
//
|
||||
// Copyright (C) 2008-2013 The Bochs Project
|
||||
|
||||
#include "config.h"
|
||||
|
||||
@ -1826,7 +1827,8 @@ void MakeBL(HTREEITEM *h_P, bx_param_c *p)
|
||||
HTREEITEM h_new;
|
||||
bx_list_c *as_list = NULL;
|
||||
int i = 0;
|
||||
strcpy (tmpcb, p->get_name());
|
||||
char tmpstr[BX_PATHNAME_LEN];
|
||||
strcpy(tmpcb, p->get_name());
|
||||
int j = strlen (tmpcb);
|
||||
switch (p->get_type())
|
||||
{
|
||||
@ -1847,24 +1849,8 @@ void MakeBL(HTREEITEM *h_P, bx_param_c *p)
|
||||
sprintf (tmpcb + j,": %s",((bx_param_enum_c*)p)->get_selected());
|
||||
break;
|
||||
case BXT_PARAM_STRING:
|
||||
if (((bx_param_string_c*)p)->get_options() & bx_param_string_c::RAW_BYTES)
|
||||
{
|
||||
char *cp = tmpcb + j;
|
||||
unsigned char *rp = (unsigned char *)((bx_param_string_c*)p)->getptr();
|
||||
char sc = ((bx_param_string_c*)p)->get_separator();
|
||||
int k = ((bx_param_string_c*)p)->get_maxsize();
|
||||
*(cp++) = ':';
|
||||
*(cp++) = ' ';
|
||||
while (k-- > 0)
|
||||
{
|
||||
*(cp++) = AsciiHex[2* *rp];
|
||||
*(cp++) = AsciiHex[2* *rp + 1];
|
||||
*(cp++) = sc;
|
||||
}
|
||||
*--cp = 0; // overwrite the last separator char
|
||||
}
|
||||
else
|
||||
sprintf (tmpcb + j,": %s",((bx_param_string_c*)p)->getptr());
|
||||
((bx_param_string_c*)p)->sprint(tmpstr, BX_PATHNAME_LEN, 0);
|
||||
sprintf(tmpcb + j,": %s", tmpstr);
|
||||
break;
|
||||
case BXT_PARAM_DATA:
|
||||
sprintf (tmpcb + j,": binary data, size=%d",((bx_shadow_data_c*)p)->get_size());
|
||||
|
@ -2,7 +2,7 @@
|
||||
// $Id$
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001-2012 The Bochs Project
|
||||
// Copyright (C) 2001-2013 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
|
||||
@ -195,9 +195,9 @@ void bx_vgacore_c::init_gui(void)
|
||||
len = strlen(SIM->get_param_string(BXPN_DISPLAYLIB_OPTIONS)->getptr());
|
||||
if (len > 0) {
|
||||
char *options = new char[len + 1];
|
||||
strcpy(options, SIM->get_param_string(BXPN_DISPLAYLIB_OPTIONS)->getptr());
|
||||
SIM->get_param_string(BXPN_DISPLAYLIB_OPTIONS)->get(options, len + 1);
|
||||
ptr = strtok(options, ",");
|
||||
while (ptr) {
|
||||
while (ptr && strcmp(ptr, "none")) {
|
||||
string_i = 0;
|
||||
for (i=0; i<strlen(ptr); i++) {
|
||||
if (!isspace(ptr[i])) string[string_i++] = ptr[i];
|
||||
|
Loading…
Reference in New Issue
Block a user