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),\
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),\
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
- #include <iostream.h>
+ #include <iostream>
+using namespace std;
#include <assert.h>
#include "AttributeRec.h"
/* $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"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
-#include <iostream.h>
+#include <iostream>
+using namespace std;
#include "List.h"
#include "AttributeRec.h"
#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 "Task.h"
#include "DataBase.h"
#include "DataRepository.h"
+#include "api/utility.h"
/* exported interfaces */
#include "AusTextStorage.h"
// 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
*/
-#include <stream.h>
+#include <sstream>
+using namespace std;
/* import... */
#include <assert.h>
#include "OL-Data.h"
#include "StringList.h"
#include "StyleTask.h"
+#include "api/utility.h"
/* export... */
#include "BookTasks.h"
#include <stdlib.h>
-#if !defined(__osf__) && !defined(USL)
+#if !defined(__osf__) && !defined(USL) && !defined(linux) && !defined(CSRG_BASED)
#include <osfcn.h>
#endif
#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>
#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()
void DBCursor::short_list(FILE *fp, int *qout, int ltype, void *out)
{
int c;
+ int ret;
c = fgetc(fp);
FRIENDLY_ASSERT(c == '#');
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);
//-------------Initializer for the zone_name mapping ----------------
-static char *zone_name[] = {
+static const char *zone_name[] = {
"D",
"H",
"G",
*/
/* $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"
#define FLEX_BFR_HDR
#include <stddef.h>
-#include <iostream.h>
+#include <iostream>
+using namespace std;
class FlexBuffer {
*/
/* $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>
#ifndef __HandlerH__
#define __HandlerH__
-#include <new.h>
+#include <new>
extern void FreeStoreException();
#endif
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
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))
char *
getGI( char * bufptr )
{
- for (char * cptr = bufptr; *cptr != '>'; cptr++) {
+ char* cptr;
+ for (cptr = bufptr; *cptr != '>'; cptr++) {
}
*cptr = '\0';
char * retval = strdup(bufptr);
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;
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);
char *bookcaseDir = argv[0];
char *infobaseDir = argv[1];
- try{
+ mtry{
BookCaseDB db(bookcaseDir);
const char *infolibDir;
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 =
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;
#if !defined(__uxp__) && !defined(USL)
#include <strings.h>
#endif
-#include <strstream.h>
+#include <sstream>
+using namespace std;
#include "Exceptions.hh"
#include "DataBase.h"
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);
}
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,
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);
}
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,
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);
}
const char *base_name = argv[0];
const char *bookcaseDir = argv[1];
- try{
+ mtry{
BookCaseDB db(bookcaseDir);
if ( load_style_only ) {
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;
#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>
#include "BookCaseDB.h"
#include "GraphicsTask.h"
#include "Dispatch.h"
+#include "api/utility.h"
#ifdef UseQSearch
#include "QSearch.h"
#else
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);
/* $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"
#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 */
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
*++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:
#include <stdlib.h>
-#if !defined(__osf__) && !defined(USL)
+#if !defined(__osf__) && !defined(USL) && !defined(linux) && !defined(CSRG_BASED)
# include <osfcn.h>
#endif
#include <stdlib.h>
-#if !defined(__osf__) && !defined(USL)
+#if !defined(__osf__) && !defined(USL) && !defined(linux) && !defined(CSRG_BASED)
#include <osfcn.h>
#endif
#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>
#include "BookCaseDB.h"
#include "GraphicsTask.h"
#include "Dispatch.h"
+#include "api/utility.h"
// Debugging macro
#ifdef DEBUG
total = used = 0;
}
+
+int
StringToInt::intern(const char *name)
{
int indx;
#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"
fclose( fp );
return ( full_path_name );
}
-
- fclose( fp );
-
}
return NULL;
#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"
/* $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"
Dispatch::setRoot(styleTask, istack);
- try{
- try{
+ mtry{
+ mtry{
extern int yylex();
yylex();
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;
*/
/* $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 ) {
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") );
#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"
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);
#ifndef TOKEN_HEADER
#define TOKEN_HEADER
-#include <strstream.h>
+#include <sstream>
+using namespace std;
#include "Exceptions.hh"
#!/bin/sh
-set -h
###############################################################################
#
ARCH=mips
;;
+ Linux*)
+ ARCH=i386
+ ;;
+
+ FreeBSD*)
+ ARCH=i386
+ ;;
+
*)
err_f "Does not run under [$OS]"
;;
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\
" 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";
if (preMsg)
fputs(preMsg, stderr);
- fputs(usageMsg, stderr);
+ fputs(usageMsg1, stderr);
+ fputs(usageMsg2, stderr);
exit(exitCode);
}
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;
}
static void
buildBookcase(char *cmdSrc, char *dirName)
{
+ int ret1;
+ char *ret2;
char *dataBase;
char *tmpFile;
char *newMmdbPathEnv;
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 |\
runShellCmd(cmd);
- XtFree(anonym_file);
+ XtFree((char*)anonym_file);
sprintf(cmd, "rm -f %s", anonym_file);
- system(cmd);
+ ret1 = system(cmd);
}
validateBookCase(bookCaseMap, bookCaseName);
}
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",
static void
validateBookCase(char *mapFile, char *bookCaseName)
{
+ char *ret;
FILE *fp;
char lineBuf[MAXPATHLEN + 1];
char cmdBuf[MAXPATHLEN + 1];
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)
static void
editMapFile(char *bookCaseName, char *bookCaseMap)
{
+ size_t ret;
struct stat statBuf;
FILE *fp;
char *file;
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';
#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>
#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
}
-#ifndef DEBUG
+#ifndef NODEBUG
void
get_type()
{
#ifdef __cplusplus
#include <stdlib.h>
-#if !defined(__osf__) && !defined(USL)
+#if !defined(__osf__) && !defined(USL) && !defined(linux) && !defined(CSRG_BASED)
#include <osfcn.h>
#endif
#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"
#include "AttributeList.h"
#include "FlexBuffer.h"
#include "Token.h"
+#include "api/utility.h"
static SGMLDefn *defn = new SGMLDefn();
static FlexBuffer *DataBuffer = new FlexBuffer();
type = SGMLName::intern(tstr);
if ( type != SGMLName::IMPLIED ){
- if(!value) value = "";
+ if(!value) value = (char*)"";
Dispatch::tok->StoreAttribute( name, value, type);
}
}
%{ /* -*- 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>
#include "AttributeList.h"
#include "FlexBuffer.h"
#include "Token.h"
+#include "api/utility.h"
static SGMLDefn *defn = new SGMLDefn();
static FlexBuffer *DataBuffer = new FlexBuffer();
XCOMM
XCOMM
-DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
+DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES)
-INCLUDES=$(GLOBAL_INCLUDES) $(MMDB_INCLUDES) $(EXCEPTIONS_INCLUDES)
+NormalCplusplusObjectRule()
+INCLUDES=$(GLOBAL_INCLUDES) $(MMDB_INCLUDES) $(EXCEPTIONS_INCLUDES)
#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
*
*/
-#include <iostream.h>
+#include <iostream>
+using namespace std;
#include <assert.h>
#include <string.h>
#include <stdlib.h>
dbgLevel = dbgInit();
- try {
+ mtry {
if ( argc < 2 ) {
cerr << "Usage : valBase checkBase installBase\n";
// 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;
exit (0);
}
- catch ( mmdbException &, e )
+ mcatch ( mmdbException &, e )
{
debug(cerr, e );
abort();
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),\
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)
#include "StyleSheet/FeatureDefDictionary.h"
#include "StyleSheet/RendererHCV.h"
#include "HardCopy/autoNumberFP.h"
-#include <iostream.h>
+#include <iostream>
+using namespace std;
#include <stdarg.h>
quit(1);
}
- try {
+ mtry {
if ( strcasecmp(argv[1], "hardcopy") == 0 )
gRenderer = new RendererHCV();
*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) ) {
}
- catch_any()
+ mcatch_any()
{
report_error_location();
quit(1);
XCOMM $TOG: Imakefile /main/11 1997/12/31 09:07:38 bill $
-DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
+DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES)
NormalLibraryObjectRule()
#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))
} 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
int ok;
- try
+ mtry
{
ok = select_and_process( argc, argv );
}
- catch (mmdbException &,e)
+ mcatch (mmdbException &,e)
{
cerr << "Exception msg: " << e << "\n";
#ifdef DEBUG
#include "oliasdb/Mmdb.h"
#include <stdio.h>
+#include <stdlib.h>
usage(int argc, char** argv)
* (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"
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];