more log cleanup

This commit is contained in:
Dagen Brock 2016-10-28 14:44:16 -05:00
parent 669f9c1814
commit 9d1422e6cc
6 changed files with 23 additions and 20 deletions

View File

@ -1578,7 +1578,7 @@ adb_read_c000()
/* got one */
if((g_kbd_read_no_update++ > 5) && (g_kbd_chars_buffered > 1)) {
/* read 5 times, keys pending, let's move it along */
printf("Read %02x %d times, tossing\n", g_kbd_buf[0],
gloghead(); printf("Read %02x %d times, tossing\n", g_kbd_buf[0],
g_kbd_read_no_update);
adb_access_c010();
}

View File

@ -24,6 +24,7 @@
#include "defc.h"
#include <stdarg.h>
#include "config.h"
#include "glog.h"
#include "imagewriter.h"
#if defined(__OS2__)
#include "arch\os2\src\dirport.h"
@ -136,8 +137,7 @@ int g_config_gsplus_auto_update = 1;
int g_config_gsplus_update_needed = 0;
const char *g_config_gsplus_name_list[] = {
"config.txt", "config.gsport", "gsport_conf", ".config.gsport",
".gsplus", "config.gsplus",0
"config.txt", "config.gsp",0
};
int g_highest_smartport_unit = -1;
@ -1258,7 +1258,7 @@ config_write_config_gsplus_file()
int slot, drive;
int i;
printf("Writing configuration file to %s\n", g_config_gsplus_name);
gloghead(); printf("Writing configuration file to %s\n", g_config_gsplus_name);
fconf = fopen(g_config_gsplus_name, "w+");
if(fconf == 0) {
@ -1524,22 +1524,22 @@ insert_disk(int slot, int drive, const char *name, int ejected, int force_size,
if(buf_2img[0] == '2' && buf_2img[1] == 'I' && buf_2img[2] == 'M' &&
buf_2img[3] == 'G') {
/* It's a 2IMG disk */
printf("Image named %s is in 2IMG format\n", dsk->name_ptr);
gloghead(); printf("Image named %s is in 2IMG format\n", dsk->name_ptr);
image_identified = 1;
if(buf_2img[12] == 0) {
printf("2IMG is in DOS 3.3 sector order\n");
glog("2IMG is in DOS 3.3 sector order");
dsk->image_type = DSK_TYPE_DOS33;
}
if(buf_2img[19] & 0x80) {
/* disk is locked */
printf("2IMG is write protected\n");
glog("2IMG is write protected");
dsk->write_prot = 1;
dsk->write_through_to_unix = 0;
}
if((buf_2img[17] & 1) && (dsk->image_type == DSK_TYPE_DOS33)) {
dsk->vol_num = buf_2img[16];
printf("Setting DOS 3.3 vol num to %d\n", dsk->vol_num);
gloghead(); printf("Setting DOS 3.3 vol num to %d\n", dsk->vol_num);
}
// Some 2IMG archives have the size byte reversed
size = (buf_2img[31] << 24) + (buf_2img[30] << 16) +
@ -1563,8 +1563,7 @@ insert_disk(int slot, int drive, const char *name, int ejected, int force_size,
(buf_2img[0x42] << 8) + buf_2img[0x43];
if((size >= (exp_size + 0x54)) && (tmp == exp_size)) {
/* It's diskcopy since data size field matches */
printf("Image named %s is in Mac diskcopy format\n",
dsk->name_ptr);
gloghead(); printf("Image named %s is in Mac diskcopy format\n", dsk->name_ptr);
image_identified = 1;
dsk->image_start += 0x54;
dsk->image_size = exp_size;
@ -1637,7 +1636,7 @@ insert_disk(int slot, int drive, const char *name, int ejected, int force_size,
nibs = len;
}
if(size != 35*len) {
fatal_printf("Disk 5.25 error: size is %d, not 140K. "
gloghead(); fatal_printf("Disk 5.25 error: size is %d, not 140K. "
"Will try to mount anyway\n", size, 35*len);
}
for(i = 0; i < 35; i++) {
@ -1726,7 +1725,7 @@ eject_disk(Disk *dsk)
iwm_flush_disk_to_unix(dsk);
printf("Ejecting disk: %s\n", dsk->name_ptr);
gloghead(); printf("Ejecting disk: %s\n", dsk->name_ptr);
/* Free all memory, close file */
@ -3176,7 +3175,7 @@ cfg_file_handle_key(int key)
}
break;
case 0x0d: /* return */
printf("handling return press\n");
glog("Selected disk image file");
cfg_file_selected();
break;
case 0x09: /* tab */

View File

@ -746,7 +746,7 @@ void my_exit(int ret)
end_screen();
imagewriter_close();
printer_close();
printf("exiting (ret=%d)\n",ret);
gloghead(); printf("exiting (ret=%d)\n",ret);
fatalExit(ret);
}
@ -928,7 +928,7 @@ void banner() {
printf("\x1b[31m | | | ||_____ | |_|\x1b[0m \n");
printf("\x1b[35m | |__| | _____| | \x1b[0m \n");
printf("\x1b[34m |_______||_______| \x1b[0m \n\n");
printf("\x1b[37m GSplus v0.12s \x1b[0m \n\n");
printf("\x1b[37m GSplus v%s \x1b[0m \n\n", g_gsplus_version_str);
}
int
@ -1348,12 +1348,15 @@ setup_gsplus_file(char *outname, int maxlen, int ok_if_missing,
}
/* couldn't find it, print out all the attempts */
/*
path_ptr = save_path_ptr;
gloghead(); fatal_printf("Could not find required file \"%s\" in any of these "
"directories:\n", *name_ptr);
while(*path_ptr) {
fatal_printf(" %s\n", *path_ptr++);
}
*/
gloghead(); fatal_printf("Could not find required file \"%s\"", *name_ptr);
if(can_create_file) {
// If we didn't find a file, pick a place to put it.

View File

@ -553,7 +553,7 @@ do_read_c7(int unit_num, word32 buf, int blk)
image_start = iwm.smartport[unit_num].image_start;
image_size = iwm.smartport[unit_num].image_size;
if(!file) {
glog("Trying mapped file to $C7xx, but it's null!");
glog("Trying file mapped to $C7xx, but it's null!");
#if 0
if(blk != 2 && blk != 0) {
/* don't print error if only reading directory */
@ -787,8 +787,8 @@ do_c700(word32 ret)
if(ret != 0) {
glog("Failure reading boot disk in s7d1!");
glog("- Press <F4> to enter config menu, or edit your config file");
glog("- if you intended to use slot slot 7.");
glog(" Press <F4> to enter config menu, or edit your config");
glog(" file if you intended to use slot slot 7.");
engine.kpc = 0xff59; /* Jump to monitor, fix $36-$39 */
}
}

View File

@ -199,7 +199,7 @@ child_sound_playit(word32 tmp)
int size;
size = tmp & 0xffffff;
printf("SIze: %d ",size);
if((tmp >> 24) == 0xa2) {
/* play sound here */

View File

@ -24,6 +24,7 @@
#include <time.h>
#include "defc.h"
#include "glog.h"
extern int Verbose;
@ -3012,7 +3013,7 @@ void video_release_kimages();
void
end_screen()
{
printf("In end_screen\n");
glog("Shutting down display");
// OG Free up allocated images
video_release_kimages();