dtinfo subtree DtMmdb

This commit is contained in:
Ulrich Wilkens
2012-10-14 15:38:27 +02:00
committed by Jon Trulson
parent b92cf08899
commit 8c8363f4a5
184 changed files with 1090 additions and 773 deletions

View File

@@ -23,7 +23,7 @@ XCOMM .../programs/dtinfo/mmdb/<subdir>/Imakefile
#define LargePICTable YES
#define CplusplusSource YES
DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES)
XCOMM In DtMmdb we compile as C_API sources.
DEFINES = -DC_API

View File

@@ -44,7 +44,8 @@
#include <sys/time.h>
#include <math.h>
#include <fstream.h>
#include <fstream>
using namespace std;
#include <search.h>
#include "dynhash/bucket.h"

View File

@@ -59,7 +59,7 @@ atoi_larson* data_t::larson_convertor_ptr;
atoi_pearson* data_t::pearson_convertor_ptr;
#else
atoi_larson data_t::larson_convertor;
atoi_pearson data_t::pearson_convertor(MAXSHORT, 256);
atoi_pearson data_t::pearson_convertor(SHRT_MAX, 256);
#endif
data_t::data_t(data_t& d)
@@ -214,7 +214,7 @@ istream& operator >>(istream& i, data_t& d)
delete d.key.str_key;
d.flag = (data_t::flag_type)atoi(buf);
d.dt = voidPtr(atoi(voidPtr_ptr));
d.dt = (voidPtr)(size_t)atoi(voidPtr_ptr);
if ( d.flag == data_t::INT )
d.key.int_key = atoi(key_ptr);

View File

@@ -53,7 +53,8 @@
#ifdef C_API
#include "utility/c_iostream.h"
#else
#include <iostream.h>
#include <iostream>
using namespace std;
#endif
int steps[] = { 2, 3, 5, 7, 11, 13, 17, 21, 23, 29, 31, 37, 41, 43, 47, 51 };
@@ -129,7 +130,8 @@ void imp_die::alloc_table(int new_H)
void imp_die::init_table()
{
for ( int i = 0; i < B; i++ ) {
int i;
for ( i = 0; i < B; i++ ) {
bucket_array[i] = 0 ;
}
for ( i = 0; i < H; i++ ) {
@@ -142,7 +144,8 @@ void imp_die::clean()
n = 0;
collect_all_keys();
for ( int i=0; i<B; i++ ) {
int i;
for ( i=0; i<B; i++ ) {
if ( bucket_array[i] ) {
delete bucket_array[i];
bucket_array[i] = 0 ;