Changeset 52 for sources/src/sc_ver.cc


Ignore:
Timestamp:
Jan 22, 2013, 4:23:22 PM (11 years ago)
Author:
meunier
Message:

Code formatting in all source files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sources/src/sc_ver.cc

    r40 r52  
    3535 */
    3636
    37 #include "sc_ver.h"
    3837#include <iostream>
    3938#include <cstring> //strcmp
    4039#include <cstdlib> //exit
     40
     41#include "sc_ver.h"
    4142
    4243#ifdef HAVE_CONFIG_H
     
    4445#endif
    4546
     47
    4648namespace sc_core {
    4749
    48 static
    49 const char copyright[] =
     50
     51static const char copyright[] =
    5052    "        Copyright (c) 2003-2009 by all Contributors\n"
    5153    "                    ALL RIGHTS RESERVED";
    5254
    53 static
    54 const char systemc_version[] =
     55static const char systemc_version[] =
    5556    PACKAGE_STRING " --- Compilation date : " __DATE__ " " __TIME__;
    5657
    57 static
    58 const char splash_screen[] =
    59         " ____            _                  ____    _    ____ ____  \n"
    60         "/ ___| _   _ ___| |_ ___ _ __ ___  / ___|  / \\  / ___/ ___| \n"
    61         "\\___ \\| | | / __| __/ _ \\ '_ ` _ \\| |     / _ \\ \\___ \\___ \\ \n"
    62         " ___) | |_| \\__ \\ ||  __/ | | | | | |___ / ___ \\ ___) |__) |\n"
    63         "|____/ \\__, |___/\\__\\___|_| |_| |_|\\____/_/   \\_\\____/____/ \n"
    64         "       |___/                                                \n"
    65         "\n"
    66         "         Cycle Accurate System Simulator\n"
     58static const char splash_screen[] =
     59    " ____            _                  ____    _    ____ ____  \n"
     60    "/ ___| _   _ ___| |_ ___ _ __ ___  / ___|  / \\  / ___/ ___| \n"
     61    "\\___ \\| | | / __| __/ _ \\ '_ ` _ \\| |     / _ \\ \\___ \\___ \\ \n"
     62    " ___) | |_| \\__ \\ ||  __/ | | | | | |___ / ___ \\ ___) |__) |\n"
     63    "|____/ \\__, |___/\\__\\___|_| |_| |_|\\____/_/   \\_\\____/____/ \n"
     64    "       |___/                                                \n"
     65    "\n"
     66    "         Cycle Accurate System Simulator\n"
    6767#ifdef CONFIG_DEBUG
    68   "            DEBUG version\n"
     68    "            DEBUG version\n"
    6969#endif
    7070#ifdef USE_PORT_DEPENDENCY
    71   "            using explicit port dependancy\n"
     71    "            using explicit port dependancy\n"
    7272#endif
    73         "            ASIM/LIP6/UPMC\n"
    74         "            E-mail support:  Richard.Buchmann@asim.lip6.fr\n"
    75         "            Contributors : Richard Buchmann, Sami Taktak,\n"
    76   "                           Paul-Jerome Kingbo, Frederic Pétrot,\n"
    77   "                           Nicolas Pouillon\n"
    78         "\n"
    79         "                           Last change : " __DATE__ "\n"
    80         "\n";
     73    "            ASIM/LIP6/UPMC\n"
     74    "            E-mail support:  Richard.Buchmann@asim.lip6.fr\n"
     75    "            Contributors : Richard Buchmann, Sami Taktak,\n"
     76    "                           Paul-Jerome Kingbo, Frederic Pétrot,\n"
     77    "                           Nicolas Pouillon\n"
     78    "\n"
     79    "                           Last change : " __DATE__ "\n"
     80    "\n";
    8181
    82 const char*
    83 sc_copyright()
    84 {
     82
     83const char * sc_copyright() {
    8584    return copyright;
    8685}
    8786
    88 const char*
    89 sc_version()
    90 {
     87
     88const char * sc_version() {
    9189    return systemc_version;
    9290}
    9391
    94 const char*
    95 get_splash_screen()
    96 {
     92
     93const char * get_splash_screen() {
    9794    return splash_screen;
    9895}
    9996
     97
    10098} // end of sc_core namespace
    10199
    102 bool
    103 casc_check_version (const char *runtime_ver)
    104 {
    105   const char *lib_version = SYSTEMC_VERSION;
    106   bool right_version =  strcmp (runtime_ver, lib_version) == 0;
    107   if (right_version == false)
    108   {
    109     std::cerr << "Current SystemCASS library version doesn't match.\n";
    110     std::cerr << "SystemCASS linked library is : " << lib_version << "\n";
    111     std::cerr << "SystemCASS environnement variable points to : " << runtime_ver << "\n";
    112     exit(125);
    113   }
    114  
    115   return true;
     100
     101bool casc_check_version(const char * runtime_ver) {
     102    const char * lib_version = SYSTEMC_VERSION;
     103    bool right_version = strcmp(runtime_ver, lib_version) == 0;
     104    if (right_version == false) {
     105        std::cerr << "Current SystemCASS library version doesn't match.\n";
     106        std::cerr << "SystemCASS linked library is : " << lib_version << "\n";
     107        std::cerr << "SystemCASS environnement variable points to : " << runtime_ver << "\n";
     108        exit(125);
     109    }
     110
     111    return true;
    116112}
    117113
     114
     115/*
     116# Local Variables:
     117# tab-width: 4;
     118# c-basic-offset: 4;
     119# c-file-offsets:((innamespace . 0)(inline-open . 0));
     120# indent-tabs-mode: nil;
     121# End:
     122#
     123# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
     124*/
     125
Note: See TracChangeset for help on using the changeset viewer.