]> wimlib.net Git - wimlib/commitdiff
header cleanups
authorEric Biggers <ebiggers3@gmail.com>
Sun, 25 Jan 2015 16:35:24 +0000 (10:35 -0600)
committerEric Biggers <ebiggers3@gmail.com>
Sun, 25 Jan 2015 16:55:09 +0000 (10:55 -0600)
49 files changed:
Makefile.am
include/wimlib/avl_tree.h
include/wimlib/decompress_common.h
include/wimlib/encoding.h
include/wimlib/file_io.h
include/wimlib/glob.h
include/wimlib/header.h
include/wimlib/integrity.h
include/wimlib/lz_mf_ops.h
include/wimlib/matchfinder_common.h
include/wimlib/sha1.h
include/wimlib/types.h
include/wimlib/wimboot.h
include/wimlib/win32_common.h
include/wimlib/wof.h
include/wimlib/xml.h
src/capture_common.c
src/compress.c
src/compress_common.c
src/compress_parallel.c
src/compress_serial.c
src/dentry.c
src/encoding.c
src/extract.c
src/file_io.c
src/header.c
src/lookup_table.c
src/lzms_common.c
src/lzms_compress.c
src/lzms_decompress.c
src/lzx_common.c
src/lzx_decompress.c
src/mount_image.c
src/ntfs-3g_capture.c
src/paths.c
src/progress.c
src/reparse.c
src/resource.c
src/split.c
src/textfile.c
src/unix_apply.c
src/update_image.c
src/wildcard.c
src/wim.c
src/wimboot.c
src/win32_capture.c
src/win32_common.c
src/write.c
src/xml.c

index 157fd59e620f3c17e559fc4ba21999042c5c34ad..79a91c4c7f257d709c27c484706bf16babfd38f8 100644 (file)
@@ -94,6 +94,7 @@ libwim_la_SOURCES =           \
        src/xml.c               \
        src/xpress_compress.c   \
        src/xpress_decompress.c \
+       include/wimlib/alloca.h         \
        include/wimlib/apply.h          \
        include/wimlib/assert.h         \
        include/wimlib/avl_tree.h       \
index a281d635a60cf65c7e492e6f0a5a8cde3c61b763..e2e2227070a50eefe1d2a2538ee8ece53c92dc4a 100644 (file)
@@ -16,7 +16,7 @@
 
 #include <stdbool.h>
 #include <stddef.h>
-#include <inttypes.h> /* for uintptr_t */
+#include <stdint.h> /* for uintptr_t */
 
 #ifdef __GNUC__
 #  define AVL_INLINE inline __attribute__((always_inline))
index 8ed98ca83f97b48cd981dd1b2fa56ab0e31dffba..148b44ef63d0ee5db26509140d13f95f0dbabf87 100644 (file)
@@ -11,7 +11,6 @@
 #define _WIMLIB_DECOMPRESS_COMMON_H
 
 #include "wimlib/compiler.h"
-#include "wimlib/endianness.h"
 #include "wimlib/types.h"
 #include "wimlib/unaligned.h"
 
index 3d3c6852c82aa66e5672e6673d3be880dcd2ad58..f9e5f2645ef707eed8d4a8da96222e769a117166 100644 (file)
@@ -1,12 +1,12 @@
 #ifndef _WIMLIB_ENCODING_H
 #define _WIMLIB_ENCODING_H
 
+#include <string.h>
+
 #include "wimlib/error.h"
 #include "wimlib/util.h"
 #include "wimlib/types.h"
 
-#include <string.h>
-
 extern void
 iconv_global_init(void);
 
index 549dc5e43392f7a360ce4feaab25df01382ed6e9..34c9d40b2bdd268e0bc63d0056613eada6d5ace7 100644 (file)
@@ -1,9 +1,9 @@
 #ifndef _WIMLIB_FILE_IO_H
 #define _WIMLIB_FILE_IO_H
 
+#include <stdbool.h>
 #include <stddef.h>
 #include <sys/types.h>
-#include <stdbool.h>
 
 /* Wrapper around a file descriptor that keeps track of offset (including in
  * pipes, which don't support lseek()) and a cached flag that tells whether the
index 22ebfa9e7dad5b2d37bb5584fc2239fa813c65a3..1027ec7cb316af092298c0e6d3b47c6219669430 100644 (file)
@@ -4,9 +4,8 @@
 #ifndef __WIN32__
 #  include <glob.h>
 #else
-
-#include <wchar.h>
 #include <stddef.h>
+#include <wchar.h>
 
 typedef struct {
        size_t    gl_pathc;
index 125457628d1806d5ffc1bf6f22b7115a1355036b..2cd1abaf66e962a538569b84b2d9abb69d86cbfe 100644 (file)
@@ -1,11 +1,11 @@
 #ifndef _WIMLIB_HEADER_H
 #define _WIMLIB_HEADER_H
 
+#include <limits.h>
+
 #include "wimlib/resource.h"
 #include "wimlib/types.h"
 
-#include <limits.h>
-
 /* Length of "Globally Unique ID" field in WIM header.  */
 #define WIM_GUID_LEN    16
 
index fa4e6a34c9245bee8771c6c90b3384079f3b2996..1fa723a994cedc00a37ffee01ef93658fc612d96 100644 (file)
@@ -1,9 +1,10 @@
 #ifndef _WIMLIB_INTEGRITY_H
 #define _WIMLIB_INTEGRITY_H
 
-#include "wimlib/types.h"
 #include <sys/types.h>
 
+#include "wimlib/types.h"
+
 #define WIM_INTEGRITY_OK 0
 #define WIM_INTEGRITY_NOT_OK -1
 #define WIM_INTEGRITY_NONEXISTENT -2
index d6475710ea4d1e573133a06f39e69f5605ea1992..2186534de4e0c1ffc15b6bce9dbb682c46aa756a 100644 (file)
@@ -1,7 +1,4 @@
 #include "wimlib/lz_mf.h"
 
-extern const struct lz_mf_ops lz_null_ops;
-extern const struct lz_mf_ops lz_hash_chains_ops;
-extern const struct lz_mf_ops lz_binary_trees_ops;
 extern const struct lz_mf_ops lz_lcp_interval_tree_ops;
 extern const struct lz_mf_ops lz_linked_suffix_array_ops;
index 15543edd90af94d568ea43bf5aad91b7f649ab90..2372bd66a04216bcf62e8077d793f04614c4304a 100644 (file)
 #ifndef _MATCHFINDER_COMMON_H
 #define _MATCHFINDER_COMMON_H
 
-#include "wimlib/types.h"
-
 #include <string.h>
 
+#include "wimlib/types.h"
+
 #ifndef MATCHFINDER_MAX_WINDOW_ORDER
 #  error "MATCHFINDER_MAX_WINDOW_ORDER must be defined!"
 #endif
index 9c34c898381f0b6c2d0a20763b2f1ac9337e6c8c..05650e06d4a5bca0f541bf2b6b11485cf7bed293 100644 (file)
@@ -8,11 +8,11 @@
 #ifndef _WIMLIB_SHA1_H
 #define _WIMLIB_SHA1_H
 
+#include <string.h>
+
 #include "wimlib/types.h"
 #include "wimlib/util.h"
 
-#include <string.h>
-
 #define SHA1_HASH_SIZE 20
 
 extern const u8 zero_hash[SHA1_HASH_SIZE];
index 84b55be31f0a1030dda7a44f89c00e6233d1960c..e838e7fc2a01aebde625c35aa84c95c86b44160c 100644 (file)
@@ -1,13 +1,13 @@
 #ifndef _WIMLIB_TYPES_H
 #define _WIMLIB_TYPES_H
 
-#include "wimlib_tchar.h"
-#include "wimlib/compiler.h"
-
 #include <inttypes.h>
 #include <stdbool.h>
 #include <stddef.h>
 
+#include "wimlib_tchar.h"
+#include "wimlib/compiler.h"
+
 #ifndef _NTFS_TYPES_H
 /* Unsigned integer types of exact size in bits */
 typedef uint8_t  u8;
index c10d0dccc99ed13e46d224d094b824a4b451a98d..f9bdbe8bfaf024e18bbc50d2f1dc71999881fb70 100644 (file)
@@ -1,10 +1,10 @@
 #ifndef _WIMBOOT_H_
 #define _WIMBOOT_H_
 
-#include "wimlib/win32_common.h"
+#include "wimlib/header.h"
 #include "wimlib/sha1.h"
 #include "wimlib/types.h"
-#include "wimlib/header.h"
+#include "wimlib/win32_common.h"
 
 struct wim_lookup_table_entry;
 
index e5317b614be2b4e861a0caca77a5ae3ae161e078..2fc12c1cf3486fba5ecf6c9caaeeb150b7482a62 100644 (file)
@@ -1,17 +1,16 @@
 #ifndef _WIMLIB_WIN32_COMMON_H
 #define _WIMLIB_WIN32_COMMON_H
 
+#include <ntstatus.h>
 #include <windows.h>
+#include <winternl.h>
+
 #ifdef ERROR
 #  undef ERROR
 #endif
-
 #include "wimlib/types.h"
 #include "wimlib/win32.h"
 
-#include <ntstatus.h>
-#include <winternl.h>
-
 extern void
 set_errno_from_GetLastError(void);
 
index 80504a7bb31cc9504c0fbb74fe51bb364b5c3c69..969be854669d7432ec566dffd58fea2cdde1c121 100644 (file)
@@ -12,8 +12,8 @@
 #ifndef _WOF_H_
 #define _WOF_H_
 
-#include "wimlib/types.h"
 #include "wimlib/compiler.h"
+#include "wimlib/types.h"
 
 #define WOF_CURRENT_VERSION    1
 #define WOF_PROVIDER_WIM       1
index 5bb16f2fbcd5b9980eb682d98892ef9974a3ccaa..8562a0a9756e3dcb9e31ffa74e65a96d61373c31 100644 (file)
@@ -2,7 +2,6 @@
 #define _WIMLIB_XML_H
 
 #include "wimlib/types.h"
-#include "wimlib/file_io.h"
 
 struct wim_info;
 struct wim_reshdr;
@@ -71,4 +70,4 @@ xml_set_memory_allocator(void *(*malloc_func)(size_t),
                         void (*free_func)(void *),
                         void *(*realloc_func)(void *, size_t));
 
-#endif
+#endif /* _WIMLIB_XML_H */
index df45f08f99278a53d1921167e5926067bda15918..cbc1aa49a85230f9accaccbd40014f50da7819c2 100644 (file)
@@ -23,6 +23,8 @@
 #  include "config.h"
 #endif
 
+#include <string.h>
+
 #include "wimlib/capture.h"
 #include "wimlib/dentry.h"
 #include "wimlib/error.h"
@@ -32,8 +34,6 @@
 #include "wimlib/textfile.h"
 #include "wimlib/wildcard.h"
 
-#include <string.h>
-
 /*
  * Tally a file (or directory) that has been scanned for a capture operation,
  * and possibly call the progress function provided by the library user.
index 1976579289dd416d76344cf7e0fc99c9e939a4e3..47026e368d0b256afd1829fdbdc01a49e99be5b9 100644 (file)
 #  include "config.h"
 #endif
 
+#include <stdlib.h>
+#include <string.h>
+
 #include "wimlib.h"
 #include "wimlib/error.h"
 #include "wimlib/compressor_ops.h"
 #include "wimlib/util.h"
 
-#include <stdlib.h>
-#include <string.h>
-
 struct wimlib_compressor {
        const struct compressor_ops *ops;
        void *private;
index f74309583a994e263762691c84ea33ec64a0dd7d..e2ad298e3f33d8ec88536df26c3c9e52d48a0428 100644 (file)
 #  include "config.h"
 #endif
 
+#include <string.h>
+
 #include "wimlib/compress_common.h"
 #include "wimlib/util.h"
 
-#include <string.h>
-
 /* Given the binary tree node A[subtree_idx] whose children already
  * satisfy the maxheap property, swap the node with its greater child
  * until it is greater than both its children, so that the maxheap
index 90b81dd8357ce5e2c02da6f165789e71f8c3bc0c..acf4ea58afc24b4299f7848d22301486c6be5bbe 100644 (file)
 
 #ifdef ENABLE_MULTITHREADED_COMPRESSION
 
-#include "wimlib/assert.h"
-#include "wimlib/chunk_compressor.h"
-#include "wimlib/error.h"
-#include "wimlib/list.h"
-#include "wimlib/util.h"
-#ifdef __WIN32__
-#  include "wimlib/win32.h" /* win32_get_number_of_processors() */
-#endif
-
 #include <errno.h>
 #include <limits.h>
 #include <pthread.h>
 #  include <sys/sysctl.h>
 #endif
 
+#include "wimlib/assert.h"
+#include "wimlib/chunk_compressor.h"
+#include "wimlib/error.h"
+#include "wimlib/list.h"
+#include "wimlib/util.h"
+#ifdef __WIN32__
+#  include "wimlib/win32.h" /* win32_get_number_of_processors() */
+#endif
+
 struct message_queue {
        struct list_head list;
        pthread_mutex_t lock;
index db41957ae17b8abdd862c70b3e02e58fa61c2e71..b5eb951d8e0391a014311faa44481e3fede60bb5 100644 (file)
 #  include "config.h"
 #endif
 
+#include <string.h>
+
 #include "wimlib.h"
 #include "wimlib/assert.h"
 #include "wimlib/chunk_compressor.h"
 #include "wimlib/util.h"
 
-#include <string.h>
-
 struct serial_chunk_compressor {
        struct chunk_compressor base;
        struct wimlib_compressor *compressor;
index 38b4efa60291db98cae4620e268153b1e2b8ec95..e351a65cf86b17a99e6e1b48eb302e46797c4e53 100644 (file)
@@ -58,6 +58,8 @@
 #  include "config.h"
 #endif
 
+#include <errno.h>
+
 #include "wimlib/assert.h"
 #include "wimlib/dentry.h"
 #include "wimlib/inode.h"
@@ -66,8 +68,6 @@
 #include "wimlib/metadata.h"
 #include "wimlib/paths.h"
 
-#include <errno.h>
-
 /* On-disk format of a WIM dentry (directory entry), located in the metadata
  * resource for a WIM image.  */
 struct wim_dentry_on_disk {
index 6a1148a8dea48deaadb258a620aa285e56a8b263..5819f0ef30c84000e62403384ac702049b5a851b 100644 (file)
 #  include "config.h"
 #endif
 
+#include <errno.h>
+#include <iconv.h>
+#include <pthread.h>
+#include <string.h>
+
 #include "wimlib.h"
+#include "wimlib/alloca.h"
 #include "wimlib/assert.h"
 #include "wimlib/encoding.h"
 #include "wimlib/endianness.h"
 #include "wimlib/list.h"
 #include "wimlib/util.h"
 
-#include <errno.h>
-#include <iconv.h>
-#include <pthread.h>
-#include <stdlib.h>
-#include <string.h>
-
-#ifdef HAVE_ALLOCA_H
-#  include <alloca.h>
-#endif
 
 bool wimlib_mbs_is_utf8 = !TCHAR_IS_UTF16LE;
 
index ac50fa8fb87c27e5e8a19eb6c8920515b185d22d..9d65bef8f5c2443e6928b95caa0e19ebf7ae5c28 100644 (file)
 #  include "config.h"
 #endif
 
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
 #include "wimlib/apply.h"
 #include "wimlib/assert.h"
 #include "wimlib/dentry.h"
 #include "wimlib/wildcard.h"
 #include "wimlib/wim.h"
 
-#include <errno.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
 #define WIMLIB_EXTRACT_FLAG_FROM_PIPE   0x80000000
 #define WIMLIB_EXTRACT_FLAG_IMAGEMODE   0x40000000
 
index 68071298bf1c71b5f43b99774ad6d079ae215c5a..9455ed63ad0cd6cec4abdd5f9d645738059d2d33 100644 (file)
@@ -23,6 +23,9 @@
 #  include "config.h"
 #endif
 
+#include <errno.h>
+#include <unistd.h>
+
 #include "wimlib/error.h"
 #include "wimlib/file_io.h"
 #include "wimlib/util.h"
 #  include "wimlib/win32.h" /* For pread(), pwrite() replacements */
 #endif
 
-#include <errno.h>
-#include <unistd.h>
-
-
 /* Wrapper around read() that checks for errors keeps retrying until all
  * requested bytes have been read or until end-of file has occurred.
  *
index 58c9046cfe640dd836388bd09bc8cadd70880fd4..613256fa022059331cd5f2ec338b85df5e75d69f 100644 (file)
 #  include "config.h"
 #endif
 
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+
 #include "wimlib.h"
+#include "wimlib/alloca.h"
 #include "wimlib/assert.h"
 #include "wimlib/endianness.h"
 #include "wimlib/error.h"
 #include "wimlib/util.h"
 #include "wimlib/wim.h"
 
-#include <limits.h>
-#include <string.h>
-#include <unistd.h>
-#ifdef HAVE_ALLOCA_H
-#  include <alloca.h>
-#else
-#  include <stdlib.h>
-#endif
-
 /*
  * Reads the header from a WIM file.
  *
index 3d2abf60539380b9ab3656cdfb72cff13f7d2777..65f52b55eff901bdc74ec9001c213118eea8ab41 100644 (file)
 #  include "config.h"
 #endif
 
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h> /* for unlink()  */
+
 #include "wimlib/assert.h"
 #include "wimlib/endianness.h"
 #include "wimlib/error.h"
 #include "wimlib/util.h"
 #include "wimlib/write.h"
 
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h> /* for unlink()  */
-
 /* WIM lookup table:
  *
  * This is a logical mapping from SHA1 message digests to the data streams
index 117e2f3222198a860464ec668ab16777632dbd01..d986b1dd0f96d00dd6a004bd53ecca5a178bf5b1 100644 (file)
@@ -23,7 +23,6 @@
 #  include "config.h"
 #endif
 
-#include "wimlib/endianness.h"
 #include "wimlib/lzms_common.h"
 #include "wimlib/unaligned.h"
 
index ded8c0bb6cf231fa51e69547944d4a3a4a4f742a..411d667ffefdfb95ee6271725a2ddb92a0227c29 100644 (file)
 #  include "config.h"
 #endif
 
+#include <limits.h>
+#include <pthread.h>
+#include <string.h>
+
 #include "wimlib/compress_common.h"
 #include "wimlib/compressor_ops.h"
 #include "wimlib/endianness.h"
 #include "wimlib/unaligned.h"
 #include "wimlib/util.h"
 
-#include <string.h>
-#include <limits.h>
-#include <pthread.h>
-
 /* Stucture used for writing raw bits as a series of 16-bit little endian coding
  * units.  This starts at the *end* of the compressed data buffer and proceeds
  * backwards.  */
index 8cb096f2a529c8bce955681ecb9794777ad53363..73d4486da81b73ca0dbf6dd86528309a0777506f 100644 (file)
 #endif
 
 #include "wimlib/compress_common.h"
-#include "wimlib/decompressor_ops.h"
 #include "wimlib/decompress_common.h"
+#include "wimlib/decompressor_ops.h"
 #include "wimlib/error.h"
 #include "wimlib/lzms_common.h"
 #include "wimlib/util.h"
index 0993f60756d869dccad03a17ed54714f77a32056..3cc6981b186926ebef22bd63633153a6eb80a217 100644 (file)
 
 #include <string.h>
 
-#include "wimlib/bitops.h"
-#include "wimlib/endianness.h"
-#include "wimlib/lzx_common.h"
-#include "wimlib/unaligned.h"
-#include "wimlib/util.h"
-
 #ifdef __SSE2__
 #  include <emmintrin.h>
 #endif
 #  include <immintrin.h>
 #endif
 
+#include "wimlib/bitops.h"
+#include "wimlib/endianness.h"
+#include "wimlib/lzx_common.h"
+#include "wimlib/unaligned.h"
+#include "wimlib/util.h"
+
 /* Mapping: offset slot => first match offset that uses that offset slot.
  */
 const u32 lzx_offset_slot_base[LZX_MAX_OFFSET_SLOTS + 1] = {
index 67fbea940f0f5ca3b00d5b921445d1048a1a6772..dba27665eb278b1361a60f56998fb41ead8a1d45 100644 (file)
 #  include "config.h"
 #endif
 
+#include <string.h>
+
 #include "wimlib/decompressor_ops.h"
 #include "wimlib/decompress_common.h"
 #include "wimlib/error.h"
 #include "wimlib/lzx_common.h"
 #include "wimlib/util.h"
 
-#include <string.h>
-
 /* These values are chosen for fast decompression.  */
 #define LZX_MAINCODE_TABLEBITS         11
 #define LZX_LENCODE_TABLEBITS          10
index 0672c9c223834bf56c3f58ae4716586091be6671..2e50d6c3422c2e650727917caba50a38d8ae90e1 100644 (file)
 #  error "FUSE mount not supported on Windows!  Please configure --without-fuse"
 #endif
 
-#include "wimlib/dentry.h"
-#include "wimlib/encoding.h"
-#include "wimlib/lookup_table.h"
-#include "wimlib/metadata.h"
-#include "wimlib/paths.h"
-#include "wimlib/progress.h"
-#include "wimlib/reparse.h"
-#include "wimlib/timestamp.h"
-#include "wimlib/unix_data.h"
-#include "wimlib/write.h"
-#include "wimlib/xml.h"
+#define FUSE_USE_VERSION 26
 
+#include <attr/xattr.h>
 #include <dirent.h>
 #include <errno.h>
+#include <fuse.h>
 #include <limits.h>
 #include <mqueue.h>
 #include <pthread.h>
 #include <unistd.h>
 #include <utime.h>
 
-#define FUSE_USE_VERSION 26
-#include <fuse.h>
-#include <attr/xattr.h>
+#include "wimlib/dentry.h"
+#include "wimlib/encoding.h"
+#include "wimlib/lookup_table.h"
+#include "wimlib/metadata.h"
+#include "wimlib/paths.h"
+#include "wimlib/progress.h"
+#include "wimlib/reparse.h"
+#include "wimlib/timestamp.h"
+#include "wimlib/unix_data.h"
+#include "wimlib/write.h"
+#include "wimlib/xml.h"
 
 #ifndef O_NOFOLLOW
 #  define O_NOFOLLOW 0  /* Security only...  */
index 22b9e55422497ae85e5a45a375863d6b806482f0..0417b0b8c5249b3bca3ef09e0d11e7b8850f125d 100644 (file)
 #ifdef WITH_NTFS_3G
 
 #include <errno.h>
-#include <stdlib.h>
-
-#ifdef HAVE_ALLOCA_H
-#  include <alloca.h>
-#endif
 
 #include <ntfs-3g/attrib.h>
 #include <ntfs-3g/reparse.h>
 #include <ntfs-3g/security.h>
 #include <ntfs-3g/volume.h>
 
+#include "wimlib/alloca.h"
 #include "wimlib/assert.h"
 #include "wimlib/capture.h"
 #include "wimlib/dentry.h"
index 4d6b4cf8d7f497e245df8ded52a56c42ed376a9b..32770ac00c7c5d34046f1b4af8145bbeb8b59be6 100644 (file)
 #  include "config.h"
 #endif
 
+#include <string.h>
+
 #include "wimlib.h"
 #include "wimlib/paths.h"
 #include "wimlib/util.h"
 
-#include <string.h>
-
 /* Like the basename() function, but does not modify @path; it just returns a
  * pointer to it.  This assumes the path separator is the
  * OS_PREFERRED_PATH_SEPARATOR.  */
index b616dff45d1401c0c5fd046e70159423ff7cb23c..cdf014737786df2534ccc1669ad9176198f7fe1b 100644 (file)
@@ -23,6 +23,8 @@
 #  include "config.h"
 #endif
 
+#include <string.h>
+
 #include "wimlib/progress.h"
 
 int
index cf9fc686139696980cb9e17145430f7f836e6619..ff46e9b1061d683469e00b1718d3e871258c70ad 100644 (file)
@@ -23,6 +23,9 @@
 #  include "config.h"
 #endif
 
+#include <errno.h>
+
+#include "wimlib/alloca.h"
 #include "wimlib/assert.h"
 #include "wimlib/compiler.h"
 #include "wimlib/endianness.h"
 #include "wimlib/reparse.h"
 #include "wimlib/resource.h"
 
-#ifdef HAVE_ALLOCA_H
-#  include <alloca.h>
-#endif
-#include <errno.h>
-#include <stdlib.h>
-
 /*
  * Read the data from a symbolic link, junction, or mount point reparse point
  * buffer into a `struct reparse_data'.
index 13c1581fc866ff48e51fef709ef75887c0109c3c..d5c26b40c00ace2b4392e8821879b22276fb7284 100644 (file)
 #  include "config.h"
 #endif
 
+#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#include "wimlib/alloca.h"
 #include "wimlib/assert.h"
 #include "wimlib/bitops.h"
 #include "wimlib/endianness.h"
 #  include "wimlib/ntfs_3g.h"
 #endif
 
-#ifdef HAVE_ALLOCA_H
-#  include <alloca.h>
-#endif
-#include <errno.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <unistd.h>
 
 /*
  *                         Compressed WIM resources
index 4df258ac97af06f8e6eed59e0881e1224c2316c9..24c2acf74b69a0fc532aff99408b79de2660bff7 100644 (file)
@@ -26,6 +26,7 @@
 #endif
 
 #include "wimlib.h"
+#include "wimlib/alloca.h"
 #include "wimlib/error.h"
 #include "wimlib/list.h"
 #include "wimlib/lookup_table.h"
 #include "wimlib/wim.h"
 #include "wimlib/write.h"
 
-#ifdef HAVE_ALLOCA_H
-#  include <alloca.h>
-#else
-#  include <stdlib.h>
-#endif
-
 struct swm_part_info {
        struct list_head stream_list;
        u64 size;
index 01c3959289e6045fc68d47e6b42159b358cc2fd7..9bd9b6a770f1d846ce4cdeac3c7b9d131ddba74a 100644 (file)
 #  include "config.h"
 #endif
 
-#include "wimlib/encoding.h"
-#include "wimlib/error.h"
-#include "wimlib/file_io.h"
-#include "wimlib/textfile.h"
-#include "wimlib/util.h"
-
 #include <ctype.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <sys/stat.h>
 #include <unistd.h>
 
+#include "wimlib/encoding.h"
+#include "wimlib/error.h"
+#include "wimlib/file_io.h"
+#include "wimlib/textfile.h"
+#include "wimlib/util.h"
+
 static int
 read_file_contents(const tchar *path, void **buf_ret, size_t *bufsize_ret)
 {
index 27f26576a4c36abba3616fabb4581da9cff1200c..afa4b723084f7c9bfce39f738b5887336eefc4d3 100644 (file)
 #  include "config.h"
 #endif
 
+#include <errno.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <unistd.h>
+
 #include "wimlib/apply.h"
 #include "wimlib/assert.h"
 #include "wimlib/dentry.h"
 #include "wimlib/timestamp.h"
 #include "wimlib/unix_data.h"
 
-#include <errno.h>
-#include <fcntl.h>
-#include <limits.h>
-#include <stdlib.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <unistd.h>
-
 /* We don't require O_NOFOLLOW, but the advantage of having it is that if we
  * need to extract a file to a location at which there exists a symbolic link,
  * open(..., O_NOFOLLOW | ...) recognizes the symbolic link rather than
index d5e0c787a30e787f6b59d99a9847ec6d0aaf8eb9..b973c21d8a896ac1d4b28ba570f9bf197c144fb3 100644 (file)
 #  include "config.h"
 #endif
 
+#include <errno.h>
+#include <string.h>
+#include <sys/stat.h>
+
+#include "wimlib/alloca.h"
 #include "wimlib/assert.h"
 #include "wimlib/capture.h"
 #include "wimlib/dentry.h"
 #include "wimlib/progress.h"
 #include "wimlib/xml.h"
 
-#include <errno.h>
-#include <sys/stat.h>
-#include <stdlib.h>
-
-#ifdef HAVE_ALLOCA_H
-#  include <alloca.h>
-#endif
-
 /* Saved specification of a "primitive" update operation that was performed.  */
 struct update_primitive {
        enum {
index 5715e5fcf76f2209e81130f689ebfadd3a9b8196..febe8ee039def9e92f435664756ff53ce2801837 100644 (file)
@@ -26,6 +26,7 @@
 #endif
 
 #include <ctype.h>
+
 #include "wimlib/dentry.h"
 #include "wimlib/encoding.h"
 #include "wimlib/error.h"
index 1c0e6efdf96ae5576b53de16161973010535ffef..df55562193a9d797f67f697466261bd213b2b897 100644 (file)
--- a/src/wim.c
+++ b/src/wim.c
 #  include "config.h"
 #endif
 
+#include <errno.h>
+#include <fcntl.h>
+#ifndef __WIN32__
+#  include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <unistd.h>
+
 #include "wimlib.h"
 #include "wimlib/assert.h"
 #include "wimlib/bitops.h"
 #include "wimlib/security.h"
 #include "wimlib/wim.h"
 #include "wimlib/xml.h"
-
 #ifdef __WIN32__
 #  include "wimlib/win32.h" /* for realpath() replacement */
 #endif
 
-#include <errno.h>
-#include <fcntl.h>
-#ifndef __WIN32__
-#  include <langinfo.h>
-#endif
-#include <stdlib.h>
-#include <unistd.h>
-
 static int
 wim_default_pack_compression_type(void)
 {
index b1db0f8c5feac1f842d77c99c1d36610e2ca2885..2b6a2415181ec7c7d1b90d34798eecb6bf1038bc 100644 (file)
 #endif
 
 #include "wimlib/win32_common.h"
-#include "wimlib/win32.h"
+
 #include "wimlib/assert.h"
 #include "wimlib/error.h"
 #include "wimlib/lookup_table.h"
 #include "wimlib/util.h"
 #include "wimlib/wimboot.h"
+#include "wimlib/win32.h"
 #include "wimlib/wof.h"
 
 static HANDLE
index ab572cb27351b0e7238dab0e642bccec29cfa622..78a59e3b457d1d8760986930e97b893bbbc1acab 100644 (file)
@@ -27,6 +27,8 @@
 #  include "config.h"
 #endif
 
+#include <errno.h>
+
 #include "wimlib/win32_common.h"
 
 #include "wimlib/assert.h"
@@ -39,8 +41,6 @@
 #include "wimlib/paths.h"
 #include "wimlib/reparse.h"
 
-#include <errno.h>
-
 struct winnt_scan_stats {
        unsigned long num_get_sd_access_denied;
        unsigned long num_get_sacl_priv_notheld;
index a1c3378e92ccb04e8384f83098f027c30315f545..f66b33a9ace3ed07601ad89be31c8613a7c5dc5f 100644 (file)
@@ -28,6 +28,7 @@
 #include <errno.h>
 
 #include "wimlib/win32_common.h"
+
 #include "wimlib/error.h"
 #include "wimlib/util.h"
 
index fcc5983fca50ee2c300342a2e5a360285c8ef43d..f3c12ffe4cbc8ffacced2e635ff3a352c773a21f 100644 (file)
 #  include <sys/file.h>
 #endif
 
+#include <errno.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "wimlib/alloca.h"
 #include "wimlib/assert.h"
 #include "wimlib/chunk_compressor.h"
 #include "wimlib/endianness.h"
 #include "wimlib/write.h"
 #include "wimlib/xml.h"
 
-#include <errno.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-#ifdef HAVE_ALLOCA_H
-#  include <alloca.h>
-#endif
 
 /* wimlib internal flags used when writing resources.  */
 #define WRITE_RESOURCE_FLAG_RECOMPRESS         0x00000001
index 382500597164321ec3e0b5e172c58a811d5131ce..22966e0e466d7b7f5560ce7a32abba30f1c05294 100644 (file)
--- a/src/xml.c
+++ b/src/xml.c
 #  include "config.h"
 #endif
 
+#include <libxml/encoding.h>
+#include <libxml/parser.h>
+#include <libxml/tree.h>
+#include <libxml/xmlwriter.h>
+#include <string.h>
+
 #include "wimlib/assert.h"
 #include "wimlib/dentry.h"
 #include "wimlib/encoding.h"
 #include "wimlib/xml.h"
 #include "wimlib/write.h"
 
-#include <libxml/encoding.h>
-#include <libxml/parser.h>
-#include <libxml/tree.h>
-#include <libxml/xmlwriter.h>
-#include <limits.h>
-#include <string.h>
-#include <unistd.h>
-
 /* Structures used to form an in-memory representation of the XML data (other
  * than the raw parse tree from libxml). */