]> wimlib.net Git - wimlib/commitdiff
Removed deprecated stuff
authorEric Biggers <ebiggers3@gmail.com>
Thu, 24 Apr 2014 04:18:05 +0000 (23:18 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Thu, 24 Apr 2014 05:18:05 +0000 (00:18 -0500)
Makefile.am
NEWS
include/wimlib.h
src/compat.c [deleted file]
src/extract.c
src/wim.c

index a9206fdf9ff39f062e9df2f634ea3964859f6908..82a1b5d8e53902481db5e15e385a88d8998735fa 100644 (file)
@@ -21,7 +21,6 @@ libwim_la_SOURCES =           \
        src/add_image.c         \
        src/avl_tree.c          \
        src/capture_common.c    \
-       src/compat.c            \
        src/compress.c          \
        src/compress_common.c   \
        src/compress_parallel.c \
diff --git a/NEWS b/NEWS
index f48dc54cbb5332ab03bb2ba4c46cd7a5b0313d55..82fd8adc1cdd2598ee4407e78223323bb191faf3 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -11,8 +11,16 @@ Version 1.6.3-BETA:
        The shared library version has been bumped up; however, there are only
        small incompatibilities:
 
-               - wimlib_capture_config has been removed.  The library now takes
-                 the configuration file directly.
+               - 'struct' wimlib_capture_config has been removed.  The library
+                 now takes the path to the configuration file directly.  This
+                 affects wimlib_add_image(), wimlib_add_image_multisource(),
+                 and wimlib_update_image().  However no code changes are
+                 necessary if a NULL configuration was being used.
+
+               - Removed deprecated functions: some (de)compression functions,
+                 wimlib_extract_files(), and wimlib_print_metadata().
+
+               Otherwise the API and ABI is the same.
 
 Version 1.6.2:
        Case-insensitive comparisons of strings (e.g. filenames) containing
index e880182b664ea3696f2c88f635fadcf71212bbca..b47251f8647dc70e67603eedb05461fb6eaee3a6 100644 (file)
  * created from one of these on-disk files initially only partially represents
  * the full WIM and needs to, in effect, be logically combined with other
  * ::WIMStruct's before performing certain operations, such as extracting files
- * with wimlib_extract_image() or wimlib_extract_files().  This is done by
+ * with wimlib_extract_image() or wimlib_extract_paths().  This is done by
  * calling wimlib_reference_resource_files() or wimlib_reference_resources().
  *
  * wimlib_write() can create delta WIMs as well as standalone WIMs, but a
@@ -439,11 +439,9 @@ enum wimlib_progress_msg {
 
        /** One or more file or directory trees within a WIM image is about to
         * be extracted.  @p info will point to ::wimlib_progress_info.extract.
-        * This message is received once per extraction command for
-        * wimlib_extract_files(), but only once for wimlib_extract_paths() and
-        * wimlib_extract_pathlist().  (In the latter cases, wimlib combines all
-        * paths into a single extraction operation for optimization purposes.)
-        */
+        * This message is received only once per wimlib_extract_paths() and
+        * wimlib_extract_pathlist(), since wimlib combines all paths into a
+        * single extraction operation for optimization purposes.  */
        WIMLIB_PROGRESS_MSG_EXTRACT_TREE_BEGIN,
 
        /** The directory structure and other preliminary metadata is about to
@@ -774,12 +772,6 @@ union wimlib_progress_info {
         * being extracted.  This is because wimlib, by default, extracts the
         * individual data streams in whichever order it determines to be the
         * most efficient.
-        *
-        * An additional caveat: wimlib_extract_files() will perform a separate
-        * logical extraction operation, with separate byte counts, for each
-        * extraction command (file or directory tree).  On the other hand,
-        * wimlib_extract_paths() and wimlib_extract_pathlist() combine all the
-        * paths to extract into a single logical extraction operation.
         */
        struct wimlib_progress_info_extract {
                /** Number of the image from which files are being extracted
@@ -827,10 +819,7 @@ union wimlib_progress_info {
                 * data stream, or a reparse data buffer.  */
                uint64_t num_streams;
 
-               /** When extracting files using wimlib_extract_files(), this
-                * will be the path within the WIM image to the file or
-                * directory tree currently being extracted.  Otherwise, this
-                * will be the empty string.  */
+               /** This will be the empty string.  */
                const wimlib_tchar *extract_root_wim_source_path;
 
                /** Currently only used for
@@ -1842,27 +1831,6 @@ struct wimlib_update_command {
        };
 };
 
-/** @} */
-/** @ingroup G_extracting_wims
- * @{ */
-
-/** DEPRECATED:  Specification of extracting a file or directory tree from a WIM
- * image.  This is only used for calls to wimlib_extract_files(), which has been
- * deprecated in favor of the easier-to-use wimlib_extract_paths().  */
-struct wimlib_extract_command {
-       /** Path to file or directory tree within the WIM image to extract.  It
-        * must be provided as an absolute path from the root of the WIM image.
-        * The path separators may be either forward slashes or backslashes. */
-       wimlib_tchar *wim_source_path;
-
-       /** Filesystem path to extract the file or directory tree to. */
-       wimlib_tchar *fs_dest_path;
-
-       /** Bitwise OR of zero or more of the WIMLIB_EXTRACT_FLAG_* flags. */
-       int extract_flags;
-};
-
-
 /** @} */
 /** @ingroup G_general
  * @{ */
@@ -2252,30 +2220,6 @@ wimlib_export_image(WIMStruct *src_wim, int src_image,
                    int export_flags,
                    wimlib_progress_func_t progress_func);
 
-/**
- * @ingroup G_extracting_wims
- *
- * Extract zero or more files or directory trees from a WIM image.
- *
- * As of wimlib v1.6.1, this function is deprecated in favor of
- * wimlib_extract_paths() because wimlib_extract_paths() is easier to use and
- * more efficient.
- *
- * Notes: wimlib_extract_files() does not support the
- * ::WIMLIB_EXTRACT_FLAG_GLOB_PATHS flag, and
- * ::WIMLIB_EXTRACT_FLAG_NO_PRESERVE_DIR_STRUCTURE is always implied.  The same
- * hardlink/symlink extraction mode must be set on all extraction commands.  An
- * independent extraction operation (like a separate call to
- * wimlib_extract_paths()) is done for each extraction command.  Otherwise, the
- * documentation for wimlib_extract_paths() applies.
- */
-extern int
-wimlib_extract_files(WIMStruct *wim,
-                    int image,
-                    const struct wimlib_extract_command *cmds,
-                    size_t num_cmds,
-                    int default_extract_flags,
-                    wimlib_progress_func_t progress_func) _wimlib_deprecated;
 
 /**
  * @ingroup G_extracting_wims
@@ -4338,66 +4282,10 @@ extern void
 wimlib_free_decompressor(struct wimlib_decompressor *decompressor);
 
 
-struct wimlib_lzx_params_old;
-struct wimlib_lzx_context_old;
-
-/** Deprecated; do not use.  */
-extern int
-wimlib_lzx_set_default_params(const struct wimlib_lzx_params_old *params)
-               _wimlib_deprecated;
-
-/** Deprecated; do not use.  */
-extern int
-wimlib_lzx_alloc_context(const struct wimlib_lzx_params_old *params,
-                        struct wimlib_lzx_context_old **ctx_pp)
-               _wimlib_deprecated;
-
-/** Deprecated; do not use.  */
-extern void
-wimlib_lzx_free_context(struct wimlib_lzx_context_old *ctx)
-               _wimlib_deprecated;
-
-/** Deprecated; do not use.  */
-extern unsigned
-wimlib_lzx_compress2(const void *udata, unsigned ulen, void *cdata,
-                    struct wimlib_lzx_context_old *ctx)
-               _wimlib_deprecated;
-
-/** Deprecated; do not use.  */
-extern unsigned
-wimlib_lzx_compress(const void *udata, unsigned ulen, void *cdata)
-               _wimlib_deprecated;
-
-/** Deprecated; do not use.  */
-extern unsigned
-wimlib_xpress_compress(const void *udata, unsigned ulen, void *cdata)
-               _wimlib_deprecated;
-
-/** Deprecated; do not use.  */
-extern int
-wimlib_lzx_decompress(const void *cdata, unsigned clen,
-                     void *udata, unsigned ulen)
-               _wimlib_deprecated;
-
-/** Deprecated; do not use.  */
-extern int
-wimlib_xpress_decompress(const void *cdata, unsigned clen,
-                        void *udata, unsigned ulen)
-               _wimlib_deprecated;
-
-
 /**
  * @}
  */
 
-/** @ingroup G_wim_information
- *
- * Deprecated and will return ::WIMLIB_ERR_UNSUPPORTED.  Use
- * wimlib_iterate_dir_tree() instead.  */
-extern int
-wimlib_print_metadata(WIMStruct *wim, int image)
-               _wimlib_deprecated;
-
 
 #ifdef __cplusplus
 }
diff --git a/src/compat.c b/src/compat.c
deleted file mode 100644 (file)
index 4000724..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-/* TODO: Deprecated stuff to delete when shared library version is bumped up  */
-
-#include "wimlib.h"
-#include "wimlib/compiler.h"
-
-WIMLIBAPI int
-wimlib_lzx_set_default_params(const struct wimlib_lzx_params_old *params)
-{
-       return wimlib_set_default_compressor_params(WIMLIB_COMPRESSION_TYPE_LZX,
-                                                   (const struct wimlib_compressor_params_header*)params);
-}
-
-WIMLIBAPI int
-wimlib_lzx_alloc_context(const struct wimlib_lzx_params_old *params,
-                        struct wimlib_lzx_context_old **ctx_pp)
-{
-       wimlib_lzx_free_context(*ctx_pp);
-       *ctx_pp = NULL;
-       return wimlib_create_compressor(WIMLIB_COMPRESSION_TYPE_LZX,
-                                       32768,
-                                       (const struct wimlib_compressor_params_header*)params,
-                                       (struct wimlib_compressor**)ctx_pp);
-}
-
-WIMLIBAPI void
-wimlib_lzx_free_context(struct wimlib_lzx_context_old *ctx)
-{
-       wimlib_free_compressor((struct wimlib_compressor*)ctx);
-}
-
-WIMLIBAPI unsigned
-wimlib_lzx_compress2(const void *udata, unsigned ulen, void *cdata,
-                    struct wimlib_lzx_context_old *ctx)
-{
-       return wimlib_compress(udata, ulen, cdata, ulen - 1,
-                              (struct wimlib_compressor*)ctx);
-}
-
-static unsigned
-do_compress(const void *udata, unsigned ulen, void *cdata, int ctype)
-{
-       struct wimlib_compressor *c;
-       unsigned clen;
-
-       if (wimlib_create_compressor(ctype, 32768, NULL, &c))
-               return 0;
-       clen = wimlib_compress(udata, ulen, cdata, ulen - 1, c);
-       wimlib_free_compressor(c);
-       return clen;
-}
-
-WIMLIBAPI unsigned
-wimlib_lzx_compress(const void *udata, unsigned ulen, void *cdata)
-{
-       return do_compress(udata, ulen, cdata, WIMLIB_COMPRESSION_TYPE_LZX);
-}
-
-WIMLIBAPI unsigned
-wimlib_xpress_compress(const void *udata, unsigned ulen, void *cdata)
-{
-       return do_compress(udata, ulen, cdata, WIMLIB_COMPRESSION_TYPE_XPRESS);
-}
-
-static int
-do_decompress(const void *cdata, unsigned clen,
-             void *udata, unsigned ulen, int ctype)
-{
-       int ret;
-       struct wimlib_decompressor *dec;
-
-       if (wimlib_create_decompressor(ctype, 32768, NULL, &dec))
-               return -1;
-       ret = wimlib_decompress(cdata, clen, udata, ulen, dec);
-       wimlib_free_decompressor(dec);
-       return ret;
-}
-
-WIMLIBAPI int
-wimlib_lzx_decompress(const void *cdata, unsigned clen,
-                     void *udata, unsigned ulen)
-{
-       return do_decompress(cdata, clen, udata, ulen, WIMLIB_COMPRESSION_TYPE_LZX);
-}
-
-
-WIMLIBAPI int
-wimlib_xpress_decompress(const void *cdata, unsigned clen,
-                        void *udata, unsigned ulen)
-{
-       return do_decompress(cdata, clen, udata, ulen, WIMLIB_COMPRESSION_TYPE_XPRESS);
-}
index 6512917c0c5ed9df4afe7c0addf23243151033c2..337707223ba0fda506aa267ca908f1e1dd8cafe0 100644 (file)
@@ -26,9 +26,9 @@
 
 /*
  * This file provides the API functions wimlib_extract_image(),
- * wimlib_extract_image_from_pipe(), wimlib_extract_files(),
- * wimlib_extract_paths(), and wimlib_extract_pathlist().  Internally, all end
- * up calling do_wimlib_extract_paths() and extract_trees().
+ * wimlib_extract_image_from_pipe(), wimlib_extract_paths(), and
+ * wimlib_extract_pathlist().  Internally, all end up calling
+ * do_wimlib_extract_paths() and extract_trees().
  *
  * Although wimlib supports multiple extraction modes/backends (NTFS-3g, UNIX,
  * Win32), this file does not itself have code to extract files or directories
@@ -68,8 +68,7 @@
 
 #define WIMLIB_EXTRACT_FLAG_MULTI_IMAGE 0x80000000
 #define WIMLIB_EXTRACT_FLAG_FROM_PIPE   0x40000000
-#define WIMLIB_EXTRACT_FLAG_FILEMODE    0x20000000
-#define WIMLIB_EXTRACT_FLAG_IMAGEMODE   0x10000000
+#define WIMLIB_EXTRACT_FLAG_IMAGEMODE   0x20000000
 
 /* Keep in sync with wimlib.h  */
 #define WIMLIB_EXTRACT_MASK_PUBLIC                             \
@@ -2435,21 +2434,8 @@ extract_trees(WIMStruct *wim, struct wim_dentry **trees, size_t num_trees,
                ctx.progress.extract.target = target;
        }
 
-       if (extract_flags & WIMLIB_EXTRACT_FLAG_FILEMODE) {
-               /* Called from wimlib_extract_files().  There should be only 1
-                * tree, and directory structure should not be preserved.  */
-               wimlib_assert(num_trees == 1);
-               wimlib_assert(extract_flags &
-                             WIMLIB_EXTRACT_FLAG_NO_PRESERVE_DIR_STRUCTURE);
-               ret = calculate_dentry_full_path(trees[0]);
-               if (ret)
-                       return ret;
-               ctx.progress.extract.extract_root_wim_source_path = trees[0]->_full_path;
-               ctx.target_dentry = trees[0];
-       } else {
-               ctx.progress.extract.extract_root_wim_source_path = T("");
-               ctx.target_dentry = wim_root_dentry(wim);
-       }
+       ctx.progress.extract.extract_root_wim_source_path = T("");
+       ctx.target_dentry = wim_root_dentry(wim);
        /* Note: ctx.target_dentry represents the dentry that gets extracted to
         * @target.  There may be none, in which case it gets set to the image
         * root and never matches any of the dentries actually being extracted.
@@ -2857,8 +2843,7 @@ do_wimlib_extract_paths(WIMStruct *wim, int image, const tchar *target,
                return ret;
 
        if ((extract_flags & (WIMLIB_EXTRACT_FLAG_NTFS |
-                             WIMLIB_EXTRACT_FLAG_NO_PRESERVE_DIR_STRUCTURE |
-                             WIMLIB_EXTRACT_FLAG_FILEMODE)) ==
+                             WIMLIB_EXTRACT_FLAG_NO_PRESERVE_DIR_STRUCTURE)) ==
            (WIMLIB_EXTRACT_FLAG_NO_PRESERVE_DIR_STRUCTURE))
        {
                ret = mkdir_if_needed(target);
@@ -3048,67 +3033,6 @@ do_wimlib_extract_image(WIMStruct *wim,
  *                          Extraction API                                  *
  ****************************************************************************/
 
-/* Note: new code should use wimlib_extract_paths() instead of
- * wimlib_extract_files() if possible.  */
-WIMLIBAPI int
-wimlib_extract_files(WIMStruct *wim, int image,
-                    const struct wimlib_extract_command *cmds, size_t num_cmds,
-                    int default_extract_flags,
-                    wimlib_progress_func_t progress_func)
-{
-       int all_flags = 0;
-       int link_flags;
-       int ret;
-
-       if (num_cmds == 0)
-               return 0;
-
-       default_extract_flags |= WIMLIB_EXTRACT_FLAG_NO_PRESERVE_DIR_STRUCTURE;
-
-       for (size_t i = 0; i < num_cmds; i++) {
-               int cmd_flags = (cmds[i].extract_flags |
-                                default_extract_flags);
-
-               if (cmd_flags & ~WIMLIB_EXTRACT_MASK_PUBLIC)
-                       return WIMLIB_ERR_INVALID_PARAM;
-
-               int cmd_link_flags = (cmd_flags & (WIMLIB_EXTRACT_FLAG_SYMLINK |
-                                                  WIMLIB_EXTRACT_FLAG_HARDLINK));
-               if (i == 0) {
-                       link_flags = cmd_link_flags;
-               } else {
-                       if (cmd_link_flags != link_flags) {
-                               ERROR("The same symlink or hardlink extraction mode "
-                                     "must be set on all extraction commands!");
-                               return WIMLIB_ERR_INVALID_PARAM;
-                       }
-               }
-               all_flags |= cmd_flags;
-       }
-       if (all_flags & WIMLIB_EXTRACT_FLAG_GLOB_PATHS) {
-               ERROR("Glob paths not supported for wimlib_extract_files(). "
-                     "Use wimlib_extract_paths() instead.");
-               return WIMLIB_ERR_INVALID_PARAM;
-       }
-
-       for (size_t i = 0; i < num_cmds; i++) {
-               int extract_flags = (cmds[i].extract_flags |
-                                    default_extract_flags);
-               const tchar *target = cmds[i].fs_dest_path;
-               const tchar *wim_source_path = cmds[i].wim_source_path;
-
-               ret = do_wimlib_extract_paths(wim, image, target,
-                                             &wim_source_path, 1,
-                                             extract_flags | WIMLIB_EXTRACT_FLAG_FILEMODE,
-                                             progress_func);
-               if (ret)
-                       break;
-       }
-
-       clear_lte_extracted_file(wim, all_flags);
-       return ret;
-}
-
 WIMLIBAPI int
 wimlib_extract_paths(WIMStruct *wim, int image, const tchar *target,
                     const tchar * const *paths, size_t num_paths,
index 95a3cb2872f07a54ef6cb6aaa0c3376a5d7bd574..ce55444b233372117118411b8f869593002d1ded 100644 (file)
--- a/src/wim.c
+++ b/src/wim.c
@@ -354,13 +354,6 @@ wimlib_print_available_images(const WIMStruct *wim, int image)
                print_image_info(wim->wim_info, i);
 }
 
-/* TODO: Deprecated; remove this.  */
-WIMLIBAPI int
-wimlib_print_metadata(WIMStruct *wim, int image)
-{
-       return WIMLIB_ERR_UNSUPPORTED;
-}
-
 /* API function documented in wimlib.h  */
 WIMLIBAPI int
 wimlib_get_wim_info(WIMStruct *wim, struct wimlib_wim_info *info)