summaryrefslogtreecommitdiffstats
path: root/gnu/lib/libg++/include/BitString.h
diff options
context:
space:
mode:
authorrgrimes <rgrimes@FreeBSD.org>1995-05-30 05:05:38 +0000
committerrgrimes <rgrimes@FreeBSD.org>1995-05-30 05:05:38 +0000
commit2ad6f3dee6bc54535003f4ab26bbc587b7efa38c (patch)
treea3959baf797787918878bec6d58d6a0fb743ad0a /gnu/lib/libg++/include/BitString.h
parent4f960dd75f181e9fa2edc44324f15f0ab5c64b37 (diff)
downloadFreeBSD-src-2ad6f3dee6bc54535003f4ab26bbc587b7efa38c.zip
FreeBSD-src-2ad6f3dee6bc54535003f4ab26bbc587b7efa38c.tar.gz
Remove trailing whitespace.
Diffstat (limited to 'gnu/lib/libg++/include/BitString.h')
-rw-r--r--gnu/lib/libg++/include/BitString.h80
1 files changed, 40 insertions, 40 deletions
diff --git a/gnu/lib/libg++/include/BitString.h b/gnu/lib/libg++/include/BitString.h
index b2b92b1..f30b440 100644
--- a/gnu/lib/libg++/include/BitString.h
+++ b/gnu/lib/libg++/include/BitString.h
@@ -1,5 +1,5 @@
// This may look like C code, but it is really -*- C++ -*-
-/*
+/*
Copyright (C) 1988 Free Software Foundation
written by Doug Lea (dl@rocky.oswego.edu)
@@ -138,7 +138,7 @@ public:
friend void complement(const BitString&, BitString&);
- friend int lcompare(const BitString&, const BitString&);
+ friend int lcompare(const BitString&, const BitString&);
// assignment-based operators
// (constuctive versions decalred inline below
@@ -162,7 +162,7 @@ public:
void clear(int pos);
void clear(int from, int to);
- void clear();
+ void clear();
void invert(int pos);
void invert(int from, int to);
@@ -188,7 +188,7 @@ public:
// searching & matching
- int index(unsigned int bit, int startpos = 0) const ;
+ int index(unsigned int bit, int startpos = 0) const ;
int index(const BitString&, int startpos = 0) const;
int index(const BitSubString&, int startpos = 0) const;
int index(const BitPattern&, int startpos = 0) const;
@@ -208,9 +208,9 @@ public:
// BitSubString extraction
BitSubString at(int pos, int len);
- BitSubString at(const BitString&, int startpos = 0);
- BitSubString at(const BitSubString&, int startpos = 0);
- BitSubString at(const BitPattern&, int startpos = 0);
+ BitSubString at(const BitString&, int startpos = 0);
+ BitSubString at(const BitSubString&, int startpos = 0);
+ BitSubString at(const BitPattern&, int startpos = 0);
BitSubString before(int pos);
BitSubString before(const BitString&, int startpos = 0);
@@ -224,9 +224,9 @@ public:
// other friends & utilities
- friend BitString common_prefix(const BitString&, const BitString&,
+ friend BitString common_prefix(const BitString&, const BitString&,
int pos = 0);
- friend BitString common_suffix(const BitString&, const BitString&,
+ friend BitString common_suffix(const BitString&, const BitString&,
int pos = -1);
friend BitString reverse(const BitString&);
@@ -259,7 +259,7 @@ public:
friend BitPattern atoBitPattern(const char* s,
char f='0',char t='1',char x='X');
- friend const char* BitPatterntoa(const BitPattern& p,
+ friend const char* BitPatterntoa(const BitPattern& p,
char f='0',char t='1',char x='X');
int OK() const;
};
@@ -277,7 +277,7 @@ public:
~BitPattern();
- friend const char* BitPatterntoa(const BitPattern& p,
+ friend const char* BitPatterntoa(const BitPattern& p,
char f/*='0'*/,char t/*='1'*/,char x/*='X'*/);
void printon(ostream&, char f='0',char t='1',char x='X') const;
friend BitPattern atoBitPattern(const char* s, char f,char t, char x);
@@ -320,16 +320,16 @@ inline BitString::BitString() :rep(&_nilBitStrRep) {}
inline BitString::BitString(const BitString& x) :rep(BStr_copy(0, x.rep)) {}
-inline BitString::BitString(const BitSubString& y)
+inline BitString::BitString(const BitSubString& y)
:rep (BStr_alloc(0, y.S.rep->s, y.pos, y.pos+y.len, y.len)) {}
inline BitString::~BitString()
-{
+{
if (rep != &_nilBitStrRep) delete rep;
}
-inline BitString shorttoBitString(unsigned short w)
-{
+inline BitString shorttoBitString(unsigned short w)
+{
BitString r;
_BS_word ww = w;
#if _BS_BIGENDIAN
@@ -339,8 +339,8 @@ inline BitString shorttoBitString(unsigned short w)
return r;
}
-inline BitString longtoBitString(unsigned long w)
-{
+inline BitString longtoBitString(unsigned long w)
+{
BitString r;
#if 1
_BS_word u = w;
@@ -355,13 +355,13 @@ inline BitString longtoBitString(unsigned long w)
}
inline BitString& BitString::operator = (const BitString& y)
-{
+{
rep = BStr_copy(rep, y.rep);
return *this;
}
inline BitString& BitString::operator = (unsigned int b)
-{
+{
_BS_word bit = b;
rep = BStr_alloc(rep, &bit, 0, 1, 1);
return *this;
@@ -373,7 +373,7 @@ inline BitString& BitString::operator=(const BitSubString& y)
return *this;
}
-inline BitSubString::BitSubString(const BitSubString& x)
+inline BitSubString::BitSubString(const BitSubString& x)
:S(x.S), pos(x.pos), len(x.len) {}
inline BitSubString::BitSubString(BitString& x, int p, int l)
@@ -544,47 +544,47 @@ inline BitString operator ~ (const BitString& x) return r
#else /* NO_NRV */
-inline BitString operator & (const BitString& x, const BitString& y)
+inline BitString operator & (const BitString& x, const BitString& y)
{
BitString r; and(x, y, r); return r;
}
-inline BitString operator | (const BitString& x, const BitString& y)
+inline BitString operator | (const BitString& x, const BitString& y)
{
BitString r; or(x, y, r); return r;
}
-inline BitString operator ^ (const BitString& x, const BitString& y)
+inline BitString operator ^ (const BitString& x, const BitString& y)
{
BitString r; xor(x, y, r); return r;
}
-inline BitString operator << (const BitString& x, int y)
+inline BitString operator << (const BitString& x, int y)
{
BitString r; lshift(x, y, r); return r;
}
-inline BitString operator >> (const BitString& x, int y)
+inline BitString operator >> (const BitString& x, int y)
{
BitString r; rshift(x, y, r); return r;
}
-inline BitString operator - (const BitString& x, const BitString& y)
+inline BitString operator - (const BitString& x, const BitString& y)
{
BitString r; diff(x, y, r); return r;
}
-inline BitString operator + (const BitString& x, const BitString& y)
+inline BitString operator + (const BitString& x, const BitString& y)
{
BitString r; cat(x, y, r); return r;
}
-inline BitString operator + (const BitString& x, unsigned int y)
+inline BitString operator + (const BitString& x, unsigned int y)
{
BitString r; cat(x, y, r); return r;
}
-inline BitString operator ~ (const BitString& x)
+inline BitString operator ~ (const BitString& x)
{
BitString r; complement(x, r); return r;
}
@@ -594,32 +594,32 @@ inline BitString operator ~ (const BitString& x)
// status, matching
inline int BitString::length() const
-{
+{
return rep->len;
}
inline int BitString::empty() const
-{
+{
return rep->len == 0;
}
inline int BitString::index(const BitString& y, int startpos) const
-{
+{
return search(startpos, rep->len, y.rep->s, 0, y.rep->len);
}
inline int BitString::index(const BitSubString& y, int startpos) const
-{
+{
return search(startpos, rep->len, y.S.rep->s, y.pos, y.pos+y.len);
}
inline int BitString::contains(const BitString& y) const
-{
+{
return search(0, rep->len, y.rep->s, 0, y.rep->len) >= 0;
}
inline int BitString::contains(const BitSubString& y) const
-{
+{
return search(0, rep->len, y.S.rep->s, y.pos, y.pos+y.len) >= 0;
}
@@ -664,12 +664,12 @@ inline int BitString::index(const BitPattern& r, int startpos) const
}
inline int BitSubString::length() const
-{
+{
return len;
}
inline int BitSubString::empty() const
-{
+{
return len == 0;
}
@@ -706,7 +706,7 @@ inline int BitString::index(unsigned int bit, int startpos) const
return prev(rep->len + startpos + 1, bit);
}
-inline void BitString::right_trim(unsigned int b)
+inline void BitString::right_trim(unsigned int b)
{
int nb = (b == 0)? 1 : 0;
rep = BStr_resize(rep, prev(rep->len, nb) + 1);
@@ -721,7 +721,7 @@ inline void BitString::left_trim(unsigned int b)
inline int BitString::test(int i) const
{
- return ((unsigned)(i) >= rep->len)? 0 :
+ return ((unsigned)(i) >= rep->len)? 0 :
((rep->s[BitStr_index(i)] & (1 << (BitStr_pos(i)))) != 0);
}
@@ -754,7 +754,7 @@ inline BitSubString BitString::_substr(int first, int l)
{
if (first < 0 || l <= 0 || (unsigned)(first + l) > rep->len)
return BitSubString(_nil_BitString, 0, 0) ;
- else
+ else
return BitSubString(*this, first, l);
}
OpenPOWER on IntegriCloud