Fix missing copyright notices and incorrect formatting.
This commit is contained in:
parent
5fe889a7b4
commit
dfa6370187
|
|
@ -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 <cstring>
|
||||
#include <cstdlib>
|
||||
|
|
@ -65,4 +84,4 @@ vhdlint::vhdlint(const vhdlint& val)
|
|||
int64_t vhdlint::as_long() const
|
||||
{
|
||||
return value_;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 <stdint.h>
|
||||
|
||||
using namespace std;
|
||||
|
|
|
|||
|
|
@ -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 <assert.h>
|
||||
#include <cstring>
|
||||
#include <cstdlib>
|
||||
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 <iostream>
|
||||
#include <cmath>
|
||||
|
||||
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
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue