[Patch] regtool: Add load/unload commands and --binary option

Brian Dessent brian@dessent.net
Wed Jan 25 23:45:00 GMT 2006

Igor Peshansky wrote:

> What if you want to redirect the hex dump to a file?  IMO, isatty() checks
> are only useful if the output won't change qualitatively on redirection
> (e.g., for coloring).  Otherwise, it's always better to use an explicit
> flag.

Good point.  Why don't we just emulate the behavior of 'cat' here?  If
isatty() is true and non-ascii characters are in the output, then prompt
first before possibly fubaring the user's terminal, otherwise just
output the raw data.

And just as 'cat' does not have any internal code for formatting binary
data as a hex dump, neither should regtool, since 'od' works perfectly
for that and already has the veritable kitchen sink of formatting


More information about the Cygwin-patches mailing list