Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
flagarde committed Oct 31, 2024
1 parent 25feddb commit 844bd31
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ cmake-build*
# cmake
.cache/
Makefile
.build/

# project specific
cpp-terminal/version.h
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ if(NOT CMAKE_CXX_STANDARD)
endif()
set(CMAKE_CXX_STANDARD_REQUIRED TRUE CACHE STRING "C++ standard required" FORCE)
set(CMAKE_CXX_EXTENSIONS FALSE CACHE STRING "C++ extensions" FORCE)
option(BUILD_SHARED_LIBS "Build using shared libraries" ON)

if(WIN32) ##FIXME
option(BUILD_SHARED_LIBS "Build using shared libraries" OFF)
else()
option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
endif()

option(CPPTERMINAL_BUILD_EXAMPLES "Set to ON to build examples" ON)
option(CPPTERMINAL_ENABLE_INSTALL "Set to ON to enable install" ON)
Expand Down
2 changes: 1 addition & 1 deletion cpp-terminal/private/file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ std::string Term::Private::InputFileHandler::read() const
}
catch(const ErrnoException& exception)
{
if(exception.code() != 25) throw;
if(exception.code() != 25 && exception.code() != 0) throw;
}
std::string ret(nread, '\0');
if(nread != 0)
Expand Down
2 changes: 1 addition & 1 deletion examples/signal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

int main()
{
Term::terminal.setOptions(Term::Option::Raw, Term::Option::NoSignalKeys, Term::Option::ClearScreen);
Term::terminal.setOptions(Term::Option::Raw, Term::Option::SignalKeys, Term::Option::ClearScreen);
std::signal(SIGINT,
[](int sig)
{
Expand Down

0 comments on commit 844bd31

Please sign in to comment.