Commit af6fbcf8496dd1901fffb131afb2fa61ebbae592
1 parent
b2eb2a7a
Exists in
master
and in
5 other branches
Trabalhando na versão android
Showing
6 changed files
with
31 additions
and
11 deletions
Show diff stats
pw3270.cbp
| ... | ... | @@ -157,7 +157,6 @@ |
| 157 | 157 | <Unit filename="src/lib3270/rpq.c"> |
| 158 | 158 | <Option compilerVar="CC" /> |
| 159 | 159 | </Unit> |
| 160 | - <Unit filename="src/lib3270/rpq.h" /> | |
| 161 | 160 | <Unit filename="src/lib3270/savec.h" /> |
| 162 | 161 | <Unit filename="src/lib3270/screen.c"> |
| 163 | 162 | <Option compilerVar="CC" /> | ... | ... |
src/android/src/br/com/bb/pw3270/lib3270.java
src/include/lib3270.h
| ... | ... | @@ -786,6 +786,10 @@ |
| 786 | 786 | */ |
| 787 | 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 | 794 | #ifdef __cplusplus |
| 791 | 795 | } | ... | ... |
src/lib3270/globals.h
| ... | ... | @@ -171,12 +171,16 @@ extern H3270 h3270; |
| 171 | 171 | LIB3270_INTERNAL XtAppContext appcontext; |
| 172 | 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 | 185 | #if defined(X3270_DBCS) /*[*/ |
| 182 | 186 | LIB3270_INTERNAL Boolean dbcs; | ... | ... |
src/lib3270/sources.mak
| ... | ... | @@ -26,9 +26,10 @@ |
| 26 | 26 | |
| 27 | 27 | # Terminal only sources |
| 28 | 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 | 32 | # Full library sources |
| 32 | 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 | 1151 | |
| 1152 | 1152 | LIB3270_EXPORT char * lib3270_get_resource_string(const char *first_element, ...) |
| 1153 | 1153 | { |
| 1154 | -#ifndef ANDROID | |
| 1154 | +#ifdef ANDROID | |
| 1155 | 1155 | |
| 1156 | 1156 | #warning Work in progress |
| 1157 | 1157 | |
| 1158 | +#else | |
| 1159 | + | |
| 1158 | 1160 | char buffer[4096]; |
| 1159 | 1161 | char * ptr = buffer; |
| 1160 | 1162 | const char * element; |
| ... | ... | @@ -1184,3 +1186,13 @@ LIB3270_EXPORT char * lib3270_get_resource_string(const char *first_element, ... |
| 1184 | 1186 | #endif |
| 1185 | 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 | +} | ... | ... |