]> wimlib.net Git - wimlib/commitdiff
'extern' in function declarations is redundant
authorEric Biggers <ebiggers3@gmail.com>
Thu, 30 Mar 2023 07:00:55 +0000 (00:00 -0700)
committerEric Biggers <ebiggers3@gmail.com>
Thu, 30 Mar 2023 07:03:55 +0000 (00:03 -0700)
46 files changed:
include/wimlib/apply.h
include/wimlib/avl_tree.h
include/wimlib/blob_table.h
include/wimlib/decompress_common.h
include/wimlib/dentry.h
include/wimlib/divsufsort.h
include/wimlib/encoding.h
include/wimlib/error.h
include/wimlib/file_io.h
include/wimlib/glob.h
include/wimlib/inode.h
include/wimlib/inode_table.h
include/wimlib/integrity.h
include/wimlib/lcpit_matchfinder.h
include/wimlib/lzms_common.h
include/wimlib/lzx_common.h
include/wimlib/metadata.h
include/wimlib/ntfs_3g.h
include/wimlib/pathlist.h
include/wimlib/paths.h
include/wimlib/pattern.h
include/wimlib/progress.h
include/wimlib/registry.h
include/wimlib/reparse.h
include/wimlib/resource.h
include/wimlib/scan.h
include/wimlib/security.h
include/wimlib/sha1.h
include/wimlib/solid.h
include/wimlib/tagged_items.h
include/wimlib/textfile.h
include/wimlib/timestamp.h
include/wimlib/unix_data.h
include/wimlib/util.h
include/wimlib/wim.h
include/wimlib/wimboot.h
include/wimlib/win32.h
include/wimlib/win32_common.h
include/wimlib/win32_vss.h
include/wimlib/write.h
include/wimlib/xml.h
include/wimlib/xml_windows.h
programs/imagex-win32.h
programs/imagex.c
programs/wgetopt.h
tests/wlfuzz.c

index b290693ec2d25bb12afdd990a693f40d21777711..d801ab0c2c69acc05eadbaa0447db45a1b7c39df 100644 (file)
@@ -94,7 +94,7 @@ extract_progress(struct apply_ctx *ctx, enum wimlib_progress_msg msg)
        return call_progress(ctx->progfunc, msg, &ctx->progress, ctx->progctx);
 }
 
-extern int
+int
 do_file_extract_progress(struct apply_ctx *ctx, enum wimlib_progress_msg msg);
 
 #define COUNT_PER_FILE_PROGRESS 256
@@ -108,10 +108,10 @@ maybe_do_file_progress(struct apply_ctx *ctx, enum wimlib_progress_msg msg)
        return 0;
 }
 
-extern int
+int
 start_file_structure_phase(struct apply_ctx *ctx, u64 end_file_count);
 
-extern int
+int
 start_file_metadata_phase(struct apply_ctx *ctx, u64 end_file_count);
 
 /* Report that a file was created, prior to blob extraction.  */
@@ -128,10 +128,10 @@ report_file_metadata_applied(struct apply_ctx *ctx)
        return maybe_do_file_progress(ctx, WIMLIB_PROGRESS_MSG_EXTRACT_METADATA);
 }
 
-extern int
+int
 end_file_structure_phase(struct apply_ctx *ctx);
 
-extern int
+int
 end_file_metadata_phase(struct apply_ctx *ctx);
 
 static inline int
@@ -140,7 +140,7 @@ report_apply_error(struct apply_ctx *ctx, int error_code, const tchar *path)
        return report_error(ctx->progfunc, ctx->progctx, error_code, path);
 }
 
-extern bool
+bool
 detect_sparse_region(const void *data, size_t size, size_t *len_ret);
 
 static inline bool
@@ -163,7 +163,7 @@ maybe_detect_sparse_region(const void *data, size_t size, size_t *len_ret,
             dentry != NULL;                                            \
             dentry = dentry->d_next_extraction_alias)
 
-extern int
+int
 extract_blob_list(struct apply_ctx *ctx, const struct read_blob_callbacks *cbs);
 
 /*
index b2ccb85d119b4d6d10ac772de5530e4be8388f0a..5ae11ebbad72624be12c716725626d4e7cc9d9dd 100644 (file)
@@ -71,7 +71,7 @@ avl_get_parent(const struct avl_tree_node *node)
 }
 
 /* (Internal use only)  */
-extern void
+void
 avl_tree_rebalance_after_insert(struct avl_tree_node **root_ptr,
                                struct avl_tree_node *inserted);
 
@@ -253,27 +253,27 @@ avl_tree_insert(struct avl_tree_node **root_ptr,
 
 /* Removes an item from the specified AVL tree.
  * See implementation for details.  */
-extern void
+void
 avl_tree_remove(struct avl_tree_node **root_ptr, struct avl_tree_node *node);
 
 /* Nonrecursive AVL tree traversal functions  */
 
-extern struct avl_tree_node *
+struct avl_tree_node *
 avl_tree_first_in_order(const struct avl_tree_node *root);
 
-extern struct avl_tree_node *
+struct avl_tree_node *
 avl_tree_last_in_order(const struct avl_tree_node *root);
 
-extern struct avl_tree_node *
+struct avl_tree_node *
 avl_tree_next_in_order(const struct avl_tree_node *node);
 
-extern struct avl_tree_node *
+struct avl_tree_node *
 avl_tree_prev_in_order(const struct avl_tree_node *node);
 
-extern struct avl_tree_node *
+struct avl_tree_node *
 avl_tree_first_in_postorder(const struct avl_tree_node *root);
 
-extern struct avl_tree_node *
+struct avl_tree_node *
 avl_tree_next_in_postorder(const struct avl_tree_node *prev,
                           const struct avl_tree_node *prev_parent);
 
index 9bb54b542819992d66aeb5d94657fba8e177d751..2c9aab15c7572c02613f7f0d90002270a8a8a16a 100644 (file)
@@ -265,79 +265,79 @@ struct blob_descriptor {
        };
 };
 
-extern struct blob_table *
+struct blob_table *
 new_blob_table(size_t capacity);
 
-extern void
+void
 free_blob_table(struct blob_table *table);
 
-extern int
+int
 read_blob_table(WIMStruct *wim);
 
-extern int
+int
 write_blob_table_from_blob_list(struct list_head *blob_list,
                                struct filedes *out_fd,
                                u16 part_number,
                                struct wim_reshdr *out_reshdr,
                                int write_resource_flags);
 
-extern struct blob_descriptor *
+struct blob_descriptor *
 new_blob_descriptor(void);
 
-extern struct blob_descriptor *
+struct blob_descriptor *
 clone_blob_descriptor(const struct blob_descriptor *blob);
 
-extern void
+void
 blob_decrement_refcnt(struct blob_descriptor *blob, struct blob_table *table);
 
-extern void
+void
 blob_subtract_refcnt(struct blob_descriptor *blob, struct blob_table *table,
                     u32 count);
 
 #ifdef WITH_FUSE
-extern void
+void
 blob_decrement_num_opened_fds(struct blob_descriptor *blob);
 #endif
 
-extern void
+void
 blob_release_location(struct blob_descriptor *blob);
 
-extern void
+void
 free_blob_descriptor(struct blob_descriptor *blob);
 
-extern void
+void
 blob_table_insert(struct blob_table *table, struct blob_descriptor *blob);
 
-extern void
+void
 blob_table_unlink(struct blob_table *table, struct blob_descriptor *blob);
 
-extern struct blob_descriptor *
+struct blob_descriptor *
 lookup_blob(const struct blob_table *table, const u8 *hash);
 
-extern int
+int
 for_blob_in_table(struct blob_table *table,
                  int (*visitor)(struct blob_descriptor *, void *), void *arg);
 
-extern int
+int
 for_blob_in_table_sorted_by_sequential_order(struct blob_table *table,
                                             int (*visitor)(struct blob_descriptor *, void *),
                                             void *arg);
 
 struct wimlib_resource_entry;
 
-extern void
+void
 blob_to_wimlib_resource_entry(const struct blob_descriptor *blob,
                              struct wimlib_resource_entry *wentry);
 
-extern int
+int
 sort_blob_list(struct list_head *blob_list, size_t list_head_offset,
               int (*compar)(const void *, const void*));
 
-extern int
+int
 sort_blob_list_by_sequential_order(struct list_head *blob_list,
                                   size_t list_head_offset);
 
-extern int
+int
 cmp_blobs_by_sequential_order(const void *p1, const void *p2);
 
 static inline const struct blob_extraction_target *
@@ -391,7 +391,7 @@ blob_is_in_file(const struct blob_descriptor *blob)
 }
 
 #ifdef _WIN32
-extern const wchar_t *
+const wchar_t *
 get_windows_file_path(const struct windows_file *file);
 #endif
 
@@ -405,20 +405,20 @@ blob_file_path(const struct blob_descriptor *blob)
        return blob->file_on_disk;
 }
 
-extern struct blob_descriptor *
+struct blob_descriptor *
 new_blob_from_data_buffer(const void *buffer, size_t size,
                          struct blob_table *blob_table);
 
-extern struct blob_descriptor *
+struct blob_descriptor *
 after_blob_hashed(struct blob_descriptor *blob,
                  struct blob_descriptor **back_ptr,
                  struct blob_table *blob_table, struct wim_inode *inode);
 
-extern int
+int
 hash_unhashed_blob(struct blob_descriptor *blob, struct blob_table *blob_table,
                   struct blob_descriptor **blob_ret);
 
-extern struct blob_descriptor **
+struct blob_descriptor **
 retrieve_pointer_to_unhashed_blob(struct blob_descriptor *blob);
 
 static inline void
index 9b557271a2eb3e24daf00b236b88aa0951025ca4..c42912674f972108faea215c0da49d5cbf47e753 100644 (file)
@@ -412,7 +412,7 @@ read_huffsym(struct input_bitstream *is, const u16 decode_table[],
 #define DECODE_TABLE_WORKING_SPACE(name, num_syms, max_codeword_len)   \
        u16 name[2 * ((max_codeword_len) + 1)  + (num_syms)];
 
-extern int
+int
 make_huffman_decode_table(u16 decode_table[], unsigned num_syms,
                          unsigned table_bits, const u8 lens[],
                          unsigned max_codeword_len, u16 working_space[]);
index 64ff6c30a4fd9fd072a019fe1d2ee7da3f314b75..4a99b54339d1225f300d7cc6390c51c889c501de 100644 (file)
@@ -123,10 +123,10 @@ will_extract_dentry(const struct wim_dentry *dentry)
        return dentry->d_extraction_list_node.next != NULL;
 }
 
-extern size_t
+size_t
 dentry_out_total_length(const struct wim_dentry *dentry);
 
-extern int
+int
 for_dentry_in_tree(struct wim_dentry *root,
                   int (*visitor)(struct wim_dentry *, void *), void *args);
 
@@ -162,10 +162,10 @@ for_dentry_in_tree(struct wim_dentry *root,
 #define dentry_any_child(parent) \
        inode_any_child((parent)->d_inode)
 
-extern struct wim_dentry *
+struct wim_dentry *
 dentry_get_first_ci_match(struct wim_dentry *dentry);
 
-extern struct wim_dentry *
+struct wim_dentry *
 dentry_get_next_ci_match(struct wim_dentry *dentry,
                         struct wim_dentry *ci_match);
 
@@ -176,75 +176,75 @@ dentry_get_next_ci_match(struct wim_dentry *dentry,
             (ci_match);                                                \
             (ci_match) = dentry_get_next_ci_match((dentry), (ci_match)))
 
-extern void
+void
 calculate_subdir_offsets(struct wim_dentry *root, u64 *subdir_offset_p);
 
-extern int
+int
 dentry_set_name(struct wim_dentry *dentry, const tchar *name);
 
-extern int
+int
 dentry_set_name_utf16le(struct wim_dentry *dentry, const utf16lechar *name,
                        size_t name_nbytes);
 
-extern struct wim_dentry *
+struct wim_dentry *
 get_dentry(WIMStruct *wim, const tchar *path, CASE_SENSITIVITY_TYPE case_type);
 
-extern struct wim_dentry *
+struct wim_dentry *
 get_dentry_child_with_name(const struct wim_dentry *dentry, const tchar *name,
                           CASE_SENSITIVITY_TYPE case_type);
 
-extern struct wim_dentry *
+struct wim_dentry *
 get_dentry_child_with_utf16le_name(const struct wim_dentry *dentry,
                                   const utf16lechar *name,
                                   size_t name_nbytes,
                                   CASE_SENSITIVITY_TYPE case_type);
 
-extern struct wim_dentry *
+struct wim_dentry *
 get_parent_dentry(WIMStruct *wim, const tchar *path,
                  CASE_SENSITIVITY_TYPE case_type);
 
-extern int
+int
 calculate_dentry_full_path(struct wim_dentry *dentry);
 
-extern tchar *
+tchar *
 dentry_full_path(struct wim_dentry *dentry);
 
-extern int
+int
 new_dentry_with_new_inode(const tchar *name, bool set_timestamps,
                          struct wim_dentry **dentry_ret);
 
-extern int
+int
 new_dentry_with_existing_inode(const tchar *name, struct wim_inode *inode,
                               struct wim_dentry **dentry_ret);
 
-extern int
+int
 new_filler_directory(struct wim_dentry **dentry_ret);
 
-extern void
+void
 free_dentry(struct wim_dentry *dentry);
 
-extern void
+void
 free_dentry_tree(struct wim_dentry *root, struct blob_table *blob_table);
 
-extern void
+void
 unlink_dentry(struct wim_dentry *dentry);
 
-extern struct wim_dentry *
+struct wim_dentry *
 dentry_add_child(struct wim_dentry *parent, struct wim_dentry *child);
 
 struct update_command_journal;
 
-extern int
+int
 rename_wim_path(WIMStruct *wim, const tchar *from, const tchar *to,
                CASE_SENSITIVITY_TYPE case_type,
                struct update_command_journal *j);
 
 
-extern int
+int
 read_dentry_tree(const u8 *buf, size_t buf_len,
                 u64 root_offset, struct wim_dentry **root_ret);
 
-extern u8 *
+u8 *
 write_dentry_tree(struct wim_dentry *root, u8 *p);
 
 static inline bool
index 8ec81a9f652d6e882b9dadea2eae15d6964be95b..c82bda18e3a039667d502e3b04d6465d679d9590 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "wimlib/types.h"
 
-extern void
+void
 divsufsort(const u8 *T, u32 *SA, u32 n, u32 *tmp);
 
 #define DIVSUFSORT_TMP_LEN (256 + (256 * 256))
index 9216ca2c291cb8eafdb53c47579832e2aac3a5de..da83b9d3a87ec4cef9ee1b6495b92b8277eab083 100644 (file)
@@ -9,11 +9,11 @@
 
 /* String conversion functions */
 
-extern int
+int
 utf8_to_utf16le(const char *in, size_t in_nbytes,
                utf16lechar **out_ret, size_t *out_nbytes_ret);
 
-extern int
+int
 utf16le_to_utf8(const utf16lechar *in, size_t in_nbytes,
                char **out_ret, size_t *out_nbytes_ret);
 
@@ -121,28 +121,28 @@ utf16le_put_tstr(const tchar *s)
 
 extern u16 upcase[65536];
 
-extern void
+void
 init_upcase(void);
 
-extern int
+int
 cmp_utf16le_strings(const utf16lechar *s1, size_t n1,
                    const utf16lechar *s2, size_t n2,
                    bool ignore_case);
 
-extern int
+int
 cmp_utf16le_strings_z(const utf16lechar *s1, const utf16lechar *s2,
                      bool ignore_case);
 
-extern utf16lechar *
+utf16lechar *
 utf16le_dupz(const void *s, size_t size);
 
-extern utf16lechar *
+utf16lechar *
 utf16le_dup(const utf16lechar *s);
 
-extern size_t
+size_t
 utf16le_len_bytes(const utf16lechar *s);
 
-extern size_t
+size_t
 utf16le_len_chars(const utf16lechar *s);
 
 #endif /* _WIMLIB_ENCODING_H */
index 75b48c1b2da97bc913ecd80c6835a1fa6aeb9fd9..e332903ff21b9cb9f8ff06de2044855e07cce70b 100644 (file)
@@ -13,19 +13,19 @@ dummy_tprintf(const tchar *format, ...)
        return 0;
 }
 
-extern void
+void
 wimlib_error(const tchar *format, ...)
        _format_attribute(printf, 1, 2) _cold_attribute;
 
-extern void
+void
 wimlib_error_with_errno(const tchar *format, ...)
                _format_attribute(printf, 1, 2) _cold_attribute;
 
-extern void
+void
 wimlib_warning(const tchar *format, ...)
                _format_attribute(printf, 1, 2) _cold_attribute;
 
-extern void
+void
 wimlib_warning_with_errno(const tchar *format, ...)
                _format_attribute(printf, 1, 2) _cold_attribute;
 #  define ERROR(format, ...)                   wimlib_error(T(format), ## __VA_ARGS__)
@@ -35,7 +35,7 @@ wimlib_warning_with_errno(const tchar *format, ...)
 extern bool wimlib_print_errors;
 extern FILE *wimlib_error_file;
 
-extern void
+void
 print_byte_field(const u8 *field, size_t len, FILE *out);
 
 #endif /* _WIMLIB_ERROR_H */
index 7cfe2cd87b56c9c5494201c7f8852841ffa9a43c..8dbdb12025186be663929ad0ac69648d27ec502b 100644 (file)
@@ -14,26 +14,26 @@ struct filedes {
        off_t offset;
 };
 
-extern int
+int
 full_read(struct filedes *fd, void *buf, size_t n);
 
-extern int
+int
 full_pread(struct filedes *fd, void *buf, size_t nbyte, off_t offset);
 
-extern int
+int
 full_write(struct filedes *fd, const void *buf, size_t n);
 
-extern int
+int
 full_pwrite(struct filedes *fd, const void *buf, size_t count, off_t offset);
 
 #ifndef _WIN32
 #  define O_BINARY 0
 #endif
 
-extern off_t
+off_t
 filedes_seek(struct filedes *fd, off_t offset);
 
-extern bool
+bool
 filedes_is_seekable(struct filedes *fd);
 
 static inline void filedes_init(struct filedes *fd, int raw_fd)
index 5455be2661d75de45a9692cfb46932d64eac88d1..d5ab39995d844a9ba65556c3f9f3ace5bb4b2471 100644 (file)
@@ -14,12 +14,12 @@ typedef struct {
 } glob_t;
 
 /* WARNING: this is a reduced functionality replacement */
-extern int
+int
 win32_wglob(const wchar_t *pattern, int flags,
            int (*errfunc)(const wchar_t *epath, int eerrno),
            glob_t *pglob);
 
-extern void globfree(glob_t *pglob);
+void globfree(glob_t *pglob);
 
 #define        GLOB_ERR        0x1 /* Return on read errors.  */
 #define        GLOB_NOSORT     0x2 /* Don't sort the names.  */
index 4497775077415e337687136bf23f1068c46a0b27..56b177e84119f45c89a41c25e49fb6f885692e96 100644 (file)
@@ -264,7 +264,7 @@ struct wim_inode_extra {
 #define FILE_ATTRIBUTE_ENCRYPTED           0x00004000
 #define FILE_ATTRIBUTE_VIRTUAL             0x00010000
 
-extern struct wim_inode *
+struct wim_inode *
 new_inode(struct wim_dentry *dentry, bool set_timestamps);
 
 /* Iterate through each alias of the specified inode.  */
@@ -280,14 +280,14 @@ new_inode(struct wim_dentry *dentry, bool set_timestamps);
 #define inode_any_full_path(inode) \
        dentry_full_path(inode_any_dentry(inode))
 
-extern void
+void
 d_associate(struct wim_dentry *dentry, struct wim_inode *inode);
 
-extern void
+void
 d_disassociate(struct wim_dentry *dentry);
 
 #ifdef WITH_FUSE
-extern void
+void
 inode_dec_num_opened_fds(struct wim_inode *inode);
 #endif
 
@@ -330,11 +330,11 @@ inode_has_security_descriptor(const struct wim_inode *inode)
        return inode->i_security_id >= 0;
 }
 
-extern struct wim_inode_stream *
+struct wim_inode_stream *
 inode_get_stream(const struct wim_inode *inode, int stream_type,
                 const utf16lechar *stream_name);
 
-extern struct wim_inode_stream *
+struct wim_inode_stream *
 inode_get_unnamed_stream(const struct wim_inode *inode, int stream_type);
 
 static inline struct wim_inode_stream *
@@ -343,29 +343,29 @@ inode_get_unnamed_data_stream(const struct wim_inode *inode)
        return inode_get_unnamed_stream(inode, STREAM_TYPE_DATA);
 }
 
-extern struct wim_inode_stream *
+struct wim_inode_stream *
 inode_add_stream(struct wim_inode *inode, int stream_type,
                 const utf16lechar *stream_name, struct blob_descriptor *blob);
 
-extern void
+void
 inode_replace_stream_blob(struct wim_inode *inode,
                          struct wim_inode_stream *strm,
                          struct blob_descriptor *new_blob,
                          struct blob_table *blob_table);
 
-extern bool
+bool
 inode_replace_stream_data(struct wim_inode *inode,
                          struct wim_inode_stream *strm,
                          const void *data, size_t size,
                          struct blob_table *blob_table);
 
-extern bool
+bool
 inode_add_stream_with_data(struct wim_inode *inode,
                           int stream_type, const utf16lechar *stream_name,
                           const void *data, size_t size,
                           struct blob_table *blob_table);
 
-extern void
+void
 inode_remove_stream(struct wim_inode *inode, struct wim_inode_stream *strm,
                    struct blob_table *blob_table);
 
@@ -394,40 +394,40 @@ stream_is_named_data_stream(const struct wim_inode_stream *strm)
        return strm->stream_type == STREAM_TYPE_DATA && stream_is_named(strm);
 }
 
-extern bool
+bool
 inode_has_named_data_stream(const struct wim_inode *inode);
 
-extern int
+int
 inode_resolve_streams(struct wim_inode *inode, struct blob_table *table,
                      bool force);
 
-extern int
+int
 blob_not_found_error(const struct wim_inode *inode, const u8 *hash);
 
-extern struct blob_descriptor *
+struct blob_descriptor *
 stream_blob(const struct wim_inode_stream *strm, const struct blob_table *table);
 
-extern struct blob_descriptor *
+struct blob_descriptor *
 inode_get_blob_for_unnamed_data_stream(const struct wim_inode *inode,
                                       const struct blob_table *blob_table);
 
-extern struct blob_descriptor *
+struct blob_descriptor *
 inode_get_blob_for_unnamed_data_stream_resolved(const struct wim_inode *inode);
 
-extern const u8 *
+const u8 *
 stream_hash(const struct wim_inode_stream *strm);
 
-extern const u8 *
+const u8 *
 inode_get_hash_of_unnamed_data_stream(const struct wim_inode *inode);
 
-extern void
+void
 inode_ref_blobs(struct wim_inode *inode);
 
-extern void
+void
 inode_unref_blobs(struct wim_inode *inode, struct blob_table *blob_table);
 
 /* inode_fixup.c  */
-extern int
+int
 dentry_tree_fix_inodes(struct wim_dentry *root, struct hlist_head *inode_list);
 
 #endif /* _WIMLIB_INODE_H  */
index 4d4fab5ec5678100d7dac4212d5e865985eb8d32..781a87062a6f8081e9d2c6786758aadf1c99f93c 100644 (file)
@@ -28,22 +28,22 @@ hash_inode(const struct wim_inode_table *table, u64 ino, u64 devno)
        return (hash_u64(ino) + devno) & (table->capacity - 1);
 }
 
-extern int
+int
 init_inode_table(struct wim_inode_table *table, size_t capacity);
 
-extern int
+int
 inode_table_new_dentry(struct wim_inode_table *table, const tchar *name,
                       u64 ino, u64 devno, bool noshare,
                       struct wim_dentry **dentry_ret);
 
-extern void
+void
 enlarge_inode_table(struct wim_inode_table *table);
 
-extern void
+void
 inode_table_prepare_inode_list(struct wim_inode_table *table,
                               struct hlist_head *head);
 
-extern void
+void
 destroy_inode_table(struct wim_inode_table *table);
 
 #endif /* _WIMLIB_INODE_TABLE_H  */
index 48f24e319a4c2b448e4d18b17d40e8cec4d7d75c..755cddda34db6bea5abd774330f26af9f208c780 100644 (file)
 
 struct integrity_table;
 
-extern int
+int
 read_integrity_table(WIMStruct *wim, u64 num_checked_bytes,
                     struct integrity_table **table_ret);
 
 #define free_integrity_table(table) FREE(table)
 
-extern int
+int
 write_integrity_table(WIMStruct *wim,
                      off_t new_blob_table_end,
                      off_t old_blob_table_end,
                      struct integrity_table *old_table);
 
-extern int
+int
 check_wim_integrity(WIMStruct *wim);
 
 #endif /* _WIMLIB_INTEGRITY_H */
index f9543e0a017f53e97a1077da437eb80c385bb4c2..1cfa444f2c3099e181bfd60bf9b83ae513bcf28e 100644 (file)
@@ -52,24 +52,24 @@ struct lz_match {
        u32 offset;
 };
 
-extern u64
+u64
 lcpit_matchfinder_get_needed_memory(size_t max_bufsize);
 
-extern bool
+bool
 lcpit_matchfinder_init(struct lcpit_matchfinder *mf, size_t max_bufsize,
                       u32 min_match_len, u32 nice_match_len);
 
-extern void
+void
 lcpit_matchfinder_load_buffer(struct lcpit_matchfinder *mf, const u8 *T, u32 n);
 
-extern u32
+u32
 lcpit_matchfinder_get_matches(struct lcpit_matchfinder *mf,
                               struct lz_match *matches);
 
-extern void
+void
 lcpit_matchfinder_skip_bytes(struct lcpit_matchfinder *mf, u32 count);
 
-extern void
+void
 lcpit_matchfinder_destroy(struct lcpit_matchfinder *mf);
 
 #endif /* _LCPIT_MATCHFINDER_H */
index b5071469f443bf3227657ac7ba0c72023fe30b27..b2d59d8a2e1b7f1ce4dbc61e573568443bb543e6 100644 (file)
@@ -19,7 +19,7 @@ extern const u8 lzms_extra_offset_bits[LZMS_MAX_NUM_OFFSET_SYMS];
 extern const u32 lzms_length_slot_base[LZMS_NUM_LENGTH_SYMS + 1];
 extern const u8 lzms_extra_length_bits[LZMS_NUM_LENGTH_SYMS];
 
-extern unsigned
+unsigned
 lzms_get_slot(u32 value, const u32 slot_base_tab[], unsigned num_slots);
 
 /* Return the offset slot for the specified offset  */
@@ -36,7 +36,7 @@ lzms_get_length_slot(u32 length)
        return lzms_get_slot(length, lzms_length_slot_base, LZMS_NUM_LENGTH_SYMS);
 }
 
-extern unsigned
+unsigned
 lzms_get_num_offset_slots(size_t uncompressed_size);
 
 
@@ -67,7 +67,7 @@ struct lzms_probabilites {
                                               [LZMS_NUM_DELTA_REP_PROBS];
 };
 
-extern void
+void
 lzms_init_probabilities(struct lzms_probabilites *probs);
 
 /* Given a decoded or encoded bit, update the probability entry.  */
@@ -130,14 +130,14 @@ lzms_get_probability(const struct lzms_probability_entry *prob_entry)
        return prob;
 }
 
-extern void
+void
 lzms_init_symbol_frequencies(u32 freqs[], unsigned num_syms);
 
-extern void
+void
 lzms_dilute_symbol_frequencies(u32 freqs[], unsigned num_syms);
 
 /* Pre/post-processing  */
-extern void
+void
 lzms_x86_filter(u8 data[], s32 size, s32 last_target_usages[], bool undo);
 
 #endif /* _LZMS_COMMON_H */
index f93221d5b16c84b075b4e865bf3d7b1b63805274..80d53813388c57e8f7a9e730b6d1090a6a36f655 100644 (file)
@@ -14,16 +14,16 @@ extern const s32 lzx_offset_slot_base[LZX_MAX_OFFSET_SLOTS + 1];
 
 extern const u8 lzx_extra_offset_bits[LZX_MAX_OFFSET_SLOTS];
 
-extern unsigned
+unsigned
 lzx_get_window_order(size_t max_bufsize);
 
-extern unsigned
+unsigned
 lzx_get_num_main_syms(unsigned window_order);
 
-extern void
+void
 lzx_preprocess(u8 *data, u32 size);
 
-extern void
+void
 lzx_postprocess(u8 *data, u32 size);
 
 #endif /* _LZX_COMMON_H */
index 030b0b12dd644daaa8298a2d700fbef1b2566da1..a3d28048055da2202ab3f62c3d9e813e2e136a56 100644 (file)
@@ -150,16 +150,16 @@ can_unload_image(const struct wim_image_metadata *imd)
 #define image_for_each_unhashed_blob_safe(blob, tmp, imd) \
        list_for_each_entry_safe(blob, tmp, &(imd)->unhashed_blobs, unhashed_list)
 
-extern void
+void
 put_image_metadata(struct wim_image_metadata *imd);
 
-extern int
+int
 append_image_metadata(WIMStruct *wim, struct wim_image_metadata *imd);
 
-extern struct wim_image_metadata *
+struct wim_image_metadata *
 new_empty_image_metadata(void);
 
-extern struct wim_image_metadata *
+struct wim_image_metadata *
 new_unloaded_image_metadata(struct blob_descriptor *metadata_blob);
 
 #endif /* _WIMLIB_METADATA_H */
index e2ed6d6bbcef1ab231cc706c33526171a1bdfa6f..03fc04b6b15748927beae0ed13b2ce0f9c73e24c 100644 (file)
@@ -9,18 +9,18 @@ struct blob_descriptor;
 struct consume_chunk_callback;
 struct ntfs_location;
 
-extern int
+int
 read_ntfs_attribute_prefix(const struct blob_descriptor *blob, u64 size,
                           const struct consume_chunk_callback *cb,
                           bool recover_data);
 
-extern struct ntfs_location *
+struct ntfs_location *
 clone_ntfs_location(const struct ntfs_location *loc);
 
-extern void
+void
 free_ntfs_location(struct ntfs_location *loc);
 
-extern int
+int
 cmp_ntfs_locations(const struct ntfs_location *loc1,
                   const struct ntfs_location *loc2);
 
index 71878bf7e9875db80a0642fea1a6dcc0ce04be3b..b49dbd2898ccf2507787443b1fc60a294da08472 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "wimlib/types.h"
 
-extern int
+int
 read_path_list_file(const tchar *listfile,
                    tchar ***paths_ret, size_t *num_paths_ret,
                    void **mem_ret);
index 764bdcfba025dbcec02011a2c81f8a2ce6df7b80..4faf970370fd32868fe227be8d67bcbdf06c33a5 100644 (file)
@@ -10,13 +10,13 @@ path_basename(const tchar *path);
 const tchar *
 path_basename_with_len(const tchar *path, size_t len);
 
-extern const tchar *
+const tchar *
 path_stream_name(const tchar *path);
 
-extern void
+void
 do_canonicalize_path(const tchar *in, tchar *out);
 
-extern tchar *
+tchar *
 canonicalize_wim_path(const tchar *wim_path);
 
 /* is_any_path_separator() - characters treated as path separators in WIM path
index b0e299958fc7c48c0e951aff3bf91c6643e89a1c..3f3add77096035987b8af7a6e249e70dcc58726d 100644 (file)
@@ -19,10 +19,10 @@ struct wim_dentry;
  */
 #define MATCH_ANCESTORS                0x02
 
-extern bool
+bool
 match_path(const tchar *path, const tchar *pattern, int match_flags);
 
-extern int
+int
 expand_path_pattern(struct wim_dentry *root, const tchar *pattern,
                    int (*consume_dentry)(struct wim_dentry *, void *),
                    void *ctx);
index 062656c5c6b86ec11a28105443182a615cdfe661..538e358f79b86441779b8892773526efe1d73247 100644 (file)
@@ -30,7 +30,7 @@ call_progress(wimlib_progress_func_t progfunc,
        return 0;
 }
 
-extern int
+int
 report_error(wimlib_progress_func_t progfunc,
             void *progctx, int error_code, const tchar *path);
 
index 7f306313c92a58c46ddf9d351040212ce3a415cb..27fcd1ab42d17c087f94cccca1f9dbe6fe3b78f6 100644 (file)
@@ -16,25 +16,25 @@ enum hive_status {
        HIVE_ITERATION_STOPPED,
 };
 
-extern enum hive_status
+enum hive_status
 hive_validate(const void *hive_mem, size_t hive_size);
 
-extern enum hive_status
+enum hive_status
 hive_get_string(const struct regf *regf, const tchar *key_name,
                const tchar *value_name, tchar **value_ret);
 
-extern enum hive_status
+enum hive_status
 hive_get_number(const struct regf *regf, const tchar *key_name,
                const tchar *value_name, s64 *value_ret);
 
-extern enum hive_status
+enum hive_status
 hive_list_subkeys(const struct regf *regf, const tchar *key_name,
                  tchar ***subkeys_ret);
 
-extern void
+void
 hive_free_subkeys_list(tchar **subkeys);
 
-extern const char *
+const char *
 hive_status_to_string(enum hive_status status);
 
 #endif /* _WIMLIB_REGISTRY_H */
index 04592cec60cd866145c5a62b731d75ef41611fce..fcc634249be501f99bced9b078da564c0a0151a0 100644 (file)
@@ -86,25 +86,25 @@ link_is_relative_symlink(const struct link_reparse_point *link)
               (link->symlink_flags & SYMBOLIC_LINK_RELATIVE);
 }
 
-extern void
+void
 complete_reparse_point(struct reparse_buffer_disk *rpbuf,
                       const struct wim_inode *inode, u16 blob_size);
 
-extern int
+int
 parse_link_reparse_point(const struct reparse_buffer_disk *rpbuf, u16 rpbuflen,
                         struct link_reparse_point *link);
 
-extern int
+int
 make_link_reparse_point(const struct link_reparse_point *link,
                        struct reparse_buffer_disk *rpbuf, u16 *rpbuflen_ret);
 
 #ifndef _WIN32
-extern int
+int
 wim_inode_readlink(const struct wim_inode *inode, char *buf, size_t bufsize,
                   const struct blob_descriptor *blob,
                   const char *altroot, size_t altroot_len);
 
-extern int
+int
 wim_inode_set_symlink(struct wim_inode *inode, const char *target,
                      struct blob_table *blob_table);
 #endif
index 94e43e5fe45aece4feacabb058e86bb28b067faf..0985c4f3cd91818bd439b2a5a60855f536430d89 100644 (file)
@@ -119,20 +119,20 @@ zero_reshdr(struct wim_reshdr *reshdr)
        memset(reshdr, 0, sizeof(struct wim_reshdr));
 }
 
-extern void
+void
 wim_reshdr_to_desc(const struct wim_reshdr *reshdr, WIMStruct *wim,
                   struct wim_resource_descriptor *rdesc);
 
-extern void
+void
 wim_reshdr_to_desc_and_blob(const struct wim_reshdr *reshdr, WIMStruct *wim,
                            struct wim_resource_descriptor *rdesc,
                            struct blob_descriptor *blob);
 
-extern void
+void
 get_wim_reshdr(const struct wim_reshdr_disk *disk_reshdr,
               struct wim_reshdr *reshdr);
 
-extern void
+void
 put_wim_reshdr(const struct wim_reshdr *reshdr,
               struct wim_reshdr_disk *disk_reshdr);
 
@@ -171,25 +171,25 @@ get_chunk_entry_size(u64 res_size, bool is_alt)
 
 /* Functions to read blobs  */
 
-extern int
+int
 read_partial_wim_blob_into_buf(const struct blob_descriptor *blob,
                               u64 offset, size_t size, void *buf);
 
-extern int
+int
 read_blob_into_buf(const struct blob_descriptor *blob, void *buf);
 
-extern int
+int
 read_blob_into_alloc_buf(const struct blob_descriptor *blob, void **buf_ret);
 
-extern int
+int
 wim_reshdr_to_data(const struct wim_reshdr *reshdr, WIMStruct *wim,
                   void **buf_ret);
 
-extern int
+int
 wim_reshdr_to_hash(const struct wim_reshdr *reshdr, WIMStruct *wim,
                   u8 hash[SHA1_HASH_SIZE]);
 
-extern int
+int
 skip_wim_resource(const struct wim_resource_descriptor *rdesc);
 
 /*
@@ -275,37 +275,37 @@ call_end_blob(struct blob_descriptor *blob, int status,
 #define BLOB_LIST_ALREADY_SORTED       0x4
 #define RECOVER_DATA                   0x8
 
-extern int
+int
 read_blob_list(struct list_head *blob_list, size_t list_head_offset,
               const struct read_blob_callbacks *cbs, int flags);
 
-extern int
+int
 read_blob_with_cbs(struct blob_descriptor *blob,
                   const struct read_blob_callbacks *cbs, bool recover_data);
 
-extern int
+int
 read_blob_with_sha1(struct blob_descriptor *blob,
                    const struct read_blob_callbacks *cbs, bool recover_data);
 
-extern int
+int
 extract_blob_prefix_to_fd(struct blob_descriptor *blob, u64 size,
                          struct filedes *fd);
 
-extern int
+int
 extract_blob_to_fd(struct blob_descriptor *blob, struct filedes *fd,
                   bool recover_data);
 
 /* Miscellaneous blob functions.  */
 
-extern int
+int
 sha1_blob(struct blob_descriptor *blob);
 
 /* Functions to read/write metadata resources.  */
 
-extern int
+int
 read_metadata_resource(struct wim_image_metadata *imd);
 
-extern int
+int
 write_metadata_resource(WIMStruct *wim, int image, int write_resource_flags);
 
 /* Definitions specific to pipable WIM resources.  */
index bae72c75474d3014a36d58fc965bc60abd10ef75..cfd7835e2067f17aae0d6deb2e336fb76b2daf25 100644 (file)
@@ -73,25 +73,25 @@ struct scan_params {
 
 /* scan.c */
 
-extern int
+int
 do_scan_progress(struct scan_params *params, int status,
                 const struct wim_inode *inode);
 
-extern int
+int
 mangle_pat(tchar *pat, const tchar *path, unsigned long line_no);
 
-extern int
+int
 read_capture_config(const tchar *config_file, const void *buf,
                    size_t bufsize, struct capture_config *config);
 
-extern void
+void
 destroy_capture_config(struct capture_config *config);
 
-extern bool
+bool
 match_pattern_list(const tchar *path, const struct string_list *list,
                   int match_flags);
 
-extern int
+int
 try_exclude(const struct scan_params *params);
 
 typedef int (*scan_tree_t)(struct wim_dentry **, const tchar *,
@@ -99,28 +99,28 @@ typedef int (*scan_tree_t)(struct wim_dentry **, const tchar *,
 
 #ifdef WITH_NTFS_3G
 /* ntfs-3g_capture.c */
-extern int
+int
 ntfs_3g_build_dentry_tree(struct wim_dentry **root_ret,
                          const tchar *device, struct scan_params *params);
 #endif
 
 #ifdef _WIN32
 /* win32_capture.c */
-extern int
+int
 win32_build_dentry_tree(struct wim_dentry **root_ret,
                        const tchar *root_disk_path,
                        struct scan_params *params);
 #define platform_default_scan_tree win32_build_dentry_tree
 #else
 /* unix_capture.c */
-extern int
+int
 unix_build_dentry_tree(struct wim_dentry **root_ret,
                       const tchar *root_disk_path, struct scan_params *params);
 #define platform_default_scan_tree unix_build_dentry_tree
 #endif
 
 #ifdef ENABLE_TEST_SUPPORT
-extern int
+int
 generate_dentry_tree(struct wim_dentry **root_ret,
                     const tchar *root_disk_path, struct scan_params *params);
 #endif
@@ -134,21 +134,21 @@ report_scan_error(struct scan_params *params, int error_code)
                            params->cur_path);
 }
 
-extern bool
+bool
 should_ignore_filename(const tchar *name, int name_nchars);
 
-extern void
+void
 attach_scanned_tree(struct wim_dentry *parent, struct wim_dentry *child,
                    struct blob_table *blob_table);
 
-extern int
+int
 pathbuf_init(struct scan_params *params, const tchar *root_path);
 
-extern const tchar *
+const tchar *
 pathbuf_append_name(struct scan_params *params, const tchar *name,
                    size_t name_nchars, size_t *orig_path_nchars_ret);
 
-extern void
+void
 pathbuf_truncate(struct scan_params *params, size_t nchars);
 
 #endif /* _WIMLIB_SCAN_H */
index 5c864ddd7754e4fbe853d90a1a6bb31d9df1584f..3e817750ab6de9d17a349533582f00dac99e4174 100644 (file)
@@ -35,34 +35,34 @@ struct wim_security_data {
        u8 **descriptors;
 };
 
-extern void
+void
 rollback_new_security_descriptors(struct wim_sd_set *sd_set);
 
-extern void
+void
 destroy_sd_set(struct wim_sd_set *sd_set);
 
-extern s32
+s32
 sd_set_add_sd(struct wim_sd_set *sd_set, const char descriptor[],
              size_t size);
 
-extern int
+int
 init_sd_set(struct wim_sd_set *sd_set, struct wim_security_data *sd);
 
-extern struct wim_security_data *
+struct wim_security_data *
 new_wim_security_data(void);
 
-extern int
+int
 read_wim_security_data(const u8 *buf, size_t buf_len,
                       struct wim_security_data **sd_ret);
 
-extern u8 *
+u8 *
 write_wim_security_data(const struct wim_security_data * restrict sd,
                        u8 * restrict p);
 
-extern void
+void
 print_wim_security_data(const struct wim_security_data *sd);
 
-extern void
+void
 free_wim_security_data(struct wim_security_data *sd);
 
 #endif /* _WIMLIB_SECURITY_H */
index dc63857cd2f295055e8417828cfb0ff14e3ae22e..91f84d9168baca324b879127a1b1be722c314a49 100644 (file)
@@ -42,22 +42,22 @@ struct sha1_ctx {
        u8 buffer[SHA1_BLOCK_SIZE];
 };
 
-extern void
+void
 sha1_init(struct sha1_ctx *ctx);
 
-extern void
+void
 sha1_update(struct sha1_ctx *ctx, const void *data, size_t len);
 
-extern void
+void
 sha1_final(struct sha1_ctx *ctx, u8 hash[SHA1_HASH_SIZE]);
 
-extern void
+void
 sha1(const void *data, size_t len, u8 hash[SHA1_HASH_SIZE]);
 
 extern const u8 zero_hash[SHA1_HASH_SIZE];
 
 #define SHA1_HASH_STRING_LEN   (2 * SHA1_HASH_SIZE + 1)
-extern void
+void
 sprint_hash(const u8 hash[SHA1_HASH_SIZE], tchar strbuf[SHA1_HASH_STRING_LEN]);
 
 static inline void
index cf37a88084a1dd8de78cba01c8cee4ef35e5240c..051e445f19a6d96b40d7beafca710b8366012e4c 100644 (file)
@@ -3,7 +3,7 @@
 
 struct list_head;
 
-extern int
+int
 sort_blob_list_for_solid_compression(struct list_head *blob_list);
 
 #endif /* _WIMLIB_SOLID_H */
index dfbae30bb9839d7c676b6b2937ed01b608feb1b4..815fa187925aaa00ea60715e21b36a976a250487 100644 (file)
@@ -20,11 +20,11 @@ struct wim_inode;
  */
 #define TAG_WIMLIB_LINUX_XATTRS                0x337DD874
 
-extern void *
+void *
 inode_get_tagged_item(const struct wim_inode *inode, u32 tag, u32 min_len,
                      u32 *actual_len_ret);
 
-extern bool
+bool
 inode_set_tagged_item(struct wim_inode *inode, u32 tag,
                      const void *data, u32 len);
 
index d79f8b11b78b954fadc374095fdd0b2f690d9adb..df606561aa7d3aa775f24fb6d2edcb28b7ed4f35 100644 (file)
@@ -27,7 +27,7 @@ struct text_file_section {
 #define LOAD_TEXT_FILE_NO_WARNINGS   0x00000002
 #define LOAD_TEXT_FILE_ALLOW_STDIN   0x00000004
 
-extern int
+int
 load_text_file(const tchar *path, const void *buf, size_t bufsize,
               void **mem_ret,
               const struct text_file_section *pos_sections,
index 37666c9aeb3329747aa55ca5348212b7132ee2d7..e30e06210c6d8706e88626c270de3c158cc11237 100644 (file)
 
 struct wimlib_timespec;
 
-extern time_t
+time_t
 wim_timestamp_to_time_t(u64 timestamp);
 
-extern void
+void
 wim_timestamp_to_wimlib_timespec(u64 timestamp, struct wimlib_timespec *wts,
                                 s32 *high_part_ret);
 
-extern struct timeval
+struct timeval
 wim_timestamp_to_timeval(u64 timestamp);
 
-extern struct timespec
+struct timespec
 wim_timestamp_to_timespec(u64 timestamp);
 
-extern u64
+u64
 time_t_to_wim_timestamp(time_t t);
 
-extern u64
+u64
 timeval_to_wim_timestamp(const struct timeval *tv);
 
-extern u64
+u64
 timespec_to_wim_timestamp(const struct timespec *ts);
 
-extern u64
+u64
 now_as_wim_timestamp(void);
 
-extern void
+void
 wim_timestamp_to_str(u64 timestamp, tchar *buf, size_t len);
 
 #endif /* _WIMLIB_TIMESTAMP_H */
index ede0fdcec3cf1cc5c46091083db7eeb06c55b36f..11aa67b376798b9bcd6bb9af22b2f6e3ec4b89ab 100644 (file)
@@ -12,10 +12,10 @@ struct wimlib_unix_data {
 
 struct wim_inode;
 
-extern bool
+bool
 inode_has_unix_data(const struct wim_inode *inode);
 
-extern bool
+bool
 inode_get_unix_data(const struct wim_inode *inode,
                    struct wimlib_unix_data *unix_data);
 
@@ -26,7 +26,7 @@ inode_get_unix_data(const struct wim_inode *inode,
 
 #define UNIX_DATA_ALL  0xF
 
-extern bool
+bool
 inode_set_unix_data(struct wim_inode *inode,
                    struct wimlib_unix_data *unix_data, int which);
 
index 55fc9e4a35030731ad0e45508a340ebc92f7e5d3..6c9ee061efadd6c694bee17a066bad857ba4d7f6 100644 (file)
  * Memory allocation
  *******************/
 
-extern void *
+void *
 wimlib_malloc(size_t size);
 
-extern void
+void
 wimlib_free_memory(void *p);
 
-extern void *
+void *
 wimlib_realloc(void *ptr, size_t size);
 
-extern void *
+void *
 wimlib_calloc(size_t nmemb, size_t size);
 
-extern char *
+char *
 wimlib_strdup(const char *str);
 
 #ifdef _WIN32
-extern wchar_t *
+wchar_t *
 wimlib_wcsdup(const wchar_t *str);
 #endif
 
-extern void *
+void *
 wimlib_aligned_malloc(size_t size, size_t alignment);
 
-extern void
+void
 wimlib_aligned_free(void *ptr);
 
-extern void *
+void *
 memdup(const void *mem, size_t size);
 
 #define MALLOC         wimlib_malloc
@@ -85,7 +85,7 @@ memdup(const void *mem, size_t size);
  *******************/
 
 #ifndef HAVE_MEMPCPY
-extern void *
+void *
 mempcpy(void *dst, const void *src, size_t n);
 #endif
 
@@ -93,10 +93,10 @@ mempcpy(void *dst, const void *src, size_t n);
  * Random number generation
  **************************/
 
-extern void
+void
 get_random_bytes(void *p, size_t n);
 
-extern void
+void
 get_random_alnum_chars(tchar *p, size_t n);
 
 /************************
index 571d59cfb762e533acbf8323f0e4af0dba96aaca..666f4b02638f82b612bd6bf6ba8df20918e14c39 100644 (file)
@@ -188,47 +188,47 @@ static inline bool wim_is_pipable(const WIMStruct *wim)
        return (wim->hdr.magic == PWM_MAGIC);
 }
 
-extern void
+void
 wim_decrement_refcnt(WIMStruct *wim);
 
-extern bool
+bool
 wim_has_solid_resources(const WIMStruct *wim);
 
-extern int
+int
 read_wim_header(WIMStruct *wim, struct wim_header *hdr);
 
-extern int
+int
 write_wim_header(const struct wim_header *hdr, struct filedes *out_fd,
                 off_t offset);
 
-extern int
+int
 write_wim_header_flags(u32 hdr_flags, struct filedes *out_fd);
 
-extern int
+int
 select_wim_image(WIMStruct *wim, int image);
 
-extern void
+void
 deselect_current_wim_image(WIMStruct *wim);
 
-extern int
+int
 for_image(WIMStruct *wim, int image, int (*visitor)(WIMStruct *));
 
-extern int
+int
 wim_checksum_unhashed_blobs(WIMStruct *wim);
 
-extern int
+int
 delete_wim_image(WIMStruct *wim, int image);
 
 /* Internal open flags (pass to open_wim_as_WIMStruct(), not wimlib_open_wim())
  */
 #define WIMLIB_OPEN_FLAG_FROM_PIPE     0x80000000
 
-extern int
+int
 open_wim_as_WIMStruct(const void *wim_filename_or_fd, int open_flags,
                      WIMStruct **wim_ret,
                      wimlib_progress_func_t progfunc, void *progctx);
 
-extern int
+int
 can_modify_wim(WIMStruct *wim);
 
 #endif /* _WIMLIB_WIM_H */
index 10857d5b64680be085e6d5afc508613e2092a94d..97071290695ac784470c9f42981f58f6e726dba9 100644 (file)
@@ -8,13 +8,13 @@
 
 struct blob_descriptor;
 
-extern int
+int
 wimboot_alloc_data_source_id(const wchar_t *wim_path,
                             const u8 guid[GUID_SIZE], int image,
                             const wchar_t *target, u64 *data_source_id_ret,
                             bool *wof_running_ret);
 
-extern bool
+bool
 wimboot_set_pointer(HANDLE h,
                    const struct blob_descriptor *blob,
                    u64 data_source_id,
index 164620963affe2891ed4a89a8584f078e9d370cb..ed54e6f5bd853cd9a603100ca2c6c39873186080 100644 (file)
@@ -13,55 +13,55 @@ struct blob_descriptor;
 struct consume_chunk_callback;
 struct windows_file;
 
-extern struct windows_file *
+struct windows_file *
 clone_windows_file(const struct windows_file *file);
 
-extern void
+void
 free_windows_file(struct windows_file *file);
 
-extern int
+int
 cmp_windows_files(const struct windows_file *file1,
                  const struct windows_file *file2);
 
-extern int
+int
 read_windows_file_prefix(const struct blob_descriptor *blob, u64 size,
                         const struct consume_chunk_callback *cb,
                         bool recover_data);
 
-extern int
+int
 win32_global_init(int init_flags);
 
-extern void
+void
 win32_global_cleanup(void);
 
-extern int
+int
 fsync(int fd);
 
-extern tchar *
+tchar *
 realpath(const tchar *path, tchar *resolved_path);
 
-extern int
+int
 win32_rename_replacement(const tchar *oldpath, const tchar *newpath);
 
-extern int
+int
 win32_truncate_replacement(const tchar *path, off_t size);
 
-extern int
+int
 win32_strerror_r_replacement(int errnum, tchar *buf, size_t buflen);
 
-extern FILE *
+FILE *
 win32_open_logfile(const wchar_t *path);
 
-extern ssize_t
+ssize_t
 win32_read(int fd, void *buf, size_t count);
 
-extern ssize_t
+ssize_t
 win32_write(int fd, const void *buf, size_t count);
 
-extern ssize_t
+ssize_t
 win32_pread(int fd, void *buf, size_t count, off_t offset);
 
-extern ssize_t
+ssize_t
 win32_pwrite(int fd, const void *buf, size_t count, off_t offset);
 
 #endif /* _WIN32 */
index a886b56daafe44fc6fefe8673394bd45e9c7df03..320da3eb0b8a919857b0fec0f36378a3c395395a 100644 (file)
@@ -136,28 +136,28 @@ extern NTSTATUS (WINAPI *func_RtlCreateSystemVolumeInformationFolder)
 
 /* Other utility functions */
 
-extern int
+int
 win32_path_to_nt_path(const wchar_t *win32_path, UNICODE_STRING *nt_path);
 
-extern int
+int
 win32_get_drive_path(const wchar_t *file_path, wchar_t drive_path[7]);
 
-extern bool
+bool
 win32_try_to_attach_wof(const wchar_t *drive);
 
-extern void
+void
 win32_warning(DWORD err, const wchar_t *format, ...) _cold_attribute;
 
-extern void
+void
 win32_error(DWORD err, const wchar_t *format, ...) _cold_attribute;
 
-extern void
+void
 winnt_warning(NTSTATUS status, const wchar_t *format, ...) _cold_attribute;
 
-extern void
+void
 winnt_error(NTSTATUS status, const wchar_t *format, ...) _cold_attribute;
 
-extern NTSTATUS
+NTSTATUS
 winnt_fsctl(HANDLE h, u32 code, const void *in, u32 in_size,
            void *out, u32 out_size_avail, u32 *actual_out_size_ret);
 
index 6e9c197717e7376b39dccef978728f5293a9e650..54244064b485d1088c03abdab9e264093963dd1d 100644 (file)
@@ -14,7 +14,7 @@ struct vss_snapshot {
        size_t refcnt;
 };
 
-extern void
+void
 vss_delete_snapshot(struct vss_snapshot *snapshot);
 
 /* Acquire a reference to the specified VSS snapshot.  */
@@ -35,11 +35,11 @@ vss_put_snapshot(struct vss_snapshot *snapshot)
                vss_delete_snapshot(snapshot);
 }
 
-extern int
+int
 vss_create_snapshot(const wchar_t *source, UNICODE_STRING *vss_path_ret,
                    struct vss_snapshot **snapshot_ret);
 
-extern void
+void
 vss_global_cleanup(void);
 
 #endif /* _WIMLIB_WIN32_VSS_H */
index 3f7a7e5463d6d0fe33b5c6fbbf12e5ba5a7823c9..605b10de8acb48d43eb456ab4c42efc9ecc3ef3c 100644 (file)
@@ -31,9 +31,9 @@
        WIMLIB_WRITE_FLAG_UNSAFE_COMPACT)
 
 #if defined(HAVE_SYS_FILE_H) && defined(HAVE_FLOCK)
-extern int
+int
 lock_wim_for_append(WIMStruct *wim);
-extern void
+void
 unlock_wim_for_append(WIMStruct *wim);
 #else
 static inline int
index a8d8f91f5ca40e61a8da38757c5ee7ea7b5db196..c11138c927634bbde25e8ea044e95ba41cf1b884 100644 (file)
@@ -7,53 +7,53 @@
 
 struct wim_xml_info;
 
-extern struct wim_xml_info *
+struct wim_xml_info *
 xml_new_info_struct(void);
 
-extern void
+void
 xml_free_info_struct(struct wim_xml_info *info);
 
 /*****************************************************************************/
 
-extern int
+int
 xml_get_image_count(const struct wim_xml_info *info);
 
-extern u64
+u64
 xml_get_total_bytes(const struct wim_xml_info *info);
 
-extern u64
+u64
 xml_get_image_total_bytes(const struct wim_xml_info *info, int image);
 
-extern u64
+u64
 xml_get_image_hard_link_bytes(const struct wim_xml_info *info, int image);
 
-extern bool
+bool
 xml_get_wimboot(const struct wim_xml_info *info, int image);
 
-extern u64
+u64
 xml_get_windows_build_number(const struct wim_xml_info *info, int image);
 
-extern int
+int
 xml_set_wimboot(struct wim_xml_info *info, int image);
 
 /*****************************************************************************/
 
-extern int
+int
 xml_update_image_info(WIMStruct *wim, int image);
 
-extern int
+int
 xml_add_image(struct wim_xml_info *info, const tchar *name);
 
-extern int
+int
 xml_export_image(const struct wim_xml_info *src_info, int src_image,
                 struct wim_xml_info *dest_info, const tchar *dest_image_name,
                 const tchar *dest_image_description, bool wimboot);
 
-extern void
+void
 xml_delete_image(struct wim_xml_info *info, int image);
 
 
-extern void
+void
 xml_print_image_info(struct wim_xml_info *info, int image);
 
 /*****************************************************************************/
@@ -63,10 +63,10 @@ struct wim_reshdr;
 #define WIM_TOTALBYTES_USE_EXISTING  ((u64)(-1))
 #define WIM_TOTALBYTES_OMIT          ((u64)(-2))
 
-extern int
+int
 read_wim_xml_data(WIMStruct *wim);
 
-extern int
+int
 write_wim_xml_data(WIMStruct *wim, int image,
                   u64 total_bytes, struct wim_reshdr *out_reshdr,
                   int write_resource_flags);
index c374bc8afd4914017e6b0505bc101fe4d691d54c..203e79d04db89fbacf71f65dd4fb98b9123d2250 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "wimlib/types.h"
 
-extern int
+int
 set_windows_specific_info(WIMStruct *wim);
 
 #endif /* _WIMLIB_XML_WINDOWS_H */
index 11143f7b5429c6151d396955cdd68d4ec1d5e552..2a694c0ede91bbbdec4cd0853e2604973eaca6f3 100644 (file)
@@ -6,13 +6,13 @@
 #include <inttypes.h>
 #include <wchar.h>
 
-extern wchar_t *
+wchar_t *
 win32_mbs_to_wcs(const char *mbs, size_t mbs_nbytes, size_t *num_wchars_ret);
 
-extern void
+void
 win32_print_security_descriptor(const uint8_t *sd, size_t size);
 
-extern void
+void
 set_fd_to_binary_mode(int fd);
 
 #include "wgetopt.h"
index c0b68020e2055c7729b7bde34cea501ad7e3f653..25cc2477d2ad422b68751f185c0125ed8dc97154 100644 (file)
@@ -4708,7 +4708,7 @@ usage_all(FILE *fp)
 }
 
 #ifdef _WIN32
-extern int wmain(int argc, wchar_t **argv);
+int wmain(int argc, wchar_t **argv);
 #define main wmain
 #endif
 
index 9b2f3a3b9ac426d52585651d1f2a02a93a2e634f..708870620df05a9934616c941ac923330fecb5c3 100644 (file)
@@ -17,14 +17,14 @@ struct woption {
 #define required_argument 1
 #define optional_argument 2
 
-extern int
+int
 wgetopt (int argc, wchar_t *const *argv, const wchar_t *optstring);
 
-extern int
+int
 wgetopt_long(int argc, wchar_t * const *argv, const wchar_t *options,
             const struct woption *long_options, int *opt_index);
 
-extern int
+int
 wgetopt_long_only(int argc, wchar_t *const *argv, const wchar_t *options,
                  const struct woption *long_options, int *opt_index);
 
index e9880a260023c668377c90a88cbc73d86c5a0208..a32218f29a7dfdabc4b1c27a41784f15d9074210 100644 (file)
@@ -188,17 +188,17 @@ create_ntfs_volume(const char *name)
 
 #ifdef _WIN32
 
-extern WINAPI NTSTATUS NtQueryDirectoryFile (HANDLE FileHandle,
-                                            HANDLE Event,
-                                            PIO_APC_ROUTINE ApcRoutine,
-                                            PVOID ApcContext,
-                                            PIO_STATUS_BLOCK IoStatusBlock,
-                                            PVOID FileInformation,
-                                            ULONG Length,
-                                            FILE_INFORMATION_CLASS FileInformationClass,
-                                            BOOLEAN ReturnSingleEntry,
-                                            PUNICODE_STRING FileName,
-                                            BOOLEAN RestartScan);
+WINAPI NTSTATUS NtQueryDirectoryFile(HANDLE FileHandle,
+                                    HANDLE Event,
+                                    PIO_APC_ROUTINE ApcRoutine,
+                                    PVOID ApcContext,
+                                    PIO_STATUS_BLOCK IoStatusBlock,
+                                    PVOID FileInformation,
+                                    ULONG Length,
+                                    FILE_INFORMATION_CLASS FileInformationClass,
+                                    BOOLEAN ReturnSingleEntry,
+                                    PUNICODE_STRING FileName,
+                                    BOOLEAN RestartScan);
 
 static void
 delete_directory_tree_recursive(HANDLE cur_dir, UNICODE_STRING *name)
@@ -1045,7 +1045,7 @@ static const operation_func operation_table[] = {
 };
 
 #ifdef _WIN32
-extern int wmain(int argc, wchar_t **argv);
+int wmain(int argc, wchar_t **argv);
 #define main wmain
 #endif