dtinfo subdirectory DtMmdb
This commit is contained in:
committed by
Jon Trulson
parent
0be684281d
commit
fbd81ef151
@@ -72,7 +72,7 @@ int composite::first() const
|
||||
|
||||
void composite::next(int& index) const
|
||||
{
|
||||
if INRANGE( index, 1, v_sz - 1 )
|
||||
if INRANGE( index, 1, (int) v_sz - 1 )
|
||||
index ++;
|
||||
else
|
||||
index = 0;
|
||||
|
||||
@@ -73,10 +73,10 @@ protected:
|
||||
|
||||
oid_t compress_agent_id;
|
||||
|
||||
unsigned int v_uncompressed_sz;
|
||||
|
||||
compress_agent_handler* agent;
|
||||
|
||||
unsigned int v_uncompressed_sz;
|
||||
|
||||
protected:
|
||||
void _compress();
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ handler* cset::get_component(int index)
|
||||
|
||||
oid_list_handler* cset::get_locs(handler& query, int index)
|
||||
{
|
||||
if ( !INRANGE(index, 0, num_indices-1) ) {
|
||||
if ( !INRANGE(index, 0, (int) num_indices-1) ) {
|
||||
MESSAGE(cerr, "cset::get_locs(): invalid index");
|
||||
throw(boundaryException(0, num_indices-1, index));
|
||||
}
|
||||
@@ -115,7 +115,7 @@ oid_list_handler* cset::get_locs(handler& query, int index)
|
||||
|
||||
oid_t cset::get_first_oid(const handler& query, int index)
|
||||
{
|
||||
if ( !INRANGE(index, 0, num_indices-1) ) {
|
||||
if ( !INRANGE(index, 0, (int) num_indices-1) ) {
|
||||
MESSAGE(cerr, "cset::get_first_oid(): invalid index");
|
||||
throw(boundaryException(0, num_indices-1, index));
|
||||
}
|
||||
@@ -130,7 +130,7 @@ oid_t cset::get_first_oid(const handler& query, int index)
|
||||
|
||||
c_index_handler* cset::get_index_ptr(int index)
|
||||
{
|
||||
if ( !INRANGE(index, 0, num_indices-1) ) {
|
||||
if ( !INRANGE(index, 0, (int) num_indices-1) ) {
|
||||
MESSAGE(cerr, "cset::get_index_ptr(): invalid index");
|
||||
throw(boundaryException(0, num_indices-1, index));
|
||||
}
|
||||
@@ -140,7 +140,7 @@ c_index_handler* cset::get_index_ptr(int index)
|
||||
|
||||
void cset::batch_index_begin()
|
||||
{
|
||||
for ( int i=0; i<num_indices; i++ ) {
|
||||
for ( unsigned int i=0; i<num_indices; i++ ) {
|
||||
if ( indices[i] != 0 ) {
|
||||
(*indices[i]) -> batch_index_begin();
|
||||
}
|
||||
@@ -149,7 +149,7 @@ void cset::batch_index_begin()
|
||||
|
||||
void cset::batch_index_end()
|
||||
{
|
||||
for ( int i=0; i<num_indices; i++ ) {
|
||||
for ( unsigned int i=0; i<num_indices; i++ ) {
|
||||
if ( indices[i] != 0 ) {
|
||||
(*indices[i]) -> batch_index_end();
|
||||
}
|
||||
@@ -255,7 +255,7 @@ new_object.its_oid().asciiOut(cerr); cerr << "\n";
|
||||
#endif
|
||||
}
|
||||
|
||||
for ( int i = 1; i < num_indices; i++ ) {
|
||||
for ( unsigned int i = 1; i < num_indices; i++ ) {
|
||||
|
||||
if ( indices[i] == 0 )
|
||||
continue;
|
||||
@@ -287,7 +287,7 @@ Boolean cset::remove_component(const oid_t& x_oid)
|
||||
{
|
||||
handler* x = new handler(x_oid, storage_ptr);
|
||||
|
||||
for ( int i = 1; i < num_indices; i++ ) {
|
||||
for ( unsigned int i = 1; i < num_indices; i++ ) {
|
||||
|
||||
if ( indices[i] == 0 )
|
||||
continue;
|
||||
@@ -324,7 +324,7 @@ cset::update_index(handler* old_comp_obj, handler* new_comp_obj,
|
||||
oid_t& main_obj_oid)
|
||||
{
|
||||
|
||||
if ( !INRANGE(index, 1, num_indices-1) ) {
|
||||
if ( !INRANGE(index, 1, (int) num_indices-1) ) {
|
||||
throw(boundaryException(1, num_indices-1, index));
|
||||
}
|
||||
|
||||
@@ -364,7 +364,7 @@ io_status cset::cdrIn(buffer& buf)
|
||||
|
||||
void cset::commit()
|
||||
{
|
||||
for ( int i = 1; i < num_indices; i++ ) {
|
||||
for ( unsigned int i = 1; i < num_indices; i++ ) {
|
||||
|
||||
if ( indices[i] )
|
||||
indices[i] -> commit();
|
||||
|
||||
@@ -179,7 +179,7 @@ handler* dl_list::get_component(int index)
|
||||
|
||||
oid_list_handler* dl_list::get_locs(handler& query, int index)
|
||||
{
|
||||
if ( !INRANGE(index, 0, v_num_indices-1) )
|
||||
if ( !INRANGE(index, 0, (int) v_num_indices-1) )
|
||||
throw(boundaryException(0, v_num_indices-1, index));
|
||||
|
||||
if ( v_indices[index] == 0 )
|
||||
@@ -352,7 +352,7 @@ v_dl_list_tail.asciiOut(out); cerr << "\n";
|
||||
|
||||
oid_t* cell_ptr = &v_dl_list_head;
|
||||
|
||||
for ( int i=1; i<=v_sz; i++ ) {
|
||||
for ( unsigned int i=1; i<=v_sz; i++ ) {
|
||||
|
||||
if ( cell_ptr == 0 ) {
|
||||
throw(stringException("broken chain"));
|
||||
@@ -377,7 +377,7 @@ v_dl_list_tail.asciiOut(out); cerr << "\n";
|
||||
|
||||
void dl_list::batch_index_begin()
|
||||
{
|
||||
for ( int i=0; i<v_num_indices; i++ ) {
|
||||
for ( unsigned int i=0; i<v_num_indices; i++ ) {
|
||||
if ( v_indices[i] != 0 ) {
|
||||
(*v_indices[i]) -> batch_index_begin();
|
||||
}
|
||||
@@ -386,7 +386,7 @@ void dl_list::batch_index_begin()
|
||||
|
||||
void dl_list::batch_index_end()
|
||||
{
|
||||
for ( int i=0; i<v_num_indices; i++ ) {
|
||||
for ( unsigned int i=0; i<v_num_indices; i++ ) {
|
||||
if ( v_indices[i] != 0 ) {
|
||||
(*v_indices[i]) -> batch_index_end();
|
||||
}
|
||||
@@ -456,7 +456,7 @@ dl_list::insert_to_indices(const dl_list_cell_handler& new_object)
|
||||
|
||||
}
|
||||
|
||||
for ( int i = 1; i < v_num_indices; i++ ) {
|
||||
for ( unsigned int i = 1; i < v_num_indices; i++ ) {
|
||||
|
||||
if ( v_indices[i] == 0 ) continue;
|
||||
|
||||
@@ -521,7 +521,7 @@ io_status dl_list::cdrIn(buffer& buf)
|
||||
|
||||
oid_t dl_list::get_first_oid(const handler& query, int index)
|
||||
{
|
||||
if ( !INRANGE(index, 0, v_num_indices-1) ) {
|
||||
if ( !INRANGE(index, 0, (int) v_num_indices-1) ) {
|
||||
MESSAGE(cerr, "cset::get_first_oid(): invalid index");
|
||||
throw(boundaryException(0, v_num_indices-1, index));
|
||||
}
|
||||
@@ -535,7 +535,7 @@ oid_t dl_list::get_first_oid(const handler& query, int index)
|
||||
|
||||
void dl_list::commit()
|
||||
{
|
||||
for ( int i = 1; i < v_num_indices; i++ )
|
||||
for ( unsigned int i = 1; i < v_num_indices; i++ )
|
||||
{
|
||||
if ( v_indices[i] )
|
||||
v_indices[i] -> commit() ;
|
||||
|
||||
@@ -92,9 +92,9 @@ protected:
|
||||
//static memory_pool handler_space_pool;
|
||||
|
||||
protected:
|
||||
rootPtr obj_ptr;
|
||||
abs_storage* store;
|
||||
oid_t obj_id;
|
||||
rootPtr obj_ptr;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ long_pstring::extract(int left, int right, char* sink)
|
||||
//debug(cerr, right);
|
||||
//debug(cerr, int(v_str_ptr.loc));
|
||||
|
||||
if ( left > right || right - left > v_sz ) {
|
||||
if ( left > right || right - left > (int) v_sz ) {
|
||||
throw(boundaryException(left, right, v_sz));
|
||||
}
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ oid_list::oid_list(oid_list& x) :
|
||||
list_ptr.loc = 0;
|
||||
init_data_member(x.v_sz);
|
||||
|
||||
for ( int i=1; i<=v_sz; i++ )
|
||||
for ( unsigned int i=1; i<=v_sz; i++ )
|
||||
update_component(i, x(i));
|
||||
}
|
||||
|
||||
@@ -240,7 +240,7 @@ debug(cerr, int(this));
|
||||
debug(cerr, int(list_ptr.p));
|
||||
*/
|
||||
|
||||
if ( !INRANGE(ind, 1, v_sz) ) {
|
||||
if ( !INRANGE(ind, 1, (int) v_sz) ) {
|
||||
MESSAGE(cerr, "oid_list::opeartor(): out of range");
|
||||
throw(boundaryException(1, v_sz, ind));
|
||||
}
|
||||
@@ -330,7 +330,7 @@ oid_list::update_component(int index, const oid_t& new_oid)
|
||||
{
|
||||
//MESSAGE(cerr, "oid_list::update_component()");
|
||||
//debug(cerr, my_oid());
|
||||
if ( !INRANGE(index, 1, v_sz) ) {
|
||||
if ( !INRANGE(index, 1, (int) v_sz) ) {
|
||||
MESSAGE(cerr, "oid_list update(): out of range");
|
||||
throw(boundaryException(1, v_sz, index));
|
||||
}
|
||||
@@ -379,8 +379,6 @@ io_status oid_list::asciiIn(istream& in)
|
||||
if ( in.get() != '\n' )
|
||||
throw(formatException("should be a \n"));
|
||||
|
||||
handler* hd_ptr = 0;
|
||||
|
||||
dlist temp_list;
|
||||
dlist_void_ptr_cell* y = 0;
|
||||
|
||||
|
||||
@@ -66,8 +66,8 @@
|
||||
class oid_list: public composite
|
||||
{
|
||||
protected:
|
||||
chunks_index* chk_index;
|
||||
Boolean f_internal_index;
|
||||
chunks_index* chk_index;
|
||||
|
||||
union {
|
||||
mmdb_pos_t loc;
|
||||
|
||||
@@ -111,8 +111,8 @@ oid_t::oid_t(const char* source, Boolean ascii_format, Boolean swap_order)
|
||||
|
||||
/*
|
||||
MESSAGE(cerr, "constr oid_t using a string");
|
||||
debug(cerr, c_code);
|
||||
debug(cerr, i_code);
|
||||
debug(cerr, v_c_code);
|
||||
debug(cerr, v_i_code);
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ public:
|
||||
oid_t(c_code_t c, i_code_t i) : v_c_code(c), v_i_code(i), v_e_code(0) {};
|
||||
oid_t(const char* source, Boolean ascii_format, Boolean swap_order);
|
||||
oid_t(const oid_t& x) :
|
||||
v_e_code(x.v_e_code), v_c_code(x.v_c_code), v_i_code(x.v_i_code) {};
|
||||
v_c_code(x.v_c_code), v_i_code(x.v_i_code), v_e_code(x.v_e_code) {};
|
||||
~oid_t() {};
|
||||
|
||||
// oid_t equal and less test
|
||||
@@ -138,10 +138,10 @@ protected:
|
||||
}
|
||||
|
||||
protected:
|
||||
e_code_t v_e_code; // extended code. Not used within this class.
|
||||
// for using extra space purpose.
|
||||
c_code_t v_c_code; // class code
|
||||
i_code_t v_i_code; // instance code
|
||||
e_code_t v_e_code; // extended code. Not used within this class.
|
||||
// for using extra space purpose.
|
||||
};
|
||||
|
||||
typedef oid_t* oid_tPtr;
|
||||
|
||||
@@ -271,7 +271,7 @@ cerr << "\n";
|
||||
|
||||
out << v_sz << '\t';
|
||||
|
||||
for ( int i=0; i<v_sz; i++ )
|
||||
for ( unsigned int i=0; i<v_sz; i++ )
|
||||
out << x[i];
|
||||
|
||||
return done;
|
||||
@@ -380,7 +380,7 @@ for (int i=0; i<new_value_sz; i++)
|
||||
v_str_ptr.p = new char[v_sz+1];
|
||||
}
|
||||
memcpy(v_str_ptr.p, new_value, v_sz);
|
||||
|
||||
*(v_str_ptr.p + v_sz) = '\0';
|
||||
}
|
||||
|
||||
set_mode(UPDATE, true);
|
||||
|
||||
@@ -127,8 +127,8 @@ protected:
|
||||
/***************************/
|
||||
// instance-wise data
|
||||
/***************************/
|
||||
status_t status;
|
||||
oid_t f_oid;
|
||||
status_t status;
|
||||
abs_storage* storage_ptr;
|
||||
|
||||
virtual void init_persistent_info(persistent_info* = &transient_info);
|
||||
|
||||
@@ -129,7 +129,7 @@ short_list::~short_list()
|
||||
|
||||
handler* short_list::get_component(int index)
|
||||
{
|
||||
if ( !INRANGE(index, 1, v_sz) ) {
|
||||
if ( !INRANGE(index, 1, (int) v_sz) ) {
|
||||
MESSAGE(cerr, "out of range in short_list::get_component()");
|
||||
throw(boundaryException(1, v_sz, index));
|
||||
}
|
||||
@@ -155,7 +155,7 @@ io_status short_list::asciiOut(ostream& out)
|
||||
my_oid().asciiOut(out);
|
||||
out << "\n";
|
||||
|
||||
for ( int i=1; i<=v_sz; i++ ) {
|
||||
for ( unsigned int i=1; i<=v_sz; i++ ) {
|
||||
|
||||
handler* hd_ptr = get_component(i);
|
||||
|
||||
@@ -187,10 +187,10 @@ io_status short_list::asciiIn(istream& in)
|
||||
#ifndef C_API
|
||||
oid_t oid_buffer[OID_BUFFER_SIZE];
|
||||
int oid_buffer_level = 0;
|
||||
int ct = 0;
|
||||
#endif
|
||||
|
||||
char c;
|
||||
int ct = 0;
|
||||
while ( (c = in.get()) != LIST_MARK_CHAR ) {
|
||||
|
||||
in.putback(c);
|
||||
|
||||
@@ -77,7 +77,7 @@ handler* tuple::get_component(int index)
|
||||
//debug(cerr, int(storage_ptr));
|
||||
|
||||
|
||||
if (!INRANGE(index, 1, v_sz)) {
|
||||
if (!INRANGE(index, 1, (int) v_sz)) {
|
||||
MESSAGE(cerr, "out of range in tuple::get_component()");
|
||||
throw( boundaryException(1, v_sz, index) );
|
||||
}
|
||||
@@ -112,7 +112,7 @@ io_status tuple::asciiOut(ostream& out)
|
||||
out << "\n";
|
||||
// debug(cerr, v_sz);
|
||||
|
||||
for ( int i=1; i<=v_sz; i++ ) {
|
||||
for ( unsigned int i=1; i<=v_sz; i++ ) {
|
||||
|
||||
handler* hd_ptr = get_component(i);
|
||||
|
||||
@@ -154,7 +154,7 @@ MESSAGE(cerr, "\n");
|
||||
throw(stringException("'\\n' expected"));
|
||||
}
|
||||
|
||||
if ( comps > v_sz ) {
|
||||
if ( comps > (int) v_sz ) {
|
||||
MESSAGE(cerr, "tuple asciiIn(): to expand space");
|
||||
debug(cerr, comps);
|
||||
debug(cerr, v_sz);
|
||||
|
||||
Reference in New Issue
Block a user