=================================================================== RCS file: /home/cvs/OpenXM_contrib2/windows/asir32gui/io.c,v retrieving revision 1.7 retrieving revision 1.11 diff -u -p -r1.7 -r1.11 --- OpenXM_contrib2/windows/asir32gui/io.c 2013/08/30 18:18:11 1.7 +++ OpenXM_contrib2/windows/asir32gui/io.c 2018/09/08 02:06:08 1.11 @@ -11,7 +11,7 @@ #define ASIR_KEYNAME "SoftWare\\Fujitsu\\Asir\\1999.03.31" #define MAXHIST 256 -#define HISTORY "history" +#define HISTORY "asirgui_history" static int use_current_dir; @@ -154,7 +154,9 @@ BOOL Init_IO(char *errmsg) { char notify[100],notify_ack[100],intr[100],intr_ack[100],kill[100]; char name[BUFSIZ],qname[BUFSIZ],home[BUFSIZ]; +#if _MSC_VER < 1900 _setargv(); +#endif if ( !strcmp(__argv[0],"debuggui") ) { asirgui_kind = ASIRGUI_DEBUG; hRead = atoi(__argv[1]); @@ -202,7 +204,7 @@ BOOL Init_IO(char *errmsg) { return FALSE; } sprintf(AsirExe,"%s\\bin\\engine.exe",name); -// sprintf(AsirExe,"c:\\home\\noro\\engine2000\\debug\\engine.exe"); +// sprintf(AsirExe,"d:\\cygwin\\home\\noro\\new\\OpenXM_contrib2\\windows\\engine2000\\debug\\engine.exe"); if ( !getenv("HOME") ) { sprintf(home,"HOME=%s",name); _putenv(home); @@ -302,8 +304,13 @@ static char history_errmsg[BUFSIZ]; void init_input_history() { char rootdir[BUFSIZ]; - get_rootdir(rootdir,sizeof(rootdir),history_errmsg); - sprintf(history_path,"%s\\bin\\%s",rootdir,HISTORY); + char *env = getenv("TEMP"); + if( env ) { + sprintf(history_path,"%s\\%s",env,HISTORY); + }else { + get_rootdir(rootdir,sizeof(rootdir),history_errmsg); + sprintf(history_path,"%s\\bin\\%s",rootdir,HISTORY); + } init_hist(MAXHIST); } @@ -318,7 +325,11 @@ void read_input_history() } void send_intr() { + HANDLE handle[1]; + PulseEvent(hIntr); + handle[0] = hIntr_Ack; + WaitForMultipleObjects(1,(CONST HANDLE *)handle,FALSE,(DWORD)-1); } void terminate_asir() {