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
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. */
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
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
dentry != NULL; \
dentry = dentry->d_next_extraction_alias)
-extern int
+int
extract_blob_list(struct apply_ctx *ctx, const struct read_blob_callbacks *cbs);
/*
}
/* (Internal use only) */
-extern void
+void
avl_tree_rebalance_after_insert(struct avl_tree_node **root_ptr,
struct avl_tree_node *inserted);
/* 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);
};
};
-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 *
}
#ifdef _WIN32
-extern const wchar_t *
+const wchar_t *
get_windows_file_path(const struct windows_file *file);
#endif
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
#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[]);
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);
#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);
(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
#include "wimlib/types.h"
-extern void
+void
divsufsort(const u8 *T, u32 *SA, u32 n, u32 *tmp);
#define DIVSUFSORT_TMP_LEN (256 + (256 * 256))
/* 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);
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 */
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__)
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 */
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)
} 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. */
#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. */
#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
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 *
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);
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 */
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 */
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 */
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 */
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 */
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);
[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. */
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 */
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 */
#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 */
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);
#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);
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
*/
#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);
return 0;
}
-extern int
+int
report_error(wimlib_progress_func_t progfunc,
void *progctx, int error_code, const tchar *path);
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 */
(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
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);
/* 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);
/*
#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. */
/* 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 *,
#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
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 */
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 */
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
struct list_head;
-extern int
+int
sort_blob_list_for_solid_compression(struct list_head *blob_list);
#endif /* _WIMLIB_SOLID_H */
*/
#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);
#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,
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 */
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);
#define UNIX_DATA_ALL 0xF
-extern bool
+bool
inode_set_unix_data(struct wim_inode *inode,
struct wimlib_unix_data *unix_data, int which);
* 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
*******************/
#ifndef HAVE_MEMPCPY
-extern void *
+void *
mempcpy(void *dst, const void *src, size_t n);
#endif
* 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);
/************************
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 */
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,
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 */
/* 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);
size_t refcnt;
};
-extern void
+void
vss_delete_snapshot(struct vss_snapshot *snapshot);
/* Acquire a reference to the specified VSS 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 */
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
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);
/*****************************************************************************/
#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);
#include "wimlib/types.h"
-extern int
+int
set_windows_specific_info(WIMStruct *wim);
#endif /* _WIMLIB_XML_WINDOWS_H */
#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"
}
#ifdef _WIN32
-extern int wmain(int argc, wchar_t **argv);
+int wmain(int argc, wchar_t **argv);
#define main wmain
#endif
#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);
#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)
};
#ifdef _WIN32
-extern int wmain(int argc, wchar_t **argv);
+int wmain(int argc, wchar_t **argv);
#define main wmain
#endif