/dports/sysutils/dar/dar-2.5.14-bis/src/libdar/ |
H A D | secu_string.hpp | 72 secu_string(U_I storage_size = 0) { init(storage_size); }; in secu_string() 100 void set(int fd, U_I size); 111 void append_at(U_I offset, const char *ptr, U_I size); 114 void append_at(U_I offset, int fd, U_I size); 125 void reduce_string_size_to(U_I pos); 133 void resize(U_I size) { clean_and_destroy(); init(size); }; in resize() 138 void randomize(U_I size); 149 char & operator[] (U_I index); 156 U_I get_allocated_size() const { return *allocated_size - 1; }; in get_allocated_size() 159 U_I *allocated_size; [all …]
|
H A D | compressor.hpp | 94 U_I inherited_read(char *a, U_I size) { return (this->*read_ptr)(a, size); }; in inherited_read() 105 U_I size; 107 xfer(U_I sz, wrapperlib_mode mode); 138 U_I current_level; 142 U_I (compressor::*read_ptr) (char *a, U_I size); 143 U_I none_read(char *a, U_I size); 144 U_I gzip_read(char *a, U_I size); 147 U_I lzo_read(char *a, U_I size); 150 void none_write(const char *a, U_I size); 151 void gzip_write(const char *a, U_I size); [all …]
|
H A D | wrapperlib.hpp | 146 void z_set_avail_in(U_I x); 147 U_I z_get_avail_in() const; 151 void z_set_avail_out(U_I x); 152 U_I z_get_avail_out() const; 165 void bz_set_avail_in(U_I x); 166 U_I bz_get_avail_in() const; 170 void bz_set_avail_out(U_I x); 171 U_I bz_get_avail_out() const; 182 void lzma_set_avail_in(U_I x); 183 U_I lzma_get_avail_in() const; [all …]
|
H A D | mem_cluster.hpp | 45 mem_cluster(U_I x_block_size, //< block size that will be allocated from this mem_cluster 62 U_I get_block_size() const { return block_size; }; in get_block_size() 73 virtual U_I max_percent_full() const { return 0; }; in max_percent_full() 88 U_I block_size; //< size of requested blocks 90 U_I alloc_table_size; //< size of the map (in number of U_64 integers) 91 U_I next_free_in_table; //< next U_64 to look at for a request of block allocation 92 U_I available_blocks; //< current number of available block in alloc 93 U_I max_available_blocks; //< max available block in alloc 95 U_I min_avail_reached; //< records the max fullfilment reached 98 U_I find_free_slot_in(U_I table_integer) const; [all …]
|
H A D | mem_cluster.cpp | 32 …mem_cluster::mem_cluster(U_I x_block_size, U_I table_size_64, mem_manager *x_holder) : mem_allocat… in mem_cluster() 53 for(U_I i = 0; i < alloc_table_size; ++i) in mem_cluster() 91 U_I offset = find_free_slot_in(next_free_in_table); in alloc() 103 U_I mem_cluster::find_free_slot_in(U_I table_integer) const in find_free_slot_in() 105 U_I ret = 0; in find_free_slot_in() 120 void mem_cluster::set_slot_in(U_I table_integer, U_I bit_offset, bool value) in set_slot_in() 148 U_I char_offset = (char *)(ptr) - alloc_area; in release() 149 U_I block_number = char_offset / block_size; in release() 150 U_I table_integer = block_number / 64; in release() 151 U_I offset = block_number % 64; in release() [all …]
|
H A D | escape.hpp | 143 U_I inherited_read(char *a, U_I size); 144 void inherited_write(const char *a, U_I size); 157 static const U_I ESCAPE_SEQUENCE_LENGTH = 6; 158 static const U_I WRITE_BUFFER_SIZE = 2*ESCAPE_SEQUENCE_LENGTH; 159 static const U_I READ_BUFFER_SIZE = MAX_BUFFER_SIZE; 174 …U_I write_buffer_size; //< amount of data in write transit not yet written to "belo… 177 …U_I read_buffer_size; //< amount of data in transit, read from below, but possibly… 178 …U_I already_read; //< data in buffer that has already been returned to the upp… 180 …U_I escape_seq_offset_in_buffer; //< location of the first escape sequence which is not a dat… 223 …static U_I trouve_amorce(const char *a, U_I size, const unsigned char escape_sequence[ESCAPE_SEQUE… [all …]
|
H A D | secu_string.cpp | 81 void secu_string::set(int fd, U_I size) in set() 83 U_I offset = 0; in set() 116 void secu_string::append_at(U_I offset, const char *ptr, U_I size) in append_at() 130 void secu_string::append_at(U_I offset, int fd, U_I size) in append_at() 160 void secu_string::randomize(U_I size) in randomize() 172 char & secu_string::operator[] (U_I index) in operator []() 180 void secu_string::init(U_I size) in init() 189 allocated_size = (U_I *)gcry_malloc_secure(sizeof(U_I)); in init() 211 string_size = (U_I *)gcry_malloc_secure(sizeof(U_I)); in init() 251 U_I cur = 0; in compare_with() [all …]
|
H A D | escape.cpp | 362 U_I trouve; in skip() 368 U_I lu = 0; in skip() 384 U_I width = 0; in skip() 385 U_I lu = 0; in skip() 509 U_I escape::inherited_read(char *a, U_I size) in inherited_read() 595 U_I read; in inherited_read() 599 U_I delta; in inherited_read() 668 U_I written = 0; in inherited_write() 669 U_I trouve; in inherited_write() 979 U_I delta = 0; in mini_read_buffer() [all …]
|
H A D | sparse_file.cpp | 130 U_I sparse_file::inherited_read(char *a, U_I size) in inherited_read() 132 U_I lu = 0; in inherited_read() 134 U_I tmp; in inherited_read() 135 U_I needed; in inherited_read() 353 U_I written = 0; in inherited_write() 354 U_I hole_start = 0; in inherited_write() 446 U_I tmp = 0; in dump_pending_zeros() 508 …bool sparse_file::look_for_hole(const char *a, U_I size, U_I min_hole_size, U_I & start, U_I & len… in look_for_hole() 510 U_I inspected = 0; in look_for_hole() 543 U_I sparse_file::count_initial_zeros(const char *a, U_I size) in count_initial_zeros() [all …]
|
H A D | crc.cpp | 63 …id n_compute(const char *buffer, U_I length, unsigned char * begin, unsigned char * & pointer, uns… 86 U_I pos = 0; in T_old_read() 112 U_I crc_size = end - begin; in B_compute_block() 139 for(U_I cursor = 0; cursor < length; ++cursor) in T_compute() 170 U_I partial_cursor = 0; in n_compute() 305 crc_n::crc_n(U_I width) in crc_n() 323 crc_n::crc_n(U_I width, generic_file & f) in crc_n() 367 U_I s_offset = 0; in compute() 405 void crc_n::alloc(U_I width) in alloc() 483 U_I s = 0; in create_crc_from_file() [all …]
|
H A D | crc.hpp | 47 static const U_I OLD_CRC_SIZE = 2; 54 virtual void compute(const infinint & offset, const char *buffer, U_I length) = 0; 55 virtual void compute(const char *buffer, U_I length) = 0; // for sequential read only 76 void compute(const infinint & offset, const char *buffer, U_I length); 77 void compute(const char *buffer, U_I length); // for sequential read only 101 crc_n(U_I width); 102 crc_n(U_I width, generic_file & f); 109 void compute(const infinint & offset, const char *buffer, U_I length); 110 void compute(const char *buffer, U_I length); // for sequential read only 121 U_I size; //< size of checksum (non infinint mode) [all …]
|
H A D | cache.hpp | 57 U_I size = 102400); //< is the (fixed) size of the cache 74 U_I inherited_read(char *a, U_I size); 75 void inherited_write(const char *a, U_I size); 83 U_I size; //< allocated size 84 U_I next; //< next to read or next place to write to 85 U_I last; //< last valid data in the cache. we have: next <= last < size 86 …U_I first_to_write; //< position of the first byte that need to be written. if great… 97 U_I available_in_cache(skippability direction) const;
|
H A D | generic_file.hpp | 143 U_I read(char *a, U_I size); 148 void write(const char *a, U_I size); 282 virtual U_I inherited_read(char *a, U_I size) = 0; 289 virtual void inherited_write(const char *a, U_I size) = 0; 323 U_I (generic_file::* active_read)(char *a, U_I size); 324 void (generic_file::* active_write)(const char *a, U_I size); 328 U_I read_crc(char *a, U_I size); 329 void write_crc(const char *a, U_I size);
|
H A D | sparse_file.hpp | 115 U_I inherited_read(char *a, U_I size); 116 void inherited_write(const char *a, U_I size); 129 …U_I UI_min_hole_size; //< if possible store min_hole_size as U_I, if not this field is set to z… 158 static bool look_for_hole(const char *a, U_I size, U_I min_hole_size, U_I & start, U_I & length); 165 static U_I count_initial_zeros(const char *a, U_I size);
|
H A D | fichier_global.hpp | 87 virtual void change_permission(U_I perm) = 0; 106 virtual U_I fichier_global_inherited_write(const char *a, U_I size) = 0; 119 …virtual bool fichier_global_inherited_read(char *a, U_I size, U_I & read, std::string & message) =… 124 void inherited_write(const char *a, U_I size); 125 U_I inherited_read(char *a, U_I size);
|
H A D | header_version.hpp | 116 static const U_I FLAG_SAVED_EA_ROOT = 0x80; //< no more used since version "05" 117 static const U_I FLAG_SAVED_EA_USER = 0x40; //< no more used since version "05" 118 static const U_I FLAG_SCRAMBLED = 0x20; //< scrambled or strong encryption used 119 …static const U_I FLAG_SEQUENCE_MARK = 0x10; //< escape sequence marks present for sequential … 120 …static const U_I FLAG_INITIAL_OFFSET = 0x08; //< whether the header contains the initial offse… 121 …static const U_I FLAG_HAS_CRYPTED_KEY = 0x04; //< the header contains a symmetrical key encrypt… 122 …static const U_I FLAG_HAS_REF_SLICING = 0x02; //< the header contains the slicing information o… 123 static const U_I FLAG_HAS_AN_EXTENDED_SIZE = 0x01; //< the flag is two bytes length 124 static const U_I FLAG_ARCHIVE_IS_SIGNED = 0x0200; //< archive is signed 125 static const U_I FLAG_HAS_AN_SECOND_EXTENDED_SIZE = 0x0101; //< reserved for future use
|
H A D | cache.cpp | 197 U_I abs_x = x >= 0 ? x : -x; in skip_relative() 232 U_I cache::inherited_read(char *a, U_I x_size) in inherited_read() 234 U_I ret = 0; in inherited_read() 261 U_I needed = x_size - ret; in inherited_read() 262 U_I avail = last - next; in inherited_read() 283 U_I wrote = 0; in inherited_write() 284 U_I avail, remaining; in inherited_write() 381 U_I half = last / 2; in shift_by_half() 382 U_I reste = last % 2; in shift_by_half() 431 U_I lu; in fulfill_read() [all …]
|
H A D | memory_pool.cpp | 35 map<U_I, mem_sized *>::iterator it = carte.begin(); in ~memory_pool() 55 map<U_I, mem_sized *>::iterator it = carte.find(with_overhead); in alloc() 61 map<U_I, U_I>::iterator cit = count.find(with_overhead); in alloc() 137 map<U_I, mem_sized *>::iterator it = carte.begin(); in garbage_collect() 145 map<U_I, mem_sized *>::iterator tmp = it; in garbage_collect() 162 map<U_I, mem_sized *>::const_iterator it = carte.begin(); in dump() 191 map<U_I, mem_sized *>::const_iterator it = carte.begin(); in max_percent_full() 192 map<U_I, U_I>::const_iterator cit; in max_percent_full() 193 U_I freq; in max_percent_full()
|
H A D | secu_memory_file.hpp | 43 …secu_memory_file(U_I storage_size) : generic_file(gf_read_write), data(storage_size) { position = … in secu_memory_file() 48 void reset(U_I size) { if(is_terminated()) throw SRC_BUG; position = 0; data.resize(size); }; in reset() 57 …void randomize(U_I size) { if(size > data.get_allocated_size()) reset(size); data.randomize(size);… in randomize() 73 U_I inherited_read(char *a, U_I size); 74 void inherited_write(const char *a, U_I size); 81 U_I position;
|
H A D | mem_sized.hpp | 46 mem_sized(U_I x_block_size); 67 U_I max_percent_full() const; 74 static const U_I average_table_size = 10240; 76 U_I table_size_64; //< size for clusters 81 …U_I sum_percent; //< summ of all max percent usage obtained before deleting a mem_cluster object… 82 …U_I num_cluster; //< number of cluster which sum_percent has been collected from (sum_percent/nu…
|
H A D | generic_thread.hpp | 59 U_I data_block_size = tampon_block_size, 60 U_I data_num_block = tampon_num_block, 61 U_I ctrl_block_size = tampon_block_size_ctrl, 62 U_I ctrl_num_block = tampon_num_block_ctrl); 78 virtual U_I inherited_read(char *a, U_I size); 79 virtual void inherited_write(const char *a, U_I size);
|
H A D | user_interaction.hpp | 208 virtual void dar_manager_contents(U_I number, 225 virtual void dar_manager_statistics(U_I number, 244 virtual void dar_manager_show_version(U_I number, 292 void warning_with_more(U_I num) { at_once = num; count = 0; }; in warning_with_more() 328 U_I at_once, count; 383 void dar_manager_contents(U_I number, 388 void dar_manager_statistics(U_I number, 395 void dar_manager_show_version(U_I number, 493 void (*dar_manager_contents_callback)(U_I number, 497 void (*dar_manager_statistics_callback)(U_I number, [all …]
|
H A D | fichier_local.hpp | 68 U_I permission, 86 virtual void change_permission(U_I perm); 114 U_I fichier_global_inherited_write(const char *a, U_I size); 115 bool fichier_global_inherited_read(char *a, U_I size, U_I & read, std::string & message); 123 U_I permission,
|
H A D | libdar.hpp | 139 const U_I LIBDAR_COMPILE_TIME_MAJOR = 5; 141 const U_I LIBDAR_COMPILE_TIME_MEDIUM = 12; 143 const U_I LIBDAR_COMPILE_TIME_MINOR = 1; 170 extern void get_version(U_I & major, U_I & medium, U_I & minor, bool init_libgcrypt = true); 185 …extern void get_version_noexcept(U_I & major, U_I & medium, U_I & minor, U_16 & exception, std::st…
|
H A D | fichier_global.cpp | 99 void fichier_global::inherited_write(const char *a, U_I size) in inherited_write() 101 U_I wrote = 0; in inherited_write() 111 U_I fichier_global::inherited_read(char *a, U_I size) in inherited_read() 113 U_I ret = 0; in inherited_read() 114 U_I read = 0; in inherited_read()
|