Commit 695ba922 authored by Adam Knapp's avatar Adam Knapp
Browse files

Eliminating product numbering, updating version



Change-Id: Ic19c2fce15afc9a027997dd3a1e3176a30ab1b5d
Signed-off-by: default avatarAdam Knapp <adam.knapp@sigmatechnology.se>
parent cca52964
......@@ -25,7 +25,7 @@
/* Version numbers */
#define TTCN3_MAJOR 7
#define TTCN3_MINOR 2
#define TTCN3_PATCHLEVEL 0 //0-> x=A, 1-> x=B, ...
#define TTCN3_PATCHLEVEL 1 //0-> x=A, 1-> x=B, ...
//#define TTCN3_BUILDNUMBER 0 //0=R5x, 1=R5x01, 2=R5x02, ...
/* The aggregated version number must be set manually since some stupid
......@@ -38,7 +38,7 @@
* TTCN3_VERSION = TTCN3_MAJOR * 1000000 + TTCN3_MINOR * 10000 +
* TTCN3_PATCHLEVEL * 100 + TTCN3_BUILDNUMBER
*/
#define TTCN3_VERSION 70200
#define TTCN3_VERSION 70201
/* A monotonically increasing version number.
* An official release is deemed to have the highest possible build number (99)
......
......@@ -34,15 +34,16 @@
# define VERSION_STRING GEN_VER(TTCN3_MAJOR, TTCN3_MINOR, TTCN3_PATCHLEVEL, \
TTCN3_BUILDNUMBER)
#else
/* stable release, e.g. "1.4.pl3" */
/* stable release, e.g. "7.2.1" or "1.4.pl3" */
# define GEN_VER3(major, minor, patchlevel) #major "." #minor "." #patchlevel
# define GEN_VER2(major, minor, patchlevel) #major "." #minor ".pl" #patchlevel
# define GEN_VER(major, minor, patchlevel) GEN_VER2(major, minor, patchlevel)
# define GEN_VER(major, minor, patchlevel) GEN_VER3(major, minor, patchlevel)
# define VERSION_STRING GEN_VER(TTCN3_MAJOR, TTCN3_MINOR, TTCN3_PATCHLEVEL)
#endif
/* Product number */
#define PRODNR_EXECUTOR "CAX 105 7730"
#define LEGACY_PRODNR_EXECUTOR "CRL 113 200"
#define LEGACY_CAX_PRODNR_EXECUTOR "CAX 105 7730"
#define LEGACY_CRL_PRODNR_EXECUTOR "CRL 113 200"
/* Ericsson (legacy) revision: /m Rnx
* m = TTCN3_MAJOR
......@@ -120,11 +121,13 @@
#define LEGACY_VERSION "/" MAJOR_SUFFIX " R" MINOR_NUMBER PATCH_LETTER \
DOUBLEDIGIT_BUILDNUMBER
#define LEGACY_PRODUCT_NUMBER LEGACY_PRODNR_EXECUTOR LEGACY_VERSION
#define LEGACY_CRL_PRODUCT_NUMBER LEGACY_CRL_PRODNR_EXECUTOR LEGACY_VERSION
#define PRODUCT_NUMBER MAJOR_SUFFIX "/" PRODNR_EXECUTOR " R" MINOR_NUMBER PATCH_LETTER \
#define LEGACY_CAX_PRODUCT_NUMBER MAJOR_SUFFIX "/" LEGACY_CAX_PRODNR_EXECUTOR " R" MINOR_NUMBER PATCH_LETTER \
DOUBLEDIGIT_BUILDNUMBER
#define PRODUCT_NUMBER VERSION_STRING
/* Version of the C/C++ compiler */
#if defined(__GNUC__)
......
......@@ -972,7 +972,6 @@ int main(int argc, char *argv[])
if (vflag) {
fputs("TTCN-3 and ASN.1 Compiler for the TTCN-3 Test Executor\n"
"Product number: " PRODUCT_NUMBER "\n"
"Version: " VERSION_STRING "\n"
"Build date: " __DATE__ " " __TIME__ "\n"
"Compiled with: " C_COMPILER_VERSION "\n", stderr);
......
......@@ -5317,7 +5317,6 @@ int main(int argc, char *argv[])
if (vflag) {
fputs("Makefile Generator for the TTCN-3 Test Executor\n"
"Product number: " PRODUCT_NUMBER "\n"
"Version: " VERSION_STRING "\n"
"Build date: " __DATE__ " " __TIME__ "\n"
"Compiled with: " C_COMPILER_VERSION "\n\n"
......
......@@ -264,7 +264,7 @@ int Tcov2Lcov::generate()
static void print_version()
{
std::cerr << "Product number: " << PRODUCT_NUMBER << std::endl
std::cerr << "Version: " << VERSION_STRING << std::endl
<< "Build date: " << __DATE__ << " " << __TIME__ << std::endl
<< "Compiled with: " << C_COMPILER_VERSION << std::endl << std::endl
<< COPYRIGHT_STRING << std::endl << std::endl;
......
......@@ -3027,12 +3027,12 @@ namespace Ttcn {
prod_match = (0 == strcmp(m->product_number, exp_product_number));
}
else if (legacy == TTRUE && m->legacy_version == TFALSE) {
prod_match = (0 == strcmp(exp_product_number, LEGACY_PRODNR_EXECUTOR) &&
0 == strcmp(m->product_number, PRODNR_EXECUTOR));
prod_match = (0 == strcmp(exp_product_number, LEGACY_CRL_PRODNR_EXECUTOR) &&
0 == strcmp(m->product_number, LEGACY_CAX_PRODNR_EXECUTOR));
}
else if (legacy == TFALSE && m->legacy_version == TTRUE) {
prod_match = (0 == strcmp(exp_product_number, PRODNR_EXECUTOR) &&
0 == strcmp(m->product_number, LEGACY_PRODNR_EXECUTOR));
prod_match = (0 == strcmp(exp_product_number, LEGACY_CAX_PRODNR_EXECUTOR) &&
0 == strcmp(m->product_number, LEGACY_CRL_PRODNR_EXECUTOR));
}
if (!prod_match) {
char *req_product_identifier =
......@@ -3102,8 +3102,8 @@ namespace Ttcn {
char* exp_extra;
tribool legacy;
(void)ex.get_id(exp_product_number, exp_suffix, exp_minor, exp_patch, exp_build, exp_extra, legacy);
if (exp_product_number != NULL && ((legacy != TTRUE && strcmp(exp_product_number, PRODNR_EXECUTOR) != 0) ||
(legacy == TTRUE && strcmp(exp_product_number, LEGACY_PRODNR_EXECUTOR) != 0))) {
if (exp_product_number != NULL && ((legacy != TTRUE && strcmp(exp_product_number, LEGACY_CAX_PRODNR_EXECUTOR) != 0) ||
(legacy == TTRUE && strcmp(exp_product_number, LEGACY_CRL_PRODNR_EXECUTOR) != 0))) {
ex.error("This module needs to be compiled with TITAN, but "
" product number %s is not TITAN"
, exp_product_number);
......@@ -3119,7 +3119,7 @@ namespace Ttcn {
get_product_identifier(exp_product_number, exp_suffix, exp_minor, exp_patch, exp_build, NULL, legacy);
ex.error("This module needs to be compiled with TITAN version"
" %s or higher; version %s detected"
, exp_product_identifier, legacy == TTRUE ? LEGACY_PRODUCT_NUMBER : PRODUCT_NUMBER);
, exp_product_identifier, legacy == TTRUE ? LEGACY_CRL_PRODUCT_NUMBER : LEGACY_CAX_PRODUCT_NUMBER);
Free(exp_product_identifier);
}
multi->delete_element(i--);
......
......@@ -173,7 +173,6 @@ static boolean process_options(int argc, char *argv[], int& ret_val,
} else if (vflag) {
// version printout
fputs("TTCN-3 Host Controller (parallel mode)\n"
"Product number: " PRODUCT_NUMBER "\n"
"Version: " VERSION_STRING "\n"
"Build date (Base Library): " __DATE__ " " __TIME__ "\n"
"Base Library was compiled with: " C_COMPILER_VERSION "\n\n"
......
......@@ -153,7 +153,6 @@ int main(int argc, char* argv[])
}
else {
fputs("Profiler and Code Coverage Merge Tool for the TTCN-3 Test Executor\n"
"Product number: " PRODUCT_NUMBER "\n"
"Version: " VERSION_STRING "\n"
"Build date: " __DATE__ " " __TIME__ "\n"
"Compiled with: " C_COMPILER_VERSION "\n\n"
......
......@@ -183,7 +183,6 @@ int main(int argc, char *argv[])
return ret_val;
} else if (vflag) {
fputs("TTCN-3 Test Executor (single mode)\n"
"Product number: " PRODUCT_NUMBER "\n"
"Version: " VERSION_STRING "\n"
"Build date (Base Library): " __DATE__ " " __TIME__ "\n"
"Base Library was compiled with: " C_COMPILER_VERSION "\n\n"
......
......@@ -273,7 +273,7 @@ int main(int argc, char *argv[])
"(CLI)"
#endif
" for the TTCN-3 Test Executor\n"
"Product number: " PRODUCT_NUMBER "\n"
"Version: " VERSION_STRING "\n"
"Build date: " __DATE__ " " __TIME__ "\n"
"Compiled with: " C_COMPILER_VERSION "\n", stderr);
fputs("Using ", stderr);
......
......@@ -249,7 +249,6 @@ int main(int argc,char *argv[])
return EXIT_FAILURE;
} else if (vflag) {
fputs("Log Filter for the TTCN-3 Test Executor\n"
"Product number: " PRODUCT_NUMBER "\n"
"Version: " VERSION_STRING "\n"
"Build date: " __DATE__ " " __TIME__ "\n"
"Compiled with: " C_COMPILER_VERSION "\n\n"
......
......@@ -504,7 +504,6 @@ int main(int argc, char *argv[])
return EXIT_FAILURE;
} else if (vflag) {
fputs("Log Formatter for the TTCN-3 Test Executor\n"
"Product number: " PRODUCT_NUMBER "\n"
"Version: " VERSION_STRING "\n"
"Build date: " __DATE__ " " __TIME__ "\n"
"Compiled with: " C_COMPILER_VERSION "\n\n"
......
......@@ -618,7 +618,6 @@ int main(int argc,char *argv[])
if(oflag&&vflag){Usage();return 0;}/*both switches are used*/
if(vflag) {
fputs("Log Merger for the TTCN-3 Test Executor\n"
"Product number: " PRODUCT_NUMBER "\n"
"Version: " VERSION_STRING "\n"
"Build date: " __DATE__ " " __TIME__ "\n"
"Compiled with: " C_COMPILER_VERSION "\n\n"
......
......@@ -150,7 +150,7 @@ int main ( int argc, char *argv[] )
{
fputs("HTML Report Generator for the TTCN-3 Test Executor\n"
"Product number: " PRODUCT_NUMBER "\n"
"Version: " VERSION_STRING "\n"
"Build date: " __DATE__ " " __TIME__ "\n"
"Compiled with: " C_COMPILER_VERSION "\n\n"
COPYRIGHT_STRING "\n\n"
......
......@@ -276,8 +276,7 @@ static void printUsage(const char * argv0) {
}
static void printVersion() {
fputs("Product number: " PRODUCT_NUMBER "\n"
"Version: " VERSION_STRING "\n"
fputs("Version: " VERSION_STRING "\n"
"Build date: " __DATE__ " " __TIME__ "\n"
"Compiled with: " C_COMPILER_VERSION "\n\n"
COPYRIGHT_STRING "\n\n", stderr);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment