dtinfo subtree dtinfogen

This commit is contained in:
Ulrich Wilkens
2012-10-14 17:13:07 +02:00
committed by Jon Trulson
parent 51b8929ebd
commit 07e886ba7c
45 changed files with 226 additions and 122 deletions

View File

@@ -1,6 +1,6 @@
XCOMM $TOG: Imakefile /main/11 1997/12/31 09:07:38 bill $
DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES)
NormalLibraryObjectRule()
@@ -181,16 +181,22 @@ ALL_MMDB_OBJS = $(API_OBJS) $(BTREE_OBJS) \
#ifdef AIXArchitecture
Libs = $(ALL_MMDB_OBJS) $(MATH_LIB) $(DTSVCLIB) $(TTLIB) $(XLIB)
#elif defined(LinuxArchitecture) || defined(FreeBSDArchitecture) || defined(OpenBSDArchitecture)
Libs=$(MMDB_LIBS) $(MATH_LIB) $(DTSVCLIB) $(MTF_LIBRARIES) $(TTLIB) $(XLIB)
#else
Libs = $(MMDB_LIBS) $(MATH_LIB) $(DTSVCLIB) $(TTLIB) $(XLIB)
#endif
#if defined(LinuxArchitecture) || defined(FreeBSDArchitecture) || defined(OpenBSDArchitecture)
Libs_C_API = $(MMDB_LIBS_C_API) $(DTSVCLIB) $(MTF_LIBRARIES) $(TTLIB) $(XLIB) $(MATH_LIB)
#else
Libs_C_API = $(MMDB_LIBS_C_API) $(DTSVCLIB) $(TTLIB) $(XLIB) $(MATH_LIB)
#endif
SimpleCPlusPlusProgram(dbdrv,main.o,$(Libs))
SimpleCPlusPlusProgram(restore,restore.o,$(Libs))
#ifdef USLArchitecture
#if defined(USLArchitecture) || defined(LinuxArchitecture) || defined(FreeBSDArchitecture)
SimpleCPlusPlusProgram(dbdrv_c_api,main_c_api.o,$(Libs_C_API))
#else
SimpleCProgram(dbdrv_c_api,main_c_api.o,$(Libs_C_API))

View File

@@ -70,7 +70,7 @@ int select_and_process( int argc, char** argv )
} else {
if ( strcmp(argv[1], "define") == 0 ) {
infolib_ptr = mmdb.openInfoLib();
infolib_ptr = mmdb.openInfoLib(getenv("MMDB_PATH"));
if ( infolib_ptr == 0 ||
infolib_ptr->define_info_base(argv[3],argv[4],argv[2]) == false
@@ -149,12 +149,12 @@ main( int argc, char** argv )
int ok;
try
mtry
{
ok = select_and_process( argc, argv );
}
catch (mmdbException &,e)
mcatch (mmdbException &,e)
{
cerr << "Exception msg: " << e << "\n";
#ifdef DEBUG

View File

@@ -24,6 +24,7 @@
#include "oliasdb/Mmdb.h"
#include <stdio.h>
#include <stdlib.h>
usage(int argc, char** argv)

View File

@@ -31,8 +31,9 @@
* (c) Copyright 1996 Hitachi.
*/
#include <fstream.h>
#include <strstream.h>
#include <fstream>
#include <sstream>
using namespace std;
#include "utility/const.h"
#include "utility/randomize.h"
@@ -49,7 +50,7 @@ main(int argc, char** argv)
fstr.getline(schema_header, 1024);
int sz = bytes(fstr) - strlen(schema_header) - 1;
int sz = bytes(*(argv+1)) - strlen(schema_header) - 1;
char* buf = new char[sz];