diff --git a/Makefile.in b/Makefile.in index 2ee4dda..83bb06d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -25,7 +25,7 @@ # GLUELIB=@NATIVE_SONAME@ -LIBNAME=tn3270-sharp.dll +LIBNAME=tn3270.dll TESTPROGRAM?=sample #---[ Configuration values ]------------------------------------------------------------- @@ -70,19 +70,30 @@ $(BINDBG)/%.exe: \ src/testprograms/%.cs \ $(BINDBG)/$(LIBNAME) - @$(MCS) -reference:$(BINDBG)/$(LIBNAME) -debug -out:$@ $< + @$(MCS) \ + -reference:$(BINDBG)/$(LIBNAME) \ + -debug \ + -out:$@ \ + $< $(BINDBG)/%.exe: \ src/testprograms/%.vb \ $(BINDBG)/$(LIBNAME) - @$(VBNC) -reference:$(BINDBG)/$(LIBNAME) -debug -out:$@ $< + @$(VBNC) \ + -reference:$(BINDBG)/$(LIBNAME) \ + -debug \ + -out:$@ \ + $< install-%: \ src/%/Makefile \ all - @make -C `dirname $<` DESTDIR=$(DESTDIR) install + @make \ + -C `dirname $<` \ + DESTDIR=$(DESTDIR) \ + install #---[ Release Targets ]------------------------------------------------------------------ @@ -97,13 +108,17 @@ $(BINRLS)/$(GLUELIB): \ src/native/* \ src/native/core/* - @make -C src/native $@ + @make \ + -C src/native \ + $@ $(BINRLS)/$(LIBNAME): \ $(BINRLS)/$(GLUELIB) \ src/core/* - @make -C src/core $@ + @make \ + -C src/core \ + $@ install: \ install-native \ @@ -119,13 +134,17 @@ $(BINDBG)/$(GLUELIB): \ src/native/* \ src/native/core/* - @make -C src/native $@ + @make \ + -C src/native \ + $@ $(BINDBG)/$(LIBNAME): \ $(BINDBG)/$(GLUELIB) \ src/core/* - @make -C src/core $@ + @make \ + -C src/core \ + $@ #---[ Test targets ]--------------------------------------------------------------------- diff --git a/configure.ac b/configure.ac index 4c0fb54..969d3c6 100644 --- a/configure.ac +++ b/configure.ac @@ -165,15 +165,11 @@ AC_SUBST(PACKAGE_MINOR_RELEASE,$app_rls_minor) case "$host" in *-mingw32|*-pc-msys) - AC_SUBST(NATIVE_SONAME,lib3270-mono.dll) - ;; - - s390x-*) - AC_SUBST(NATIVE_SONAME,lib3270-mono.so) + AC_SUBST(NATIVE_SONAME,mono-tn3270.dll) ;; *) - AC_SUBST(NATIVE_SONAME,lib3270-mono.so.$app_vrs_major.$app_vrs_minor) + AC_SUBST(NATIVE_SONAME,mono-tn3270.so.$app_vrs_major.$app_vrs_minor) esac diff --git a/src/core/Makefile.in b/src/core/Makefile.in index 7bf73a2..15aff87 100644 --- a/src/core/Makefile.in +++ b/src/core/Makefile.in @@ -24,7 +24,7 @@ # erico.mendonca@gmail.com (Erico Mascarenhas de Mendonça) # -MODULE_NAME=tn3270-sharp +MODULE_NAME=tn3270 SOURCES=$(MODULE_NAME).cs LIBNAME=$(MODULE_NAME).dll diff --git a/src/core/tn3270.cs b/src/core/tn3270.cs index b408391..b638e29 100644 --- a/src/core/tn3270.cs +++ b/src/core/tn3270.cs @@ -43,114 +43,114 @@ namespace tn3270 { public class Session { /// - /// lib3270 session handle + /// TN3270 Session handle /// private IntPtr hSession; - [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] + [DllImport ("mono-tn3270",CallingConvention=CallingConvention.Cdecl)] extern static IntPtr tn3270_create_session(string name); - [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] + [DllImport ("mono-tn3270",CallingConvention=CallingConvention.Cdecl)] extern static int tn3270_destroy_session(IntPtr session); - [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] + [DllImport ("mono-tn3270",CallingConvention=CallingConvention.Cdecl)] extern static int tn3270_get_version(IntPtr session, StringBuilder str, int strlen); - [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] + [DllImport ("mono-tn3270",CallingConvention=CallingConvention.Cdecl)] extern static int tn3270_get_revision(IntPtr session, StringBuilder str, int strlen); - [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] + [DllImport ("mono-tn3270",CallingConvention=CallingConvention.Cdecl)] extern static int tn3270_connect(IntPtr Session, string host, int wait); - [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] + [DllImport ("mono-tn3270",CallingConvention=CallingConvention.Cdecl)] extern static int tn3270_is_connected(IntPtr Session); - [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] + [DllImport ("mono-tn3270",CallingConvention=CallingConvention.Cdecl)] extern static int tn3270_is_ready(IntPtr Session); - [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] + [DllImport ("mono-tn3270",CallingConvention=CallingConvention.Cdecl)] extern static int tn3270_disconnect(IntPtr Session); - [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] + [DllImport ("mono-tn3270",CallingConvention=CallingConvention.Cdecl)] extern static int tn3270_wait_for_ready(IntPtr Session, int seconds); - [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] + [DllImport ("mono-tn3270",CallingConvention=CallingConvention.Cdecl)] extern static int tn3270_wait(IntPtr Session, int seconds); - [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] + [DllImport ("mono-tn3270",CallingConvention=CallingConvention.Cdecl)] extern static int tn3270_get_cstate(IntPtr Session); - [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] + [DllImport ("mono-tn3270",CallingConvention=CallingConvention.Cdecl)] extern static int tn3270_get_program_message(IntPtr Session); - [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] + [DllImport ("mono-tn3270",CallingConvention=CallingConvention.Cdecl)] extern static int tn3270_get_secure(IntPtr Session); - [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] + [DllImport ("mono-tn3270",CallingConvention=CallingConvention.Cdecl)] extern static int tn3270_get_contents(IntPtr Session, StringBuilder str, int strlen); - [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] + [DllImport ("mono-tn3270",CallingConvention=CallingConvention.Cdecl)] extern static int tn3270_get_string(IntPtr Session, int addr, StringBuilder str, int strlen); - [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] + [DllImport ("mono-tn3270",CallingConvention=CallingConvention.Cdecl)] extern static int tn3270_get_string_at(IntPtr Session, int row, int col, StringBuilder str, int strlen); - [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] + [DllImport ("mono-tn3270",CallingConvention=CallingConvention.Cdecl)] extern static int tn3270_set_string_at(IntPtr Session, int row, int col, string str); - [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] + [DllImport ("mono-tn3270",CallingConvention=CallingConvention.Cdecl)] extern static int tn3270_wait_for_string_at(IntPtr Session, int row, int col, string key, int timeout); - [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] + [DllImport ("mono-tn3270",CallingConvention=CallingConvention.Cdecl)] extern static int tn3270_cmp_string_at(IntPtr Session, int row, int col, string str); - [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] + [DllImport ("mono-tn3270",CallingConvention=CallingConvention.Cdecl)] extern static int tn3270_set_unlock_delay(IntPtr Session, int ms); - [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] + [DllImport ("mono-tn3270",CallingConvention=CallingConvention.Cdecl)] extern static int tn3270_set_cursor_position(IntPtr Session, int row, int col); - [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] + [DllImport ("mono-tn3270",CallingConvention=CallingConvention.Cdecl)] extern static int tn3270_set_cursor_addr(IntPtr Session, int addr); - [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] + [DllImport ("mono-tn3270",CallingConvention=CallingConvention.Cdecl)] extern static int tn3270_get_cursor_addr(IntPtr Session); - [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] + [DllImport ("mono-tn3270",CallingConvention=CallingConvention.Cdecl)] extern static int tn3270_enter(IntPtr Session); - [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] + [DllImport ("mono-tn3270",CallingConvention=CallingConvention.Cdecl)] extern static int tn3270_pfkey(IntPtr Session, int key); - [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] + [DllImport ("mono-tn3270",CallingConvention=CallingConvention.Cdecl)] extern static int tn3270_pakey(IntPtr Session, int key); - [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] + [DllImport ("mono-tn3270",CallingConvention=CallingConvention.Cdecl)] extern static int tn3270_get_width(IntPtr Session); - [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] + [DllImport ("mono-tn3270",CallingConvention=CallingConvention.Cdecl)] extern static int tn3270_get_height(IntPtr Session); - [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] + [DllImport ("mono-tn3270",CallingConvention=CallingConvention.Cdecl)] extern static int tn3270_get_length(IntPtr Session); - [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] + [DllImport ("mono-tn3270",CallingConvention=CallingConvention.Cdecl)] extern static int tn3270_set_charset(IntPtr Session, string str); - [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] + [DllImport ("mono-tn3270",CallingConvention=CallingConvention.Cdecl)] extern static int tn3270_set_url(IntPtr Session, string str); - [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] + [DllImport ("mono-tn3270",CallingConvention=CallingConvention.Cdecl)] extern static int tn3270_get_url(IntPtr Session, StringBuilder str, int strlen); - [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] + [DllImport ("mono-tn3270",CallingConvention=CallingConvention.Cdecl)] extern static int tn3270_set_error_message(IntPtr Session, string str); - [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] + [DllImport ("mono-tn3270",CallingConvention=CallingConvention.Cdecl)] extern static int tn3270_get_error_message(IntPtr Session, StringBuilder str, int strlen); /// - /// Create a new session with lib3270/pw3270 + /// Create a new session with mono-tn327070 /// /// /// Session name or empty string for a hidden session @@ -169,7 +169,7 @@ namespace tn3270 { } /// - /// Get lib3270/pw3270 Version identifier + /// Get mono-tn327070 Version identifier /// /// /// @@ -197,7 +197,7 @@ namespace tn3270 { } /// - /// Get lib3270/pw3270 Revision number + /// Get mono-tn327070 Revision number /// /// /// @@ -595,11 +595,11 @@ namespace tn3270 { } /// - /// Last lib3270 error message + /// Last mono-tn3270r message /// /// /// - /// Last lib3270 error message + /// Last mono-tn3270r message /// /// public string Error { diff --git a/src/native/Makefile.in b/src/native/Makefile.in index c215b0a..3f09e60 100644 --- a/src/native/Makefile.in +++ b/src/native/Makefile.in @@ -26,7 +26,7 @@ #---[ Library configuration ]------------------------------------------------------------ -LIBNAME=lib3270-mono +LIBNAME=mono-tn3270 SONAME=@NATIVE_SONAME@ SOURCES= \ diff --git a/src/native/windows/resources.rc.in b/src/native/windows/resources.rc.in index 23c9947..b6e09d1 100644 --- a/src/native/windows/resources.rc.in +++ b/src/native/windows/resources.rc.in @@ -14,7 +14,7 @@ BEGIN VALUE "CompanyName", "Banco do Brasil S. A.\0" VALUE "FileVersion", "@WIN32_VERSION@\0" VALUE "LegalCopyright", "(C) 2019 Banco do Brasil S. A. All Rights Reserved\0" - VALUE "OriginalFilename", "lib3270-mono-bindings@DLLEXT@\0" + VALUE "OriginalFilename", "mono-tn3270s@DLLEXT@\0" VALUE "ProductName", "@PRODUCT_NAME@\0" VALUE "ProductVersion", "@PACKAGE_MAJOR_VERSION@.@PACKAGE_MINOR_VERSION@.@PACKAGE_MAJOR_RELEASE@.@PACKAGE_MINOR_RELEASE@\0" END diff --git a/src/testprograms/ipc.cs b/src/testprograms/ipc.cs index 0a2ce2e..410af32 100644 --- a/src/testprograms/ipc.cs +++ b/src/testprograms/ipc.cs @@ -27,15 +27,15 @@ * */ -using pw3270; +using tn3270; class ipc { static void Main(string[] args) { - pw3270.Session host = new pw3270.Session("pw3270:A"); + tn3270.Session host = new tn3270.Session(":A"); - System.Console.WriteLine("Using pw3270 version " + host.Version + " revision " + host.Revision); + System.Console.WriteLine("Using tn3270 version " + host.Version + " revision " + host.Revision); System.Console.WriteLine("Screen size is " + host.Width + "x" + host.Height + " (" + host.Length + ")"); // host.CharSet = "ISO-8859-1"; diff --git a/src/testprograms/simple.cs b/src/testprograms/simple.cs index 288ff6a..c84947b 100644 --- a/src/testprograms/simple.cs +++ b/src/testprograms/simple.cs @@ -35,16 +35,16 @@ using System.Runtime.InteropServices; class test { - [DllImport ("lib3270-mono")] + [DllImport ("mono-tn3270")] extern static IntPtr tn3270_create_session(string name); - [DllImport ("lib3270-mono")] + [DllImport ("mono-tn3270")] extern static void tn3270_destroy_session(IntPtr session); - [DllImport ("lib3270-mono")] + [DllImport ("mono-tn3270")] extern static void tn3270_get_version(IntPtr session, StringBuilder str, int strlen); - [DllImport ("lib3270-mono")] + [DllImport ("mono-tn3270")] extern static void tn3270_get_revision(IntPtr session, StringBuilder str, int strlen); static void Main(string[] args) { diff --git a/src/testprograms/vbclass.vb b/src/testprograms/vbclass.vb index ae70eb3..f1914b5 100644 --- a/src/testprograms/vbclass.vb +++ b/src/testprograms/vbclass.vb @@ -32,95 +32,95 @@ Imports System.Runtime.InteropServices Public Class pw3270 - _ + _ Private Shared Function tn3270_create_session(ByVal Name As String) As IntPtr End Function - _ + _ Private Shared Function tn3270_destroy_session(ByVal hSession As IntPtr) as Long End Function - _ + _ Private Shared Function tn3270_get_version(ByVal hSession As IntPtr, ByVal buffer As StringBuilder, ByVal strlen as Integer) as Integer End Function - _ + _ Private Shared Function tn3270_get_revision(ByVal hSession As IntPtr, ByVal buffer As StringBuilder, ByVal strlen as Integer) as Integer End Function - _ + _ Private Shared Function tn3270_connect(ByVal hSession As IntPtr, ByVal buffer As String, ByVal seconds as Integer) as Integer End Function - _ + _ Private Shared Function tn3270_is_connected(ByVal hSession As IntPtr) as Integer End Function - _ + _ Private Shared Function tn3270_disconnect(ByVal hSession As IntPtr) as Integer End Function - _ + _ Private Shared Function tn3270_wait_for_ready(ByVal hSession As IntPtr, ByVal seconds as Integer) as Integer End Function - _ + _ Private Shared Function tn3270_wait(ByVal hSession As IntPtr, ByVal seconds as Integer) as Integer End Function - _ + _ Private Shared Function tn3270_get_cstate(ByVal hSession As IntPtr) as Integer End Function - _ + _ Private Shared Function tn3270_get_program_message(ByVal hSession As IntPtr) as Integer End Function - _ + _ Private Shared Function tn3270_get_secure(ByVal hSession As IntPtr) as Integer End Function - _ + _ Private Shared Function tn3270_get_string(ByVal hSession As IntPtr, ByVal addr as Integer, ByVal buffer As StringBuilder, ByVal strlen as Integer) as Integer End Function - _ + _ Private Shared Function tn3270_get_string_at(ByVal hSession As IntPtr, ByVal row as Integer, ByVal col as Integer, ByVal buffer As StringBuilder, ByVal strlen as Integer) as Integer End Function - _ + _ Private Shared Function tn3270_set_string_at(ByVal hSession As IntPtr, ByVal row as Integer, ByVal col as Integer, ByVal buffer As String) as Integer End Function - _ + _ Private Shared Function tn3270_wait_for_string_at(ByVal hSession As IntPtr, ByVal row as Integer, ByVal col as Integer, ByVal key As String, ByVal timeout as Integer) as Integer End Function - _ + _ Private Shared Function tn3270_cmp_string_at(ByVal hSession As IntPtr, ByVal row as Integer, ByVal col as Integer, ByVal buffer As String) as Integer End Function - _ + _ Private Shared Function tn3270_set_unlock_delay(ByVal hSession As IntPtr, ByVal ms as Integer) as Integer End Function - _ + _ Private Shared Function tn3270_set_cursor_position(ByVal hSession As IntPtr, ByVal row as Integer, ByVal col as Integer) as Integer End Function - _ + _ Private Shared Function tn3270_set_cursor_addr(ByVal hSession As IntPtr, ByVal addr as Integer) as Integer End Function - _ + _ Private Shared Function tn3270_enter(ByVal hSession As IntPtr) as Integer End Function - _ + _ Private Shared Function tn3270_pfkey(ByVal hSession As IntPtr, ByVal key as Integer) as Integer End Function - _ + _ Private Shared Function tn3270_pakey(ByVal hSession As IntPtr, ByVal key as Integer) as Integer End Function diff --git a/src/testprograms/vbsample.vb b/src/testprograms/vbsample.vb index bc03724..9f6ae4a 100644 --- a/src/testprograms/vbsample.vb +++ b/src/testprograms/vbsample.vb @@ -34,7 +34,7 @@ Public Module modmain ' Application's entry point. Sub Main() - dim host as new pw3270.Session("") + dim host as new tn3270.Session("") Console.WriteLine("Using pw3270 version " + host.getVersion() + " revision " + host.GetRevision()) Console.WriteLine("Screen size is " + host.GetWidth() + "x" + host.GetHeigth()) diff --git a/src/testprograms/vbtest.vb b/src/testprograms/vbtest.vb index d96459a..15584a0 100644 --- a/src/testprograms/vbtest.vb +++ b/src/testprograms/vbtest.vb @@ -7,19 +7,19 @@ Imports System.Runtime.InteropServices Public Module modmain - _ + _ Private Shared Function tn3270_create_session(ByVal Name As String) As IntPtr End Function - _ + _ Private Shared Function tn3270_destroy_session(ByVal hSession As IntPtr) as Long End Function - _ + _ Private Shared Function tn3270_get_version(ByVal hSession As IntPtr, ByVal buffer As StringBuilder, ByVal strlen as Integer) as Long End Function - _ + _ Private Shared Function tn3270_get_revision(ByVal hSession As IntPtr, ByVal buffer As StringBuilder, ByVal strlen as Integer) as Long End Function -- libgit2 0.21.2