Commit af6fbcf8496dd1901fffb131afb2fa61ebbae592

Authored by perry.werneck@gmail.com
1 parent b2eb2a7a

Trabalhando na versão android

@@ -157,7 +157,6 @@ @@ -157,7 +157,6 @@
157 <Unit filename="src/lib3270/rpq.c"> 157 <Unit filename="src/lib3270/rpq.c">
158 <Option compilerVar="CC" /> 158 <Option compilerVar="CC" />
159 </Unit> 159 </Unit>
160 - <Unit filename="src/lib3270/rpq.h" />  
161 <Unit filename="src/lib3270/savec.h" /> 160 <Unit filename="src/lib3270/savec.h" />
162 <Unit filename="src/lib3270/screen.c"> 161 <Unit filename="src/lib3270/screen.c">
163 <Option compilerVar="CC" /> 162 <Option compilerVar="CC" />
src/android/src/br/com/bb/pw3270/lib3270.java
@@ -4,7 +4,7 @@ public class lib3270 { @@ -4,7 +4,7 @@ public class lib3270 {
4 4
5 static 5 static
6 { 6 {
7 - System.loadLibrary("3270jni"); 7 + System.loadLibrary("3270");
8 } 8 }
9 9
10 /** 10 /**
src/include/lib3270.h
@@ -786,6 +786,10 @@ @@ -786,6 +786,10 @@
786 */ 786 */
787 LIB3270_EXPORT char * lib3270_get_resource_string(const char *first_element, ...); 787 LIB3270_EXPORT char * lib3270_get_resource_string(const char *first_element, ...);
788 788
  789 + LIB3270_EXPORT const char * lib3270_get_version(void);
  790 + LIB3270_EXPORT const char * lib3270_get_revision(void);
  791 +
  792 +
789 793
790 #ifdef __cplusplus 794 #ifdef __cplusplus
791 } 795 }
src/lib3270/globals.h
@@ -171,12 +171,16 @@ extern H3270 h3270; @@ -171,12 +171,16 @@ extern H3270 h3270;
171 LIB3270_INTERNAL XtAppContext appcontext; 171 LIB3270_INTERNAL XtAppContext appcontext;
172 #endif /*]*/ 172 #endif /*]*/
173 173
174 -LIB3270_INTERNAL const char *build;  
175 -LIB3270_INTERNAL const char *build_rpq_timestamp;  
176 -LIB3270_INTERNAL const char *build_rpq_version;  
177 -LIB3270_INTERNAL int children;  
178 -// LIB3270_INTERNAL char *current_host;  
179 -// LIB3270_INTERNAL unsigned short current_port; 174 +
  175 +// Version strings
  176 +LIB3270_INTERNAL const char * build;
  177 +LIB3270_INTERNAL const char * app_defaults_version;
  178 +LIB3270_INTERNAL const char * sccsid;
  179 +LIB3270_INTERNAL const char * build_rpq_timestamp;
  180 +LIB3270_INTERNAL const char * build_rpq_version;
  181 +LIB3270_INTERNAL const char * build_rpq_revision;
  182 +
  183 +LIB3270_INTERNAL int children;
180 184
181 #if defined(X3270_DBCS) /*[*/ 185 #if defined(X3270_DBCS) /*[*/
182 LIB3270_INTERNAL Boolean dbcs; 186 LIB3270_INTERNAL Boolean dbcs;
src/lib3270/sources.mak
@@ -26,9 +26,10 @@ @@ -26,9 +26,10 @@
26 26
27 # Terminal only sources 27 # Terminal only sources
28 TERMINAL_SOURCES = bounds.c XtGlue.c ctlr.c util.c toggles.c screen.c selection.c kybd.c telnet.c \ 28 TERMINAL_SOURCES = bounds.c XtGlue.c ctlr.c util.c toggles.c screen.c selection.c kybd.c telnet.c \
29 - host.c sf.c ansi.c log.c resolver.c xio.c tables.c proxy.c utf8.c charset.c 29 + host.c sf.c ansi.c log.c resolver.c xio.c tables.c proxy.c utf8.c charset.c \
  30 + version.c
30 31
31 # Full library sources 32 # Full library sources
32 SOURCES = $(TERMINAL_SOURCES) init.c actions.c ft.c ft_cut.c ft_dft.c glue.c resources.c \ 33 SOURCES = $(TERMINAL_SOURCES) init.c actions.c ft.c ft_cut.c ft_dft.c glue.c resources.c \
33 - rpq.c see.c trace_ds.c paste.c macros.c fallbacks.c version.c 34 + rpq.c see.c trace_ds.c paste.c macros.c fallbacks.c
34 35
src/lib3270/util.c
@@ -1151,10 +1151,12 @@ void * Calloc(size_t nelem, size_t elsize) @@ -1151,10 +1151,12 @@ void * Calloc(size_t nelem, size_t elsize)
1151 1151
1152 LIB3270_EXPORT char * lib3270_get_resource_string(const char *first_element, ...) 1152 LIB3270_EXPORT char * lib3270_get_resource_string(const char *first_element, ...)
1153 { 1153 {
1154 -#ifndef ANDROID 1154 +#ifdef ANDROID
1155 1155
1156 #warning Work in progress 1156 #warning Work in progress
1157 1157
  1158 +#else
  1159 +
1158 char buffer[4096]; 1160 char buffer[4096];
1159 char * ptr = buffer; 1161 char * ptr = buffer;
1160 const char * element; 1162 const char * element;
@@ -1184,3 +1186,13 @@ LIB3270_EXPORT char * lib3270_get_resource_string(const char *first_element, ... @@ -1184,3 +1186,13 @@ LIB3270_EXPORT char * lib3270_get_resource_string(const char *first_element, ...
1184 #endif 1186 #endif
1185 return NULL; 1187 return NULL;
1186 } 1188 }
  1189 +
  1190 +LIB3270_EXPORT const char * lib3270_get_version(void)
  1191 +{
  1192 + return build_rpq_version;
  1193 +}
  1194 +
  1195 +LIB3270_EXPORT const char * lib3270_get_revision(void)
  1196 +{
  1197 + return build_rpq_revision;
  1198 +}