Commit 4e52a160c73905a2c0412afb6ab26daf0eb7f7d7

Authored by Perry Werneck
1 parent 8f5abc8e

Setting version strings from configure.

configure.ac
... ... @@ -201,12 +201,12 @@ rpq_revision=`$date +"%Y%m%d"`
201 201 sccs_date=`$date +%Y/%m/%d`
202 202 sccs_user=$USER
203 203  
204   -AC_SUBST(RPQ_BUILD_DATE,$rpq_build_date)
205   -AC_SUBST(RPQ_TIMESTAMP,$rpq_timestamp)
206   -AC_SUBST(RPQ_REVISION,$rpq_revision)
  204 +AC_DEFINE_UNQUOTED(RPQ_BUILD_DATE,"$rpq_build_date")
  205 +AC_DEFINE_UNQUOTED(RPQ_TIMESTAMP_VALUE,"$rpq_timestamp")
  206 +AC_DEFINE_UNQUOTED(RPQ_REVISION,"$rpq_revision")
207 207  
208   -AC_SUBST(SCCS_USER,$USER)
209   -AC_SUBST(SCCS_DATE,$sccs_date)
  208 +AC_DEFINE_UNQUOTED(SCCS_USER,"$USER")
  209 +AC_DEFINE_UNQUOTED(SCCS_DATE,"$sccs_date")
210 210  
211 211 dnl ---------------------------------------------------------------------------
212 212 dnl Check for libintl
... ... @@ -665,8 +665,6 @@ AC_SUBST(INSTALL_PACKAGES)
665 665 AC_CONFIG_FILES(Makefile)
666 666 AC_CONFIG_FILES(locale/Makefile)
667 667  
668   -AC_CONFIG_FILES(src/core/version.c)
669   -
670 668 AC_CONFIG_FILES(sdk/lib3270.pc)
671 669 AC_CONFIG_FILES(sdk/lib3270-static.pc)
672 670  
... ...
src/core/properties/unsigned.c
... ... @@ -178,8 +178,4 @@ static unsigned int lib3270_get_host_type_number(const H3270 *hSession)
178 178 return properties;
179 179 }
180 180  
181   - LIB3270_EXPORT const char * lib3270_get_build_rpq_timestamp(void)
182   - {
183   - return build_rpq_timestamp;
184   - }
185 181  
... ...
src/core/rpq.c
... ... @@ -199,26 +199,26 @@ void do_qr_rpqnames(H3270 *hSession)
199 199 break;
200 200  
201 201 case RPQ_VERSION: /* program version */
202   - x = strlen(build_rpq_version);
  202 + x = strlen(PACKAGE_VERSION);
203 203 omit_due_space_limit = (x > remaining);
204 204 if (!omit_due_space_limit)
205 205 {
206 206 for (i = 0; i < x; i++)
207 207 {
208   - *hSession->output.ptr++ = hSession->charset.asc2ebc[(int)(*(build_rpq_version+i) & 0xff)];
  208 + *hSession->output.ptr++ = hSession->charset.asc2ebc[(int)(*(PACKAGE_VERSION+i) & 0xff)];
209 209 }
210 210 }
211 211 break;
212 212  
213 213 case RPQ_TIMESTAMP: /* program build time (yyyymmddhhmmss bcd) */
214   - x = strlen(build_rpq_timestamp);
  214 + x = strlen(RPQ_TIMESTAMP_VALUE);
215 215 omit_due_space_limit = ((x+1)/2 > remaining) ? 1 : 0;
216 216 if (!omit_due_space_limit)
217 217 {
218 218 for (i=0; i < x; i+=2)
219 219 {
220   - *hSession->output.ptr++ = ((*(build_rpq_timestamp+i) - '0') << 4)
221   - + (*(build_rpq_timestamp+i+1) - '0');
  220 + *hSession->output.ptr++ = ((*(RPQ_TIMESTAMP_VALUE+i) - '0') << 4)
  221 + + (*(RPQ_TIMESTAMP_VALUE+i+1) - '0');
222 222 }
223 223 }
224 224 break;
... ...
src/core/util.c
... ... @@ -357,12 +357,17 @@ LIB3270_EXPORT void * lib3270_strdup(const char *str)
357 357  
358 358 LIB3270_EXPORT const char * lib3270_get_version(void)
359 359 {
360   - return build_rpq_version;
  360 + return PACKAGE_VERSION;
361 361 }
362 362  
363 363 LIB3270_EXPORT const char * lib3270_get_revision(void)
364 364 {
365   - return build_rpq_revision;
  365 + return RPQ_REVISION;
  366 +}
  367 +
  368 +LIB3270_EXPORT const char * lib3270_get_build_rpq_timestamp(void)
  369 +{
  370 + return RPQ_TIMESTAMP_VALUE;
366 371 }
367 372  
368 373 void lib3270_popup_an_errno(H3270 *hSession, int errn, const char *fmt, ...)
... ...
src/core/version.c.in
... ... @@ -1,8 +0,0 @@
1   -char *build = "@PACKAGE_TARNAME@ v@PACKAGE_VERSION@ @RPQ_BUILD_DATE@ @SCCS_USER@";
2   -char *app_defaults_version = "@PACKAGE_VERSION@";
3   -char *sccsid = "@(#)@PACKAGE_TARNAME@ v@PACKAGE_VERSION@ @SCCS_DATE@ @SCCS_USER@";
4   -
5   -const char *build_rpq_timestamp = "@RPQ_TIMESTAMP@";
6   -const char *build_rpq_version = "@PACKAGE_VERSION@";
7   -const char *build_rpq_revision = "@RPQ_REVISION@";
8   -
src/include/config.h.in
... ... @@ -39,6 +39,12 @@
39 39 #undef LIB3270_NAME
40 40 #undef GETTEXT_PACKAGE
41 41  
  42 + #undef RPQ_BUILD_DATE
  43 + #undef RPQ_TIMESTAMP_VALUE
  44 + #undef RPQ_REVISION
  45 + #undef SCCS_USER
  46 + #undef SCCS_DATE
  47 +
42 48 /* Default settings */
43 49  
44 50 /** @brief The lib3270's default host URL */
... ...
src/include/internals.h
... ... @@ -136,12 +136,14 @@ enum iaction {
136 136 };
137 137  
138 138 // Version strings
  139 +/*
139 140 LIB3270_INTERNAL const char * build;
140 141 LIB3270_INTERNAL const char * app_defaults_version;
141 142 LIB3270_INTERNAL const char * sccsid;
142 143 LIB3270_INTERNAL const char * build_rpq_timestamp;
143 144 LIB3270_INTERNAL const char * build_rpq_version;
144 145 LIB3270_INTERNAL const char * build_rpq_revision;
  146 +*/
145 147  
146 148 #if defined(X3270_DBCS) /*[*/
147 149 LIB3270_INTERNAL Boolean dbcs;
... ...