aboutsummaryrefslogtreecommitdiff
path: root/bzlib.c
diff options
context:
space:
mode:
authorJulian Seward <jseward@acm.org>2001-12-30 22:13:13 +0100
committerJulian Seward <jseward@acm.org>2001-12-30 22:13:13 +0100
commit099d844292f60f9d58914da29e5773204dc55e7a (patch)
tree04bdb38dbcd894d6fdbbc3253e216d029cade5c6 /bzlib.c
parent795b859eee96c700e8f3c3fe68e6a9a39d95797c (diff)
downloadbzip2-099d844292f60f9d58914da29e5773204dc55e7a.tar.gz
bzip2-099d844292f60f9d58914da29e5773204dc55e7a.tar.bz2
bzip2-099d844292f60f9d58914da29e5773204dc55e7a.zip
bzip2-1.0.2bzip2-1.0.2
Diffstat (limited to 'bzlib.c')
-rw-r--r--bzlib.c35
1 files changed, 32 insertions, 3 deletions
diff --git a/bzlib.c b/bzlib.c
index 4a06d9f..7d1cb27 100644
--- a/bzlib.c
+++ b/bzlib.c
@@ -8,7 +8,7 @@
8 This file is a part of bzip2 and/or libbzip2, a program and 8 This file is a part of bzip2 and/or libbzip2, a program and
9 library for lossless, block-sorting data compression. 9 library for lossless, block-sorting data compression.
10 10
11 Copyright (C) 1996-2000 Julian R Seward. All rights reserved. 11 Copyright (C) 1996-2002 Julian R Seward. All rights reserved.
12 12
13 Redistribution and use in source and binary forms, with or without 13 Redistribution and use in source and binary forms, with or without
14 modification, are permitted provided that the following conditions 14 modification, are permitted provided that the following conditions
@@ -93,10 +93,39 @@ void BZ2_bz__AssertH__fail ( int errcode )
93 "component, you should also report this bug to the author(s)\n" 93 "component, you should also report this bug to the author(s)\n"
94 "of that program. Please make an effort to report this bug;\n" 94 "of that program. Please make an effort to report this bug;\n"
95 "timely and accurate bug reports eventually lead to higher\n" 95 "timely and accurate bug reports eventually lead to higher\n"
96 "quality software. Thanks. Julian Seward, 21 March 2000.\n\n", 96 "quality software. Thanks. Julian Seward, 30 December 2001.\n\n",
97 errcode, 97 errcode,
98 BZ2_bzlibVersion() 98 BZ2_bzlibVersion()
99 ); 99 );
100
101 if (errcode == 1007) {
102 fprintf(stderr,
103 "\n*** A special note about internal error number 1007 ***\n"
104 "\n"
105 "Experience suggests that a common cause of i.e. 1007\n"
106 "is unreliable memory or other hardware. The 1007 assertion\n"
107 "just happens to cross-check the results of huge numbers of\n"
108 "memory reads/writes, and so acts (unintendedly) as a stress\n"
109 "test of your memory system.\n"
110 "\n"
111 "I suggest the following: try compressing the file again,\n"
112 "possibly monitoring progress in detail with the -vv flag.\n"
113 "\n"
114 "* If the error cannot be reproduced, and/or happens at different\n"
115 " points in compression, you may have a flaky memory system.\n"
116 " Try a memory-test program. I have used Memtest86\n"
117 " (www.memtest86.com). At the time of writing it is free (GPLd).\n"
118 " Memtest86 tests memory much more thorougly than your BIOSs\n"
119 " power-on test, and may find failures that the BIOS doesn't.\n"
120 "\n"
121 "* If the error can be repeatably reproduced, this is a bug in\n"
122 " bzip2, and I would very much like to hear about it. Please\n"
123 " let me know, and, ideally, save a copy of the file causing the\n"
124 " problem -- without which I will be unable to investigate it.\n"
125 "\n"
126 );
127 }
128
100 exit(3); 129 exit(3);
101} 130}
102#endif 131#endif
@@ -1402,7 +1431,7 @@ BZFILE * bzopen_or_bzdopen
1402 smallMode = 1; break; 1431 smallMode = 1; break;
1403 default: 1432 default:
1404 if (isdigit((int)(*mode))) { 1433 if (isdigit((int)(*mode))) {
1405 blockSize100k = *mode-'0'; 1434 blockSize100k = *mode-BZ_HDR_0;
1406 } 1435 }
1407 } 1436 }
1408 mode++; 1437 mode++;