mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
dtinfo subtree dtinfogen
This commit is contained in:
parent
51b8929ebd
commit
07e886ba7c
45 changed files with 226 additions and 122 deletions
|
@ -5,6 +5,17 @@ XCOMM $TOG: Imakefile /main/12 1998/08/10 15:54:48 mgreess $
|
|||
|
||||
SUBDIRS=mmdb infolib install
|
||||
|
||||
XCOMM redefine TopLevelProject to build DtInfo with standard CDE config dir
|
||||
#undef TopLevelProject
|
||||
#define TopLevelProject DtInfo
|
||||
IMAKE_DEFINES = -DTopLevelProject=TopLevelProject \
|
||||
-DProjectTmplFile='<DtInfo.tmpl>' \
|
||||
-DProjectRulesFile='<DtInfo.rules>'
|
||||
|
||||
XCOMM Variables to switch on debug mode temporarily
|
||||
XCOMM CDEBUGFLAGS = -g -DDEBUG
|
||||
XCOMM CXXDEBUGFLAGS = -g -DDEBUG
|
||||
|
||||
MakeSubdirs($(SUBDIRS))
|
||||
DependSubdirs($(SUBDIRS))
|
||||
NamedTargetSubdirs(install_buildtools,$(SUBDIRS),\
|
||||
|
|
|
@ -7,6 +7,17 @@ SUBDIRS=etc C.ISO-8859-1 ja_JP.EUC-JP
|
|||
|
||||
LinkFile(C,C.ISO-8859-1)
|
||||
|
||||
XCOMM redefine TopLevelProject to build DtInfo with standard CDE config dir
|
||||
#undef TopLevelProject
|
||||
#define TopLevelProject DtInfo
|
||||
IMAKE_DEFINES = -DTopLevelProject=TopLevelProject \
|
||||
-DProjectTmplFile='<DtInfo.tmpl>' \
|
||||
-DProjectRulesFile='<DtInfo.rules>'
|
||||
|
||||
XCOMM Variables to switch on debug mode temporarily
|
||||
XCOMM CDEBUGFLAGS = -g -DDEBUG
|
||||
XCOMM CXXDEBUGFLAGS = -g -DDEBUG
|
||||
|
||||
MakeSubdirs($(SUBDIRS))
|
||||
DependSubdirs($(SUBDIRS))
|
||||
NamedTargetSubdirs(install_buildtools,$(SUBDIRS),\
|
||||
|
|
|
@ -34,7 +34,8 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <iostream.h>
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
#include <assert.h>
|
||||
|
||||
#include "AttributeRec.h"
|
||||
|
|
|
@ -23,7 +23,8 @@
|
|||
/* $XConsortium: AttributeRec.cc /main/4 1996/07/18 16:08:22 drk $ */
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <iostream.h>
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
#include <assert.h>
|
||||
|
||||
#include "SGMLDefn.h"
|
||||
|
|
|
@ -25,7 +25,8 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <iostream.h>
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
#include "List.h"
|
||||
#include "AttributeRec.h"
|
||||
|
|
|
@ -37,7 +37,8 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <assert.h>
|
||||
#include <stream.h>
|
||||
#include <sstream>
|
||||
using namespace std;
|
||||
|
||||
/* imported interfaces */
|
||||
#include <misc/unique_id.h>
|
||||
|
@ -45,6 +46,7 @@
|
|||
#include "Task.h"
|
||||
#include "DataBase.h"
|
||||
#include "DataRepository.h"
|
||||
#include "api/utility.h"
|
||||
|
||||
/* exported interfaces */
|
||||
#include "AusTextStorage.h"
|
||||
|
@ -297,7 +299,7 @@ AusTextStore::insert( const char *BookShortTitle,
|
|||
// The following was unique, but there is a limit to the size of
|
||||
// the key, so let's just use a simple counter.
|
||||
// fprintf(afp, "%s%s%s\n", store->get_zone_name(pos), BookID, SectionID);
|
||||
fprintf(afp, "%s%d\n", store->get_zone_name(pos), f_recordcount);
|
||||
fprintf(afp, "%s%d\n", store->get_zone_name(pos), (int)f_recordcount);
|
||||
|
||||
fprintf(afp, "0/0/0~0:0\n"); // null date
|
||||
|
||||
|
|
|
@ -32,7 +32,8 @@
|
|||
*/
|
||||
|
||||
|
||||
#include <stream.h>
|
||||
#include <sstream>
|
||||
using namespace std;
|
||||
|
||||
/* import... */
|
||||
#include <assert.h>
|
||||
|
@ -46,6 +47,7 @@
|
|||
#include "OL-Data.h"
|
||||
#include "StringList.h"
|
||||
#include "StyleTask.h"
|
||||
#include "api/utility.h"
|
||||
|
||||
/* export... */
|
||||
#include "BookTasks.h"
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
|
||||
#if !defined(__osf__) && !defined(USL)
|
||||
#if !defined(__osf__) && !defined(USL) && !defined(linux) && !defined(CSRG_BASED)
|
||||
#include <osfcn.h>
|
||||
#endif
|
||||
|
||||
|
@ -201,8 +201,9 @@ typedef struct ol_data_buffer_state *ol_data_BUFFER_STATE;
|
|||
|
||||
#define ol_data_CHAR unsigned char
|
||||
#define INITIAL 0
|
||||
#include <iostream.h>
|
||||
#include <stream.h>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
using namespace std;
|
||||
#include <stdio.h>
|
||||
#include <memory.h>
|
||||
#include <string.h>
|
||||
|
@ -217,6 +218,7 @@ typedef struct ol_data_buffer_state *ol_data_BUFFER_STATE;
|
|||
#include "Expression.h"
|
||||
#include "OL_DataExpr.tab.h"
|
||||
#include "ContentType.h"
|
||||
#include "api/utility.h"
|
||||
|
||||
/* CurrentContentPtr is used as the communication media between
|
||||
* ol_dataparse and ContentType::Parse()
|
||||
|
|
|
@ -477,6 +477,7 @@ void DBCursor::int_field(FILE *fp, int *out)
|
|||
void DBCursor::short_list(FILE *fp, int *qout, int ltype, void *out)
|
||||
{
|
||||
int c;
|
||||
int ret;
|
||||
|
||||
c = fgetc(fp);
|
||||
FRIENDLY_ASSERT(c == '#');
|
||||
|
@ -498,7 +499,7 @@ void DBCursor::short_list(FILE *fp, int *qout, int ltype, void *out)
|
|||
int ftype;
|
||||
|
||||
ungetc(c, fp);
|
||||
fscanf(fp, "%d\n", &ftype);
|
||||
ret = fscanf(fp, "%d\n", &ftype);
|
||||
FRIENDLY_ASSERT(ftype == STRING_CODE);
|
||||
|
||||
string_field(fp, &item, NULL);
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
|
||||
//-------------Initializer for the zone_name mapping ----------------
|
||||
static char *zone_name[] = {
|
||||
static const char *zone_name[] = {
|
||||
"D",
|
||||
"H",
|
||||
"G",
|
||||
|
|
|
@ -22,7 +22,8 @@
|
|||
*/
|
||||
/* $XConsortium: FlexBuffer.cc /main/2 1996/07/18 16:13:49 drk $ */
|
||||
|
||||
#include <iostream.h>
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
#include <memory.h>
|
||||
#include <string.h>
|
||||
#include "FlexBuffer.h"
|
||||
|
|
|
@ -25,7 +25,8 @@
|
|||
#define FLEX_BFR_HDR
|
||||
|
||||
#include <stddef.h>
|
||||
#include <iostream.h>
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class FlexBuffer {
|
||||
|
||||
|
|
|
@ -22,8 +22,9 @@
|
|||
*/
|
||||
/* $XConsortium: GraphicsTask.cc /main/8 1996/08/14 16:59:38 rcs $ */
|
||||
#include <assert.h>
|
||||
#include <stream.h>
|
||||
#include <iostream.h>
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#ifndef __HandlerH__
|
||||
#define __HandlerH__
|
||||
|
||||
#include <new.h>
|
||||
#include <new>
|
||||
extern void FreeStoreException();
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
XCOMM $TOG: Imakefile /main/27 1997/09/05 11:29:30 samborn $
|
||||
|
||||
DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
|
||||
DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES)
|
||||
CXXEXTRA_INCLUDES = -DEXPAND_TEMPLATES
|
||||
|
||||
NormalCplusplusObjectRule()
|
||||
|
||||
#ifdef RegenParserFiles
|
||||
XCOMM lex flags
|
||||
|
@ -287,6 +290,13 @@ SimpleCPlusPlusProgram(NodeParser, NodeParser.o libOLAFParse.a libOLAFParseT.a,$
|
|||
SimpleCPlusPlusProgram(NCFGen, NCFGen.o libOLAFParse.a libOLAFParseT.a,$(Libs) $(DTSVCLIB) $(TTLIB))
|
||||
SimpleCPlusPlusProgram(MixedGen, MixedGen.o RemoteId.o libOLAFParse.a libOLAFParseT.a,$(Libs) $(DTSVCLIB) $(TTLIB))
|
||||
SimpleCPlusPlusProgram(StyleUpdate, StyleUpdate.o libOLAFParse.a libOLAFParseT.a,$(Libs) $(DTSVCLIB) $(TTLIB))
|
||||
#elif defined(LinuxArchitecture) || defined(FreeBSDArchitecture) || defined(OpenBSDArchitecture)
|
||||
TEMPLATE_OBJS = TKTemplate.o
|
||||
RealLibrary(OLAFParse,$(OBJS),$(LIBDIR))
|
||||
SimpleCPlusPlusProgram(NodeParser, NodeParser.o $(TEMPLATE_OBJS) libOLAFParse.a,$(Libs))
|
||||
SimpleCPlusPlusProgram(NCFGen, NCFGen.o $(TEMPLATE_OBJS) libOLAFParse.a,$(Libs) $(DTSVCLIB) $(MTF_LIBRARIES) $(TTLIB))
|
||||
SimpleCPlusPlusProgram(MixedGen, MixedGen.o RemoteId.o $(TEMPLATE_OBJS) libOLAFParse.a,$(Libs) $(DTSVCLIB) $(MTF_LIBRARIES) $(TTLIB))
|
||||
SimpleCPlusPlusProgram(StyleUpdate, StyleUpdate.o $(TEMPLATE_OBJS) libOLAFParse.a,$(Libs) $(DTSVCLIB) $(MTF_LIBRARIES) $(TTLIB))
|
||||
#else
|
||||
TEMPLATE_OBJS = TKTemplate.o
|
||||
RealLibrary(OLAFParse,$(OBJS),$(LIBDIR))
|
||||
|
|
|
@ -569,7 +569,8 @@ writeDLP(BookCaseDB &db, info_lib *mmdb,
|
|||
char *
|
||||
getGI( char * bufptr )
|
||||
{
|
||||
for (char * cptr = bufptr; *cptr != '>'; cptr++) {
|
||||
char* cptr;
|
||||
for (cptr = bufptr; *cptr != '>'; cptr++) {
|
||||
}
|
||||
*cptr = '\0';
|
||||
char * retval = strdup(bufptr);
|
||||
|
@ -811,11 +812,11 @@ writeBooks(BookCaseDB& db,
|
|||
DBCursor *GraphicsCursorPtr;
|
||||
|
||||
int process_graphics = 1;
|
||||
try {
|
||||
mtry {
|
||||
DBTable *graphics = db.table(BookCaseDB::Graphics, DB::READ);
|
||||
GraphicsCursorPtr = new DBCursor( *graphics );
|
||||
}
|
||||
catch (PosixError&, p){
|
||||
mcatch (PosixError&, p){
|
||||
/* error opening graphics stuff... skip graphics */
|
||||
|
||||
process_graphics = 0;
|
||||
|
@ -876,7 +877,7 @@ writeLCF(BookCaseDB& db, info_lib *mmdb,
|
|||
const char *opaque, *nodeloc;
|
||||
char* reflabel;
|
||||
nodeloc = opaque = (const char *)loc_val->get_value();
|
||||
reflabel = strchr(opaque, '\t');
|
||||
reflabel = strchr((char*)opaque, '\t');
|
||||
*reflabel++ = 0;
|
||||
|
||||
const char *nodeOID = to_oid(mmdb, bcname, nodeloc);
|
||||
|
@ -959,7 +960,7 @@ main(int argc, char **argv)
|
|||
char *bookcaseDir = argv[0];
|
||||
char *infobaseDir = argv[1];
|
||||
|
||||
try{
|
||||
mtry{
|
||||
BookCaseDB db(bookcaseDir);
|
||||
|
||||
const char *infolibDir;
|
||||
|
@ -979,7 +980,7 @@ main(int argc, char **argv)
|
|||
comp_agent[i] = 0;
|
||||
}
|
||||
|
||||
ostrstream str_buf( comp_agent, COMPRESSED_AGENT_SIZE );
|
||||
ostringstream str_buf( comp_agent );
|
||||
|
||||
info_base *bcptr = mmdb->get_info_base(bcname);
|
||||
handler *x =
|
||||
|
@ -1004,11 +1005,11 @@ main(int argc, char **argv)
|
|||
ret = 0;
|
||||
|
||||
}
|
||||
catch(PosixError&, pe){
|
||||
mcatch(PosixError&, pe){
|
||||
fprintf(stderr, "%s: error on %s: %s\n",
|
||||
progname, bookcaseDir, pe.msg());
|
||||
}
|
||||
catch(Unexpected&, pe) {
|
||||
mcatch(Unexpected&, pe) {
|
||||
fprintf(stderr, "(ERROR) %s\n\n", pe.msg() );
|
||||
exit(1);
|
||||
}end_try;
|
||||
|
|
|
@ -27,7 +27,8 @@
|
|||
#if !defined(__uxp__) && !defined(USL)
|
||||
#include <strings.h>
|
||||
#endif
|
||||
#include <strstream.h>
|
||||
#include <sstream>
|
||||
using namespace std;
|
||||
|
||||
#include "Exceptions.hh"
|
||||
#include "DataBase.h"
|
||||
|
@ -150,7 +151,7 @@ buildNCF(BookCaseDB& db, const char *base_name, int compressed)
|
|||
comp_agent[i] = 0;
|
||||
}
|
||||
|
||||
ostrstream str_buf( comp_agent,COMPRESSED_AGENT_SIZE);
|
||||
ostringstream str_buf( comp_agent );
|
||||
handler *x = (base_ptr->get_obj_dict()).get_handler(
|
||||
form("%s.%s", base_name, "sgml.dict"));
|
||||
x->its_oid().asciiOut(str_buf);
|
||||
|
@ -195,10 +196,8 @@ buildNCF(BookCaseDB& db, const char *base_name, int compressed)
|
|||
}
|
||||
|
||||
stylesheet_smart_ptr sheet(base_ptr, style);
|
||||
char oid_buf[BUFSIZE];
|
||||
ostrstream strout(oid_buf,BUFSIZE,ios::out);
|
||||
ostringstream strout;
|
||||
sheet.its_oid().asciiOut(strout);
|
||||
oid_buf[strout.pcount()] = NULL;
|
||||
|
||||
ncf->insert(STRING_CODE, nodeLocator,
|
||||
STRING_CODE, title,
|
||||
|
@ -206,7 +205,7 @@ buildNCF(BookCaseDB& db, const char *base_name, int compressed)
|
|||
COMPRESSED_STRING_CODE, comp_agent, "",
|
||||
STRING_CODE, bookLocator,
|
||||
OID_CODE, "0.0", /* pointer to Book/CCF/DOC object */
|
||||
OID_CODE, oid_buf,
|
||||
OID_CODE, (char *)strout.str().c_str(),
|
||||
NULL);
|
||||
}
|
||||
|
||||
|
@ -252,10 +251,8 @@ buildNCF(BookCaseDB& db, const char *base_name, int compressed)
|
|||
|
||||
|
||||
stylesheet_smart_ptr sheet(base_ptr, style);
|
||||
char oid_buf[BUFSIZE];
|
||||
ostrstream strout(oid_buf,BUFSIZE,ios::out);
|
||||
ostringstream strout;
|
||||
sheet.its_oid().asciiOut(strout);
|
||||
oid_buf[strout.pcount()] = NULL;
|
||||
|
||||
ncf->insert(STRING_CODE, nodeLocator,
|
||||
STRING_CODE, title,
|
||||
|
@ -263,7 +260,7 @@ buildNCF(BookCaseDB& db, const char *base_name, int compressed)
|
|||
STRING_CODE, "",
|
||||
STRING_CODE, bookLocator,
|
||||
OID_CODE, "0.0", /* pointer to Book/CCF/DOC object */
|
||||
OID_CODE, oid_buf,
|
||||
OID_CODE, (char *)strout.str().c_str(),
|
||||
NULL);
|
||||
}
|
||||
|
||||
|
@ -327,7 +324,7 @@ main(int argc, char **argv)
|
|||
const char *base_name = argv[0];
|
||||
const char *bookcaseDir = argv[1];
|
||||
|
||||
try{
|
||||
mtry{
|
||||
BookCaseDB db(bookcaseDir);
|
||||
|
||||
if ( load_style_only ) {
|
||||
|
@ -339,20 +336,20 @@ main(int argc, char **argv)
|
|||
ret = 0;
|
||||
}
|
||||
|
||||
catch(PosixError&, pe){
|
||||
mcatch(PosixError&, pe){
|
||||
fprintf(stderr, "%s: error on %s: %s\n",
|
||||
progname, bookcaseDir, pe.msg());
|
||||
}
|
||||
|
||||
catch(Unexpected&, pe) {
|
||||
mcatch(Unexpected&, pe) {
|
||||
fprintf(stderr, "(ERROR) %s\n\n", pe.msg() );
|
||||
}
|
||||
|
||||
catch(mmdbException&, e) {
|
||||
mcatch(mmdbException&, e) {
|
||||
cerr << e;
|
||||
}
|
||||
|
||||
catch_any() {
|
||||
mcatch_any() {
|
||||
fprintf(stderr, "*** Internal Error ***: unexpected exception\n");
|
||||
abort();
|
||||
}end_try;
|
||||
|
|
|
@ -35,8 +35,9 @@
|
|||
#include "NodeData.h"
|
||||
|
||||
/* imported interfaces... */
|
||||
#include <iostream.h>
|
||||
#include <stream.h>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
using namespace std;
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
|
@ -54,6 +55,7 @@
|
|||
#include "BookCaseDB.h"
|
||||
#include "GraphicsTask.h"
|
||||
#include "Dispatch.h"
|
||||
#include "api/utility.h"
|
||||
#ifdef UseQSearch
|
||||
#include "QSearch.h"
|
||||
#else
|
||||
|
|
|
@ -93,32 +93,32 @@ int main(int argc, char **argv)
|
|||
|
||||
Dispatch::setRoot(t, istack);
|
||||
|
||||
try{
|
||||
mtry{
|
||||
extern int yylex();
|
||||
|
||||
yylex();
|
||||
|
||||
ret = 0;
|
||||
}
|
||||
catch(Unexpected&, u)
|
||||
mcatch(Unexpected&, u)
|
||||
{
|
||||
try {
|
||||
mtry {
|
||||
Dispatch::tok->reportError(Token::User, Token::Fatal,
|
||||
"markup error: %s", u.msg());
|
||||
}
|
||||
catch(ErrorReported&, e)
|
||||
mcatch(ErrorReported&, e)
|
||||
{
|
||||
if ( e.f_severity == Token::Fatal ) {
|
||||
exit(1);
|
||||
}
|
||||
}end_try;
|
||||
}
|
||||
catch(PosixError&, pe)
|
||||
mcatch(PosixError&, pe)
|
||||
{
|
||||
fprintf(stderr, "(ERROR) %s\n", pe.msg() );
|
||||
exit(1);
|
||||
}
|
||||
catch(ErrorReported&, e)
|
||||
mcatch(ErrorReported&, e)
|
||||
{
|
||||
if ( e.f_severity == Token::Fatal ) {
|
||||
exit(1);
|
||||
|
|
|
@ -23,7 +23,8 @@
|
|||
/* $XConsortium: NodeTask.C /main/6 1996/10/26 18:18:31 cde-hal $ */
|
||||
/* $Id */
|
||||
|
||||
#include <stream.h>
|
||||
#include <sstream>
|
||||
using namespace std;
|
||||
|
||||
/* exported interfaces... */
|
||||
#include "NodeTask.h"
|
||||
|
@ -42,6 +43,7 @@
|
|||
#include "OL-Data.h"
|
||||
#include "NodeData.h"
|
||||
#include "StyleTask.h"
|
||||
#include "api/utility.h"
|
||||
|
||||
#ifdef FISH_DEBUG
|
||||
#include "dbug.h" /* Fred Fish's dbug.h */
|
||||
|
|
|
@ -228,14 +228,16 @@ ol_dataloop:
|
|||
goto ol_datareduce;
|
||||
}
|
||||
if (ol_dataerrflag) goto ol_datainrecovery;
|
||||
#if 0 // Disable for now
|
||||
// Disable for now
|
||||
#if 0
|
||||
#ifdef lint
|
||||
goto ol_datanewerror;
|
||||
#endif
|
||||
ol_datanewerror:
|
||||
#endif /* 0 */
|
||||
ol_dataerror("syntax error");
|
||||
#if 0 // Disable for now
|
||||
ol_dataerror((char*)"syntax error");
|
||||
// Disable for now
|
||||
#if 0
|
||||
#ifdef lint
|
||||
goto ol_dataerrlab;
|
||||
#endif
|
||||
|
@ -424,7 +426,7 @@ to state %d\n", *ol_datassp, ol_datastate);
|
|||
*++ol_datavsp = ol_dataval;
|
||||
goto ol_dataloop;
|
||||
ol_dataoverflow:
|
||||
ol_dataerror("yacc stack overflow");
|
||||
ol_dataerror((char*)"yacc stack overflow");
|
||||
ol_dataabort:
|
||||
return (1);
|
||||
ol_dataaccept:
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
|
||||
#if !defined(__osf__) && !defined(USL)
|
||||
#if !defined(__osf__) && !defined(USL) && !defined(linux) && !defined(CSRG_BASED)
|
||||
# include <osfcn.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
|
||||
#if !defined(__osf__) && !defined(USL)
|
||||
#if !defined(__osf__) && !defined(USL) && !defined(linux) && !defined(CSRG_BASED)
|
||||
#include <osfcn.h>
|
||||
#endif
|
||||
|
||||
|
@ -195,8 +195,9 @@ typedef struct nodedata_buffer_state *nodedata_BUFFER_STATE;
|
|||
#include "NodeData.h"
|
||||
|
||||
/* imported interfaces... */
|
||||
#include <iostream.h>
|
||||
#include <stream.h>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
using namespace std;
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
|
@ -214,6 +215,7 @@ typedef struct nodedata_buffer_state *nodedata_BUFFER_STATE;
|
|||
#include "BookCaseDB.h"
|
||||
#include "GraphicsTask.h"
|
||||
#include "Dispatch.h"
|
||||
#include "api/utility.h"
|
||||
|
||||
// Debugging macro
|
||||
#ifdef DEBUG
|
||||
|
|
|
@ -114,6 +114,8 @@ StringToInt::StringToInt()
|
|||
total = used = 0;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
StringToInt::intern(const char *name)
|
||||
{
|
||||
int indx;
|
||||
|
|
|
@ -29,10 +29,12 @@
|
|||
#endif
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <stream.h>
|
||||
#include <sstream>
|
||||
using namespace std;
|
||||
|
||||
#include "Exceptions.hh"
|
||||
#include "Task.h"
|
||||
#include "api/utility.h"
|
||||
|
||||
/* exported interface */
|
||||
#include "SearchPath.h"
|
||||
|
@ -147,9 +149,6 @@ SearchPath::get_real_path( const char *file_name )
|
|||
fclose( fp );
|
||||
return ( full_path_name );
|
||||
}
|
||||
|
||||
fclose( fp );
|
||||
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
|
|
@ -36,13 +36,15 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <assert.h>
|
||||
#include <stream.h>
|
||||
#include <sstream>
|
||||
using namespace std;
|
||||
|
||||
/* imported interfaces */
|
||||
#include <misc/unique_id.h>
|
||||
#include "FlexBuffer.h"
|
||||
#include "Task.h"
|
||||
#include "DataBase.h"
|
||||
#include "api/utility.h"
|
||||
|
||||
/* exported interfaces */
|
||||
#include "SearchStorage.h"
|
||||
|
|
|
@ -23,7 +23,8 @@
|
|||
/* $XConsortium: StyleUpdate.C /main/7 1996/08/21 15:47:33 drk $ */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <iostream.h>
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
|
||||
#include "Exceptions.hh"
|
||||
|
@ -79,8 +80,8 @@ int main(int argc, char **argv)
|
|||
|
||||
Dispatch::setRoot(styleTask, istack);
|
||||
|
||||
try{
|
||||
try{
|
||||
mtry{
|
||||
mtry{
|
||||
extern int yylex();
|
||||
|
||||
yylex();
|
||||
|
@ -112,21 +113,21 @@ int main(int argc, char **argv)
|
|||
|
||||
ret = 0;
|
||||
|
||||
}catch(Unexpected&, u){
|
||||
}mcatch(Unexpected&, u){
|
||||
Dispatch::tok->reportError(Token::User, Token::Fatal,
|
||||
"markup error: %s", u.msg());
|
||||
}
|
||||
catch(PosixError&, p){
|
||||
mcatch(PosixError&, p){
|
||||
Token::signalError(Token::Internal, Token::Fatal, 0, 0,
|
||||
"%s", p.msg() );
|
||||
}end_try;
|
||||
|
||||
}catch(ErrorReported&, e){
|
||||
}mcatch(ErrorReported&, e){
|
||||
/* error is already reported. */
|
||||
}catch(mmdbException&, e){
|
||||
}mcatch(mmdbException&, e){
|
||||
cerr << e;
|
||||
}
|
||||
catch_any() {
|
||||
mcatch_any() {
|
||||
fprintf(stderr, "*** Internal Error ***: unexpected exception\n");
|
||||
abort();
|
||||
}end_try;
|
||||
|
|
|
@ -22,20 +22,22 @@
|
|||
*/
|
||||
/* $XConsortium: StyleValidate.cc /main/2 1996/07/18 16:18:13 drk $ */
|
||||
#include <stdio.h>
|
||||
#include <iostream.h>
|
||||
#include <stream.h>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
using namespace std;
|
||||
#include <unistd.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
#include "DataBase.h"
|
||||
#include "StyleValidate.h"
|
||||
#include "api/utility.h"
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
int
|
||||
validate_stylesheet( const char *buf, int buf_size, enum RENDERER_ENGINE_T t )
|
||||
{
|
||||
|
||||
char *styleFile = form( "/usr/tmp/style_sheet.%d", getpid() );
|
||||
char *styleFile = form( "/tmp/style_sheet.%d", getpid() );
|
||||
|
||||
FILE *fp = fopen( styleFile, "w" );
|
||||
if ( !fp ) {
|
||||
|
@ -49,10 +51,10 @@ validate_stylesheet( const char *buf, int buf_size, enum RENDERER_ENGINE_T t )
|
|||
|
||||
switch ( t ) {
|
||||
case ONLINE:
|
||||
renderer = "online";
|
||||
renderer = (char*)"online";
|
||||
break;
|
||||
case PRINT:
|
||||
renderer = "hardcopy";
|
||||
renderer = (char*)"hardcopy";
|
||||
break;
|
||||
default:
|
||||
throw( PosixError(1, "Unknown renderer engine\n") );
|
||||
|
|
|
@ -34,11 +34,11 @@
|
|||
#include "dti_cc/CC_Stack.h"
|
||||
#include "dti_cc/CC_Stack.C"
|
||||
#include "dti_cc/CC_Slist.h"
|
||||
#include "dti_cc/CC_Slist.C"
|
||||
// #include "dti_cc/CC_Slist.C"
|
||||
#include "dti_cc/cc_pvect.h"
|
||||
#include "dti_cc/cc_pvect.C"
|
||||
// #include "dti_cc/cc_pvect.C"
|
||||
#include "dti_cc/cc_hdict.h"
|
||||
#include "dti_cc/cc_hdict.C"
|
||||
// #include "dti_cc/cc_hdict.C"
|
||||
#include "BTCollectable.h"
|
||||
#include "DataRepository.h"
|
||||
#include "dti_cc/CC_String.h"
|
||||
|
|
|
@ -184,7 +184,7 @@ static void
|
|||
signalErrorVA(int src, int sev, const char *file, int line,
|
||||
const char *fmt, va_list ap)
|
||||
{
|
||||
static char *srcMsg[] = { "Error", "**Internal Error**" };
|
||||
static const char *srcMsg[] = { "Error", "**Internal Error**" };
|
||||
|
||||
if(file){
|
||||
fprintf(stderr, "DtInfo Toolkit: %s at %s:%d: ", srcMsg[src], file, line);
|
||||
|
|
|
@ -26,7 +26,8 @@
|
|||
#ifndef TOKEN_HEADER
|
||||
#define TOKEN_HEADER
|
||||
|
||||
#include <strstream.h>
|
||||
#include <sstream>
|
||||
using namespace std;
|
||||
|
||||
#include "Exceptions.hh"
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#!/bin/sh
|
||||
set -h
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
|
@ -222,6 +221,14 @@ case "$OS" in
|
|||
ARCH=mips
|
||||
;;
|
||||
|
||||
Linux*)
|
||||
ARCH=i386
|
||||
;;
|
||||
|
||||
FreeBSD*)
|
||||
ARCH=i386
|
||||
;;
|
||||
|
||||
*)
|
||||
err_f "Does not run under [$OS]"
|
||||
;;
|
||||
|
|
|
@ -181,7 +181,7 @@ t_entry langtbl[] =
|
|||
NULL, 0, NULL, NULL, NULL
|
||||
};
|
||||
|
||||
static char *usageMsg = "USAGE:\n\
|
||||
static char *usageMsg1 = "USAGE:\n\
|
||||
" EXEC_NAME " -h\n\
|
||||
" EXEC_NAME " admin\n\
|
||||
" EXEC_NAME " build [-h] [-T <tmpdir>] [-m <catalog>] [-d <library description>]\n\
|
||||
|
@ -191,7 +191,9 @@ static char *usageMsg = "USAGE:\n\
|
|||
" EXEC_NAME " update [-h] [-m <catalog>] -l <library> -b <bookcase> <stylesheet>\n\
|
||||
" EXEC_NAME " validate [-h] [-T <tmpdir>] [-m <catalog>] <document>...\n\
|
||||
\n\
|
||||
options:\n\
|
||||
options:\n";
|
||||
|
||||
static char *usageMsg2 = "\
|
||||
-T <tmpdir> directory for intermediate processing files\n\
|
||||
-h help: show usage\n\
|
||||
-v verbose: more diagnostic output\n";
|
||||
|
@ -258,7 +260,8 @@ printUsage(char *preMsg, int exitCode)
|
|||
if (preMsg)
|
||||
fputs(preMsg, stderr);
|
||||
|
||||
fputs(usageMsg, stderr);
|
||||
fputs(usageMsg1, stderr);
|
||||
fputs(usageMsg2, stderr);
|
||||
|
||||
exit(exitCode);
|
||||
}
|
||||
|
@ -526,12 +529,13 @@ makeWorkDir(void)
|
|||
static void
|
||||
removeWorkDir(void)
|
||||
{
|
||||
int ret;
|
||||
char cmdBuf[MAXPATHLEN + 10];
|
||||
|
||||
if (gStruct->workDir)
|
||||
{
|
||||
sprintf(cmdBuf, "rm -rf %s", gStruct->workDir);
|
||||
system(cmdBuf);
|
||||
ret = system(cmdBuf);
|
||||
XtFree(gStruct->workDir);
|
||||
gStruct->workDir = (char *)NULL;
|
||||
}
|
||||
|
@ -1422,6 +1426,8 @@ parseDocument(Boolean runCmd, ...)
|
|||
static void
|
||||
buildBookcase(char *cmdSrc, char *dirName)
|
||||
{
|
||||
int ret1;
|
||||
char *ret2;
|
||||
char *dataBase;
|
||||
char *tmpFile;
|
||||
char *newMmdbPathEnv;
|
||||
|
@ -1483,10 +1489,10 @@ buildBookcase(char *cmdSrc, char *dirName)
|
|||
style_file, bookCaseName, bookCaseName);
|
||||
runShellCmd(cmd);
|
||||
|
||||
XtFree(style_file);
|
||||
XtFree((char*)style_file);
|
||||
|
||||
sprintf(cmd, "rm -f %s", style_file);
|
||||
system(cmd);
|
||||
ret1 = system(cmd);
|
||||
}
|
||||
|
||||
sprintf(cmd, "NCFGen -compressed %s %s |\
|
||||
|
@ -1506,10 +1512,10 @@ buildBookcase(char *cmdSrc, char *dirName)
|
|||
|
||||
runShellCmd(cmd);
|
||||
|
||||
XtFree(anonym_file);
|
||||
XtFree((char*)anonym_file);
|
||||
|
||||
sprintf(cmd, "rm -f %s", anonym_file);
|
||||
system(cmd);
|
||||
ret1 = system(cmd);
|
||||
}
|
||||
|
||||
validateBookCase(bookCaseMap, bookCaseName);
|
||||
|
@ -1556,7 +1562,7 @@ buildBookcase(char *cmdSrc, char *dirName)
|
|||
}
|
||||
|
||||
curDir[0] = '\0';
|
||||
getcwd(curDir, MAXPATHLEN);
|
||||
ret2 = getcwd(curDir, MAXPATHLEN);
|
||||
sprintf(newDir, "%s/%s", bookCaseDir, gStruct->searchEngine);
|
||||
if (chdir(newDir) != 0)
|
||||
dieRWD(-1, "%s: Cannot find %s: %s\n",
|
||||
|
@ -1678,6 +1684,7 @@ only 8 alphanumeric characters are allowed\n",
|
|||
static void
|
||||
validateBookCase(char *mapFile, char *bookCaseName)
|
||||
{
|
||||
char *ret;
|
||||
FILE *fp;
|
||||
char lineBuf[MAXPATHLEN + 1];
|
||||
char cmdBuf[MAXPATHLEN + 1];
|
||||
|
@ -1687,7 +1694,7 @@ validateBookCase(char *mapFile, char *bookCaseName)
|
|||
dieRWD(-1, "%s: cannot open bookcase.map: %s\n",
|
||||
EXEC_NAME, strerror(errno));
|
||||
|
||||
fgets(lineBuf, MAXPATHLEN, fp); /* Skip first line. */
|
||||
ret = fgets(lineBuf, MAXPATHLEN, fp); /* Skip first line. */
|
||||
while (fgets(lineBuf, MAXPATHLEN, fp) != (char *)NULL)
|
||||
{
|
||||
if ((bcName = strtok(lineBuf, "\t\n")) != (char *)NULL)
|
||||
|
@ -1709,6 +1716,7 @@ validateBookCase(char *mapFile, char *bookCaseName)
|
|||
static void
|
||||
editMapFile(char *bookCaseName, char *bookCaseMap)
|
||||
{
|
||||
size_t ret;
|
||||
struct stat statBuf;
|
||||
FILE *fp;
|
||||
char *file;
|
||||
|
@ -1728,7 +1736,7 @@ editMapFile(char *bookCaseName, char *bookCaseMap)
|
|||
strerror(errno));
|
||||
|
||||
file = XtMalloc((statBuf.st_size + 1) * sizeof(char));
|
||||
fread(file, statBuf.st_size, sizeof(char), fp);
|
||||
ret = fread(file, statBuf.st_size, sizeof(char), fp);
|
||||
if (file[statBuf.st_size - 1] == '\n')
|
||||
file[statBuf.st_size - 1] = '\0';
|
||||
else file[statBuf.st_size] = '\0';
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
|
||||
#if !defined(__osf__) && !defined(USL)
|
||||
#if !defined(__osf__) && !defined(USL) && !defined(linux) && !defined(CSRG_BASED)
|
||||
# include <osfcn.h>
|
||||
#else
|
||||
# include <unistd.h>
|
||||
|
@ -205,9 +205,11 @@ typedef struct graphics_task_buffer_state *graphics_task_BUFFER_STATE;
|
|||
#define INITIAL 0
|
||||
|
||||
#include <assert.h>
|
||||
#include <stream.h>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
using namespace std;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef NODEBUG
|
||||
#include "oliasdb/olias_consts.h"
|
||||
GR_TYPE gtype;
|
||||
#else
|
||||
|
@ -2548,7 +2550,7 @@ FILE *file;
|
|||
}
|
||||
|
||||
|
||||
#ifndef DEBUG
|
||||
#ifndef NODEBUG
|
||||
void
|
||||
get_type()
|
||||
{
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
#ifdef __cplusplus
|
||||
|
||||
#include <stdlib.h>
|
||||
#if !defined(__osf__) && !defined(USL)
|
||||
#if !defined(__osf__) && !defined(USL) && !defined(linux) && !defined(CSRG_BASED)
|
||||
#include <osfcn.h>
|
||||
#endif
|
||||
|
||||
|
@ -190,15 +190,16 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
|
|||
#define YY_CHAR unsigned char
|
||||
#define INITIAL 0
|
||||
|
||||
#if !defined(__osf__) && !defined(USL)
|
||||
#if !defined(__osf__) && !defined(USL) && !defined(linux) && !defined(CSRG_BASED)
|
||||
#include <osfcn.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <iostream.h>
|
||||
#include <iostream>
|
||||
#include <stdio.h>
|
||||
#include <stream.h>
|
||||
#include <sstream>
|
||||
using namespace std;
|
||||
#include <string.h>
|
||||
|
||||
#include "Exceptions.hh"
|
||||
|
@ -209,6 +210,7 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
|
|||
#include "AttributeList.h"
|
||||
#include "FlexBuffer.h"
|
||||
#include "Token.h"
|
||||
#include "api/utility.h"
|
||||
|
||||
static SGMLDefn *defn = new SGMLDefn();
|
||||
static FlexBuffer *DataBuffer = new FlexBuffer();
|
||||
|
@ -1845,7 +1847,7 @@ case 1:
|
|||
type = SGMLName::intern(tstr);
|
||||
|
||||
if ( type != SGMLName::IMPLIED ){
|
||||
if(!value) value = "";
|
||||
if(!value) value = (char*)"";
|
||||
Dispatch::tok->StoreAttribute( name, value, type);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
%{ /* -*- c++ -*- */
|
||||
/* $XConsortium: lex.l /main/5 1996/11/19 16:55:12 drk $ */
|
||||
|
||||
#if !defined(__osf__) && !defined(USL)
|
||||
#if !defined(__osf__) && !defined(USL) && !defined(linux) && !defined(CSRG_BASED)
|
||||
#include <osfcn.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
|
@ -20,6 +20,7 @@
|
|||
#include "AttributeList.h"
|
||||
#include "FlexBuffer.h"
|
||||
#include "Token.h"
|
||||
#include "api/utility.h"
|
||||
|
||||
static SGMLDefn *defn = new SGMLDefn();
|
||||
static FlexBuffer *DataBuffer = new FlexBuffer();
|
||||
|
|
|
@ -25,12 +25,13 @@ XCOMM Campbell, CA 95008
|
|||
XCOMM
|
||||
XCOMM
|
||||
|
||||
DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
|
||||
DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES)
|
||||
|
||||
NormalCplusplusObjectRule()
|
||||
|
||||
INCLUDES=$(GLOBAL_INCLUDES) $(MMDB_INCLUDES) $(EXCEPTIONS_INCLUDES)
|
||||
|
||||
|
||||
|
||||
|
||||
MMDB_DIR=../../mmdb
|
||||
|
||||
|
@ -205,6 +206,8 @@ ALL_MMDB_OBJS = $(API_OBJS) $(BTREE_OBJS) \
|
|||
|
||||
#ifdef AIXArchitecture
|
||||
Libs=$(ALL_MMDB_OBJS) $(DTSVCLIB) $(TTLIB) $(MATH_LIB)
|
||||
#elif defined(LinuxArchitecture) || defined(FreeBSDArchitecture) || defined(OpenBSDArchitecture)
|
||||
Libs=$(MMDB_LIBS) $(DTSVCLIB) $(MTF_LIBRARIES) $(TTLIB) $(MATH_LIB)
|
||||
#else
|
||||
Libs=$(MMDB_LIBS) $(DTSVCLIB) $(TTLIB) $(MATH_LIB)
|
||||
#endif
|
||||
|
|
|
@ -47,7 +47,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include <iostream.h>
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -91,7 +92,7 @@ main(int argc, char **argv)
|
|||
|
||||
dbgLevel = dbgInit();
|
||||
|
||||
try {
|
||||
mtry {
|
||||
|
||||
if ( argc < 2 ) {
|
||||
cerr << "Usage : valBase checkBase installBase\n";
|
||||
|
@ -167,7 +168,7 @@ main(int argc, char **argv)
|
|||
|
||||
// Now to check locators
|
||||
|
||||
iterator *it = checkBase->first(LOCATOR_SET_NAME, LOCATOR_CODE );
|
||||
Iterator *it = checkBase->first(LOCATOR_SET_NAME, LOCATOR_CODE );
|
||||
|
||||
int DupLocFound=0;
|
||||
|
||||
|
@ -204,7 +205,7 @@ main(int argc, char **argv)
|
|||
exit (0);
|
||||
}
|
||||
|
||||
catch ( mmdbException &, e )
|
||||
mcatch ( mmdbException &, e )
|
||||
{
|
||||
debug(cerr, e );
|
||||
abort();
|
||||
|
|
|
@ -5,6 +5,17 @@ XCOMM $TOG: Imakefile /main/7 1998/08/10 15:55:12 mgreess $
|
|||
|
||||
SUBDIRS=src StyleSheet
|
||||
|
||||
XCOMM redefine TopLevelProject to build DtInfo with standard CDE config dir
|
||||
#undef TopLevelProject
|
||||
#define TopLevelProject DtInfo
|
||||
IMAKE_DEFINES = -DTopLevelProject=TopLevelProject \
|
||||
-DProjectTmplFile='<DtInfo.tmpl>' \
|
||||
-DProjectRulesFile='<DtInfo.rules>'
|
||||
|
||||
XCOMM Variables to switch on debug mode temporarily
|
||||
XCOMM CDEBUGFLAGS = -g -DDEBUG
|
||||
XCOMM CXXDEBUGFLAGS = -g -DDEBUG
|
||||
|
||||
MakeSubdirs($(SUBDIRS))
|
||||
DependSubdirs($(SUBDIRS))
|
||||
NamedTargetSubdirs(install_buildtools,$(SUBDIRS),\
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
XCOMM $TOG: Imakefile /main/14 1997/09/05 11:32:36 samborn $
|
||||
|
||||
DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
|
||||
DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES)
|
||||
|
||||
NormalCplusplusObjectRule()
|
||||
|
||||
INCLUDES=$(EXCEPTIONS_INCLUDES) $(COMMON_CLASS_INCLUDES)
|
||||
|
||||
|
|
|
@ -33,7 +33,8 @@
|
|||
#include "StyleSheet/FeatureDefDictionary.h"
|
||||
#include "StyleSheet/RendererHCV.h"
|
||||
#include "HardCopy/autoNumberFP.h"
|
||||
#include <iostream.h>
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
#include <stdarg.h>
|
||||
|
||||
|
||||
|
@ -89,7 +90,7 @@ main(int argc, char** argv )
|
|||
quit(1);
|
||||
}
|
||||
|
||||
try {
|
||||
mtry {
|
||||
|
||||
if ( strcasecmp(argv[1], "hardcopy") == 0 )
|
||||
gRenderer = new RendererHCV();
|
||||
|
@ -133,14 +134,14 @@ main(int argc, char** argv )
|
|||
*defStream >> *g_FeatureDefDictionary;
|
||||
//cerr << *g_FeatureDefDictionary;
|
||||
}
|
||||
catch_any()
|
||||
mcatch_any()
|
||||
{
|
||||
cerr << "\nfeature definition has error.\n";
|
||||
quit(1);
|
||||
}
|
||||
end_try;
|
||||
|
||||
try {
|
||||
mtry {
|
||||
|
||||
fstream* styleStream = new fstream(argv[2], ios::in);
|
||||
if ( !(*styleStream) ) {
|
||||
|
@ -166,7 +167,7 @@ main(int argc, char** argv )
|
|||
|
||||
}
|
||||
|
||||
catch_any()
|
||||
mcatch_any()
|
||||
{
|
||||
report_error_location();
|
||||
quit(1);
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
#include "oliasdb/Mmdb.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
usage(int argc, char** argv)
|
||||
|
|
|
@ -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];
|
||||
|
||||
|
|
Loading…
Reference in a new issue