Re: [Patch] cygcheck: Make keyeprint more versatile.
Op Wed, 10 Nov 2004 20:57:36 -0500 schreef Christopher Faylor in <[EMAIL PROTECTED]>: : On Thu, Nov 11, 2004 at 02:49:35AM +0100, Bas van Gompel wrote: : > Op Wed, 10 Nov 2004 19:35:51 -0500 schreef Christopher Faylor : >> Have I mentioned that I don't like the name 'keyeprint'? It seems like : >> an odd name to me. : > : > Well, why don't you change it to something sensible, then? : > May I suggest: : > : > sed -i -e 's/keyeprint/display_error/' src/winsup/utils/cygcheck.cc : : I've renamed this to display_error, as per your suggestion, and added : an abbreviated ChangeLog, giving you the credit. : : Thanks. T/U/VM. L8r, -- ) | | ---/ ---/ Yes, this | This message consists of true | I do not -- | | // really is | and false bits entirely.| mail for ) | | //a 72 by 4 +---+ any1 but -- \--| /--- /--- .sigfile. | |perl -pe "s.u(z)\1.as."| me. 4^re
Re: [Patch] cygcheck: Make keyeprint more versatile.
On Thu, Nov 11, 2004 at 02:49:35AM +0100, Bas van Gompel wrote: >Op Wed, 10 Nov 2004 19:35:51 -0500 schreef Christopher Faylor >>Have I mentioned that I don't like the name 'keyeprint'? It seems like >>an odd name to me. > >Well, why don't you change it to something sensible, then? >May I suggest: > >sed -i -e 's/keyeprint/display_error/' src/winsup/utils/cygcheck.cc I've renamed this to display_error, as per your suggestion, and added an abbreviated ChangeLog, giving you the credit. Thanks. cgf
Re: [Patch] cygcheck: Make keyeprint more versatile.
Op Wed, 10 Nov 2004 19:35:51 -0500 schreef Christopher Faylor in <[EMAIL PROTECTED]>: [...] : > * cygcheck.cc (keyeprint): New optional parameters: show_error and : > print_failed. : : Please check in. Thanks. Done. : Have I mentioned that I don't like the name 'keyeprint'? It seems like an odd : name to me. Well, why don't you change it to something sensible, then? May I suggest: sed -i -e 's/keyeprint/display_error/' src/winsup/utils/cygcheck.cc (I'd post a patch, but am afraid it'd be too large...) * cygcheck.cc (keyeprint): Rename to display_error. (display_error): Renamed from keyeprint. (add_path): keyeprint is now called display_error. (init_paths): ditto. (find_on_path): ditto. (get_word): ditto. (get_dword): ditto. (rva_to_offset): ditto. (cygwin_info): ditto. (init_paths): ditto. (dll_info): ditto. (track_down): ditto. (ls): ditto. (scan_registry): ditto. (dump_sysinfo): ditto. (check_keys): ditto. L8r, Buzz. -- ) | | ---/ ---/ Yes, this | This message consists of true | I do not -- | | // really is | and false bits entirely.| mail for ) | | //a 72 by 4 +---+ any1 but -- \--| /--- /--- .sigfile. | |perl -pe "s.u(z)\1.as."| me. 4^re
Re: [Patch] cygcheck: Make keyeprint more versatile.
On Thu, Nov 11, 2004 at 01:18:43AM +0100, Bas van Gompel wrote: >Hi, > >Another (trivial, I hope) patch. > >It will add some optional parameters to keyeprint, so errormessages >can be made more appropriate. When the options are not supplied, output >will remain as is. > > >ChangeLog-entry: > >2004-11-11 Bas van Gompel <[EMAIL PROTECTED]> > > * cygcheck.cc (keyeprint): New optional parameters: show_error and > print_failed. Please check in. Thanks. Have I mentioned that I don't like the name 'keyeprint'? It seems like an odd name to me. cgf
[Patch] cygcheck: Make keyeprint more versatile.
Hi, Another (trivial, I hope) patch. It will add some optional parameters to keyeprint, so errormessages can be made more appropriate. When the options are not supplied, output will remain as is. ChangeLog-entry: 2004-11-11 Bas van Gompel <[EMAIL PROTECTED]> * cygcheck.cc (keyeprint): New optional parameters: show_error and print_failed. --- src/winsup/utils/cygcheck.cc31 Oct 2004 18:46:31 - 1.59 +++ src/winsup/utils/cygcheck.cc10 Nov 2004 21:11:26 - @@ -102,9 +102,14 @@ static char **paths = 0; * keyeprint() is used to report failure modes */ static int -keyeprint (const char *name) +keyeprint (const char *name, bool show_error = true, bool print_failed = true) { - fprintf (stderr, "cygcheck: %s failed: %lu\n", name, GetLastError ()); + if (show_error) +fprintf (stderr, "cygcheck: %s%s: %lu\n", name, + print_failed ? " failed" : "", GetLastError ()); + else +fprintf (stderr, "cygcheck: %s%s\n", name, + print_failed ? " failed" : ""); return 1; } L8r, Buzz. -- ) | | ---/ ---/ Yes, this | This message consists of true | I do not -- | | // really is | and false bits entirely.| mail for ) | | //a 72 by 4 +---+ any1 but -- \--| /--- /--- .sigfile. | |perl -pe "s.u(z)\1.as."| me. 4^re