aboutsummaryrefslogtreecommitdiff
path: root/src/libflate/flateerr.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2003-11-23 18:19:18 +0000
committerrsc <devnull@localhost>2003-11-23 18:19:18 +0000
commitb6afd33e2f23953f00c6fac6b5d45946a9113654 (patch)
tree300478ec8ac939d1b7aa0c1b987367a49a4e47ce /src/libflate/flateerr.c
parent8a708fb239f4272ac7e4f16f437093c56b2cab39 (diff)
downloadplan9port-b6afd33e2f23953f00c6fac6b5d45946a9113654.tar.gz
plan9port-b6afd33e2f23953f00c6fac6b5d45946a9113654.tar.bz2
plan9port-b6afd33e2f23953f00c6fac6b5d45946a9113654.zip
add libflate
Diffstat (limited to 'src/libflate/flateerr.c')
-rw-r--r--src/libflate/flateerr.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/libflate/flateerr.c b/src/libflate/flateerr.c
new file mode 100644
index 00000000..e442fd5b
--- /dev/null
+++ b/src/libflate/flateerr.c
@@ -0,0 +1,23 @@
+#include <u.h>
+#include <libc.h>
+#include <flate.h>
+
+char *
+flateerr(int err)
+{
+ switch(err){
+ case FlateOk:
+ return "no error";
+ case FlateNoMem:
+ return "out of memory";
+ case FlateInputFail:
+ return "input error";
+ case FlateOutputFail:
+ return "output error";
+ case FlateCorrupted:
+ return "corrupted data";
+ case FlateInternal:
+ return "internal error";
+ }
+ return "unknown error";
+}