/*
LINT - Large INTeger object library.
Copyright (C) 2005 Jeremy A. Wilson
Licensed under the GNU Lesser General Public License version 2.1
This library is free software; you can redistribute it and/or modify it under the terms
of the GNU Lesser General Public License as published by the Free Software Foundation;
either version 2.1 of the License, or (at your option) any later version.
This library 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 Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this
library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
Author Information:
Jeremy A. Wilson
email: mitselplik@cox.net
address: 915 Dover Dr., Gainesville, TX 76240
*/
#if !defined(_LINT_)
#define _LINT_
#if !defined(LINT_LENGTH)
#define LINT_LENGTH 64 // the number of 32-bit DWORDS to use - default 64 results in 2048 bit integers
#endif
class lint {
long data[LINT_LENGTH];
char *str_value;
void copy_from(lint&);
void from_string(const char *);
friend void div_mod_calculate(lint&, lint&, lint&, lint&);
void not();
void negate();
public:
lint();
lint(lint&);
lint(signed long);
lint::lint(const char *);
lint(long *, unsigned int);
~lint();
lint& operator=(lint&);
lint& operator=(signed long);
lint& operator=(const char *);
lint& operator++();
lint& operator++(int);
lint& operator--();
lint& operator--(int);
lint& operator~();
lint& operator-();
bool operator!();
lint& operator+=(signed long);
lint& operator+=(lint&);
lint& operator-=(signed long);
lint& operator-=(lint&);
lint& operator*=(signed long);
lint& operator*=(lint&);
lint& operator/=(signed long);
lint& operator/=(lint&);
lint& operator%=(signed long);
lint& operator%=(lint&);
lint& operator<<=(signed long);
lint& operator<<=(lint&);
lint& operator>>=(signed long);
lint& operator>>=(lint&);
lint& operator&=(unsigned long);
lint& operator&=(lint&);
lint& operator|=(unsigned long);
lint& operator|=(lint&);
lint& operator^=(unsigned long);
lint& operator^=(lint&);
char *value(int radix = 10);
signed long& operator()(unsigned);
friend lint& operator+(lint&, signed long);
friend lint& operator+(long, lint&);
friend lint& operator+(lint&, lint&);
friend lint& operator-(lint&, signed long);
friend lint& operator-(signed long, lint&);
friend lint& operator-(lint&, lint&);
friend lint& operator<<(lint&, signed long);
friend lint& operator<<(lint&, lint&);
friend lint& operator>>(lint&, signed long);
friend lint& operator>>(lint&, lint&);
friend lint& operator*(lint&, signed long);
friend lint& operator*(signed long, lint&);
friend lint& operator*(lint&, lint&);
friend lint& operator/(lint&, signed long);
friend lint& operator/(signed long, lint&);
friend lint& operator/(lint&, lint&);
friend lint& operator%(lint&, signed long);
friend lint& operator%(lint&, lint&);
friend bool operator==(lint&, signed long);
friend bool operator==(signed long, lint&);
friend bool operator==(lint&, lint&);
friend bool operator!=(lint&, signed long);
friend bool operator!=(signed long, lint&);
friend bool operator!=(lint&, lint&);
friend bool operator<(lint&, lint&);
friend bool operator<(lint&, signed long);
friend bool operator<(signed long, lint&);
friend bool operator<=(lint&, lint&);
friend bool operator<=(lint&, signed long);
friend bool operator<=(signed long, lint&);
friend bool operator>(lint&, lint&);
friend bool operator>(lint&, signed long);
friend bool operator>(signed long, lint&);
friend bool operator>=(lint&, lint&);
friend bool operator>=(lint&, signed long);
friend bool operator>=(signed long, lint&);
friend lint& operator&(lint&, unsigned long);
friend lint& operator&(unsigned long, lint&);
friend lint& operator&(lint&, lint&);
friend lint& operator|(lint&, unsigned long);
friend lint& operator|(unsigned long, lint&);
friend lint& operator|(lint&, lint&);
friend lint& operator^(lint&, unsigned long);
friend lint& operator^(unsigned long, lint&);
friend lint& operator^(lint&, lint&);
};
#endif