- // "preprocess" the line entered to be able to decide if the command shall be
- // executed directly or more input is needed or this is a special command
-
- // ALL whitespace will be removed
- // all comments (/* */ and //) will be removed
- // open and close braces ( { and } ) outside strings will be counted
-
- /*
- cout << "line=" << line << endl;
- cout << "comment=" << comment << ", single_quote=" << single_quote
- << ",double_quote=" << double_quote << ", open_braces=" << open_braces
- << endl;
- */
-
- string preprocessed;
- int pos=0;
- bool end=false;
- bool escape=false;
- bool slash=false;
- bool asterisk=false;
+ std::cout << "GiNaC is free software; you can redistribute it and/or modify it under the\n"
+ << "the terms of the GNU General Public License as published by the Free Software\n"
+ << "Foundation; either version 2 of the License, or (at your option) any later\n"
+ << "version.\n"
+ << "This program is distributed in the hope that it will be useful, but WITHOUT\n"
+ << "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\n"
+ << "FOR A PARTICULAR PURPOSE. See the GNU General Public License for more\n"
+ << "details.\n"
+ << "You should have received a copy of the GNU General Public License along with\n"
+ << "this program. If not, write to the Free Software Foundation, 675 Mass Ave,\n"
+ << "Cambridge, MA 02139, USA.\n\n";
+ std::cout << "Cint and associated tools are copyright by Agilent Technologies Japan Company\n"
+ << "and Masaharu Goto <MXJ02154@niftyserve.or.jp>.\n"
+ << "Source code, binary executable or library of Cint and associated tools can be\n"
+ << "used, modified and distributed with no royalty for any purpose provided that\n"
+ << "the copyright notice appear in all copies and that both that copyright notice\n"
+ << "and this permission notice appear in supporting documentation.\n"
+ << "Agilent Technologies Japan and the author make no representations about the\n"
+ << "suitability of this software for any purpose. It is provided \"AS IS\"\n"
+ << "without express or implied warranty.\n";
+ return;
+}
+
+/** "preprocess" the line entered to be able to decide if the command shall be
+ * executed directly or more input is needed or this is a special command.
+ * All whitespace will be removed. All comments will be removed. Open and
+ * close braces ( { and } ) outside strings will be counted. */
+std::string preprocess(char const * const line, bool & comment, bool & single_quote,
+ bool & double_quote, unsigned & open_braces)
+{
+ std::string preprocessed;
+ int pos = 0;
+ bool end = false;
+ bool escape = false;
+ bool slash = false;
+ bool asterisk = false;