diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-08-08 12:11:41 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-08-08 12:11:41 +0300 |
commit | 9017c51e7fee6b1da3d0309a7a8d151ae96646ec (patch) | |
tree | 00ad139b8661543fb5e3cf686c89280f313c0fe2 /src | |
parent | bdb66aced7c07077c1ec43c39dfdbd6227a80473 (diff) | |
download | minetest-9017c51e7fee6b1da3d0309a7a8d151ae96646ec.tar.gz minetest-9017c51e7fee6b1da3d0309a7a8d151ae96646ec.tar.bz2 minetest-9017c51e7fee6b1da3d0309a7a8d151ae96646ec.zip |
the zlib error print function now prints to dstream (debug.txt)
Diffstat (limited to 'src')
-rw-r--r-- | src/serialization.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/serialization.cpp b/src/serialization.cpp index ff7ca15f2..f150d45f0 100644 --- a/src/serialization.cpp +++ b/src/serialization.cpp @@ -27,28 +27,28 @@ with this program; if not, write to the Free Software Foundation, Inc., /* report a zlib or i/o error */ void zerr(int ret) { - fputs("zerr: ", stderr); + dstream<<"zerr: "; switch (ret) { case Z_ERRNO: if (ferror(stdin)) - fputs("error reading stdin\n", stderr); + dstream<<"error reading stdin"<<std::endl; if (ferror(stdout)) - fputs("error writing stdout\n", stderr); + dstream<<"error writing stdout"<<std::endl; break; case Z_STREAM_ERROR: - fputs("invalid compression level\n", stderr); + dstream<<"invalid compression level"<<std::endl; break; case Z_DATA_ERROR: - fputs("invalid or incomplete deflate data\n", stderr); + dstream<<"invalid or incomplete deflate data"<<std::endl; break; case Z_MEM_ERROR: - fputs("out of memory\n", stderr); + dstream<<"out of memory"<<std::endl; break; case Z_VERSION_ERROR: - fputs("zlib version mismatch!\n", stderr); + dstream<<"zlib version mismatch!"<<std::endl; break; default: - dstream<<"return value = "<<ret<<"\n"; + dstream<<"return value = "<<ret<<std::endl; } } |