aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/file_wrappers.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-11-18 14:10:00 -0800
committerGuy Harris <guy@alum.mit.edu>2018-11-18 22:10:42 +0000
commitbf9286e554c8d2b9e506b62dc7c0ed8f6e830160 (patch)
tree7057b13cf88f642626c5cc0272a52d0a389d3c61 /wiretap/file_wrappers.c
parent189f1ceec25f4900e25b6faea5f15aeb27a08c7e (diff)
Add an API to get the file extension for a compression type, and use it.
Add wtap_compressed_file_extension(), which returns NULL for WTAP_UNCOMPRESSED and the appropriate file extension for other compression types. Add wtap_compression_type_supported(), which returns TRUE for WTAP_UNCOMPRESSED and all supported compression types and FALSE otherwise. ("Supported" means "the code can decompmress files in that compression format and can write files in that compression format", so WTAP_GAIP_COMPRESSED is supported iff libwiretap is built with zlib.) In MainWindow::fileAddExtension, instead of checking for WTAP_GZIP_COMPRESSED and using ".gz" as the extension, use the extension returned by wtap_compressed_file_extension() for the compression type. Change-Id: I47cb0eca8c887ada3562df30b54e76509008180f Reviewed-on: https://code.wireshark.org/review/30707 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap/file_wrappers.c')
-rw-r--r--wiretap/file_wrappers.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/wiretap/file_wrappers.c b/wiretap/file_wrappers.c
index daf0798ce7..c1ea1b9040 100644
--- a/wiretap/file_wrappers.c
+++ b/wiretap/file_wrappers.c
@@ -43,19 +43,6 @@
* Lzip format: http://www.nongnu.org/lzip/
*/
-/*
- * List of extensions for compressed files.
- * If we add support for more compressed file types, this table
- * might be expanded to include routines to handle the various
- * compression types.
- */
-const char *compressed_file_extension_table[] = {
-#ifdef HAVE_ZLIB
- "gz",
-#endif
- NULL
-};
-
/* #define GZBUFSIZE 8192 */
#define GZBUFSIZE 4096