8000 Default to old key handler by NattyNarwhal · Pull Request #39 · tn5250/tn5250 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Default to old key handler #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ if (NOT WIN32)
find_package(Curses REQUIRED)
endif()

option(CURSES_OLD_KEYS "Use curses built-in key handling" YES)

check_include_file("fcntl.h" HAVE_FCNTL_H)
check_include_file("locale.h" HAVE_LOCALE_H)
check_include_file("pwd.h" HAVE_PWD_H)
Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ AC_DEFINE_UNQUOTED(SOCKET_TYPE,int)

# User specified optional packages
AC_ARG_WITH([curses-old-keys],
AS_HELP_STRING([--with-curses-old-keys],[curses terminal will use old key handler (default=no)]),
AS_HELP_STRING([--with-curses-old-keys],[use curses built-in key handling (default=yes)]),
[ac_cv_use_old_keys=$withval],
[ac_cv_use_old_keys=no])
[ac_cv_use_old_keys=yes])
AC_CACHE_CHECK([whether to use old key handler],
[ac_cv_use_old_keys],
[ac_cv_use_old_keys=no])
Expand Down
6 changes: 5 additions & 1 deletion curses/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ cmake_minimum_required(VERSION 3.12)
project(tn5250-curses LANGUAGES C)

include_directories(${CMAKE_BINARY_DIR} ../lib5250)

add_executable(tn5250 cursesterm.c tn5250.c cursesterm.h)
target_link_libraries(tn5250 5250 ${CURSES_LIBRARIES})

if (NOT CURSES_OLD_KEYS)
target_compile_definitions(tn5250 PUBLIC -D USE_OWN_KEY_PARSING=1)
endif()

install(TARGETS tn5250)
0