From 6338314bd526fd5455dbb3c599f44c7e2dfbf694 Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Wed, 25 Sep 2019 15:14:42 -0300 Subject: [PATCH] Updating windows package info Using the new LIB3270_ACTION object for trace window commands. --- src/trace/exec.c | 25 +++++++++++-------------- win/x86_32/mingw32-libv3270.spec | 25 +++++++++++-------------- win/x86_64/mingw64-libv3270.spec | 17 +++++++---------- 3 files changed, 29 insertions(+), 38 deletions(-) diff --git a/src/trace/exec.c b/src/trace/exec.c index 34e7c68..6b3cd9c 100644 --- a/src/trace/exec.c +++ b/src/trace/exec.c @@ -168,11 +168,6 @@ debug("cmdline: \"%s\"",cmdline); - if(g_str_has_prefix(cmdline,"connect")) - { - return lib3270_reconnect(hSession,0); - } - if(g_str_has_prefix(cmdline,"reload")) { v3270_reload(widget); @@ -286,11 +281,6 @@ return set_property(widget,cmdline,value); } - if(g_str_has_prefix(cmdline,"disconnect")) - { - return lib3270_disconnect(hSession); - } - if(g_str_has_prefix(cmdline,"remap")) { gchar *txtptr = cmdline+5; @@ -332,16 +322,23 @@ else { // Check for lib3270 actions. - const LIB3270_ACTION_ENTRY *actions = lib3270_get_action_table(); + const LIB3270_ACTION * actions = lib3270_get_actions(); for(ix=0; actions[ix].name; ix++) { if(!g_ascii_strcasecmp(actions[ix].name,cmdline)) { - lib3270_trace_event(hSession,"Action: %s\n",actions[ix].name); - return actions[ix].call(hSession); + if(actions[ix].enabled(hSession)) + { + lib3270_trace_event(hSession,"Activating action \"%s\"\n",actions[ix].name); + return actions[ix].activate(hSession); + } + else + { + lib3270_trace_event(hSession,"Action \"%s\" is disabled\n",actions[ix].name); + return EPERM; + } } - } } diff --git a/win/x86_32/mingw32-libv3270.spec b/win/x86_32/mingw32-libv3270.spec index a2d2a0f..f76039b 100644 --- a/win/x86_32/mingw32-libv3270.spec +++ b/win/x86_32/mingw32-libv3270.spec @@ -16,11 +16,6 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -%define MAJOR_VERSION 5 -%define MINOR_VERSION 2 - -%define _libvrs %{MAJOR_VERSION}_%{MINOR_VERSION} -%define _product %(i686-w64-mingw32-pkg-config --variable=product_name lib3270) %define __strip %{_mingw32_strip} %define __objdump %{_mingw32_objdump} @@ -32,11 +27,17 @@ #---[ Main package ]-------------------------------------------------------------------------------------------------- -Summary: 3270 Virtual Terminal for GTK -Name: mingw32-libv3270-%{_libvrs} -Version: 5.2 -Release: 0 -License: GPL-2.0 +Summary: 3270 Virtual Terminal for GTK +Name: mingw32-libv3270 +Version: 5.2 + +%define MAJOR_VERSION %(echo %{version} | cut -d. -f1) +%define MINOR_VERSION %(echo %{version} | cut -d. -f2) +%define _libvrs %{MAJOR_VERSION}_%{MINOR_VERSION} +%define _product %(i686-w64-mingw32-pkg-config --variable=product_name lib3270) + +Release: 0 +License: GPL-2.0 Source: libv3270-%{version}.tar.xz @@ -45,11 +46,7 @@ Url: https://github.com/PerryWerneck/libv3270.git Group: Development/Libraries/C and C++ BuildRoot: /var/tmp/%{name}-%{version} -Provides: mingw32-libv3270 -Conflicts: otherproviders(mingw32-libv3270) - Provides: mingw32(lib:v3270) -Provides: mingw32(lib:v3270-%{_libvrs}) BuildRequires: autoconf BuildRequires: automake diff --git a/win/x86_64/mingw64-libv3270.spec b/win/x86_64/mingw64-libv3270.spec index 08262bf..9ee0833 100644 --- a/win/x86_64/mingw64-libv3270.spec +++ b/win/x86_64/mingw64-libv3270.spec @@ -16,11 +16,6 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -%define MAJOR_VERSION 5 -%define MINOR_VERSION 2 - -%define _libvrs %{MAJOR_VERSION}_%{MINOR_VERSION} -%define _product %(x86_64-w64-mingw32-pkg-config --variable=product_name lib3270) %define __strip %{_mingw64_strip} %define __objdump %{_mingw64_objdump} @@ -33,8 +28,14 @@ #---[ Main package ]-------------------------------------------------------------------------------------------------- Summary: 3270 Virtual Terminal for GTK -Name: mingw64-libv3270-%{_libvrs} +Name: mingw64-libv3270 Version: 5.2 + +%define MAJOR_VERSION %(echo %{version} | cut -d. -f1) +%define MINOR_VERSION %(echo %{version} | cut -d. -f2) +%define _libvrs %{MAJOR_VERSION}_%{MINOR_VERSION} +%define _product %(x86_64-w64-mingw32-pkg-config --variable=product_name lib3270) + Release: 0 License: GPL-2.0 @@ -45,11 +46,7 @@ Url: https://github.com/PerryWerneck/libv3270.git Group: Development/Libraries/C and C++ BuildRoot: /var/tmp/%{name}-%{version} -Provides: mingw64-libv3270 -Conflicts: otherproviders(mingw64-libv3270) - Provides: mingw64(lib:v3270) -Provides: mingw64(lib:v3270-%{_libvrs}) BuildRequires: autoconf BuildRequires: automake -- libgit2 0.21.2