Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
libcifpp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
libcifpp
Commits
0fafb80d
Unverified
Commit
0fafb80d
authored
Sep 27, 2021
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove bzip2 support
parent
298fe20a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
39 deletions
+12
-39
CMakeLists.txt
+4
-5
changelog
+5
-2
src/Cif++.cpp
+1
-12
src/Structure.cpp
+2
-20
No files found.
CMakeLists.txt
View file @
0fafb80d
...
...
@@ -175,7 +175,6 @@ set(Boost_USE_STATIC_LIBS ON)
find_package
(
Boost 1.70.0 REQUIRED COMPONENTS system iostreams regex date_time program_options
)
find_package
(
ZLIB REQUIRED
)
find_package
(
BZip2 REQUIRED
)
include_directories
(
${
Boost_INCLUDE_DIR
}
)
...
...
@@ -205,7 +204,7 @@ if(RECREATE_SYMOP_DATA)
add_executable
(
symop-map-generator
"
${
CMAKE_SOURCE_DIR
}
/tools/symop-map-generator.cpp"
)
target_link_libraries
(
symop-map-generator Threads::Threads
${
Boost_LIBRARIES
}
std::filesystem ZLIB::ZLIB
BZip2::BZip2
)
target_link_libraries
(
symop-map-generator Threads::Threads
${
Boost_LIBRARIES
}
std::filesystem ZLIB::ZLIB
)
set
(
$ENV{CLIBD}
${
CLIBD
}
)
...
...
@@ -268,6 +267,8 @@ target_include_directories(cifpp
"$<INSTALL_INTERFACE:
${
CMAKE_INSTALL_INCLUDEDIR
}
>"
)
target_link_libraries
(
cifpp Threads::Threads
${
Boost_LIBRARIES
}
std::filesystem ZLIB::ZLIB
)
if
(
CMAKE_CXX_COMPILER_ID STREQUAL
"AppleClang"
)
target_link_options
(
cifpp PRIVATE -undefined dynamic_lookup
)
endif
(
CMAKE_CXX_COMPILER_ID STREQUAL
"AppleClang"
)
...
...
@@ -305,8 +306,6 @@ endif()
add_custom_target
(
COMPONENTS ALL DEPENDS
${
COMPONENTS_CIF
}
)
include_directories
(
${
Boost_INCLUDE_DIRS
}
)
set
(
INCLUDE_INSTALL_DIR
${
CMAKE_INSTALL_INCLUDEDIR
}
)
set
(
LIBRARY_INSTALL_DIR
${
CMAKE_INSTALL_LIBDIR
}
)
set
(
SHARE_INSTALL_DIR
${
CMAKE_INSTALL_DATADIR
}
/libcifpp
)
...
...
@@ -425,7 +424,7 @@ if(CIFPP_BUILD_TESTS)
${
CMAKE_CURRENT_BINARY_DIR
}
# for config.h
)
target_link_libraries
(
${
CIFPP_TEST
}
PRIVATE Threads::Threads cifpp
${
Boost_LIBRARIES
}
std::filesystem ZLIB::ZLIB
BZip2::BZip2
)
target_link_libraries
(
${
CIFPP_TEST
}
PRIVATE Threads::Threads cifpp
${
Boost_LIBRARIES
}
std::filesystem ZLIB::ZLIB
)
if
(
MSVC
)
# Specify unwind semantics so that MSVC knowns how to handle exceptions
...
...
changelog
View file @
0fafb80d
Version 2.0.0
- New API interface for accessing query results
- Removed bzip2 support
Version 1.1.1
- Now with full support for MS Windows
...
...
@@ -10,4 +14,4 @@ Version 1.0.1
then /var/cache and finally compiled in resources (with mrc).
Version 1.0.0
- First public release
\ No newline at end of file
- First public release
src/Cif++.cpp
View file @
0fafb80d
...
...
@@ -37,7 +37,6 @@
#include <filesystem>
#include <boost/algorithm/string.hpp>
#include <boost/iostreams/filter/bzip2.hpp>
#include <boost/iostreams/filter/gzip.hpp>
#include <boost/iostreams/filtering_stream.hpp>
#include <boost/logic/tribool.hpp>
...
...
@@ -3464,12 +3463,7 @@ void File::load(const std::string &p)
io
::
filtering_stream
<
io
::
input
>
in
;
std
::
string
ext
;
if
(
path
.
extension
()
==
".bz2"
)
{
in
.
push
(
io
::
bzip2_decompressor
());
ext
=
path
.
stem
().
extension
().
string
();
}
else
if
(
path
.
extension
()
==
".gz"
)
if
(
path
.
extension
()
==
".gz"
)
{
in
.
push
(
io
::
gzip_decompressor
());
ext
=
path
.
stem
().
extension
().
string
();
...
...
@@ -3500,11 +3494,6 @@ void File::save(const std::string &p)
out
.
push
(
io
::
gzip_compressor
());
path
=
path
.
stem
();
}
else
if
(
path
.
extension
()
==
".bz2"
)
{
out
.
push
(
io
::
bzip2_compressor
());
path
=
path
.
stem
();
}
out
.
push
(
outFile
);
save
(
out
);
...
...
src/Structure.cpp
View file @
0fafb80d
...
...
@@ -32,7 +32,6 @@
#include <boost/algorithm/string.hpp>
#include <boost/format.hpp>
#include <boost/iostreams/filter/bzip2.hpp>
#include <boost/iostreams/filter/gzip.hpp>
#include <boost/iostreams/filtering_stream.hpp>
...
...
@@ -67,7 +66,6 @@ struct FileImpl
void
FileImpl
::
load_data
(
const
char
*
data
,
size_t
length
)
{
bool
gzipped
=
length
>
2
and
data
[
0
]
==
static_cast
<
char
>
(
0x1f
)
and
data
[
1
]
==
static_cast
<
char
>
(
0x8b
);
bool
bzip2ed
=
length
>
3
and
data
[
0
]
==
static_cast
<
char
>
(
0x42
)
and
data
[
1
]
==
static_cast
<
char
>
(
0x5A
)
and
data
[
2
]
==
static_cast
<
char
>
(
0x68
);
try
{
...
...
@@ -82,8 +80,6 @@ void FileImpl::load_data(const char *data, size_t length)
io
::
filtering_stream
<
io
::
input
>
in
;
if
(
gzipped
)
in
.
push
(
io
::
gzip_decompressor
());
else
if
(
bzip2ed
)
in
.
push
(
io
::
bzip2_decompressor
());
in
.
push
(
is
);
mData
.
load
(
in
);
...
...
@@ -101,8 +97,6 @@ void FileImpl::load_data(const char *data, size_t length)
io
::
filtering_stream
<
io
::
input
>
in
;
if
(
gzipped
)
in
.
push
(
io
::
gzip_decompressor
());
else
if
(
bzip2ed
)
in
.
push
(
io
::
bzip2_decompressor
());
in
.
push
(
is
);
ReadPDBFile
(
in
,
mData
);
...
...
@@ -129,12 +123,7 @@ void FileImpl::load(const std::string &p)
io
::
filtering_stream
<
io
::
input
>
in
;
std
::
string
ext
=
path
.
extension
().
string
();
if
(
path
.
extension
()
==
".bz2"
)
{
in
.
push
(
io
::
bzip2_decompressor
());
ext
=
path
.
stem
().
extension
().
string
();
}
else
if
(
path
.
extension
()
==
".gz"
)
if
(
path
.
extension
()
==
".gz"
)
{
in
.
push
(
io
::
gzip_decompressor
());
ext
=
path
.
stem
().
extension
().
string
();
...
...
@@ -171,9 +160,7 @@ void FileImpl::load(const std::string &p)
else
inFile
.
open
(
path
,
std
::
ios_base
::
in
|
std
::
ios
::
binary
);
if
(
path
.
extension
()
==
".bz2"
)
in
.
push
(
io
::
bzip2_decompressor
());
else
if
(
path
.
extension
()
==
".gz"
)
if
(
path
.
extension
()
==
".gz"
)
in
.
push
(
io
::
gzip_decompressor
());
in
.
push
(
inFile
);
...
...
@@ -210,11 +197,6 @@ void FileImpl::save(const std::string &p)
out
.
push
(
io
::
gzip_compressor
());
path
=
path
.
stem
();
}
else
if
(
path
.
extension
()
==
".bz2"
)
{
out
.
push
(
io
::
bzip2_compressor
());
path
=
path
.
stem
();
}
out
.
push
(
outFile
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment