"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "testing/file.h" between
xdelta3-3.0.10.tar.gz and xdelta3-3.0.11.tar.gz

About: xdelta is a tool and library for differential compression (supports VCDIFF encoding and decoding).

file.h  (xdelta3-3.0.10):file.h  (xdelta3-3.0.11)
skipping to change at line 53 skipping to change at line 53
data_size_ = Constants::BLOCK_SIZE; data_size_ = Constants::BLOCK_SIZE;
} }
if (size_ + size > data_size_) { if (size_ + size > data_size_) {
uint8_t *tmp = data_; uint8_t *tmp = data_;
while (size_ + size > data_size_) { while (size_ + size > data_size_) {
data_size_ *= 2; data_size_ *= 2;
} }
data_ = new uint8_t[data_size_]; data_ = new uint8_t[data_size_];
memcpy(data_, tmp, size_); memcpy(data_, tmp, size_);
delete tmp; delete [] tmp;
} }
memcpy(data_ + size_, data, size); memcpy(data_ + size_, data, size);
size_ += size; size_ += size;
} }
// For cleaing a block // For cleaing a block
void Reset() { void Reset() {
size_ = 0; size_ = 0;
} }
skipping to change at line 316 skipping to change at line 316
xoff_t blkno_; xoff_t blkno_;
size_t blksize_; size_t blksize_;
}; };
class ExtFile { class ExtFile {
public: public:
ExtFile() { ExtFile() {
static int static_counter = 0; static int static_counter = 0;
pid_t pid = getpid(); pid_t pid = getpid();
char buf[64]; char buf[64];
snprintf(buf, 64, "/tmp/regtest.%d.%d", pid, static_counter++); xoff_t xpid = pid;
snprintf(buf, 64, "/tmp/regtest.%" Q "u.%d", xpid, static_counter++);
filename_.append(buf); filename_.append(buf);
unlink(filename_.c_str()); unlink(filename_.c_str());
} }
~ExtFile() { ~ExtFile() {
unlink(filename_.c_str()); unlink(filename_.c_str());
} }
const char* Name() const { const char* Name() const {
return filename_.c_str(); return filename_.c_str();
 End of changes. 2 change blocks. 
2 lines changed or deleted 3 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS