OSDN Git Service

a59d189a770eb20cdf1aebbfc3e615c69da06a16
[lha/lha.git] / ChangeLog
1 2007-02-24  Koji Arai  <arai@users.sourceforge.jp>
2
3         * configure.ac: updated version.
4
5         * src/lharc.c (print_usage): updated.
6
7 2007-02-24  Koji Arai  <arai@users.sourceforge.jp>
8
9         * src/header.c (copy_path_element, remove_dots, init_header):
10         should treat "foo" and "./foo" as same file, so remove "./" from
11         archived path name.
12
13         * tests/Makefile.am, tests/lha-test.in, tests/lha-test17:
14         added tests for the removing relative path.
15
16 2006-10-09  Koji Arai  <arai@users.sourceforge.jp>
17
18         * src/lha_macro.h (MIN): newly added a macro for below.
19
20         * maketbl.c (make_table): applied the security patch for the
21         CVE-2006-4335 and CVE-2006-4337.
22
23         * huf.c (read_pt_len, read_c_len, decode_c_st1, decode_p_st1):
24         applied the security patch for the CVE-2006-4338.
25
26 2006-10-09  Koji Arai  <arai@users.sourceforge.jp>
27
28         * tests/lha-test.in: the function local variable `$status' is treated as
29         the builtin variable on the Zsh version 4.3.2, so it was renamed to
30         $exit_status.
31
32         * tests/Makefile.am, tests/lha-test.in, tests/lha-test16, tests/lha-test16-l0.lzh, tests/lha-test16-l1.lzh, tests/lha-test16-l2.lzh, tests/lha-test16-lg.lzh:
33         added tests for the header CRC.
34
35 2006-10-08  Koji Arai  <arai@users.sourceforge.jp>
36
37         * 00readme.autoconf: updated.
38
39         * Hacking_of_LHa: changed mail address.
40
41 2006-10-08  Koji Arai  <arai@users.sourceforge.jp>
42
43         * configure.ac: updated version.
44
45         * configure.ac, src/header.c, src/lha_macro.h, src/lhadd.c, src/lhext.c, src/lhlist.c, tests/lha-test12:
46         re-applied the correct DJGPP patch. Thanks to Doug Kaufman.
47
48 2006-10-02  Koji Arai  <arai@users.sourceforge.jp>
49
50         * configure.ac: updated version.
51
52         * src/header.c, src/lha.h, src/lha_macro.h, src/lhadd.c, src/lharc.c, src/lhext.c, src/lhlist.c, src/vsnprintf.c, tests/lha-test.in, tests/lha-test11, tests/lha-test12:
53         applied the patch for the DJGPP. Thanks to Doug Kaufman.
54
55         * 00readme.autoconf, configure.ac: changed mail address.
56
57 2006-09-11  Koji Arai  <jca02266@nifty.com>
58
59         * configure.ac: updated version.
60
61         * src/lharc.c (print_usage): updated.
62
63 2006-09-11  Koji Arai  <jca02266@nifty.com>
64
65         * config.h.in (HAVE_LIBAPPLEFILE): added `b' option which extract
66         the MacBinary. Thanks to Hiroto Sakai.
67
68         * configure.ac: ditto.
69
70         * src/lha.h (decode_macbinary_contents): ditto.
71
72         * src/lhadd.c (build_temporary_file): ditto.
73
74         * src/lharc.c (decode_macbinary_contents, print_tiny_usage, parse_suboption): ditto.
75
76         * src/lhext.c (extract_one, decode_macbinary): ditto.
77
78         * src/prototypes.h (build_temporary_file): ditto.
79
80 2006-09-11  Koji Arai  <jca02266@nifty.com>
81
82         * src/lharc.c (parse_suboption): `-X' option has been ineffective.
83         Thanks to Hiroto Sakai.
84
85 2005-10-15  Koji Arai  <jca02266@nifty.com>
86
87         * src/lha_macro.h (UPDATE_CRC): To casting with (unsigned char)
88         should not be for the variable (c) but for the (crc). Thanks to
89         OKUMURA N. Shin-ya.
90
91 2005-10-13  Koji Arai  <jca02266@nifty.com>
92
93         * tests/lha-test.in: emulate POSIX shell when it is executed by
94         zsh or bash. (this part is derived from GNU Autoconf 2.59)
95
96         * tests/Makefile.am: replaced `bash' with `@sh_for_lha_test@'
97
98         * configure.ac: search shell programs to execute the lha-test.
99
100 2005-09-25  Koji Arai  <jca02266@nifty.com>
101
102         * src/prototypes.h: updated.
103
104         * src/crcio.c (calccrc, fread_crc, fwrite_crc, fread_txt, fwrite_txt): suppress compiler warnings on gcc-4.0.
105
106         * src/header.c (calc_sum): ditto.
107
108         * src/lha_macro.h (UPDATE_CRC): ditto.
109
110 2005-09-24  Koji Arai  <jca02266@nifty.com>
111
112         * released.
113
114         * configure.ac: updated version and my mail address.
115
116         * Hacking_of_LHa: updated. (2003-02-23 edition)
117
118         * 00readme.autoconf: updated.
119
120 2005-06-08  Koji Arai  <jca02266@nifty.ne.jp>
121
122         * configure.ac: updated version.
123
124         * src/lharc.c (parse_suboption): fixed a bug, when the
125         --system-kanji-code option specified, the --archive-kanji-code
126         option was infected.
127
128 2005-05-08  Koji Arai  <jca02266@nifty.ne.jp>
129
130         * configure.ac: updated version.
131
132         * src/lharc.c (print_usage): updated.
133
134         * src/lhadd.c, src/header.c (remove_leading_dots): move to
135         header.c for readlink().
136
137         * src/lhadd.c (add_one): symbolic link indication was contrary.
138         ( not "realname -> linkname" but "linkname -> realname" )
139         (delete): ditto.
140
141         * src/lhext.c (extract_one): ditto.
142
143         * src/lhlist.c (list_one): ditto.
144
145         * tests/lha-test14: ditto.
146
147         * src/lhadd.c (remove_leading_dots): newly added.
148
149         * src/lhadd.c (append_it): remove leading relative path from
150         archive.
151
152         * src/lhext.c (is_directory_traversal): should return true when
153         just ".." was found.
154
155 2004-10-02  Koji Arai  <jca02266@nifty.ne.jp>
156
157         * src/lharc.c (print_tiny_usage): added long option helps.
158
159         * src/prototypes.h: updated.
160
161         * src/lharc.c: should accept a single option --help and --version.
162
163 2004-09-29  Koji Arai  <jca02266@nifty.ne.jp>
164
165         * src/lharc.c (parse_option, parse_suboption): use getopt_long().
166
167         * src/Makefile.am: added getopt_long.c and getopt_long.h.
168
169         * src/getopt_long.c, src/getopt_long.h: newly added.
170
171 2004-09-29  Koji Arai  <jca02266@nifty.ne.jp>
172
173         * released.
174
175         * 00readme.autoconf: note for builds on MS-Windows.
176
177         * configure.ac: updated version.
178
179         * Makefile.am: added Hacking_of_LHa in EXTRA_DIST.
180
181         * Hacking_of_LHa: renamed (typo).
182
183 2004-09-27  Koji Arai  <jca02266@nifty.ne.jp>
184
185         * configure.ac: updated version.
186
187         * src/prototypes.h (str_safe_copy): newly added.
188         (build_standard_archive_name, build_backup_file):
189         added argument the size for build_standard_archive_name() and
190         build_backup_file().
191
192         * src/header.c (init_header): use str_safe_copy() instead of strcpy().
193
194         * src/lhadd.c (build_backup_file, cmd_add, cmd_delete):
195         added argument the size for build_standard_archive_name() and
196         build_backup_file().
197
198         * src/lhext.c (make_parent_path): use str_safe_copy() instead of strcpy().
199         (extract_one): ditto.
200
201         * src/lharc.c (find_files): use str_safe_copy() instead of strcpy().
202         (build_temporary_name): ditto.
203         (modify_filename_extention): ditto.
204         (build_backup_name): ditto.
205         (build_standard_archive_name): ditto.
206
207         * src/util.c (str_safe_copy): newly added.
208
209 2004-09-26  Koji Arai  <jca02266@nifty.ne.jp>
210
211         * src/header.c: fixed typo.
212
213 2004-09-18  Koji Arai  <jca02266@nifty.ne.jp>
214
215         * configure.ac: updated version.
216
217         * 00readme.autoconf: added a description about
218         `--extract-broken-archive' option.
219
220         * src/lharc.c (init_variable, parse_option): added an option
221         `--extract-broken-archive' to extract broken archive.
222
223         * src/lha.h (extract_broken_archive): ditto.
224
225         * src/slide.c (encode, decode): fixed a *FATAL* bug which make a
226         broken archive.
227
228 2004-05-08  Koji Arai  <jca02266@nifty.ne.jp>
229
230         * configure.ac: updated version.
231
232         * src/prototypes.h: updated.
233
234         * src/lhext.c (extract_one, is_directory_traversal): applied a
235         security patch (CAN-2004-0235: directory traversal problems)
236
237         * src/lharc.c (print_usage): updated.
238
239 2003-12-18  Koji Arai  <jca02266@nifty.ne.jp>
240
241         * src/header.c (wintime_to_unix_stamp): no use 64bit constant to
242         avoid the warning `integer constant is too large for "long" type'
243         on GCC. however, for portability, no use the unsigned long long
244         suffix "ULL".
245
246 2003-12-13  Koji Arai  <jca02266@nifty.ne.jp>
247
248         * configure.ac: updated version.
249
250         * src/lhext.c (extract_one, cmd_extract): preserve directory
251         timestamp. Thanks Akihiro Iriyama.
252
253         * src/lhext.c (add_dirinfo, adjust_dirinfo): newly added.
254
255 2003-09-28  Koji Arai  <jca02266@nifty.ne.jp>
256
257         * Makefile.am (SUBDIRS): reordered to avoid useless re-compilation.
258
259 2003-09-21  Koji Arai  <jca02266@nifty.ne.jp>
260
261         * released.
262
263         * configure.ac: updated version.
264
265 2003-08-18  Koji Arai  <jca02266@nifty.ne.jp>
266
267         * 00readme.autoconf: fixed.
268
269         * configure.ac: use AC_SYS_LARGEFILE for largefile support.
270
271         * config.h.in: ditto.
272
273         * src/prototypes.h: updated.
274
275 2003-07-29  Koji Arai  <jca02266@nifty.ne.jp>
276
277         * tests/Makefile.am (EXTRA_DIST): lha-test1 was missed.
278
279         * tests/lha-test13: should set LANG=C for `tr'.
280
281 2003-07-28  Koji Arai  <jca02266@nifty.ne.jp>
282
283         * tests/lha-test.in: filename should be contained in last error
284         information.
285
286 2003-07-27  Koji Arai  <jca02266@nifty.ne.jp>
287
288         * tests/lha-test2: no need to set $FILENAME.
289         * tests/lha-test3: ditto.
290         * tests/lha-test4: ditto.
291         * tests/lha-test5: ditto.
292         * tests/lha-test6: ditto.
293         * tests/lha-test7: ditto.
294         * tests/lha-test8: ditto.
295         * tests/lha-test9: ditto.
296         * tests/lha-test10: ditto.
297         * tests/lha-test11: ditto.
298         * tests/lha-test12: ditto.
299         * tests/lha-test13: ditto.
300         * tests/lha-test14: ditto.
301         * tests/lha-test15: ditto.
302
303         * tests/lha-test1: newly added.
304
305         * tests/lha-test.in: improved.
306
307         * src/prototypes.h: updated.
308
309         * src/lha.h (exit): defined as lha_exit().
310
311         * src/lharc.c (init_variable): discard a variable
312         `remove_temporary_at_error'.
313         (fatal_error): ditto.
314         (cleanup): newly added.
315         (interrupt): call cleanup().
316         (lha_exit): newly added; cleanup temporary files always.
317
318         * src/lhadd.c (add_one): discard a variable
319         `remove_temporary_at_error'.
320
321         * src/indicator.c (start_indicator): refined.
322
323         * src/lharc.c (parse_option): fixed typo.
324
325         * src/indicator.c (carriage_return): newly added; print CR on tty only.
326         (start_indicator): call above.
327         (finish_indicator): ditto.
328         (finish_indicator2): ditto.
329
330         * src/lharc.c (print_usage): newly added.
331         (parse_option): strictly checking command line arguments.
332         (main): ditto.
333
334 2003-07-26  Koji Arai  <jca02266@nifty.ne.jp>
335
336         * tests/lha-test13: use `tr' instead of `printf` for printing 8 bit
337         characters.
338
339 2003-07-25  Koji Arai  <jca02266@nifty.ne.jp>
340
341         * tests/lha-test14: `test -e' is unavailable on some systems.
342
343 2003-07-22  Koji Arai  <jca02266@nifty.ne.jp>
344
345         * tests/lha-test.in: should exit with status in trap.
346
347         * src/shuf.c (decode_start_st0): wrong value was assigned.
348
349         * src/lha.h: discard `prof' variable.
350
351         * src/lharc.c (init_variable): discard `prof' variable.
352         (parse_option): discard undocumented `p' option.
353         (main): ditto.
354
355         * src/append.c (encode_lzhuf): hate global variable.
356
357         * src/extract.c (decode_lzhuf): ditto.
358
359         * src/lha.h: ditto.
360
361 2003-07-21  Koji Arai  <jca02266@nifty.ne.jp>
362
363         * configure.ac: updated version.
364
365         * 00readme.autoconf: described largefiles.
366
367         * src/header.c (get_header): avoid valgrind warning, `Source and
368         destination overlap in strncpy()'.
369
370         * src/lharc.c (find_files): refined.
371
372         * tests/lha-test.in: should exit in trap.
373
374         * src/lharc.c (find_files): uninitialized variable was caught by
375         Valgrind.
376
377         * src/prototypes.h: updated.
378
379         * src/append.c (encode_lzhuf): set actual copied size.
380
381         * src/util.c (encode_stored_crc): use size_t instead of long.
382
383         * src/lhadd.c (temporary_to_new_archive_file): ditto.
384         (cmd_add): ditto.
385         (cmd_delete): ditto.
386
387         * src/lhadd.c (add_one): fixed a comment.
388
389         * src/indicator.c (MAX_INDICATOR_COUNT): changed to fit for the 80
390         column screen.
391
392         * src/extract.c (decode_lzhuf): refined.
393
394         * src/prototypes.h: updated.
395
396         * src/cproto.sh: added `indicator.c'.
397
398         * src/Makefile.am: ditto.
399
400         * src/indicator.c: separated from append.c.
401
402         * src/append.c: ditto.
403
404         * src/lha.h: ditto.
405
406         * src/lha_macro.h: ditto.
407
408 2003-07-20  Koji Arai  <jca02266@nifty.ne.jp>
409
410         * configure.ac: updated version.
411
412         * src/Makefile.am (EXTRA_DIST): fnmatch.h was missed.
413
414         * src/lha.h (fseeko, ftello): these macros had no effect.
415
416 2003-07-19  Koji Arai  <jca02266@nifty.ne.jp>
417
418         * src/maketree.c (make_len): discard debug print.
419
420         * configure.ac: updated version.
421
422         * src/prototypes.h: updated.
423
424         * config.h.in: updated.
425
426         * configure.ac: check declaration of `basename'.
427
428         * src/cproto.sh: ditto.
429
430         * src/util.c (encode_stored_crc): use size_t.
431
432         * src/lha.h (struct LzHeader): use size_t for the members
433         `packed_size' and `original_size'.
434
435 2003-07-13  Koji Arai  <jca02266@nifty.ne.jp>
436
437         * configure.ac: updated version.
438
439         * src/prototypes.h: updated.
440
441         * src/append.c (encode_lzhuf): use size_t and off_t instead of long.
442         (start_indicator): ditto.
443
444         * src/extract.c (decode_lzhuf): ditto.
445
446         * src/lha.h (struct interfacing): ditto.
447
448         * src/lhadd.c (add_one): ditto.
449         (find_update_files): ditto.
450         (delete): ditto.
451
452         * src/lhext.c (cmd_extract): ditto.
453
454         * src/util.c (copyfile): ditto.
455
456         * src/lhlist.c (print_size): use "%7lu" format string instead of
457         "%7ld" for large files.
458
459         * src/slide.c: refined.
460
461 2003-07-11  Koji Arai  <jca02266@nifty.ne.jp>
462
463         * src/lharc.c (cleaning_files): should print errno.
464
465 2003-05-23  Koji Arai  <jca02266@nifty.ne.jp>
466
467         * configure.ac: use fseeko(), ftello() instead of fseek(), ftell().
468
469         * config.h.in: ditto.
470
471         * src/lha.h, src/lhlist.c, src/lhext.c, src/lharc.c: ditto.
472
473         * src/lhadd.c, src/header.c: ditto.
474
475 2003-05-10  Koji Arai  <jca02266@nifty.ne.jp>
476
477         * configure.ac: updated version.
478
479         * src/lhext.c (inquire_extract): warning if stdin is not tty,
480         because you cannot reply from stdin.
481         (extract_one): return actual read size from archive.
482         (cmd_extract): fix a bug: skip correct size when error occurred.
483
484         * tests/lha-test5: added tests for above.
485
486         * src/lha.h (struct interfacing): added a member `read_size'.
487
488         * src/extract.c (decode_lzhuf): added an argument `pointer of
489         read_size'.
490
491         * src/prototypes.h: ditto.
492
493         * src/slide.c (decode): set actual read size to interface->read_size.
494
495 2003-04-14  Koji Arai  <jca02266@nifty.ne.jp>
496
497         * src/cproto.sh: The cproto 4.7a supports some gcc-specific keywords.
498
499 2003-03-24  Koji Arai  <jca02266@nifty.ne.jp>
500
501         * configure.ac: updated version.
502
503         * src/prototypes.h: updated.
504
505 2003-03-23  Koji Arai  <jca02266@nifty.ne.jp>
506
507         * src/header.c (convert_filename): support Samba CAP code (experimental).
508         (hex2int, int2hex, cap_to_sjis, sjis_to_cap): added for above.
509
510         * src/lha_macro.h (CODE_CAP): ditto.
511
512         * src/lharc.c (parse_option): added new command line options,
513         --system-kanji-code=xxx and --archive-kanji-code=xxx (experimental).
514
515         * 00readme.autoconf: described above features.
516
517 2003-03-22  Koji Arai  <jca02266@nifty.ne.jp>
518
519         * src/lharc.c (init_variable): do not use HEADER_LEVELx macros.
520         (parse_option): ditto.
521
522         * src/header.c (write_header): ditto.
523
524         * src/lha_macro.h (HEADER_LEVEL0, HEADER_LEVEL1, HEADER_LEVEL2, MATCHBIT): ditto.
525
526         * src/huf.c (encode_start_st1): do not use assert().
527         (decode_start_st1): ditto.
528
529 2003-03-12  Koji Arai  <jca02266@nifty.ne.jp>
530
531         * src/header.c (wintime_to_unix_stamp): should cast to unsigned type.
532
533 2003-03-03  Koji Arai  <jca02266@nifty.ne.jp>
534
535         * src/prototypes.h: updated.
536
537         * src/cproto.sh: improved.
538
539 2003-02-24  Koji Arai  <jca02266@nifty.ne.jp>
540
541         * src/prototypes.h: updated.
542
543         * src/maketree.c: hate global variables.
544
545         * src/lha_macro.h: refined.
546
547         * src/huf.c: refined.
548
549         * src/util.c (strdup): defined more properly.
550         (memset): ditto.
551
552         * prototypes.h: ditto.
553
554         * cproto.sh: ditto.
555
556 2003-02-23  Koji Arai  <jca02266@nifty.ne.jp>
557
558         * src/cproto.sh: improved.
559
560         * src/prototypes.h: updated.
561
562         * src/util.c: `strucmp()' was replaced by `strcasecmp()'.
563
564         * src/util.c (archive_is_msdos_sfx1): ditto.
565
566         * src/lharc.c (open_old_archive): ditto.
567
568         * src/lha.h: ditto.
569
570         * src/util.c: discard `rename()', `mkdir()' and `rmdir()'.
571
572         * configure.ac: ditto.
573
574         * config.h.in: ditto.
575
576         * src/header.c: added credit.
577         no longer use `ftime()', `tzset()', `localtime()' and `gettimeofday()'.
578
579 2003-02-17  Koji Arai  <jca02266@nifty.ne.jp>
580
581         * configure.ac: updated version.
582
583         * src/fnmatch.h: no need to include <sys/cdefs.h>. it does not
584         exist on MinGW.
585
586 2003-02-14  Koji Arai  <jca02266@nifty.ne.jp>
587
588         * src/lharc.c (find_files): `goto' requires expression after label.
589
590         * src/lhadd.c (cmd_add): ditto.
591
592 2003-02-05  Koji Arai  <jca02266@nifty.ne.jp>
593
594         * tests/lha-test7: sleep 1 to make sure for updating tests.
595
596         * src/fnmatch.c, src/fnmatch.h: added fnmatch.c derived from the
597         OpenBSD.
598
599 2003-02-04  Koji Arai  <jca02266@nifty.ne.jp>
600
601         * configure.ac: need to call `AC_CANONICAL_HOST' for automake
602         1.6.x (for installing the config.guess and config.sub).
603
604 2003-02-02  Koji Arai  <jca02266@nifty.ne.jp>
605
606         * src/header.c, src/lharc.c: fix credit.
607
608 2003-01-20  Koji Arai  <jca02266@nifty.ne.jp>
609
610         * src/lha.h (prev_char): discard unused variable `prev_char'.
611
612         * src/crcio.c (fwrite_txt): ditto.
613
614         * src/slide.c (decode): ditto.
615
616         * src/slide.c: refined a little.
617
618 2003-01-19  Koji Arai  <jca02266@nifty.ne.jp>
619
620         * src/slide.c: took off the debug flag.
621
622         * src/slide.c (search_dict): split into 2 parts.
623
624         * src/slide.c: refined: use the structure `matchdata'.
625
626 2003-01-18  Koji Arai  <jca02266@nifty.ne.jp>
627
628         * src/lha.h (decode_count): rename a global variable `count' to
629         `decode_count'.
630
631         * src/dhuf.c (decode_p_dyn): ditto.
632
633         * src/slide.c (decode): ditto and refined.
634
635 2003-01-17  Koji Arai  <jca02266@nifty.ne.jp>
636
637         * src/slide.c: refined ?
638
639         * src/slide.c (INIT_HASH, NEXT_HASH): newly defined to refine.
640
641 2003-01-13  Koji Arai  <jca02266@nifty.ne.jp>
642
643         * src/prototypes.h: updated.
644
645         * src/slide.c: refined.
646
647 2002-12-31  Koji Arai  <jca02266@nifty.ne.jp>
648
649         * src/lhext.c (adjust_info): On Cygwin, execute permission should
650         be set for .exe or .dll.
651
652 2002-12-28  Koji Arai  <jca02266@nifty.ne.jp>
653
654         * src/lha_macro.h (peekbits): newly added.
655
656         * src/huf.c (read_pt_len): use peekbits().
657         (read_c_len): ditto.
658         (decode_c_st1): ditto.
659         (decode_p_st1): ditto.
660
661         * src/shuf.c (decode_c_st0): ditto.
662         (decode_p_st0): ditto.
663
664 2002-12-23  Koji Arai  <jca02266@nifty.ne.jp>
665
666         * configure.ac: added a configure option: --enable-ignore-dot-files.
667
668         * config.h.in: ditto.
669
670         * src/lharc.c (parse_option): added `-X' option to ignore dot files.
671
672 2002-12-17  Koji Arai  <jca02266@nifty.ne.jp>
673
674         * configure.ac: should check whether system has `ssize_t'.
675
676         * config.h.in: ditto.
677
678         * lha.h: ditto.
679
680         * configure.ac: added checking functions `fnmatch' and `basename'.
681         but not yet prepare the free fnmatch.c.
682
683         * config.h.in: ditto.
684
685         * src/util.c (basename): newly added.
686
687         * src/lhadd.c (cmd_add): exclude files specified by -x option.
688
689         * src/lharc.c (print_tiny_usage): refined.
690
691 2002-12-16  Koji Arai  <jca02266@nifty.ne.jp>
692
693         * 00readme.autoconf: describe about new feature `-x'.
694
695         * src/lha.h: include fnmatch.h.
696         added a global variable `exclude_files'.
697
698         * src/lharc.c (init_variable): initialize `exclude_files'.
699         (print_tiny_usage): modify usage.
700         (parse_option): newly added. should regard leading `-' argument as
701         option (for new -x option).
702         added `-x <pattern>' option (specify exclude files pattern).
703         (find_files): files matched by pattern `exclude_files' exclude
704         from target files.
705
706 2002-11-25  Koji Arai  <jca02266@nifty.ne.jp>
707
708         * src/header.c: use size_t for header_size.
709         (skip_msdos_sfx1_code): rename to `seek_lha_header()'.
710
711         * src/lha.h: use size_t for header_size.
712
713         * src/lhadd.c (cmd_add): rename `skip_msdos_sfx1_code()' to
714         `seek_lha_header()'.
715         (cmd_delete): ditto.
716
717         * src/lhext.c (cmd_extract): ditto.
718
719         * src/lhlist.c (cmd_list): ditto.
720
721         * src/prototypes.h: updated.
722
723         * tests/lha-test15: added tests to search any level headers.
724
725 2002-11-17  Koji Arai  <jca02266@nifty.ne.jp>
726
727         * untabify all sources.
728
729         * src/huf.c (encode_start_st1): refined.
730         (decode_start_st1): refined.
731
732         * src/slide.c (encode_alloc): refined.
733         (update): refined.
734
735 2002-11-15  Koji Arai  <jca02266@nifty.ne.jp>
736
737         * 00readme.autoconf: updated.
738
739         * src/prototypes.h: updated.
740
741         * configure.ac, Makefile.am, olddoc/Makefile.am:
742           old documentations moved to olddoc directory.
743
744         * CHANGES.euc, MACHINES2.euc, README.euc, change-114h.txt, change-114e.txt, change-114i.txt, IFNAMES, Makefile.in, change-114f.txt, config.eng, MACHINES.euc, PROBLEMS.euc, change-114g.txt, config.jpn.euc: ditto.
745
746         * Makefile.in.org, src/Makefile.in.org: removed.
747
748         * configure.ac: updated version (source maintenance start on
749         sourceforge.jp)
750
751 2002-11-11  Koji Arai  <jca02266@nifty.ne.jp>
752
753         * src/lhext.c (make_parent_path): On Cygwin, when `foo.exe'
754         exists, stat("foo", &buf) is successful and it is not a directory.
755
756         * src/util.c (skip_msdos_sfx1_code): move to header.c
757
758         * src/header.c (skip_msdos_sfx1_code): ditto.
759         some macro moved from lha_macro.h.
760
761         * src/lha_macro.h: ditto.
762
763         * tests/lha-test15: newly added for testing self extracting archive.
764
765         * tests/lha-test.in: ditto.
766
767         * tests/Makefile.am: ditto.
768
769         * configure.ac: refined messages.
770
771 2002-10-26  Koji Arai  <jca02266@nifty.ne.jp>
772
773         * src/bitio.c (putbits): use the function putcode().
774
775         * src/dhuf.c (decode_start_dyn): call init_code_cache().
776
777         * src/huf.c (encode_start_st1): ditto.
778         (decode_start_st1): ditto.
779
780         * src/larc.c (decode_start_lzs): ditto.
781
782         * src/shuf.c (decode_start_st0): ditto.
783         (encode_start_fix): ditto.
784         (decode_start_fix): ditto.
785
786         * src/Makefile.am: added bitio.c
787
788         * src/cproto.sh: added bitio.c
789
790         * src/bitio.c: new file.
791
792         * src/crcio.c: extracted bitio routines.
793
794         * src/lha.h: ditto.
795
796 2002-10-16  Koji Arai  <jca02266@nifty.ne.jp>
797
798         * 00readme.autoconf: modified.
799
800 2002-10-02  Koji Arai  <jca02266@nifty.ne.jp>
801
802         * src/util.c (xstrchr): `strchr(s, 0)' should return the pointer
803         of the '\0' terminator.
804
805 2002-09-14  Koji Arai  <jca02266@nifty.ne.jp>
806
807         * src/lhadd.c (add_one): Use chsize() if system does not have
808         ftruncate(2). (For MinGW)
809
810         * configure.ac: ditto.
811
812         * config.h.in: ditto.
813
814 2002-09-03  Koji Arai  <jca02266@nifty.ne.jp>
815
816         * released.
817
818         * 00readme.autoconf: modified for stable release.
819
820         * configure.ac: updated version.
821
822 2002-09-01  Koji Arai  <jca02266@nifty.ne.jp>
823
824         * tests/Makefile.am (EXTRA_DIST): lha-test12, lha-test13 and
825         lha-test14 were missed.
826
827 2002-08-31  Koji Arai  <jca02266@nifty.ne.jp>
828
829         * src/lhadd.c (append_it): refined.
830
831         * src/lhadd.c (append_it): no terminate when file cannot be opened.
832
833 2002-08-29  Koji Arai  <jca02266@nifty.ne.jp>
834
835         * tests/lha-test11: change the way of checking the `header size field'.
836
837         * configure.ac: the `--enable-user-name-header' switch has been
838         ineffective. corrected variable name.
839
840 2002-08-26  Koji Arai  <jca02266@nifty.ne.jp>
841
842         * tests/lha-test14: on Cygwin, cannot use '|' as filesname.
843
844         * tests/lha-test.in: on MinGW, skip lha-test14 test.
845
846         * 00readme.autoconf: modified.
847
848         * released.
849
850         * configure.ac: updated version.
851
852         * src/header.c: fixed a comment.
853
854         * src/prototypes.h (strcmp_filename): removed.
855
856         * src/header.c (dump_skip_bytes): note "ignored" if data is ignored.
857
858         * src/header.c (wintime_to_unix_stamp): newly added for converting
859         from `FILETIME' to `time_t'.
860         (get_extended_header): use `wintime_to_unix_stamp()' to recognize
861         the Windows time stamp header (0x41).
862
863         * src/lha.h: define `uint64_t' unless system has it.
864
865         * configure.ac: check existence of the type `uint64_t'.
866
867         * config.h.in: ditto.
868
869         * src/lharc.c (init_variable): set default header level to 2.
870
871 2002-08-24  Koji Arai  <jca02266@nifty.ne.jp>
872
873         * tests/lha-test.in (lha-test14): added to test the symbolic link file.
874
875         * tests/lha-test14: ditto.
876
877         * src/lhlist.c (list_one): use LzHeader.realname.
878
879         * src/lhext.c (extract_one): use LzHeader.realname.
880         should call make_parent_path(symlink).
881
882         * src/lhadd.c (add_one): use LzHeader.realname.
883         (delete): ditto.
884         (append_it): use strcmp() instead of strcmp_filename().
885         (strcmp_filename): removed.
886
887         * src/lha.h (struct LzHeader): added a member `realname' which is
888         symbolic linked name.
889
890         * src/header.c (get_header): split symbolic name in archive.
891         (write_header): join symbolic link name and linked name to put it
892         in archive.
893
894         * src/lhext.c (extract_one): force extract when `f' option is
895         specified. this is for OS-9 archives, [provisional].
896
897         * src/header.c: fixed cpp expressions around time functions.
898
899         * tests/lha-test8: test MS-DOS timestamp `ftime' structure.
900
901         * tests/lha-test.in (change_timestamp): newly added.
902
903 2002-08-22  Koji Arai  <jca02266@nifty.ne.jp>
904
905         * released.
906
907         * src/prototypes.h: regenerated.
908
909         * src/cproto.sh: refined.
910
911         * configure.ac: updated version.
912
913         * configure.ac: should use `exit' rather than `return' on
914         AC_TRY_RUN().  see the Autoconf manual.
915
916         * configure.ac: check whether the 2nd argument of gettimeofday()
917         is effective.
918
919         * src/header.c: ditto.
920
921         * config.h.in (GETTIMEOFDAY_HAS_2ND_ARG): ditto.
922
923         * tests/lha-test.in: `++' is invalid arithmetic operator on POSIX
924         shell, Ksh and Bash version 2.03 or earlier.
925
926         * tests/lha-test13: ditto.
927
928 2002-08-18  Koji Arai  <jca02266@nifty.ne.jp>
929
930         * src/lharc.c (print_version): version string is made here.
931
932         * src/lha_macro.h (LHA_VERSION): removed.
933
934         * src/slide.c (encode_alloc): used newly named `dicbit' macro.
935
936         * src/shuf.c (read_tree_p): ditto.
937         (decode_start_fix): ditto.
938
939         * src/lha_macro.h: `xxx_DICBIT' for each method was defined.
940
941         * src/header.c: correct a comment `Generic stamp format'.
942         (get_bytes): fixed for dumping header.
943
944         * src/lha_macro.h, src/lha.h: `EXTERN' macro definition was moved
945         to lha.h.
946
947         * src/header.c (get_bytes): print hex codes for invisible chars.
948
949         * src/lhlist.c: hate global variables.
950
951         * src/prototypes.h (convdelim): removed.
952
953         * src/lhlist.c (print_stamp): use ISO 8601 date format when `lha vv'.
954
955 2002-08-14  Koji Arai  <jca02266@nifty.ne.jp>
956
957         * src/header.c: discarded warning message for the extended header,
958         `Windows time stamp' ignored.
959
960         * src/header.c: in spite of extended type value, read contents of
961         any ext headers.
962
963         * src/header.c: comment fixed.
964
965 2002-08-12  Koji Arai  <jca02266@nifty.ne.jp>
966
967         * src/header.c (dump_skip_bytes): do nothing when length is 0.
968
969 2002-08-11  Koji Arai  <jca02266@nifty.ne.jp>
970
971         * src/lha_macro.h (SJC_FIRST_P): rename to SJIS_FIRST_P.
972         (SJC_SECOND_P): rename to SJIS_SECOND_P.
973
974         * src/util.c (convdelim): removed.
975
976         * src/header.c (convert_filename): when small letter is included
977         in filename, do not convert case.
978
979         * tests/lha-test.in, tests/lha-test2, tests/lha-test3, tests/lha-test4, tests/lha-test5, tests/lha-test6, tests/lha-test7, tests/lha-test8, tests/lha-test9, tests/lha-test10, tests/lha-test11, tests/lha-test12, tests/lha-test13:
980         print filename when test failed.
981
982         * tests/lha-test.in, tests/lha-test12, tests/lha-test13:
983         added tests for converting text files.
984
985         * src/header.c (get_extended_header): recognize the Windows time
986         stamp header (0x41), but ignored.
987
988         * src/header.c (write_unix_info): added.
989
990 2002-08-11  Koji Arai  <jca02266@nifty.ne.jp>
991
992         * released.
993
994         * configure.ac: updated version.
995
996         * 00readme.autoconf: modified.
997
998         * src/header.c: DUMP_HEADER is always true.
999         dump header when running `lha vvv foo.lzh'.
1000         (get_header): added new extend type JAVA.
1001
1002         * src/lha_macro.h (EXTEND_JAVA): added new extend type JAVA.
1003
1004         * src/lhlist.c (list_one): ditto.
1005
1006         * src/lharc.c (init_variable): `verbose' is changed to successive.
1007         (main): ditto.
1008
1009 2002-08-10  Koji Arai  <jca02266@nifty.ne.jp>
1010
1011         * src/lhlist.c (list_one): fixed mode checks.
1012
1013         * src/prototypes.h: updated.
1014
1015         * src/header.c (get_header_level2): check CRC value for reading
1016         level 2 and 3 header.
1017         (get_header_level3): ditto.
1018         (get_extended_header): ditto.
1019         (get_header_level0): set total header size to
1020         `LzHeader.header_size' even if level 0 or 1 header is read.
1021         (get_header_level1): ditto.
1022
1023         * src/append.c (encode_lzhuf): encode(), decode() and copyfile()
1024         were changed.
1025         (put_indicator): moved from crcio.c.
1026
1027         * src/crcio.c (put_indicator): moved to append.c.
1028         (calccrc): generalized.
1029         (fread_crc): changed interface.
1030         (fwrite_crc): changed interface.
1031         (calc_header_crc): removed. use calccrc() instead.
1032
1033         * src/extract.c (decode_lzhuf): copyfile() and decode() were changed.
1034
1035         * src/lha.h: hate global variable. `crc' is removed.
1036         `reading_size' moved to append.c.
1037
1038         * src/lha_macro.h (INITIALIZE_CRC): newly added.
1039         (UPDATE_CRC): no update in macro code.
1040
1041         * src/lhadd.c (temporary_to_new_archive_file): copyfile() was changed.
1042
1043         * src/lharc.c (copy_old_one): header size adjusting is done by
1044         the get_header().
1045
1046         * src/slide.c (update): changed interface.
1047         (get_next): ditto.
1048         (encode): ditto.
1049         (decode): ditto.
1050
1051         * src/util.c (copyfile): changed interface.
1052
1053 2002-08-10  Koji Arai  <jca02266@nifty.ne.jp>
1054
1055         * tests/lha-test5: added tests using pipe.
1056
1057         * src/lhadd.c (cmd_add): applied reverse patch.  intermediate file
1058         is the necessary when created archive put in pipe.
1059
1060         * src/header.c (skip_bytes): newly added.
1061         (dump_get_byte): newly added for dumping the data for debugging.
1062         (dump_skip_bytes): ditto.
1063         (get_word): ditto.
1064         (get_longword): ditto.
1065         (get_bytes): ditto.
1066         (get_extended_header): modified for reading the level 3 header.
1067         (get_header_level3): newly added.
1068
1069         * src/lha.h (struct LzHeader): for level 3 header, added a new
1070         member `size_field_length' and changed type of the `header_size'
1071         from int to long.
1072
1073         * src/header.c (init_header): the `hdr->method' should be
1074         initialized to the "-lh0-" for empty files.
1075
1076         * tests/lha-test2: ditto.
1077
1078         * src/lhadd.c (add_one): should print indicator for empty files.
1079
1080 2002-08-09  Koji Arai  <jca02266@nifty.ne.jp>
1081
1082         * tests/lha-test.in: adapt to ksh (and posix shell).
1083
1084 2002-08-05  Koji Arai  <jca02266@nifty.ne.jp>
1085
1086         * 00readme.autoconf: refined.
1087
1088         * config.h.in (BACKUP_OLD_ARCHIVE): added.
1089
1090         * configure.ac: added a command line switch `--enable-backup-archive'.
1091
1092         * src/lhadd.c (cmd_add): if `backup_old_archive' is true, no
1093         backup archive.
1094         (cmd_delete): ditto.
1095
1096         * src/lharc.c (init_variable): initialize `backup_old_archive'.
1097
1098         * src/lha.h (backup_old_archive): added for nobackup.
1099
1100 2002-08-02  Koji Arai  <jca02266@nifty.ne.jp>
1101
1102         * src/lha_macro.h, src/lha.h, src/header.c, src/lhadd.c: Fixed
1103         misspelling, not `STRAGE' but `STORAGE'.
1104
1105 2002-07-29  Koji Arai  <jca02266@nifty.ne.jp>
1106
1107         * re-released.
1108
1109         * src/header.c: should use error() instead of fatal_error().
1110         (get_header): fixed wrong end mark checking.
1111
1112         * src/prototypes.h: updated.
1113
1114         * released.
1115
1116         * configure.ac: updated version.
1117
1118         * 00readme.autoconf: described about header.c bug on original lha.
1119
1120 2002-07-28  Koji Arai  <jca02266@nifty.ne.jp>
1121
1122         * tests/Makefile.am: added lha-test11.
1123
1124         * src/crcio.c (fread_txt): responded to (gcc -Wall) compiler warnings.
1125
1126         * src/header.c (generic_to_unix_stamp): ditto.
1127
1128         * src/lha_macro.h: ditto.
1129
1130         * src/lhadd.c (delete): ditto.
1131
1132         * src/lharc.c (open_old_archive): ditto.
1133
1134         * src/lhlist.c (list_one): ditto.
1135
1136         * src/prototypes.h: updated.
1137
1138         * tests/lha-test.in: added lha-test11.
1139
1140         * tests/lha-test8: added tests for level 0 and 2 header.
1141
1142         * tests/lha-test10: added tests for generic header.
1143
1144         * tests/lha-test11: testing for long filename. moved from lha-test10.
1145
1146 2002-07-26  Koji Arai  <jca02266@nifty.ne.jp>
1147
1148         * src/header.c (write_header): rewritten.
1149
1150 2002-07-25  Koji Arai  <jca02266@nifty.ne.jp>
1151
1152         * tests/lha-test4: stderr should be redirected.
1153
1154         * src/lharc.c (main): exit with status 1 (meaning failure) when the
1155         function error() was called.
1156         (error): ditto.
1157
1158         * src/lha.h (LzHeader.last_modified_stamp;): no longer used it.
1159
1160         * src/header.c (get_header): rewritten.
1161
1162 2002-07-21  Koji Arai  <jca02266@nifty.ne.jp>
1163
1164         * tests/lha-test10: change grep pattern so that pattern matches
1165         a carriage return at the end of line for MinGW.
1166
1167         * src/lha.h: define `struct utimbuf' when utime.h is not given
1168         such as MinGW. (Microsoft Visual Studio 6.0 has sys/utime.h).
1169
1170         * src/lhext.c (make_parent_path): missing braces.
1171
1172         * tests/lha-test.in (check): print script line number when test failed.
1173
1174         * tests/lha-test2, tests/lha-test3, tests/lha-test4, tests/lha-test5, tests/lha-test6, tests/lha-test7, tests/lha-test8, tests/lha-test9, tests/lha-test10: ditto.
1175
1176         * tests/lha-test10: on Cygwin/MinGW, could not make 255 bytes
1177         filename. (the system limit of filename length contains the length
1178         of current directory.)
1179
1180         * tests/lha-test10: should use /bin/ls instead of ls, since
1181         /usr/ucb/ls puts size on 4th field (on Solaris).
1182
1183 2002-07-18  Koji Arai  <jca02266@nifty.ne.jp>
1184
1185         * released.
1186
1187         * configure.ac: updated version.
1188
1189         * src/lhext.c (adjust_info): should use `struct utimbuf' for
1190         `utime(2)' rather than `time_t' array.
1191
1192         * src/header.c (write_header): [BUG]: should not write zero at the
1193         first byte on level 2 header. should adjust header size.
1194
1195         * tests/lha-test10: added tests for level 2 header.
1196
1197         * src/lha_macro.h, src/header.c (setup_get): moved to header.c.
1198         (get_byte): ditto.
1199         (put_ptr): ditto.
1200         (setup_put): ditto.
1201         (put_byte): ditto.
1202         (get_bytes): newly added.
1203         (put_bytes): newly added.
1204
1205 2002-07-17  Koji Arai  <jca02266@nifty.ne.jp>
1206
1207         * src/header.c (get_header): [BUG]: Could not read level 2 header
1208         when the header size is grater than 256.
1209         (convert_filename): Should use the `FILENAME_LENGTH' macro rather
1210         than 256.
1211         (write_header): [BUG]: Suppress to overflow the header size when
1212         long filename is written in level 0 or 1 header. On level 1
1213         header, always use the extended filename header instead of the
1214         base header.
1215
1216         * src/lha.h (LzHeader): the type of `header_size' was changed
1217         from `unsigned char' to `int', for the level 2 header archive.
1218
1219         * src/lhext.c (extract_one): should use the `FILENAME_LENGTH'
1220         macro rather than 256 (provisionally fixed).
1221
1222         * tests/lha-test.in: notify failed test number.
1223
1224         * tests/lha-test10: added tests for long pathname.
1225
1226 2002-07-14  Koji Arai  <jca02266@nifty.ne.jp>
1227
1228         * re-released.
1229
1230         * src/header.c (get_header): archive path separator should be
1231         converted always.
1232
1233         * released.
1234
1235         * configure.ac: updated version.
1236
1237         * src/header.c (write_header): if user/group name is not set,
1238         extended header (0x52 and 0x53) should not be made.
1239
1240         * tests/lha-test10: added testing to handle deep directory.
1241
1242         * src/header.c (write_header): fixed typo, not strchr() but
1243         strrchr().
1244
1245         * src/prototypes.h: regenerated.
1246
1247         * src/header.c (convert_filename): prefer to use the
1248         `FILENAME_LENGTH' macro rather than 256.
1249
1250         * src/cproto.sh: fixed typo.
1251
1252 2002-07-11  Koji Arai  <jca02266@nifty.ne.jp>
1253
1254         * tests/Makefile.am (EXTRA_DIST): lha-test9 and lha-test10 were missed.
1255
1256         * src/lharc.c (print_tiny_usage): no exit here.
1257
1258         * src/header.c (ConvertEncodingByIconv): newly added.
1259         Thanks to Hiroto Sakai.
1260
1261         * configure.ac, config.h.in: Checking to have iconv() for utf-8
1262         conversion.
1263
1264         * configure.ac: Checking whether strrchr() is 8 bit clean or not.
1265         On Mac OS X, strchr() can handle 8 bit characters, but strrchr()
1266         cannot.
1267         Should use '\377' rather than '\xff' for de-ANSI compiler.
1268
1269 2002-07-10  Koji Arai  <jca02266@nifty.ne.jp>
1270
1271         * released.
1272
1273         * configure.ac: updated version.
1274
1275         * src/header.c: change hex codes '\xff' to octal codes '\377'.
1276
1277         * tests/lha-test.in: Skip the lha-test9. (this test is imcomplete
1278         for now)
1279
1280         * tests/lha-test10: Should extract directory even if the archive
1281         header was level 0.
1282
1283         * src/header.c (get_header): Should convert kanji code and path
1284         separator for the level 0 header entry.
1285         Should convert `\' to `/' for level 0 header (do always to make sure,
1286         SO CANNOT CONTAIN THE `\' IN FILENAME).
1287         (init_header): [BUG]: Should not convert path separator here (Should do
1288         in write_header()).
1289         (write_header): [BUG]: should set pathname (contains directory part) to
1290         the LzHeader.name field on level 0 header archive even if the
1291         archive methods is -lhd-.
1292
1293 2002-07-09  Koji Arai  <jca02266@nifty.ne.jp>
1294
1295         * src/lha.h, src/header.c: the CoreFoundation header inclusion
1296         moved to header.c.
1297
1298         * src/lha.h, src/lharc.c, IFNAMES: macro NODIRECTORY was removed.
1299
1300         * src/lha.h, src/lhadd.c, src/lharc.c, src/lhext.c: fixed
1301         misspelling, not `writting' but `writing'.
1302
1303 2002-07-07  Koji Arai  <jca02266@nifty.ne.jp>
1304
1305         * src/lha.h, src/lha_macro.h: refined.
1306
1307         * src/lhadd.c (append_it): macro STRING_COMPARE() was discarded.
1308
1309         * src/lha_macro.h: ditto.
1310
1311         * IFNAMES: NOVOID was removed.
1312
1313         * src/lharc.c (main): terminate with exit status 2 when specified
1314         command line switche is wrong,
1315
1316         * configure.ac, config.h.in: added checking utime.h existent.
1317
1318         * src/crcio.c (putc_euc): void returned.
1319
1320         * src/header.c, src/lha.h, src/lha_macro.h, src/lhadd.c: refined.
1321
1322         * src/lharc.c, src/prototypes.h, src/slide.c: refined.
1323
1324         * configure.ac: should specify the 4th argument to AC_TRY_RUN()
1325         for cross compiling.
1326
1327         * configure.ac: fix a test expression.
1328
1329         * src/cproto.sh: added for maintainer.
1330
1331         * src/lha.h: support de-ANSI variable arguments.
1332
1333         * src/lharc.c: ditto.
1334
1335         * src/util.c: ditto.
1336
1337         * src/Makefile.am (lha_SOURCES): added prototypes.h.
1338
1339         * src/lha.h: function prototypes moved to prototypes.h.
1340
1341         * src/prototypes.h: generated by the cproto command.
1342
1343         * configure.ac: On Mac OS X, in spite of using the CoreFoundation
1344         for utf-8 conversion, I have missed specifying the `-framework
1345         CoreFoundation' in LDFLAGS.
1346
1347         * src/Makefile.am (EXTRA_DIST): no need to specify `lhdir.c'.
1348
1349 2002-07-06  Koji Arai  <jca02266@nifty.ne.jp>
1350
1351         * released.
1352
1353         * configure.ac: updated version.
1354
1355         * tests/lha-test10: added testing the header level 0, 1 and 2.
1356
1357         * tests/lha-test.in: ditto.
1358
1359         * src/lharc.c: `#include <stdarg.h>' moved to lha.h.
1360
1361         * src/lha.h: ditto.
1362
1363         * src/util.c: ditto.
1364
1365         * configure.ac: AC_REPLACE_FUNCS(vsnprintf).
1366
1367         * config.h.in: ditto.
1368
1369         * src/lha.h: ditto.
1370
1371         * src/vsnprintf.c: derived snprintf() which has the BSD licence.
1372
1373         * configure.ac: fix typo.
1374
1375         * configure.ac: checking whether strchr() is 8 bit clean or not.
1376
1377         * config.h.in: ditto.
1378
1379         * src/util.c: give functions strchr(), strrchr(), memchr() and
1380         memrchr() which handle 8 bit characters correctly.
1381
1382         * src/header.c: use above if needed.
1383
1384         * src/lha_macro.h: deprecate the macro name `DELIM2' which is path
1385         separattor for the filename in lha header.
1386         use LHA_PATHSEP instead.
1387
1388         * src/util.c (convdelim): ditto.
1389
1390         * src/header.c (convert_filename): ditto.
1391         (write_header): ditto.
1392
1393         * src/header.c (convert_filename): fixed bug on utf8 conversion,
1394         provisionally.
1395
1396 2002-06-30  Koji Arai  <jca02266@nifty.ne.jp>
1397
1398         * configure.ac: fixed typo.
1399
1400         * src/header.c (sjis_to_utf8): fixed typo.
1401         (utf8_to_sjis): fixed typo.
1402
1403         * src/lhadd.c (cmd_add): Missed to adjust the index when specified
1404         adding file is same as the generating archive file.
1405
1406 2002-06-29  Koji Arai  <jca02266@nifty.ne.jp>
1407
1408         * src/header.c (convert_filename): rename a function
1409         `filename_conv()' to `convert_filename()'.
1410         (sjis_to_utf8_static): no use the static variable.
1411         (utf8_to_sjis_static): ditto.
1412
1413         * src/lha.h: rename sjis_to_utf8_static() and utf8_to_sjis_static()
1414         into sjis_to_utf8() and utf8_to_sjis().
1415
1416         * src/lha_macro.h: added a macro `CODE_UTF8'.
1417
1418         * configure.ac: decide CODE_UTF8.
1419         updated version.
1420
1421         * 00readme.autoconf: modified.
1422
1423         * configure.ac: modified for Mac OS X.
1424
1425         * src/header.c, lha.h, lha_macro.h, lharc.c: Merged a patch for
1426         the Mac OS X, convert utf-8 filename to shift_jis. This patch was
1427         contributed on LHa BBS. Thanks to Hiroto Sakai.
1428
1429         * src/lhext.c: replaced bcmp() with memcmp().
1430
1431         * src/lha_macro.h: ditto.
1432
1433         * src/append.c: replace bcopy() with memcpy() or memmove().
1434
1435         * src/lha_macro.h: ditto.
1436
1437         * src/lhadd.c: ditto.
1438
1439         * src/lharc.c: ditto.
1440
1441         * src/header.c: ditto.
1442         replace bzero() with memset().
1443
1444         * src/lhadd.c (cmd_add): exlclude the target archive. (reported on
1445         the LHa BBS [28])
1446
1447         * src/slide.c (encode_alloc): Wrong value was assigned to the
1448         `dicbit', when SUPPORT_LH7 was not defined. (fixed by DANGAN,
1449         reported on the LHa BBS [38]).
1450
1451         * src/lha_macro.h: ditto.
1452
1453         * src/shuf.c (decode_c_st0): the method of -lh3- extraction was
1454         fixed by DANGAN (reported on the LHa BBS [35]).
1455
1456         * src/lha_macro.h (LH3_DICBIT): ditto.
1457
1458         * src/dhuf.c (encode_c_dyn): the method of -lh1- compression was
1459         refined by DANGAN (reported on the LHa BBS [30], [39], [62]).
1460
1461 2002-06-26  Koji Arai  <jca02266@nifty.ne.jp>
1462
1463         * tests/lha-test4: Skip a test for the LHa for UNIX (original version).
1464
1465         * tests/lha-test3: Rewrite tests for generic format archives.
1466
1467         * tests/lha-test2: Added tests for -lh0- method.
1468         Moved from contents of lha-test3 (tests for print archive).
1469
1470 2002-06-23  Koji Arai  <jca02266@nifty.ne.jp>
1471
1472         * tests/lha-test.in: On Cygwin/MinGW, cannot test lha-test9.
1473
1474         * src/lhext.c: Fixed a misspelling. not `Symblic' but `Symbolic'.
1475           reported on LHa BBS (see <http://www2m.biglobe.ne.jp/~dolphin/>).
1476
1477         * src/lharc.c: ditto.
1478
1479         * src/slide.c (interface;): Fixed wrong index.
1480           reported on LHa BBS (see <http://www2m.biglobe.ne.jp/~dolphin/>).
1481
1482         * 00readme.autoconf: refined.
1483
1484         * tests/lha-test9: added tests for overriding files.
1485
1486         * tests/lha-test.in: added test9.
1487
1488         * src/lhext.c (cmd_extract): ftell(stdin) will return -1, so
1489         re-fixed provisionaly.
1490
1491         * src/lhext.c (cmd_extract): When error occurred in extract_one(),
1492         should adjust point of file stream.
1493
1494         * configure.ac: library checkings (for libmingwex) should be done
1495         before header checkings.
1496
1497 2002-06-22  Koji Arai  <jca02266@nifty.ne.jp>
1498
1499         * released:
1500
1501         * configure.ac: updated version.
1502
1503         * src/lharc.c (init_variable): Removed useless assignments.
1504
1505         * src/lharc.c (main): Behavior was changed. when `q' or `q2' option
1506         (not `q1') is specified, the `f' option is enabled implicitly.
1507         In original behavior, the option `q', `q0', `q1' and `q2' will
1508         enable `f' option implicitly (bug?).
1509
1510         * src/lharc.c (main): [BUG]: When `q2' option is specified,
1511         level 2 header is generated.
1512
1513 2002-06-21  Koji Arai  <jca02266@nifty.ne.jp>
1514
1515         * tests/Makefile.am: Use the `DISTCLEANFILES' variable instead of the `dist-hook' target.
1516
1517         * tests/Makefile.am: Added `dist-hook' target for `make distcheck'.
1518
1519         * tests/lha-test.in: All tests are splited into some files.
1520
1521         * tests/Makefile.am: ditto.
1522
1523         * tests/lha-test2: ditto.
1524
1525         * tests/lha-test3: ditto.
1526
1527         * tests/lha-test4: ditto.
1528
1529         * tests/lha-test5: ditto.
1530
1531         * tests/lha-test6: ditto.
1532
1533         * tests/lha-test7: ditto.
1534
1535         * tests/lha-test8: ditto.
1536
1537 2002-06-20  Koji Arai  <jca02266@nifty.ne.jp>
1538
1539         * src/lhadd.c (cmd_add): No create an intermediate file when archive
1540         is written in stdout.
1541
1542 2002-06-19  Koji Arai  <jca02266@nifty.ne.jp>
1543
1544         * 00readme.autoconf: Modified.
1545
1546 2002-06-18  Koji Arai  <jca02266@nifty.ne.jp>
1547
1548         * configure.in: Removed. (no support the Autoconf version 2.13).
1549
1550         * config.h.in: Changed meaning of the value of the `MULTIBYTE_FILENAME'.
1551
1552         * src/header.c: Remove preprocess codes for kanji code decision.
1553
1554         * configure.ac: When --enable-multibyte-filename[=auto] is specified,
1555         decide kanji code for filename automatically.
1556         Otherwise, euc or sjis is specified, it is EUC-JP or Shift_JIS.
1557
1558 2002-06-17  Koji Arai  <jca02266@nifty.ne.jp>
1559
1560         * configure.in, configure.ac: updated version.
1561
1562         * configure.in, configure.ac: On mingw-runtime-2.0-1, opendir()
1563         has moved to libmingwex.a. For now, not listed in the
1564         /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/specs file.
1565
1566         * src/lharc.c (message): use variable argument list with stdarg.
1567         (warning): ditto.
1568         (error): ditto.
1569         (write_error): removed.
1570         (read_error): removed.
1571         (build_temporary_name): use xsnprintf().
1572         (open_old_archive): ditto.
1573         (expanded_archive_name): move in the function (open_old_archive()) as static.
1574
1575         * src/crcio.c (putcode): changed for fatal_error().
1576         (putbits): changed for fatal_error().
1577         (fwrite_crc): ditto.
1578         (putc_euc): should return EOF when putc() cause error.
1579         (fwrite_txt): changed for putc_euc().
1580
1581         * src/header.c (get_header): changed for fatal_error(), warning() and error().
1582         (init_header): use xsnprintf().
1583         (write_header): fixed wrong usage of fwrite().
1584
1585         * src/lha.h: updated declarations.
1586
1587         * src/lhadd.c (append_it): changed for error().
1588
1589         * src/lhext.c (inquire_extract): ditto.
1590
1591         * src/lhlist.c (cmd_list): ditto.
1592
1593         * src/maketbl.c (make_table): ditto.
1594
1595         * src/util.c (copyfile): changed for fatal_error().
1596         (xsnprintf): newly added to adopt to various snprintf().
1597
1598 2002-06-12  Koji Arai  <jca02266@nifty.ne.jp>
1599
1600         * src/lha_macro.h (UNIX_STICKYBIT): fixed a misspelling.
1601
1602         * src/lhlist.c (list_one): ditto.
1603
1604 2002-06-11  Koji Arai  <jca02266@nifty.ne.jp>
1605
1606         * src/lharc.c: index was wrong.
1607           reported on LHa BBS (see <http://www2m.biglobe.ne.jp/~dolphin/>).
1608
1609 2002-06-06  Koji Arai  <jca02266@nifty.ne.jp>
1610
1611         * configure.ac, configure.in: changed macro name.
1612         not multibyte-char but multibyte-filename.
1613         not MULTIBYTE_CHAR but MULTIBYTE_FILENAME.
1614
1615         * 00readme.autoconf: ditto.
1616
1617         * config.h.in: ditto.
1618
1619         * src/util.c: ditto.
1620
1621         * src/lha_macro.h: ditto.
1622
1623         * src/header.c: ditto.
1624
1625         * config.h.in (INCLUDE_OWNER_NAME_IN_HEADER): changed macro name.
1626
1627         * configure.ac: ditto.
1628
1629         * src/header.c (init_header): ditto.
1630
1631         * src/header.c (init_header): should clear LzHeader.
1632
1633 2002-06-05  Koji Arai  <jca02266@nifty.ne.jp>
1634
1635         * released.
1636
1637         * configure.ac (AC_INIT): changed package name and specified tar name.
1638
1639         * src/lharc.c: added `--help' command line switch.
1640
1641         * Makefile.am: fixed EXTRA_DIST for 00readme.autoconf renaming.
1642
1643         * README.autoconf, 00readme.autoconf: renamed.
1644
1645         * configure.ac, configure.in: updated version.
1646
1647 2002-06-04  Koji Arai  <jca02266@nifty.ne.jp>
1648
1649         * README.autoconf, header.doc.euc: describe about user/group name
1650         header.
1651
1652         * src/header.c (init_header): added a macro MAKE_USER_NAME_HEADER.
1653
1654         * configure.ac, configure.in, config.h.in: added a switch
1655         `--enable-user-name-header' whether user/name extended header is
1656         made.
1657
1658 2002-06-01  Koji Arai  <jca02266@nifty.ne.jp>
1659
1660         * README.autoconf: `-i' switch of automake is deprecated.
1661
1662 2002-05-29  Koji Arai  <jca02266@nifty.ne.jp>
1663
1664         * configure.in, configure.ac, config.h.in: checks having uid_t/gid_t.
1665
1666         * src/lha.h: define uid_t/gid_t as `int' if no have it.
1667
1668         * src/lhext.c (adjust_info): mismatched braces.
1669
1670         * header.doc.euc: around user/group name extention.
1671
1672         * configure.in, configure.ac, config.h.in: checks having
1673         getpwuid/getgrgid and so on.
1674
1675         * src/header.c (get_header): use the extend header, user/group name.
1676         (init_header): ditto.
1677
1678         * src/lha.h: added <pwd.h>, <grp.h> header includings.
1679
1680         * src/lhext.c (adjust_info): change owner/group according to
1681         user/group name when extracting.
1682
1683         * src/lhlist.c (list_one): print user/group name when the header
1684         has them.
1685         (list_one): correct column position on OS68K.
1686
1687         * tests/lha-test.in: added timestamp checks.
1688
1689         * src/lha_macro.h: comment about OS code.
1690
1691 2002-05-28  Koji Arai  <jca02266@nifty.ne.jp>
1692
1693         * src/lharc.c (xstrdup): no need to call fatal_error().
1694
1695         * src/lhdir.h, src/lha_macro.h, src/lha.h: added modeline for vi(m).
1696
1697         * configure.ac, config.h.in: use new autoconf macro, AC_CHECK_MEMBERS().
1698
1699         * IFNAMES, configure.in, src/header.c, src/lharc.c: replaced with
1700         new macro name to adopt to the AC_CHECK_MEMBERS().
1701
1702 2002-05-27  Koji Arai  <jca02266@nifty.ne.jp>
1703
1704         * tests/lha-test.in: use awk instead of GNU sh-utils's `seq'.
1705
1706         * src/header.c (filename_conv): fix a bug, reverse condition and
1707         conversion for filename case.
1708
1709         * README.autoconf: added description about `get_filename_from_stdin' feature.
1710
1711         * tests/lha-test.in: remove test around the `get_filename_from_stdin'.
1712
1713         * src/lharc.c (main): never set `get_filename_from_stdin` to true.
1714         `echo foo | lha x foo.lzh' does not work like original LHa for UNIX.
1715
1716         * tests/lha-test.in: replace with #!/bin/bash.
1717
1718         * README.autoconf: added E-Mail address.
1719
1720         * configure.ac: updated version and added mail address for bug reports.
1721
1722         * configure.in: updated version.
1723
1724         * released.
1725
1726         * README.autoconf: added `make check' on sample description.
1727
1728         * configure.in, configure.ac: update version.
1729
1730 2002-05-26  Koji Arai  <jca02266@nifty.ne.jp>
1731
1732         * tests/lha-test.in: added some tests.
1733
1734         * tests/Makefile.am: refined.
1735
1736         * src/lhext.c (cmd_extract): discard useless fseek() calling (for MinGW).
1737
1738         * tests/lha-test.in: added some tests.
1739
1740         * tests/lha-test.in: specified `q' option on print archive test.
1741
1742         * src/lhadd.c (build_backup_file): On MinGW, cannot rename when
1743         a new file already exists.
1744
1745         * src/lhext.c (extract_one): On MinGW, set binary on stdout when
1746         print archive (`p' switch).
1747
1748         * tests/lha-test.in: added some tests.
1749
1750         * src/lhadd.c (report_archive_name_if_different): warning messages
1751         should be printed to stderr rather than stdout.
1752         (cmd_delete): ditto.
1753
1754         * tests/Makefile.am: fix EXTRA_DIST.
1755
1756         * configure.in, configure.ac: update version.
1757
1758         * tests/lha-test.in: added tests.
1759
1760         * tests/Makefile.am: ditto.
1761
1762         * configure.in, configure.ac, Makefile.am: ditto.
1763
1764 2002-05-25  Koji Arai  <jca02266@nifty.ne.jp>
1765
1766         * IFNAMES: updated.
1767
1768         * released.
1769
1770         * README.autoconf: added description for developpers.
1771
1772         * configure.in, configure.ac, config.h.in: refined.
1773
1774         * src/util.c (memmove): use HAVE_MEMMOVE.
1775         (mkdir): use HAVE_WORKING_FORK.
1776
1777         * src/huf.c: use HAVE_SYS_PARAM_H instead of sony_news.
1778
1779         * IFNAMES (sony_news): updated.
1780
1781         * configure.ac, configure.in (AC_INIT): added autoconfiscated date.
1782         see `lha --version'.
1783
1784 2002-05-22  Koji Arai  <jca02266@nifty.ne.jp>
1785
1786         * src/append.c, src/crcio.c, src/dhuf.c, src/extract.c, src/header.c, src/huf.c, src/larc.c, src/lhadd.c, src/lharc.c, src/lhdir.c, src/lhext.c, src/lhlist.c, src/maketbl.c, src/maketree.c, src/patmatch.c, src/shuf.c, src/slide.c, src/util.c:
1787         added modeline for vi(m).
1788
1789         * src/lharc.c: backslash was missing.
1790
1791 2002-05-20  Koji Arai  <jca02266@nifty.ne.jp>
1792
1793         * src/lharc.c (open_old_archive):  On MinGW, set binary stdin.
1794
1795         * src/lhadd.c (temporary_to_new_archive_file): On MinGW, set binary stdout.
1796
1797         * src/lha_macro.h: no define TMP_FILENAME_TEMPLATE in source.
1798
1799         * configure.ac, configure.in, README.autoconf: be able to specify
1800         --with-tmp-file=no which meaning TMP_FILENAME_TEMPLATE is undefined.
1801
1802         * src/lha.h: correct usage of mkstemp().
1803         On MinGW, opening file cannot be removed.
1804
1805         * src/lhadd.c (build_temporary_file): ditto.
1806
1807         * src/lharc.c (fatal_error): ditto.
1808
1809 2002-05-19  Koji Arai  <jca02266@nifty.ne.jp>
1810
1811         * configure.in, configure.ac: added AM_C_PROTOTYPES, AC_C_CONST.
1812         no use AM_C_PROTOTYPES for the present.
1813
1814         * config.h.in: ditto.
1815
1816         * src/lharc.c (print_tiny_usage_and_exit): change credit.
1817
1818         * src/lha_macro.h: put PLATFORM in a macro LHA_VERSION.
1819
1820         * src/lharc.c (print_version): ditto.
1821
1822         * configure.ac: use AC_CANONICAL_TARGET instead of AC_CANONICAL_HOST.
1823
1824 2002-05-19  Koji Arai  <jca02266@nifty.ne.jp>
1825
1826         * released.
1827
1828         * src/lharc.c (print_tiny_usage_and_exit): added credit.
1829         (print_version): print PLATFORM.
1830
1831         * configure.ac, configure.in, config.h.in: define PLATFORM.
1832
1833         * src/lharc.c (xstrdup): fix typo.
1834
1835         * configure.ac: added for autoconf-2.53.
1836
1837         * config.h.in: regenerate by autoconf-2.53.
1838
1839         * src/lharc.c (find_files): MinGW has st_ino but always 0.
1840
1841         * src/lharc.c (main): provisionally fix. set
1842         `get_filename_from_stdin' to false.
1843
1844         * src/util.c (rename): use builtin rename(2) on mingw32 (since have
1845         no link(2)).
1846
1847         * src/lharc.c (main): use xrealloc().
1848
1849         * src/lha_macro.h: specify "b" modifier always (for mingw32).
1850
1851         * src/lharc.c: use xstrdup() instead of strdup().
1852
1853         * src/lha_macro.h: ditto.
1854
1855         * src/lha_macro.h: getuid(), chown(), kill() are provisionally
1856         defined as 0.
1857
1858         * src/header.c: set `default_system_kanji_code' to Shift_JIS on mingw32.
1859
1860         * src/lhadd.c (build_temporary_file): no use SIGHUP for mingw32.
1861         (build_backup_file): ditto.
1862
1863         * src/lharc.c (interrupt): ditto.
1864
1865         * src/lhext.c (extract_one): ditto.
1866
1867         * src/lhext.c (make_parent_path): mkdir() has no 2nd argument on
1868         mingw32.
1869
1870 2002-05-18  Koji Arai  <jca02266@nifty.ne.jp>
1871
1872         * lha_macro.h: define bcmp(), bzero(), bcopy() even if
1873         STDC_HEADERS is defined.
1874
1875         * huf.c (alloc_buf): call fatal_error() when memory allocation failed
1876         instead of returning NULL.
1877
1878         * lharc.c (main): use xmalloc().
1879
1880         * util.c (copyfile): use xmalloc().
1881
1882         * slide.c (encode_alloc): use xmalloc().
1883
1884         * header.c (default_system_kanji_code): On HP-UX, use Shift_JIS as
1885         default kanji code.
1886
1887 2001-02-03  Koji Arai  <jca02266@nifty.ne.jp>
1888
1889         * README.autoconf, src/header.c: treat archive and system kanji
1890         code, correctly.
1891
1892 2001-01-31  Koji Arai  <jca02266@nifty.ne.jp>
1893
1894         * configure.in: mistakes for default archive method.
1895
1896         * src/header.c: directory separator 0xff must be transpose slash
1897         at first.
1898
1899 2001-01-29  Koji Arai  <jca02266@nifty.ne.jp>
1900
1901         * src/lharc.c: replace MKSTEMP with HAVE_MKSTEMP.
1902         substitute DEFAULT_LZHUFF_METHOD for the `compress_method' variable (it's default value).
1903
1904         * src/lha_macro.h: use the VERSION macro (defined by configure) for
1905         the LHA_VERSION definition.
1906
1907         * src/header.c: added condition whether the macro MULTIBYTE_CHAR
1908         is defined or not.
1909
1910         * src/Makefile.am: added $(SUPPORT_LZHUFF_METHOD) in AM_CPPFLAGS.
1911
1912         * configure.in: change version number from 1.14f to 1.14i.
1913         check function mkstemp().
1914         replace --enable-lh6 option to --with-default-method=[567].
1915
1916         * config.h.in: added definitions of HAVE_MKSTEMP and
1917         DEFAULT_LZHUFF_METHOD.
1918
1919         * IFNAMES: added a description about MKSTEMP.
1920
1921         * Makefile.am: added extra files.
1922
1923         * change-114f.txt, src/extract.c, src/header.c, src/huf.c, src/lha.h, src/lha_macro.h, src/lhadd.c, src/lharc.c, src/lhext.c, src/lhlist.c, src/maketbl.c, src/maketree.c, src/shuf.c, src/slide.c, src/util.c, src/dhuf.c, src/crcio.c:
1924         merged changing from lha-1.14f to lha-1.14i.
1925
1926         * change-114i.txt, src/header.c, src/huf.c, src/lha.h, src/lharc.c:
1927         import lha-114i
1928
1929         * src/huf.c, src/lharc.c, src/shuf.c, src/slide.c: import lha-114h
1930
1931         * Makefile, README.euc, change-114g.txt, change-114h.txt:
1932         import lha-114h
1933
1934         * src/crcio.c, src/dhuf.c, src/extract.c, src/header.c, src/huf.c, src/lha.h, src/lha_macro.h, src/lhadd.c, src/lharc.c, src/lhext.c, src/util.c:
1935         import lha-114g
1936
1937         * MACHINES2.euc, Makefile, README.euc, change-114g.txt, config.eng, config.jpn.euc, header.doc.euc, src/lhlist.c, src/maketbl.c, src/maketree.c, src/makezero.c, src/shuf.c, src/slide.c:
1938         import lha-114g
1939
1940         * src/header.c, src/lha_macro.h: implemented kanji code conversion
1941         on filename.
1942
1943         * src/header.c: fix bug in euc2sjis().
1944
1945 1999-10-05  Koji Arai  <jca02266@nifty.ne.jp>
1946
1947         * src/header.c: rename the macro HANKAKU_KATAKANA_P to the X0201_KANA_P
1948
1949 1999-09-30  Koji Arai  <jca02266@nifty.ne.jp>
1950
1951         * IFNAMES, configure.in, Makefile.in.org, README.autoconf, config.h.in, man/Makefile.am, src/Makefile.am, src/Makefile.in.org, Makefile.am, src/header.c, src/huf.c, src/larc.c, src/lha.h, src/lha_macro.h, src/lhadd.c, src/lharc.c, src/lhdir.c, src/lhdir.h, src/lhext.c, src/lhlist.c, src/makefile.dj, src/maketbl.c, src/maketree.c, src/patmatch.c, src/shuf.c, src/slide.c, src/util.c, Makefile, man/Makefile, src/Makefile, src/append.c, src/crcio.c, src/dhuf.c, src/extract.c:
1952         use the autoconf/automake
1953
1954 1999-08-28  Koji Arai  <jca02266@nifty.ne.jp>
1955
1956         * Makefile: import the lha-114f
1957
1958         * change-114f.txt, config.jpn.euc, header.doc.euc: import the lha-114f
1959
1960         * CHANGES.euc, MACHINES.euc, PROBLEMS.euc, README.euc, change-114e.txt, config.eng:
1961         import the lha-114f
1962
1963         * MACHINES2.euc, man/Makefile, man/lha.man, man/lha.n:
1964         import the lha-114f
1965
1966         * src/append.c, src/crcio.c: import the lha-114f
1967
1968         * src/Makefile, src/lha.h, src/lha_macro.h, src/lharc.c, src/lhdir.c, src/lhdir.h, src/lhext.c, src/lhlist.c, src/makefile.dj, src/maketbl.c, src/maketree.c, src/patmatch.c, src/shuf.c, src/slide.c, src/util.c:
1969         import the lha-114f
1970
1971         * src/dhuf.c, src/extract.c, src/header.c, src/huf.c, src/larc.c, src/lhadd.c:
1972         import the lha-114f
1973
1974 Local Variables:
1975 eval: (if (string= (user-login-name) "arai") (setq user-mail-address "arai@users.sourceforge.jp"))
1976 End: