libmspack 0.10.1.2 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +1 -1
  3. data/ext/libmspack/ChangeLog +145 -0
  4. data/ext/libmspack/INSTALL +3 -3
  5. data/ext/libmspack/Makefile.am +7 -4
  6. data/ext/libmspack/Makefile.in +265 -147
  7. data/ext/libmspack/README +3 -2
  8. data/ext/libmspack/aclocal.m4 +111 -113
  9. data/ext/libmspack/ar-lib +10 -9
  10. data/ext/libmspack/compile +9 -8
  11. data/ext/libmspack/config.guess +887 -613
  12. data/ext/libmspack/config.h.in +6 -9
  13. data/ext/libmspack/config.sub +1349 -1260
  14. data/ext/libmspack/configure +3035 -2490
  15. data/ext/libmspack/configure.ac +3 -3
  16. data/ext/libmspack/depcomp +4 -4
  17. data/ext/libmspack/install-sh +107 -74
  18. data/ext/libmspack/libmscabd.la +1 -1
  19. data/ext/libmspack/libmschmd.la +1 -1
  20. data/ext/libmspack/libmspack.la +1 -1
  21. data/ext/libmspack/ltmain.sh +156 -61
  22. data/ext/libmspack/m4/libtool.m4 +19 -12
  23. data/ext/libmspack/missing +8 -8
  24. data/ext/libmspack/mspack/cabd.c +21 -19
  25. data/ext/libmspack/mspack/chm.h +3 -2
  26. data/ext/libmspack/mspack/chmd.c +137 -57
  27. data/ext/libmspack/mspack/kwajd.c +29 -29
  28. data/ext/libmspack/mspack/lzx.h +0 -1
  29. data/ext/libmspack/mspack/lzxd.c +30 -154
  30. data/ext/libmspack/mspack/macros.h +64 -0
  31. data/ext/libmspack/mspack/mszipd.c +7 -18
  32. data/ext/libmspack/mspack/qtmd.c +3 -5
  33. data/ext/libmspack/mspack/readbits.h +14 -5
  34. data/ext/libmspack/mspack/readhuff.h +26 -21
  35. data/ext/libmspack/mspack/system.c +0 -5
  36. data/ext/libmspack/mspack/system.h +20 -67
  37. data/ext/libmspack/test-driver +16 -11
  38. data/ext/x86_64-linux/libmspack.so +0 -0
  39. data/ext/x86_64-windows/mspack.dll +0 -0
  40. data/lib/libmspack/version.rb +1 -1
  41. metadata +4 -3
@@ -1,12 +1,12 @@
1
1
  # -*- Autoconf -*-
2
2
  # Process this file with autoconf to produce a configure script.
3
3
  AC_PREREQ(2.59)
4
- AC_INIT([libmspack],[0.10.1alpha],[kyzer@cabextract.org.uk])
4
+ AC_INIT([libmspack],[0.11alpha],[kyzer@cabextract.org.uk])
5
5
  AC_CONFIG_MACRO_DIR([m4])
6
6
  AM_INIT_AUTOMAKE([1.11])
7
7
  AM_SILENT_RULES([yes])
8
8
  AC_CONFIG_SRCDIR([mspack/mspack.h])
9
- AC_CONFIG_HEADER([config.h])
9
+ AC_CONFIG_HEADERS([config.h])
10
10
 
11
11
  # --enable-debug option
12
12
  AC_ARG_ENABLE(debug,
@@ -34,7 +34,6 @@ AC_C_BIGENDIAN
34
34
  AC_TYPE_MODE_T
35
35
  AC_TYPE_OFF_T
36
36
  AC_TYPE_SIZE_T
37
- AC_CHECK_SIZEOF([off_t])
38
37
 
39
38
  # Checks for library functions
40
39
  AX_FUNC_MKDIR
@@ -43,6 +42,7 @@ AC_CHECK_FUNCS([towlower])
43
42
  # largefile support
44
43
  AC_SYS_LARGEFILE
45
44
  AC_FUNC_FSEEKO
45
+ AC_CHECK_SIZEOF([off_t])
46
46
 
47
47
  AC_CONFIG_FILES([Makefile libmspack.pc])
48
48
  AC_OUTPUT
@@ -1,9 +1,9 @@
1
1
  #! /bin/sh
2
2
  # depcomp - compile a program generating dependencies as side-effects
3
3
 
4
- scriptversion=2016-01-11.22; # UTC
4
+ scriptversion=2018-03-07.03; # UTC
5
5
 
6
- # Copyright (C) 1999-2017 Free Software Foundation, Inc.
6
+ # Copyright (C) 1999-2021 Free Software Foundation, Inc.
7
7
 
8
8
  # This program is free software; you can redistribute it and/or modify
9
9
  # it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@ scriptversion=2016-01-11.22; # UTC
16
16
  # GNU General Public License for more details.
17
17
 
18
18
  # You should have received a copy of the GNU General Public License
19
- # along with this program. If not, see <http://www.gnu.org/licenses/>.
19
+ # along with this program. If not, see <https://www.gnu.org/licenses/>.
20
20
 
21
21
  # As a special exception to the GNU General Public License, if you
22
22
  # distribute this file as part of a program that contains a
@@ -783,7 +783,7 @@ exit 0
783
783
  # Local Variables:
784
784
  # mode: shell-script
785
785
  # sh-indentation: 2
786
- # eval: (add-hook 'write-file-hooks 'time-stamp)
786
+ # eval: (add-hook 'before-save-hook 'time-stamp)
787
787
  # time-stamp-start: "scriptversion="
788
788
  # time-stamp-format: "%:y-%02m-%02d.%02H"
789
789
  # time-stamp-time-zone: "UTC0"
@@ -1,7 +1,7 @@
1
1
  #!/bin/sh
2
2
  # install - install a program, script, or datafile
3
3
 
4
- scriptversion=2014-09-12.12; # UTC
4
+ scriptversion=2020-11-14.01; # UTC
5
5
 
6
6
  # This originates from X11R5 (mit/util/scripts/install.sh), which was
7
7
  # later released in X11R6 (xc/config/util/install.sh) with the
@@ -69,6 +69,11 @@ posix_mkdir=
69
69
  # Desired mode of installed file.
70
70
  mode=0755
71
71
 
72
+ # Create dirs (including intermediate dirs) using mode 755.
73
+ # This is like GNU 'install' as of coreutils 8.32 (2020).
74
+ mkdir_umask=22
75
+
76
+ backupsuffix=
72
77
  chgrpcmd=
73
78
  chmodcmd=$chmodprog
74
79
  chowncmd=
@@ -99,18 +104,28 @@ Options:
99
104
  --version display version info and exit.
100
105
 
101
106
  -c (ignored)
102
- -C install only if different (preserve the last data modification time)
107
+ -C install only if different (preserve data modification time)
103
108
  -d create directories instead of installing files.
104
109
  -g GROUP $chgrpprog installed files to GROUP.
105
110
  -m MODE $chmodprog installed files to MODE.
106
111
  -o USER $chownprog installed files to USER.
112
+ -p pass -p to $cpprog.
107
113
  -s $stripprog installed files.
114
+ -S SUFFIX attempt to back up existing files, with suffix SUFFIX.
108
115
  -t DIRECTORY install into DIRECTORY.
109
116
  -T report an error if DSTFILE is a directory.
110
117
 
111
118
  Environment variables override the default commands:
112
119
  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
113
120
  RMPROG STRIPPROG
121
+
122
+ By default, rm is invoked with -f; when overridden with RMPROG,
123
+ it's up to you to specify -f if you want it.
124
+
125
+ If -S is not specified, no backups are attempted.
126
+
127
+ Email bug reports to bug-automake@gnu.org.
128
+ Automake home page: https://www.gnu.org/software/automake/
114
129
  "
115
130
 
116
131
  while test $# -ne 0; do
@@ -137,8 +152,13 @@ while test $# -ne 0; do
137
152
  -o) chowncmd="$chownprog $2"
138
153
  shift;;
139
154
 
155
+ -p) cpprog="$cpprog -p";;
156
+
140
157
  -s) stripcmd=$stripprog;;
141
158
 
159
+ -S) backupsuffix="$2"
160
+ shift;;
161
+
142
162
  -t)
143
163
  is_target_a_directory=always
144
164
  dst_arg=$2
@@ -255,6 +275,10 @@ do
255
275
  dstdir=$dst
256
276
  test -d "$dstdir"
257
277
  dstdir_status=$?
278
+ # Don't chown directories that already exist.
279
+ if test $dstdir_status = 0; then
280
+ chowncmd=""
281
+ fi
258
282
  else
259
283
 
260
284
  # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
@@ -271,15 +295,18 @@ do
271
295
  fi
272
296
  dst=$dst_arg
273
297
 
274
- # If destination is a directory, append the input filename; won't work
275
- # if double slashes aren't ignored.
298
+ # If destination is a directory, append the input filename.
276
299
  if test -d "$dst"; then
277
300
  if test "$is_target_a_directory" = never; then
278
301
  echo "$0: $dst_arg: Is a directory" >&2
279
302
  exit 1
280
303
  fi
281
304
  dstdir=$dst
282
- dst=$dstdir/`basename "$src"`
305
+ dstbase=`basename "$src"`
306
+ case $dst in
307
+ */) dst=$dst$dstbase;;
308
+ *) dst=$dst/$dstbase;;
309
+ esac
283
310
  dstdir_status=0
284
311
  else
285
312
  dstdir=`dirname "$dst"`
@@ -288,27 +315,16 @@ do
288
315
  fi
289
316
  fi
290
317
 
318
+ case $dstdir in
319
+ */) dstdirslash=$dstdir;;
320
+ *) dstdirslash=$dstdir/;;
321
+ esac
322
+
291
323
  obsolete_mkdir_used=false
292
324
 
293
325
  if test $dstdir_status != 0; then
294
326
  case $posix_mkdir in
295
327
  '')
296
- # Create intermediate dirs using mode 755 as modified by the umask.
297
- # This is like FreeBSD 'install' as of 1997-10-28.
298
- umask=`umask`
299
- case $stripcmd.$umask in
300
- # Optimize common cases.
301
- *[2367][2367]) mkdir_umask=$umask;;
302
- .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
303
-
304
- *[0-7])
305
- mkdir_umask=`expr $umask + 22 \
306
- - $umask % 100 % 40 + $umask % 20 \
307
- - $umask % 10 % 4 + $umask % 2
308
- `;;
309
- *) mkdir_umask=$umask,go-w;;
310
- esac
311
-
312
328
  # With -d, create the new directory with the user-specified mode.
313
329
  # Otherwise, rely on $mkdir_umask.
314
330
  if test -n "$dir_arg"; then
@@ -318,50 +334,49 @@ do
318
334
  fi
319
335
 
320
336
  posix_mkdir=false
321
- case $umask in
322
- *[123567][0-7][0-7])
323
- # POSIX mkdir -p sets u+wx bits regardless of umask, which
324
- # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
325
- ;;
326
- *)
327
- # $RANDOM is not portable (e.g. dash); use it when possible to
328
- # lower collision chance
329
- tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
330
- trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
331
-
332
- # As "mkdir -p" follows symlinks and we work in /tmp possibly; so
333
- # create the $tmpdir first (and fail if unsuccessful) to make sure
334
- # that nobody tries to guess the $tmpdir name.
335
- if (umask $mkdir_umask &&
336
- $mkdirprog $mkdir_mode "$tmpdir" &&
337
- exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
338
- then
339
- if test -z "$dir_arg" || {
340
- # Check for POSIX incompatibilities with -m.
341
- # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
342
- # other-writable bit of parent directory when it shouldn't.
343
- # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
344
- test_tmpdir="$tmpdir/a"
345
- ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
346
- case $ls_ld_tmpdir in
347
- d????-?r-*) different_mode=700;;
348
- d????-?--*) different_mode=755;;
349
- *) false;;
350
- esac &&
351
- $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
352
- ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
353
- test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
354
- }
355
- }
356
- then posix_mkdir=:
357
- fi
358
- rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
359
- else
360
- # Remove any dirs left behind by ancient mkdir implementations.
361
- rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
362
- fi
363
- trap '' 0;;
364
- esac;;
337
+ # The $RANDOM variable is not portable (e.g., dash). Use it
338
+ # here however when possible just to lower collision chance.
339
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
340
+
341
+ trap '
342
+ ret=$?
343
+ rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
344
+ exit $ret
345
+ ' 0
346
+
347
+ # Because "mkdir -p" follows existing symlinks and we likely work
348
+ # directly in world-writeable /tmp, make sure that the '$tmpdir'
349
+ # directory is successfully created first before we actually test
350
+ # 'mkdir -p'.
351
+ if (umask $mkdir_umask &&
352
+ $mkdirprog $mkdir_mode "$tmpdir" &&
353
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
354
+ then
355
+ if test -z "$dir_arg" || {
356
+ # Check for POSIX incompatibilities with -m.
357
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
358
+ # other-writable bit of parent directory when it shouldn't.
359
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
360
+ test_tmpdir="$tmpdir/a"
361
+ ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
362
+ case $ls_ld_tmpdir in
363
+ d????-?r-*) different_mode=700;;
364
+ d????-?--*) different_mode=755;;
365
+ *) false;;
366
+ esac &&
367
+ $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
368
+ ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
369
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
370
+ }
371
+ }
372
+ then posix_mkdir=:
373
+ fi
374
+ rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
375
+ else
376
+ # Remove any dirs left behind by ancient mkdir implementations.
377
+ rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
378
+ fi
379
+ trap '' 0;;
365
380
  esac
366
381
 
367
382
  if
@@ -372,7 +387,7 @@ do
372
387
  then :
373
388
  else
374
389
 
375
- # The umask is ridiculous, or mkdir does not conform to POSIX,
390
+ # mkdir does not conform to POSIX,
376
391
  # or it failed possibly due to a race condition. Create the
377
392
  # directory the slow way, step by step, checking for races as we go.
378
393
 
@@ -401,7 +416,7 @@ do
401
416
  prefixes=
402
417
  else
403
418
  if $posix_mkdir; then
404
- (umask=$mkdir_umask &&
419
+ (umask $mkdir_umask &&
405
420
  $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
406
421
  # Don't fail if two instances are running concurrently.
407
422
  test -d "$prefix" || exit 1
@@ -434,14 +449,25 @@ do
434
449
  else
435
450
 
436
451
  # Make a couple of temp file names in the proper directory.
437
- dsttmp=$dstdir/_inst.$$_
438
- rmtmp=$dstdir/_rm.$$_
452
+ dsttmp=${dstdirslash}_inst.$$_
453
+ rmtmp=${dstdirslash}_rm.$$_
439
454
 
440
455
  # Trap to clean up those temp files at exit.
441
456
  trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
442
457
 
443
458
  # Copy the file name to the temp name.
444
- (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
459
+ (umask $cp_umask &&
460
+ { test -z "$stripcmd" || {
461
+ # Create $dsttmp read-write so that cp doesn't create it read-only,
462
+ # which would cause strip to fail.
463
+ if test -z "$doit"; then
464
+ : >"$dsttmp" # No need to fork-exec 'touch'.
465
+ else
466
+ $doit touch "$dsttmp"
467
+ fi
468
+ }
469
+ } &&
470
+ $doit_exec $cpprog "$src" "$dsttmp") &&
445
471
 
446
472
  # and set any options; do chmod last to preserve setuid bits.
447
473
  #
@@ -467,6 +493,13 @@ do
467
493
  then
468
494
  rm -f "$dsttmp"
469
495
  else
496
+ # If $backupsuffix is set, and the file being installed
497
+ # already exists, attempt a backup. Don't worry if it fails,
498
+ # e.g., if mv doesn't support -f.
499
+ if test -n "$backupsuffix" && test -f "$dst"; then
500
+ $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
501
+ fi
502
+
470
503
  # Rename the file to the real destination.
471
504
  $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
472
505
 
@@ -481,9 +514,9 @@ do
481
514
  # file should still install successfully.
482
515
  {
483
516
  test ! -f "$dst" ||
484
- $doit $rmcmd -f "$dst" 2>/dev/null ||
517
+ $doit $rmcmd "$dst" 2>/dev/null ||
485
518
  { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
486
- { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
519
+ { $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
487
520
  } ||
488
521
  { echo "$0: cannot unlink or rename $dst" >&2
489
522
  (exit 1); exit 1
@@ -500,9 +533,9 @@ do
500
533
  done
501
534
 
502
535
  # Local variables:
503
- # eval: (add-hook 'write-file-hooks 'time-stamp)
536
+ # eval: (add-hook 'before-save-hook 'time-stamp)
504
537
  # time-stamp-start: "scriptversion="
505
538
  # time-stamp-format: "%:y-%02m-%02d.%02H"
506
- # time-stamp-time-zone: "UTC"
539
+ # time-stamp-time-zone: "UTC0"
507
540
  # time-stamp-end: "; # UTC"
508
541
  # End:
@@ -1,5 +1,5 @@
1
1
  # libmscabd.la - a libtool library file
2
- # Generated by libtool (GNU libtool) 2.4.6 Debian-2.4.6-2
2
+ # Generated by libtool (GNU libtool) 2.4.6 Debian-2.4.6-15build2
3
3
  #
4
4
  # Please DO NOT delete this file!
5
5
  # It is necessary for linking the library.
@@ -1,5 +1,5 @@
1
1
  # libmschmd.la - a libtool library file
2
- # Generated by libtool (GNU libtool) 2.4.6 Debian-2.4.6-2
2
+ # Generated by libtool (GNU libtool) 2.4.6 Debian-2.4.6-15build2
3
3
  #
4
4
  # Please DO NOT delete this file!
5
5
  # It is necessary for linking the library.
@@ -1,5 +1,5 @@
1
1
  # libmspack.la - a libtool library file
2
- # Generated by libtool (GNU libtool) 2.4.6 Debian-2.4.6-2
2
+ # Generated by libtool (GNU libtool) 2.4.6 Debian-2.4.6-15build2
3
3
  #
4
4
  # Please DO NOT delete this file!
5
5
  # It is necessary for linking the library.