At 11:00 AM 1/8/2002, Greg Fenton wrote: >I recently upgraded BASH (don't know the previous version I had...). > >Now when I run some programs, BASH misbehaves. > >In particular, I have two programs which stand out: > >Using the command-line P4 to submit, P4 calls vim to edit my >submission entry. Prior to the upgrade, everything worked flawlessly. >Now, when in VIM, the console is all messed up. VIM does not >appear in Command Mode at all. I start off in what appears to >be Insert Mode, but hitting ESC does not take me into Command Mode. > >At first I thought that it might be VIM, but switching my P4EDITOR >value to another VI (Watcom VI), I get the exact same (bad) behaviour. > >A second program is one I wrote myself. I have code which clears >the console (works fine on the W2K "command prompt" consoles), and >it used to work fine in bash. Since the upgrade, bash now seems >to have some type of buffering problem. The screen clears, but >calls to printf(), fflush(stdout) and getch() get all confused. >Again, the program works fine in the W2K command shell. > >The code I use to clear the screen is below. I need to use code >which will work in the NT command shell as well as Cygwin's. > >---- >void ConsoleClear( void ) >{ > HANDLE handle; > CONSOLE_SCREEN_BUFFER_INFO info; > COORD coord; > DWORD dwTemp; > > SECURITY_ATTRIBUTES attr; > attr.nLength = sizeof( attr ); > attr.lpSecurityDescriptor = NULL; > attr.bInheritHandle = TRUE; > > coord.X = 0; > coord.Y = 0; > > handle = CreateFile( TEXT("CONOUT$"), > GENERIC_READ|GENERIC_WRITE, > FILE_SHARE_READ|FILE_SHARE_WRITE, > &attr, > OPEN_EXISTING, > (DWORD)0, > (HANDLE)0 ); > > if( handle != INVALID_HANDLE_VALUE ) > { > if( GetConsoleScreenBufferInfo( handle, &info ) ) > { > // Fill the console with the space character starting from >0,0 > FillConsoleOutputCharacter( handle, (TCHAR)' ', > info.dwSize.X * info.dwSize.Y, > coord, &dwTemp ); > // Put the cursor back the 0,0 position > SetConsoleCursorPosition( handle, coord ); > } > > CloseHandle( handle ); > } >} > >---- > >Suggestions as to what might be causing this?
Sounds like something or someone reset your TERM variable. Larry Hall [EMAIL PROTECTED] RFK Partners, Inc. http://www.rfk.com 838 Washington Street (508) 893-9779 - RFK Office Holliston, MA 01746 (508) 893-9889 - FAX -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/