Update to ncmpcpp-0.8
This commit is contained in:
parent
4ea9d68a0c
commit
4359009ef2
@ -1,12 +1,11 @@
|
||||
# $OpenBSD: Makefile,v 1.58 2017/05/31 08:08:15 espie Exp $
|
||||
# $OpenBSD: Makefile,v 1.59 2017/06/09 15:09:51 dcoppa Exp $
|
||||
|
||||
BROKEN-alpha = error: looser throw specifier for 'virtual OutOfBounds::~OutOfBounds()'
|
||||
BROKEN-hppa = bindings.h:85:4: error: type 'Binding' is not a direct base of 'Binding'
|
||||
|
||||
COMMENT = ncurses mpd client inspired by ncmpc
|
||||
|
||||
DISTNAME = ncmpcpp-0.7.7
|
||||
REVISION = 2
|
||||
DISTNAME = ncmpcpp-0.8
|
||||
|
||||
EXTRACT_SUFX = .tar.bz2
|
||||
|
||||
@ -19,10 +18,11 @@ MAINTAINER = David Coppa <dcoppa@openbsd.org>
|
||||
# GPLv2
|
||||
PERMIT_PACKAGE_CDROM = Yes
|
||||
|
||||
WANTLIB += boost_filesystem-mt boost_locale-mt boost_program_options-mt
|
||||
WANTLIB += boost_regex-mt boost_system-mt boost_thread-mt c crypto curl
|
||||
WANTLIB += ereadline m mpdclient ncursesw nghttp2 pthread ssl ${LIBCXX} tag
|
||||
WANTLIB += termcap z ${LIBECXX}
|
||||
WANTLIB += boost_date_time-mt boost_filesystem-mt boost_locale-mt
|
||||
WANTLIB += boost_program_options-mt boost_regex-mt boost_system-mt
|
||||
WANTLIB += boost_thread-mt c crypto curl ereadline m mpdclient
|
||||
WANTLIB += ncursesw nghttp2 pthread ssl ${LIBCXX} tag termcap z
|
||||
WANTLIB += ${LIBECXX}
|
||||
|
||||
MASTER_SITES = ${HOMEPAGE}stable/
|
||||
|
||||
@ -42,13 +42,12 @@ CONFIGURE_STYLE = gnu
|
||||
|
||||
CONFIGURE_ARGS = --enable-clock \
|
||||
--enable-outputs \
|
||||
--enable-unicode \
|
||||
--with-curl \
|
||||
--with-taglib \
|
||||
--without-fftw
|
||||
|
||||
CONFIGURE_ENV = BOOST_LIB_SUFFIX="-mt" \
|
||||
CPPFLAGS="-DBOOST_RESULT_OF_USE_DECLTYPE \
|
||||
-DBOOST_THREAD_USES_MOVE \
|
||||
-D_XOPEN_SOURCE_EXTENDED \
|
||||
-isystem ${LOCALBASE}/include \
|
||||
-isystem ${LOCALBASE}/include/ereadline \
|
||||
@ -56,6 +55,8 @@ CONFIGURE_ENV = BOOST_LIB_SUFFIX="-mt" \
|
||||
LDFLAGS='-L${LOCALBASE}/lib' \
|
||||
ICU_CFLAGS="icu-is-not-really-needed" \
|
||||
ICU_LIBS="icu-is-not-really-needed" \
|
||||
ncursesw_CFLAGS="-D_GNU_SOURCE -D_DEFAULT_SOURCE" \
|
||||
ncursesw_LIBS="-lncursesw" \
|
||||
ax_cv_lib_readline="-L${LOCALBASE}/lib -lereadline -ltermcap"
|
||||
|
||||
# filthy workaround for a mysterious "Abort trap" error :(
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (ncmpcpp-0.7.7.tar.bz2) = t7y+yDsfiMx7IfGWsQvgmie0MFZsWfQC3xcBY0ZNAe8=
|
||||
SIZE (ncmpcpp-0.7.7.tar.bz2) = 443801
|
||||
SHA256 (ncmpcpp-0.8.tar.bz2) = Lw8qHAgWEZQwiAvmky5es1a3h136FA4kU6WoApCfRlo=
|
||||
SIZE (ncmpcpp-0.8.tar.bz2) = 464165
|
||||
|
23
audio/ncmpcpp/patches/patch-configure
Normal file
23
audio/ncmpcpp/patches/patch-configure
Normal file
@ -0,0 +1,23 @@
|
||||
$OpenBSD: patch-configure,v 1.10 2017/06/09 15:09:51 dcoppa Exp $
|
||||
|
||||
Index: configure
|
||||
--- configure.orig
|
||||
+++ configure
|
||||
@@ -16001,7 +16001,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$
|
||||
|
||||
echo "$as_me: this is boost.m4 serial 26" >&5
|
||||
boost_save_IFS=$IFS
|
||||
-boost_version_req=1.60
|
||||
+boost_version_req=1.58
|
||||
IFS=.
|
||||
set x $boost_version_req 0 0 0
|
||||
IFS=$boost_save_IFS
|
||||
@@ -19500,7 +19500,7 @@ CPPFLAGS=$boost_thread_save_CPPFLAGS
|
||||
|
||||
|
||||
|
||||
-LDFLAGS+="$LDFLAGS $BOOST_THREAD_LDFLAGS"
|
||||
+LDFLAGS="$LDFLAGS $BOOST_THREAD_LDFLAGS"
|
||||
LIBS="$LIBS $BOOST_THREAD_LIBS"
|
||||
|
||||
# icu
|
@ -1,13 +1,14 @@
|
||||
$OpenBSD: patch-doc_ncmpcpp_1,v 1.7 2017/02/28 16:15:30 dcoppa Exp $
|
||||
--- doc/ncmpcpp.1.orig Mon Oct 31 12:24:35 2016
|
||||
+++ doc/ncmpcpp.1 Tue Feb 28 16:47:55 2017
|
||||
$OpenBSD: patch-doc_ncmpcpp_1,v 1.8 2017/06/09 15:09:51 dcoppa Exp $
|
||||
Index: doc/ncmpcpp.1
|
||||
--- doc/ncmpcpp.1.orig
|
||||
+++ doc/ncmpcpp.1
|
||||
@@ -1,4 +1,4 @@
|
||||
-.TH "ncmpcpp" "1"
|
||||
+.TH "NCMPCPP" "1" "2016-10-31"
|
||||
+.TH "NCMPCPP" "1" "2017-05-21"
|
||||
.SH "NAME"
|
||||
ncmpcpp \- An ncurses Music Player Daemon (MPD) client.
|
||||
.SH "SYNOPSIS"
|
||||
@@ -38,7 +38,6 @@ Display help.
|
||||
@@ -41,7 +41,6 @@ Display help.
|
||||
.TP
|
||||
.B \-v, \-\-version
|
||||
Display version information.
|
||||
@ -15,24 +16,7 @@ $OpenBSD: patch-doc_ncmpcpp_1,v 1.7 2017/02/28 16:15:30 dcoppa Exp $
|
||||
.SH "CONFIGURATION"
|
||||
When ncmpcpp starts, it tries to read user's settings from $HOME/.ncmpcpp/config and $XDG_CONFIG_HOME/ncmpcpp/config files. If no configuration is found, ncmpcpp uses its default configuration. An example configuration file containing all default values is provided with ncmpcpp and can be usually found in /usr/share/doc/ncmpcpp (exact location may depend on used distribution or configure prefix).
|
||||
|
||||
@@ -107,12 +106,14 @@ Delay for highlighting playlist since the last key was
|
||||
Delay for displayed messages to remain visible.
|
||||
.TP
|
||||
.B song_list_format
|
||||
-Format for songs' list.
|
||||
+Song format for lists of songs.
|
||||
.TP
|
||||
.B song_status_format
|
||||
-Song's format for statusbar.
|
||||
+Song format for statusbar.
|
||||
.TP
|
||||
.B song_library_format
|
||||
+Song format for media library.
|
||||
+.TP
|
||||
.B alternative_header_first_line_format = TEXT
|
||||
Now playing song format for the first line in alternative user interface header window.
|
||||
.TP
|
||||
@@ -268,7 +269,7 @@ Slave screen that has to be displayed at start (nothin
|
||||
@@ -296,7 +295,7 @@ Slave screen that has to be displayed at start (nothin
|
||||
.TP
|
||||
.B startup_slave_screen_focus = yes/no
|
||||
If set to yes, slave screen will be the active one after startup. Otherwise master screen will be.
|
||||
@ -41,11 +25,11 @@ $OpenBSD: patch-doc_ncmpcpp_1,v 1.7 2017/02/28 16:15:30 dcoppa Exp $
|
||||
.B locked_screen_width_part = 20-80
|
||||
If you want to lock a screen, ncmpcpp asks for % of locked screen's width to be reserved before that and provides a default value, which is the one you can set here.
|
||||
.TP
|
||||
@@ -382,7 +383,6 @@ Border color of pop-up windows. If set to 'none', no b
|
||||
@@ -413,7 +412,6 @@ Border color of pop-up windows. If set to 'none', no b
|
||||
.TP
|
||||
.B active_window_border = COLOR
|
||||
Color of active window's border.
|
||||
-.TP
|
||||
.SH "BINDINGS"
|
||||
When ncmpcpp starts, it tries to read user's bindings from ~/.ncmpcpp/bindings file. If no bindings file is found, ncmpcpp uses the defaults. An example bindings file with the default values can be found usually in /usr/share/doc/ncmpcpp (exact location may depend on used distribution or configure prefix).
|
||||
When ncmpcpp starts, it tries to read user's bindings from ~/.ncmpcpp/bindings and $XDG_CONFIG_HOME/ncmpcpp/bindings files. If no bindings file is found, ncmpcpp uses the defaults. An example bindings file with the default values can be found usually in /usr/share/doc/ncmpcpp (exact location may depend on used distribution or configure prefix).
|
||||
|
||||
|
@ -1,21 +0,0 @@
|
||||
$OpenBSD: patch-src_actions_cpp,v 1.5 2016/11/29 11:35:00 dcoppa Exp $
|
||||
|
||||
commit 3868e32b9216e14247e0534061d1d02f3b8ab65d
|
||||
Author: Andrzej Rybczak <electricityispower@gmail.com>
|
||||
Date: Sun Nov 20 19:38:11 2016 +0100
|
||||
|
||||
Show detailed error message if writing tags fails
|
||||
|
||||
--- src/actions.cpp.orig Mon Oct 31 12:24:35 2016
|
||||
+++ src/actions.cpp Tue Nov 29 11:54:04 2016
|
||||
@@ -1395,8 +1395,8 @@ void EditLibraryTag::run()
|
||||
if (!Tags::write(ms))
|
||||
{
|
||||
success = false;
|
||||
- const char msg[] = "Error while updating tags in \"%1%\"";
|
||||
- Statusbar::printf(msg, wideShorten(ms.getURI(), COLS-const_strlen(msg)));
|
||||
+ Statusbar::printf("Error while writing tags to \"%1%\": %2%",
|
||||
+ ms.getName(), strerror(errno));
|
||||
s.finish();
|
||||
break;
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
$OpenBSD: patch-src_configuration_cpp,v 1.1 2016/11/29 11:35:00 dcoppa Exp $
|
||||
|
||||
commit 8dde3944ee1878a7f26dd24bfe5e31f4e72c05b1
|
||||
Author: Andrzej Rybczak <electricityispower@gmail.com>
|
||||
Date: Wed Nov 16 11:12:56 2016 +0100
|
||||
|
||||
configuration: show meaningful error message if MPD_PORT is not a
|
||||
number
|
||||
|
||||
--- src/configuration.cpp.orig Mon Oct 31 12:24:35 2016
|
||||
+++ src/configuration.cpp Tue Nov 29 11:49:17 2016
|
||||
@@ -19,6 +19,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include <algorithm>
|
||||
+#include <boost/algorithm/string/trim.hpp>
|
||||
#include <boost/filesystem/operations.hpp>
|
||||
#include <boost/program_options.hpp>
|
||||
#include <iostream>
|
||||
@@ -177,7 +178,16 @@ bool configure(int argc, char **argv)
|
||||
if (env_host != nullptr)
|
||||
Mpd.SetHostname(env_host);
|
||||
if (env_port != nullptr)
|
||||
- Mpd.SetPort(boost::lexical_cast<int>(env_port));
|
||||
+ {
|
||||
+ auto trimmed_env_port = boost::trim_copy<std::string>(env_port);
|
||||
+ try {
|
||||
+ Mpd.SetPort(boost::lexical_cast<int>(trimmed_env_port));
|
||||
+ } catch (boost::bad_lexical_cast &) {
|
||||
+ throw std::runtime_error("MPD_PORT environment variable ("
|
||||
+ + std::string(env_port)
|
||||
+ + ") is not a number");
|
||||
+ }
|
||||
+ }
|
||||
|
||||
// if MPD connection details are provided as command line
|
||||
// parameters, use them as their priority is the highest.
|
35
audio/ncmpcpp/patches/patch-src_curses_strbuffer_h
Normal file
35
audio/ncmpcpp/patches/patch-src_curses_strbuffer_h
Normal file
@ -0,0 +1,35 @@
|
||||
$OpenBSD: patch-src_curses_strbuffer_h,v 1.1 2017/06/09 15:09:51 dcoppa Exp $
|
||||
|
||||
Older versions of boost::apply_visitor require a result_type member
|
||||
for the visitor
|
||||
|
||||
Index: src/curses/strbuffer.h
|
||||
--- src/curses/strbuffer.h.orig
|
||||
+++ src/curses/strbuffer.h
|
||||
@@ -29,6 +29,17 @@
|
||||
|
||||
namespace NC {
|
||||
|
||||
+template <typename ResultType, typename Visitor>
|
||||
+struct boost_visitor_adapter : Visitor {
|
||||
+ using result_type = ResultType;
|
||||
+ boost_visitor_adapter(Visitor &&v) : Visitor(std::move(v)) {}
|
||||
+};
|
||||
+
|
||||
+template <typename ResultType = void, typename Visitor>
|
||||
+auto to_boost_visitor(Visitor &&v) {
|
||||
+ return boost_visitor_adapter<ResultType, Visitor>(std::move(v));
|
||||
+}
|
||||
+
|
||||
/// Buffer template class that stores text
|
||||
/// along with its properties (colors/formatting).
|
||||
template <typename CharT> class BasicBuffer
|
||||
@@ -49,7 +60,7 @@ template <typename CharT> class BasicBuffer
|
||||
template <typename OutputStreamT>
|
||||
friend OutputStreamT &operator<<(OutputStreamT &os, const Property &p)
|
||||
{
|
||||
- boost::apply_visitor([&os](const auto &v) { os << v; }, p.m_impl);
|
||||
+ boost::apply_visitor(to_boost_visitor([&os](const auto &v) { os << v; }), p.m_impl);
|
||||
return os;
|
||||
}
|
||||
|
@ -1,19 +0,0 @@
|
||||
$OpenBSD: patch-src_lyrics_cpp,v 1.3 2016/11/29 11:35:00 dcoppa Exp $
|
||||
|
||||
commit dac0d4602f810d8f43e18beefdd43068e40308c3
|
||||
Author: Andrzej Rybczak <electricityispower@gmail.com>
|
||||
Date: Wed Nov 16 05:50:40 2016 +0100
|
||||
|
||||
lyrics: fix loading of files with DOS line endings
|
||||
|
||||
--- src/lyrics.cpp.orig Mon Oct 31 12:24:35 2016
|
||||
+++ src/lyrics.cpp Tue Nov 29 11:37:43 2016
|
||||
@@ -316,6 +316,8 @@ void Lyrics::Load()
|
||||
std::string line;
|
||||
while (std::getline(input, line))
|
||||
{
|
||||
+ // Remove carriage returns as they mess up the display.
|
||||
+ line.erase(std::remove(line.begin(), line.end(), '\r'), line.end());
|
||||
if (!first)
|
||||
w << '\n';
|
||||
w << Charset::utf8ToLocale(line);
|
@ -1,34 +1,35 @@
|
||||
$OpenBSD: patch-src_ncmpcpp_cpp,v 1.12 2016/11/01 09:31:57 dcoppa Exp $
|
||||
$OpenBSD: patch-src_ncmpcpp_cpp,v 1.13 2017/06/09 15:09:51 dcoppa Exp $
|
||||
|
||||
OpenBSD lacks sigignore(), use the one from NetBSD
|
||||
|
||||
--- src/ncmpcpp.cpp.orig Mon Oct 31 12:24:35 2016
|
||||
+++ src/ncmpcpp.cpp Tue Nov 1 10:10:03 2016
|
||||
@@ -68,6 +68,18 @@ namespace
|
||||
# endif // __sun && __SVR4
|
||||
}
|
||||
Index: src/ncmpcpp.cpp
|
||||
--- src/ncmpcpp.cpp.orig
|
||||
+++ src/ncmpcpp.cpp
|
||||
@@ -68,6 +68,18 @@ void sighandler(int sig)
|
||||
#endif // __sun && __SVR4
|
||||
}
|
||||
|
||||
+ int n_sigignore(int sig)
|
||||
+ {
|
||||
+ struct sigaction sa;
|
||||
+int n_sigignore(int sig)
|
||||
+{
|
||||
+ struct sigaction sa;
|
||||
+
|
||||
+ sa.sa_handler = SIG_IGN;
|
||||
+ if (sigemptyset(&sa.sa_mask) != 0)
|
||||
+ return (-1);
|
||||
+ sa.sa_flags = 0;
|
||||
+ sa.sa_handler = SIG_IGN;
|
||||
+ if (sigemptyset(&sa.sa_mask) != 0)
|
||||
+ return (-1);
|
||||
+ sa.sa_flags = 0;
|
||||
+
|
||||
+ return (sigaction(sig, &sa, NULL));
|
||||
+ }
|
||||
+ return (sigaction(sig, &sa, NULL));
|
||||
+}
|
||||
+
|
||||
void do_at_exit()
|
||||
{
|
||||
// restore old cerr buffer
|
||||
@@ -107,7 +119,7 @@ int main(int argc, char **argv)
|
||||
signal(SIGPIPE, sighandler);
|
||||
void do_at_exit()
|
||||
{
|
||||
// restore old cerr & clog buffers
|
||||
@@ -108,7 +120,7 @@ int main(int argc, char **argv)
|
||||
cerr_buffer = std::cerr.rdbuf();
|
||||
std::cerr.rdbuf(errorlog.rdbuf());
|
||||
|
||||
- sigignore(SIGPIPE);
|
||||
+ n_sigignore(SIGPIPE);
|
||||
signal(SIGWINCH, sighandler);
|
||||
// ignore Ctrl-C
|
||||
- sigignore(SIGINT);
|
||||
+ n_sigignore(SIGINT);
|
||||
# endif // !WIN32
|
||||
|
||||
NC::initScreen(Config.colors_enabled, Config.mouse_support);
|
||||
Mpd.setNoidleCallback(Status::update);
|
||||
|
@ -1,14 +1,15 @@
|
||||
$OpenBSD: patch-src_status_cpp,v 1.6 2015/07/06 06:04:57 dcoppa Exp $
|
||||
$OpenBSD: patch-src_status_cpp,v 1.7 2017/06/09 15:09:51 dcoppa Exp $
|
||||
|
||||
missing header
|
||||
|
||||
--- src/status.cpp.orig Sat May 2 21:16:11 2015
|
||||
+++ src/status.cpp Fri Jun 19 16:32:23 2015
|
||||
Index: src/status.cpp
|
||||
--- src/status.cpp.orig
|
||||
+++ src/status.cpp
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
#include <netinet/tcp.h>
|
||||
#include <netinet/in.h>
|
||||
+#include <sys/socket.h>
|
||||
|
||||
#include "browser.h"
|
||||
#include "charset.h"
|
||||
#include "curses/menu_impl.h"
|
||||
#include "screens/browser.h"
|
||||
|
@ -1,21 +0,0 @@
|
||||
$OpenBSD: patch-src_tag_editor_cpp,v 1.6 2016/11/29 11:35:00 dcoppa Exp $
|
||||
|
||||
commit 3868e32b9216e14247e0534061d1d02f3b8ab65d
|
||||
Author: Andrzej Rybczak <electricityispower@gmail.com>
|
||||
Date: Sun Nov 20 19:38:11 2016 +0100
|
||||
|
||||
Show detailed error message if writing tags fails
|
||||
|
||||
--- src/tag_editor.cpp.orig Mon Oct 31 12:24:35 2016
|
||||
+++ src/tag_editor.cpp Tue Nov 29 11:54:04 2016
|
||||
@@ -797,8 +797,8 @@ void TagEditor::runAction()
|
||||
Statusbar::printf("Writing tags in \"%1%\"...", (*it)->getName());
|
||||
if (!Tags::write(**it))
|
||||
{
|
||||
- const char msg[] = "Error while writing tags in \"%1%\"";
|
||||
- Statusbar::printf(msg, wideShorten((*it)->getURI(), COLS-const_strlen(msg)).c_str());
|
||||
+ Statusbar::printf("Error while writing tags to \"%1%\": %2%",
|
||||
+ (*it)->getName(), strerror(errno));
|
||||
success = 0;
|
||||
break;
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
$OpenBSD: patch-src_tiny_tag_editor_cpp,v 1.1 2016/11/29 11:35:00 dcoppa Exp $
|
||||
|
||||
commit 3868e32b9216e14247e0534061d1d02f3b8ab65d
|
||||
Author: Andrzej Rybczak <electricityispower@gmail.com>
|
||||
Date: Sun Nov 20 19:38:11 2016 +0100
|
||||
|
||||
Show detailed error message if writing tags fails
|
||||
|
||||
--- src/tiny_tag_editor.cpp.orig Mon Oct 31 12:24:35 2016
|
||||
+++ src/tiny_tag_editor.cpp Tue Nov 29 11:54:04 2016
|
||||
@@ -172,7 +172,7 @@ void TinyTagEditor::runAction()
|
||||
}
|
||||
}
|
||||
else
|
||||
- Statusbar::print("Error while writing tags");
|
||||
+ Statusbar::printf("Error while writing tags: %1%", strerror(errno));
|
||||
}
|
||||
if (option > 21)
|
||||
m_previous_screen->switchTo();
|
@ -1,19 +0,0 @@
|
||||
$OpenBSD: patch-src_utility_type_conversions_cpp,v 1.1 2016/06/06 14:26:37 dcoppa Exp $
|
||||
|
||||
commit dcbb3ab7effaa558a4022f5daf6f4ee6d4339f17
|
||||
Author: Chris Gregory <czipperz@gmail.com>
|
||||
Date: Sun Nov 22 15:33:07 2015 -0800
|
||||
|
||||
Consistently use nullptr instead of 0
|
||||
|
||||
--- src/utility/type_conversions.cpp.orig Sun Apr 17 07:41:01 2016
|
||||
+++ src/utility/type_conversions.cpp Mon Jun 6 16:10:13 2016
|
||||
@@ -108,7 +108,7 @@ MPD::MutableSong::SetFunction tagTypeToSetFunction(mpd
|
||||
case MPD_TAG_DISC:
|
||||
return &MPD::MutableSong::setDisc;
|
||||
default:
|
||||
- return 0;
|
||||
+ return nullptr;
|
||||
}
|
||||
}
|
||||
|
@ -1,57 +0,0 @@
|
||||
$OpenBSD: patch-src_window_h,v 1.2 2017/02/28 16:15:30 dcoppa Exp $
|
||||
|
||||
commit 6b73f0ebe1c05cb2b3b6973662e7b6c95eba4530
|
||||
Author: Andrzej Rybczak <electricityispower@gmail.com>
|
||||
Date: Mon Nov 14 02:18:06 2016 +0100
|
||||
|
||||
window: prevent ncurses from defining macros
|
||||
|
||||
commit 667e9be00e4ddeeabe322df536e41e499b214371
|
||||
Author: Andrzej Rybczak <electricityispower@gmail.com>
|
||||
Date: Wed Dec 7 20:03:50 2016 +0100
|
||||
|
||||
window: make key type 64 bits to represent unicode characters
|
||||
unambiguously
|
||||
|
||||
--- src/window.h.orig Mon Oct 31 12:24:35 2016
|
||||
+++ src/window.h Tue Feb 28 16:41:59 2017
|
||||
@@ -21,6 +21,8 @@
|
||||
#ifndef NCMPCPP_WINDOW_H
|
||||
#define NCMPCPP_WINDOW_H
|
||||
|
||||
+#define NCURSES_NOMACROS 1
|
||||
+
|
||||
#include "config.h"
|
||||
|
||||
#include "curses.h"
|
||||
@@ -39,25 +41,21 @@
|
||||
# define BUTTON5_PRESSED (1U << 27)
|
||||
#endif // NCURSES_MOUSE_VERSION == 1
|
||||
|
||||
-// undefine macros with colliding names
|
||||
-#undef border
|
||||
-#undef scroll
|
||||
-
|
||||
/// NC namespace provides set of easy-to-use
|
||||
/// wrappers over original curses library.
|
||||
namespace NC {
|
||||
|
||||
namespace Key {
|
||||
|
||||
-typedef uint32_t Type;
|
||||
+typedef uint64_t Type;
|
||||
|
||||
const Type None = -1;
|
||||
|
||||
// modifier masks
|
||||
-const Type Special = 1 << 31;
|
||||
-const Type Alt = 1 << 30;
|
||||
-const Type Ctrl = 1 << 29;
|
||||
-const Type Shift = 1 << 28;
|
||||
+const Type Special = Type{1} << 63;
|
||||
+const Type Alt = Type{1} << 62;
|
||||
+const Type Ctrl = Type{1} << 61;
|
||||
+const Type Shift = Type{1} << 60;
|
||||
|
||||
// useful names
|
||||
const Type Null = 0;
|
Loading…
Reference in New Issue
Block a user