]> wimlib.net Git - wimlib/commitdiff
Style
authorEric Biggers <ebiggers3@gmail.com>
Sat, 23 Mar 2013 22:26:33 +0000 (17:26 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Sat, 23 Mar 2013 22:26:33 +0000 (17:26 -0500)
src/compress.c
src/decompress.c
src/dentry.c
src/endianness.h
src/lzx-compress.c
src/lzx-decompress.c
src/ntfs-apply.c
src/xpress-compress.c
src/xpress-decompress.c

index cc3c5ca5172d9374136df169a5e14548f6a4e0a1..c40256a045c60a9756d2766cb23d8f9b2f28cea9 100644 (file)
@@ -27,7 +27,8 @@
 #include <stdlib.h>
 #include <string.h>
 
-static inline void flush_bits(struct output_bitstream *ostream)
+static inline void
+flush_bits(struct output_bitstream *ostream)
 {
        *(u16*)ostream->bit_output = cpu_to_le16(ostream->bitbuf);
        ostream->bit_output = ostream->next_bit_output;
@@ -38,8 +39,9 @@ static inline void flush_bits(struct output_bitstream *ostream)
 
 /* Writes @num_bits bits, given by the @num_bits least significant bits of
  * @bits, to the output @ostream. */
-int bitstream_put_bits(struct output_bitstream *ostream, output_bitbuf_t bits,
-                      unsigned num_bits)
+int
+bitstream_put_bits(struct output_bitstream *ostream, output_bitbuf_t bits,
+                  unsigned num_bits)
 {
        unsigned rem_bits;
 
@@ -73,7 +75,8 @@ int bitstream_put_bits(struct output_bitstream *ostream, output_bitbuf_t bits,
 }
 
 /* Flushes any remaining bits in the output buffer to the output byte stream. */
-int flush_output_bitstream(struct output_bitstream *ostream)
+int
+flush_output_bitstream(struct output_bitstream *ostream)
 {
        if (ostream->num_bytes_remaining + (ostream->output -
                                        ostream->bit_output) < 2)
@@ -87,8 +90,9 @@ int flush_output_bitstream(struct output_bitstream *ostream)
 
 /* Initializes an output bit buffer to write its output to the memory location
  * pointer to by @data. */
-void init_output_bitstream(struct output_bitstream *ostream, void *data,
-                          unsigned num_bytes)
+void
+init_output_bitstream(struct output_bitstream *ostream, void *data,
+                     unsigned num_bytes)
 {
        wimlib_assert(num_bytes >= 4);
 
@@ -126,7 +130,8 @@ typedef struct {
 
 /* Comparator function for HuffmanLeafNodes.  Sorts primarily by symbol
  * frequency and secondarily by symbol value. */
-static int cmp_leaves_by_freq(const void *__leaf1, const void *__leaf2)
+static int
+cmp_leaves_by_freq(const void *__leaf1, const void *__leaf2)
 {
        const HuffmanLeafNode *leaf1 = __leaf1;
        const HuffmanLeafNode *leaf2 = __leaf2;
@@ -141,7 +146,8 @@ static int cmp_leaves_by_freq(const void *__leaf1, const void *__leaf2)
 
 /* Comparator function for HuffmanLeafNodes.  Sorts primarily by code length and
  * secondarily by symbol value. */
-static int cmp_leaves_by_code_len(const void *__leaf1, const void *__leaf2)
+static int
+cmp_leaves_by_code_len(const void *__leaf1, const void *__leaf2)
 {
        const HuffmanLeafNode *leaf1 = __leaf1;
        const HuffmanLeafNode *leaf2 = __leaf2;
@@ -156,7 +162,8 @@ static int cmp_leaves_by_code_len(const void *__leaf1, const void *__leaf2)
 
 /* Recursive function to calculate the depth of the leaves in a Huffman tree.
  * */
-static void huffman_tree_compute_path_lengths(HuffmanNode *node, u16 cur_len)
+static void
+huffman_tree_compute_path_lengths(HuffmanNode *node, u16 cur_len)
 {
        if (node->sym == (u16)(-1)) {
                /* Intermediate node. */
@@ -224,9 +231,10 @@ static void huffman_tree_compute_path_lengths(HuffmanNode *node, u16 cur_len)
  *                     lens[i] bits of codewords[i] will contain the codeword
  *                     for symbol i.
  */
-void make_canonical_huffman_code(unsigned num_syms, unsigned max_codeword_len,
-                                const freq_t freq_tab[], u8 lens[],
-                                u16 codewords[])
+void
+make_canonical_huffman_code(unsigned num_syms, unsigned max_codeword_len,
+                           const freq_t freq_tab[], u8 lens[],
+                           u16 codewords[])
 {
        /* We require at least 2 possible symbols in the alphabet to produce a
         * valid Huffman decoding table. It is allowed that fewer than 2 symbols
index 5de137956286fbd5730eaaa0a4b41f3203a98cab..6ca0f1616c767bb4b4b8fcb7abf343478b4b4c7a 100644 (file)
  * indices into the decoding table, and symbol entries are distinguished from
  * pointers by the fact that values less than @num_syms must be symbol values.
  */
-int make_huffman_decode_table(u16 decode_table[],  unsigned num_syms,
-                             unsigned table_bits, const u8 lens[],
-                             unsigned max_codeword_len)
+int
+make_huffman_decode_table(u16 decode_table[],  unsigned num_syms,
+                         unsigned table_bits, const u8 lens[],
+                         unsigned max_codeword_len)
 {
        unsigned len_counts[max_codeword_len + 1];
        u16 sorted_syms[num_syms];
@@ -294,12 +295,13 @@ int make_huffman_decode_table(u16 decode_table[],  unsigned num_syms,
 
 /* Reads a Huffman-encoded symbol from the bistream when the number of remaining
  * bits is less than the maximum codeword length. */
-int read_huffsym_near_end_of_input(struct input_bitstream *istream,
-                                  const u16 decode_table[],
-                                  const u8 lens[],
-                                  unsigned num_syms,
-                                  unsigned table_bits,
-                                  unsigned *n)
+int
+read_huffsym_near_end_of_input(struct input_bitstream *istream,
+                              const u16 decode_table[],
+                              const u8 lens[],
+                              unsigned num_syms,
+                              unsigned table_bits,
+                              unsigned *n)
 {
        unsigned bitsleft = istream->bitsleft;
        unsigned key_size;
index 2e12f339d5eceba57ef1cd80bd295c959e94c176..4f9e9f7a7aca69682eeb2c69f5fa4546bf3720aa 100644 (file)
@@ -796,7 +796,8 @@ destroy_ads_entry(struct wim_ads_entry *ads_entry)
 }
 
 /* Frees an inode. */
-void free_inode(struct wim_inode *inode)
+void
+free_inode(struct wim_inode *inode)
 {
        if (inode) {
                if (inode->i_ads_entries) {
@@ -818,7 +819,8 @@ void free_inode(struct wim_inode *inode)
 
 /* Decrements link count on an inode and frees it if the link count reaches 0.
  * */
-static void put_inode(struct wim_inode *inode)
+static void
+put_inode(struct wim_inode *inode)
 {
        wimlib_assert(inode->i_nlink != 0);
        if (--inode->i_nlink == 0) {
@@ -836,7 +838,8 @@ static void put_inode(struct wim_inode *inode)
  * The corresponding inode (if any) is freed only if its link count is
  * decremented to 0.
  */
-void free_dentry(struct wim_dentry *dentry)
+void
+free_dentry(struct wim_dentry *dentry)
 {
        FREE(dentry->file_name);
        FREE(dentry->short_name);
@@ -846,7 +849,8 @@ void free_dentry(struct wim_dentry *dentry)
        FREE(dentry);
 }
 
-void put_dentry(struct wim_dentry *dentry)
+void
+put_dentry(struct wim_dentry *dentry)
 {
        wimlib_assert(dentry->refcnt != 0);
        if (--dentry->refcnt == 0)
@@ -855,7 +859,8 @@ void put_dentry(struct wim_dentry *dentry)
 
 /* This function is passed as an argument to for_dentry_in_tree_depth() in order
  * to free a directory tree. */
-static int do_free_dentry(struct wim_dentry *dentry, void *__lookup_table)
+static int
+do_free_dentry(struct wim_dentry *dentry, void *__lookup_table)
 {
        struct wim_lookup_table *lookup_table = __lookup_table;
        unsigned i;
@@ -884,13 +889,15 @@ static int do_free_dentry(struct wim_dentry *dentry, void *__lookup_table)
  *                     table entries corresponding to the dentries will be
  *                     decremented.
  */
-void free_dentry_tree(struct wim_dentry *root, struct wim_lookup_table *lookup_table)
+void
+free_dentry_tree(struct wim_dentry *root, struct wim_lookup_table *lookup_table)
 {
        if (root)
                for_dentry_in_tree_depth(root, do_free_dentry, lookup_table);
 }
 
-int increment_dentry_refcnt(struct wim_dentry *dentry, void *ignore)
+int
+increment_dentry_refcnt(struct wim_dentry *dentry, void *ignore)
 {
        dentry->refcnt++;
        return 0;
index 584b62178769ce80cc9fe593e2ef63f236c5ab15..3de872ac7d592cd8a31ed44ee2833855ea1856a2 100644 (file)
@@ -8,14 +8,16 @@
 /* Watch out for conflicts with ntfs-3g headers... */
 
 #ifndef bswap16
-static inline uint16_t bswap16(uint16_t n)
+static inline uint16_t
+bswap16(uint16_t n)
 {
        return (n << 8) | (n >> 8);
 }
 #endif /* ifndef bswap16 */
 
 #ifndef bswap32
-static inline uint32_t bswap32(uint32_t n)
+static inline uint32_t
+bswap32(uint32_t n)
 {
 #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
        return __builtin_bswap32(n);
@@ -27,7 +29,8 @@ static inline uint32_t bswap32(uint32_t n)
 #endif /* ifndef bswap32 */
 
 #ifndef bswap64
-static inline uint64_t bswap64(uint64_t n)
+static inline uint64_t
+bswap64(uint64_t n)
 {
 #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
        return __builtin_bswap64(n);
@@ -59,25 +62,29 @@ static inline uint64_t bswap64(uint64_t n)
 #      endif
 #endif
 
-static inline void array_cpu_to_le32(uint32_t *p, size_t n)
+static inline void
+array_cpu_to_le32(uint32_t *p, size_t n)
 {
        for (size_t i = 0; i < n; i++)
                p[i] = cpu_to_le32(p[i]);
 }
 
-static inline void array_le32_to_cpu(uint32_t *p, size_t n)
+static inline void
+array_le32_to_cpu(uint32_t *p, size_t n)
 {
        for (size_t i = 0; i < n; i++)
                p[i] = le32_to_cpu(p[i]);
 }
 
-static inline void array_cpu_to_le64(uint64_t *p, size_t n)
+static inline void
+array_cpu_to_le64(uint64_t *p, size_t n)
 {
        for (size_t i = 0; i < n; i++)
                p[i] = cpu_to_le64(p[i]);
 }
 
-static inline void array_le64_to_cpu(uint64_t *p, size_t n)
+static inline void
+array_le64_to_cpu(uint64_t *p, size_t n)
 {
        for (size_t i = 0; i < n; i++)
                p[i] = le64_to_cpu(p[i]);
index 1bc107ff3f96c80fd544cd5b9873220aaf39b348..9a654b2d796586d1177adf234ff04b785e0d268f 100644 (file)
@@ -91,7 +91,8 @@ struct lzx_freq_tables {
  * numbers in the lzx_position_base array to calculate the slot directly from
  * the formatted offset without actually looking at the array.
  */
-static inline unsigned lzx_get_position_slot(unsigned formatted_offset)
+static inline unsigned
+lzx_get_position_slot(unsigned formatted_offset)
 {
 #if 0
        /*
@@ -120,7 +121,8 @@ static inline unsigned lzx_get_position_slot(unsigned formatted_offset)
        }
 }
 
-static u32 lzx_record_literal(u8 literal, void *__main_freq_tab)
+static u32
+lzx_record_literal(u8 literal, void *__main_freq_tab)
 {
        freq_t *main_freq_tab = __main_freq_tab;
        main_freq_tab[literal]++;
@@ -131,8 +133,9 @@ static u32 lzx_record_literal(u8 literal, void *__main_freq_tab)
  * the frequency of symbols in the main, length, and aligned offset alphabets.
  * The return value is a 32-bit number that provides the match in an
  * intermediate representation documented below. */
-static u32 lzx_record_match(unsigned match_offset, unsigned match_len,
-                           void *__freq_tabs, void *__queue)
+static u32
+lzx_record_match(unsigned match_offset, unsigned match_len,
+                void *__freq_tabs, void *__queue)
 {
        struct lzx_freq_tables *freq_tabs = __freq_tabs;
        struct lru_queue *queue = __queue;
@@ -241,8 +244,9 @@ static u32 lzx_record_match(unsigned match_offset, unsigned match_len,
  * @codes:     Pointer to a structure that contains the codewords for the
  *                     main, length, and aligned offset Huffman codes.
  */
-static int lzx_write_match(struct output_bitstream *out, int block_type,
-                          u32 match, const struct lzx_codes *codes)
+static int
+lzx_write_match(struct output_bitstream *out, int block_type,
+               u32 match, const struct lzx_codes *codes)
 {
        /* low 8 bits are the match length minus 2 */
        unsigned match_len_minus_2 = match & 0xff;
@@ -347,11 +351,12 @@ static int lzx_write_match(struct output_bitstream *out, int block_type,
  * @codes:     Pointer to a structure that contains the codewords for the
  *                     main, length, and aligned offset Huffman codes.
  */
-static int lzx_write_compressed_literals(struct output_bitstream *ostream,
-                                        int block_type,
-                                        const u32 match_tab[],
-                                        unsigned  num_compressed_literals,
-                                        const struct lzx_codes *codes)
+static int
+lzx_write_compressed_literals(struct output_bitstream *ostream,
+                             int block_type,
+                             const u32 match_tab[],
+                             unsigned  num_compressed_literals,
+                             const struct lzx_codes *codes)
 {
        unsigned i;
        u32 match;
@@ -397,8 +402,9 @@ static int lzx_write_compressed_literals(struct output_bitstream *ostream,
  * @lens:      The code lengths for the Huffman tree, indexed by symbol.
  * @num_symbols:       The number of symbols in the code.
  */
-static int lzx_write_compressed_tree(struct output_bitstream *out,
-                                    const u8 lens[], unsigned num_symbols)
+static int
+lzx_write_compressed_tree(struct output_bitstream *out,
+                         const u8 lens[], unsigned num_symbols)
 {
        /* Frequencies of the length symbols, including the RLE symbols (NOT the
         * actual lengths themselves). */
@@ -560,8 +566,9 @@ static int lzx_write_compressed_tree(struct output_bitstream *out,
 
 /* Builds the canonical Huffman code for the main tree, the length tree, and the
  * aligned offset tree. */
-static void lzx_make_huffman_codes(const struct lzx_freq_tables *freq_tabs,
-                               struct lzx_codes *codes)
+static void 
+lzx_make_huffman_codes(const struct lzx_freq_tables *freq_tabs,
+                      struct lzx_codes *codes)
 {
        make_canonical_huffman_code(LZX_MAINTREE_NUM_SYMBOLS,
                                        LZX_MAX_CODEWORD_LEN,
@@ -581,8 +588,9 @@ static void lzx_make_huffman_codes(const struct lzx_freq_tables *freq_tabs,
                                        codes->aligned_codewords);
 }
 
-static void do_call_insn_translation(u32 *call_insn_target, int input_pos,
-                                    int32_t file_size)
+static void
+do_call_insn_translation(u32 *call_insn_target, int input_pos,
+                        int32_t file_size)
 {
        int32_t abs_offset;
        int32_t rel_offset;
@@ -602,8 +610,8 @@ static void do_call_insn_translation(u32 *call_insn_target, int input_pos,
 
 /* This is the reverse of undo_call_insn_preprocessing() in lzx-decompress.c.
  * See the comment above that function for more information. */
-static void do_call_insn_preprocessing(u8 uncompressed_data[],
-                                      int uncompressed_data_len)
+static void
+do_call_insn_preprocessing(u8 uncompressed_data[], int uncompressed_data_len)
 {
        for (int i = 0; i < uncompressed_data_len - 10; i++) {
                if (uncompressed_data[i] == 0xe8) {
@@ -647,8 +655,9 @@ static const struct lz_params lzx_lz_params = {
  * not reduce its size, and @compressed_data will not contain the full
  * compressed data.
  */
-int lzx_compress(const void *__uncompressed_data, unsigned uncompressed_len,
-                void *compressed_data, unsigned *compressed_len_ret)
+int
+lzx_compress(const void *__uncompressed_data, unsigned uncompressed_len,
+            void *compressed_data, unsigned *compressed_len_ret)
 {
        struct output_bitstream ostream;
        u8 uncompressed_data[uncompressed_len + 8];
index 1cc5113c4515b0f1fa60065f35a1b714982f13e6..da462186c06870b2038098bc0b3aab97dc6dd229 100644 (file)
@@ -133,9 +133,10 @@ struct lzx_tables {
 /*
  * Reads a Huffman-encoded symbol using the pre-tree.
  */
-static inline int read_huffsym_using_pretree(struct input_bitstream *istream,
-                                            const u16 pretree_decode_table[],
-                                            const u8 pretree_lens[], unsigned *n)
+static inline int
+read_huffsym_using_pretree(struct input_bitstream *istream,
+                          const u16 pretree_decode_table[],
+                          const u8 pretree_lens[], unsigned *n)
 {
        return read_huffsym(istream, pretree_decode_table, pretree_lens,
                            LZX_PRETREE_NUM_SYMBOLS, LZX_PRETREE_TABLEBITS, n,
@@ -143,9 +144,10 @@ static inline int read_huffsym_using_pretree(struct input_bitstream *istream,
 }
 
 /* Reads a Huffman-encoded symbol using the main tree. */
-static inline int read_huffsym_using_maintree(struct input_bitstream *istream,
-                                             const struct lzx_tables *tables,
-                                             unsigned *n)
+static inline int
+read_huffsym_using_maintree(struct input_bitstream *istream,
+                           const struct lzx_tables *tables,
+                           unsigned *n)
 {
        return read_huffsym(istream, tables->maintree_decode_table,
                            tables->maintree_lens, LZX_MAINTREE_NUM_SYMBOLS,
@@ -153,9 +155,10 @@ static inline int read_huffsym_using_maintree(struct input_bitstream *istream,
 }
 
 /* Reads a Huffman-encoded symbol using the length tree. */
-static inline int read_huffsym_using_lentree(struct input_bitstream *istream,
-                                            const struct lzx_tables *tables,
-                                            unsigned *n)
+static inline int
+read_huffsym_using_lentree(struct input_bitstream *istream,
+                          const struct lzx_tables *tables,
+                          unsigned *n)
 {
        return read_huffsym(istream, tables->lentree_decode_table,
                            tables->lentree_lens, LZX_LENTREE_NUM_SYMBOLS,
@@ -163,9 +166,10 @@ static inline int read_huffsym_using_lentree(struct input_bitstream *istream,
 }
 
 /* Reads a Huffman-encoded symbol using the aligned offset tree. */
-static inline int read_huffsym_using_alignedtree(struct input_bitstream *istream,
-                                                const struct lzx_tables *tables,
-                                                unsigned *n)
+static inline int
+read_huffsym_using_alignedtree(struct input_bitstream *istream,
+                              const struct lzx_tables *tables,
+                              unsigned *n)
 {
        return read_huffsym(istream, tables->alignedtree_decode_table,
                            tables->alignedtree_lens,
@@ -185,8 +189,9 @@ static inline int read_huffsym_using_alignedtree(struct input_bitstream *istream
  * @num_lens:  Number of length values to decode and return.
  *
  */
-static int lzx_read_code_lens(struct input_bitstream *istream, u8 lens[],
-                             unsigned num_lens)
+static int
+lzx_read_code_lens(struct input_bitstream *istream, u8 lens[],
+                  unsigned num_lens)
 {
        /* Declare the decoding table and length table for the pretree. */
        u16 pretree_decode_table[(1 << LZX_PRETREE_TABLEBITS) +
@@ -306,11 +311,12 @@ static int lzx_read_code_lens(struct input_bitstream *istream, u8 lens[],
  *                     R0, R1, and R2 will be written (only for uncompressed
  *                     blocks, which contain this information in the header)
  */
-static int lzx_read_block_header(struct input_bitstream *istream,
-                                unsigned *block_size_ret,
-                                unsigned *block_type_ret,
-                                struct lzx_tables *tables,
-                                struct lru_queue *queue)
+static int
+lzx_read_block_header(struct input_bitstream *istream,
+                     unsigned *block_size_ret,
+                     unsigned *block_type_ret,
+                     struct lzx_tables *tables,
+                     struct lru_queue *queue)
 {
        int ret;
        unsigned block_type;
@@ -511,12 +517,13 @@ static int lzx_read_block_header(struct input_bitstream *istream,
  *     - Match refers to data before the window.
  *     - The input bitstream ended unexpectedly.
  */
-static int lzx_decode_match(unsigned main_element, int block_type,
-                           unsigned bytes_remaining, u8 *window,
-                           unsigned window_pos,
-                           const struct lzx_tables *tables,
-                           struct lru_queue *queue,
-                           struct input_bitstream *istream)
+static int
+lzx_decode_match(unsigned main_element, int block_type,
+                unsigned bytes_remaining, u8 *window,
+                unsigned window_pos,
+                const struct lzx_tables *tables,
+                struct lru_queue *queue,
+                struct input_bitstream *istream)
 {
        unsigned length_header;
        unsigned position_slot;
@@ -668,8 +675,9 @@ static int lzx_decode_match(unsigned main_element, int block_type,
        return match_len;
 }
 
-static void undo_call_insn_translation(u32 *call_insn_target, int input_pos,
-                                      int32_t file_size)
+static void
+undo_call_insn_translation(u32 *call_insn_target, int input_pos,
+                          int32_t file_size)
 {
        int32_t abs_offset;
        int32_t rel_offset;
@@ -709,8 +717,8 @@ static void undo_call_insn_translation(u32 *call_insn_target, int input_pos,
  * Call instruction processing is supposed to take the file size as a parameter,
  * as it is used in calculating the translated jump targets.  But in WIM files,
  * this file size is always the same (LZX_WIM_MAGIC_FILESIZE == 12000000).*/
-static void undo_call_insn_preprocessing(u8 uncompressed_data[],
-                                        int uncompressed_data_len)
+static void
+undo_call_insn_preprocessing(u8 uncompressed_data[], int uncompressed_data_len)
 {
        for (int i = 0; i < uncompressed_data_len - 10; i++) {
                if (uncompressed_data[i] == 0xe8) {
@@ -737,12 +745,13 @@ static void undo_call_insn_preprocessing(u8 uncompressed_data[],
  * @queue:     The least-recently-used queue for match offsets.
  * @istream:   The input bitstream for the compressed literals.
  */
-static int lzx_decompress_block(int block_type, unsigned block_size,
-                               u8 *window,
-                               unsigned window_pos,
-                               const struct lzx_tables *tables,
-                               struct lru_queue *queue,
-                               struct input_bitstream *istream)
+static int
+lzx_decompress_block(int block_type, unsigned block_size,
+                    u8 *window,
+                    unsigned window_pos,
+                    const struct lzx_tables *tables,
+                    struct lru_queue *queue,
+                    struct input_bitstream *istream)
 {
        unsigned main_element;
        unsigned end;
@@ -795,8 +804,9 @@ static int lzx_decompress_block(int block_type, unsigned block_size,
  *
  * Return 0 on success; non-zero on failure.
  */
-int lzx_decompress(const void *compressed_data, unsigned compressed_len,
-                  void *uncompressed_data, unsigned uncompressed_len)
+int
+lzx_decompress(const void *compressed_data, unsigned compressed_len,
+              void *uncompressed_data, unsigned uncompressed_len)
 {
        struct lzx_tables tables;
        struct input_bitstream istream;
index 245e0b55c3a1feb1d807e5979d556cd9401cb42c..d28dbfac4acdec4379af614cf7345f026f1aad70 100644 (file)
@@ -43,8 +43,9 @@
 #include <string.h>
 #include <locale.h>
 
-static int extract_wim_chunk_to_ntfs_attr(const void *buf, size_t len,
-                                         u64 offset, void *arg)
+static int
+extract_wim_chunk_to_ntfs_attr(const void *buf, size_t len,
+                              u64 offset, void *arg)
 {
        ntfs_attr *na = arg;
        if (ntfs_attr_pwrite(na, offset, len, buf) == len) {
@@ -82,8 +83,9 @@ extract_wim_resource_to_ntfs_attr(const struct wim_lookup_table_entry *lte,
  *
  * Returns 0 on success, nonzero on failure.
  */
-static int write_ntfs_data_streams(ntfs_inode *ni, const struct wim_dentry *dentry,
-                                  union wimlib_progress_info *progress_info)
+static int
+write_ntfs_data_streams(ntfs_inode *ni, const struct wim_dentry *dentry,
+                       union wimlib_progress_info *progress_info)
 {
        int ret = 0;
        unsigned stream_idx = 0;
@@ -328,8 +330,9 @@ apply_file_attributes_and_security_data(ntfs_inode *ni,
  * Transfers the reparse data from a WIM inode (which must represent a reparse
  * point) to a NTFS inode.
  */
-static int apply_reparse_data(ntfs_inode *ni, const struct wim_dentry *dentry,
-                             union wimlib_progress_info *progress_info)
+static int
+apply_reparse_data(ntfs_inode *ni, const struct wim_dentry *dentry,
+                  union wimlib_progress_info *progress_info)
 {
        struct wim_lookup_table_entry *lte;
        int ret = 0;
index 1b3951d0a60e92a857659fc686b516d65edb3ec9..6d2836f050e6b3b02f86c3b0b3c6410a2324d292 100644 (file)
@@ -36,8 +36,9 @@
  *
  * @codewords and @lens provide the Huffman code that is being used.
  */
-static int xpress_write_match(struct output_bitstream *ostream, u32 match,
-                             const u16 codewords[], const u8 lens[])
+static int
+xpress_write_match(struct output_bitstream *ostream, u32 match,
+                  const u16 codewords[], const u8 lens[])
 {
        u32 adjusted_match_len = match & 0xffff;
        u32 match_offset = match >> 16;
@@ -65,11 +66,12 @@ static int xpress_write_match(struct output_bitstream *ostream, u32 match,
                                  match_offset ^ (1 << offset_bsr), offset_bsr);
 }
 
-static int xpress_write_compressed_literals(struct output_bitstream *ostream,
-                                           const u32 match_tab[],
-                                           unsigned num_matches,
-                                           const u16 codewords[],
-                                           const u8 lens[])
+static int
+xpress_write_compressed_literals(struct output_bitstream *ostream,
+                                const u32 match_tab[],
+                                unsigned num_matches,
+                                const u16 codewords[],
+                                const u8 lens[])
 {
        for (unsigned i = 0; i < num_matches; i++) {
                int ret;
@@ -88,15 +90,17 @@ static int xpress_write_compressed_literals(struct output_bitstream *ostream,
                                  lens[XPRESS_END_OF_DATA]);
 }
 
-static u32 xpress_record_literal(u8 literal, void *__freq_tab)
+static u32
+xpress_record_literal(u8 literal, void *__freq_tab)
 {
        freq_t *freq_tab = __freq_tab;
        freq_tab[literal]++;
        return literal;
 }
 
-static u32 xpress_record_match(unsigned match_offset, unsigned match_len,
-                              void *freq_tab, void *ignore)
+static u32
+xpress_record_match(unsigned match_offset, unsigned match_len,
+                   void *freq_tab, void *ignore)
 {
        wimlib_assert(match_len >= XPRESS_MIN_MATCH &&
                      match_len <= XPRESS_MAX_MATCH);
@@ -152,8 +156,9 @@ static const struct lz_params xpress_lz_params = {
  * not reduce its size, and @compressed_data will not contain the full
  * compressed data.
  */
-int xpress_compress(const void *__uncompressed_data, unsigned uncompressed_len,
-                   void *__compressed_data, unsigned *compressed_len_ret)
+int
+xpress_compress(const void *__uncompressed_data, unsigned uncompressed_len,
+               void *__compressed_data, unsigned *compressed_len_ret)
 {
        const u8 *uncompressed_data = __uncompressed_data;
        u8 *compressed_data = __compressed_data;
index 6570e725baeb0554ce299139717eb19674c62d0d..c16b5e32019085c5308bd136d73a94dd5439bc5c 100644 (file)
  *
  * Returns the match length, or -1 on error.
  */
-static int xpress_decode_match(unsigned huffsym, unsigned window_pos,
-                              unsigned window_len, u8 window[],
-                              struct input_bitstream *istream)
+static int
+xpress_decode_match(unsigned huffsym, unsigned window_pos,
+                   unsigned window_len, u8 window[],
+                   struct input_bitstream *istream)
 {
        unsigned match_len;
        unsigned match_offset;
@@ -162,11 +163,12 @@ static int xpress_decode_match(unsigned huffsym, unsigned window_pos,
 
 /* Decodes the Huffman-encoded matches and literal bytes in a block of
  * XPRESS-encoded data. */
-static int xpress_decompress_block(struct input_bitstream *istream,
-                                  u8 uncompressed_data[],
-                                  unsigned uncompressed_len,
-                                  const u8 lens[],
-                                  const u16 decode_table[])
+static int
+xpress_decompress_block(struct input_bitstream *istream,
+                       u8 uncompressed_data[],
+                       unsigned uncompressed_len,
+                       const u8 lens[],
+                       const u16 decode_table[])
 {
        unsigned curpos;
        unsigned huffsym;
@@ -198,8 +200,9 @@ static int xpress_decompress_block(struct input_bitstream *istream,
 }
 
 
-int xpress_decompress(const void *__compressed_data, unsigned compressed_len,
-                     void *uncompressed_data, unsigned uncompressed_len)
+int
+xpress_decompress(const void *__compressed_data, unsigned compressed_len,
+                 void *uncompressed_data, unsigned uncompressed_len)
 {
        u8 lens[XPRESS_NUM_SYMBOLS];
        u16 decode_table[(1 << XPRESS_TABLEBITS) + 2 * XPRESS_NUM_SYMBOLS];