Merge pull request #80 from cwoffenden/previewers-enum-changes

Windows previewer updated with transcoder changes
diff --git a/README.md b/README.md
index 9abe872..4412087 100644
--- a/README.md
+++ b/README.md
@@ -29,9 +29,9 @@
 
 ASTC usage falls under ARM's [END USER LICENCE AGREEMENT FOR THE MALI ASTC SPECIFICATION AND SOFTWARE CODEC license agreement](https://github.com/ARM-software/astc-encoder/blob/master/LICENSE.md). 
 
-PVRTC1/2: See the [PVRTC Specification and User Guide](https://www.imgtec.com/downloads/download-info/pvrtc-texture-compression-user-guide-2/). Imagination Technologies Limited, 23 Nov 2018. Also see the [Khronos Data Format Specification](https://www.khronos.org/registry/DataFormat/specs/1.1/dataformat.1.1.html). See [PVR Texture Compression Exploration](https://roartindon.blogspot.com/2014/08/pvr-texture-compression-exploration.html) and [PvrTcCompressor](https://bitbucket.org/jthlim/pvrtccompressor/src). Also see [Texture Compression Techniques](http://sv-journal.org/2014-1/06/en/index.php?lang=en#7-3).
+PVRTC1/2: See the [PVRTC Specification and User Guide](https://www.imgtec.com/downloads/download-info/pvrtc-texture-compression-user-guide-2/). Imagination Technologies Limited, 23 Nov 2018. Also see the [Khronos Data Format Specification](https://www.khronos.org/registry/DataFormat/specs/1.3/dataformat.1.3.html). See [PVR Texture Compression Exploration](https://roartindon.blogspot.com/2014/08/pvr-texture-compression-exploration.html) and [PvrTcCompressor](https://bitbucket.org/jthlim/pvrtccompressor/src). Also see [Texture Compression Techniques](http://sv-journal.org/2014-1/06/en/index.php?lang=en#7-3).
 
-ETC1 and ETC2 EAC: See the [Khronos Data Format Specification](https://www.khronos.org/registry/DataFormat/specs/1.1/dataformat.1.1.html) and the [OpenGL 4.5 Core Profile](https://www.khronos.org/registry/OpenGL/specs/gl/glspec45.core.pdf) Appendix C.
+ETC1 and ETC2 EAC: See the [Khronos Data Format Specification](https://www.khronos.org/registry/DataFormat/specs/1.3/dataformat.1.3.html) and the [OpenGL 4.5 Core Profile](https://www.khronos.org/registry/OpenGL/specs/gl/glspec45.core.pdf) Appendix C.
 
 BC1-5,7: Part of Microsoft's Direct3D API technology. See [Texture Block Compression in Direct3D 11](https://docs.microsoft.com/en-us/windows/win32/direct3d11/texture-block-compression-in-direct3d-11). Also see the [squish library](https://github.com/Ethatron/squish-ccr).
 
diff --git a/basisu_comp.cpp b/basisu_comp.cpp
index 90f0657..1e46793 100644
--- a/basisu_comp.cpp
+++ b/basisu_comp.cpp
@@ -1066,9 +1066,7 @@
 		{
 			const uint8_vec &comp_data = m_basis_file.get_compressed_data();
 
-			std::string basis_filename(m_params.m_out_filename);
-			string_remove_extension(basis_filename);
-			basis_filename += ".basis";
+			const std::string& basis_filename = m_params.m_out_filename;
 
 			if (!write_vec_to_file(basis_filename.c_str(), comp_data))
 			{
diff --git a/basisu_tool.cpp b/basisu_tool.cpp
index 4003a01..0123a76 100644
--- a/basisu_tool.cpp
+++ b/basisu_tool.cpp
@@ -35,7 +35,8 @@
 	cCompress,
 	cValidate,
 	cUnpack,
-	cCompare
+	cCompare,
+	cVersion,
 };
 
 static void print_usage()
@@ -47,6 +48,7 @@
 		" -unpack: Use transcoder to unpack .basis file to one or more .ktx/.png files\n"
 		" -validate: Validate and display information about a .basis file\n"
 		" -compare: Compare two PNG images specified with -file, output PSNR and SSIM statistics and RGB/A delta images\n"
+		" -version: Print basisu version and exit\n"
 		"Unless an explicit mode is specified, if one or more files have the .basis extension this tool defaults to unpack mode.\n"
 		"\n"
 		"Important: By default, the compressor assumes the input is in the sRGB colorspace (like photos/albedo textures).\n"
@@ -250,6 +252,8 @@
 				m_mode = cUnpack;
 			else if (strcasecmp(pArg, "-validate") == 0)
 				m_mode = cValidate;
+			else if (strcasecmp(pArg, "-version") == 0)
+				m_mode = cVersion;
 			else if (strcasecmp(pArg, "-compare_ssim") == 0)
 				m_compare_ssim = true;
 			else if (strcasecmp(pArg, "-file") == 0)
@@ -1507,6 +1511,9 @@
 	case cCompare:
 		status = compare_mode(opts);
 		break;
+	case cVersion:
+		status = true; // We printed the version at the beginning of main_internal
+		break;
 	default:
 		assert(0);
 		break;
diff --git a/transcoder/basisu_transcoder.cpp b/transcoder/basisu_transcoder.cpp
index ddaf949..79a0560 100644
--- a/transcoder/basisu_transcoder.cpp
+++ b/transcoder/basisu_transcoder.cpp
@@ -146,7 +146,9 @@
 
 namespace basist
 {
+#if BASISD_SUPPORT_BC7_MODE6_OPAQUE_ONLY
 #include "basisu_transcoder_tables_bc7_m6.inc"
+#endif
 
 #if BASISD_ENABLE_DEBUG_FLAGS
 	static uint32_t g_debug_flags = 0;