Release: 1.1.7
[captive.git] / src / install / acquire / cabextract / ChangeLog
1 2002-08-12  Stuart Caie   <kyzer@4u.net>
2
3         * cabextract.c: now prints all errors and warnings to stderr
4         rather that stdout. I finally noticed that perror() prints to
5         stderr, and I want to follow suit.
6
7 2002-08-11  Stuart Caie   <kyzer@4u.net>
8
9         * extract_file(): now prints out the correct cabinet name in error
10         messages, in the case of files which are split over multiple
11         cabinet files and the 2nd or later split cabinet contains the
12         error.
13
14         * QTMdecompress(): fixed the QTM decoding error - basically, Matthew
15         used the bitstream reading macros from my LZX decompressor. Sadly,
16         these macros can only guarantee at maximum 17 bits available in the
17         bit buffer, and Quantum uses up to 19 bits. I rewrote the Quantum
18         bit buffer macros to be multi-pass (and therefore slower) so they
19         can get the requisite number of bits.
20
21         * QTMinit(): after fixing the decoding bug, I noticed that files
22         always failed extraction when going to a second folder. It turns out
23
24         * configure.in: added limits.h to the list of checked includes
25
26         * cabextract.c: ULONG_BITS now defined in terms of CHAR_BIT from
27         <limits.h> rather than fixed to 8 bits per char. Oddly, my system
28         seems to include <linux/limits.h> rather than <limits.h>.  So, for
29         people like me, I also define CHAR_BIT to be 8 if it's not already
30         defined.
31
32 2002-07-29  Stuart Caie   <kyzer@4u.net>
33
34         * cabextract.c: The Ministry of Sensible Naming dictates that 
35         load_cab() be renamed find_cabs_in_file(), and lose the 'search'
36         argument. Calls to load_cab() where the search argument = 0 (i.e.,
37         when loading spanning cabinets) be changed to load_cab_offset(x,0).
38
39 2002-07-25  Stuart Caie  <kyzer@4u.net>
40
41         * load_cab(): Bah! off_t is defined as a signed long int, and
42         not an unsigned long int as I had previously thought. This means the
43         'valid cabinet' comparisions may fail. I have fixed this by making
44         these comparisons unsigned.
45
46         * cabinfo.c: added the new search mechanism to cabinfo.
47
48 2002-07-25  Stuart Caie   <kyzer@4u.net>
49
50         * process_cabinet(): rewrote the loading mechanism. Uses the new
51         load_cab() to get a list of cabinets in the base file. Also does
52         bi-directional loading of spanning cabinets.
53
54         * load_cab(): now takes a 'search' parameter. if search=0, the old
55         loading behaviour is performed, but if search=1, it now does the
56         exhaustive search for all matching cabinets and tries to load
57         them. If a load succeeds, it skips that section of the
58         file. Therefore, all embedded cabinets are found, yet most of the
59         file does not need to be searched.
60
61         * cabinet_find_header(): removed, see above. Also, in shifting the
62         search, I altered the search mechanism. It now uses a state
63         machine to get around border cases, rather than the flaky 'save
64         the last 20 bytes and put them at the start the next time around'.
65         
66         * cabinet_read_entries(): now checks the MSCF signature, as there
67         is no longer a cabinet_find_header() to do this.
68         
69 2002-07-23  Stuart Caie   <kyzer@4u.net>
70
71         * LZXdecompress(), QTMdecompress(): On systems where the LZ window
72         pointer is in "low memory", runsrc (window pointer - match offset)
73         could be below address 0, which wraps around to the end of memory,
74         so it appears runsrc is ahead of the LZ window, and so it does not
75         need 'fixing' before the match copy. Therefore the match data is
76         read from the incorrect, high address. Thanks to the NetBSD team
77         for discovering this and providing the patch.
78
79 2002-07-22  Stuart Caie   <kyzer@4u.net>
80
81         * file_close(): now honours your umask settings when extracting
82         files. Thanks to the NetBSD team for the patch.
83         
84         * cabinet_seek(), cabinet_skip(): these now print errors if
85         fseek() returns an error.
86         
87         * QTMdecompress(): finally! Added an implementation of the Quantum
88         method which was researched and written by Matthew Russoto. Many
89         thanks to him for all the hard work he did to produce this. I
90         tidied up the code to be more my style (and to be quite a bit
91         faster by inlining the bit buffer, H, L and C), but it's still all
92         his code running.
93
94         * find_next_cabinet_file(): this is a new function which finds the
95         "next cabinet" by opening the directory it would be in and reading
96         each filename case-insensitively. It also handles any such "next
97         cabinets" with directory elements (delimited with MS-DOS
98         backslashes).
99
100         * process_cabinet(): now uses find_next_cabinet_file() to get the
101         next cabinet file. This function also replaces the hack that gets
102         any directory path which might be embedded in the base cabinet
103         filename (as mentioned on the command line).
104
105 2002-07-21  Stuart Caie   <kyzer@4u.net>
106
107         * file_close(): fixed off-by-one error in setting the extracted
108         file date. Thanks to Claus Rasmussen.
109
110 2002-07-20  Stuart Caie   <kyzer@4u.net>
111
112         * file_open(): now removes any leading slashes from the name of
113         the file to be extracted. Thanks to the James Henstridge and
114         David Leonard for patches.
115
116         * ensure_filepath(): now does not try to examine the directory ""
117         (i.e. no directory at all) if given an absolute path (one that
118         start with a slash). Thanks to the James Henstridge for the patch.
119
120 2002-04-30  Stuart Caie   <kyzer@4u.net>
121
122         * cabextract.spec.in: changed the fixed version number to @VERSION@
123
124 2002-04-06  Stuart Caie   <kyzer@4u.net>
125
126         * Makefile.am, configure.in: used the guide no_getopt_long.txt
127         included with the gengetopt package to add getopt_long
128         configuration to cabextract. Hopefully it all works now. Thanks to
129         the many people who pointed out this problem and to the many
130         people who offered solutions.
131         
132 2001-09-06  Stuart Caie   <kyzer@4u.net>
133         
134         * Makefile.am, configure.in: made cabextract.spec one of the auto-
135         generated files. Now I can do 'make distcheck' here to build a
136         distribution which can be installed using 'rpm -tb
137         cabextract-0.6.tar.gz'. Thanks to Daniel Resare for the know-how.
138         
139 2001-08-20  Stuart Caie   <kyzer@4u.net>
140
141         * Makefile.am: added an LDADD line for cabextract's LIBOBJS
142         generated by configure. This means the AC_REPLACE_FUNCS line
143         should actually have an effect.
144
145         * configure.in: Removed getopt_long and mktime from the
146         AC_CHECK_FUNCS, as this is done anyway.
147         
148 2001-08-19  Stuart Caie   <kyzer@4u.net>
149
150         * Makefile.am, configure.in, cabextract.c: moved the GNU getopt
151         sources to become an automatically added dependency if
152         getopt_long() can't be found in the standard library, just like
153         mktime() is handled. The getopt_long(), struct option and optarg
154         and optind definitions are taken from getopt.h if possible. If
155         they're not there, but getopt_long() was found with standard
156         includes files, it's assumed they're defined in the standard
157         include files. Otherwise, we define them ourselves.
158
159         * cabextract.c: now gets VERSION defined from configure via
160         config.h.
161
162         * decompress(): if the 'fix' option was used, the output buffer
163         would always be cleared before block decompression. A nice idea,
164         but the MSZIP method likes to keep the output buffer between
165         blocks. Thanks to Fernando Trias for spotting this. Stopped
166         clearing the output buffer.
167         
168         * main(): the 'fix' variable wasn't initialised to zero, so on
169         some architectures, where the stack-space allocated to the
170         variable isn't cleared to zero, you always got the 'fix' option
171         selected. See above for why this was bad.
172
173         * process_cabinet(): now prints "Finished processing cabinet" when
174         finished extracting, instead of just a blank line. Still prints
175         blank lines for listing files.
176         
177 2001-08-05  Stuart Caie   <kyzer@4u.net>
178
179         * Makefile.am: the manpage wasn't included in the distribution.
180         Fixed and re-issued the 0.3 release.
181         
182 2001-08-02  Stuart Caie   <kyzer@4u.net>
183
184         * decompress(): now takes a 'fix' flag, which causes MSZIP errors
185         to be ignored.
186
187         * cabinet_get_entries(): now keeps the printable information about
188         previous and next cabinet parts
189
190         * process_cabinet(): now prints the printable information about
191         the next cabinet part in a multi-part cabinet
192         
193         * file_open(): now prepends a given directory if wanted, and can
194         make the filename lowercase if wanted.
195
196         * main(): changed to using getopt_long to parse arguments. Added
197         -L (lowercase), -d (output to directory), -f (fix corrupt cabs),
198         -h (help), -q (quiet) and -v was recycled to become --version,
199         when used on its own.
200
201         * LZXdecompress(): major bug fixed; the updated R0, R1 and R2 in
202         uncompressed blocks were being stored in the uncomp_state block,
203         not local variables. At the end of the function, the local values
204         are always written back to the uncomp_state block. So the values
205         placed there by the uncompressed block header were always
206         overwritten. Thanks to Pavel Turbin for providing an example of
207         this.
208         
209         * rindex(): this is the BSD precursor of the ANSI standard
210         function strrchr(). Oops! Now uses strrchr(), or rindex() if
211         strrchr() isn't available.
212
213         * cabinet_find_header(): now prints an error message if it can't
214         find a header.
215         
216 2001-04-30  Stuart Caie   <kyzer@4u.net>
217
218         * fixed includes to include both <strings.h> and <string.h> if
219         they both exist, and made some signedness conversions explicit.
220         This should let cabextract compile with SGI's native
221         compiler. Thanks to Markus Nullmeier for the patch.
222         
223 2001-03-04  Stuart Caie   <kyzer@4u.net>
224
225         * main(): now prints the version of cabextract in the copyright
226         line.
227         
228         * cabinet_find_header(): now searches any kind of file, not just
229         files beginning with 'MZ' header. Also, always searches entire
230         file.  This slows the search down, but increases the usefulness of
231         the search overall, IMHO. Thanks to Eric Sharkey for pointing this
232         out.
233         
234         * LZXdecompress(): fixed problem in intel decoding: E8 must not
235         appear in the last 10 bytes, not the last 6 bytes... Thanks to Jae
236         Jung who pointed this out to me. I didn't believe him at first,
237         but he was quite right. Also thanks to Antoine Amanieux for
238         providing example files affected by this.
239
240         * process_cabinet(): now extends multipart cabinet filenames to be
241         in the same directory as the base cabinet.
242
243         * cabinet_open(): now only lowercases the filename part of a
244         cabinet name, not the path part.
245         
246 2001-03-03  Stuart Caie   <kyzer@4u.net>
247
248         * LZXdecompress(): fixed LZX bit buffer exhaustion in where
249         READ_HUFFSYM() requests more bits than the buffer actually
250         contains: top-of-loop overflow check now allows for the input
251         pointer to be 16 bits past the end of the buffer, but checks to
252         ensure none of those 16 bits are actually used. Also increased
253         decomp_state.inbuf by two bytes and clear the two bytes after
254         loaded block in decompress(). Thanks to Jae Jung for pointing out
255         this bug, and for providing example files which exposed the bug.
256
257 2001-02-26  Stuart Caie <kyzer@4u.net>
258
259         * added configure script / makefile using automake.
260
261         * file_close(): now sets the timestamp on extracted files.