From 96b4279ccdda8c0e7179dd4619cdf8d242c714a3 Mon Sep 17 00:00:00 2001 From: perry.werneck@gmail.com Date: Fri, 11 May 2012 20:27:31 +0000 Subject: [PATCH] Trabalhando na versão android --- globals.h | 16 ++++++++++------ sources.mak | 5 +++-- util.c | 14 +++++++++++++- 3 files changed, 26 insertions(+), 9 deletions(-) diff --git a/globals.h b/globals.h index 99d87a3..f691c54 100644 --- a/globals.h +++ b/globals.h @@ -171,12 +171,16 @@ extern H3270 h3270; LIB3270_INTERNAL XtAppContext appcontext; #endif /*]*/ -LIB3270_INTERNAL const char *build; -LIB3270_INTERNAL const char *build_rpq_timestamp; -LIB3270_INTERNAL const char *build_rpq_version; -LIB3270_INTERNAL int children; -// LIB3270_INTERNAL char *current_host; -// LIB3270_INTERNAL unsigned short current_port; + +// Version strings +LIB3270_INTERNAL const char * build; +LIB3270_INTERNAL const char * app_defaults_version; +LIB3270_INTERNAL const char * sccsid; +LIB3270_INTERNAL const char * build_rpq_timestamp; +LIB3270_INTERNAL const char * build_rpq_version; +LIB3270_INTERNAL const char * build_rpq_revision; + +LIB3270_INTERNAL int children; #if defined(X3270_DBCS) /*[*/ LIB3270_INTERNAL Boolean dbcs; diff --git a/sources.mak b/sources.mak index 91bb58d..4a3b4b7 100644 --- a/sources.mak +++ b/sources.mak @@ -26,9 +26,10 @@ # Terminal only sources TERMINAL_SOURCES = bounds.c XtGlue.c ctlr.c util.c toggles.c screen.c selection.c kybd.c telnet.c \ - host.c sf.c ansi.c log.c resolver.c xio.c tables.c proxy.c utf8.c charset.c + host.c sf.c ansi.c log.c resolver.c xio.c tables.c proxy.c utf8.c charset.c \ + version.c # Full library sources SOURCES = $(TERMINAL_SOURCES) init.c actions.c ft.c ft_cut.c ft_dft.c glue.c resources.c \ - rpq.c see.c trace_ds.c paste.c macros.c fallbacks.c version.c + rpq.c see.c trace_ds.c paste.c macros.c fallbacks.c diff --git a/util.c b/util.c index c8bc989..965ef6f 100644 --- a/util.c +++ b/util.c @@ -1151,10 +1151,12 @@ void * Calloc(size_t nelem, size_t elsize) LIB3270_EXPORT char * lib3270_get_resource_string(const char *first_element, ...) { -#ifndef ANDROID +#ifdef ANDROID #warning Work in progress +#else + char buffer[4096]; char * ptr = buffer; const char * element; @@ -1184,3 +1186,13 @@ LIB3270_EXPORT char * lib3270_get_resource_string(const char *first_element, ... #endif return NULL; } + +LIB3270_EXPORT const char * lib3270_get_version(void) +{ + return build_rpq_version; +} + +LIB3270_EXPORT const char * lib3270_get_revision(void) +{ + return build_rpq_revision; +} -- libgit2 0.21.2