Index: driver/Makefile.in
===================================================================
--- driver/Makefile.in	(revision b8508a2e1ff21bb4fcf257c21b8086694f961c08)
+++ driver/Makefile.in	(revision b87a5edee8b2aa6c36e184150ebd60baf4c64251)
@@ -1,7 +1,17 @@
-###
-### This file is part of the Cforall project
-###
-### $Id: Makefile.in,v 1.5 2005/08/26 19:16:54 rcbilson Exp $
-###
+######################### -*- Mode: Makefile-Gmake -*- ########################$
+##
+## Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+##
+## The contents of this file are covered under the licence agreement in the
+## file "LICENCE" distributed with Cforall.
+##
+## Makefile.in -- 
+##
+## Author           : Peter A. Buhr
+## Created On       : Sat May 16 07:50:15 2015
+## Last Modified By : Peter A. Buhr
+## Last Modified On : Sat May 16 08:34:55 2015
+## Update Count     : 4
+###############################################################################
 
 CXX=@CXX@
@@ -11,21 +21,21 @@
 
 SRCS:=cfa.cc cc1.cc
-OBJECTS:=$(SRCS:.cc=.o)
-DEPS:=$(SRCS:.cc=.d)
+OBJECTS:=${SRCS:.cc=.o}
+DEPS:=${SRCS:.cc=.d}
 
 all: cfa cc1
 
 cfa: cfa.o
-	$(CXX) $< -o $@
+	${CXX} $< -o $@
 
 cc1 : cc1.o
-	$(CXX) $< -o $@
+	${CXX} $< -o $@
 
 install: cfa cc1
-	$(INSTALL) -d @CFA_BINDIR@
-	$(INSTALL) -d @CFA_LIBDIR@
-	$(INSTALL) cc1 @CFA_LIBDIR@
-	$(INSTALL) cfa @CFA_BINDIR@
+	${INSTALL} -d @CFA_BINDIR@
+	${INSTALL} -d @CFA_LIBDIR@
+	${INSTALL} cc1 @CFA_LIBDIR@
+	${INSTALL} cfa @CFA_BINDIR@
 
 clean:
-	rm -f cfa cc1 $(OBJECTS) $(DEPS) core
+	rm -f cfa cc1 ${OBJECTS} ${DEPS} core
Index: driver/cc1.cc
===================================================================
--- driver/cc1.cc	(revision b8508a2e1ff21bb4fcf257c21b8086694f961c08)
+++ driver/cc1.cc	(revision b87a5edee8b2aa6c36e184150ebd60baf4c64251)
@@ -1,15 +1,16 @@
-//                              -*- Mode: C++ -*-
-// 
-// CForall Version 1.0, Copyright (C) Peter A. Buhr 2005
-// 
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
 // cc1.cc -- 
-// 
-// Author           : Richard C. Bilson
+//
+// Author           : Peter A. Buhr
 // Created On       : Fri Aug 26 14:23:51 2005
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu May 14 13:24:45 2015
-// Update Count     : 43
+// Last Modified On : Sat May 16 07:42:14 2015
+// Update Count     : 49
 //
-
 
 #include <iostream>
@@ -18,10 +19,10 @@
 #include <string>
 using std::string;
-#include <cstdio>					// stderr, stdout, perror, fprintf
-#include <cstdlib>					// getenv, exit, mkstemp
-#include <unistd.h>					// execvp, fork, unlink
-#include <sys/wait.h>					// wait
-
-#include "config.h"					// configure info
+#include <cstdio>										// stderr, stdout, perror, fprintf
+#include <cstdlib>										// getenv, exit, mkstemp
+#include <unistd.h>										// execvp, fork, unlink
+#include <sys/wait.h>									// wait
+
+#include "config.h"										// configure info
 
 
@@ -29,5 +30,5 @@
 
 
-string compiler_name( GCC_PATH );                       // path/name of C compiler
+string compiler_name( GCC_PATH );						// path/name of C compiler
 
 string D__GCC_BPREFIX__( "-D__GCC_BPREFIX__=" );
@@ -39,451 +40,452 @@
 
 bool prefix( string arg, string pre ) {
-    return arg.substr( 0, pre.size() ) == pre;
+	return arg.substr( 0, pre.size() ) == pre;
 } // prefix
 
 
 void checkEnv( const char *args[], int &nargs ) {
-    char *value;
-
-    value = getenv( "__COMPILER__" );
-    if ( value != NULL ) {
-	compiler_name = value;
-#ifdef __DEBUG_H__
-	cerr << "env arg:\"" << compiler_name << "\"" << endl;
-#endif // __DEBUG_H__
-    } // if
-
-    value = getenv( "__GCC_MACHINE__" );
-    if ( value != NULL ) {
-	args[nargs] = ( *new string( value ) ).c_str(); // pass the argument along
-#ifdef __DEBUG_H__
-	cerr << "env arg:\"" << args[nargs] << "\"" << endl;
-#endif // __DEBUG_H__
+	char *value;
+
+	value = getenv( "__COMPILER__" );
+	if ( value != NULL ) {
+		compiler_name = value;
+#ifdef __DEBUG_H__
+		cerr << "env arg:\"" << compiler_name << "\"" << endl;
+#endif // __DEBUG_H__
+	} // if
+
+	value = getenv( "__GCC_MACHINE__" );
+	if ( value != NULL ) {
+		args[nargs] = ( *new string( value ) ).c_str(); // pass the argument along
+#ifdef __DEBUG_H__
+		cerr << "env arg:\"" << args[nargs] << "\"" << endl;
+#endif // __DEBUG_H__
+		nargs += 1;
+	} // if
+
+	value = getenv( "__GCC_VERSION__" );
+	if ( value != NULL ) {
+		args[nargs] = ( *new string( value ) ).c_str(); // pass the argument along
+#ifdef __DEBUG_H__
+		cerr << "env arg:\"" << args[nargs] << "\"" << endl;
+#endif // __DEBUG_H__
+		nargs += 1;
+	} // if
+} // checkEnv
+
+
+void rmtmpfile() {
+	if ( unlink( tmpname ) == -1 ) {					// remove tmpname
+		perror ( "CFA Translator error: cpp failed" );
+		exit( EXIT_FAILURE );
+	} // if
+	tmpfilefd = -1;										// mark closed
+} // rmtmpfile
+
+
+void sigTermHandler( int signal ) {
+	if ( tmpfilefd != -1 ) {							// RACE, file created ?
+		rmtmpfile();									// remove
+		exit( EXIT_FAILURE );							// terminate 
+	} // if
+} // sigTermHandler
+
+
+void Stage1( const int argc, const char * const argv[] ) {
+	int code;
+	int i;
+
+	string arg;
+	string bprefix;
+
+	const char *cpp_in = NULL;
+	const char *cpp_out = NULL;
+
+	bool CFA_flag = false;
+	bool cpp_flag = false;
+	const char *o_name = NULL;
+
+	const char *args[argc + 100];						// leave space for 100 additional cpp command line values
+	int nargs = 1;										// number of arguments in args list; 0 => command name
+	const char *uargs[20];								// leave space for 20 additional cfa-cpp command line values
+	int nuargs = 1;										// 0 => command name
+
+	signal( SIGINT,  sigTermHandler );
+	signal( SIGTERM, sigTermHandler );
+
+	// process all the arguments
+
+	checkEnv( args, nargs );							// arguments passed via environment variables
+
+	for ( i = 1; i < argc; i += 1 ) {
+#ifdef __DEBUG_H__
+		cerr << "argv[" << i << "]:\"" << argv[i] << "\"" << endl;
+#endif // __DEBUG_H__
+		arg = argv[i];
+#ifdef __DEBUG_H__
+		cerr << "arg:\"" << arg << "\"" << endl;
+#endif // __DEBUG_H__
+		if ( prefix( arg, "-" ) ) {
+			// strip g++ flags that are inappropriate or cause duplicates in subsequent passes
+
+			if ( arg == "-quiet" ) {
+			} else if ( arg == "-imultilib" || arg == "-imultiarch" ) {
+				i += 1;									// and the argument
+			} else if ( prefix( arg, "-A" ) ) {
+			} else if ( prefix( arg, "-D__GNU" ) ) {
+				//********
+				// GCC 5.6.0 SEPARATED THE -D FROM THE ARGUMENT!
+				//********
+			} else if ( arg == "-D" && prefix( argv[i + 1], "__GNU" ) ) {
+				i += 1;									// and the argument
+
+				// strip flags controlling cpp step
+
+			} else if ( arg == "-D__CPP__" ) {
+				cpp_flag = true;
+			} else if ( arg == "-D" && string( argv[i + 1] ) == "__CPP__" ) {
+				i += 1;									// and the argument
+				cpp_flag = true;
+			} else if ( arg == "-D__CFA__" ) {
+				CFA_flag = true;
+			} else if ( arg == "-D" && string( argv[i + 1] ) == "__CFA__" ) {
+				i += 1;									// and the argument
+				CFA_flag = true;
+			} else if ( prefix( arg, D__CFA_FLAGPREFIX__ ) ) {
+				uargs[nuargs] = ( *new string( arg.substr( D__CFA_FLAGPREFIX__.size() ) ) ).c_str();
+				nuargs += 1;
+			} else if ( arg == "-D" && prefix( argv[i + 1], D__CFA_FLAGPREFIX__.substr(2) ) ) {
+				uargs[nuargs] = ( *new string( string( argv[i + 1] ).substr( D__CFA_FLAGPREFIX__.size() - 2 ) ) ).c_str();
+				nuargs += 1;
+				i += 1;									// and the argument
+			} else if ( prefix( arg, D__GCC_BPREFIX__ ) ) {
+				bprefix = arg.substr( D__GCC_BPREFIX__.size() );
+			} else if ( arg == "-D" && prefix( argv[i + 1], D__GCC_BPREFIX__.substr(2) ) ) {
+				bprefix = string( argv[i + 1] ).substr( D__GCC_BPREFIX__.size() - 2 );
+				i += 1;									// and the argument
+
+				// all other flags
+
+			} else if ( arg == "-o" ) {
+				i += 1;
+				o_name = argv[i];
+			} else {
+				args[nargs] = argv[i];					// pass the flag along
+				nargs += 1;
+				// CPP flags with an argument
+				if ( arg == "-D" || arg == "-I" || arg == "-MF" || arg == "-MT" || arg == "-MQ" ||
+					 arg == "-include" || arg == "-imacros" || arg == "-idirafter" || arg == "-iprefix" ||
+					 arg == "-iwithprefix" || arg == "-iwithprefixbefore" || arg == "-isystem" || arg == "-isysroot" ) {
+					i += 1;
+					args[nargs] = argv[i];				// pass the argument along
+					nargs += 1;
+#ifdef __DEBUG_H__
+					cerr << "argv[" << i << "]:\"" << argv[i] << "\"" << endl;
+#endif // __DEBUG_H__
+				} else if ( arg == "-MD" || arg == "-MMD" ) {
+					args[nargs] = "-MF";				// insert before file
+					nargs += 1;
+					i += 1;
+					args[nargs] = argv[i];				// pass the argument along
+					nargs += 1;
+#ifdef __DEBUG_H__
+					cerr << "argv[" << i << "]:\"" << argv[i] << "\"" << endl;
+#endif // __DEBUG_H__
+				} // if
+			} // if
+		} else {										// obtain input and possibly output files
+			if ( cpp_in == NULL ) {
+				cpp_in = argv[i];
+#ifdef __DEBUG_H__
+				cerr << "cpp_in:\"" << cpp_in << "\"" << endl;
+#endif // __DEBUG_H__
+			} else if ( cpp_out == NULL ) {
+				cpp_out = argv[i];
+#ifdef __DEBUG_H__
+				cerr << "cpp_out:\"" << cpp_out << "\""<< endl;
+#endif // __DEBUG_H__
+			} else {
+				cerr << "Usage: " << argv[0] << " input-file [output-file] [options]" << endl;
+				exit( EXIT_FAILURE );
+			} // if
+		} // if
+	} // for
+
+#ifdef __DEBUG_H__
+	cerr << "args:";
+	for ( i = 1; i < nargs; i += 1 ) {
+		cerr << " " << args[i];
+	} // for
+	if ( cpp_in != NULL ) cerr << " " << cpp_in;
+	if ( cpp_out != NULL ) cerr << " " << cpp_out;
+	cerr << endl;
+#endif // __DEBUG_H__
+
+	if ( cpp_in == NULL ) {
+		cerr << "Usage: " << argv[0] << " input-file [output-file] [options]" << endl;
+		exit( EXIT_FAILURE );
+	} // if
+
+	if ( cpp_flag ) {
+		// The -E flag is specified on the cfa command so only run the preprocessor and output is written to standard
+		// output or -o. The call to cfa has a -E so it does not have to be added to the argument list.
+
+		args[0] = compiler_name.c_str();
+		args[nargs] = cpp_in;
+		nargs += 1;
+		if ( o_name != NULL ) {							// location for output
+			args[nargs] = "-o";
+			nargs += 1;
+			args[nargs] = o_name;
+			nargs += 1;
+		} // if
+		args[nargs] = NULL;								// terminate argument list
+
+#ifdef __DEBUG_H__
+		cerr << "nargs: " << nargs << endl;
+		for ( i = 0; args[i] != NULL; i += 1 ) {
+			cerr << args[i] << " ";
+		} // for
+		cerr << endl;
+#endif // __DEBUG_H__
+
+		execvp( args[0], (char *const *)args );			// should not return
+		perror( "CFA Translator error: cpp level, execvp" );
+		exit( EXIT_FAILURE );
+	} // if
+
+	// Create a temporary file to store output of the C preprocessor.
+
+	tmpfilefd = mkstemp( tmpname );
+	if ( tmpfilefd == -1 ) {
+		perror( "CFA Translator error: cpp level, mkstemp" );
+		exit( EXIT_FAILURE );
+	} // if
+
+#ifdef __DEBUG_H__
+	cerr << "tmpname:" << tmpname << " tmpfilefd:" << tmpfilefd << endl;
+#endif // __DEBUG_H__
+
+	// Run the C preprocessor and save the output in tmpfile.
+
+	if ( fork() == 0 ) {								 // child process ?
+		// -o xxx.ii cannot be used to write the output file from cpp because no output file is created if cpp detects
+		// an error (e.g., cannot find include file). Whereas, output is always generated, even when there is an error,
+		// when cpp writes to stdout. Hence, stdout is redirected into the temporary file.
+		if ( freopen( tmpname, "w", stdout ) == NULL ) { // redirect stdout to tmpname
+			perror( "CFA Translator error: cpp level, freopen" );
+			exit( EXIT_FAILURE );
+		} // if
+
+		args[0] = compiler_name.c_str();
+		args[nargs] = cpp_in;							// input to cpp
+		nargs += 1;
+		args[nargs] = NULL;								// terminate argument list
+
+#ifdef __DEBUG_H__
+		cerr << "cpp nargs: " << nargs << endl;
+		for ( i = 0; args[i] != NULL; i += 1 ) {
+			cerr << args[i] << " ";
+		} // for
+		cerr << endl;
+#endif // __DEBUG_H__
+
+		execvp( args[0], (char *const *)args );			// should not return
+		perror( "CFA Translator error: cpp level, execvp" );
+		exit( EXIT_FAILURE );
+	} // if
+
+	wait( &code );										// wait for child to finish
+
+#ifdef __DEBUG_H__
+	cerr << "return code from cpp:" << WEXITSTATUS(code) << endl;
+#endif // __DEBUG_H__
+
+	if ( WIFSIGNALED(code) != 0 ) {						// child failed ?
+		rmtmpfile();									// remove tmpname
+		cerr << "CFA Translator error: cpp failed with signal " << WTERMSIG(code) << endl;
+		exit( EXIT_FAILURE );
+	} // if
+
+	if ( WEXITSTATUS(code) != 0 ) {						// child error ?
+		rmtmpfile();									// remove tmpname
+		exit( WEXITSTATUS( code ) );					// do not continue
+	} // if
+
+	// If -CFA flag specified, run the cfa-cpp preprocessor on the temporary file, and output is written to standard
+	// output.  Otherwise, run the cfa-cpp preprocessor on the temporary file and save the result into the output file.
+
+	if ( fork() == 0 ) {								// child runs CFA
+		uargs[0] = ( *new string( bprefix + "/cfa-cpp" ) ).c_str();
+
+		uargs[nuargs] = "-p";
+		nuargs += 1;
+
+		uargs[nuargs] = tmpname;
+		nuargs += 1;
+		if ( o_name != NULL ) {
+			uargs[nuargs] = o_name;
+			nuargs += 1;
+		} else if ( ! CFA_flag ) {						// run cfa-cpp ?
+			uargs[nuargs] = cpp_out;
+			nuargs += 1;
+		} // if
+		uargs[nuargs] = NULL;							// terminate argument list
+
+#ifdef __DEBUG_H__
+		cerr << "cfa-cpp nuargs: " << o_name << " " << CFA_flag << " " << nuargs << endl;
+		for ( i = 0; uargs[i] != NULL; i += 1 ) {
+			cerr << uargs[i] << " ";
+		} // for
+		cerr << endl;
+#endif // __DEBUG_H__
+
+		execvp( uargs[0], (char * const *)uargs );		// should not return
+		perror( "CFA Translator error: cpp level, execvp" );
+		exit( EXIT_FAILURE );
+	} // if
+
+	wait( &code );										// wait for child to finish
+
+#ifdef __DEBUG_H__
+	cerr << "return code from cfa-cpp:" << WEXITSTATUS(code) << endl;
+#endif // __DEBUG_H__
+
+	// Must unlink here because file must exist across execvp.
+	rmtmpfile();										// remove tmpname
+
+	if ( WIFSIGNALED(code) ) {							// child failed ?
+		cerr << "CFA Translator error: cfa-cpp failed with signal " << WTERMSIG(code) << endl;
+		exit( EXIT_FAILURE );
+	} // if
+
+	exit( WEXITSTATUS(code) );
+} // Stage1
+
+
+void Stage2( const int argc, const char * const * argv ) {
+	int i;
+
+	string arg;
+
+	const char *cpp_in = NULL;
+
+	const char *args[argc + 100];						// leave space for 100 additional cfa command line values
+	int nargs = 1;										// number of arguments in args list; 0 => command name
+
+	// process all the arguments
+
+	checkEnv( args, nargs );							// arguments passed via environment variables
+
+	for ( i = 1; i < argc; i += 1 ) {
+#ifdef __DEBUG_H__
+		cerr << "argv[" << i << "]:\"" << argv[i] << "\"" << endl;
+#endif // __DEBUG_H__
+		arg = argv[i];
+#ifdef __DEBUG_H__
+		cerr << "arg:\"" << arg << "\"" << endl;
+#endif // __DEBUG_H__
+		if ( prefix( arg, "-" ) ) {
+			// strip inappropriate flags
+
+			if ( arg == "-quiet" || arg == "-version" || arg == "-fpreprocessed" ||
+				 // Currently CFA does not suppose precompiled .h files.
+				 prefix( arg, "--output-pch" ) ) {
+
+				// strip inappropriate flags with an argument
+
+			} else if ( arg == "-auxbase" || arg == "-auxbase-strip" || arg == "-dumpbase" ) {
+				i += 1;
+#ifdef __DEBUG_H__
+				cerr << "arg:\"" << argv[i] << "\"" << endl;
+#endif // __DEBUG_H__
+
+				// all other flags
+
+			} else {
+				args[nargs] = argv[i];					// pass the flag along
+				nargs += 1;
+				if ( arg == "-o" ) {
+					i += 1;
+					args[nargs] = argv[i];				// pass the argument along
+					nargs += 1;
+#ifdef __DEBUG_H__
+					cerr << "arg:\"" << argv[i] << "\"" << endl;
+#endif // __DEBUG_H__
+				} // if
+			} // if
+		} else {										// obtain input and possibly output files
+			if ( cpp_in == NULL ) {
+				cpp_in = argv[i];
+#ifdef __DEBUG_H__
+				cerr << "cpp_in:\"" << cpp_in << "\"" << endl;
+#endif // __DEBUG_H__
+			} else {
+				cerr << "Usage: " << argv[0] << " input-file [output-file] [options]" << endl;
+				exit( EXIT_FAILURE );
+			} // if
+		} // if
+	} // for
+
+#ifdef __DEBUG_H__
+	cerr << "args:";
+	for ( i = 1; i < nargs; i += 1 ) {
+		cerr << " " << args[i];
+	} // for
+	cerr << endl;
+	if ( cpp_in != NULL ) cerr << " " << cpp_in;
+#endif // __DEBUG_H__
+
+	args[0] = compiler_name.c_str();
+	args[nargs] = "-S";									// only compile and put assembler output in specified file
 	nargs += 1;
-    } // if
-
-    value = getenv( "__GCC_VERSION__" );
-    if ( value != NULL ) {
-	args[nargs] = ( *new string( value ) ).c_str(); // pass the argument along
-#ifdef __DEBUG_H__
-	cerr << "env arg:\"" << args[nargs] << "\"" << endl;
-#endif // __DEBUG_H__
-	nargs += 1;
-    } // if
-} // checkEnv
-
-
-void rmtmpfile() {
-    if ( unlink( tmpname ) == -1 ) {			// remove tmpname
-	perror ( "CFA Translator error: cpp failed" );
-	exit( EXIT_FAILURE );
-    } // if
-    tmpfilefd = -1;					// mark closed
-} // rmtmpfile
-
-
-void sigTermHandler( int signal ) {
-    if ( tmpfilefd != -1 ) {				// RACE, file created ?
-	rmtmpfile();					// remove
-	exit( EXIT_FAILURE );				// terminate 
-    } // if
-} // sigTermHandler
-
-
-void Stage1( const int argc, const char * const argv[] ) {
-    int code;
-    int i;
-
-    string arg;
-    string bprefix;
-
-    const char *cpp_in = NULL;
-    const char *cpp_out = NULL;
-
-    bool CFA_flag = false;
-    bool cpp_flag = false;
-    const char *o_name = NULL;
-
-    const char *args[argc + 100];			// leave space for 100 additional cpp command line values
-    int nargs = 1;					// number of arguments in args list; 0 => command name
-    const char *uargs[20];				// leave space for 20 additional cfa-cpp command line values
-    int nuargs = 1;					// 0 => command name
-
-    signal( SIGINT,  sigTermHandler );
-    signal( SIGTERM, sigTermHandler );
-
-    // process all the arguments
-
-    checkEnv( args, nargs );				// arguments passed via environment variables
-
-    for ( i = 1; i < argc; i += 1 ) {
-#ifdef __DEBUG_H__
-	cerr << "argv[" << i << "]:\"" << argv[i] << "\"" << endl;
-#endif // __DEBUG_H__
-	arg = argv[i];
-#ifdef __DEBUG_H__
-	cerr << "arg:\"" << arg << "\"" << endl;
-#endif // __DEBUG_H__
-	if ( prefix( arg, "-" ) ) {
-	    // strip g++ flags that are inappropriate or cause duplicates in subsequent passes
-
-	    if ( arg == "-quiet" ) {
-	    } else if ( arg == "-imultilib" || arg == "-imultiarch" ) {
-		i += 1;					// and the argument
-	    } else if ( prefix( arg, "-A" ) ) {
-	    } else if ( prefix( arg, "-D__GNU" ) ) {
-	    //********
-	    // GCC 5.6.0 SEPARATED THE -D FROM THE ARGUMENT!
-	    //********
-	    } else if ( arg == "-D" && prefix( argv[i + 1], "__GNU" ) ) {
-		i += 1;					// and the argument
-
-	    // strip flags controlling cpp step
-
-	    } else if ( arg == "-D__CPP__" ) {
-		cpp_flag = true;
-	    } else if ( arg == "-D" && string( argv[i + 1] ) == "__CPP__" ) {
-		i += 1;					// and the argument
-		cpp_flag = true;
-	    } else if ( arg == "-D__CFA__" ) {
-		CFA_flag = true;
-	    } else if ( arg == "-D" && string( argv[i + 1] ) == "__CFA__" ) {
-		i += 1;					// and the argument
-		CFA_flag = true;
-	    } else if ( prefix( arg, D__CFA_FLAGPREFIX__ ) ) {
-		uargs[nuargs] = ( *new string( arg.substr( D__CFA_FLAGPREFIX__.size() ) ) ).c_str();
-		nuargs += 1;
-	    } else if ( arg == "-D" && prefix( argv[i + 1], D__CFA_FLAGPREFIX__.substr(2) ) ) {
-		uargs[nuargs] = ( *new string( string( argv[i + 1] ).substr( D__CFA_FLAGPREFIX__.size() - 2 ) ) ).c_str();
-		nuargs += 1;
-		i += 1;					// and the argument
-	    } else if ( prefix( arg, D__GCC_BPREFIX__ ) ) {
-		bprefix = arg.substr( D__GCC_BPREFIX__.size() );
-	    } else if ( arg == "-D" && prefix( argv[i + 1], D__GCC_BPREFIX__.substr(2) ) ) {
-		bprefix = string( argv[i + 1] ).substr( D__GCC_BPREFIX__.size() - 2 );
-		i += 1;					// and the argument
-
-	    // all other flags
-
-	    } else if ( arg == "-o" ) {
-	        i += 1;
-	        o_name = argv[i];
-	    } else {
-		args[nargs] = argv[i];			// pass the flag along
-		nargs += 1;
-		// CPP flags with an argument
-		if ( arg == "-D" || arg == "-I" || arg == "-MF" || arg == "-MT" || arg == "-MQ" ||
-		     arg == "-include" || arg == "-imacros" || arg == "-idirafter" || arg == "-iprefix" ||
-		     arg == "-iwithprefix" || arg == "-iwithprefixbefore" || arg == "-isystem" || arg == "-isysroot" ) {
-		    i += 1;
-		    args[nargs] = argv[i];		// pass the argument along
-		    nargs += 1;
-#ifdef __DEBUG_H__
-		    cerr << "argv[" << i << "]:\"" << argv[i] << "\"" << endl;
-#endif // __DEBUG_H__
-		} else if ( arg == "-MD" || arg == "-MMD" ) {
-		    args[nargs] = "-MF";		// insert before file
-		    nargs += 1;
-		    i += 1;
-		    args[nargs] = argv[i];		// pass the argument along
-		    nargs += 1;
-#ifdef __DEBUG_H__
-		    cerr << "argv[" << i << "]:\"" << argv[i] << "\"" << endl;
-#endif // __DEBUG_H__
-		} // if
-	    } // if
-	} else {					// obtain input and possibly output files
-	    if ( cpp_in == NULL ) {
-		cpp_in = argv[i];
-#ifdef __DEBUG_H__
-		cerr << "cpp_in:\"" << cpp_in << "\"" << endl;
-#endif // __DEBUG_H__
-	    } else if ( cpp_out == NULL ) {
-		cpp_out = argv[i];
-#ifdef __DEBUG_H__
-		cerr << "cpp_out:\"" << cpp_out << "\""<< endl;
-#endif // __DEBUG_H__
-	    } else {
-		cerr << "Usage: " << argv[0] << " input-file [output-file] [options]" << endl;
-		exit( EXIT_FAILURE );
-	    } // if
-	} // if
-    } // for
-
-#ifdef __DEBUG_H__
-    cerr << "args:";
-    for ( i = 1; i < nargs; i += 1 ) {
-	cerr << " " << args[i];
-    } // for
-    if ( cpp_in != NULL ) cerr << " " << cpp_in;
-    if ( cpp_out != NULL ) cerr << " " << cpp_out;
-    cerr << endl;
-#endif // __DEBUG_H__
-
-    if ( cpp_in == NULL ) {
-	cerr << "Usage: " << argv[0] << " input-file [output-file] [options]" << endl;
-	exit( EXIT_FAILURE );
-    } // if
-
-    if ( cpp_flag ) {
-	// The -E flag is specified on the cfa command so only run the preprocessor and output is written to standard
-	// output or -o. The call to cfa has a -E so it does not have to be added to the argument list.
-
-	args[0] = compiler_name.c_str();
 	args[nargs] = cpp_in;
 	nargs += 1;
-	if ( o_name != NULL ) {				// location for output
-	    args[nargs] = "-o";
-	    nargs += 1;
-	    args[nargs] = o_name;
-	    nargs += 1;
-	} // if
-	args[nargs] = NULL;				// terminate argument list
-
-#ifdef __DEBUG_H__
-	cerr << "nargs: " << nargs << endl;
+	args[nargs] = NULL;									// terminate argument list
+
+#ifdef __DEBUG_H__
+	cerr << "stage2 nargs: " << nargs << endl;
 	for ( i = 0; args[i] != NULL; i += 1 ) {
-	    cerr << args[i] << " ";
+		cerr << args[i] << " ";
 	} // for
 	cerr << endl;
 #endif // __DEBUG_H__
 
-	execvp( args[0], (char *const *)args );		// should not return
+	execvp( args[0], (char * const *)args );			// should not return
 	perror( "CFA Translator error: cpp level, execvp" );
-	exit( EXIT_FAILURE );
-    } // if
-
-    // Create a temporary file to store output of the C preprocessor.
-
-    tmpfilefd = mkstemp( tmpname );
-    if ( tmpfilefd == -1 ) {
-	perror( "CFA Translator error: cpp level, mkstemp" );
-	exit( EXIT_FAILURE );
-    } // if
-
-#ifdef __DEBUG_H__
-    cerr << "tmpname:" << tmpname << " tmpfilefd:" << tmpfilefd << endl;
-#endif // __DEBUG_H__
-
-    // Run the C preprocessor and save the output in tmpfile.
-
-    if ( fork() == 0 ) {				// child process ?
-	// -o xxx.ii cannot be used to write the output file from cpp because no output file is created if cpp detects
-	// an error (e.g., cannot find include file). Whereas, output is always generated, even when there is an error,
-	// when cpp writes to stdout. Hence, stdout is redirected into the temporary file.
-	if ( freopen( tmpname, "w", stdout ) == NULL ) { // redirect stdout to tmpname
-	    perror( "CFA Translator error: cpp level, freopen" );
-	    exit( EXIT_FAILURE );
-	} // if
-
-	args[0] = compiler_name.c_str();
-	args[nargs] = cpp_in;				// input to cpp
-	nargs += 1;
-	args[nargs] = NULL;				// terminate argument list
-
-#ifdef __DEBUG_H__
-	cerr << "cpp nargs: " << nargs << endl;
-	for ( i = 0; args[i] != NULL; i += 1 ) {
-	    cerr << args[i] << " ";
-	} // for
-	cerr << endl;
-#endif // __DEBUG_H__
-
-	execvp( args[0], (char *const *)args );		// should not return
-	perror( "CFA Translator error: cpp level, execvp" );
-	exit( EXIT_FAILURE );
-    } // if
-
-    wait( &code );					// wait for child to finish
-
-#ifdef __DEBUG_H__
-    cerr << "return code from cpp:" << WEXITSTATUS(code) << endl;
-#endif // __DEBUG_H__
-
-    if ( WIFSIGNALED(code) != 0 ) {			// child failed ?
-	rmtmpfile();					// remove tmpname
-	cerr << "CFA Translator error: cpp failed with signal " << WTERMSIG(code) << endl;
-	exit( EXIT_FAILURE );
-    } // if
-
-    if ( WEXITSTATUS(code) != 0 ) {			// child error ?
-	rmtmpfile();					// remove tmpname
-	exit( WEXITSTATUS( code ) );			// do not continue
-    } // if
-
-    // If -CFA flag specified, run the cfa-cpp preprocessor on the temporary file, and output is written to standard
-    // output.  Otherwise, run the cfa-cpp preprocessor on the temporary file and save the result into the output file.
-
-    if ( fork() == 0 ) {				// child runs CFA
-	uargs[0] = ( *new string( bprefix + "/cfa-cpp" ) ).c_str();
-
-	uargs[nuargs] = "-p";
-	nuargs += 1;
-
-	uargs[nuargs] = tmpname;
-	nuargs += 1;
-	if ( o_name != NULL ) {
-	    uargs[nuargs] = o_name;
-	    nuargs += 1;
-	} else if ( ! CFA_flag ) {			// run cfa-cpp ?
-	    uargs[nuargs] = cpp_out;
-	    nuargs += 1;
-	} // if
-	uargs[nuargs] = NULL;				// terminate argument list
-
-#ifdef __DEBUG_H__
-	cerr << "cfa-cpp nuargs: " << o_name << " " << CFA_flag << " " << nuargs << endl;
-	for ( i = 0; uargs[i] != NULL; i += 1 ) {
-	    cerr << uargs[i] << " ";
-	} // for
-	cerr << endl;
-#endif // __DEBUG_H__
-
-	execvp( uargs[0], (char * const *)uargs );	// should not return
-	perror( "CFA Translator error: cpp level, execvp" );
-	exit( EXIT_FAILURE );
-    } // if
-
-    wait( &code );					// wait for child to finish
-
-#ifdef __DEBUG_H__
-    cerr << "return code from cfa-cpp:" << WEXITSTATUS(code) << endl;
-#endif // __DEBUG_H__
-
-    // Must unlink here because file must exist across execvp.
-    rmtmpfile();					// remove tmpname
-
-    if ( WIFSIGNALED(code) ) {				// child failed ?
-	cerr << "CFA Translator error: cfa-cpp failed with signal " << WTERMSIG(code) << endl;
-	exit( EXIT_FAILURE );
-    } // if
-
-    exit( WEXITSTATUS(code) );
-} // Stage1
-
-
-void Stage2( const int argc, const char * const * argv ) {
-    int i;
-
-    string arg;
-
-    const char *cpp_in = NULL;
-
-    const char *args[argc + 100];			// leave space for 100 additional cfa command line values
-    int nargs = 1;					// number of arguments in args list; 0 => command name
-
-    // process all the arguments
-
-    checkEnv( args, nargs );				// arguments passed via environment variables
-
-    for ( i = 1; i < argc; i += 1 ) {
-#ifdef __DEBUG_H__
-	cerr << "argv[" << i << "]:\"" << argv[i] << "\"" << endl;
-#endif // __DEBUG_H__
-	arg = argv[i];
-#ifdef __DEBUG_H__
-	cerr << "arg:\"" << arg << "\"" << endl;
-#endif // __DEBUG_H__
-	if ( prefix( arg, "-" ) ) {
-	    // strip inappropriate flags
-
-	    if ( arg == "-quiet" || arg == "-version" || arg == "-fpreprocessed" ||
-		 // Currently CFA does not suppose precompiled .h files.
-		 prefix( arg, "--output-pch" ) ) {
-
-	    // strip inappropriate flags with an argument
-
-	    } else if ( arg == "-auxbase" || arg == "-auxbase-strip" || arg == "-dumpbase" ) {
-		i += 1;
-#ifdef __DEBUG_H__
-		cerr << "arg:\"" << argv[i] << "\"" << endl;
-#endif // __DEBUG_H__
-
-	    // all other flags
-
-	    } else {
-		args[nargs] = argv[i];			// pass the flag along
-		nargs += 1;
-		if ( arg == "-o" ) {
-		    i += 1;
-		    args[nargs] = argv[i];		// pass the argument along
-		    nargs += 1;
-#ifdef __DEBUG_H__
-		    cerr << "arg:\"" << argv[i] << "\"" << endl;
-#endif // __DEBUG_H__
-		} // if
-	    } // if
-	} else {					// obtain input and possibly output files
-	    if ( cpp_in == NULL ) {
-		cpp_in = argv[i];
-#ifdef __DEBUG_H__
-		cerr << "cpp_in:\"" << cpp_in << "\"" << endl;
-#endif // __DEBUG_H__
-	    } else {
+	exit( EXIT_FAILURE );								// tell gcc not to go any further
+} // Stage2
+
+
+int main( const int argc, const char * const argv[], const char * const env[] ) {
+#ifdef __DEBUG_H__
+	for ( int i = 0; env[i] != NULL; i += 1 ) {
+		cerr << env[i] << endl;
+	} // for
+#endif // __DEBUG_H__
+
+	string arg = argv[1];
+
+	// Currently, stage 1 starts with flag -E and stage 2 with flag -fpreprocessed.
+
+	if ( arg == "-E" ) {
+#ifdef __DEBUG_H__
+		cerr << "Stage1" << endl;
+#endif // __DEBUG_H__
+		Stage1( argc, argv );
+	} else if ( arg == "-fpreprocessed" ) {
+#ifdef __DEBUG_H__
+		cerr << "Stage2" << endl;
+#endif // __DEBUG_H__
+		Stage2( argc, argv );
+	} else {
 		cerr << "Usage: " << argv[0] << " input-file [output-file] [options]" << endl;
 		exit( EXIT_FAILURE );
-	    } // if
-	} // if
-    } // for
-
-#ifdef __DEBUG_H__
-    cerr << "args:";
-    for ( i = 1; i < nargs; i += 1 ) {
-	cerr << " " << args[i];
-    } // for
-    cerr << endl;
-    if ( cpp_in != NULL ) cerr << " " << cpp_in;
-#endif // __DEBUG_H__
-
-    args[0] = compiler_name.c_str();
-    args[nargs] = "-S";					// only compile and put assembler output in specified file
-    nargs += 1;
-    args[nargs] = cpp_in;
-    nargs += 1;
-    args[nargs] = NULL;					// terminate argument list
-
-#ifdef __DEBUG_H__
-    cerr << "stage2 nargs: " << nargs << endl;
-    for ( i = 0; args[i] != NULL; i += 1 ) {
-	cerr << args[i] << " ";
-    } // for
-    cerr << endl;
-#endif // __DEBUG_H__
-
-    execvp( args[0], (char * const *)args );		// should not return
-    perror( "CFA Translator error: cpp level, execvp" );
-    exit( EXIT_FAILURE );				// tell gcc not to go any further
-} // Stage2
-
-
-int main( const int argc, const char * const argv[], const char * const env[] ) {
-#ifdef __DEBUG_H__
-    for ( int i = 0; env[i] != NULL; i += 1 ) {
-	cerr << env[i] << endl;
-    } // for
-#endif // __DEBUG_H__
-
-    string arg = argv[1];
-
-    // Currently, stage 1 starts with flag -E and stage 2 with flag -fpreprocessed.
-
-    if ( arg == "-E" ) {
-#ifdef __DEBUG_H__
-	cerr << "Stage1" << endl;
-#endif // __DEBUG_H__
-	Stage1( argc, argv );
-    } else if ( arg == "-fpreprocessed" ) {
-#ifdef __DEBUG_H__
-	cerr << "Stage2" << endl;
-#endif // __DEBUG_H__
-	Stage2( argc, argv );
-    } else {
-	cerr << "Usage: " << argv[0] << " input-file [output-file] [options]" << endl;
-	exit( EXIT_FAILURE );
-    } // if
+	} // if
 } // main
 
-
 // Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
 // compile-command: "make install" //
 // End: //
Index: driver/cfa.cc
===================================================================
--- driver/cfa.cc	(revision b8508a2e1ff21bb4fcf257c21b8086694f961c08)
+++ driver/cfa.cc	(revision b87a5edee8b2aa6c36e184150ebd60baf4c64251)
@@ -1,22 +1,24 @@
-//                              -*- Mode: C++ -*- 
-// 
-// CForall Version 1.0, Copyright (C) Peter A. Buhr 2002
-// 
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
 // cfa.cc -- 
-// 
+//
 // Author           : Peter A. Buhr
 // Created On       : Tue Aug 20 13:44:49 2002
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Fri May 15 15:01:26 2015
-// Update Count     : 108
-// 
+// Last Modified On : Sat May 16 07:47:05 2015
+// Update Count     : 111
+//
 
 #include <iostream>
-#include <cstdio>					// perror
-#include <cstdlib>					// putenv, exit
-#include <unistd.h>					// execvp
-#include <string>					// STL version
-
-#include "config.h"					// configure info
+#include <cstdio>										// perror
+#include <cstdlib>										// putenv, exit
+#include <unistd.h>										// execvp
+#include <string>										// STL version
+
+#include "config.h"										// configure info
 
 using std::cerr;
@@ -29,329 +31,331 @@
 
 bool prefix( string arg, string pre ) {
-    return arg.substr( 0, pre.size() ) == pre;
+	return arg.substr( 0, pre.size() ) == pre;
 } // prefix
 
 
 void shuffle( const char *args[], int S, int E, int N ) {
-    // S & E index 1 passed the end so adjust with -1
-#ifdef __DEBUG_H__
-    cerr << "shuffle:" << S << " " << E << " " << N << endl;
-#endif // __DEBUG_H__
-    for ( int j = E-1 + N; j > S-1 + N; j -=1 ) {
-#ifdef __DEBUG_H__
-	cerr << "\t" << j << " " << j-N << endl;
-#endif // __DEBUG_H__
-	args[j] = args[j-N];
-    } // for
+	// S & E index 1 passed the end so adjust with -1
+#ifdef __DEBUG_H__
+	cerr << "shuffle:" << S << " " << E << " " << N << endl;
+#endif // __DEBUG_H__
+	for ( int j = E-1 + N; j > S-1 + N; j -=1 ) {
+#ifdef __DEBUG_H__
+		cerr << "\t" << j << " " << j-N << endl;
+#endif // __DEBUG_H__
+		args[j] = args[j-N];
+	} // for
 } // shuffle
 
 
 int main( int argc, char *argv[] ) {
-    string Version( VERSION );				// current version number from CONFIG
-    string Major( "0" ), Minor( "0" ), Patch( "0" );	// default version numbers
-    int posn1 = Version.find( "." );			// find the divider between major and minor version numbers
-    if ( posn1 == -1 ) {				// not there ?
-	Major = Version;
-    } else {
-	Major = Version.substr( 0, posn1 );
-	int posn2 = Version.find( ".", posn1 + 1 );	// find the divider between minor and patch numbers
-	if ( posn2 == -1 ) {				// not there ?
-	    Minor = Version.substr( posn1 );
+	string Version( VERSION );							// current version number from CONFIG
+	string Major( "0" ), Minor( "0" ), Patch( "0" );	// default version numbers
+	int posn1 = Version.find( "." );					// find the divider between major and minor version numbers
+	if ( posn1 == -1 ) {								// not there ?
+		Major = Version;
 	} else {
-	    Minor = Version.substr( posn1 + 1, posn2 - posn1 - 1 );
-	    Patch = Version.substr( posn2 + 1 );
-	} // if
-    } // if
-
-    string installincdir( CFA_INCDIR );			// fixed location of cc1 and cfa-cpp commands
-    string installlibdir( CFA_LIBDIR );			// fixed location of include files
-
-    string heading;					// banner printed at start of cfa compilation
-    string arg;						// current command-line argument during command-line parsing
-    string Bprefix;					// path where gcc looks for compiler command steps
-    string langstd;					// language standard
-
-    string compiler_path( GCC_PATH );			// path/name of C compiler
-    string compiler_name;				// name of C compiler
-
-    bool nonoptarg = false;				// indicates non-option argument specified
-    bool link = true;					// linking as well as compiling
-    bool verbose = false;				// -v flag
-    bool quiet = false;					// -quiet flag
-    bool debug = true;					// -debug flag
-    bool help = false;					// -help flag
-    bool CFA_flag = false;				// -CFA flag
-    bool cpp_flag = false;				// -E or -M flag, preprocessor only
-    bool debugging = false;				// -g flag
-
-    const char *args[argc + 100];			// cfa command line values, plus some space for additional flags
-    int sargs = 1;					// starting location for arguments in args list
-    int nargs = sargs;					// number of arguments in args list; 0 => command name
-
-    const char *libs[argc + 20];			// non-user libraries must come separately, plus some added libraries and flags
-    int nlibs = 0;
-
-#ifdef __DEBUG_H__
-    cerr << "CFA:" << endl;
-#endif // __DEBUG_H__
-
-    // process command-line arguments
-
-    for ( int i = 1; i < argc; i += 1 ) {
-#ifdef __DEBUG_H__
-	cerr << "argv[" << i << "]:\"" << argv[i] << "\"" << endl;
-#endif // __DEBUG_H__
-	arg = argv[i];					// convert to string value
-#ifdef __DEBUG_H__
-	cerr << "arg:\"" << arg << "\"" << endl;
-#endif // __DEBUG_H__
-	if ( prefix( arg, "-" ) ) {
-	    // pass through arguments
-
-	    if ( arg == "-Xlinker" || arg == "-o" ) {
-		args[nargs] = argv[i];			// pass the argument along
-		nargs += 1;
-		i += 1;
-		if ( i == argc ) continue;		// next argument available ?
-		args[nargs] = argv[i];			// pass the argument along
-		nargs += 1;
-	    } else if ( arg == "-XCFA" ) {		// CFA pass through
-		i += 1;
-		args[nargs] = ( *new string( string("-D__CFA_FLAG__=") + argv[i] ) ).c_str();
-		nargs += 1;
-
-	    // CFA specific arguments
-
-	    } else if ( arg == "-CFA" ) {
-		CFA_flag = true;			// strip the -CFA flag
-		link = false;
-		args[nargs] = "-E";			// replace the argument with -E
-		nargs += 1;
-	    } else if ( arg == "-debug" ) {
-		debug = true;				// strip the debug flag
-	    } else if ( arg == "-nodebug" ) {
-		debug = false;				// strip the nodebug flag
-	    } else if ( arg == "-quiet" ) {
-		quiet = true;				// strip the quiet flag
-	    } else if ( arg == "-noquiet" ) {
-		quiet = false;				// strip the noquiet flag
-	    } else if ( arg == "-help" ) {
-		help = true;				// strip the help flag
-	    } else if ( arg == "-nohelp" ) {
-		help = false;				// strip the nohelp flag
-	    } else if ( arg == "-compiler" ) {
-		// use the user specified compiler
-		i += 1;
-		if ( i == argc ) continue;		// next argument available ?
-		compiler_path = argv[i];
-		if ( putenv( (char *)( *new string( string( "__U_COMPILER__=" ) + argv[i]) ).c_str() ) != 0 ) {
-		    cerr << argv[0] << " error, cannot set environment variable." << endl;
-		    exit( EXIT_FAILURE );
+		Major = Version.substr( 0, posn1 );
+		int posn2 = Version.find( ".", posn1 + 1 );		// find the divider between minor and patch numbers
+		if ( posn2 == -1 ) {							// not there ?
+			Minor = Version.substr( posn1 );
+		} else {
+			Minor = Version.substr( posn1 + 1, posn2 - posn1 - 1 );
+			Patch = Version.substr( posn2 + 1 );
 		} // if
-
-	    // C++ specific arguments
-
-	    } else if ( arg == "-v" ) {
-		verbose = true;				// verbosity required
-		args[nargs] = argv[i];			// pass the argument along
-		nargs += 1;
-	    } else if ( arg == "-g" ) {
-		debugging = true;			// symbolic debugging required
-		args[nargs] = argv[i];			// pass the argument along
-		nargs += 1;
-	    } else if ( prefix( arg, "-B" ) ) {
-		Bprefix = arg.substr(2);		// strip the -B flag
+	} // if
+
+	string installincdir( CFA_INCDIR );					// fixed location of cc1 and cfa-cpp commands
+	string installlibdir( CFA_LIBDIR );					// fixed location of include files
+
+	string heading;										// banner printed at start of cfa compilation
+	string arg;											// current command-line argument during command-line parsing
+	string Bprefix;										// path where gcc looks for compiler command steps
+	string langstd;										// language standard
+
+	string compiler_path( GCC_PATH );					// path/name of C compiler
+	string compiler_name;								// name of C compiler
+
+	bool nonoptarg = false;								// indicates non-option argument specified
+	bool link = true;									// linking as well as compiling
+	bool verbose = false;								// -v flag
+	bool quiet = false;									// -quiet flag
+	bool debug = true;									// -debug flag
+	bool help = false;									// -help flag
+	bool CFA_flag = false;								// -CFA flag
+	bool cpp_flag = false;								// -E or -M flag, preprocessor only
+	bool debugging = false;								// -g flag
+
+	const char *args[argc + 100];						// cfa command line values, plus some space for additional flags
+	int sargs = 1;										// starting location for arguments in args list
+	int nargs = sargs;									// number of arguments in args list; 0 => command name
+
+	const char *libs[argc + 20];						// non-user libraries must come separately, plus some added libraries and flags
+	int nlibs = 0;
+
+#ifdef __DEBUG_H__
+	cerr << "CFA:" << endl;
+#endif // __DEBUG_H__
+
+	// process command-line arguments
+
+	for ( int i = 1; i < argc; i += 1 ) {
+#ifdef __DEBUG_H__
+		cerr << "argv[" << i << "]:\"" << argv[i] << "\"" << endl;
+#endif // __DEBUG_H__
+		arg = argv[i];									// convert to string value
+#ifdef __DEBUG_H__
+		cerr << "arg:\"" << arg << "\"" << endl;
+#endif // __DEBUG_H__
+		if ( prefix( arg, "-" ) ) {
+			// pass through arguments
+
+			if ( arg == "-Xlinker" || arg == "-o" ) {
+				args[nargs] = argv[i];					// pass the argument along
+				nargs += 1;
+				i += 1;
+				if ( i == argc ) continue;				// next argument available ?
+				args[nargs] = argv[i];					// pass the argument along
+				nargs += 1;
+			} else if ( arg == "-XCFA" ) {				// CFA pass through
+				i += 1;
+				args[nargs] = ( *new string( string("-D__CFA_FLAG__=") + argv[i] ) ).c_str();
+				nargs += 1;
+
+				// CFA specific arguments
+
+			} else if ( arg == "-CFA" ) {
+				CFA_flag = true;						// strip the -CFA flag
+				link = false;
+				args[nargs] = "-E";						// replace the argument with -E
+				nargs += 1;
+			} else if ( arg == "-debug" ) {
+				debug = true;							// strip the debug flag
+			} else if ( arg == "-nodebug" ) {
+				debug = false;							// strip the nodebug flag
+			} else if ( arg == "-quiet" ) {
+				quiet = true;							// strip the quiet flag
+			} else if ( arg == "-noquiet" ) {
+				quiet = false;							// strip the noquiet flag
+			} else if ( arg == "-help" ) {
+				help = true;							// strip the help flag
+			} else if ( arg == "-nohelp" ) {
+				help = false;							// strip the nohelp flag
+			} else if ( arg == "-compiler" ) {
+				// use the user specified compiler
+				i += 1;
+				if ( i == argc ) continue;				// next argument available ?
+				compiler_path = argv[i];
+				if ( putenv( (char *)( *new string( string( "__U_COMPILER__=" ) + argv[i]) ).c_str() ) != 0 ) {
+					cerr << argv[0] << " error, cannot set environment variable." << endl;
+					exit( EXIT_FAILURE );
+				} // if
+
+				// C++ specific arguments
+
+			} else if ( arg == "-v" ) {
+				verbose = true;							// verbosity required
+				args[nargs] = argv[i];					// pass the argument along
+				nargs += 1;
+			} else if ( arg == "-g" ) {
+				debugging = true;						// symbolic debugging required
+				args[nargs] = argv[i];					// pass the argument along
+				nargs += 1;
+			} else if ( prefix( arg, "-B" ) ) {
+				Bprefix = arg.substr(2);				// strip the -B flag
+				args[nargs] = ( *new string( string("-D__GCC_BPREFIX__=") + Bprefix ) ).c_str();
+				nargs += 1;
+			} else if ( prefix( arg, "-b" ) ) {
+				if ( arg.length() == 2 ) {				// separate argument ?
+					i += 1;
+					if ( i == argc ) continue;			// next argument available ?
+					arg += argv[i];						// concatenate argument
+				} // if
+				// later versions of gcc require the -b option to appear at the start of the command line
+				shuffle( args, sargs, nargs, 1 );		// make room at front of argument list
+				args[sargs] = ( *new string( arg ) ).c_str(); // pass the argument along
+				if ( putenv( (char *)( *new string( string( "__GCC_MACHINE__=" ) + arg ) ).c_str() ) != 0 ) {
+					cerr << argv[0] << " error, cannot set environment variable." << endl;
+					exit( EXIT_FAILURE );
+				} // if
+				sargs += 1;
+				nargs += 1;
+			} else if ( prefix( arg, "-V" ) ) {
+				if ( arg.length() == 2 ) {				// separate argument ?
+					i += 1;
+					if ( i == argc ) continue;			// next argument available ?
+					arg += argv[i];						// concatenate argument
+				} // if
+				// later versions of gcc require the -V option to appear at the start of the command line
+				shuffle( args, sargs, nargs, 1 );		// make room at front of argument list
+				args[sargs] = ( *new string( arg ) ).c_str(); // pass the argument along
+				if ( putenv( (char *)( *new string( string( "__GCC_VERSION__=" ) + arg ) ).c_str() ) != 0 ) {
+					cerr << argv[0] << " error, cannot set environment variable." << endl;
+					exit( EXIT_FAILURE );
+				} // if
+				sargs += 1;
+				nargs += 1;
+			} else if ( arg == "-c" || arg == "-S" || arg == "-E" || arg == "-M" || arg == "-MM" ) {
+				args[nargs] = argv[i];					// pass the argument along
+				nargs += 1;
+				if ( arg == "-E" || arg == "-M" || arg == "-MM" ) {
+					cpp_flag = true;					// cpp only
+				} // if
+				link = false;                           // no linkage required
+			} else if ( arg[1] == 'l' ) {
+				// if the user specifies a library, load it after user code
+				libs[nlibs] = argv[i];
+				nlibs += 1;
+			} else {
+				// concatenate any other arguments
+				args[nargs] = argv[i];
+				nargs += 1;
+			} // if
+		} else {
+			// concatenate other arguments
+			args[nargs] = argv[i];
+			nargs += 1;
+			nonoptarg = true;
+		} // if
+	} // for
+
+#ifdef __DEBUG_H__
+	cerr << "args:";
+	for ( int i = 1; i < nargs; i += 1 ) {
+		cerr << " " << args[i];
+	} // for
+	cerr << endl;
+#endif // __DEBUG_H__
+
+	if ( cpp_flag && CFA_flag ) {
+		cerr << argv[0] << " error, cannot use -E and -CFA flags together." << endl;
+		exit( EXIT_FAILURE );
+	} // if
+
+	string d;
+	if ( debug ) {
+		d = "-d";
+	} // if
+
+	args[nargs] = "-I" CFA_INCDIR;
+	nargs += 1;
+
+	if ( link ) {
+		// include the cfa library in case it's needed
+		args[nargs] = "-L" CFA_LIBDIR;
+		nargs += 1;
+		args[nargs] = "-lcfa";
+		nargs += 1;
+	} // if
+
+	// add the correct set of flags based on the type of compile this is
+
+	args[nargs] = ( *new string( string("-D__CFA_MAJOR__=") + Major ) ).c_str();
+	nargs += 1;
+	args[nargs] = ( *new string( string("-D__CFA_MINOR__=") + Minor ) ).c_str();
+	nargs += 1;
+
+	if ( cpp_flag ) {
+		args[nargs] = "-D__CPP__";
+		nargs += 1;
+	} // if
+
+	if ( CFA_flag ) {
+		args[nargs] = "-D__CFA__";
+		nargs += 1;
+	} // if
+
+	if ( debug ) {
+		heading += " (debug)";
+		args[nargs] = "-D__CFA_DEBUG__";
+		nargs += 1;
+	} else {
+		heading += " (no debug)";
+	} // if
+
+	if ( Bprefix.length() == 0 ) {
+		Bprefix = installlibdir;
 		args[nargs] = ( *new string( string("-D__GCC_BPREFIX__=") + Bprefix ) ).c_str();
 		nargs += 1;
-	    } else if ( prefix( arg, "-b" ) ) {
-		if ( arg.length() == 2 ) {		// separate argument ?
-		    i += 1;
-		    if ( i == argc ) continue;		// next argument available ?
-		    arg += argv[i];			// concatenate argument
+	} // if
+
+	// execute the compilation command
+
+	args[0] = compiler_path.c_str();					// set compiler command for exec
+	// find actual name of the compiler independent of the path to it
+	int p = compiler_path.find_last_of( '/' );			// scan r -> l for first '/'
+	if ( p == -1 ) {
+		compiler_name = compiler_path;
+	} else {
+		compiler_name = *new string( compiler_path.substr( p + 1 ) );
+	} // if
+
+	if ( prefix( compiler_name, "gcc" ) ) {				// allow suffix on gcc name
+		args[nargs] = "-no-integrated-cpp";
+		nargs += 1;
+		args[nargs] = "-Wno-deprecated"; 
+		nargs += 1;
+		args[nargs] = "-std=c99";
+		nargs += 1;
+		args[nargs] = ( *new string( string("-B") + Bprefix + "/" ) ).c_str();
+		nargs += 1;
+	} else {
+		cerr << argv[0] << " error, compiler " << compiler_name << " not supported." << endl;
+		exit( EXIT_FAILURE );
+	} // if
+
+	for ( int i = 0; i < nlibs; i += 1 ) {				// copy non-user libraries after all user libraries
+		args[nargs] = libs[i];
+		nargs += 1;
+	} // for
+
+	args[nargs] = NULL;									// terminate with NULL
+
+#ifdef __DEBUG_H__
+	cerr << "nargs: " << nargs << endl;
+	cerr << "args:" << endl;
+	for ( int i = 0; args[i] != NULL; i += 1 ) {
+		cerr << " \"" << args[i] << "\"" << endl;
+	} // for
+#endif // __DEBUG_H__
+
+	if ( ! quiet ) {
+		cerr << "CFA " << "Version " << Version << heading << endl;
+
+		if ( help ) {
+			cerr <<
+				"-debug\t\t\t: use cfa runtime with debug checking" << endl <<
+				"-help\t\t\t: print this help message" << endl <<
+				"-quiet\t\t\t: print no messages from the cfa command" << endl <<
+				"-CFA\t\t\t: run the cpp preprocessor and the cfa-cpp translator" << endl <<
+				"-XCFA -cfa-cpp-flag\t: pass next flag as-is to the cfa-cpp translator" << endl <<
+				"...\t\t\t: any other " << compiler_name << " flags" << endl;
 		} // if
-		// later versions of gcc require the -b option to appear at the start of the command line
-		shuffle( args, sargs, nargs, 1 );	// make room at front of argument list
-		args[sargs] = ( *new string( arg ) ).c_str(); // pass the argument along
-		if ( putenv( (char *)( *new string( string( "__GCC_MACHINE__=" ) + arg ) ).c_str() ) != 0 ) {
-		    cerr << argv[0] << " error, cannot set environment variable." << endl;
-		    exit( EXIT_FAILURE );
-		} // if
-		sargs += 1;
-		nargs += 1;
-	    } else if ( prefix( arg, "-V" ) ) {
-		if ( arg.length() == 2 ) {		// separate argument ?
-		    i += 1;
-		    if ( i == argc ) continue;		// next argument available ?
-		    arg += argv[i];			// concatenate argument
-		} // if
-		// later versions of gcc require the -V option to appear at the start of the command line
-		shuffle( args, sargs, nargs, 1 );	// make room at front of argument list
-		args[sargs] = ( *new string( arg ) ).c_str(); // pass the argument along
-		if ( putenv( (char *)( *new string( string( "__GCC_VERSION__=" ) + arg ) ).c_str() ) != 0 ) {
-		    cerr << argv[0] << " error, cannot set environment variable." << endl;
-		    exit( EXIT_FAILURE );
-		} // if
-		sargs += 1;
-		nargs += 1;
-	    } else if ( arg == "-c" || arg == "-S" || arg == "-E" || arg == "-M" || arg == "-MM" ) {
-		args[nargs] = argv[i];			// pass the argument along
-		nargs += 1;
-		if ( arg == "-E" || arg == "-M" || arg == "-MM" ) {
-		    cpp_flag = true;			// cpp only
-		} // if
-		link = false;                           // no linkage required
-	    } else if ( arg[1] == 'l' ) {
-		// if the user specifies a library, load it after user code
-		libs[nlibs] = argv[i];
-		nlibs += 1;
-	    } else {
-		// concatenate any other arguments
-		args[nargs] = argv[i];
-		nargs += 1;
-	    } // if
-	} else {
-	    // concatenate other arguments
-	    args[nargs] = argv[i];
-	    nargs += 1;
-	    nonoptarg = true;
-	} // if
-    } // for
-
-#ifdef __DEBUG_H__
-    cerr << "args:";
-    for ( int i = 1; i < nargs; i += 1 ) {
-	cerr << " " << args[i];
-    } // for
-    cerr << endl;
-#endif // __DEBUG_H__
-
-    if ( cpp_flag && CFA_flag ) {
-	cerr << argv[0] << " error, cannot use -E and -CFA flags together." << endl;
+	} // if
+
+	if ( verbose ) {
+		if ( argc == 2 ) exit( EXIT_SUCCESS );			// if only the -v flag is specified, do not invoke gcc
+
+		for ( int i = 0; args[i] != NULL; i += 1 ) {
+			cerr << args[i] << " ";
+		} // for
+		cerr << endl;
+	} // if
+
+	if ( ! nonoptarg ) {
+		cerr << argv[0] << " error, no input files" << endl;
+		exit( EXIT_FAILURE );
+	} // if
+
+	// execute the command and return the result
+
+	execvp( args[0], (char *const *)args );				// should not return
+	perror( "CFA Translator error: cfa level, execvp" );
 	exit( EXIT_FAILURE );
-    } // if
-
-    string d;
-    if ( debug ) {
-	d = "-d";
-    } // if
-
-    args[nargs] = "-I" CFA_INCDIR;
-    nargs += 1;
-
-    if ( link ) {
-	// include the cfa library in case it's needed
-	args[nargs] = "-L" CFA_LIBDIR;
-	nargs += 1;
-	args[nargs] = "-lcfa";
-	nargs += 1;
-    } // if
-
-    // add the correct set of flags based on the type of compile this is
-
-    args[nargs] = ( *new string( string("-D__CFA_MAJOR__=") + Major ) ).c_str();
-    nargs += 1;
-    args[nargs] = ( *new string( string("-D__CFA_MINOR__=") + Minor ) ).c_str();
-    nargs += 1;
-
-    if ( cpp_flag ) {
-	args[nargs] = "-D__CPP__";
-	nargs += 1;
-    } // if
-
-    if ( CFA_flag ) {
-	args[nargs] = "-D__CFA__";
-	nargs += 1;
-    } // if
-
-    if ( debug ) {
-	heading += " (debug)";
-	args[nargs] = "-D__CFA_DEBUG__";
-	nargs += 1;
-    } else {
-	heading += " (no debug)";
-    } // if
-
-    if ( Bprefix.length() == 0 ) {
-	Bprefix = installlibdir;
-	args[nargs] = ( *new string( string("-D__GCC_BPREFIX__=") + Bprefix ) ).c_str();
-	nargs += 1;
-    } // if
-
-    // execute the compilation command
-
-    args[0] = compiler_path.c_str();			// set compiler command for exec
-    // find actual name of the compiler independent of the path to it
-    int p = compiler_path.find_last_of( '/' );		// scan r -> l for first '/'
-    if ( p == -1 ) {
-	compiler_name = compiler_path;
-    } else {
-	compiler_name = *new string( compiler_path.substr( p + 1 ) );
-    } // if
-
-    if ( prefix( compiler_name, "gcc" ) ) {		// allow suffix on gcc name
-	args[nargs] = "-no-integrated-cpp";
-	nargs += 1;
-	args[nargs] = "-Wno-deprecated"; 
-	nargs += 1;
-	args[nargs] = "-std=c99";
-	nargs += 1;
-	args[nargs] = ( *new string( string("-B") + Bprefix + "/" ) ).c_str();
-	nargs += 1;
-    } else {
-	cerr << argv[0] << " error, compiler " << compiler_name << " not supported." << endl;
-	exit( EXIT_FAILURE );
-    } // if
-
-    for ( int i = 0; i < nlibs; i += 1 ) {		// copy non-user libraries after all user libraries
-	args[nargs] = libs[i];
-	nargs += 1;
-    } // for
-
-    args[nargs] = NULL;					// terminate with NULL
-
-#ifdef __DEBUG_H__
-    cerr << "nargs: " << nargs << endl;
-    cerr << "args:" << endl;
-    for ( int i = 0; args[i] != NULL; i += 1 ) {
-	cerr << " \"" << args[i] << "\"" << endl;
-    } // for
-#endif // __DEBUG_H__
-
-    if ( ! quiet ) {
-	cerr << "CFA " << "Version " << Version << heading << endl;
-
-	if ( help ) {
-	    cerr <<
-		"-debug\t\t\t: use cfa runtime with debug checking" << endl <<
-		"-help\t\t\t: print this help message" << endl <<
-		"-quiet\t\t\t: print no messages from the cfa command" << endl <<
-		"-CFA\t\t\t: run the cpp preprocessor and the cfa-cpp translator" << endl <<
-		"-XCFA -cfa-cpp-flag\t: pass next flag as-is to the cfa-cpp translator" << endl <<
-		"...\t\t\t: any other " << compiler_name << " flags" << endl;
-	} // if
-    } // if
-
-    if ( verbose ) {
-	if ( argc == 2 ) exit( EXIT_SUCCESS );		// if only the -v flag is specified, do not invoke gcc
-
-	for ( int i = 0; args[i] != NULL; i += 1 ) {
-	    cerr << args[i] << " ";
-	} // for
-	cerr << endl;
-    } // if
-
-    if ( ! nonoptarg ) {
-	cerr << argv[0] << " error, no input files" << endl;
-	exit( EXIT_FAILURE );
-    } // if
-
-    // execute the command and return the result
-
-    execvp( args[0], (char *const *)args );		// should not return
-    perror( "CFA Translator error: cfa level, execvp" );
-    exit( EXIT_FAILURE );
 } // main
 
 // Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
 // compile-command: "make install" //
 // End: //
Index: driver/cpp.cc
===================================================================
--- driver/cpp.cc	(revision b8508a2e1ff21bb4fcf257c21b8086694f961c08)
+++ 	(revision )
@@ -1,379 +1,0 @@
-//                              -*- Mode: C++ -*- 
-// 
-// CForall Version 1.0, Copyright (C) Peter A. Buhr 2002
-// 
-// cpp.cc -- 
-// 
-// Author           : Peter A. Buhr
-// Created On       : Thu Aug 29 12:24:06 2002
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Apr 21 07:23:38 2015
-// Update Count     : 52
-// 
-
-#include <iostream>
-#include <string>
-#include <stdio.h>					// tempnam, freopen, perror
-#include <unistd.h>					// execvp, fork, unlink
-#include <sys/wait.h>					// wait
-
-#include "../config.h"					// configure info
-
-using namespace std;
-
-
-//#define __DEBUG_H__
-
-
-int main( int argc, char *argv[] ) {
-    int code;
-    int i;
-
-    string arg;
-    string bprefix;
-
-    string cpp_in;
-    string cpp_out;
-    string cpp;
-    string cpp_name( "gcc" );
-
-    bool CFA_flag = false;
-    bool cpp_flag = false;
-    bool gnu = false;
-
-    const char *args[argc + 100];			// leave space for 100 additional cfa command line values
-    int nargs = 1;					// 0 => command name
-    const char *argsCppOnly[argc];			// cpp only arguments
-    int nargsCppOnly = 0;
-    const char *argsCFAOnly[argc];			// CFA only arguments
-    int nargsCFAOnly = 0;
-
-    // get a name of a temporary file
-
-    char *tmpfile = tempnam( NULL, "CFA" );		// storage is not freed
-
-#ifdef __DEBUG_H__
-    cerr << "CPP:" << endl;
-#endif // __DEBUG_H__
-
-    // process all the arguments
-
-    for ( i = 1; i < argc; i += 1 ) {
-#ifdef __DEBUG_H__
-	cerr << "argv[" << i << "]:\"" << argv[i] << "\"" << endl;
-#endif // __DEBUG_H__
-	arg = argv[i];
-#ifdef __DEBUG_H__
-	cerr << "arg:\"" << arg << "\"" << endl;
-#endif // __DEBUG_H__
-	if ( arg.substr(0,1) == "-" ) {
-	    if ( arg == "-D__CFA__" ) {
-		CFA_flag = true;			// strip -D__CFA__ flag
-	    } else if ( arg == "-D__CPP__" ) {
-		cpp_flag = true;			// strip -D__CPP__ flag
-	    } else if ( arg.substr(0,sizeof("-D__GNU")-1) == "-D__GNU" ) {
-		gnu = true;				// strip -D__GNUxxx flags to remove duplication
-	    } else if ( arg == "-lang-c" ) {		// strip -lang-c flag
-	    } else if ( arg.substr(0,sizeof("-A")-1) == "-A" ) { // strip -A flags
-	    } else if ( arg.substr(0,sizeof("-D__STDC_HOSTED__")-1) == "-D__STDC_HOSTED__" ) { // strip this define: causes conflict
-	    } else if ( arg.substr(0,sizeof("-o")-1) == "-o" ) {
-		i += 1;					// strip -o flag and its argument
-	    } else if ( arg.substr(0,sizeof("-D__CFA_FLAG__")-1) == "-D__CFA_FLAG__" ) {
-		argsCFAOnly[nargsCFAOnly] = ( *new string( arg.substr(sizeof("-D__CFA_FLAG__")) ) ).c_str(); // pass argument along
-		nargsCFAOnly += 1;
-	    } else if ( arg == "-v" ) {
-		argsCppOnly[nargsCppOnly] = argv[i];	// pass argument along
-		nargsCppOnly += 1;
-	    } else if ( arg.substr(0,sizeof("-I")-1) == "-I" ) {
-		argsCppOnly[nargsCppOnly] = argv[i];	// pass argument along
-		nargsCppOnly += 1;
-	    } else if ( arg == "-C" || arg == "-P" || arg == "-H" ) {
-		argsCppOnly[nargsCppOnly] = argv[i];	// pass argument along
-		nargsCppOnly += 1;
-	    } else if ( arg.substr(0,sizeof("-W")-1) == "-W" ) {
-		argsCppOnly[nargsCppOnly] = argv[i];	// pass argument along
-		nargsCppOnly += 1;
-	    } else if ( arg == "-lint" ) {
-		argsCppOnly[nargsCppOnly] = argv[i];	// pass argument along
-		nargsCppOnly += 1;
-	    } else if ( arg == "-pedantic" || arg == "-pedantic-errors" ) {
-		argsCppOnly[nargsCppOnly] = argv[i];	// pass argument along
-		nargsCppOnly += 1;
-	    } else if ( arg == "-traditional" || arg == "-trigraphs" ) {
-		argsCppOnly[nargsCppOnly] = argv[i];	// pass argument along
-		nargsCppOnly += 1;
-	    } else if ( arg == "-dM" || arg == "-dD" ) {
-		argsCppOnly[nargsCppOnly] = argv[i];	// pass argument along
-		nargsCppOnly += 1;
-	    } else if ( arg == "-M" || arg == "-MG" || arg == "-MM" ) {
-		argsCppOnly[nargsCppOnly] = argv[i];	// pass argument along
-		nargsCppOnly += 1;
-	    } else if ( arg == "-MD" || arg == "-MMD" ) {
-		argsCppOnly[nargsCppOnly] = argv[i];	// pass argument along
-		nargsCppOnly += 1;
-		i += 1;
-		argsCppOnly[nargsCppOnly] = argv[i];	// pass argument along
-		nargsCppOnly += 1;
-#ifdef __DEBUG_H__
-		cerr << "argv[" << i << "]:\"" << argv[i] << "\"" << endl;
-#endif // __DEBUG_H__
-	    } else if ( arg == "-imacros" ) {
-		argsCppOnly[nargsCppOnly] = argv[i];	// pass argument along
-		nargsCppOnly += 1;
-		i += 1;
-		argsCppOnly[nargsCppOnly] = argv[i];	// pass argument along
-		nargsCppOnly += 1;
-#ifdef __DEBUG_H__
-		cerr << "argv[" << i << "]:\"" << argv[i] << "\"" << endl;
-#endif // __DEBUG_H__
-	    } else if ( arg == "-include" ) {
-		argsCppOnly[nargsCppOnly] = argv[i];	// pass argument along
-		nargsCppOnly += 1;
-		i += 1;
-		argsCppOnly[nargsCppOnly] = argv[i];	// pass argument along
-		nargsCppOnly += 1;
-#ifdef __DEBUG_H__
-		cerr << "argv[" << i << "]:\"" << argv[i] << "\"" << endl;
-#endif // __DEBUG_H__
-	    } else if ( arg == "-idirafter" ) {
-		argsCppOnly[nargsCppOnly] = argv[i];	// pass argument along
-		nargsCppOnly += 1;
-		i += 1;
-		argsCppOnly[nargsCppOnly] = argv[i];	// pass argument along
-		nargsCppOnly += 1;
-#ifdef __DEBUG_H__
-		cerr << "argv[" << i << "]:\"" << argv[i] << "\"" << endl;
-#endif // __DEBUG_H__
-	    } else if ( arg == "-iprefix" ) {
-		argsCppOnly[nargsCppOnly] = argv[i];	// pass argument along
-		nargsCppOnly += 1;
-		i += 1;
-		argsCppOnly[nargsCppOnly] = argv[i];	// pass argument along
-		nargsCppOnly += 1;
-#ifdef __DEBUG_H__
-		cerr << "argv[" << i << "]:\"" << argv[i] << "\"" << endl;
-#endif // __DEBUG_H__
-	    } else if ( arg == "-iwithprefix" ) {
-		argsCppOnly[nargsCppOnly] = argv[i];	// pass argument along
-		nargsCppOnly += 1;
-		i += 1;
-		argsCppOnly[nargsCppOnly] = argv[i];	// pass argument along
-		nargsCppOnly += 1;
-#ifdef __DEBUG_H__
-		cerr << "argv[" << i << "]:\"" << argv[i] << "\"" << endl;
-#endif // __DEBUG_H__
-	    } else if ( arg == "-isystem" ) {
-		argsCppOnly[nargsCppOnly] = argv[i];	// pass argument along
-		nargsCppOnly += 1;
-		i += 1;
-		argsCppOnly[nargsCppOnly] = argv[i];	// pass argument along
-		nargsCppOnly += 1;
-#ifdef __DEBUG_H__
-		cerr << "argv[" << i << "]:\"" << argv[i] << "\"" << endl;
-#endif // __DEBUG_H__
-	    } else if ( arg.substr(0,sizeof("-D__GCC_BPREFIX__")-1) == "-D__GCC_BPREFIX__" ) {
-		bprefix = arg.substr(sizeof("-D__GCC_BPREFIX__"));
-	    } else if ( arg.substr(0,sizeof("-D__GCC_MACHINE__")-1) == "-D__GCC_MACHINE__" ) {
-		argsCppOnly[nargsCppOnly] = "-b";	// pass argument along
-		nargsCppOnly += 1;
-		argsCppOnly[nargsCppOnly] = ( *new string(arg.substr(sizeof("-D__GCC_MACHINE__")) ) ).c_str(); // pass argument along
-		nargsCppOnly += 1;
-	    } else if ( arg.substr(0,sizeof("-D__GCC_VERSION__")-1) == "-D__GCC_VERSION__" ) {
-		argsCppOnly[nargsCppOnly] = "-V";	// pass argument along
-		nargsCppOnly += 1;
-		argsCppOnly[nargsCppOnly] = ( *new string( arg.substr(sizeof("-D__GCC_VERSION__")) ) ).c_str(); // pass argument along
-		nargsCppOnly += 1;
-	    } else if ( arg.substr(0,sizeof("-D__CPP_NAME__")-1) == "-D__CPP_NAME__" ) {
-		cpp_name = arg.substr(sizeof("-D__CPP_NAME__"));
-	    } else if ( arg.substr(1,1) != "+" ) {
-		args[nargs] = argv[i];			// pass argument along
-		nargs += 1;
-	    } // if
-	} else {
-	    if ( cpp_in.length() == 0 ) {
-		cpp_in = arg;
-#ifdef __DEBUG_H__
-		cerr << "cpp_in:\"" << cpp_in << "\"" << endl;
-#endif // __DEBUG_H__
-	    } else if ( cpp_out.length() == 0 ) {
-		cpp_out = arg;
-#ifdef __DEBUG_H__
-		cerr << "cpp_out:\"" << cpp_out << "\""<< endl;
-#endif // __DEBUG_H__
-	    } else {
-		cerr << "Usage: " << argv[0] << " input-file [output-file] [options]" << endl;
-		exit( 1 );
-	    } // if
-	} // if
-    } // for
-
-    argsCppOnly[nargsCppOnly] = "-D__cplusplus";
-    nargsCppOnly += 1;
-
-    if ( cpp_in.length() == 0 ) {
-	cerr << "Usage: " << argv[0] << " input-file [output-file] [options]" << endl;
-	exit( 1 );
-    } // if
-
-    if ( cpp_flag && CFA_flag ) {
-	cerr << argv[0] << " Error cannot use -E and -CFA flags together." << endl;
-	exit( EXIT_FAILURE );
-    } // if
-
-    // The -E flag is specified so only run the preprocessor and output is
-    // written to standard output.
-    //
-    // OR
-    //
-    // The preprocessor is called internally during compilation, probably by
-    // "collect" during linking to compile some ctor/dtor code. In this case,
-    // the cfa-cpp preprocessor is not run.  Output is redirected to cpp_out
-
-    if ( cpp_flag || bprefix.length() == 0 ) {
-	if ( ! cpp_flag ) {
-	    if ( freopen( cpp_out.c_str(), "w", stdout ) == NULL ) { // redirect stdout if not -E
-		cerr << argv[0] << ": Error can't write to " << cpp_out << endl;
-		exit( EXIT_FAILURE );
-	    } // if
-
-	    // If called by collect, must prevent the compiler from recursively
-	    // calling this cpp through the -B path. To stop the recursion,
-	    // sent the COMPILER_PATH environment variable to the NULL string,
-	    // which removes the -B path supplied on the initial cfa command.
-
-	    if ( gnu ) {
-		putenv( "COMPILER_PATH=" );
-	    } // if
-	} // if
-
-	if ( bprefix.length() == 0 ) {			// collect ?
-	    args[0] = "gcc";				// use gcc
-	} else {
-	    args[0] = cpp_name.c_str();
-	} // if
-	args[nargs] = "-E";
-	nargs += 1;
-
-	for ( i = 0; i < nargsCppOnly; i += 1 ) {	// copy cpp only arguments
-	    args[nargs] = argsCppOnly[i];
-	    nargs += 1;
-	} // if
-
-	args[nargs] = cpp_in.c_str();
-	nargs += 1;
-	args[nargs] = NULL;				// terminate argument list
-
-#ifdef __DEBUG_H__
-	cerr << "nargs: " << nargs << endl;
-	for ( i = 0; args[i] != NULL; i += 1 ) {
-	    cerr << args[i] << " ";
-	} // for
-	cerr << endl;
-#endif // __DEBUG_H__
-
-	execvp( args[0], (char *const *)args );		// should not return
-	perror( "CFA translator error: cpp level, exec" );
-	exit( EXIT_FAILURE );
-    } // if
-
-    // Run the C preprocessor and save the output in tmpfile.
-
-    if ( fork() == 0 ) {				// child process ?
-	if ( freopen( tmpfile, "w", stdout ) == NULL) {	// redirect output to tmpfile
-	    cerr << argv[0] << ": Error can't write to " << tmpfile << endl;
-	    exit( EXIT_FAILURE );
-	} // if
-
-	args[0] = cpp_name.c_str();
-	args[nargs] = "-E";
-	nargs += 1;
-
-	for ( i = 0; i < nargsCppOnly; i += 1 ) {	// copy cpp only arguments
-	    args[nargs] = argsCppOnly[i];
-	    nargs += 1;
-	} // if
-
-	args[nargs] = cpp_in.c_str();
-	nargs += 1;
-	args[nargs] = NULL;				// terminate argument list
-
-#ifdef __DEBUG_H__
-	cerr << "cpp nargs: " << nargs << endl;
-	for ( i = 0; args[i] != NULL; i += 1 ) {
-	    cerr << args[i] << " ";
-	} // for
-	cerr << endl;
-#endif // __DEBUG_H__
-
-	execvp( args[0], (char *const *)args );		// should not return
-	perror( "CFA translator error: cpp level, exec" );
-	exit( EXIT_FAILURE );
-    } // if
-
-    wait( &code );					// wait for child to finish
-
-    if ( WIFSIGNALED(code) != 0 ) {			// child completed successfully ?
-	unlink( tmpfile );
-	cerr << "CFA translator error: cpp failed with signal " << WTERMSIG(code) << endl;
-	exit( EXIT_FAILURE );
-    } // if
-
-    // If -CFA flag specified, run the cfa-cpp preprocessor on the temporary
-    // file, and output is written to standard output.  Otherwise, run the
-    // cfa-cpp preprocessor on the temporary file and save the result into the
-    // output file.
-
-    if ( fork() == 0 ) {				// child process ?
-	args[0] = ( *new string( bprefix + "/cfa-cpp" ) ).c_str();
-
-	for ( i = 0; i < nargsCFAOnly; i += 1 ) {	// copy CFA only arguments
-	    args[nargs] = argsCFAOnly[i];
-	    nargs += 1;
-	} // if
-	args[nargs] = "-p";
-	nargs += 1;
-
-	args[nargs] = tmpfile;
-	nargs += 1;
-
-	if ( ! CFA_flag ) {				// run cfa-cpp ?
-	    args[nargs] = cpp_out.c_str();
-	    nargs += 1;
-	} // if
-	args[nargs] = NULL;				// terminate argument list
-
-#ifdef __DEBUG_H__
-	cerr << "cfa-cpp nargs: " << nargs << endl;
-	for ( i = 0; args[i] != NULL; i += 1 ) {
-	    cerr << args[i] << " ";
-	} // for
-	cerr << endl;
-#endif // __DEBUG_H__
-
-	execvp( args[0], (char *const *)args );		// should not return
-	perror( "CFA translator error: cpp level, exec" );
-    } // if
-
-    wait( &code );					// wait for child to finish
-
-    if ( unlink( tmpfile ) == -1 ) {
-	cerr << "CFA translator error: cfa-cpp failed " << errno << " to remove temporary file \"" << tmpfile << "\"" << endl;
-	exit( EXIT_FAILURE );
-    } // if
-
-    if ( WIFSIGNALED(code) != 0 ) {			// child completed successfully ?
-	cerr << "CFA translator error: cfa-cpp failed with signal " << WTERMSIG(code) << endl;
-	exit( EXIT_FAILURE );
-    } // if
-
-    if ( CFA_flag ) {					// -CFA flag ?
-	exit( EXIT_FAILURE );				// tell gcc not to go any further
-    } else {
-	exit( WEXITSTATUS(code) );
-    } // if
-} // main
-
-
-// Local Variables: //
-// compile-command: "gmake" //
-// End: //
