Changes in / [0a73148:ae144af]


Ignore:
Location:
src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/TypedefTable.cc

    r0a73148 rae144af  
    1010// Created On       : Sat May 16 15:20:13 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Jul 13 18:35:54 2018
    13 // Update Count     : 257
     12// Last Modified On : Wed Jul 11 11:47:47 2018
     13// Update Count     : 255
    1414//
    1515
     
    100100void TypedefTable::up( bool forall ) {
    101101        level += 1;
    102         kindTable.getNote( kindTable.currentScope() ) = (Note){ level, forall || getEnclForall() };
     102        kindTable.getNote( kindTable.currentScope() ) = (Note){ level, static_cast<bool>(forall | getEnclForall()) };
    103103        debugPrint( cerr << "Up " << " level " << level << " note " << kindTable.getNote( level ).level << ", " << kindTable.getNote( level ).forall << endl; );
    104104} // TypedefTable::up
  • src/Parser/parser.yy

    r0a73148 rae144af  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jul 12 16:16:25 2018
    13 // Update Count     : 3756
     12// Last Modified On : Thu Jul 12 13:47:44 2018
     13// Update Count     : 3755
    1414//
    1515
     
    18661866        | aggregate_key attribute_list_opt no_attr_identifier fred
    18671867                {
    1868                         typedefTable.makeTypedef( *$3, forall || typedefTable.getEnclForall() ? TYPEGENname : TYPEDEFname ); // create typedef
     1868                        typedefTable.makeTypedef( *$3, forall | typedefTable.getEnclForall() ? TYPEGENname : TYPEDEFname ); // create typedef
    18691869                        forall = false;                                                         // reset
    18701870                }
     
    18741874                {
    18751875                        // for type_name can be a qualified type name S.T, in which case only the last name in the chain needs a typedef (other names in the chain should already have one)
    1876                         typedefTable.makeTypedef( *$3->type->leafName(), forall || typedefTable.getEnclForall() ? TYPEGENname : TYPEDEFname ); // create typedef
     1876                        typedefTable.makeTypedef( *$3->type->leafName(), forall | typedefTable.getEnclForall() ? TYPEGENname : TYPEDEFname ); // create typedef
    18771877                        forall = false;                                                         // reset
    18781878                }
     
    18921892        aggregate_key attribute_list_opt no_attr_identifier fred
    18931893                {
    1894                         typedefTable.makeTypedef( *$3, forall || typedefTable.getEnclForall() ? TYPEGENname : TYPEDEFname );
     1894                        typedefTable.makeTypedef( *$3, forall | typedefTable.getEnclForall() ? TYPEGENname : TYPEDEFname );
    18951895                        forall = false;                                                         // reset
    18961896                        $$ = DeclarationNode::newAggregate( $1, $3, nullptr, nullptr, false )->addQualifiers( $2 );
  • src/driver/cc1.cc

    r0a73148 rae144af  
    1010// Created On       : Fri Aug 26 14:23:51 2005
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Jul 13 17:40:10 2018
    13 // Update Count     : 110
     12// Last Modified On : Sat May 12 16:11:53 2018
     13// Update Count     : 94
    1414//
    1515
     
    4444} // prefix
    4545
    46 enum { NumSuffixes = 2 };
    47 const string suffixes[NumSuffixes] = { "cfa", "hfa", };
    48 
    49 bool suffix( string arg ) {
    50         //std::cerr << arg << std::endl;
    51         size_t dot = arg.find_last_of( "." );
    52         //std::cerr << dot << " " << (dot != string::npos ? arg.substr( dot + 1 ) : "fred" ) << std::endl;
    53         if ( dot == string::npos ) return false;
    54         string sx = arg.substr( dot + 1 );
    55         for ( int i = 0; i < NumSuffixes; i += 1 ) {
    56                 if ( sx == suffixes[i] ) return true;
    57         } // for
    58         return false;
    59 } // suffix
    60 
    6146
    6247void checkEnv( const char *args[], int &nargs ) {
     
    6651        if ( value != NULL ) {
    6752                compiler_name = value;
    68                 #ifdef __DEBUG_H__
     53#ifdef __DEBUG_H__
    6954                cerr << "env arg:\"" << compiler_name << "\"" << endl;
    70                 #endif // __DEBUG_H__
     55#endif // __DEBUG_H__
    7156        } // if
    7257
     
    7459        if ( value != NULL ) {
    7560                args[nargs] = ( *new string( value ) ).c_str(); // pass the argument along
    76                 #ifdef __DEBUG_H__
     61#ifdef __DEBUG_H__
    7762                cerr << "env arg:\"" << args[nargs] << "\"" << endl;
    78                 #endif // __DEBUG_H__
     63#endif // __DEBUG_H__
    7964                nargs += 1;
    8065        } // if
     
    8368        if ( value != NULL ) {
    8469                args[nargs] = ( *new string( value ) ).c_str(); // pass the argument along
    85                 #ifdef __DEBUG_H__
     70#ifdef __DEBUG_H__
    8671                cerr << "env arg:\"" << args[nargs] << "\"" << endl;
    87                 #endif // __DEBUG_H__
     72#endif // __DEBUG_H__
    8873                nargs += 1;
    8974        } // if
     
    130115        signal( SIGTERM, sigTermHandler );
    131116
    132         #ifdef __DEBUG_H__
     117#ifdef __DEBUG_H__
    133118        cerr << "Stage1" << endl;
    134         #endif // __DEBUG_H__
     119#endif // __DEBUG_H__
    135120
    136121        // process all the arguments
     
    139124
    140125        for ( i = 1; i < argc; i += 1 ) {
    141                 #ifdef __DEBUG_H__
     126#ifdef __DEBUG_H__
    142127                cerr << "argv[" << i << "]:\"" << argv[i] << "\"" << endl;
    143                 #endif // __DEBUG_H__
     128#endif // __DEBUG_H__
    144129                arg = argv[i];
    145                 #ifdef __DEBUG_H__
     130#ifdef __DEBUG_H__
    146131                cerr << "arg:\"" << arg << "\"" << endl;
    147                 #endif // __DEBUG_H__
     132#endif // __DEBUG_H__
    148133                if ( prefix( arg, "-" ) ) {
    149134                        // strip g++ flags that are inappropriate or cause duplicates in subsequent passes
     
    179164                                ncargs += 1;
    180165                                i += 1;                                                                 // and the argument
    181                         // } else if ( prefix( arg, D__GCC_X__ ) ) {
    182                         //      args[nargs] = "-x";
    183                         //      nargs += 1;
    184                         //      args[nargs] = ( *new string( arg.substr( D__GCC_X__.size() ) ) ).c_str(); // pass the flag along
    185                         //      nargs += 1;
    186                         // } else if ( arg == "-D" && prefix( argv[i + 1], D__GCC_X__.substr(2) ) ) {
    187                         //      args[nargs] = "-x";
    188                         //      nargs += 1;
    189                         //      args[nargs] = ( *new string( string( argv[i + 1] ).substr( D__GCC_X__.size() - 2 ) ) ).c_str(); // pass the flag along
    190                         //      nargs += 1;
    191                         //      i += 1;                                                                 // and the argument
     166                        } else if ( prefix( arg, D__GCC_X__ ) ) {
     167                                args[nargs] = "-x";
     168                                nargs += 1;
     169                                args[nargs] = ( *new string( arg.substr( D__GCC_X__.size() ) ) ).c_str(); // pass the flag along
     170                                nargs += 1;
     171                        } else if ( arg == "-D" && prefix( argv[i + 1], D__GCC_X__.substr(2) ) ) {
     172                                args[nargs] = "-x";
     173                                nargs += 1;
     174                                args[nargs] = ( *new string( string( argv[i + 1] ).substr( D__GCC_X__.size() - 2 ) ) ).c_str(); // pass the flag along
     175                                nargs += 1;
     176                                i += 1;                                                                 // and the argument
    192177                        } else if ( prefix( arg, D__GCC_BPREFIX__ ) ) {
    193178                                bprefix = arg.substr( D__GCC_BPREFIX__.size() );
     
    211196                                        args[nargs] = argv[i];                          // pass the argument along
    212197                                        nargs += 1;
    213                                         #ifdef __DEBUG_H__
     198#ifdef __DEBUG_H__
    214199                                        cerr << "argv[" << i << "]:\"" << argv[i] << "\"" << endl;
    215                                         #endif // __DEBUG_H__
     200#endif // __DEBUG_H__
    216201                                } else if ( arg == "-MD" || arg == "-MMD" ) {
    217202                                        args[nargs] = "-MF";                            // insert before file
     
    220205                                        args[nargs] = argv[i];                          // pass the argument along
    221206                                        nargs += 1;
    222                                         #ifdef __DEBUG_H__
     207#ifdef __DEBUG_H__
    223208                                        cerr << "argv[" << i << "]:\"" << argv[i] << "\"" << endl;
    224                                         #endif // __DEBUG_H__
     209#endif // __DEBUG_H__
    225210                                } // if
    226211                        } // if
     
    228213                        if ( cpp_in == NULL ) {
    229214                                cpp_in = argv[i];
    230                                 #ifdef __DEBUG_H__
     215#ifdef __DEBUG_H__
    231216                                cerr << "cpp_in:\"" << cpp_in << "\"" << endl;
    232                                 #endif // __DEBUG_H__
     217#endif // __DEBUG_H__
    233218                        } else if ( cpp_out == NULL ) {
    234219                                cpp_out = argv[i];
    235                                 #ifdef __DEBUG_H__
     220#ifdef __DEBUG_H__
    236221                                cerr << "cpp_out:\"" << cpp_out << "\""<< endl;
    237                                 #endif // __DEBUG_H__
     222#endif // __DEBUG_H__
    238223                        } else {
    239224                                cerr << "Usage: " << argv[0] << " input-file [output-file] [options]" << endl;
     
    243228        } // for
    244229
    245         #ifdef __DEBUG_H__
     230#ifdef __DEBUG_H__
    246231        cerr << "args:";
    247232        for ( i = 1; i < nargs; i += 1 ) {
     
    251236        if ( cpp_out != NULL ) cerr << " " << cpp_out;
    252237        cerr << endl;
    253         #endif // __DEBUG_H__
     238#endif // __DEBUG_H__
    254239
    255240        if ( cpp_in == NULL ) {
     
    273258                args[nargs] = NULL;                                                             // terminate argument list
    274259
    275                 #ifdef __DEBUG_H__
     260#ifdef __DEBUG_H__
    276261                cerr << "nargs: " << nargs << endl;
    277262                for ( i = 0; args[i] != NULL; i += 1 ) {
     
    279264                } // for
    280265                cerr << endl;
    281                 #endif // __DEBUG_H__
     266#endif // __DEBUG_H__
    282267
    283268                execvp( args[0], (char *const *)args );                 // should not return
     
    294279        } // if
    295280
    296         #ifdef __DEBUG_H__
     281#ifdef __DEBUG_H__
    297282        cerr << "tmpname:" << tmpname << " tmpfilefd:" << tmpfilefd << endl;
    298         #endif // __DEBUG_H__
     283#endif // __DEBUG_H__
    299284
    300285        // Run the C preprocessor and save the output in tmpfile.
     
    310295
    311296                args[0] = compiler_name.c_str();
    312                 if ( suffix( cpp_in ) ) {
    313                         args[nargs] = "-x";
    314                         nargs += 1;
    315                         args[nargs] = "c";
    316                         nargs += 1;
    317                 } // if
    318297                args[nargs] = cpp_in;                                                   // input to cpp
    319298                nargs += 1;
    320299                args[nargs] = NULL;                                                             // terminate argument list
    321300
    322                 #ifdef __DEBUG_H__
     301#ifdef __DEBUG_H__
    323302                cerr << "cpp nargs: " << nargs << endl;
    324303                for ( i = 0; args[i] != NULL; i += 1 ) {
     
    326305                } // for
    327306                cerr << endl;
    328                 #endif // __DEBUG_H__
     307#endif // __DEBUG_H__
    329308
    330309                execvp( args[0], (char *const *)args );                 // should not return
     
    335314        wait( &code );                                                                          // wait for child to finish
    336315
    337         #ifdef __DEBUG_H__
     316#ifdef __DEBUG_H__
    338317        cerr << "return code from cpp:" << WEXITSTATUS(code) << endl;
    339         #endif // __DEBUG_H__
     318#endif // __DEBUG_H__
    340319
    341320        if ( WIFSIGNALED(code) != 0 ) {                                         // child failed ?
     
    373352                cargs[ncargs] = NULL;                                                   // terminate argument list
    374353
    375                 #ifdef __DEBUG_H__
     354#ifdef __DEBUG_H__
    376355                cerr << "cfa-cpp ncargs: " << o_name << " " << CFA_flag << " " << ncargs << endl;
    377356                for ( i = 0; cargs[i] != NULL; i += 1 ) {
     
    379358                } // for
    380359                cerr << endl;
    381                 #endif // __DEBUG_H__
     360#endif // __DEBUG_H__
    382361
    383362                execvp( cargs[0], (char * const *)cargs );              // should not return
     
    388367        wait( &code );                                                                          // wait for child to finish
    389368
    390         #ifdef __DEBUG_H__
     369#ifdef __DEBUG_H__
    391370        cerr << "return code from cfa-cpp:" << WEXITSTATUS(code) << endl;
    392         #endif // __DEBUG_H__
     371#endif // __DEBUG_H__
    393372
    394373        // Must unlink here because file must exist across execvp.
     
    414393        int nargs = 1;                                                                          // number of arguments in args list; 0 => command name
    415394
    416         #ifdef __DEBUG_H__
     395#ifdef __DEBUG_H__
    417396        cerr << "Stage2" << endl;
    418         #endif // __DEBUG_H__
     397#endif // __DEBUG_H__
    419398
    420399        // process all the arguments
     
    423402
    424403        for ( i = 1; i < argc; i += 1 ) {
    425                 #ifdef __DEBUG_H__
     404#ifdef __DEBUG_H__
    426405                cerr << "argv[" << i << "]:\"" << argv[i] << "\"" << endl;
    427                 #endif // __DEBUG_H__
     406#endif // __DEBUG_H__
    428407                arg = argv[i];
    429                 #ifdef __DEBUG_H__
     408#ifdef __DEBUG_H__
    430409                cerr << "arg:\"" << arg << "\"" << endl;
    431                 #endif // __DEBUG_H__
     410#endif // __DEBUG_H__
    432411                if ( prefix( arg, "-" ) ) {
    433412                        // strip inappropriate flags
    434413
    435414                        if ( arg == "-quiet" || arg == "-version" || arg == "-fpreprocessed" ||
    436                                 // Currently CFA does not suppose precompiled .h files.
    437                                 prefix( arg, "--output-pch" ) ) {
     415                                 // Currently CFA does not suppose precompiled .h files.
     416                                 prefix( arg, "--output-pch" ) ) {
    438417
    439418                                // strip inappropriate flags with an argument
     
    441420                        } else if ( arg == "-auxbase" || arg == "-auxbase-strip" || arg == "-dumpbase" ) {
    442421                                i += 1;
    443                                 #ifdef __DEBUG_H__
     422#ifdef __DEBUG_H__
    444423                                cerr << "arg:\"" << argv[i] << "\"" << endl;
    445                                 #endif // __DEBUG_H__
     424#endif // __DEBUG_H__
    446425
    447426                                // all other flags
     
    454433                                        args[nargs] = argv[i];                          // pass the argument along
    455434                                        nargs += 1;
    456                 #ifdef __DEBUG_H__
     435#ifdef __DEBUG_H__
    457436                                        cerr << "arg:\"" << argv[i] << "\"" << endl;
    458                 #endif // __DEBUG_H__
     437#endif // __DEBUG_H__
    459438                                } // if
    460439                        } // if
     
    462441                        if ( cpp_in == NULL ) {
    463442                                cpp_in = argv[i];
    464                                 #ifdef __DEBUG_H__
     443#ifdef __DEBUG_H__
    465444                                cerr << "cpp_in:\"" << cpp_in << "\"" << endl;
    466                                 #endif // __DEBUG_H__
     445#endif // __DEBUG_H__
    467446                        } else {
    468447                                cerr << "Usage: " << argv[0] << " input-file [output-file] [options]" << endl;
     
    472451        } // for
    473452
    474         #ifdef __DEBUG_H__
     453#ifdef __DEBUG_H__
    475454        cerr << "args:";
    476455        for ( i = 1; i < nargs; i += 1 ) {
     
    479458        cerr << endl;
    480459        if ( cpp_in != NULL ) cerr << " " << cpp_in;
    481         #endif // __DEBUG_H__
     460#endif // __DEBUG_H__
    482461
    483462        args[0] = compiler_name.c_str();
     
    488467        args[nargs] = NULL;                                                                     // terminate argument list
    489468
    490         #ifdef __DEBUG_H__
     469#ifdef __DEBUG_H__
    491470        cerr << "stage2 nargs: " << nargs << endl;
    492471        for ( i = 0; args[i] != NULL; i += 1 ) {
     
    494473        } // for
    495474        cerr << endl;
    496         #endif // __DEBUG_H__
     475#endif // __DEBUG_H__
    497476
    498477        execvp( args[0], (char * const *)args );                        // should not return
     
    503482
    504483int main( const int argc, const char * const argv[], __attribute__((unused)) const char * const env[] ) {
    505         #ifdef __DEBUG_H__
     484#ifdef __DEBUG_H__
    506485        for ( int i = 0; env[i] != NULL; i += 1 ) {
    507486                cerr << env[i] << endl;
    508487        } // for
    509         #endif // __DEBUG_H__
     488#endif // __DEBUG_H__
    510489
    511490        string arg = argv[1];
  • src/driver/cfa.cc

    r0a73148 rae144af  
    1010// Created On       : Tue Aug 20 13:44:49 2002
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Jul 13 17:40:12 2018
    13 // Update Count     : 258
     12// Last Modified On : Mon May 14 14:16:33 2018
     13// Update Count     : 244
    1414//
    1515
     
    3737} // prefix
    3838
    39 enum { NumSuffixes = 2 };
    40 const string suffixes[NumSuffixes] = { "cfa", "hfa", };
    41 
    42 bool suffix( string arg ) {
    43         //std::cerr << arg << std::endl;
    44         size_t dot = arg.find_last_of( "." );
    45         //std::cerr << dot << " " << (dot != string::npos ? arg.substr( dot + 1 ) : "fred" ) << std::endl;
    46         if ( dot == string::npos ) return false;
    47         string sx = arg.substr( dot + 1 );
    48         for ( int i = 0; i < NumSuffixes; i += 1 ) {
    49                 if ( sx == suffixes[i] ) return true;
    50         } // for
    51         return false;
    52 } // suffix
    53 
    5439
    5540void shuffle( const char *args[], int S, int E, int N ) {
    5641        // S & E index 1 passed the end so adjust with -1
    57         #ifdef __DEBUG_H__
     42#ifdef __DEBUG_H__
    5843        cerr << "shuffle:" << S << " " << E << " " << N << endl;
    59         #endif // __DEBUG_H__
     44#endif // __DEBUG_H__
    6045        for ( int j = E-1 + N; j > S-1 + N; j -=1 ) {
    61                 #ifdef __DEBUG_H__
     46#ifdef __DEBUG_H__
    6247                cerr << "\t" << j << " " << j-N << endl;
    63                 #endif // __DEBUG_H__
     48#endif // __DEBUG_H__
    6449                args[j] = args[j-N];
    6550        } // for
     
    9479        bool std_flag = false;                                                          // -std= flag
    9580        bool noincstd_flag = false;                                                     // -no-include-stdhdr= flag
    96         bool xflag = false;                                                                     // user supplied -x flag
    9781        bool debugging __attribute(( unused )) = false;         // -g flag
    9882
     
    10488        int nlibs = 0;
    10589
    106         #ifdef __DEBUG_H__
     90#ifdef __DEBUG_H__
    10791        cerr << "CFA:" << endl;
    108         #endif // __DEBUG_H__
     92#endif // __DEBUG_H__
    10993
    11094        // process command-line arguments
    11195
    11296        for ( int i = 1; i < argc; i += 1 ) {
    113                 #ifdef __DEBUG_H__
     97#ifdef __DEBUG_H__
    11498                cerr << "argv[" << i << "]:\"" << argv[i] << "\"" << endl;
    115                 #endif // __DEBUG_H__
     99#endif // __DEBUG_H__
    116100                arg = argv[i];                                                                  // convert to string value
    117                 #ifdef __DEBUG_H__
     101#ifdef __DEBUG_H__
    118102                cerr << "arg:\"" << arg << "\"" << endl;
    119                 #endif // __DEBUG_H__
     103#endif // __DEBUG_H__
    120104                if ( prefix( arg, "-" ) ) {
    121105                        // pass through arguments
     
    178162                                args[nargs] = argv[i];                                  // pass the argument along
    179163                                nargs += 1;
    180                         } else if ( arg == "-x" ) {
    181                                 xflag = true;
     164                        } else if ( arg == "-x" ) {                                     // lost so force along
    182165                                args[nargs] = argv[i];                                  // pass the argument along
    183166                                nargs += 1;
     
    185168                                args[nargs] = argv[i];                                  // pass the argument along
    186169                                nargs += 1;
    187                                 // args[nargs] = ( *new string( string("-D__GCC_X__=") + argv[i] ) ).c_str(); // add the argument for -x
    188                                 // nargs += 1;
    189                         } else if ( prefix( arg, "-x" ) ) {
    190                                 xflag = true;
    191                                 args[nargs] = argv[i];                                  // pass the argument along
    192                                 nargs += 1;
    193                                 // args[nargs] = ( *new string( string("-D__GCC_X__=") + arg.substr(2) ) ).c_str(); // add the argument for -x
    194                                 // nargs += 1;
     170                                args[nargs] = ( *new string( string("-D__GCC_X__=") + argv[i] ) ).c_str(); // add the argument for -x
     171                                nargs += 1;
     172                        } else if ( prefix( arg, "-x" ) ) {                     // lost so force along
     173                                args[nargs] = argv[i];                                  // pass the argument along
     174                                nargs += 1;
     175                                args[nargs] = ( *new string( string("-D__GCC_X__=") + arg.substr(2) ) ).c_str(); // add the argument for -x
     176                                nargs += 1;
    195177                        } else if ( arg == "-w" ) {
    196178                                args[nargs] = argv[i];                                  // pass the argument along
     
    264246                        } // if
    265247                } else {
    266                         bool opt = false;
    267                         if ( ! xflag && suffix( arg ) ) {
    268                                 args[nargs] = "-x";
    269                                 nargs += 1;
    270                                 args[nargs] = "c";
    271                                 nargs += 1;
    272                                 // args[nargs] = ( *new string( string("-D__GCC_X__=c") ) ).c_str(); // add the argument for -x
    273                                 // nargs += 1;
    274                                 opt = true;
    275                         } // if
    276248                        // concatenate other arguments
    277249                        args[nargs] = argv[i];
    278250                        nargs += 1;
    279                         if ( opt ) {
    280                                 args[nargs] = "-x";
    281                                 nargs += 1;
    282                                 args[nargs] = "none";
    283                                 nargs += 1;
    284                                 // args[nargs] = ( *new string( string("-D__GCC_X__=none") ) ).c_str(); // add the argument for -x
    285                                 // nargs += 1;
    286                         } // if
    287251                        nonoptarg = true;
    288                         xflag = false;
    289252                } // if
    290253        } // for
    291254
    292         #ifdef __x86_64__
     255#ifdef __x86_64__
    293256        args[nargs] = "-mcx16";                                                         // allow double-wide CAA
    294257        nargs += 1;
    295         #endif // __x86_64__
    296 
    297         #ifdef __DEBUG_H__
     258#endif // __x86_64__
     259
     260#ifdef __DEBUG_H__
    298261        cerr << "args:";
    299262        for ( int i = 1; i < nargs; i += 1 ) {
     
    301264        } // for
    302265        cerr << endl;
    303         #endif // __DEBUG_H__
     266#endif // __DEBUG_H__
    304267
    305268        if ( cpp_flag && CFA_flag ) {
     
    320283        nargs += 1;
    321284
    322         #ifdef HAVE_LIBCFA
     285#ifdef HAVE_LIBCFA
    323286        if ( link ) {
    324287                #if ! defined(HAVE_LIBCFA_RELEASE)
    325                 if ( ! debug ) {
    326                         cerr << "error: Option -nodebug is unavailable, libcfa was not installed." << endl;
    327                         exit( EXIT_FAILURE );
    328                 } // if
     288                        if ( ! debug ) {
     289                                cerr << "error: Option -nodebug is unavailable, libcfa was not installed." << endl;
     290                                exit( EXIT_FAILURE );
     291                        } // if
    329292                #endif
    330293                #if ! defined(HAVE_LIBCFA_DEBUG)
    331                 if ( debug ) {
    332                         cerr << "error: Option -debug is unavailable, libcfa-d was not installed." << endl;
    333                         exit( EXIT_FAILURE );
    334                 } // if
     294                        if ( debug ) {
     295                                cerr << "error: Option -debug is unavailable, libcfa-d was not installed." << endl;
     296                                exit( EXIT_FAILURE );
     297                        } // if
    335298                #endif
    336299
     
    360323                nargs += 1;
    361324        } // if
    362         #endif // HAVE_LIBCFA
     325#endif // HAVE_LIBCFA
    363326
    364327        // Add exception flags (unconditionally)
     
    456419        args[nargs] = NULL;                                                                     // terminate with NULL
    457420
    458         #ifdef __DEBUG_H__
     421#ifdef __DEBUG_H__
    459422        cerr << "nargs: " << nargs << endl;
    460423        cerr << "args:" << endl;
     
    462425                cerr << " \"" << args[i] << "\"" << endl;
    463426        } // for
    464         #endif // __DEBUG_H__
     427#endif // __DEBUG_H__
    465428
    466429        if ( ! quiet ) {
  • src/libcfa/math

    r0a73148 rae144af  
    1010// Created On       : Mon Apr 18 23:37:04 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Jul 13 11:02:15 2018
    13 // Update Count     : 116
     12// Last Modified On : Wed Jul 11 21:12:54 2018
     13// Update Count     : 109
    1414//
    1515
     
    352352#include "common"
    353353
    354 //---------------------------------------
    355 
    356 forall( otype T | { void ?{}( T &, one_t ); T ?+?( T, T ); T ?-?( T, T );T ?*?( T, T ); } )
    357 T lerp( T x, T y, T a ) { return x * ((T){1} - a) + y * a; }
    358 
    359 forall( otype T | { void ?{}( T &, zero_t ); void ?{}( T &, one_t ); int ?<?( T, T ); } )
    360 T step( T edge, T x ) { return x < edge ? (T){0} : (T){1}; }
    361 
    362 forall( otype T | { void ?{}( T &, int ); T clamp( T, T, T ); T ?-?( T, T ); T ?*?( T, T ); T ?/?( T, T ); } )
    363 T smoothstep( T edge0, T edge1, T x ) { T t = clamp( (x - edge0) / (edge1 - edge0), (T){0}, (T){1} ); return t * t * ((T){3} - (T){2} * t); }
    364 
    365354// Local Variables: //
    366355// mode: c //
Note: See TracChangeset for help on using the changeset viewer.