Skip to content

Commit

Permalink
Merge pull request #155 from Gottox/improve/modularize-utils
Browse files Browse the repository at this point in the history
Improve/modularize utils
  • Loading branch information
Gottox committed Oct 5, 2023
2 parents b752dd3 + 19b9bb5 commit 4b8f748
Show file tree
Hide file tree
Showing 18 changed files with 19 additions and 14 deletions.
2 changes: 2 additions & 0 deletions common/include/meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
libsqsh_common_headers = files(
'sqsh_data_private.h',
'sqsh_reader_private.h',
'sqsh_thread_private.h',
)

libsqsh_common_include = include_directories('.')
3 changes: 2 additions & 1 deletion common/include/sqsh_common_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@

#include <sqsh_common.h>

#include <stdint.h>
#include <stdlib.h>
#include <string.h>

Expand Down Expand Up @@ -99,7 +100,7 @@ sqsh_address_ref_create(uint32_t outer_offset, uint16_t inner_offset) {

SQSH_NO_UNUSED static inline uint32_t
sqsh_datablock_size(uint32_t size_info) {
return size_info & ~(1 << 24);
return size_info & (uint32_t) ~(1 << 24);
}

SQSH_NO_UNUSED static inline bool
Expand Down
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions common/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,8 @@ libsqsh_common = static_library(
dependencies: libsqsh_common_dependencies,
install: false,
)

libsqsh_common_dep = declare_dependency(
link_with: libsqsh_common,
include_directories: libsqsh_common_include,
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 9 additions & 7 deletions common/src/meson.build
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
libsqsh_common_sources = files(
'compression_options_data.c',
'directory_data.c',
'fragment_data.c',
'inode_data.c',
'metablock_data.c',
'superblock_data.c',
'xattr_data.c',
'data/compression_options_data.c',
'data/directory_data.c',
'data/fragment_data.c',
'data/inode_data.c',
'data/metablock_data.c',
'data/superblock_data.c',
'data/xattr_data.c',
'reader/reader.c',
'utils/thread.c',
)
File renamed without changes.
File renamed without changes.
2 changes: 0 additions & 2 deletions libsqsh/include/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ libsqsh_private_headers = files(
'sqsh_extract_private.h',
'sqsh_mapper_private.h',
'sqsh_metablock_private.h',
'sqsh_reader_private.h',
'sqsh_table_private.h',
'sqsh_thread_private.h',
'sqsh_tree_private.h',
'sqsh_xattr_private.h',
)
Expand Down
3 changes: 1 addition & 2 deletions libsqsh/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ endif

libsqsh_dependencies = [
cextras_dep,
libsqsh_common_dep,
]

libsqsh_c_args = []
Expand Down Expand Up @@ -45,11 +46,9 @@ libsqsh = both_libraries(
libsqsh_sources,
include_directories: [
libsqsh_private_include,
libsqsh_common_include,
libsqsh_include,
],
install: not meson.is_subproject(),
link_with: [libsqsh_common],
c_args: libsqsh_c_args,
dependencies: libsqsh_dependencies,
version: meson.project_version(),
Expand Down
2 changes: 0 additions & 2 deletions libsqsh/src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ libsqsh_sources = files(
'mapper/static_mapper.c',
'metablock/metablock_iterator.c',
'metablock/metablock_reader.c',
'reader/reader.c',
'table/export_table.c',
'table/fragment_table.c',
'table/id_table.c',
Expand All @@ -40,6 +39,5 @@ libsqsh_sources = files(
'tree/walker.c',
'utils/error.c',
'utils/posix.c',
'utils/thread.c',
'xattr/xattr_iterator.c',
)

0 comments on commit 4b8f748

Please sign in to comment.