dyngui shutdown tweak

git-svn-id: file:///home/jj/hercules.svn/trunk@1551 956126f8-22a0-4046-8f4a-272fa8102e63
This commit is contained in:
Fish (David B Trout)
2003-06-29 12:48:45 +00:00
parent ac0d87ca50
commit 97fbe2aff9
3 changed files with 8 additions and 11 deletions

View File

@@ -64,11 +64,11 @@ int nInputStreamFileNum = -1; // (file descriptor for stdin stream)
void Initialize ();
void ProcessingLoop ();
void Cleanup ();
void UpdateTargetCPU ();
void ReadInputData (size_t nTimeoutMillsecs);
void ProcessInputData ();
void* gui_panel_command (char* pszCommand);
void gui_panel_cleanup ();
void UpdateStatus ();
void UpdateCPUStatus ();
void UpdateRegisters ();
@@ -827,11 +827,12 @@ void Initialize ()
memset(pszCommandBuff,0,nCommandBuffSize);
nCommandLen = 0;
atexit( gui_panel_cleanup );
}
void gui_panel_cleanup()
///////////////////////////////////////////////////////////////////////////////
// (called by 'gui_panel_display' when main loop terminates...)
void Cleanup()
{
if (pszInputBuff)
free(pszInputBuff);
@@ -885,6 +886,8 @@ void gui_panel_display ()
logmsg(_("HHCHGnnnI dyngui.dll initiated\n"));
Initialize(); // (allocate buffers, etc)
ProcessingLoop(); // (primary processing loop)
logmsg(_("HHCHGnnnI dyngui.dll terminated\n"));
Cleanup(); // (de-allocate resources)
}
/*****************************************************************************\

6
hdl.c
View File

@@ -328,12 +328,6 @@ HDLPRE *preload;
hdl_cdll->name = strdup("*Hercules");
// ZZ FIXME: Win32-specific file name handling: If no file name
// extension is specified in the file name parameter, the default
// library extension ".dll" is appended. However, the file name
// string can include a trailing point character (.) to indicate
// that the module name has no extension.
if(!(hdl_cdll->dll = dlopen(NULL, RTLD_NOW )))
{
fprintf(stderr, "HHCHD003E unable to open hercules as DLL: %s\n",

View File

@@ -54,8 +54,8 @@ int quit_cmd(char* cmdline, int argc, char *argv[])
in a future version */
if (!(argc > 1 && !strcasecmp("now",argv[1])))
{
usleep(10000); /* (give time for 'quit' command to be logged) */
system_shutdown();
usleep(100000);
}
#if defined(FISH_HANG)