aboutsummaryrefslogtreecommitdiffstats
path: root/g10/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/misc.c')
-rw-r--r--g10/misc.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/g10/misc.c b/g10/misc.c
index 67ec5cc2b..eadfe7ef9 100644
--- a/g10/misc.c
+++ b/g10/misc.c
@@ -546,17 +546,23 @@ compress_algo_to_string(int algo)
switch(algo)
{
- case 0:
+ case COMPRESS_ALGO_NONE:
s="Uncompressed";
break;
- case 1:
+ case COMPRESS_ALGO_ZIP:
s="ZIP";
break;
- case 2:
+ case COMPRESS_ALGO_ZLIB:
s="ZLIB";
break;
+
+#ifdef HAVE_BZIP2
+ case COMPRESS_ALGO_BZIP2:
+ s="BZIP2";
+ break;
+#endif
}
return s;
@@ -565,8 +571,13 @@ compress_algo_to_string(int algo)
int
check_compress_algo(int algo)
{
+#ifdef HAVE_BZIP2
+ if(algo>=0 && algo<=3)
+ return 0;
+#else
if(algo>=0 && algo<=2)
return 0;
+#endif
return G10ERR_COMPR_ALGO;
}