=================================================================== RCS file: /home/cvs/OpenXM_contrib2/windows/asir32gui/asir32guiview.cpp,v retrieving revision 1.17 retrieving revision 1.20 diff -u -p -r1.17 -r1.20 --- OpenXM_contrib2/windows/asir32gui/asir32guiview.cpp 2007/02/13 09:20:44 1.17 +++ OpenXM_contrib2/windows/asir32gui/asir32guiview.cpp 2009/03/03 13:34:42 1.20 @@ -17,7 +17,7 @@ static char THIS_FILE[] = __FILE__; #endif // const TextBufferSize = 32768; -const TextBufferSize = 16384; +const int TextBufferSize = 16384; CAsir32guiView *theView; @@ -93,7 +93,6 @@ CAsir32guiView::CAsir32guiView() { // TODO: この場所に構築用のコードを追加してください。 static int tmpView_created = 0; - char errmsg[BUFSIZ],view_handle[BUFSIZ]; init_input_history(); read_input_history(); @@ -242,7 +241,7 @@ void CAsir32guiView::DeleteTop() const char *p,*q; const char *buf; char null = 0; - int len,len0,len1; + int len,len0; buf = LockBuffer(); len0 = len = strlen(buf); @@ -480,10 +479,11 @@ void CAsir32guiView::OnFileOpen() if ( *p == '\\' ) *p = '/'; put_line(cmd); - p = strrchr(pathName,'\\'); + strcpy(cmd,pathName); + p = strrchr(cmd,'\\'); if ( p ) { *p = 0; - strcpy(prevdir,pathName); + strcpy(prevdir,cmd); } } } @@ -726,18 +726,20 @@ BOOL CAsir32guiView::Create(LPCTSTR lpszClassName, LPC FILE *fp = fopen("asirgui.hnd","w"); char *temp; - fprintf(fp,"%d",(unsigned int)theView->m_hWnd); - fclose(fp); - if ( temp = getenv("TEMP") ) { - int len; - char *name; - - len = strlen(temp); - name = (char *)malloc(len+BUFSIZ); - sprintf(name,"%s\\asirgui.hnd",temp); - fopen(name,"w"); + if ( fp ) { fprintf(fp,"%d",(unsigned int)theView->m_hWnd); fclose(fp); + if ( temp = getenv("TEMP") ) { + int len; + char *name; + + len = strlen(temp); + name = (char *)malloc(len+BUFSIZ); + sprintf(name,"%s\\asirgui.hnd",temp); + fopen(name,"w"); + fprintf(fp,"%d",(unsigned int)theView->m_hWnd); + fclose(fp); + } } return ret; }