aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2010-03-12 16:48:12 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2010-03-12 16:48:12 +0000
commit14caf8f4de1225f7cf56e4131a3b1cbc5535b1b9 (patch)
treeaeefca09a7453cf3487c1536ef47b4e2521caef1 /utils
parentadcaff8443cb33f17a1d779257b63bb1186fdb1c (diff)
downloadsg3_utils-14caf8f4de1225f7cf56e4131a3b1cbc5535b1b9.tar.gz
follow google's RE2 lead and add BSD_LICENSE files and refer to them from source
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@329 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'utils')
-rw-r--r--utils/hxascdmp.c32
-rw-r--r--utils/sg_chk_asc.c39
2 files changed, 13 insertions, 58 deletions
diff --git a/utils/hxascdmp.c b/utils/hxascdmp.c
index 8fb141ac..1f62ef10 100644
--- a/utils/hxascdmp.c
+++ b/utils/hxascdmp.c
@@ -1,30 +1,8 @@
/*
- * Copyright (c) 2004-2009 Douglas Gilbert.
+ * Copyright (c) 2004-2010 Douglas Gilbert.
* All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
+ * Use of this source code is governed by a BSD-style
+ * license that can be found in the BSD_LICENSE file.
*/
#include <stdlib.h>
@@ -39,7 +17,7 @@
static int bytes_per_line = DEF_BYTES_PER_LINE;
-static const char * version_str = "1.13 20090510";
+static const char * version_str = "1.13 20100312";
#define CHARS_PER_HEX_BYTE 3
#define BINARY_START_COL 6
@@ -277,7 +255,7 @@ main(int argc, const char ** argv)
printf("\n");
}
} else {
- sg_set_binary_mode(inFile);
+ sg_set_binary_mode(inFile);
while ((res = read(inFile, buff, num)) > 0) {
if (doHex)
dStrHexOnly(buff, res, start);
diff --git a/utils/sg_chk_asc.c b/utils/sg_chk_asc.c
index 14d2c090..e7af6f4a 100644
--- a/utils/sg_chk_asc.c
+++ b/utils/sg_chk_asc.c
@@ -1,30 +1,8 @@
/*
- * Copyright (c) 2006-2008 Douglas Gilbert.
+ * Copyright (c) 2006-2010 Douglas Gilbert.
* All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
+ * Use of this source code is governed by a BSD-style
+ * license that can be found in the BSD_LICENSE file.
*/
#include <unistd.h>
@@ -47,9 +25,8 @@
* http://www.t10.org/lists/asc-num.txt
*/
-static char * version_str = "1.03 20080623";
+static char * version_str = "1.03 20101213";
-#define ME "sg_chk_asc: "
#define MAX_LINE_LEN 1024
@@ -106,7 +83,7 @@ int main(int argc, char * argv[])
++verbose;
break;
case 'V':
- fprintf(stderr, ME "version: %s\n", version_str);
+ fprintf(stderr, "version: %s\n", version_str);
return 0;
default:
fprintf(stderr, "unrecognised switch code 0x%x ??\n", c);
@@ -136,7 +113,7 @@ int main(int argc, char * argv[])
}
fp = fopen(file_name, "r");
if (NULL == fp) {
- fprintf(stderr, ME "open error: %s: %s\n", file_name,
+ fprintf(stderr, "open error: %s: %s\n", file_name,
safe_strerror(errno));
return 1;
}
@@ -205,13 +182,13 @@ printf("\"%s\",\n", b);
if (verbose > 2)
fprintf(stderr, "EOF detected\n");
} else
- fprintf(stderr, ME "fgets: %s\n", safe_strerror(errno));
+ fprintf(stderr, "fgets: %s\n", safe_strerror(errno));
} else
fprintf(stderr, "%s\n", line);
res = fclose(fp);
if (EOF == res) {
- fprintf(stderr, ME "close error: %s\n", safe_strerror(errno));
+ fprintf(stderr, "close error: %s\n", safe_strerror(errno));
return 1;
}
return ret;