From 275d2779656fd2dd72762b2eb16a738d1b3b2b18 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Sat, 8 Dec 2018 02:05:34 -0800 Subject: systemc: Fix style issues in the TLM header files. Change-Id: Id12ffb9b56b3887afcf30120f81ce5eb75a5987b Reviewed-on: https://gem5-review.googlesource.com/c/15057 Reviewed-by: Anthony Gutierrez Maintainer: Anthony Gutierrez --- src/systemc/ext/tlm_core/tlm_2/tlm_version.h | 169 ++++++++++++--------------- 1 file changed, 72 insertions(+), 97 deletions(-) (limited to 'src/systemc/ext/tlm_core/tlm_2/tlm_version.h') diff --git a/src/systemc/ext/tlm_core/tlm_2/tlm_version.h b/src/systemc/ext/tlm_core/tlm_2/tlm_version.h index 3cf230077..36c36debe 100644 --- a/src/systemc/ext/tlm_core/tlm_2/tlm_version.h +++ b/src/systemc/ext/tlm_core/tlm_2/tlm_version.h @@ -17,20 +17,16 @@ *****************************************************************************/ -/* --------------------------------------------------------------------------------------- - @file tlm_version.h - - @brief TLM version header - +/* --------------------------------------------------------------------------- Original Author: Charles Wilson, XtremeEDA Corporation @description - This header contains preprocessor and compiler symbols to allow for the determination - of the TLM version information. This conforms to IEEE 1666-2005 section 8.5.5 - 8.5.7 - . + This header contains preprocessor and compiler symbols to allow for the + determination of the TLM version information. This conforms to + IEEE 1666-2005 section 8.5.5 - 8.5.7 The following are provided: - . + preprocessor: TLM_VERSION_MAJOR numeric TLM_VERSION_MINOR numeric TLM_VERSION_PATCH numeric @@ -40,7 +36,7 @@ TLM_IS_PRERELEASE bool (1,0) TLM_VERSION string {2.0.0_DR3-TLMWG} TLM_COPYRIGHT string - . + compiler: tlm_version_major const unsigned int tlm_version_minor const unsigned int tlm_version_patch const unsigned int @@ -50,131 +46,110 @@ tlm_is_prerelease const bool tlm_version const string tlm_copyright const string - . + accessors: inline const char* tlm_release (void) inline const char* tlm_version (void) inline const char* tlm_copyright (void) +--------------------------------------------------------------------------- */ ---------------------------------------------------------------------------------------- */ - -#ifndef __TLM_VERSION_H__ -#define __TLM_VERSION_H__ +#ifndef __SYSTEMC_EXT_TLM_CORE_TLM_2_TLM_VERSION_H__ +#define __SYSTEMC_EXT_TLM_CORE_TLM_2_TLM_VERSION_H__ namespace tlm { -#define TLM_VERSION_MAJOR 2 ///< version major level ( numeric ) -#define TLM_VERSION_MINOR 0 ///< version minor level ( numeric ) -#define TLM_VERSION_PATCH 4 ///< version patch level ( numeric ) -#define TLM_VERSION_ORIGINATOR "Accellera" ///< TLM creator string -#define TLM_VERSION_SEPARATOR "." ///< version string separator +#define TLM_VERSION_MAJOR 2 ///< version major level ( numeric ) +#define TLM_VERSION_MINOR 0 ///< version minor level ( numeric ) +#define TLM_VERSION_PATCH 4 ///< version patch level ( numeric ) +#define TLM_VERSION_ORIGINATOR "Accellera" ///< TLM creator string +#define TLM_VERSION_SEPARATOR "." ///< version string separator -#define TLM_IS_PRERELEASE 0 ///< pre-release flag ( 1 / 0 ) +#define TLM_IS_PRERELEASE 0 ///< pre-release flag (1/0) #if TLM_IS_PRERELEASE -# define TLM_VERSION_PRERELEASE "pub_rev" ///< pre-release version string +# define TLM_VERSION_PRERELEASE "pub_rev" ///< pre-release version string #else -# define TLM_VERSION_PRERELEASE "" ///< pre-release version string +# define TLM_VERSION_PRERELEASE "" ///< pre-release version string #endif -#define TLM_VERSION_RELEASE_YEAR "2017" ///< release year ( YYYY ) -#define TLM_VERSION_RELEASE_MONTH "10" ///< release month ( MM ) -#define TLM_VERSION_RELEASE_DAY "12" ///< release day ( DD ) +#define TLM_VERSION_RELEASE_YEAR "2017" ///< release year ( YYYY ) +#define TLM_VERSION_RELEASE_MONTH "10" ///< release month ( MM ) +#define TLM_VERSION_RELEASE_DAY "12" ///< release day ( DD ) #define TLM_COPYRIGHT \ "Copyright (c) 1996-" TLM_VERSION_RELEASE_YEAR " by all Contributors\n" \ "ALL RIGHTS RESERVED" -/************************** do not modify below this line *******************************/ +/******************** do not modify below this line *************************/ -/******************************* preprocessor symbols ***********************************/ +/************************* preprocessor symbols *****************************/ -#define TLM_VERSION_RELEASE_DATE TLM_VERSION_RELEASE_YEAR \ - TLM_VERSION_RELEASE_MONTH \ - TLM_VERSION_RELEASE_DAY +#define TLM_VERSION_RELEASE_DATE TLM_VERSION_RELEASE_YEAR \ + TLM_VERSION_RELEASE_MONTH \ + TLM_VERSION_RELEASE_DAY -#define TLM_VERSION_STR(x) TLM_VERSION_STR_HELPER(x) -#define TLM_VERSION_STR_HELPER(x) #x +#define TLM_VERSION_STR(x) TLM_VERSION_STR_HELPER(x) +#define TLM_VERSION_STR_HELPER(x) #x -#define TLM_VERSION_STRING_MAJOR TLM_VERSION_STR(TLM_VERSION_MAJOR) -#define TLM_VERSION_STRING_MINOR TLM_VERSION_STR(TLM_VERSION_MINOR) -#define TLM_VERSION_STRING_PATCH TLM_VERSION_STR(TLM_VERSION_PATCH) +#define TLM_VERSION_STRING_MAJOR TLM_VERSION_STR(TLM_VERSION_MAJOR) +#define TLM_VERSION_STRING_MINOR TLM_VERSION_STR(TLM_VERSION_MINOR) +#define TLM_VERSION_STRING_PATCH TLM_VERSION_STR(TLM_VERSION_PATCH) -#define TLM_VERSION_STRING_MMP TLM_VERSION_STRING_MAJOR TLM_VERSION_SEPARATOR \ - TLM_VERSION_STRING_MINOR TLM_VERSION_SEPARATOR \ - TLM_VERSION_STRING_PATCH +#define TLM_VERSION_STRING_MMP TLM_VERSION_STRING_MAJOR TLM_VERSION_SEPARATOR \ + TLM_VERSION_STRING_MINOR TLM_VERSION_SEPARATOR \ + TLM_VERSION_STRING_PATCH -#define TLM_VERSION_STRING_PRE_START "_" -#define TLM_VERSION_STRING_PRE_END "-" +#define TLM_VERSION_STRING_PRE_START "_" +#define TLM_VERSION_STRING_PRE_END "-" -#if ( TLM_IS_PRERELEASE == 1 ) +#if (TLM_IS_PRERELEASE == 1) -#define TLM_VERSION_STRING_PRERELEASE TLM_VERSION_PRERELEASE -#define TLM_VERSION_STRING_RELEASE_DATE "" +# define TLM_VERSION_STRING_PRERELEASE TLM_VERSION_PRERELEASE +# define TLM_VERSION_STRING_RELEASE_DATE "" -#else /* TLM_IS_PRERELEASE == 1 */ +#else /* TLM_IS_PRERELEASE == 1 */ -#define TLM_VERSION_STRING_PRERELEASE "" -#define TLM_VERSION_STRING_RELEASE_DATE TLM_VERSION_RELEASE_DATE +# define TLM_VERSION_STRING_PRERELEASE "" +# define TLM_VERSION_STRING_RELEASE_DATE TLM_VERSION_RELEASE_DATE -#endif /* TLM_IS_PRERELEASE == 1 */ +#endif /* TLM_IS_PRERELEASE == 1 */ -#define TLM_VERSION_STRING TLM_VERSION_STRING_MMP \ - TLM_VERSION_STRING_PRE_START \ - TLM_VERSION_STRING_PRERELEASE \ - TLM_VERSION_STRING_PRE_END \ - TLM_VERSION_ORIGINATOR +#define TLM_VERSION_STRING TLM_VERSION_STRING_MMP \ + TLM_VERSION_STRING_PRE_START \ + TLM_VERSION_STRING_PRERELEASE \ + TLM_VERSION_STRING_PRE_END \ + TLM_VERSION_ORIGINATOR -#define TLM_VERSION_STRING_2 "TLM " \ - TLM_VERSION_STRING_MMP \ - " --- " \ - TLM_VERSION_RELEASE_YEAR \ - "-" \ - TLM_VERSION_RELEASE_MONTH \ - "-" \ - TLM_VERSION_RELEASE_DAY +#define TLM_VERSION_STRING_2 "TLM " \ + TLM_VERSION_STRING_MMP \ + " --- " \ + TLM_VERSION_RELEASE_YEAR \ + "-" \ + TLM_VERSION_RELEASE_MONTH \ + "-" \ + TLM_VERSION_RELEASE_DAY -#define TLM_VERSION TLM_VERSION_STRING +#define TLM_VERSION TLM_VERSION_STRING -/********************************* compiler symbols **************************************/ +/*************************** compiler symbols ********************************/ -const unsigned int tlm_version_major ( TLM_VERSION_MAJOR ); -const unsigned int tlm_version_minor ( TLM_VERSION_MINOR ); -const unsigned int tlm_version_patch ( TLM_VERSION_PATCH ); +const unsigned int tlm_version_major(TLM_VERSION_MAJOR); +const unsigned int tlm_version_minor(TLM_VERSION_MINOR); +const unsigned int tlm_version_patch(TLM_VERSION_PATCH); -const bool tlm_is_prerelease ( TLM_IS_PRERELEASE ); +const bool tlm_is_prerelease(TLM_IS_PRERELEASE); -const std::string tlm_version_string ( TLM_VERSION_STRING ); -const std::string tlm_version_originator ( TLM_VERSION_ORIGINATOR ); -const std::string tlm_version_prerelease ( TLM_VERSION_PRERELEASE ); -const std::string tlm_version_release_date ( TLM_VERSION_STRING_RELEASE_DATE ); -const std::string tlm_copyright_string ( TLM_COPYRIGHT ); -const std::string tlm_version_string_2 ( TLM_VERSION_STRING_2 ); +const std::string tlm_version_string(TLM_VERSION_STRING); +const std::string tlm_version_originator(TLM_VERSION_ORIGINATOR); +const std::string tlm_version_prerelease(TLM_VERSION_PRERELEASE); +const std::string tlm_version_release_date(TLM_VERSION_STRING_RELEASE_DATE); +const std::string tlm_copyright_string(TLM_COPYRIGHT); +const std::string tlm_version_string_2(TLM_VERSION_STRING_2); -inline const char* -tlm_release -( void -) -{ - return tlm_version_string.c_str (); -} - -inline const char* -tlm_version -( void -) -{ - return tlm_version_string_2.c_str (); -} - -inline const char* -tlm_copyright -( void -) -{ - return tlm_copyright_string.c_str (); -} +inline const char *tlm_release() { return tlm_version_string.c_str(); } +inline const char *tlm_version() { return tlm_version_string_2.c_str(); } +inline const char *tlm_copyright() { return tlm_copyright_string.c_str(); } } // namespace tlm -#endif /* __TLM_VERSION_H__ */ +#endif /* __SYSTEMC_EXT_TLM_CORE_TLM_2_TLM_VERSION_H__ */ -- cgit v1.2.3