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