1
0
Fork 0
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:
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

@ -5,6 +5,17 @@ XCOMM $TOG: Imakefile /main/12 1998/08/10 15:54:48 mgreess $
SUBDIRS=mmdb infolib install 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)) MakeSubdirs($(SUBDIRS))
DependSubdirs($(SUBDIRS)) DependSubdirs($(SUBDIRS))
NamedTargetSubdirs(install_buildtools,$(SUBDIRS),\ NamedTargetSubdirs(install_buildtools,$(SUBDIRS),\

View file

@ -7,6 +7,17 @@ SUBDIRS=etc C.ISO-8859-1 ja_JP.EUC-JP
LinkFile(C,C.ISO-8859-1) 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)) MakeSubdirs($(SUBDIRS))
DependSubdirs($(SUBDIRS)) DependSubdirs($(SUBDIRS))
NamedTargetSubdirs(install_buildtools,$(SUBDIRS),\ NamedTargetSubdirs(install_buildtools,$(SUBDIRS),\

View file

@ -34,7 +34,8 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include <iostream.h> #include <iostream>
using namespace std;
#include <assert.h> #include <assert.h>
#include "AttributeRec.h" #include "AttributeRec.h"

View file

@ -23,7 +23,8 @@
/* $XConsortium: AttributeRec.cc /main/4 1996/07/18 16:08:22 drk $ */ /* $XConsortium: AttributeRec.cc /main/4 1996/07/18 16:08:22 drk $ */
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include <iostream.h> #include <iostream>
using namespace std;
#include <assert.h> #include <assert.h>
#include "SGMLDefn.h" #include "SGMLDefn.h"

View file

@ -25,7 +25,8 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include <iostream.h> #include <iostream>
using namespace std;
#include "List.h" #include "List.h"
#include "AttributeRec.h" #include "AttributeRec.h"

View file

@ -37,7 +37,8 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <assert.h> #include <assert.h>
#include <stream.h> #include <sstream>
using namespace std;
/* imported interfaces */ /* imported interfaces */
#include <misc/unique_id.h> #include <misc/unique_id.h>
@ -45,6 +46,7 @@
#include "Task.h" #include "Task.h"
#include "DataBase.h" #include "DataBase.h"
#include "DataRepository.h" #include "DataRepository.h"
#include "api/utility.h"
/* exported interfaces */ /* exported interfaces */
#include "AusTextStorage.h" #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 following was unique, but there is a limit to the size of
// the key, so let's just use a simple counter. // 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%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 fprintf(afp, "0/0/0~0:0\n"); // null date

View file

@ -32,7 +32,8 @@
*/ */
#include <stream.h> #include <sstream>
using namespace std;
/* import... */ /* import... */
#include <assert.h> #include <assert.h>
@ -46,6 +47,7 @@
#include "OL-Data.h" #include "OL-Data.h"
#include "StringList.h" #include "StringList.h"
#include "StyleTask.h" #include "StyleTask.h"
#include "api/utility.h"
/* export... */ /* export... */
#include "BookTasks.h" #include "BookTasks.h"

View file

@ -54,7 +54,7 @@
#include <stdlib.h> #include <stdlib.h>
#if !defined(__osf__) && !defined(USL) #if !defined(__osf__) && !defined(USL) && !defined(linux) && !defined(CSRG_BASED)
#include <osfcn.h> #include <osfcn.h>
#endif #endif
@ -201,8 +201,9 @@ typedef struct ol_data_buffer_state *ol_data_BUFFER_STATE;
#define ol_data_CHAR unsigned char #define ol_data_CHAR unsigned char
#define INITIAL 0 #define INITIAL 0
#include <iostream.h> #include <iostream>
#include <stream.h> #include <sstream>
using namespace std;
#include <stdio.h> #include <stdio.h>
#include <memory.h> #include <memory.h>
#include <string.h> #include <string.h>
@ -217,6 +218,7 @@ typedef struct ol_data_buffer_state *ol_data_BUFFER_STATE;
#include "Expression.h" #include "Expression.h"
#include "OL_DataExpr.tab.h" #include "OL_DataExpr.tab.h"
#include "ContentType.h" #include "ContentType.h"
#include "api/utility.h"
/* CurrentContentPtr is used as the communication media between /* CurrentContentPtr is used as the communication media between
* ol_dataparse and ContentType::Parse() * ol_dataparse and ContentType::Parse()

View file

@ -477,6 +477,7 @@ void DBCursor::int_field(FILE *fp, int *out)
void DBCursor::short_list(FILE *fp, int *qout, int ltype, void *out) void DBCursor::short_list(FILE *fp, int *qout, int ltype, void *out)
{ {
int c; int c;
int ret;
c = fgetc(fp); c = fgetc(fp);
FRIENDLY_ASSERT(c == '#'); FRIENDLY_ASSERT(c == '#');
@ -498,7 +499,7 @@ void DBCursor::short_list(FILE *fp, int *qout, int ltype, void *out)
int ftype; int ftype;
ungetc(c, fp); ungetc(c, fp);
fscanf(fp, "%d\n", &ftype); ret = fscanf(fp, "%d\n", &ftype);
FRIENDLY_ASSERT(ftype == STRING_CODE); FRIENDLY_ASSERT(ftype == STRING_CODE);
string_field(fp, &item, NULL); string_field(fp, &item, NULL);

View file

@ -33,7 +33,7 @@
//-------------Initializer for the zone_name mapping ---------------- //-------------Initializer for the zone_name mapping ----------------
static char *zone_name[] = { static const char *zone_name[] = {
"D", "D",
"H", "H",
"G", "G",

View file

@ -22,7 +22,8 @@
*/ */
/* $XConsortium: FlexBuffer.cc /main/2 1996/07/18 16:13:49 drk $ */ /* $XConsortium: FlexBuffer.cc /main/2 1996/07/18 16:13:49 drk $ */
#include <iostream.h> #include <iostream>
using namespace std;
#include <memory.h> #include <memory.h>
#include <string.h> #include <string.h>
#include "FlexBuffer.h" #include "FlexBuffer.h"

View file

@ -25,7 +25,8 @@
#define FLEX_BFR_HDR #define FLEX_BFR_HDR
#include <stddef.h> #include <stddef.h>
#include <iostream.h> #include <iostream>
using namespace std;
class FlexBuffer { class FlexBuffer {

View file

@ -22,8 +22,9 @@
*/ */
/* $XConsortium: GraphicsTask.cc /main/8 1996/08/14 16:59:38 rcs $ */ /* $XConsortium: GraphicsTask.cc /main/8 1996/08/14 16:59:38 rcs $ */
#include <assert.h> #include <assert.h>
#include <stream.h> #include <sstream>
#include <iostream.h> #include <iostream>
using namespace std;
#include <sys/types.h> #include <sys/types.h>
#include <netinet/in.h> #include <netinet/in.h>

View file

@ -24,7 +24,7 @@
#ifndef __HandlerH__ #ifndef __HandlerH__
#define __HandlerH__ #define __HandlerH__
#include <new.h> #include <new>
extern void FreeStoreException(); extern void FreeStoreException();
#endif #endif

View file

@ -1,6 +1,9 @@
XCOMM $TOG: Imakefile /main/27 1997/09/05 11:29:30 samborn $ 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 #ifdef RegenParserFiles
XCOMM lex flags 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(NCFGen, NCFGen.o libOLAFParse.a libOLAFParseT.a,$(Libs) $(DTSVCLIB) $(TTLIB))
SimpleCPlusPlusProgram(MixedGen, MixedGen.o RemoteId.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)) 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 #else
TEMPLATE_OBJS = TKTemplate.o TEMPLATE_OBJS = TKTemplate.o
RealLibrary(OLAFParse,$(OBJS),$(LIBDIR)) RealLibrary(OLAFParse,$(OBJS),$(LIBDIR))

View file

@ -569,7 +569,8 @@ writeDLP(BookCaseDB &db, info_lib *mmdb,
char * char *
getGI( char * bufptr ) getGI( char * bufptr )
{ {
for (char * cptr = bufptr; *cptr != '>'; cptr++) { char* cptr;
for (cptr = bufptr; *cptr != '>'; cptr++) {
} }
*cptr = '\0'; *cptr = '\0';
char * retval = strdup(bufptr); char * retval = strdup(bufptr);
@ -811,11 +812,11 @@ writeBooks(BookCaseDB& db,
DBCursor *GraphicsCursorPtr; DBCursor *GraphicsCursorPtr;
int process_graphics = 1; int process_graphics = 1;
try { mtry {
DBTable *graphics = db.table(BookCaseDB::Graphics, DB::READ); DBTable *graphics = db.table(BookCaseDB::Graphics, DB::READ);
GraphicsCursorPtr = new DBCursor( *graphics ); GraphicsCursorPtr = new DBCursor( *graphics );
} }
catch (PosixError&, p){ mcatch (PosixError&, p){
/* error opening graphics stuff... skip graphics */ /* error opening graphics stuff... skip graphics */
process_graphics = 0; process_graphics = 0;
@ -876,7 +877,7 @@ writeLCF(BookCaseDB& db, info_lib *mmdb,
const char *opaque, *nodeloc; const char *opaque, *nodeloc;
char* reflabel; char* reflabel;
nodeloc = opaque = (const char *)loc_val->get_value(); nodeloc = opaque = (const char *)loc_val->get_value();
reflabel = strchr(opaque, '\t'); reflabel = strchr((char*)opaque, '\t');
*reflabel++ = 0; *reflabel++ = 0;
const char *nodeOID = to_oid(mmdb, bcname, nodeloc); const char *nodeOID = to_oid(mmdb, bcname, nodeloc);
@ -959,7 +960,7 @@ main(int argc, char **argv)
char *bookcaseDir = argv[0]; char *bookcaseDir = argv[0];
char *infobaseDir = argv[1]; char *infobaseDir = argv[1];
try{ mtry{
BookCaseDB db(bookcaseDir); BookCaseDB db(bookcaseDir);
const char *infolibDir; const char *infolibDir;
@ -979,7 +980,7 @@ main(int argc, char **argv)
comp_agent[i] = 0; 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); info_base *bcptr = mmdb->get_info_base(bcname);
handler *x = handler *x =
@ -1004,11 +1005,11 @@ main(int argc, char **argv)
ret = 0; ret = 0;
} }
catch(PosixError&, pe){ mcatch(PosixError&, pe){
fprintf(stderr, "%s: error on %s: %s\n", fprintf(stderr, "%s: error on %s: %s\n",
progname, bookcaseDir, pe.msg()); progname, bookcaseDir, pe.msg());
} }
catch(Unexpected&, pe) { mcatch(Unexpected&, pe) {
fprintf(stderr, "(ERROR) %s\n\n", pe.msg() ); fprintf(stderr, "(ERROR) %s\n\n", pe.msg() );
exit(1); exit(1);
}end_try; }end_try;

View file

@ -27,7 +27,8 @@
#if !defined(__uxp__) && !defined(USL) #if !defined(__uxp__) && !defined(USL)
#include <strings.h> #include <strings.h>
#endif #endif
#include <strstream.h> #include <sstream>
using namespace std;
#include "Exceptions.hh" #include "Exceptions.hh"
#include "DataBase.h" #include "DataBase.h"
@ -150,7 +151,7 @@ buildNCF(BookCaseDB& db, const char *base_name, int compressed)
comp_agent[i] = 0; 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( handler *x = (base_ptr->get_obj_dict()).get_handler(
form("%s.%s", base_name, "sgml.dict")); form("%s.%s", base_name, "sgml.dict"));
x->its_oid().asciiOut(str_buf); 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); stylesheet_smart_ptr sheet(base_ptr, style);
char oid_buf[BUFSIZE]; ostringstream strout;
ostrstream strout(oid_buf,BUFSIZE,ios::out);
sheet.its_oid().asciiOut(strout); sheet.its_oid().asciiOut(strout);
oid_buf[strout.pcount()] = NULL;
ncf->insert(STRING_CODE, nodeLocator, ncf->insert(STRING_CODE, nodeLocator,
STRING_CODE, title, STRING_CODE, title,
@ -206,7 +205,7 @@ buildNCF(BookCaseDB& db, const char *base_name, int compressed)
COMPRESSED_STRING_CODE, comp_agent, "", COMPRESSED_STRING_CODE, comp_agent, "",
STRING_CODE, bookLocator, STRING_CODE, bookLocator,
OID_CODE, "0.0", /* pointer to Book/CCF/DOC object */ OID_CODE, "0.0", /* pointer to Book/CCF/DOC object */
OID_CODE, oid_buf, OID_CODE, (char *)strout.str().c_str(),
NULL); NULL);
} }
@ -252,10 +251,8 @@ buildNCF(BookCaseDB& db, const char *base_name, int compressed)
stylesheet_smart_ptr sheet(base_ptr, style); stylesheet_smart_ptr sheet(base_ptr, style);
char oid_buf[BUFSIZE]; ostringstream strout;
ostrstream strout(oid_buf,BUFSIZE,ios::out);
sheet.its_oid().asciiOut(strout); sheet.its_oid().asciiOut(strout);
oid_buf[strout.pcount()] = NULL;
ncf->insert(STRING_CODE, nodeLocator, ncf->insert(STRING_CODE, nodeLocator,
STRING_CODE, title, STRING_CODE, title,
@ -263,7 +260,7 @@ buildNCF(BookCaseDB& db, const char *base_name, int compressed)
STRING_CODE, "", STRING_CODE, "",
STRING_CODE, bookLocator, STRING_CODE, bookLocator,
OID_CODE, "0.0", /* pointer to Book/CCF/DOC object */ OID_CODE, "0.0", /* pointer to Book/CCF/DOC object */
OID_CODE, oid_buf, OID_CODE, (char *)strout.str().c_str(),
NULL); NULL);
} }
@ -327,7 +324,7 @@ main(int argc, char **argv)
const char *base_name = argv[0]; const char *base_name = argv[0];
const char *bookcaseDir = argv[1]; const char *bookcaseDir = argv[1];
try{ mtry{
BookCaseDB db(bookcaseDir); BookCaseDB db(bookcaseDir);
if ( load_style_only ) { if ( load_style_only ) {
@ -339,20 +336,20 @@ main(int argc, char **argv)
ret = 0; ret = 0;
} }
catch(PosixError&, pe){ mcatch(PosixError&, pe){
fprintf(stderr, "%s: error on %s: %s\n", fprintf(stderr, "%s: error on %s: %s\n",
progname, bookcaseDir, pe.msg()); progname, bookcaseDir, pe.msg());
} }
catch(Unexpected&, pe) { mcatch(Unexpected&, pe) {
fprintf(stderr, "(ERROR) %s\n\n", pe.msg() ); fprintf(stderr, "(ERROR) %s\n\n", pe.msg() );
} }
catch(mmdbException&, e) { mcatch(mmdbException&, e) {
cerr << e; cerr << e;
} }
catch_any() { mcatch_any() {
fprintf(stderr, "*** Internal Error ***: unexpected exception\n"); fprintf(stderr, "*** Internal Error ***: unexpected exception\n");
abort(); abort();
}end_try; }end_try;

View file

@ -35,8 +35,9 @@
#include "NodeData.h" #include "NodeData.h"
/* imported interfaces... */ /* imported interfaces... */
#include <iostream.h> #include <iostream>
#include <stream.h> #include <sstream>
using namespace std;
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <assert.h> #include <assert.h>
@ -54,6 +55,7 @@
#include "BookCaseDB.h" #include "BookCaseDB.h"
#include "GraphicsTask.h" #include "GraphicsTask.h"
#include "Dispatch.h" #include "Dispatch.h"
#include "api/utility.h"
#ifdef UseQSearch #ifdef UseQSearch
#include "QSearch.h" #include "QSearch.h"
#else #else

View file

@ -93,32 +93,32 @@ int main(int argc, char **argv)
Dispatch::setRoot(t, istack); Dispatch::setRoot(t, istack);
try{ mtry{
extern int yylex(); extern int yylex();
yylex(); yylex();
ret = 0; ret = 0;
} }
catch(Unexpected&, u) mcatch(Unexpected&, u)
{ {
try { mtry {
Dispatch::tok->reportError(Token::User, Token::Fatal, Dispatch::tok->reportError(Token::User, Token::Fatal,
"markup error: %s", u.msg()); "markup error: %s", u.msg());
} }
catch(ErrorReported&, e) mcatch(ErrorReported&, e)
{ {
if ( e.f_severity == Token::Fatal ) { if ( e.f_severity == Token::Fatal ) {
exit(1); exit(1);
} }
}end_try; }end_try;
} }
catch(PosixError&, pe) mcatch(PosixError&, pe)
{ {
fprintf(stderr, "(ERROR) %s\n", pe.msg() ); fprintf(stderr, "(ERROR) %s\n", pe.msg() );
exit(1); exit(1);
} }
catch(ErrorReported&, e) mcatch(ErrorReported&, e)
{ {
if ( e.f_severity == Token::Fatal ) { if ( e.f_severity == Token::Fatal ) {
exit(1); exit(1);

View file

@ -23,7 +23,8 @@
/* $XConsortium: NodeTask.C /main/6 1996/10/26 18:18:31 cde-hal $ */ /* $XConsortium: NodeTask.C /main/6 1996/10/26 18:18:31 cde-hal $ */
/* $Id */ /* $Id */
#include <stream.h> #include <sstream>
using namespace std;
/* exported interfaces... */ /* exported interfaces... */
#include "NodeTask.h" #include "NodeTask.h"
@ -42,6 +43,7 @@
#include "OL-Data.h" #include "OL-Data.h"
#include "NodeData.h" #include "NodeData.h"
#include "StyleTask.h" #include "StyleTask.h"
#include "api/utility.h"
#ifdef FISH_DEBUG #ifdef FISH_DEBUG
#include "dbug.h" /* Fred Fish's dbug.h */ #include "dbug.h" /* Fred Fish's dbug.h */

View file

@ -228,14 +228,16 @@ ol_dataloop:
goto ol_datareduce; goto ol_datareduce;
} }
if (ol_dataerrflag) goto ol_datainrecovery; if (ol_dataerrflag) goto ol_datainrecovery;
#if 0 // Disable for now // Disable for now
#if 0
#ifdef lint #ifdef lint
goto ol_datanewerror; goto ol_datanewerror;
#endif #endif
ol_datanewerror: ol_datanewerror:
#endif /* 0 */ #endif /* 0 */
ol_dataerror("syntax error"); ol_dataerror((char*)"syntax error");
#if 0 // Disable for now // Disable for now
#if 0
#ifdef lint #ifdef lint
goto ol_dataerrlab; goto ol_dataerrlab;
#endif #endif
@ -424,7 +426,7 @@ to state %d\n", *ol_datassp, ol_datastate);
*++ol_datavsp = ol_dataval; *++ol_datavsp = ol_dataval;
goto ol_dataloop; goto ol_dataloop;
ol_dataoverflow: ol_dataoverflow:
ol_dataerror("yacc stack overflow"); ol_dataerror((char*)"yacc stack overflow");
ol_dataabort: ol_dataabort:
return (1); return (1);
ol_dataaccept: ol_dataaccept:

View file

@ -53,7 +53,7 @@
#include <stdlib.h> #include <stdlib.h>
#if !defined(__osf__) && !defined(USL) #if !defined(__osf__) && !defined(USL) && !defined(linux) && !defined(CSRG_BASED)
# include <osfcn.h> # include <osfcn.h>
#endif #endif

View file

@ -43,7 +43,7 @@
#include <stdlib.h> #include <stdlib.h>
#if !defined(__osf__) && !defined(USL) #if !defined(__osf__) && !defined(USL) && !defined(linux) && !defined(CSRG_BASED)
#include <osfcn.h> #include <osfcn.h>
#endif #endif
@ -195,8 +195,9 @@ typedef struct nodedata_buffer_state *nodedata_BUFFER_STATE;
#include "NodeData.h" #include "NodeData.h"
/* imported interfaces... */ /* imported interfaces... */
#include <iostream.h> #include <iostream>
#include <stream.h> #include <sstream>
using namespace std;
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <assert.h> #include <assert.h>
@ -214,6 +215,7 @@ typedef struct nodedata_buffer_state *nodedata_BUFFER_STATE;
#include "BookCaseDB.h" #include "BookCaseDB.h"
#include "GraphicsTask.h" #include "GraphicsTask.h"
#include "Dispatch.h" #include "Dispatch.h"
#include "api/utility.h"
// Debugging macro // Debugging macro
#ifdef DEBUG #ifdef DEBUG

View file

@ -114,6 +114,8 @@ StringToInt::StringToInt()
total = used = 0; total = used = 0;
} }
int
StringToInt::intern(const char *name) StringToInt::intern(const char *name)
{ {
int indx; int indx;

View file

@ -29,10 +29,12 @@
#endif #endif
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/types.h> #include <sys/types.h>
#include <stream.h> #include <sstream>
using namespace std;
#include "Exceptions.hh" #include "Exceptions.hh"
#include "Task.h" #include "Task.h"
#include "api/utility.h"
/* exported interface */ /* exported interface */
#include "SearchPath.h" #include "SearchPath.h"
@ -147,9 +149,6 @@ SearchPath::get_real_path( const char *file_name )
fclose( fp ); fclose( fp );
return ( full_path_name ); return ( full_path_name );
} }
fclose( fp );
} }
return NULL; return NULL;

View file

@ -36,13 +36,15 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <assert.h> #include <assert.h>
#include <stream.h> #include <sstream>
using namespace std;
/* imported interfaces */ /* imported interfaces */
#include <misc/unique_id.h> #include <misc/unique_id.h>
#include "FlexBuffer.h" #include "FlexBuffer.h"
#include "Task.h" #include "Task.h"
#include "DataBase.h" #include "DataBase.h"
#include "api/utility.h"
/* exported interfaces */ /* exported interfaces */
#include "SearchStorage.h" #include "SearchStorage.h"

View file

@ -23,7 +23,8 @@
/* $XConsortium: StyleUpdate.C /main/7 1996/08/21 15:47:33 drk $ */ /* $XConsortium: StyleUpdate.C /main/7 1996/08/21 15:47:33 drk $ */
#include <stdio.h> #include <stdio.h>
#include <iostream.h> #include <iostream>
using namespace std;
#include "Exceptions.hh" #include "Exceptions.hh"
@ -79,8 +80,8 @@ int main(int argc, char **argv)
Dispatch::setRoot(styleTask, istack); Dispatch::setRoot(styleTask, istack);
try{ mtry{
try{ mtry{
extern int yylex(); extern int yylex();
yylex(); yylex();
@ -112,21 +113,21 @@ int main(int argc, char **argv)
ret = 0; ret = 0;
}catch(Unexpected&, u){ }mcatch(Unexpected&, u){
Dispatch::tok->reportError(Token::User, Token::Fatal, Dispatch::tok->reportError(Token::User, Token::Fatal,
"markup error: %s", u.msg()); "markup error: %s", u.msg());
} }
catch(PosixError&, p){ mcatch(PosixError&, p){
Token::signalError(Token::Internal, Token::Fatal, 0, 0, Token::signalError(Token::Internal, Token::Fatal, 0, 0,
"%s", p.msg() ); "%s", p.msg() );
}end_try; }end_try;
}catch(ErrorReported&, e){ }mcatch(ErrorReported&, e){
/* error is already reported. */ /* error is already reported. */
}catch(mmdbException&, e){ }mcatch(mmdbException&, e){
cerr << e; cerr << e;
} }
catch_any() { mcatch_any() {
fprintf(stderr, "*** Internal Error ***: unexpected exception\n"); fprintf(stderr, "*** Internal Error ***: unexpected exception\n");
abort(); abort();
}end_try; }end_try;

View file

@ -22,20 +22,22 @@
*/ */
/* $XConsortium: StyleValidate.cc /main/2 1996/07/18 16:18:13 drk $ */ /* $XConsortium: StyleValidate.cc /main/2 1996/07/18 16:18:13 drk $ */
#include <stdio.h> #include <stdio.h>
#include <iostream.h> #include <iostream>
#include <stream.h> #include <sstream>
using namespace std;
#include <unistd.h> #include <unistd.h>
#include <sys/wait.h> #include <sys/wait.h>
#include "DataBase.h" #include "DataBase.h"
#include "StyleValidate.h" #include "StyleValidate.h"
#include "api/utility.h"
//--------------------------------------------------------------------- //---------------------------------------------------------------------
int int
validate_stylesheet( const char *buf, int buf_size, enum RENDERER_ENGINE_T t ) 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" ); FILE *fp = fopen( styleFile, "w" );
if ( !fp ) { if ( !fp ) {
@ -49,10 +51,10 @@ validate_stylesheet( const char *buf, int buf_size, enum RENDERER_ENGINE_T t )
switch ( t ) { switch ( t ) {
case ONLINE: case ONLINE:
renderer = "online"; renderer = (char*)"online";
break; break;
case PRINT: case PRINT:
renderer = "hardcopy"; renderer = (char*)"hardcopy";
break; break;
default: default:
throw( PosixError(1, "Unknown renderer engine\n") ); throw( PosixError(1, "Unknown renderer engine\n") );

View file

@ -34,11 +34,11 @@
#include "dti_cc/CC_Stack.h" #include "dti_cc/CC_Stack.h"
#include "dti_cc/CC_Stack.C" #include "dti_cc/CC_Stack.C"
#include "dti_cc/CC_Slist.h" #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.h"
#include "dti_cc/cc_pvect.C" // #include "dti_cc/cc_pvect.C"
#include "dti_cc/cc_hdict.h" #include "dti_cc/cc_hdict.h"
#include "dti_cc/cc_hdict.C" // #include "dti_cc/cc_hdict.C"
#include "BTCollectable.h" #include "BTCollectable.h"
#include "DataRepository.h" #include "DataRepository.h"
#include "dti_cc/CC_String.h" #include "dti_cc/CC_String.h"

View file

@ -184,7 +184,7 @@ static void
signalErrorVA(int src, int sev, const char *file, int line, signalErrorVA(int src, int sev, const char *file, int line,
const char *fmt, va_list ap) const char *fmt, va_list ap)
{ {
static char *srcMsg[] = { "Error", "**Internal Error**" }; static const char *srcMsg[] = { "Error", "**Internal Error**" };
if(file){ if(file){
fprintf(stderr, "DtInfo Toolkit: %s at %s:%d: ", srcMsg[src], file, line); fprintf(stderr, "DtInfo Toolkit: %s at %s:%d: ", srcMsg[src], file, line);

View file

@ -26,7 +26,8 @@
#ifndef TOKEN_HEADER #ifndef TOKEN_HEADER
#define TOKEN_HEADER #define TOKEN_HEADER
#include <strstream.h> #include <sstream>
using namespace std;
#include "Exceptions.hh" #include "Exceptions.hh"

View file

@ -1,5 +1,4 @@
#!/bin/sh #!/bin/sh
set -h
############################################################################### ###############################################################################
# #
@ -222,6 +221,14 @@ case "$OS" in
ARCH=mips ARCH=mips
;; ;;
Linux*)
ARCH=i386
;;
FreeBSD*)
ARCH=i386
;;
*) *)
err_f "Does not run under [$OS]" err_f "Does not run under [$OS]"
;; ;;

View file

@ -181,7 +181,7 @@ t_entry langtbl[] =
NULL, 0, NULL, NULL, NULL NULL, 0, NULL, NULL, NULL
}; };
static char *usageMsg = "USAGE:\n\ static char *usageMsg1 = "USAGE:\n\
" EXEC_NAME " -h\n\ " EXEC_NAME " -h\n\
" EXEC_NAME " admin\n\ " EXEC_NAME " admin\n\
" EXEC_NAME " build [-h] [-T <tmpdir>] [-m <catalog>] [-d <library description>]\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 " update [-h] [-m <catalog>] -l <library> -b <bookcase> <stylesheet>\n\
" EXEC_NAME " validate [-h] [-T <tmpdir>] [-m <catalog>] <document>...\n\ " EXEC_NAME " validate [-h] [-T <tmpdir>] [-m <catalog>] <document>...\n\
\n\ \n\
options:\n\ options:\n";
static char *usageMsg2 = "\
-T <tmpdir> directory for intermediate processing files\n\ -T <tmpdir> directory for intermediate processing files\n\
-h help: show usage\n\ -h help: show usage\n\
-v verbose: more diagnostic output\n"; -v verbose: more diagnostic output\n";
@ -258,7 +260,8 @@ printUsage(char *preMsg, int exitCode)
if (preMsg) if (preMsg)
fputs(preMsg, stderr); fputs(preMsg, stderr);
fputs(usageMsg, stderr); fputs(usageMsg1, stderr);
fputs(usageMsg2, stderr);
exit(exitCode); exit(exitCode);
} }
@ -526,12 +529,13 @@ makeWorkDir(void)
static void static void
removeWorkDir(void) removeWorkDir(void)
{ {
int ret;
char cmdBuf[MAXPATHLEN + 10]; char cmdBuf[MAXPATHLEN + 10];
if (gStruct->workDir) if (gStruct->workDir)
{ {
sprintf(cmdBuf, "rm -rf %s", gStruct->workDir); sprintf(cmdBuf, "rm -rf %s", gStruct->workDir);
system(cmdBuf); ret = system(cmdBuf);
XtFree(gStruct->workDir); XtFree(gStruct->workDir);
gStruct->workDir = (char *)NULL; gStruct->workDir = (char *)NULL;
} }
@ -1422,6 +1426,8 @@ parseDocument(Boolean runCmd, ...)
static void static void
buildBookcase(char *cmdSrc, char *dirName) buildBookcase(char *cmdSrc, char *dirName)
{ {
int ret1;
char *ret2;
char *dataBase; char *dataBase;
char *tmpFile; char *tmpFile;
char *newMmdbPathEnv; char *newMmdbPathEnv;
@ -1483,10 +1489,10 @@ buildBookcase(char *cmdSrc, char *dirName)
style_file, bookCaseName, bookCaseName); style_file, bookCaseName, bookCaseName);
runShellCmd(cmd); runShellCmd(cmd);
XtFree(style_file); XtFree((char*)style_file);
sprintf(cmd, "rm -f %s", style_file); sprintf(cmd, "rm -f %s", style_file);
system(cmd); ret1 = system(cmd);
} }
sprintf(cmd, "NCFGen -compressed %s %s |\ sprintf(cmd, "NCFGen -compressed %s %s |\
@ -1506,10 +1512,10 @@ buildBookcase(char *cmdSrc, char *dirName)
runShellCmd(cmd); runShellCmd(cmd);
XtFree(anonym_file); XtFree((char*)anonym_file);
sprintf(cmd, "rm -f %s", anonym_file); sprintf(cmd, "rm -f %s", anonym_file);
system(cmd); ret1 = system(cmd);
} }
validateBookCase(bookCaseMap, bookCaseName); validateBookCase(bookCaseMap, bookCaseName);
@ -1556,7 +1562,7 @@ buildBookcase(char *cmdSrc, char *dirName)
} }
curDir[0] = '\0'; curDir[0] = '\0';
getcwd(curDir, MAXPATHLEN); ret2 = getcwd(curDir, MAXPATHLEN);
sprintf(newDir, "%s/%s", bookCaseDir, gStruct->searchEngine); sprintf(newDir, "%s/%s", bookCaseDir, gStruct->searchEngine);
if (chdir(newDir) != 0) if (chdir(newDir) != 0)
dieRWD(-1, "%s: Cannot find %s: %s\n", dieRWD(-1, "%s: Cannot find %s: %s\n",
@ -1678,6 +1684,7 @@ only 8 alphanumeric characters are allowed\n",
static void static void
validateBookCase(char *mapFile, char *bookCaseName) validateBookCase(char *mapFile, char *bookCaseName)
{ {
char *ret;
FILE *fp; FILE *fp;
char lineBuf[MAXPATHLEN + 1]; char lineBuf[MAXPATHLEN + 1];
char cmdBuf[MAXPATHLEN + 1]; char cmdBuf[MAXPATHLEN + 1];
@ -1687,7 +1694,7 @@ validateBookCase(char *mapFile, char *bookCaseName)
dieRWD(-1, "%s: cannot open bookcase.map: %s\n", dieRWD(-1, "%s: cannot open bookcase.map: %s\n",
EXEC_NAME, strerror(errno)); 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) while (fgets(lineBuf, MAXPATHLEN, fp) != (char *)NULL)
{ {
if ((bcName = strtok(lineBuf, "\t\n")) != (char *)NULL) if ((bcName = strtok(lineBuf, "\t\n")) != (char *)NULL)
@ -1709,6 +1716,7 @@ validateBookCase(char *mapFile, char *bookCaseName)
static void static void
editMapFile(char *bookCaseName, char *bookCaseMap) editMapFile(char *bookCaseName, char *bookCaseMap)
{ {
size_t ret;
struct stat statBuf; struct stat statBuf;
FILE *fp; FILE *fp;
char *file; char *file;
@ -1728,7 +1736,7 @@ editMapFile(char *bookCaseName, char *bookCaseMap)
strerror(errno)); strerror(errno));
file = XtMalloc((statBuf.st_size + 1) * sizeof(char)); 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') if (file[statBuf.st_size - 1] == '\n')
file[statBuf.st_size - 1] = '\0'; file[statBuf.st_size - 1] = '\0';
else file[statBuf.st_size] = '\0'; else file[statBuf.st_size] = '\0';

View file

@ -54,7 +54,7 @@
#include <stdlib.h> #include <stdlib.h>
#if !defined(__osf__) && !defined(USL) #if !defined(__osf__) && !defined(USL) && !defined(linux) && !defined(CSRG_BASED)
# include <osfcn.h> # include <osfcn.h>
#else #else
# include <unistd.h> # include <unistd.h>
@ -205,9 +205,11 @@ typedef struct graphics_task_buffer_state *graphics_task_BUFFER_STATE;
#define INITIAL 0 #define INITIAL 0
#include <assert.h> #include <assert.h>
#include <stream.h> #include <iostream>
#include <sstream>
using namespace std;
#ifdef DEBUG #ifdef NODEBUG
#include "oliasdb/olias_consts.h" #include "oliasdb/olias_consts.h"
GR_TYPE gtype; GR_TYPE gtype;
#else #else
@ -2548,7 +2550,7 @@ FILE *file;
} }
#ifndef DEBUG #ifndef NODEBUG
void void
get_type() get_type()
{ {

View file

@ -42,7 +42,7 @@
#ifdef __cplusplus #ifdef __cplusplus
#include <stdlib.h> #include <stdlib.h>
#if !defined(__osf__) && !defined(USL) #if !defined(__osf__) && !defined(USL) && !defined(linux) && !defined(CSRG_BASED)
#include <osfcn.h> #include <osfcn.h>
#endif #endif
@ -190,15 +190,16 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
#define YY_CHAR unsigned char #define YY_CHAR unsigned char
#define INITIAL 0 #define INITIAL 0
#if !defined(__osf__) && !defined(USL) #if !defined(__osf__) && !defined(USL) && !defined(linux) && !defined(CSRG_BASED)
#include <osfcn.h> #include <osfcn.h>
#else #else
#include <unistd.h> #include <unistd.h>
#endif #endif
#include <iostream.h> #include <iostream>
#include <stdio.h> #include <stdio.h>
#include <stream.h> #include <sstream>
using namespace std;
#include <string.h> #include <string.h>
#include "Exceptions.hh" #include "Exceptions.hh"
@ -209,6 +210,7 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
#include "AttributeList.h" #include "AttributeList.h"
#include "FlexBuffer.h" #include "FlexBuffer.h"
#include "Token.h" #include "Token.h"
#include "api/utility.h"
static SGMLDefn *defn = new SGMLDefn(); static SGMLDefn *defn = new SGMLDefn();
static FlexBuffer *DataBuffer = new FlexBuffer(); static FlexBuffer *DataBuffer = new FlexBuffer();
@ -1845,7 +1847,7 @@ case 1:
type = SGMLName::intern(tstr); type = SGMLName::intern(tstr);
if ( type != SGMLName::IMPLIED ){ if ( type != SGMLName::IMPLIED ){
if(!value) value = ""; if(!value) value = (char*)"";
Dispatch::tok->StoreAttribute( name, value, type); Dispatch::tok->StoreAttribute( name, value, type);
} }
} }

View file

@ -1,7 +1,7 @@
%{ /* -*- c++ -*- */ %{ /* -*- c++ -*- */
/* $XConsortium: lex.l /main/5 1996/11/19 16:55:12 drk $ */ /* $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> #include <osfcn.h>
#else #else
#include <unistd.h> #include <unistd.h>
@ -20,6 +20,7 @@
#include "AttributeList.h" #include "AttributeList.h"
#include "FlexBuffer.h" #include "FlexBuffer.h"
#include "Token.h" #include "Token.h"
#include "api/utility.h"
static SGMLDefn *defn = new SGMLDefn(); static SGMLDefn *defn = new SGMLDefn();
static FlexBuffer *DataBuffer = new FlexBuffer(); static FlexBuffer *DataBuffer = new FlexBuffer();

View file

@ -25,12 +25,13 @@ XCOMM Campbell, CA 95008
XCOMM XCOMM
XCOMM XCOMM
DEPEND_DEFINES = $(CXXDEPENDINCLUDES) DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES)
NormalCplusplusObjectRule()
INCLUDES=$(GLOBAL_INCLUDES) $(MMDB_INCLUDES) $(EXCEPTIONS_INCLUDES) INCLUDES=$(GLOBAL_INCLUDES) $(MMDB_INCLUDES) $(EXCEPTIONS_INCLUDES)
MMDB_DIR=../../mmdb MMDB_DIR=../../mmdb
@ -205,6 +206,8 @@ ALL_MMDB_OBJS = $(API_OBJS) $(BTREE_OBJS) \
#ifdef AIXArchitecture #ifdef AIXArchitecture
Libs=$(ALL_MMDB_OBJS) $(DTSVCLIB) $(TTLIB) $(MATH_LIB) 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 #else
Libs=$(MMDB_LIBS) $(DTSVCLIB) $(TTLIB) $(MATH_LIB) Libs=$(MMDB_LIBS) $(DTSVCLIB) $(TTLIB) $(MATH_LIB)
#endif #endif

View file

@ -47,7 +47,8 @@
* *
*/ */
#include <iostream.h> #include <iostream>
using namespace std;
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
@ -91,7 +92,7 @@ main(int argc, char **argv)
dbgLevel = dbgInit(); dbgLevel = dbgInit();
try { mtry {
if ( argc < 2 ) { if ( argc < 2 ) {
cerr << "Usage : valBase checkBase installBase\n"; cerr << "Usage : valBase checkBase installBase\n";
@ -167,7 +168,7 @@ main(int argc, char **argv)
// Now to check locators // 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; int DupLocFound=0;
@ -204,7 +205,7 @@ main(int argc, char **argv)
exit (0); exit (0);
} }
catch ( mmdbException &, e ) mcatch ( mmdbException &, e )
{ {
debug(cerr, e ); debug(cerr, e );
abort(); abort();

View file

@ -5,6 +5,17 @@ XCOMM $TOG: Imakefile /main/7 1998/08/10 15:55:12 mgreess $
SUBDIRS=src StyleSheet 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)) MakeSubdirs($(SUBDIRS))
DependSubdirs($(SUBDIRS)) DependSubdirs($(SUBDIRS))
NamedTargetSubdirs(install_buildtools,$(SUBDIRS),\ NamedTargetSubdirs(install_buildtools,$(SUBDIRS),\

View file

@ -1,6 +1,8 @@
XCOMM $TOG: Imakefile /main/14 1997/09/05 11:32:36 samborn $ 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) INCLUDES=$(EXCEPTIONS_INCLUDES) $(COMMON_CLASS_INCLUDES)

View file

@ -33,7 +33,8 @@
#include "StyleSheet/FeatureDefDictionary.h" #include "StyleSheet/FeatureDefDictionary.h"
#include "StyleSheet/RendererHCV.h" #include "StyleSheet/RendererHCV.h"
#include "HardCopy/autoNumberFP.h" #include "HardCopy/autoNumberFP.h"
#include <iostream.h> #include <iostream>
using namespace std;
#include <stdarg.h> #include <stdarg.h>
@ -89,7 +90,7 @@ main(int argc, char** argv )
quit(1); quit(1);
} }
try { mtry {
if ( strcasecmp(argv[1], "hardcopy") == 0 ) if ( strcasecmp(argv[1], "hardcopy") == 0 )
gRenderer = new RendererHCV(); gRenderer = new RendererHCV();
@ -133,14 +134,14 @@ main(int argc, char** argv )
*defStream >> *g_FeatureDefDictionary; *defStream >> *g_FeatureDefDictionary;
//cerr << *g_FeatureDefDictionary; //cerr << *g_FeatureDefDictionary;
} }
catch_any() mcatch_any()
{ {
cerr << "\nfeature definition has error.\n"; cerr << "\nfeature definition has error.\n";
quit(1); quit(1);
} }
end_try; end_try;
try { mtry {
fstream* styleStream = new fstream(argv[2], ios::in); fstream* styleStream = new fstream(argv[2], ios::in);
if ( !(*styleStream) ) { if ( !(*styleStream) ) {
@ -166,7 +167,7 @@ main(int argc, char** argv )
} }
catch_any() mcatch_any()
{ {
report_error_location(); report_error_location();
quit(1); quit(1);

View file

@ -1,6 +1,6 @@
XCOMM $TOG: Imakefile /main/11 1997/12/31 09:07:38 bill $ XCOMM $TOG: Imakefile /main/11 1997/12/31 09:07:38 bill $
DEPEND_DEFINES = $(CXXDEPENDINCLUDES) DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES)
NormalLibraryObjectRule() NormalLibraryObjectRule()
@ -181,16 +181,22 @@ ALL_MMDB_OBJS = $(API_OBJS) $(BTREE_OBJS) \
#ifdef AIXArchitecture #ifdef AIXArchitecture
Libs = $(ALL_MMDB_OBJS) $(MATH_LIB) $(DTSVCLIB) $(TTLIB) $(XLIB) 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 #else
Libs = $(MMDB_LIBS) $(MATH_LIB) $(DTSVCLIB) $(TTLIB) $(XLIB) Libs = $(MMDB_LIBS) $(MATH_LIB) $(DTSVCLIB) $(TTLIB) $(XLIB)
#endif #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) Libs_C_API = $(MMDB_LIBS_C_API) $(DTSVCLIB) $(TTLIB) $(XLIB) $(MATH_LIB)
#endif
SimpleCPlusPlusProgram(dbdrv,main.o,$(Libs)) SimpleCPlusPlusProgram(dbdrv,main.o,$(Libs))
SimpleCPlusPlusProgram(restore,restore.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)) SimpleCPlusPlusProgram(dbdrv_c_api,main_c_api.o,$(Libs_C_API))
#else #else
SimpleCProgram(dbdrv_c_api,main_c_api.o,$(Libs_C_API)) 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 { } else {
if ( strcmp(argv[1], "define") == 0 ) { if ( strcmp(argv[1], "define") == 0 ) {
infolib_ptr = mmdb.openInfoLib(); infolib_ptr = mmdb.openInfoLib(getenv("MMDB_PATH"));
if ( infolib_ptr == 0 || if ( infolib_ptr == 0 ||
infolib_ptr->define_info_base(argv[3],argv[4],argv[2]) == false infolib_ptr->define_info_base(argv[3],argv[4],argv[2]) == false
@ -149,12 +149,12 @@ main( int argc, char** argv )
int ok; int ok;
try mtry
{ {
ok = select_and_process( argc, argv ); ok = select_and_process( argc, argv );
} }
catch (mmdbException &,e) mcatch (mmdbException &,e)
{ {
cerr << "Exception msg: " << e << "\n"; cerr << "Exception msg: " << e << "\n";
#ifdef DEBUG #ifdef DEBUG

View file

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

View file

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