path: root/compat/winansi.c
AgeCommit message (Collapse)Author
2009-09-19Make usage of windows.h lean and meanMarius Storm-Olsen
Centralize the include of windows.h in git-compat-util.h, turn on WIN32_LEAN_AND_MEAN to avoid including plenty of other header files which is not needed in Git. Also ensure we load winsock2.h first, so we don't load the older winsock definitions at a later stage, since they contain duplicate definitions. When moving windows.h into git-compat-util.h, we need to protect the definition of struct pollfd in mingw.h, since this file is used by both MinGW and MSVC, and the latter defines this struct in winsock2.h. We need to keep the windows.h include in compat/win32.h, since its shared by both MinGW and Cygwin, and we're not touching Cygwin in this commit. The include in git-compat-util.h is protected with an ifdef WIN32, which is not the case when compiling for Cygwin. Signed-off-by: Marius Storm-Olsen <> Acked-by: Johannes Sixt <> Signed-off-by: Junio C Hamano <>
2009-06-01Work around a regression in Windows 7, causing erase_in_line() to crash ↵Johannes Schindelin
sometimes The function FillConsoleOutputCharacterA() was pretty content in XP to take a NULL pointer if we did not want to store the number of written columns. In Windows 7, it crashes, but only when called from within Git Bash, not from within cmd.exe. Go figure. Signed-off-by: Johannes Schindelin <> Signed-off-by: Steffen Prohaska <> Signed-off-by: Junio C Hamano <>
2009-03-11winansi: support ESC [ K (erase in line)Johannes Schindelin
Signed-off-by: Johannes Schindelin <> Signed-off-by: Johannes Sixt <> Signed-off-by: Junio C Hamano <>
2008-07-19Add ANSI control code emulation for the Windows consolePeter Harris
This adds only the minimum necessary to keep git pull/merge's diffstat from wrapping. Notably absent is support for the K (erase) operation, and support for POSIX write. Signed-off-by: Peter Harris <> Signed-off-by: Johannes Sixt <> Signed-off-by: Junio C Hamano <>