diff --git a/vhdlpp/vhdlint.cc b/vhdlpp/vhdlint.cc index e2486b040..e86baa8aa 100644 --- a/vhdlpp/vhdlint.cc +++ b/vhdlpp/vhdlint.cc @@ -1,4 +1,23 @@ -#include "config.h" + +/* + * Copyright (c) 2011 Stephen Williams (steve@icarus.com) + * + * This source code is free software; you can redistribute it + * and/or modify it in source code form under the terms of the GNU + * General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + */ + #include "vhdlint.h" #include #include @@ -65,4 +84,4 @@ vhdlint::vhdlint(const vhdlint& val) int64_t vhdlint::as_long() const { return value_; -} \ No newline at end of file +} diff --git a/vhdlpp/vhdlint.h b/vhdlpp/vhdlint.h index 0ef5ef54a..a01afa18c 100644 --- a/vhdlpp/vhdlint.h +++ b/vhdlpp/vhdlint.h @@ -1,7 +1,24 @@ #ifndef __vhdlint_H #define __vhdlint_H +/* + * Copyright (c) 2011 Stephen Williams (steve@icarus.com) + * + * This source code is free software; you can redistribute it + * and/or modify it in source code form under the terms of the GNU + * General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + */ -#include "config.h" #include using namespace std; diff --git a/vhdlpp/vhdlreal.cc b/vhdlpp/vhdlreal.cc index fd903d544..52d7f81b0 100644 --- a/vhdlpp/vhdlreal.cc +++ b/vhdlpp/vhdlreal.cc @@ -1,10 +1,29 @@ -#include "config.h" -#include "compiler.h" +/* + * Copyright (c) 2011 Stephen Williams (steve@icarus.com) + * + * This source code is free software; you can redistribute it + * and/or modify it in source code form under the terms of the GNU + * General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + */ + #include "vhdlreal.h" #include #include #include +using namespace std; + vhdlreal::vhdlreal() { value_ = 0.0; } @@ -56,4 +75,4 @@ vhdlreal pow(const vhdlreal& r1, const vhdlreal& r2) { } vhdlreal operator- (const vhdlreal& r) { return vhdlreal(-r.as_double()); -} \ No newline at end of file +} diff --git a/vhdlpp/vhdlreal.h b/vhdlpp/vhdlreal.h index 72c41f101..bc891672e 100644 --- a/vhdlpp/vhdlreal.h +++ b/vhdlpp/vhdlreal.h @@ -1,11 +1,27 @@ #ifndef __vhdlreal_h #define __vhdlreal_h +/* + * Copyright (c) 2011 Stephen Williams (steve@icarus.com) + * + * This source code is free software; you can redistribute it + * and/or modify it in source code form under the terms of the GNU + * General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + */ -#include "config.h" #include #include -using namespace std; /* * This class holds a floating point decimal number. The number is * stored as double. All based numbers are converted by an external @@ -13,28 +29,29 @@ using namespace std; */ class vhdlreal { -public: - friend ostream& operator<< (ostream&, const vhdlreal&); - friend vhdlreal operator+ (const vhdlreal&, const vhdlreal&); - friend vhdlreal operator- (const vhdlreal&, const vhdlreal&); - friend vhdlreal operator* (const vhdlreal&, const vhdlreal&); - friend vhdlreal operator/ (const vhdlreal&, const vhdlreal&); - friend vhdlreal operator% (const vhdlreal&, const vhdlreal&); - friend vhdlreal pow(const vhdlreal&, const vhdlreal&); - // Unary minus. - friend vhdlreal operator- (const vhdlreal&); + public: + friend std::ostream& operator<< (std::ostream&, const vhdlreal&); + friend vhdlreal operator+ (const vhdlreal&, const vhdlreal&); + friend vhdlreal operator- (const vhdlreal&, const vhdlreal&); + friend vhdlreal operator* (const vhdlreal&, const vhdlreal&); + friend vhdlreal operator/ (const vhdlreal&, const vhdlreal&); + friend vhdlreal operator% (const vhdlreal&, const vhdlreal&); + friend vhdlreal pow(const vhdlreal&, const vhdlreal&); + // Unary minus. + friend vhdlreal operator- (const vhdlreal&); - explicit vhdlreal(); - explicit vhdlreal(const char*text); - explicit vhdlreal(const double& val); - vhdlreal(const vhdlreal& val); - virtual ~vhdlreal() {}; - - double as_double() const - { - return value_; - } -protected: - double value_; + explicit vhdlreal(); + explicit vhdlreal(const char*text); + explicit vhdlreal(const double& val); + vhdlreal(const vhdlreal& val); + virtual ~vhdlreal() {}; + + double as_double() const + { + return value_; + } + private: + double value_; }; -#endif \ No newline at end of file + +#endif