Commit 774480e6a179cfea34e9816a980c74afe535fd42
1 parent
e16889eb
Exists in
master
Updating java plugin and extension module.
Showing
6 changed files
with
58 additions
and
12 deletions
Show diff stats
README.md
1 | +Java tn3270 protocol library | ||
2 | +============================ | ||
1 | 3 | ||
2 | -Java support for pw3270 | 4 | +Created originally as part of PW3270 application. |
3 | 5 | ||
4 | -Includes a plugin module for java plugins in pw3270 and a jar file allowing use of lib3270 or pw3270 directly from java applications. | 6 | +See more details at https://softwarepublico.gov.br/social/pw3270/ |
5 | 7 | ||
8 | +Installation repositories | ||
9 | +========================= | ||
10 | + | ||
11 | + You can find instalation repositories in SuSE Build Service: | ||
12 | + | ||
13 | + * Linux (Many distributions): | ||
6 | 14 |
configure.ac
@@ -296,7 +296,7 @@ dnl --------------------------------------------------------------------------- | @@ -296,7 +296,7 @@ dnl --------------------------------------------------------------------------- | ||
296 | dnl Check for PW3270 | 296 | dnl Check for PW3270 |
297 | dnl --------------------------------------------------------------------------- | 297 | dnl --------------------------------------------------------------------------- |
298 | 298 | ||
299 | -PKG_CHECK_MODULES( [PW3270], [pw3270], AC_DEFINE(HAVE_PW3270), AC_MSG_ERROR([Can't find lib3270 devel.])) | 299 | +PKG_CHECK_MODULES( [PW3270], [pw3270], AC_DEFINE(HAVE_PW3270), AC_MSG_ERROR([Can't find pw3270 devel.])) |
300 | AC_SUBST(PW3270_LIBS) | 300 | AC_SUBST(PW3270_LIBS) |
301 | AC_SUBST(PW3270_CFLAGS) | 301 | AC_SUBST(PW3270_CFLAGS) |
302 | 302 |
@@ -0,0 +1,34 @@ | @@ -0,0 +1,34 @@ | ||
1 | +#!/bin/bash | ||
2 | +# | ||
3 | +# https://help.github.com/articles/syncing-a-fork/ | ||
4 | +# | ||
5 | +# https://help.github.com/articles/configuring-a-remote-for-a-fork/ | ||
6 | +# | ||
7 | +# https://www.opentechguides.com/how-to/article/git/177/git-sync-repos.html | ||
8 | +# | ||
9 | +# Setup: | ||
10 | +# | ||
11 | +# git remote add github https://github.com/PerryWerneck/lib3270.git | ||
12 | +# | ||
13 | +# | ||
14 | + | ||
15 | +if [ -z ${1} ]; then | ||
16 | + echo "Inform target tag" | ||
17 | + exit -1 | ||
18 | +fi | ||
19 | + | ||
20 | +git push | ||
21 | + | ||
22 | +git fetch origin | ||
23 | +git checkout master | ||
24 | +git merge origin/master | ||
25 | + | ||
26 | +git tag -f ${1} | ||
27 | +git push -f --tags | ||
28 | + | ||
29 | +for repo in $(git remote -v | grep -v origin | grep "(push)" | awk '{print $1}') | ||
30 | +do | ||
31 | + echo "Updating ${repo} ..." | ||
32 | + git push ${repo} -f --tags | ||
33 | +done | ||
34 | + |
src/plugin/call.cc
@@ -32,7 +32,7 @@ | @@ -32,7 +32,7 @@ | ||
32 | #include <lib3270.h> | 32 | #include <lib3270.h> |
33 | #include <lib3270/trace.h> | 33 | #include <lib3270/trace.h> |
34 | #include <lib3270/log.h> | 34 | #include <lib3270/log.h> |
35 | - #include <pw3270/v3270.h> | 35 | + #include <v3270.h> |
36 | 36 | ||
37 | using PW3270_NAMESPACE::exception; | 37 | using PW3270_NAMESPACE::exception; |
38 | 38 | ||
@@ -51,7 +51,7 @@ void call(GtkWidget *widget, const char *classname) { | @@ -51,7 +51,7 @@ void call(GtkWidget *widget, const char *classname) { | ||
51 | 51 | ||
52 | if(jvm || load_jvm(widget)) { | 52 | if(jvm || load_jvm(widget)) { |
53 | 53 | ||
54 | - v3270_set_script(widget,'J',TRUE); | 54 | + v3270_set_script(widget,'J'); |
55 | 55 | ||
56 | try { | 56 | try { |
57 | 57 | ||
@@ -118,7 +118,7 @@ void call(GtkWidget *widget, const char *classname) { | @@ -118,7 +118,7 @@ void call(GtkWidget *widget, const char *classname) { | ||
118 | 118 | ||
119 | } | 119 | } |
120 | 120 | ||
121 | - v3270_set_script(widget,'J',FALSE); | 121 | + v3270_set_script(widget,0); |
122 | 122 | ||
123 | } | 123 | } |
124 | 124 |
src/plugin/plugin.cc
@@ -51,12 +51,12 @@ | @@ -51,12 +51,12 @@ | ||
51 | 51 | ||
52 | #include <pw3270.h> | 52 | #include <pw3270.h> |
53 | #include <pw3270/plugin.h> | 53 | #include <pw3270/plugin.h> |
54 | - #include <pw3270/v3270.h> | 54 | + #include <v3270.h> |
55 | #include <lib3270/actions.h> | 55 | #include <lib3270/actions.h> |
56 | #include <lib3270/log.h> | 56 | #include <lib3270/log.h> |
57 | #include <lib3270/trace.h> | 57 | #include <lib3270/trace.h> |
58 | #include <lib3270/charset.h> | 58 | #include <lib3270/charset.h> |
59 | - #include <pw3270/trace.h> | 59 | + #include <lib3270/trace.h> |
60 | 60 | ||
61 | 61 | ||
62 | /*--[ Globals ]--------------------------------------------------------------------------------------*/ | 62 | /*--[ Globals ]--------------------------------------------------------------------------------------*/ |
src/plugin/startstop.cc
@@ -50,26 +50,28 @@ | @@ -50,26 +50,28 @@ | ||
50 | 50 | ||
51 | #include <pw3270.h> | 51 | #include <pw3270.h> |
52 | #include <pw3270/plugin.h> | 52 | #include <pw3270/plugin.h> |
53 | - #include <pw3270/v3270.h> | 53 | + #include <v3270.h> |
54 | #include <lib3270/actions.h> | 54 | #include <lib3270/actions.h> |
55 | #include <lib3270/log.h> | 55 | #include <lib3270/log.h> |
56 | #include <lib3270/trace.h> | 56 | #include <lib3270/trace.h> |
57 | #include <lib3270/charset.h> | 57 | #include <lib3270/charset.h> |
58 | #include <pw3270cpp.h> | 58 | #include <pw3270cpp.h> |
59 | - #include <pw3270/trace.h> | 59 | + #include <lib3270/trace.h> |
60 | 60 | ||
61 | /*---[ Implement ]----------------------------------------------------------------------------------*/ | 61 | /*---[ Implement ]----------------------------------------------------------------------------------*/ |
62 | 62 | ||
63 | extern "C" { | 63 | extern "C" { |
64 | 64 | ||
65 | + /* | ||
65 | static void trace_cleanup(GtkWidget *widget, GtkWidget **window) { | 66 | static void trace_cleanup(GtkWidget *widget, GtkWidget **window) { |
66 | *window = NULL; | 67 | *window = NULL; |
67 | } | 68 | } |
69 | + */ | ||
68 | 70 | ||
69 | static jint JNICALL jni_vfprintf(FILE *fp, const char *fmt, va_list args) { | 71 | static jint JNICALL jni_vfprintf(FILE *fp, const char *fmt, va_list args) { |
70 | 72 | ||
71 | char * msg = NULL; | 73 | char * msg = NULL; |
72 | - static GtkWidget * trace = NULL; | 74 | +// static GtkWidget * trace = NULL; |
73 | 75 | ||
74 | if(vasprintf(&msg,fmt,args) < 1) { | 76 | if(vasprintf(&msg,fmt,args) < 1) { |
75 | lib3270_write_log(lib3270_get_default_session_handle(),"java","vasprintf() error on \"%s\"",fmt); | 77 | lib3270_write_log(lib3270_get_default_session_handle(),"java","vasprintf() error on \"%s\"",fmt); |
@@ -79,9 +81,10 @@ extern "C" { | @@ -79,9 +81,10 @@ extern "C" { | ||
79 | fprintf(fp,"%s",msg); | 81 | fprintf(fp,"%s",msg); |
80 | lib3270_write_log(lib3270_get_default_session_handle(),"java","%s",msg); | 82 | lib3270_write_log(lib3270_get_default_session_handle(),"java","%s",msg); |
81 | 83 | ||
84 | + /* | ||
82 | if(!trace) { | 85 | if(!trace) { |
83 | // Cria janela de trace. | 86 | // Cria janela de trace. |
84 | - trace = pw3270_trace_new(); | 87 | + trace = v3270_trace_new(); |
85 | g_signal_connect(G_OBJECT(trace), "destroy",G_CALLBACK(trace_cleanup), &trace); | 88 | g_signal_connect(G_OBJECT(trace), "destroy",G_CALLBACK(trace_cleanup), &trace); |
86 | 89 | ||
87 | pw3270_trace_set_destroy_on_close(trace,TRUE); | 90 | pw3270_trace_set_destroy_on_close(trace,TRUE); |
@@ -96,6 +99,7 @@ extern "C" { | @@ -96,6 +99,7 @@ extern "C" { | ||
96 | 99 | ||
97 | free(msg); | 100 | free(msg); |
98 | } | 101 | } |
102 | + */ | ||
99 | 103 | ||
100 | return 0; | 104 | return 0; |
101 | } | 105 | } |