source: driver/cfa.cc @ bbfd0e0

ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change on this file since bbfd0e0 was bbfd0e0, checked in by Thierry Delisle <tdelisle@…>, 5 years ago

Tentative support for distcc in cforall, right now nothing works because distcc doesn't understand cfa

  • Property mode set to 100644
File size: 18.6 KB
Line 
1//
2// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
3//
4// The contents of this file are covered under the licence agreement in the
5// file "LICENCE" distributed with Cforall.
6//
7// cfa.cc --
8//
9// Author           : Peter A. Buhr
10// Created On       : Tue Aug 20 13:44:49 2002
11// Last Modified By : Peter A. Buhr
12// Last Modified On : Sun Feb 10 08:28:09 2019
13// Update Count     : 281
14//
15
16#include <iostream>
17#include <cstdio>                                                                               // perror
18#include <cstdlib>                                                                              // putenv, exit
19#include <unistd.h>                                                                             // execvp
20#include <string>                                                                               // STL version
21#include <string.h>                                                                             // strcmp
22
23#include <sys/types.h>
24#include <sys/stat.h>
25
26#include "Common/SemanticError.h"
27#include "config.h"                                                                             // configure info
28
29using std::cerr;
30using std::endl;
31using std::string;
32using std::to_string;
33
34
35//#define __DEBUG_H__
36
37
38bool prefix( string arg, string pre ) {
39        return arg.substr( 0, pre.size() ) == pre;
40} // prefix
41
42enum { NumSuffixes = 2 };
43const string suffixes[NumSuffixes] = { "cfa", "hfa", };
44
45bool suffix( string arg, const char * args[], int & nargs ) {
46        //std::cerr << arg << std::endl;
47        size_t dot = arg.find_last_of( "." );
48        //std::cerr << dot << " " << (dot != string::npos ? arg.substr( dot + 1 ) : "fred" ) << std::endl;
49        if ( dot == string::npos ) return false;
50        string sx = arg.substr( dot + 1 );
51        for ( int i = 0; i < NumSuffixes; i += 1 ) {
52                if ( sx == suffixes[i] ) {
53                        args[nargs] = "-x";
54                        nargs += 1;
55                        args[nargs] = "c";
56                        nargs += 1;
57                        return true;
58                } // if
59        } // for
60        return false;
61} // suffix
62
63
64void shuffle( const char *args[], int S, int E, int N ) {
65        // S & E index 1 passed the end so adjust with -1
66        #ifdef __DEBUG_H__
67        cerr << "shuffle:" << S << " " << E << " " << N << endl;
68        #endif // __DEBUG_H__
69        for ( int j = E-1 + N; j > S-1 + N; j -=1 ) {
70                #ifdef __DEBUG_H__
71                cerr << "\t" << j << " " << j-N << endl;
72                #endif // __DEBUG_H__
73                args[j] = args[j-N];
74        } // for
75} // shuffle
76
77static inline bool dirExists(const string & path) {
78    struct stat info;
79    if(stat( path.c_str(), &info ) != 0)
80        return false;
81    else if(info.st_mode & S_IFDIR)
82        return true;
83    else
84        return false;
85} //dirExists
86
87static inline string dir(const string & path) {
88        return path.substr(0, path.find_last_of('/'));
89}
90
91
92#define str(s) #s
93
94int main( int argc, char *argv[] ) {
95        string Version( CFA_VERSION_LONG );                                     // current version number from CONFIG
96        string Major( str( CFA_VERSION_MAJOR ) ), Minor( str( CFA_VERSION_MINOR ) ), Patch( str( CFA_VERSION_PATCH ) );
97
98        string installincdir( CFA_INCDIR );                                     // fixed location of include files
99        string installlibdir( CFA_LIBDIR );                                     // fixed location of cc1 and cfa-cpp commands when installed
100        string srcdriverdir ( TOP_BUILDDIR "driver");           // fixed location of cc1 and cfa-cpp commands when in tree
101
102        string heading;                                                                         // banner printed at start of cfa compilation
103        string arg;                                                                                     // current command-line argument during command-line parsing
104        string Bprefix;                                                                         // path where gcc looks for compiler command steps
105        string langstd;                                                                         // language standard
106
107        string compiler_path( CFA_BACKEND_CC );                         // path/name of C compiler
108        string compiler_name;                                                           // name of C compiler
109
110        bool nonoptarg = false;                                                         // indicates non-option argument specified
111        bool link = true;                                                                       // linking as well as compiling
112        bool verbose = false;                                                           // -v flag
113        bool quiet = false;                                                             // -quiet flag
114        bool debug = true;                                                              // -debug flag
115        bool nolib = false;                                                             // -nolib flag
116        bool help = false;                                                              // -help flag
117        bool CFA_flag = false;                                                          // -CFA flag
118        bool cpp_flag = false;                                                          // -E or -M flag, preprocessor only
119        bool std_flag = false;                                                          // -std= flag
120        bool noincstd_flag = false;                                                     // -no-include-stdhdr= flag
121        bool debugging __attribute(( unused )) = false;         // -g flag
122        bool m32 = false;                                    // -m32 flag
123        bool m64 = false;                                    // -m64 flag
124        bool intree = false;
125        bool disttree = false;
126
127        const char *args[argc + 100];                                           // cfa command line values, plus some space for additional flags
128        int sargs = 1;                                                                          // starting location for arguments in args list
129        int nargs = sargs;                                                                      // number of arguments in args list; 0 => command name
130
131        const char *libs[argc + 20];                                            // non-user libraries must come separately, plus some added libraries and flags
132        int nlibs = 0;
133
134        #ifdef __DEBUG_H__
135        cerr << "CFA:" << endl;
136        for ( int i = 1; i < argc; i += 1 ) {
137            cerr << "argv[" << i << "]:\"" << argv[i] << "\"" << endl;
138        } // for
139        #endif // __DEBUG_H__
140
141        // process command-line arguments
142
143        for ( int i = 1; i < argc; i += 1 ) {
144                arg = argv[i];                                                                  // convert to string value
145                if ( prefix( arg, "-" ) ) {
146                        // pass through arguments
147
148                        if ( arg == "-Xlinker" || arg == "-o" ) {
149                                args[nargs] = argv[i];                                  // pass the argument along
150                                nargs += 1;
151                                i += 1;
152                                if ( i == argc ) continue;                              // next argument available ?
153                                args[nargs] = argv[i];                                  // pass the argument along
154                                nargs += 1;
155                        } else if ( arg == "-XCFA" ) {                          // CFA pass through
156                                i += 1;
157                                args[nargs] = ( *new string( string("-D__CFA_FLAG__=") + argv[i] ) ).c_str();
158                                nargs += 1;
159
160                                // CFA specific arguments
161
162                        } else if ( arg == "-CFA" ) {
163                                CFA_flag = true;                                                // strip the -CFA flag
164                                link = false;
165                                args[nargs] = "-E";                                             // replace the argument with -E
166                                nargs += 1;
167                        } else if ( arg == "-debug" ) {
168                                debug = true;                                                   // strip the debug flag
169                        } else if ( arg == "-nodebug" ) {
170                                debug = false;                                                  // strip the debug flag
171                        } else if ( arg == "-nolib" ) {
172                                nolib = true;                                                   // strip the nodebug flag
173                        } else if ( arg == "-quiet" ) {
174                                quiet = true;                                                   // strip the quiet flag
175                        } else if ( arg == "-noquiet" ) {
176                                quiet = false;                                                  // strip the noquiet flag
177                        } else if ( arg == "-help" ) {
178                                help = true;                                                    // strip the help flag
179                        } else if ( arg == "-nohelp" ) {
180                                help = false;                                                   // strip the nohelp flag
181                        } else if ( arg == "-no-include-stdhdr" ) {
182                                noincstd_flag = true;                                   // strip the no-include-stdhdr flag
183                        } else if ( arg == "-in-tree" ) {
184                                intree = true;
185                        } else if ( arg == "-dist-tree" ) {
186                                disttree = true;
187                        } else if ( arg == "-compiler" ) {
188                                // use the user specified compiler
189                                i += 1;
190                                if ( i == argc ) continue;                              // next argument available ?
191                                compiler_path = argv[i];
192                                if ( putenv( (char *)( *new string( string( "__CFA_COMPILER__=" ) + argv[i]) ).c_str() ) != 0 ) {
193                                        cerr << argv[0] << " error, cannot set environment variable." << endl;
194                                        exit( EXIT_FAILURE );
195                                } // if
196
197                                // C specific arguments
198
199                        } else if ( arg == "-v" ) {
200                                verbose = true;                                                 // verbosity required
201                                args[nargs] = argv[i];                                  // pass the argument along
202                                nargs += 1;
203                        } else if ( arg == "-g" ) {
204                                debugging = true;                                               // symbolic debugging required
205                                args[nargs] = argv[i];                                  // pass the argument along
206                                nargs += 1;
207                        } else if ( prefix( arg, "-std=" ) || prefix( arg, "--std=" ) ) {
208                                std_flag = true;                                                // -std=XX provided
209                                args[nargs] = argv[i];                                  // pass the argument along
210                                nargs += 1;
211                        } else if ( arg == "-w" ) {
212                                args[nargs] = argv[i];                                  // pass the argument along
213                                nargs += 1;
214                                args[nargs] = ( *new string( string("-D__CFA_FLAG__=") + arg ) ).c_str(); // add the argument for cfa-cpp
215                                nargs += 1;
216                        } else if ( prefix( arg, "-W" ) ) {                     // check before next tests
217                                if ( arg == "-Werror" || arg == "-Wall" ) {
218                                        args[nargs] = argv[i];                          // pass the argument along
219                                        nargs += 1;
220                                        args[nargs] = ( *new string( string("-D__CFA_FLAG__=") + arg ) ).c_str(); // add the argument for cfa-cpp
221                                        nargs += 1;
222                                } else {
223                                        unsigned int adv = prefix( arg, "-Wno-" ) ? 5 : 2;
224                                        args[nargs] = argv[i];                          // conditionally pass the argument along
225                                        const char * warning = argv[i] + adv;     // extract warning
226                                        if ( SemanticWarning_Exist( warning ) ) { // replace the argument for cfa-cpp
227                                                args[nargs] = ( *new string( string("-D__CFA_FLAG__=") + arg ) ).c_str();
228                                        } // if
229                                        nargs += 1;
230                                } // if
231                        } else if ( prefix( arg, "-B" ) ) {
232                                Bprefix = arg.substr(2);                                // strip the -B flag
233                                args[nargs] = ( *new string( string("-D__GCC_BPREFIX__=") + Bprefix ) ).c_str();
234                                nargs += 1;
235                        } else if ( prefix( arg, "-b" ) ) {
236                                if ( arg.length() == 2 ) {                              // separate argument ?
237                                        i += 1;
238                                        if ( i == argc ) continue;                      // next argument available ?
239                                        arg += argv[i];                                         // concatenate argument
240                                } // if
241                                // later versions of gcc require the -b option to appear at the start of the command line
242                                shuffle( args, sargs, nargs, 1 );               // make room at front of argument list
243                                args[sargs] = ( *new string( arg ) ).c_str(); // pass the argument along
244                                if ( putenv( (char *)( *new string( string( "__GCC_MACHINE__=" ) + arg ) ).c_str() ) != 0 ) {
245                                        cerr << argv[0] << " error, cannot set environment variable." << endl;
246                                        exit( EXIT_FAILURE );
247                                } // if
248                                sargs += 1;
249                                nargs += 1;
250                        } else if ( prefix( arg, "-V" ) ) {
251                                if ( arg.length() == 2 ) {                              // separate argument ?
252                                        i += 1;
253                                        if ( i == argc ) continue;                      // next argument available ?
254                                        arg += argv[i];                                         // concatenate argument
255                                } // if
256                                // later versions of gcc require the -V option to appear at the start of the command line
257                                shuffle( args, sargs, nargs, 1 );               // make room at front of argument list
258                                args[sargs] = ( *new string( arg ) ).c_str(); // pass the argument along
259                                if ( putenv( (char *)( *new string( string( "__GCC_VERSION__=" ) + arg ) ).c_str() ) != 0 ) {
260                                        cerr << argv[0] << " error, cannot set environment variable." << endl;
261                                        exit( EXIT_FAILURE );
262                                } // if
263                                sargs += 1;
264                                nargs += 1;
265                        } else if ( arg == "-c" || arg == "-S" || arg == "-E" || arg == "-M" || arg == "-MM" ) {
266                                args[nargs] = argv[i];                                  // pass the argument along
267                                nargs += 1;
268                                if ( arg == "-E" || arg == "-M" || arg == "-MM" ) {
269                                        cpp_flag = true;                                        // cpp only
270                                } // if
271                                link = false;                           // no linkage required
272                        } else if ( arg[1] == 'l' ) {
273                                // if the user specifies a library, load it after user code
274                                libs[nlibs] = argv[i];
275                                nlibs += 1;
276                        } else if ( arg == "-m32" ) {
277                                m32 = true;
278                                m64 = false;
279                                args[nargs] = argv[i];
280                                nargs += 1;
281                        } else if ( arg == "-m64" ) {
282                                m64 = true;
283                                m32 = false;
284                                args[nargs] = argv[i];
285                                nargs += 1;
286                        } else {
287                                // concatenate any other arguments
288                                args[nargs] = argv[i];
289                                nargs += 1;
290                        } // if
291                } else {
292                        bool cfa = suffix( arg, args, nargs );          // check suffix
293                        args[nargs] = argv[i];                                          // concatenate file
294                        nargs += 1;
295                        if ( cfa ) {
296                                args[nargs] = "-x";
297                                nargs += 1;
298                                args[nargs] = "none";
299                                nargs += 1;
300                        } // if
301                        nonoptarg = true;
302                } // if
303        } // for
304
305    args[nargs] = "-x";                                                                 // turn off language
306    nargs += 1;
307    args[nargs] = "none";
308    nargs += 1;
309
310        #ifdef __x86_64__
311        args[nargs] = "-mcx16";                                                         // allow double-wide CAA
312        nargs += 1;
313        #endif // __x86_64__
314
315        #ifdef __DEBUG_H__
316        cerr << "args:";
317        for ( int i = 1; i < nargs; i += 1 ) {
318                cerr << " " << args[i];
319        } // for
320        cerr << endl;
321        #endif // __DEBUG_H__
322
323        if ( cpp_flag && CFA_flag ) {
324                cerr << argv[0] << " error, cannot use -E and -CFA flags together." << endl;
325                exit( EXIT_FAILURE );
326        } // if
327
328        // add the CFA include-library paths, which allow direct access to header files without directory qualification
329        if( !intree ) {
330                args[nargs] = "-I" CFA_INCDIR;
331                nargs += 1;
332                if ( ! noincstd_flag ) {                                                // do not use during build
333                        args[nargs] = "-I" CFA_INCDIR "stdhdr";
334                        nargs += 1;
335                } // if
336                args[nargs] = "-I" CFA_INCDIR "concurrency";
337                nargs += 1;
338                args[nargs] = "-I" CFA_INCDIR "containers";
339                nargs += 1;
340        } else {
341                args[nargs] = "-I" TOP_SRCDIR "libcfa/src";
342                nargs += 1;
343                if ( ! noincstd_flag ) {                                                // do not use during build
344                        args[nargs] = "-I" TOP_SRCDIR "libcfa/src" "/stdhdr";
345                        nargs += 1;
346                } // if
347                args[nargs] = "-I" TOP_SRCDIR "libcfa/src" "/concurrency";
348                nargs += 1;
349                args[nargs] = "-I" TOP_SRCDIR "libcfa/src" "/containers";
350                nargs += 1;
351        }
352
353        // add stdbool to get defines for bool/true/false
354        args[nargs] = "-imacros";
355        nargs += 1;
356        args[nargs] = "stdbool.h";
357        nargs += 1;
358
359        string libbase;
360        if( !intree ) {
361                libbase = CFA_LIBDIR;
362        } else {
363                libbase = TOP_BUILDDIR "libcfa/";
364                args[nargs] = "-D__CFA_FLAG__=-t";
365                nargs += 1;
366        }
367
368        string arch = m32 ? CFA_32_CPU : (m64 ? CFA_64_CPU : CFA_DEFAULT_CPU);
369        if ( ! m32 && ! m64 ) {
370                if ( arch == "x86" ) {
371                        args[nargs] = "-m32";
372                        nargs += 1;
373                } else if ( arch == "x64" ) {
374                        args[nargs] = "-m64";
375                        nargs += 1;
376                }  // if
377        } // if
378        const char * config = nolib ? "nolib" : (debug ? "debug": "nodebug");
379        string libdir = libbase + arch + "-" + config;
380
381        if (!disttree) {
382                if ( ! nolib && ! dirExists( libdir ) ) {
383                        cerr << argv[0] << " internal error, configuration " << config << " not installed." << endl;
384                        cerr << "Was looking for " << libdir << endl;
385                        for(int i = 1; i < argc; i++) {
386                                cerr << argv[i] << " ";
387                        }
388                        cerr << endl;
389                        libdir = libbase + arch + "-" + "nolib";
390                } // if
391
392                if ( ! dirExists( libdir ) ) {
393                        cerr << argv[0] << " internal error, cannot find prelude directory." << endl;
394                        cerr << "Was looking for " << libdir << endl;
395                        exit( EXIT_FAILURE );
396                } // if
397        } // if
398
399        if(disttree) {
400                args[nargs] = ( *new string( string("-D__CFA_FLAG__=--prelude-dir=" ) + dir(argv[0])) ).c_str();
401        } else if(intree) {
402                args[nargs] = ( *new string( string("-D__CFA_FLAG__=--prelude-dir=" ) + libdir + "/prelude") ).c_str();
403        } else {
404                args[nargs] = ( *new string( string("-D__CFA_FLAG__=--prelude-dir=" ) + libdir) ).c_str();
405        }
406        nargs += 1;
407
408        for ( int i = 0; i < nlibs; i += 1 ) {                          // copy non-user libraries after all user libraries
409                args[nargs] = libs[i];
410                nargs += 1;
411        } // for
412
413        if ( link ) {
414                args[nargs] = "-Xlinker";
415                nargs += 1;
416                args[nargs] = "--undefined=__cfaabi_dbg_bits_write";
417                nargs += 1;
418                args[nargs] = "-Xlinker";
419                nargs += 1;
420                args[nargs] = "--undefined=__cfaabi_interpose_startup";
421                nargs += 1;
422                args[nargs] = "-Xlinker";
423                nargs += 1;
424                args[nargs] = "--undefined=__cfaabi_appready_startup";
425                nargs += 1;
426
427                // include the cfa library in case it's needed
428                args[nargs] = ( *new string( string("-L" ) + libdir + (intree ? "/src/.libs" : "")) ).c_str();
429                nargs += 1;
430                args[nargs] = ( *new string( string("-Wl,-rpath," ) + libdir + (intree ? "/src/.libs" : "")) ).c_str();
431                nargs += 1;
432                args[nargs] = "-Wl,--push-state,--as-needed";
433                nargs += 1;
434                args[nargs] = "-lcfathread";
435                nargs += 1;
436                args[nargs] = "-Wl,--pop-state";
437                nargs += 1;
438                args[nargs] = "-lcfa";
439                nargs += 1;
440                args[nargs] = "-lpthread";
441                nargs += 1;
442                args[nargs] = "-ldl";
443                nargs += 1;
444                args[nargs] = "-lrt";
445                nargs += 1;
446                args[nargs] = "-lm";
447                nargs += 1;
448        } // if
449
450        // Add exception flags (unconditionally)
451        args[nargs] = "-fexceptions";
452        nargs += 1;
453
454        // add the correct set of flags based on the type of compile this is
455
456        args[nargs] = ( *new string( string("-D__CFA_MAJOR__=") + Major ) ).c_str();
457        nargs += 1;
458        args[nargs] = ( *new string( string("-D__CFA_MINOR__=") + Minor ) ).c_str();
459        nargs += 1;
460        args[nargs] = ( *new string( string("-D__CFA_PATCH__=") + Patch ) ).c_str();
461        nargs += 1;
462        args[nargs] = "-D__CFA__";
463        nargs += 1;
464        args[nargs] = "-D__CFORALL__";
465        nargs += 1;
466        args[nargs] = "-D__cforall";
467        nargs += 1;
468
469        if ( cpp_flag ) {
470                args[nargs] = "-D__CPP__";
471                nargs += 1;
472        } // if
473
474        shuffle( args, sargs, nargs, 1 );                                       // make room at front of argument list
475        nargs += 1;
476        if ( CFA_flag ) {
477                args[sargs] = "-D__CFA_FLAG__=-N";
478                args[nargs] = "-D__CFA_PREPROCESS_";
479                nargs += 1;
480        } else {
481                args[sargs] = "-D__CFA_FLAG__=-L";
482        } // if
483        sargs += 1;
484
485        if ( debug ) {
486                heading += " (debug)";
487                args[nargs] = "-D__CFA_DEBUG__";
488                nargs += 1;
489        } else {
490                heading += " (no debug)";
491        } // if
492
493        if ( Bprefix.length() == 0 ) {
494                if(disttree) {
495                        Bprefix = dir(argv[0]);
496                } else if(intree) {
497                        Bprefix = srcdriverdir;
498                } else {
499                        Bprefix = installlibdir;
500                }
501
502                if ( Bprefix[Bprefix.length() - 1] != '/' ) Bprefix += '/';
503                args[nargs] = ( *new string( string("-D__GCC_BPREFIX__=") + Bprefix ) ).c_str();
504                nargs += 1;
505        } // if
506
507        args[nargs] = "-Xlinker";                                                       // used by backtrace
508        nargs += 1;
509        args[nargs] = "-export-dynamic";
510        nargs += 1;
511
512        // execute the compilation command
513
514        args[0] = compiler_path.c_str();                                        // set compiler command for exec
515        // find actual name of the compiler independent of the path to it
516        int p = compiler_path.find_last_of( '/' );                      // scan r -> l for first '/'
517        if ( p == -1 ) {
518                compiler_name = compiler_path;
519        } else {
520                compiler_name = *new string( compiler_path.substr( p + 1 ) );
521        } // if
522
523        if ( prefix( compiler_name, "gcc" ) ) {                         // allow suffix on gcc name
524                args[nargs] = "-no-integrated-cpp";
525                nargs += 1;
526                args[nargs] = "-Wno-deprecated";
527                nargs += 1;
528#ifdef HAVE_CAST_FUNCTION_TYPE
529                args[nargs] = "-Wno-cast-function-type";
530                nargs += 1;
531#endif // HAVE_CAST_FUNCTION_TYPE
532                if ( ! std_flag ) {                                                             // default c11, if none specified
533                        args[nargs] = "-std=gnu11";
534                        nargs += 1;
535                } // if
536                args[nargs] = "-fgnu89-inline";
537                nargs += 1;
538                args[nargs] = "-D__int8_t_defined";                             // prevent gcc type-size attributes
539                nargs += 1;
540                args[nargs] = ( *new string( string("-B") + Bprefix ) ).c_str();
541                nargs += 1;
542        } else {
543                cerr << argv[0] << " error, compiler \"" << compiler_name << "\" unsupported." << endl;
544                exit( EXIT_FAILURE );
545        } // if
546
547        args[nargs] = NULL;                                                                     // terminate with NULL
548
549        #ifdef __DEBUG_H__
550        cerr << "nargs: " << nargs << endl;
551        cerr << "args:" << endl;
552        for ( int i = 0; args[i] != NULL; i += 1 ) {
553                cerr << " \"" << args[i] << "\"" << endl;
554        } // for
555        #endif // __DEBUG_H__
556
557        if ( ! quiet ) {
558                cerr << "CFA " << "Version " << Version << heading << endl;
559
560                if ( help ) {
561                        cerr <<
562                                "-debug\t\t\t: use cfa runtime with debug checking" << endl <<
563                                "-help\t\t\t: print this help message" << endl <<
564                                "-quiet\t\t\t: print no messages from the cfa command" << endl <<
565                                "-CFA\t\t\t: run the cpp preprocessor and the cfa-cpp translator" << endl <<
566                                "-XCFA -cfa-cpp-flag\t: pass next flag as-is to the cfa-cpp translator" << endl <<
567                                "...\t\t\t: any other " << compiler_name << " flags" << endl;
568                } // if
569        } // if
570
571        if ( verbose ) {
572                if ( argc == 2 ) exit( EXIT_SUCCESS );                  // if only the -v flag is specified, do not invoke gcc
573
574                for ( int i = 0; args[i] != NULL; i += 1 ) {
575                        cerr << args[i] << " ";
576                } // for
577                cerr << endl;
578        } // if
579
580        if ( ! nonoptarg ) {
581                cerr << argv[0] << " error, no input files" << endl;
582                exit( EXIT_FAILURE );
583        } // if
584
585        // execute the command and return the result
586
587        execvp( args[0], (char *const *)args );                         // should not return
588        perror( "CFA Translator error: cfa level, execvp" );
589        exit( EXIT_FAILURE );
590} // main
591
592// Local Variables: //
593// tab-width: 4 //
594// mode: c++ //
595// compile-command: "make install" //
596// End: //
Note: See TracBrowser for help on using the repository browser.