PKGBUILDs/community/colorer/x86_64-build.patch

99 lines
2.7 KiB
Diff
Raw Normal View History

2009-10-10 02:15:33 +00:00
--- src/shared/unicode/BitArray.cpp.orig 2007-07-23 01:07:44.000000000 -0400
+++ src/shared/unicode/BitArray.cpp 2007-07-23 01:08:30.000000000 -0400
@@ -8,7 +8,7 @@
if (size % 8 == 0 && size/8%4 == 0) this->size--;
}
BitArray::~BitArray(){
- if (array && int(array) != 1) delete[] array;
+ if (array && long(array) != 1) delete[] array;
}
void BitArray::createArray(bool set){
array = new int[size];
@@ -17,16 +17,16 @@
void BitArray::setBit(int pos){
if (!array) createArray();
- if (int(array) == 1) return;
+ if (long(array) == 1) return;
array[pos>>5] |= 1 << (pos&0x1f);
}
void BitArray::clearBit(int pos){
if (!array) return;
- if (int(array) == 1) createArray(true);
+ if (long(array) == 1) createArray(true);
array[pos>>5] &= ~(1 << (pos&0x1f));
}
void BitArray::addRange(int s, int e){
- if (int(array) == 1) return;
+ if (long(array) == 1) return;
if (!array) createArray();
int cs = s>>5;
if (s&0x1f){
@@ -49,7 +49,7 @@
}
void BitArray::clearRange(int s, int e){
if (!array) return;
- if (int(array) == 1) createArray(true);
+ if (long(array) == 1) createArray(true);
int cs = s>>5;
if (s&0x1f){
int fillbytes = 0xFFFFFFFF << (s&0x1f);
@@ -70,9 +70,9 @@
};
}
void BitArray::addBitArray(BitArray* ba){
- if (int(array) == 1) return;
+ if (long(array) == 1) return;
if (!ba || !ba->array) return;
- if (int(ba->array) == 1){
+ if (long(ba->array) == 1){
array = (int*)1;
return;
};
@@ -83,8 +83,8 @@
void BitArray::clearBitArray(BitArray* ba){
if (array == null) return;
if (ba == null || ba->array == null) return;
- if (int(array) == 1) createArray(true);
- if (int(ba->array) == 1){
+ if (long(array) == 1) createArray(true);
+ if (long(ba->array) == 1){
if (array != null) delete[] array;
array = 0;
return;
@@ -99,29 +99,29 @@
array = 0;
return;
};
- if (int(ba->array) == 1) return;
- if (int(array) == 1) createArray(true);
+ if (long(ba->array) == 1) return;
+ if (long(array) == 1) createArray(true);
for(int i = 0; i < size; i++)
array[i] &= ba->array[i];
}
void BitArray::addBitArray(char *bits, int size){
- if (int(array) == 1) return;
+ if (long(array) == 1) return;
if (!array) createArray();
for(int i = 0; i < size && i < this->size*4;i++)
((char*)array)[i] |= bits[i];
}
void BitArray::clearBitArray(char *bits, int size){
if (!array) return;
- if (int(array) == 1) createArray(true);
+ if (long(array) == 1) createArray(true);
for(int i = 0; i < size && i < this->size*4;i++)
((char*)array)[i] &= ~bits[i];
}
bool BitArray::getBit(int pos){
if (!array) return false;
- if (int(array) == 1) return true;
+ if (long(array) == 1) return true;
return (array[pos>>5] & (1<<(pos&0x1f))) != 0;
}