From: lhall AT rfk DOT com (Larry Hall) Subject: Outstanding patches 31 Mar 1998 00:30:56 -0800 Message-ID: <3.0.5.32.19980328133626.009c9cd0.cygnus.cygwin32.developers@pop.ma.ultranet.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=====================_891128186==_" To: cygwin32-developers AT cygnus DOT com Cc: noer AT cygnus DOT com --=====================_891128186==_ Content-Type: text/plain; charset="us-ascii" I finally have things back so that I can build cygwinb19.dll again. Thanks to Mumit for his great fixes to the EGCS compiler suite and his help in getting the DLL built again! Since its been a few weeks since I've been able to build a DLL, I was a little behind on what patches were already included and what was still outstanding. Since I had to go through the process of weeding out which patches were already included and which were not, I thought others might benefit from my time spent so I've included them again here. I won't promise I didn't mislabel or omit someone's patch but I think the list is fairly complete. I've weeded out about a dozen or so patches that are now part of the latest development sources. I worked against the 980325 winsup and the 980310 newlib sources. If you have earlier versions of these sources, you may want/need additional patches. Hope this is useful for someone (other than me of course)!;-) --=====================_891128186==_ Content-Type: text/plain; charset="us-ascii" Content-Disposition: attachment; filename="select-fix.diff" Index: select.cc =================================================================== RCS file: /usr/cvsroot/cdk/winsup/select.cc,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 select.cc --- select.cc 1998/02/28 19:12:42 1.1.1.1 +++ select.cc 1998/03/27 16:00:17 @@ -600,7 +600,7 @@ static int volatile stop_pipe_thread; int number_of_read_pipes; HANDLE pipe_select; HANDLE pipe_done; -HANDLE pth = NULL; +HANDLE NO_COPY pth = NULL; DWORD pipethread (DWORD *arg) @@ -631,7 +631,7 @@ done: SOCKET sock; HANDLE start_select; HANDLE select_done; -HANDLE sth = NULL; +HANDLE NO_COPY sth = NULL; int select_ret; DWORD --=====================_891128186==_ Content-Type: text/plain; charset="us-ascii" Content-Disposition: attachment; filename="libmsigngamMakefile.diff" *** libm/math/Makefile.in Thu Mar 12 01:05:01 1998 --- libm/math/Makefile.in.~1 Thu Mar 12 01:04:53 1998 *************** obj = k_standard.o k_rem_pio2.o \ *** 95,102 **** s_log1p.o s_logb.o s_matherr.o s_modf.o s_nextafter.o \ s_rint.o s_scalbn.o s_signif.o s_sin.o \ s_tan.o s_tanh.o \ ! s_infinity.o s_isinf.o s_nan.o s_infconst.o \ ! s_signgam.o fobj = kf_rem_pio2.o \ kf_cos.o kf_sin.o kf_tan.o \ --- 95,101 ---- s_log1p.o s_logb.o s_matherr.o s_modf.o s_nextafter.o \ s_rint.o s_scalbn.o s_signif.o s_sin.o \ s_tan.o s_tanh.o \ ! s_infinity.o s_isinf.o s_nan.o s_infconst.o fobj = kf_rem_pio2.o \ kf_cos.o kf_sin.o kf_tan.o \ --=====================_891128186==_ Content-Type: text/plain; charset="us-ascii" Content-Disposition: attachment; filename="environ_cc.diff" --- environ.cc.orig Tue Mar 10 06:12:35 1998 +++ environ.cc Fri Mar 13 12:20:18 1998 @@ -209,7 +209,7 @@ parse_options (char *buf) struct { char *name; - struct + union { BOOL *b; DWORD *x; --=====================_891128186==_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="mixed-case.diff" Common subdirectories: /winsup/doc and winsup/doc diff -up /winsup/environ.cc winsup/environ.cc --- /winsup/environ.cc Tue Mar 10 07:12:35 1998 +++ winsup/environ.cc Sun Mar 15 13:35:34 1998 @@ -190,6 +190,7 @@ ucenv (char *p, char *eq) /* Parse CYGWIN32 options */ static NO_COPY BOOL export_settings =3D FALSE; +BOOL use_mixed =3D FALSE; static char * parse_options (char *buf) @@ -197,7 +198,8 @@ parse_options (char *buf) int i, istrue; char *p; static char *remember_title, *remember_strip_title_path,= *remember_tty, - *remember_binmode, *remember_strace, *remember_glob; + *remember_binmode, *remember_strace, *remember_glob, + *remember_mixed; enum settings { @@ -224,7 +226,7 @@ parse_options (char *buf) DWORD i; char *s; } values[2]; - } known[8]; + } known[9]; known[0].name =3D (char *) malloc (6 + 1); known[0].name =3D "export"; @@ -279,11 +281,18 @@ parse_options (char *buf) known[6].setting.func =3D strace_init; known[6].disposition =3D isfunc; known[6].remember =3D &remember_strace; - known[5].values[0].s =3D "0"; - known[5].values[1].s =3D "1"; + known[6].values[0].s =3D "0"; + known[6].values[1].s =3D "1"; - known[7].name =3D NULL; - known[7].setting.b =3D 0; + known[7].name =3D "mixed"; + known[7].setting.b =3D &use_mixed; + known[7].disposition =3D justset; + known[7].remember =3D &remember_mixed; + known[7].values[0].i =3D FALSE; + known[7].values[1].i =3D TRUE; + + known[8].name =3D NULL; + known[8].setting.b =3D 0; #if 0 /* FIXME: used to be statically initialized like this. This doesn't @@ -299,6 +308,7 @@ parse_options (char *buf) {"tty", {x: &myself->process_state}, setbit, &remember_tty, {0,= PID_USETTY}}, {"binmode", {i: u->fmode_ptr}, justset, &remember_binmode, {0,= O_BINARY}}, {"strace", {func: strace_init}, isfunc, &remember_strace, {s: "0", s:= "1"}}, + {"mixed", {b: &use_mixed}, justset, &remember_mixed, {FALSE, TRUE}},= {NULL, 0} }; #endif diff -up /winsup/fhandler.cc winsup/fhandler.cc --- /winsup/fhandler.cc Sun Mar 01 03:40:37 1998 +++ winsup/fhandler.cc Sun Mar 15 17:36:05 1998 @@ -382,6 +382,8 @@ fhandler_base::open (const char *path, i sa.bInheritHandle =3D TRUE; file_attributes =3D FILE_ATTRIBUTE_NORMAL; + if (use_mixed) + file_attributes |=3D FILE_FLAG_POSIX_SEMANTICS; if (flags & O_DIROPEN) file_attributes |=3D FILE_FLAG_BACKUP_SEMANTICS; @@ -1944,7 +1946,7 @@ fhandler_dev_null::fhandler_dev_null (co fhandler_base * fhandler_dev_null::open (const char *, int flags, mode_t mode) { - return fhandler_base::open ("nul", flags, mode); + return fhandler_base::open ("NUL", flags, mode); } void diff -up /winsup/misc.cc winsup/misc.cc --- /winsup/misc.cc Wed Feb 11 06:15:00 1998 +++ winsup/misc.cc Sun Mar 15 17:36:17 1998 @@ -252,6 +252,7 @@ int logout (char *line) { int success =3D 0; + int file_attributes; HANDLE ut_fd; path_conv win32_path (_PATH_UTMP); @@ -260,12 +261,15 @@ logout (char *line) return 0; } + file_attributes =3D FILE_ATTRIBUTE_NORMAL; + if (use_mixed) + file_attributes |=3D FILE_FLAG_POSIX_SEMANTICS; ut_fd =3D CreateFile (win32_path.get_win32 (), GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, + file_attributes, NULL); if (ut_fd !=3D INVALID_HANDLE_VALUE) { diff -up /winsup/ntea.cc winsup/ntea.cc --- /winsup/ntea.cc Wed Feb 11 06:15:03 1998 +++ winsup/ntea.cc Sun Mar 15 17:43:03 1998 @@ -10,11 +10,12 @@ This software is a copyrighted work lice Cygwin32 license. Please consult the file "CYGWIN32_LICENSE" for details. */ -#include +#include "winsup.h" #include #include #include + /* From Windows NT DDK: @@ -87,12 +88,17 @@ NTReadEA (const char *file, const char * int eafound =3D 0; PFILE_FULL_EA_INFORMATION ea, sea; int easize; + int file_attributes; + + file_attributes =3D FILE_ATTRIBUTE_NORMAL |= FILE_FLAG_BACKUP_SEMANTICS; + if (use_mixed) + file_attributes |=3D FILE_FLAG_POSIX_SEMANTICS; hFileSource =3D CreateFile (file, FILE_READ_EA, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, // sa OPEN_EXISTING, - FILE_FLAG_BACKUP_SEMANTICS, + file_attributes, NULL ); @@ -256,12 +262,16 @@ NTWriteEA (const char *file, const char DWORD StreamSize, easize; BOOL bSuccess=3DFALSE; PFILE_FULL_EA_INFORMATION ea; + int file_attributes; + file_attributes =3D FILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS; + if (use_mixed) + file_attributes |=3D FILE_FLAG_POSIX_SEMANTICS; hFileSource =3D CreateFile (file, FILE_WRITE_EA, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, // sa OPEN_EXISTING, - FILE_FLAG_BACKUP_SEMANTICS, + file_attributes, NULL); if (hFileSource =3D=3D INVALID_HANDLE_VALUE) @@ -373,12 +383,17 @@ usage: HANDLE hFileSource; PFILE_FULL_EA_INFORMATION ea, sea; unsigned easize; + int file_attributes; + + file_attributes =3D FILE_ATTRIBUTE_NORMAL |= FILE_FLAG_BACKUP_SEMANTICS; + if (use_mixed) + file_attributes |=3D FILE_FLAG_POSIX_SEMANTICS; hFileSource =3D CreateFile (FileSource, FILE_READ_EA, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, // sa OPEN_EXISTING, - FILE_FLAG_BACKUP_SEMANTICS, + file_attributes, NULL); if (hFileSource =3D=3D INVALID_HANDLE_VALUE) diff -up /winsup/path.cc winsup/path.cc --- /winsup/path.cc Wed Feb 11 06:15:05 1998 +++ winsup/path.cc Sun Mar 15 17:36:32 1998 @@ -1365,6 +1365,7 @@ symlink_check_one (const char *path, cha int *exec) { *syml =3D 0; + int file_attributes; DWORD fileattr =3D GetFileAttributesA (path); if (fileattr =3D=3D (DWORD) -1) @@ -1400,12 +1401,16 @@ symlink_check_one (const char *path, cha sa.lpSecurityDescriptor =3D 0; sa.bInheritHandle =3D 0; + file_attributes =3D FILE_ATTRIBUTE_NORMAL; + if (use_mixed) + file_attributes |=3D FILE_FLAG_POSIX_SEMANTICS; + HANDLE h =3D CreateFileA (path, GENERIC_READ, FILE_SHARE_READ, &sa, OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, + file_attributes, 0); int res =3D -1; diff -up /winsup/spawn.cc winsup/spawn.cc --- /winsup/spawn.cc Tue Mar 10 12:23:04 1998 +++ winsup/spawn.cc Sun Mar 15 17:36:41 1998 @@ -17,6 +17,7 @@ details. */ #include "winsup.h" #include "paths.h" + /* Add .exe to PROG if not already present and see if that exists. If not, return PROG (converted from posix to win32 rules if necessary). The result is always BUF. @@ -185,6 +186,7 @@ spawn_guts (HANDLE hToken, const char * char *copy; BOOL rc; int argc; + int file_attributes; hExeced =3D NULL; @@ -311,12 +313,16 @@ check_again: sa.lpSecurityDescriptor =3D 0; sa.bInheritHandle =3D FALSE; + file_attributes =3D FILE_ATTRIBUTE_NORMAL; + if (use_mixed) + file_attributes |=3D FILE_FLAG_POSIX_SEMANTICS; + HANDLE hnd =3D CreateFileA (real_path, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, &sa, OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, + file_attributes, 0); if (hnd =3D=3D INVALID_HANDLE_VALUE) { diff -up /winsup/syscalls.cc winsup/syscalls.cc --- /winsup/syscalls.cc Tue Mar 10 05:14:34 1998 +++ winsup/syscalls.cc Sun Mar 15 17:36:47 1998 @@ -22,6 +22,7 @@ details. */ #include "winsup.h" + /* Table to map Windows error codes to Errno values. */ /* FIXME: Doing things this way is a little slow. It's trivial to change this into a big case statement if necessary. Left as is for now. */ @@ -186,6 +187,23 @@ writable_directory (const char *file) return acc =3D=3D 0; } +static +BOOL +remove_file (char * name) +{ + if (!use_mixed) + return DeleteFileA (name); + + HANDLE h; + + h =3D CreateFileA (name, GENERIC_WRITE, host_dependent.shared,= NULL, + OPEN_EXISTING, FILE_FLAG_DELETE_ON_CLOSE |= FILE_FLAG_POSIX_SEMANTICS, + NULL); + if (h =3D=3D INVALID_HANDLE_VALUE) + return FALSE; + return CloseHandle (h); +} + extern "C" int _unlink (const char *ourname) @@ -210,7 +228,7 @@ _unlink (const char *ourname) return -1; } - if (!DeleteFileA (win32_name.get_win32 ())) + if (!remove_file (win32_name.get_win32 ())) { res =3D GetLastError (); @@ -223,7 +241,7 @@ _unlink (const char *ourname) /* chmod ourname to be writable here */ res =3D chmod (ourname, 0777); - if (DeleteFileA (win32_name.get_win32 ())) + if (remove_file (win32_name.get_win32 ())) { res =3D GetLastError (); syscall_printf ("%d =3D unlink (%s)\n", res, ourname); @@ -595,6 +613,11 @@ _link (const char *a, const char *b) char buf[MAX_PATH]; BOOL bSuccess; + int file_attributes; + + file_attributes =3D FILE_ATTRIBUTE_NORMAL; + if (use_mixed) + file_attributes |=3D FILE_FLAG_POSIX_SEMANTICS; hFileSource =3D CreateFile ( real_a.get_win32 (), @@ -602,7 +625,7 @@ _link (const char *a, const char *b) FILE_SHARE_READ | FILE_SHARE_WRITE /*| FILE_SHARE_DELETE*/, NULL, // sa OPEN_EXISTING, - 0, + file_attributes, NULL ); @@ -846,6 +869,7 @@ chown (const char * name, uid_t uid, gid SID_NAME_USE acc_type; struct passwd user, *pw_ptr; struct group group, *gr_ptr ; + int file_attributes; /* converting user and group id to names */ if ((pw_ptr =3D getpwuid (uid)) =3D=3D NULL) @@ -910,11 +934,15 @@ chown (const char * name, uid_t uid, gid return -1; } + file_attributes =3D FILE_ATTRIBUTE_NORMAL |= FILE_FLAG_BACKUP_SEMANTICS; + if (use_mixed) + file_attributes |=3D FILE_FLAG_POSIX_SEMANTICS; + /* open the file for read */ hFile =3D CreateFile (win32_path.get_win32 (), GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, =20 NULL, OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL |= FILE_FLAG_BACKUP_SEMANTICS, + file_attributes, NULL); if (hFile =3D=3D INVALID_HANDLE_VALUE) @@ -1037,7 +1065,7 @@ chown (const char * name, uid_t uid, gid FILE_SHARE_READ | FILE_SHARE_WRITE, &sa, OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL |= FILE_FLAG_BACKUP_SEMANTICS, + file_attributes, NULL); if (hFile =3D=3D INVALID_HANDLE_VALUE) Common subdirectories: /winsup/sysdef and winsup/sysdef diff -up /winsup/times.cc winsup/times.cc --- /winsup/times.cc Wed Feb 11 06:15:19 1998 +++ winsup/times.cc Sun Mar 15 17:36:53 1998 @@ -17,6 +17,7 @@ details. */ #define FACTOR (0x19db1ded53ea710LL) #define NSPERSEC 10000000LL + static void timeval_to_filetime (timeval *time, FILETIME *out); @@ -392,6 +393,8 @@ utimes (const char *path, struct timeval { int res =3D 0; struct timeval tmp[2]; + int file_attributes; + SECURITY_ATTRIBUTES sa; sa.nLength =3D sizeof (sa); sa.lpSecurityDescriptor =3D NULL; @@ -405,6 +408,10 @@ utimes (const char *path, struct timeval return -1; } + file_attributes =3D FILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS; + if (use_mixed) + file_attributes |=3D FILE_FLAG_POSIX_SEMANTICS; + /* MSDN suggests using FILE_FLAG_BACKUP_SEMANTICS for accessing the times of directories. FIXME: what about Win95??? */ HANDLE h =3D CreateFileA (win32.get_win32 (), @@ -412,7 +419,7 @@ utimes (const char *path, struct timeval FILE_SHARE_READ | FILE_SHARE_WRITE, &sa, OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS, + file_attributes, 0); if (h =3D=3D INVALID_HANDLE_VALUE) diff -up /winsup/tty.cc winsup/tty.cc --- /winsup/tty.cc Wed Mar 11 02:49:15 1998 +++ winsup/tty.cc Sat Mar 14 13:12:39 1998 @@ -1252,7 +1252,6 @@ fhandler_tty_slave::dup (fhandler_base * attach_tty (ttynum); fts->ttynum =3D ttynum; fts->set_close_on_exec (0); - fts->set_flags (0); const HANDLE proc =3D GetCurrentProcess (); HANDLE nh; diff -up /winsup/winsup.h winsup/winsup.h --- /winsup/winsup.h Mon Feb 23 09:04:56 1998 +++ winsup/winsup.h Sun Mar 15 17:37:53 1998 @@ -529,6 +529,7 @@ extern "C" int logout (char *); #define lock_pinfo_for_update(n) lpfu(__FUNCTION__, __LINE__, n) int lpfu (char *, int, DWORD timeout); #endif +extern BOOL use_mixed; /**************************** Exports ******************************/ --=====================_891128186==_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="consolecolors.diff" *** winsup/console.cc.orig Thu Feb 19 17:36:34 1998 --- winsup/console.cc Sun Mar 08 22:16:17 1998 *************** *** 455,461 **** fhandler_console::fhandler_console (const char *name) : fhandler_tty= (name) { state_ =3D normal; ! default_color =3D FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED; } /* --- 455,464 ---- fhandler_console::fhandler_console (const char *name) : fhandler_tty= (name) { state_ =3D normal; ! if (fillin_info ()) ! default_color =3D info.wAttributes; ! else ! default_color =3D FOREGROUND_BLUE | FOREGROUND_GREEN |= FOREGROUND_RED; } /* *************** *** 596,602 **** void fhandler_console::char_command (char c) { ! static int fg =3D 7, bg =3D 0, bold =3D 0; int x, y; char buf[40]; --- 599,611 ---- void fhandler_console::char_command (char c) { ! // Keep the background intensity with the colr since there doesn't= seem ! // to be a way to set this with termcap/terminfo. ! static int fg =3D default_color & (FOREGROUND_BLUE | FOREGROUND_GREEN= | ! FOREGROUND_RED), ! bg =3D default_color & (BACKGROUND_BLUE | BACKGROUND_GREEN |= ! BACKGROUND_RED |= BACKGROUND_INTENSITY), ! bold =3D default_color & FOREGROUND_INTENSITY; int x, y; char buf[40]; *************** *** 609,643 **** switch (args_[i]) { case 0: /* normal color */ ! fg =3D default_color; ! bg =3D 0; ! bold =3D 0; break; case 1: /* bold */ ! fg =3D default_color; ! bg =3D 0; bold =3D FOREGROUND_INTENSITY; break; case 4: /* underline - simulate with magenta */ fg =3D FOREGROUND_BLUE | FOREGROUND_RED; ! bold =3D FOREGROUND_INTENSITY; ! bg =3D 0; ! break; ! case 5: ! fg =3D default_color; ! bg =3D 0; ! bold =3D FOREGROUND_INTENSITY | BACKGROUND_INTENSITY; break; case 7: /* reverse */ ! fg =3D 0; ! bg =3D BACKGROUND_BLUE | BACKGROUND_GREEN |= BACKGROUND_RED; ! bold =3D 0; break; case 8: /* invisible */ ! fg =3D 0; ! bg =3D 0; ! bold =3D 0; ! break; case 30: /* BLACK foreground */ fg =3D 0; break; --- 618,677 ---- switch (args_[i]) { case 0: /* normal color */ ! fg =3D default_color & (FOREGROUND_BLUE | FOREGROUND_GREEN= | ! FOREGROUND_RED); ! bg =3D default_color & (BACKGROUND_BLUE | BACKGROUND_GREEN= | ! BACKGROUND_RED |= BACKGROUND_INTENSITY); ! bold =3D default_color & FOREGROUND_INTENSITY; break; case 1: /* bold */ ! fg =3D default_color & (FOREGROUND_BLUE | FOREGROUND_GREEN= | ! FOREGROUND_RED); ! bg =3D default_color & (BACKGROUND_BLUE | BACKGROUND_GREEN= | ! BACKGROUND_RED |= BACKGROUND_INTENSITY); bold =3D FOREGROUND_INTENSITY; break; case 4: /* underline - simulate with magenta */ fg =3D FOREGROUND_BLUE | FOREGROUND_RED; ! bg =3D default_color & (BACKGROUND_BLUE | BACKGROUND_GREEN= | ! BACKGROUND_RED |= BACKGROUND_INTENSITY); ! bold =3D default_color & FOREGROUND_INTENSITY; ! break; ! case 5: /* blink mode */ ! fg =3D default_color & (FOREGROUND_BLUE | FOREGROUND_GREEN= | ! FOREGROUND_RED); ! bg =3D default_color & (BACKGROUND_BLUE | BACKGROUND_GREEN= | ! BACKGROUND_RED |= BACKGROUND_INTENSITY); ! bold =3D default_color & FOREGROUND_INTENSITY; break; case 7: /* reverse */ ! fg =3D (default_color & BACKGROUND_BLUE) ? FOREGROUND_BLUE= : 0; ! fg |=3D (default_color & BACKGROUND_GREEN) ?= FOREGROUND_GREEN : 0; ! fg |=3D (default_color & BACKGROUND_RED) ? FOREGROUND_RED := 0; ! fg |=3D (default_color & BACKGROUND_INTENSITY) ? ! FOREGROUND_INTENSITY : 0; ! bg =3D (default_color & FOREGROUND_BLUE) ? BACKGROUND_BLUE= : 0; ! bg |=3D (default_color & FOREGROUND_GREEN) ?= BACKGROUND_GREEN : 0; ! bg |=3D (default_color & FOREGROUND_RED) ? BACKGROUND_RED := 0; ! bg |=3D (default_color & FOREGROUND_INTENSITY) ? ! BACKGROUND_INTENSITY : 0; break; case 8: /* invisible */ ! fg =3D (default_color & BACKGROUND_BLUE) ? FOREGROUND_BLUE= : 0; ! fg |=3D (default_color & BACKGROUND_GREEN) ?= FOREGROUND_GREEN : 0; ! fg |=3D (default_color & BACKGROUND_RED) ? FOREGROUND_RED := 0; ! bg =3D default_color & (BACKGROUND_BLUE | BACKGROUND_GREEN= | ! BACKGROUND_RED |= BACKGROUND_INTENSITY); ! bold =3D (default_color & BACKGROUND_INTENSITY) ? ! FOREGROUND_INTENSITY : 0; ! break; ! case 9: /* dim */ ! fg =3D default_color & (FOREGROUND_BLUE | FOREGROUND_GREEN | ! FOREGROUND_RED); ! bg =3D default_color & (BACKGROUND_BLUE | BACKGROUND_GREEN= | ! BACKGROUND_RED |= BACKGROUND_INTENSITY); ! bold =3D (fg =3D=3D 0) ? FOREGROUND_INTENSITY : 0; ! break; case 30: /* BLACK foreground */ fg =3D 0; break; *************** *** 687,695 **** bg =3D BACKGROUND_BLUE | BACKGROUND_GREEN |= BACKGROUND_RED; break; default: ! fg =3D default_color; ! bg =3D 0; ! bold =3D 0; break; } SetConsoleTextAttribute (get_output_handle (), fg | bg |= bold); --- 721,731 ---- bg =3D BACKGROUND_BLUE | BACKGROUND_GREEN |= BACKGROUND_RED; break; default: ! fg =3D default_color & (FOREGROUND_BLUE | FOREGROUND_GREEN= | ! FOREGROUND_RED); ! bg =3D default_color & (BACKGROUND_BLUE | BACKGROUND_GREEN= | ! BACKGROUND_RED |= BACKGROUND_INTENSITY); ! bold =3D default_color & FOREGROUND_INTENSITY; break; } SetConsoleTextAttribute (get_output_handle (), fg | bg | bold); --=====================_891128186==_ Content-Type: text/plain; charset="us-ascii" Larry Hall lhall AT rfk DOT com RFK Partners, Inc. (781) 239-1053 8 Grove Street (781) 239-1655 - FAX Wellesley, MA 02181 http://www.rfk.com --=====================_891128186==_--