aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2009-04-20 22:45:26 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2009-04-20 22:45:26 +0000
commit9edb81a37990a9f12c198c757f51e74439af6c15 (patch)
treea07d9879fd6d65b37e5945cf2502986226835fbb /utils
parent42c6deb25554176a81b5890d3c6ce96f35537b30 (diff)
downloadsg3_utils-9edb81a37990a9f12c198c757f51e74439af6c15.tar.gz
call set_binary_mode() on input file descriptors
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@254 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'utils')
-rw-r--r--utils/hxascdmp.16
-rw-r--r--utils/hxascdmp.c5
2 files changed, 7 insertions, 4 deletions
diff --git a/utils/hxascdmp.1 b/utils/hxascdmp.1
index 6412b4cf..d4c6f419 100644
--- a/utils/hxascdmp.1
+++ b/utils/hxascdmp.1
@@ -1,4 +1,4 @@
-.TH HXASCDMP "1" "March 2008" "sg3_utils\-1.26" SG3_UTILS
+.TH HXASCDMP "1" "April 2009" "sg3_utils\-1.28" SG3_UTILS
.SH NAME
hxascdmp \- hexadecimal ASCII dump
.SH SYNOPSIS
@@ -41,6 +41,8 @@ end of each line).
.TP
\fB\-V\fR, \fB\-\-version\fR
print the version string and then exit.
+.SH NOTES
+In Windows the given file (or files) are set to binary mode.
.SH EXIT STATUS
The exit status of hxascdmp is 0 when it is successful. If any of the
given \fIFILE\fR names cannot be opened then the exit status is 1.
@@ -79,7 +81,7 @@ Written by Douglas Gilbert.
.SH "REPORTING BUGS"
Report bugs to <dgilbert at interlog dot com>.
.SH COPYRIGHT
-Copyright \(co 2004\-2008 Douglas Gilbert
+Copyright \(co 2004\-2009 Douglas Gilbert
.br
This software is distributed under a FreeBSD license. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/utils/hxascdmp.c b/utils/hxascdmp.c
index a7ba2020..f5b3492f 100644
--- a/utils/hxascdmp.c
+++ b/utils/hxascdmp.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004-2008 Douglas Gilbert.
+ * Copyright (c) 2004-2009 Douglas Gilbert.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -39,7 +39,7 @@
static int bytes_per_line = DEF_BYTES_PER_LINE;
-static const char * version_str = "1.10 20080321";
+static const char * version_str = "1.11 20090420";
#define CHARS_PER_HEX_BYTE 3
#define BINARY_START_COL 6
@@ -227,6 +227,7 @@ main(int argc, const char ** argv)
fprintf(stderr, "Couldn't open file: %s\n", argv[k]);
ret = 1;
} else {
+ sg_set_binary_mode(inFile);
start = 0;
printf("%shex dump of file: %s\n",
(doHex ? "" : "ASCII "), argv[k]);