Fix whitespace.

This commit is contained in:
Stephen McKinney
2020-11-18 21:10:33 -06:00
parent d91056586e
commit 617b44d54f
4 changed files with 634 additions and 650 deletions

View File

@@ -450,15 +450,13 @@ hdd_image_load(int id)
hdd_images[id].file = NULL;
wcstombs(fn_multibyte_buf, fn, sizeof fn_multibyte_buf);
hdd_images[id].vhd = mvhd_open(fn_multibyte_buf, (bool)0, &vhd_error);
if (hdd_images[id].vhd == NULL)
{
if (hdd_images[id].vhd == NULL) {
if (vhd_error == MVHD_ERR_FILE)
fatal("hdd_image_load(): VHD: Error opening VHD file '%s': %s\n", fn_multibyte_buf, strerror(mvhd_errno));
else
fatal("hdd_image_load(): VHD: Error opening VHD file '%s': %s\n", fn_multibyte_buf, mvhd_strerr(vhd_error));
}
else if (vhd_error == MVHD_ERR_TIMESTAMP)
{
else if (vhd_error == MVHD_ERR_TIMESTAMP) {
fatal("hdd_image_load(): VHD: Parent/child timestamp mismatch for VHD file '%s'\n", fn_multibyte_buf);
}

View File

@@ -2479,14 +2479,11 @@ static MVHDGeom create_drive_vhd_fixed(char* filename, int cyl, int heads, int s
int vhd_error = 0;
MVHDMeta *vhd = mvhd_create_fixed(filename, vhd_geometry, &vhd_error, vhd_progress_callback);
if (vhd == NULL)
{
if (vhd == NULL) {
_86box_geometry.cyl = 0;
_86box_geometry.heads = 0;
_86box_geometry.spt = 0;
}
else
{
} else {
mvhd_close(vhd);
}
@@ -2507,14 +2504,11 @@ static MVHDGeom create_drive_vhd_dynamic(char* filename, int cyl, int heads, int
options.type = MVHD_TYPE_DYNAMIC;
MVHDMeta *vhd = mvhd_create_ex(options, &vhd_error);
if (vhd == NULL)
{
if (vhd == NULL) {
_86box_geometry.cyl = 0;
_86box_geometry.heads = 0;
_86box_geometry.spt = 0;
}
else
{
} else {
mvhd_close(vhd);
}
@@ -2532,18 +2526,14 @@ static MVHDGeom create_drive_vhd_diff(char* filename, char* parent_filename, int
MVHDMeta *vhd = mvhd_create_ex(options, &vhd_error);
MVHDGeom vhd_geometry;
if (vhd == NULL)
{
if (vhd == NULL) {
vhd_geometry.cyl = 0;
vhd_geometry.heads = 0;
vhd_geometry.spt = 0;
}
else
{
} else {
vhd_geometry = mvhd_get_geometry(vhd);
if (vhd_geometry.spt > 63)
{
if (vhd_geometry.spt > 63) {
vhd_geometry.cyl = mvhd_calc_size_sectors(&vhd_geometry) / (16 * 63);
vhd_geometry.heads = 16;
vhd_geometry.spt = 63;
@@ -2905,8 +2895,7 @@ hdd_add_file_open_error:
"Do you wish to fix this error after a file copy or DiskPart creation?";
if (settings_msgbox_ex(MBX_QUESTION_YN, L"VHD Timestamp Mismatch", ts_warning, NULL, NULL, NULL) != 0) {
int ts_res = mvhd_diff_update_par_timestamp(vhd, &vhd_error);
if (ts_res != 0)
{
if (ts_res != 0) {
settings_msgbox_header(MBX_ERROR, L"Error", L"Could not fix VHD timestamp.");
mvhd_close(vhd);
return TRUE;
@@ -3263,13 +3252,10 @@ hdd_add_file_open_error:
}
no_update = 0;
if (img_format == 4 || img_format == 5) /* For dynamic and diff VHDs, show the block size dropdown. */
{
if (img_format == 4 || img_format == 5) { /* For dynamic and diff VHDs, show the block size dropdown. */
settings_show_window(hdlg, IDC_COMBO_HD_BLOCK_SIZE, TRUE);
settings_show_window(hdlg, IDT_1775, TRUE);
}
else /* Hide it otherwise. */
{
} else { /* Hide it otherwise. */
settings_show_window(hdlg, IDC_COMBO_HD_BLOCK_SIZE, FALSE);
settings_show_window(hdlg, IDT_1775, FALSE);
}