Initial import of the CDE 2.1.30 sources from the Open Group.

This commit is contained in:
Peter Howkins
2012-03-10 18:21:40 +00:00
commit 83b6996daa
18978 changed files with 3945623 additions and 0 deletions

View File

@@ -0,0 +1,80 @@
XCOMM $TOG: Imakefile /main/2 1997/12/23 11:41:20 bill $
XCOMM ** WARNING **
XCOMM
XCOMM The files named here may appear in many different Imakefiles.
XCOMM If you add or remove a file, be sure to update all locations.
XCOMM It's unfortunate, but all this redundancy serves a purpose.
XCOMM
XCOMM Other possible locations are:
XCOMM .../lib/DtMmdb/Imakefile
XCOMM .../lib/DtMmdb/<subdir>/Imakefile
XCOMM .../programs/dtinfo/mmdb/Imakefile
XCOMM .../programs/dtinfo/mmdb/<subdir>/Imakefile
#define DoNormalLib YES
#define DoSharedLib NO
#define DoDebugLib NO
#define DoProfileLib NO
#define LibName MMDB
#define LibHeaders NO
#define LibCreate NO
#define CplusplusSource YES
DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
XCOMM Do not put any -g here, will cause the generation of MasterTemplate.c.c
XCOMM to use centerline_new, which cannot be linked on HP
XCOMM darwinl 6/27/95
#ifdef DtinfoClient
DEFINES=-DCDE_NEXT
#else
DEFINES=
#endif
INCLUDES = -I$(DTMMDBSRC)/HardCopy $(EXCEPTIONS_INCLUDES) $(COMMON_CLASS_INCLUDES) -I$(DTMMDBSRC)
#if defined(CplusplusCompilerMajorVersion) && (CplusplusCompilerMajorVersion == 4)
XCOMM need the ptr repository
CXXEXTRA_DEFINES = -ptr../templates
#endif
#if defined(USLArchitecture)
CXXEXTRA_DEFINES = -Xo
#endif
#if defined(HPArchitecture) || !defined(CplusplusCompilerMajorVersion) || (CplusplusCompilerMajorVersion != 4)
LinkSourceFile(TemplatesAutoNumber.C,$(DTMMDBSRC)/HardCopy)
EXTRA_SRCS = TemplatesAutoNumber.C
#endif
LinkSourceFile(FPset.C,$(DTMMDBSRC)/HardCopy)
LinkSourceFile(HardCopyFP.C,$(DTMMDBSRC)/HardCopy)
LinkSourceFile(autoNumber.C,$(DTMMDBSRC)/HardCopy)
LinkSourceFile(autoNumberFP.C,$(DTMMDBSRC)/HardCopy)
BASE_SRCS = FPset.C HardCopyFP.C autoNumber.C autoNumberFP.C
SRCS = $(BASE_SRCS) $(EXTRA_SRCS)
OBJS = $(BASE_SRCS:.C=.o) $(EXTRA_SRCS:.C=.o)
#include <Library.tmpl>
#ifdef HPArchitecture
LinkSourceFile(all_tmpls,$(DTMMDBSRC)/HardCopy)
SpecialCPlusPlusObjectRule(TemplatesAutoNumber.o,,+pti all_tmpls -DEXPAND_TEMPLATES)
#elif defined(UXPArchitecture) || (defined(SunArchitecture) && CplusplusCompilerMajorVersion < 4)
LinkSourceFile(all_tmpls,$(DTMMDBSRC)/HardCopy)
SpecialCPlusPlusObjectRule(TemplatesAutoNumber.o,,+Tall_tmpls -DEXPAND_TEMPLATES)
#elif defined(AlphaArchitecture)
SpecialCPlusPlusObjectRule(TemplatesAutoNumber.o,,-ptf -DEXPAND_TEMPLATES)
#else
SpecialCPlusPlusObjectRule(TemplatesAutoNumber.o,,-ptf -DEXPAND_TEMPLATES)
SpecialCPlusPlusExpandRule(TemplatesAutoNumber..c,TemplatesAutoNumber.C,-ptf -DEXPAND_TEMPLATES)
#endif
SubdirLibraryRule($(OBJS))
DependTarget()

View File

@@ -0,0 +1,244 @@
XCOMM $TOG: Imakefile /main/12 1998/08/10 15:56:48 mgreess $
XCOMM ** WARNING **
XCOMM
XCOMM The files named here may appear in many different Imakefiles.
XCOMM If you add or remove a file, be sure to update all locations.
XCOMM It's unfortunate, but all this redundancy serves a purpose.
XCOMM
XCOMM Other possible locations are:
XCOMM .../lib/DtMmdb/Imakefile
XCOMM .../lib/DtMmdb/<subdir>/Imakefile
XCOMM .../programs/dtinfo/mmdb/Imakefile
XCOMM .../programs/dtinfo/mmdb/<subdir>/Imakefile
#define IHaveSubdirs
#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)' 'CXXDEBUGFLAGS=$(CXXDEBUGFLAGS)'
MMDB_SUBDIRS = HardCopy StyleSheet dti_cc
SUBDIRS = \
api btree \
btree_berkeley compression \
diskhash dstr \
dti_excs dynhash \
hmphf index \
mgrs misc \
object oliasdb \
schema storage \
utility $(MMDB_SUBDIRS)
MMDB_DONES = HardCopy/DONE StyleSheet/DONE dti_cc/DONE
DONES = \
api/DONE btree/DONE \
btree_berkeley/DONE compression/DONE \
diskhash/DONE dstr/DONE \
dti_excs/DONE dynhash/DONE \
hmphf/DONE index/DONE \
mgrs/DONE misc/DONE \
object/DONE oliasdb/DONE \
schema/DONE storage/DONE \
utility/DONE $(MMDB_DONES)
EXTRALIBRARYDEPS = $(DONES)
MakeSubdirs($(SUBDIRS))
ForceSubdirs($(SUBDIRS))
DependSubdirs($(SUBDIRS))
#define DoNormalLib YES
#define DoSharedLib NO
#define DoDebugLib NO
#define DoProfileLib NO
#define LibName MMDB
#define LibHeaders NO
#define CplusplusSource YES
/*
* N.B.: All .o's should be built in the subdirectories.
*/
API_OBJS = \
api/base.o api/info_base.o \
api/info_lib.o api/smart_ptr.o \
api/transaction.o api/utility.o
BTREE_OBJS = \
btree/mmdb_btree.o
#if !defined(AIXArchitecture)
EXTRA_BTREE_BERKELEY_OBJS = btree_berkeley/memmove.o
#endif
BTREE_BERKELEY_OBJS = \
btree_berkeley/bt_close.o btree_berkeley/bt_conv.o \
btree_berkeley/bt_debug.o btree_berkeley/bt_delete.o \
btree_berkeley/bt_get.o btree_berkeley/bt_open.o \
btree_berkeley/bt_overflow.o btree_berkeley/bt_page.o \
btree_berkeley/bt_put.o btree_berkeley/bt_search.o \
btree_berkeley/bt_seq.o btree_berkeley/bt_split.o \
btree_berkeley/bt_stack.o btree_berkeley/bt_utils.o \
btree_berkeley/mktemp.o btree_berkeley/realloc.o \
btree_berkeley/snprintf.o $(EXTRA_BTREE_BERKELEY_OBJS) \
btree_berkeley/mpool.o btree_berkeley/db.o
COMPRESSION_OBJS = \
compression/abs_agent.o compression/zip.o \
compression/huffman.o compression/trie.o \
compression/code.o compression/lzss.o \
compression/sgml.o compression/ps.o
DISKHASH_OBJS = \
diskhash/disk_bucket.o diskhash/bucket_array.o \
diskhash/disk_hash.o
DSTR_OBJS = \
dstr/set.o dstr/bset.o \
dstr/slist.o dstr/dlist_cell.o \
dstr/dlist.o dstr/heap.o \
dstr/void_ptr_array.o dstr/void_ptr_stack.o \
dstr/memory_pool.o dstr/dstr_test.o \
dstr/index_agent.o dstr/token_stack.o \
dstr/slist_char_ptr_cell.o
DTI_EXCS_OBJS = \
dti_excs/Jump_Environment.o dti_excs/Exceptions.o \
dti_excs/Exception.o dti_excs/Destructable.o \
dti_excs/terminate.o
DYNHASH_OBJS = \
dynhash/data_t.o dynhash/imp_bucket.o \
dynhash/imp_die.o
HMPHF_OBJS = \
hmphf/buckets.o hmphf/mphf_funcs.o \
hmphf/mphf_hash_table.o hmphf/params.o \
hmphf/pattern.o hmphf/sorter.o
INDEX_OBJS = \
index/btree_index.o index/dyn_disk_index.o \
index/dyn_index.o index/dyn_memory_index.o \
index/fast_mphf.o index/hash.o \
index/index.o index/inv_lists.o \
index/mphf_index.o
MGRS_OBJS = \
mgrs/managers.o mgrs/misc.o \
mgrs/query_mgr.o mgrs/template_mgr.o
MISC_OBJS = \
misc/unique_id.o
OBJECT_OBJS = \
object/composite.o object/compressed_pstring.o \
object/cset.o object/dl_list.o \
object/dl_list_cell.o object/handler.o \
object/integer.o object/long_pstring.o \
object/oid.o object/oid_list.o \
object/oid_t.o object/primitive.o \
object/pstring.o object/random_gen.o \
object/root.o object/short_list.o \
object/tuple.o
OLIASDB_OBJS = \
oliasdb/asciiIn_filters.o oliasdb/collectionIterator.o \
oliasdb/dlp_hd.o oliasdb/dlp_test.o \
oliasdb/doc_hd.o oliasdb/doc_test.o \
oliasdb/graphic_hd.o oliasdb/graphic_test.o \
oliasdb/loc_test.o oliasdb/locator_hd.o \
oliasdb/mark.o oliasdb/mark_base.o \
oliasdb/mark_test.o oliasdb/mmdb.o \
oliasdb/node_hd.o oliasdb/node_test.o \
oliasdb/olias_funcs.o oliasdb/olias_test.o \
oliasdb/stylesheet_hd.o oliasdb/stylesheet_test.o \
oliasdb/toc_hd.o oliasdb/toc_test.o \
oliasdb/user_base.o
SCHEMA_OBJS = \
schema/desc.o schema/store_desc.o \
schema/object_dict.o schema/stored_object_desc.o \
schema/index_desc.o schema/inv_desc.o \
schema/agent_desc.o schema/container_desc.o \
schema/sheet.o schema/token.o
STORAGE_OBJS = \
storage/abs_storage.o storage/chunks_index.o \
storage/heap_comp_funcs.o storage/lru.o \
storage/page.o storage/page_cache.o \
storage/page_rep.o storage/page_storage.o \
storage/rep_cell.o storage/rep_policy.o \
storage/store_test.o storage/unixf_storage.o \
storage/version.o storage/vm_storage.o
UTILITY_OBJS = \
utility/funcs.o utility/ostring.o \
utility/pm_random.o utility/atoi_pearson.o \
utility/xtime.o utility/buffer.o \
utility/atoi_larson.o utility/atomic_lock.o \
utility/rw_lock.o utility/atoi_fast.o \
utility/filter.o utility/mmdb_exception.o \
utility/randomize.o
DTI_CC_OBJS = \
dti_cc/CC_Listbase.o dti_cc/cc_exceptions.o \
dti_cc/CC_String.o dti_cc/CC_Tokenizer.o \
dti_cc/CC_Stack.o dti_cc/CC_Slist.o
#if defined(HPArchitecture) || !defined(CplusplusCompilerMajorVersion) || (CplusplusCompilerMajorVersion != 4)
EXTRA_HARDCOPY_OBJS = HardCopy/TemplatesAutoNumber.o
#endif
HARDCOPY_OBJS = \
HardCopy/FPset.o HardCopy/HardCopyFP.o \
HardCopy/autoNumber.o HardCopy/autoNumberFP.o \
$(EXTRA_HARDCOPY_OBJS)
#if defined(HPArchitecture) || !defined(CplusplusCompilerMajorVersion) || (CplusplusCompilerMajorVersion != 4)
EXTRA_STYLESHEET_OBJS = StyleSheet/SSTemplates.o
#endif
STYLESHEET_OBJS = \
StyleSheet/Attribute.o StyleSheet/AttributeList.o \
StyleSheet/BitVector.o StyleSheet/DocParser.o \
StyleSheet/Element.o StyleSheet/Expression.o \
StyleSheet/Feature.o StyleSheet/FeatureDefDictionary.o \
StyleSheet/FeatureSet.o StyleSheet/FeatureValue.o \
StyleSheet/PathQualifier.o StyleSheet/PathTable.o \
StyleSheet/Resolver.o StyleSheet/ResolverStack.o \
StyleSheet/SSPath.o StyleSheet/StyleSheet.o \
StyleSheet/StyleSheetExceptions.o \
StyleSheet/SymTab.o StyleSheet/VariableTable.o \
StyleSheet/defParser.o StyleSheet/defToken.o \
StyleSheet/style.o StyleSheet/tokenStyle.o \
StyleSheet/RendererHCV.o $(EXTRA_STYLESHEET_OBJS)
MMDB_OBJS = $(HARDCOPY_OBJS) $(STYLESHEET_OBJS) $(DTI_CC_OBJS)
OBJS = $(API_OBJS) $(BTREE_OBJS) \
$(BTREE_BERKELEY_OBJS) $(COMPRESSION_OBJS) \
$(DISKHASH_OBJS) $(DSTR_OBJS) \
$(DTI_EXCS_OBJS) $(DYNHASH_OBJS) \
$(HMPHF_OBJS) $(INDEX_OBJS) \
$(MGRS_OBJS) $(MISC_OBJS) \
$(OBJECT_OBJS) $(OLIASDB_OBJS) \
$(SCHEMA_OBJS) $(STORAGE_OBJS) \
$(UTILITY_OBJS) $(MMDB_OBJS)
#include <Library.tmpl>
#if defined(SunArchitecture) && CplusplusCompilerMajorVersion > 3
AllTarget(libMMDBTemplates.a)
libMMDBTemplates.a:
$(RM) $@
find ./templates/Templates.DB -name '*.o' -type f -print | xargs -n4 ar cq $@
clean::
$(RM) libMMDBTemplates.a
ptclean
#endif
DependTarget()

View File

@@ -0,0 +1,131 @@
XCOMM $TOG: Imakefile /main/2 1997/12/23 11:43:20 bill $
XCOMM ** WARNING **
XCOMM
XCOMM The files named here may appear in many different Imakefiles.
XCOMM If you add or remove a file, be sure to update all locations.
XCOMM It's unfortunate, but all this redundancy serves a purpose.
XCOMM
XCOMM Other possible locations are:
XCOMM .../lib/DtMmdb/Imakefile
XCOMM .../lib/DtMmdb/<subdir>/Imakefile
XCOMM .../programs/dtinfo/mmdb/Imakefile
XCOMM .../programs/dtinfo/mmdb/<subdir>/Imakefile
#define DoNormalLib YES
#define DoSharedLib NO
#define DoDebugLib NO
#define DoProfileLib NO
#define LibName MMDB
#define LibHeaders NO
#define LibCreate NO
#define CplusplusSource YES
DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
#ifdef DtinfoClient
DEFINES = -DCDE_NEXT
#else
DEFINES =
#endif
INCLUDES = -I$(DTMMDBSRC)/StyleSheet $(EXCEPTIONS_INCLUDES) $(COMMON_CLASS_INCLUDES) -I$(DTMMDBSRC)
#ifdef RegenParserFiles
LinkSourceFile(defParser.y,$(DTMMDBSRC)/StyleSheet)
LinkSourceFile(style.y,$(DTMMDBSRC)/StyleSheet)
LinkSourceFile(defToken.l,$(DTMMDBSRC)/StyleSheet)
LinkSourceFile(tokenStyle.l,$(DTMMDBSRC)/StyleSheet)
YACCSTACK = -DYYSTACKSIZE=20000
YFLAGS = -l -d
LFLAGS = -8 -s
LexTarget(tokenStyle,style)
YaccTarget(style,style)
LexTarget(defToken,defParser)
YaccTarget(defParser,defParser)
#endif
#if defined(CplusplusCompilerMajorVersion) && (CplusplusCompilerMajorVersion == 4)
XCOMM need the ptr repository
CXXEXTRA_DEFINES = -ptr../templates
#endif
#if defined(USLArchitecture)
CXXEXTRA_DEFINES = -Xo
#endif
LinkSourceFile(Attribute.C,$(DTMMDBSRC)/StyleSheet)
LinkSourceFile(AttributeList.C,$(DTMMDBSRC)/StyleSheet)
LinkSourceFile(BitVector.C,$(DTMMDBSRC)/StyleSheet)
LinkSourceFile(DocParser.C,$(DTMMDBSRC)/StyleSheet)
LinkSourceFile(Element.C,$(DTMMDBSRC)/StyleSheet)
LinkSourceFile(Expression.C,$(DTMMDBSRC)/StyleSheet)
LinkSourceFile(Feature.C,$(DTMMDBSRC)/StyleSheet)
LinkSourceFile(FeatureDefDictionary.C,$(DTMMDBSRC)/StyleSheet)
LinkSourceFile(FeatureSet.C,$(DTMMDBSRC)/StyleSheet)
LinkSourceFile(FeatureValue.C,$(DTMMDBSRC)/StyleSheet)
LinkSourceFile(PathQualifier.C,$(DTMMDBSRC)/StyleSheet)
LinkSourceFile(PathTable.C,$(DTMMDBSRC)/StyleSheet)
LinkSourceFile(Resolver.C,$(DTMMDBSRC)/StyleSheet)
LinkSourceFile(ResolverStack.C,$(DTMMDBSRC)/StyleSheet)
LinkSourceFile(SSPath.C,$(DTMMDBSRC)/StyleSheet)
LinkSourceFile(StyleSheet.C,$(DTMMDBSRC)/StyleSheet)
LinkSourceFile(StyleSheetExceptions.C,$(DTMMDBSRC)/StyleSheet)
LinkSourceFile(SymTab.C,$(DTMMDBSRC)/StyleSheet)
LinkSourceFile(VariableTable.C,$(DTMMDBSRC)/StyleSheet)
LinkSourceFile(defParser.C,$(DTMMDBSRC)/StyleSheet)
LinkSourceFile(defToken.C,$(DTMMDBSRC)/StyleSheet)
LinkSourceFile(style.C,$(DTMMDBSRC)/StyleSheet)
LinkSourceFile(tokenStyle.C,$(DTMMDBSRC)/StyleSheet)
NORMAL_SRCS = \
Attribute.C AttributeList.C BitVector.C \
DocParser.C Element.C Expression.C \
Feature.C FeatureDefDictionary.C FeatureSet.C \
FeatureValue.C PathQualifier.C PathTable.C \
Resolver.C ResolverStack.C SSPath.C \
StyleSheet.C StyleSheetExceptions.C SymTab.C \
VariableTable.C defParser.C defToken.C \
style.C tokenStyle.C
#if defined(HPArchitecture) || !defined(CplusplusCompilerMajorVersion) || (CplusplusCompilerMajorVersion != 4)
LinkSourceFile(SSTemplates.C,$(DTMMDBSRC)/StyleSheet)
TEMPLATE_SRCS = SSTemplates.C
#endif
LinkSourceFile(RendererHCV.C,$(DTMMDBSRC)/StyleSheet)
VALIDATOR_SRCS = RendererHCV.C
#ifdef HPArchitecture
LinkSourceFile(all_tmpls,$(DTMMDBSRC)/StyleSheet)
SpecialCPlusPlusObjectRule(SSTemplates.o,,+pti all_tmpls -DEXPAND_TEMPLATES)
#elif defined(UXPArchitecture) || (defined(SunArchitecture) && CplusplusCompilerMajorVersion < 4)
LinkSourceFile(all_tmpls,$(DTMMDBSRC)/StyleSheet)
SpecialCPlusPlusObjectRule(SSTemplates.o,,+Tall_tmpls -DEXPAND_TEMPLATES)
#elif defined(AlphaArchitecture)
SpecialCPlusPlusObjectRule(SSTemplates.o,,-ptf -DEXPAND_TEMPLATES)
#else
SpecialCPlusPlusObjectRule(SSTemplates.o,,-ptf -DEXPAND_TEMPLATES)
SpecialCPlusPlusExpandRule(SSTemplates..c,SSTemplates.C,-ptf -DEXPAND_TEMPLATES)
#endif
LinkSourceFile(hardcopy.feature.spec,$(DTMMDBSRC)/StyleSheet)
LinkSourceFile(online.feature.spec,$(DTMMDBSRC)/StyleSheet)
InstallMultipleDest(install_buildtools,hardcopy.feature.spec,$(INSTALL_ETC_DIR))
InstallMultipleDest(install_buildtools,online.feature.spec,$(INSTALL_ETC_DIR))
SRCS = $(NORMAL_SRCS) $(TEMPLATE_SRCS) $(VALIDATOR_SRCS)
OBJS = $(NORMAL_SRCS:.C=.o) $(TEMPLATE_SRCS:.C=.o) $(VALIDATOR_SRCS:.C=.o)
#include <Library.tmpl>
SubdirLibraryRule($(OBJS))
DependTarget()

View File

@@ -0,0 +1,43 @@
XCOMM $XConsortium: Imakefile /main/1 1996/08/21 15:59:01 drk $
XCOMM ** WARNING **
XCOMM
XCOMM The files named here may appear in many different Imakefiles.
XCOMM If you add or remove a file, be sure to update all locations.
XCOMM It's unfortunate, but all this redundancy serves a purpose.
XCOMM
XCOMM Other possible locations are:
XCOMM .../lib/DtMmdb/Imakefile
XCOMM .../lib/DtMmdb/<subdir>/Imakefile
XCOMM .../programs/dtinfo/mmdb/Imakefile
XCOMM .../programs/dtinfo/mmdb/<subdir>/Imakefile
#define DoNormalLib YES
#define DoSharedLib NO
#define DoDebugLib NO
#define DoProfileLib NO
#define LibName MMDB
#define LibHeaders NO
#define LibCreate NO
#define CplusplusSource YES
DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
DEFINES =
INCLUDES = -I$(DTMMDBSRC)/api -I$(DTMMDBSRC) $(EXCEPTIONS_INCLUDES) -I$(DTMMDBSRC)/misc
LinkSourceFile(base.C,$(DTMMDBSRC)/api)
LinkSourceFile(info_base.C,$(DTMMDBSRC)/api)
LinkSourceFile(info_lib.C,$(DTMMDBSRC)/api)
LinkSourceFile(smart_ptr.C,$(DTMMDBSRC)/api)
LinkSourceFile(transaction.C,$(DTMMDBSRC)/api)
LinkSourceFile(utility.C,$(DTMMDBSRC)/api)
SRCS = base.C info_base.C info_lib.C smart_ptr.C transaction.C utility.C
OBJS = $(SRCS:.C=.o)
#include <Library.tmpl>
SubdirLibraryRule($(OBJS))
DependTarget()

View File

@@ -0,0 +1,38 @@
XCOMM $XConsortium: Imakefile /main/1 1996/08/21 15:59:05 drk $
XCOMM ** WARNING **
XCOMM
XCOMM The files named here may appear in many different Imakefiles.
XCOMM If you add or remove a file, be sure to update all locations.
XCOMM It's unfortunate, but all this redundancy serves a purpose.
XCOMM
XCOMM Other possible locations are:
XCOMM .../lib/DtMmdb/Imakefile
XCOMM .../lib/DtMmdb/<subdir>/Imakefile
XCOMM .../programs/dtinfo/mmdb/Imakefile
XCOMM .../programs/dtinfo/mmdb/<subdir>/Imakefile
#define DoNormalLib YES
#define DoSharedLib NO
#define DoDebugLib NO
#define DoProfileLib NO
#define LibName MMDB
#define LibHeaders NO
#define LibCreate NO
#define CplusplusSource YES
DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
DEFINES =
INCLUDES = -I$(DTMMDBSRC)/btree -I$(DTMMDBSRC) $(EXCEPTIONS_INCLUDES)
LinkSourceFile(mmdb_btree.C,$(DTMMDBSRC)/btree)
SRCS = mmdb_btree.C
OBJS = $(SRCS:.C=.o)
#include <Library.tmpl>
SubdirLibraryRule($(OBJS))
DependTarget()

View File

@@ -0,0 +1,85 @@
XCOMM $XConsortium: Imakefile /main/1 1996/08/21 15:59:10 drk $
XCOMM ** WARNING **
XCOMM
XCOMM The files named here may appear in many different Imakefiles.
XCOMM If you add or remove a file, be sure to update all locations.
XCOMM It's unfortunate, but all this redundancy serves a purpose.
XCOMM
XCOMM Other possible locations are:
XCOMM .../lib/DtMmdb/Imakefile
XCOMM .../lib/DtMmdb/<subdir>/Imakefile
XCOMM .../programs/dtinfo/mmdb/Imakefile
XCOMM .../programs/dtinfo/mmdb/<subdir>/Imakefile
#define DoNormalLib YES
#define DoSharedLib NO
#define DoDebugLib NO
#define DoProfileLib NO
#define LibName MMDB
#define LibHeaders NO
#define LibCreate NO
DEFINES = -DMEMMOVE
INCLUDES = -I$(DTMMDBSRC)/btree_berkeley -I$(DTMMDBSRC)
XCOMM Integretion Berkeley ndbm packege (sun.4.1.3 version) to mmdb:
XCOMM 9/15/93. qfc
XCOMM
XCOMM cp -r berkeley.db/PORT/sun.4.1.3/{clib,include,sys}/?* .
XCOMM
XCOMM change a few "include" lines in db.h, snprintf.h and mmmove.h.
XCOMM
XCOMM Merge Notes: 9/15/93. qfc
XCOMM SRCS1: btree code. from berkeley.db/btree
XCOMM SRCS2: clib code. from berkeley.db/PORT/sun.4.1.3/clib
XCOMM SRCS3: mpool code. from berkeley.db/mpool
XCOMM SRCS4: db code. from berkeley.db/db
LinkSourceFile(bt_close.c,$(DTMMDBSRC)/btree_berkeley)
LinkSourceFile(bt_conv.c,$(DTMMDBSRC)/btree_berkeley)
LinkSourceFile(bt_debug.c,$(DTMMDBSRC)/btree_berkeley)
LinkSourceFile(bt_delete.c,$(DTMMDBSRC)/btree_berkeley)
LinkSourceFile(bt_get.c,$(DTMMDBSRC)/btree_berkeley)
LinkSourceFile(bt_open.c,$(DTMMDBSRC)/btree_berkeley)
LinkSourceFile(bt_overflow.c,$(DTMMDBSRC)/btree_berkeley)
LinkSourceFile(bt_page.c,$(DTMMDBSRC)/btree_berkeley)
LinkSourceFile(bt_put.c,$(DTMMDBSRC)/btree_berkeley)
LinkSourceFile(bt_search.c,$(DTMMDBSRC)/btree_berkeley)
LinkSourceFile(bt_seq.c,$(DTMMDBSRC)/btree_berkeley)
LinkSourceFile(bt_split.c,$(DTMMDBSRC)/btree_berkeley)
LinkSourceFile(bt_stack.c,$(DTMMDBSRC)/btree_berkeley)
LinkSourceFile(bt_utils.c,$(DTMMDBSRC)/btree_berkeley)
SRCS1 = bt_close.c bt_conv.c bt_debug.c bt_delete.c bt_get.c \
bt_open.c bt_overflow.c bt_page.c bt_put.c bt_search.c \
bt_seq.c bt_split.c bt_stack.c bt_utils.c
#ifndef AIXArchitecture
LinkSourceFile(memmove.c,$(DTMMDBSRC)/btree_berkeley)
EXTRA_SRCS2 = memmove.c
#endif
LinkSourceFile(mktemp.c,$(DTMMDBSRC)/btree_berkeley)
LinkSourceFile(realloc.c,$(DTMMDBSRC)/btree_berkeley)
LinkSourceFile(snprintf.c,$(DTMMDBSRC)/btree_berkeley)
SRCS2 = mktemp.c realloc.c snprintf.c
LinkSourceFile(mpool.c,$(DTMMDBSRC)/btree_berkeley)
SRCS3 = mpool.c
LinkSourceFile(db.c,$(DTMMDBSRC)/btree_berkeley)
SRCS4 = db.c
SRCS = $(SRCS1) $(SRCS2) $(EXTRA_SRCS2) $(SRCS3) $(SRCS4)
OBJS = $(SRCS1:.c=.o) $(SRCS2:.c=.o) $(EXTRA_SRCS2:.c=.o) $(SRCS3:.c=.o) $(SRCS4:.c=.o)
#include <Library.tmpl>
SubdirLibraryRule($(OBJS))
DependTarget()

View File

@@ -0,0 +1,50 @@
XCOMM $XConsortium: Imakefile /main/1 1996/08/21 15:59:14 drk $
XCOMM ** WARNING **
XCOMM
XCOMM The files named here may appear in many different Imakefiles.
XCOMM If you add or remove a file, be sure to update all locations.
XCOMM It's unfortunate, but all this redundancy serves a purpose.
XCOMM
XCOMM Other possible locations are:
XCOMM .../lib/DtMmdb/Imakefile
XCOMM .../lib/DtMmdb/<subdir>/Imakefile
XCOMM .../programs/dtinfo/mmdb/Imakefile
XCOMM .../programs/dtinfo/mmdb/<subdir>/Imakefile
#define DoNormalLib YES
#define DoSharedLib NO
#define DoDebugLib NO
#define DoProfileLib NO
#define LibName MMDB
#define LibHeaders NO
#define LibCreate NO
#define CplusplusSource YES
DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
DEFINES =
INCLUDES = -I$(DTMMDBSRC)/compression -I$(DTMMDBSRC) $(EXCEPTIONS_INCLUDES)
LinkSourceFile(abs_agent.C,$(DTMMDBSRC)/compression)
LinkSourceFile(zip.C,$(DTMMDBSRC)/compression)
LinkSourceFile(huffman.C,$(DTMMDBSRC)/compression)
LinkSourceFile(trie.C,$(DTMMDBSRC)/compression)
LinkSourceFile(code.C,$(DTMMDBSRC)/compression)
LinkSourceFile(lzss.C,$(DTMMDBSRC)/compression)
NORMAL_SRCS = abs_agent.C zip.C huffman.C trie.C code.C lzss.C
LinkSourceFile(sgml.C,$(DTMMDBSRC)/compression)
LinkSourceFile(ps.C,$(DTMMDBSRC)/compression)
PARSER_SRCS = sgml.C ps.C
SRCS = $(NORMAL_SRCS) $(PARSER_SRCS)
OBJS = $(NORMAL_SRCS:.C=.o) $(PARSER_SRCS:.C=.o)
#include <Library.tmpl>
SubdirLibraryRule($(OBJS))
DependTarget()

View File

@@ -0,0 +1,40 @@
XCOMM $XConsortium: Imakefile /main/1 1996/08/21 15:59:19 drk $
XCOMM ** WARNING **
XCOMM
XCOMM The files named here may appear in many different Imakefiles.
XCOMM If you add or remove a file, be sure to update all locations.
XCOMM It's unfortunate, but all this redundancy serves a purpose.
XCOMM
XCOMM Other possible locations are:
XCOMM .../lib/DtMmdb/Imakefile
XCOMM .../lib/DtMmdb/<subdir>/Imakefile
XCOMM .../programs/dtinfo/mmdb/Imakefile
XCOMM .../programs/dtinfo/mmdb/<subdir>/Imakefile
#define DoNormalLib YES
#define DoSharedLib NO
#define DoDebugLib NO
#define DoProfileLib NO
#define LibName MMDB
#define LibHeaders NO
#define LibCreate NO
#define CplusplusSource YES
DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
DEFINES =
INCLUDES = -I$(DTMMDBSRC)/diskhash -I$(DTMMDBSRC) $(EXCEPTIONS_INCLUDES)
LinkSourceFile(disk_bucket.C,$(DTMMDBSRC)/diskhash)
LinkSourceFile(bucket_array.C,$(DTMMDBSRC)/diskhash)
LinkSourceFile(disk_hash.C,$(DTMMDBSRC)/diskhash)
SRCS = disk_bucket.C bucket_array.C disk_hash.C
OBJS = $(SRCS:.C=.o)
#include <Library.tmpl>
SubdirLibraryRule($(OBJS))
DependTarget()

View File

@@ -0,0 +1,53 @@
XCOMM $XConsortium: Imakefile /main/1 1996/08/21 15:59:22 drk $
XCOMM ** WARNING **
XCOMM
XCOMM The files named here may appear in many different Imakefiles.
XCOMM If you add or remove a file, be sure to update all locations.
XCOMM It's unfortunate, but all this redundancy serves a purpose.
XCOMM
XCOMM Other possible locations are:
XCOMM .../lib/DtMmdb/Imakefile
XCOMM .../lib/DtMmdb/<subdir>/Imakefile
XCOMM .../programs/dtinfo/mmdb/Imakefile
XCOMM .../programs/dtinfo/mmdb/<subdir>/Imakefile
#define DoNormalLib YES
#define DoSharedLib NO
#define DoDebugLib NO
#define DoProfileLib NO
#define LibName MMDB
#define LibHeaders NO
#define LibCreate NO
#define CplusplusSource YES
DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
DEFINES =
INCLUDES = -I$(DTMMDBSRC)/dstr -I$(DTMMDBSRC) $(EXCEPTIONS_INCLUDES)
LinkSourceFile(set.C,$(DTMMDBSRC)/dstr)
LinkSourceFile(bset.C,$(DTMMDBSRC)/dstr)
LinkSourceFile(slist.C,$(DTMMDBSRC)/dstr)
LinkSourceFile(dlist_cell.C,$(DTMMDBSRC)/dstr)
LinkSourceFile(dlist.C,$(DTMMDBSRC)/dstr)
LinkSourceFile(heap.C,$(DTMMDBSRC)/dstr)
LinkSourceFile(void_ptr_array.C,$(DTMMDBSRC)/dstr)
LinkSourceFile(void_ptr_stack.C,$(DTMMDBSRC)/dstr)
LinkSourceFile(memory_pool.C,$(DTMMDBSRC)/dstr)
LinkSourceFile(dstr_test.C,$(DTMMDBSRC)/dstr)
LinkSourceFile(index_agent.C,$(DTMMDBSRC)/dstr)
LinkSourceFile(token_stack.C,$(DTMMDBSRC)/dstr)
LinkSourceFile(slist_char_ptr_cell.C,$(DTMMDBSRC)/dstr)
SRCS = set.C bset.C slist.C dlist_cell.C dlist.C heap.C \
void_ptr_array.C void_ptr_stack.C \
memory_pool.C dstr_test.C \
index_agent.C token_stack.C slist_char_ptr_cell.C
OBJS = $(SRCS:.C=.o)
#include <Library.tmpl>
SubdirLibraryRule($(OBJS))
DependTarget()

View File

@@ -0,0 +1,62 @@
XCOMM $XConsortium: Imakefile /main/1 1996/08/21 15:59:27 drk $
XCOMM ** WARNING **
XCOMM
XCOMM The files named here may appear in many different Imakefiles.
XCOMM If you add or remove a file, be sure to update all locations.
XCOMM It's unfortunate, but all this redundancy serves a purpose.
XCOMM
XCOMM Other possible locations are:
XCOMM .../lib/DtMmdb/Imakefile
XCOMM .../lib/DtMmdb/<subdir>/Imakefile
XCOMM .../programs/dtinfo/mmdb/Imakefile
XCOMM .../programs/dtinfo/mmdb/<subdir>/Imakefile
#define DoNormalLib YES
#define DoSharedLib NO
#define DoDebugLib NO
#define DoProfileLib NO
#define LibName MMDB
#define LibHeaders NO
#define LibCreate NO
#define CplusplusSource YES
DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
DEFINES =
INCLUDES = -I$(DTMMDBSRC)/dti_cc $(EXCEPTIONS_INCLUDES) $(COMMON_CLASS_INCLUDES)
LinkSourceFile(CC_Listbase.C,$(DTMMDBSRC)/dti_cc)
LinkSourceFile(cc_exceptions.C,$(DTMMDBSRC)/dti_cc)
LinkSourceFile(CC_String.C,$(DTMMDBSRC)/dti_cc)
LinkSourceFile(CC_Tokenizer.C,$(DTMMDBSRC)/dti_cc)
LinkSourceFile(CC_Stack.C,$(DTMMDBSRC)/dti_cc)
LinkSourceFile(CC_Slist.C,$(DTMMDBSRC)/dti_cc)
SRCS = CC_Listbase.C cc_exceptions.C CC_String.C \
CC_Tokenizer.C CC_Stack.C CC_Slist.C
OBJS = $(SRCS:.C=.o)
#include <Library.tmpl>
SubdirLibraryRule($(OBJS))
DependTarget()
#ifdef TEST
TEST_OBJS = $(OBJS) \
../utility/mmdb_exception.o \
../utility/funcs.o \
../utility/atoi_fast.o \
../utility/pm_random.o \
../dti_excs/Jump_Environment.o \
../dti_excs/Exceptions.o \
../dti_excs/Exception.o \
../dti_excs/Destructable.o \
../dti_excs/terminate.o \
../dti_excs/centerline.o \
../misc/unique_id.o -lm
SpecialCPlusPlusObjectRule(CC_Template.o,,-ptf)
SimpleCPlusPlusProgram(tt, main.o CC_Template.o,$(TEST_OBJS))
#endif

View File

@@ -0,0 +1,268 @@
// $XConsortium: main.cc /main/3 1996/06/11 16:57:24 cde-hal $
#include <iostream.h>
#include "Exceptions.hh"
#include "cc_exceptions.h"
#include "CC_Slist.h"
#include "CC_Dlist.h"
#include "CC_String.h"
#include "CC_Tokenizer.h"
#include "CC_Stack.h"
CC_Boolean mytestfunc(int *a, void *b)
{
return(*a == 20);
}
#define TEST(tcond) \
cout << "Testing " << "(" << #tcond << ")\t"; \
if (tcond) { \
cout << "Test #" << TestNum << " passed\n"; \
TestPassed++; \
} \
else { \
cout << "Test #" << TestNum << " failed\n"; \
TestFailed++; \
} \
TestNum++;
main()
{
INIT_EXCEPTIONS();
try {
int TestNum = 1;
int TestPassed = 0;
int TestFailed = 0;
CC_TPtrSlist<int> slist;
int a =10;
int b =20;
int c =30;
// inserting 10, 20 , 30
slist.insert(&a);
slist.insert(&b);
slist.insert(&c);
// testing first
TEST(*slist.first() == 10);
TEST(*slist.at(0) == 10);
TEST(*slist.at(1) == 20);
TEST(*slist.at(2) == 30);
TEST(slist.entries() == 3);
int d =40;
slist.prepend(&d);
slist.append(&d);
TEST(*slist.first() == 40);
TEST(*slist.at(4) == 40);
TEST(*slist.removeAt(2) == 20);
TEST(*slist.at(2) == 30);
TEST(slist.find(&a) != NULL);
TEST(slist.find(&b) == NULL);
TEST(slist.contains(&a) == 1);
TEST(slist.contains(&b) == 0);
TEST(slist.remove(&b) == NULL);
TEST(*slist.remove(&a) == 10);
TEST(slist.remove(&a) == NULL);
TEST(*slist.remove(&d) == 40);
TEST(*slist.remove(&d) == 40);
TEST(slist.remove(&d) == NULL);
// Test slist copy constructor
CC_TPtrSlistIterator<int> slist_iter( slist );
CC_TPtrSlist<int> new_slist( slist );
CC_TPtrSlistIterator<int> new_slist_iter(new_slist);
TEST(slist.entries() == new_slist.entries());
for ( int w = 0; w < slist.entries(); w++ ) {
slist_iter();
new_slist_iter();
TEST(*slist_iter.key() == *new_slist_iter.key());
}
// empty list
CC_TPtrSlist<int> empty_list;
TEST(empty_list.remove(&d) == NULL) ;
TEST(empty_list.find(&d) == NULL);
TEST(empty_list.removeFirst() == NULL);
TEST(empty_list.removeLast() == NULL);
empty_list.clearAndDestroy();
CC_TPtrDlist<int> dlist;
dlist.append(&a);
dlist.append(&b);
dlist.append(&c);
TEST(*dlist.first() == 10 );
TEST(*dlist.at(1) == 20 );
TEST(*dlist.at(2) == 30);
TEST(*dlist.last() == 30);
dlist.prepend(&c);
TEST(*dlist.first() == 30);
dlist.insert(&b);
TEST(*dlist.last() == 20);
TEST(*dlist.removeFirst() == 30);
TEST(*dlist.removeLast() == 20);
TEST(*dlist.remove(&b) == 20);
TEST(*dlist.remove(&c) == 30);
dlist.insert(&b);
dlist.insert(&c);
CC_TPtrDlistIterator<int> dlist_iter(dlist);
CC_TPtrDlist<int> new_dlist(dlist);
CC_TPtrDlistIterator<int> new_dlist_iter(new_dlist);
// Compare the elements in the 2 lists
for ( int i = 0; i < dlist.entries(); i++ ) {
dlist_iter();
new_dlist_iter();
TEST(*dlist_iter.key() == *new_dlist_iter.key());
}
/* Traverse backward */
for ( int j = 0; j < dlist.entries(); j++ ) {
cout << *dlist_iter.key() << ", ";
--dlist_iter;
}
cout << endl;
dlist_iter += 2;
TEST(*dlist_iter.key() == 20);
TEST(*dlist.find(mytestfunc, NULL) == 20 );
// dlist.clearAndDestroy();
CC_String cstr("abc");
TEST(cstr.isNull() == FALSE);
TEST(cstr.length() == 3);
TEST(cstr.compareTo("abc") == 0);
TEST(cstr.compareTo("def") < 0 );
TEST(cstr.compareTo("ABC") != 0);
TEST(cstr.compareTo("ABC", CC_String::ignoreCase) == 0);
TEST(cstr.compareTo("ABC", CC_String::exact) != 0);
CC_String dstr("abc");
TEST(cstr.compareTo(dstr) == 0);
TEST(cstr.compareTo(dstr, CC_String::ignoreCase) == 0);
TEST(cstr.compareTo(dstr.data()) == 0);
TEST(cstr.compareTo("abcde") != 0 );
TEST(cstr.compareTo("abcde", CC_String::ignoreCase) != 0 );
CC_TValSlist<int> vlist;
vlist.append(a);
vlist.append(b);
vlist.append(c);
CC_TValSlistIterator<int> vlist_iter(vlist);
CC_TValSlist<int> new_vlist(vlist);
TEST(vlist.entries() == new_vlist.entries());
CC_TValSlistIterator<int> new_vlist_iter(new_vlist);
for ( int k = 0; k < vlist.entries(); k++ ) {
++vlist_iter;
++new_vlist_iter;
TEST(vlist_iter.key() == new_vlist_iter.key());
}
vlist_iter.reset();
cout << endl;
CC_String cc_str1("This is a pretty long string for testing");
CC_Tokenizer next1( cc_str1 );
while ( next1() ) {
cout << next1.data() << endl;
}
char str[128];
sprintf(str, "\t\nthis is \t another string\t\n");
CC_String cc_str2( (const char *)str);
CC_Tokenizer next2( cc_str2 );
while ( next2() ) {
cout << next2.data() << endl;
}
int *empty;
CC_TPtrDlist<int> tdlist;
// tdlist.insert(empty);
TEST(tdlist.removeFirst() == NULL);
TEST(tdlist.removeLast() == NULL);
tdlist.prepend(empty);
tdlist.insert(empty);
tdlist.removeFirst();
tdlist.removeLast();
TEST(tdlist.removeFirst() == NULL);
// TEST(0);
Stack<int> stack;
stack.push(2);
stack.push(3);
stack.push(4);
TEST(stack.top() == 4 );
TEST(stack.pop() == 4 );
TEST(stack.pop() == 3 );
TEST(stack.pop() == 2 );
stack.push(20);
TEST(stack.top() == 20);
TEST(stack.pop() == 20);
TEST(stack.empty());
cout << "test passed = " << TestPassed << endl;
cout << "test failed = " << TestFailed << endl;
try {
TEST(stack.top()); // This will throw exception
}
catch( Exception&, u)
{
cerr << "Exception generated by top() were caught\n";
}end_try;
try {
TEST(stack.pop());
}
catch( Exception&, u )
{
cerr << "Exception generated by pop() were caught\n";
exit(0);
}end_try;
}
catch(ccException&, u)
{
cerr << "ccException caught\n";
}
catch(Exception&, u)
{
cout << "Exception generated by pop() caught\n";
exit(1);
}end_try;
}

View File

@@ -0,0 +1,85 @@
XCOMM $TOG: Imakefile /main/3 1997/09/05 11:32:58 samborn $
XCOMM ** WARNING **
XCOMM
XCOMM The files named here may appear in many different Imakefiles.
XCOMM If you add or remove a file, be sure to update all locations.
XCOMM It's unfortunate, but all this redundancy serves a purpose.
XCOMM
XCOMM Other possible locations are:
XCOMM .../lib/DtMmdb/Imakefile
XCOMM .../lib/DtMmdb/<subdir>/Imakefile
XCOMM .../programs/dtinfo/mmdb/Imakefile
XCOMM .../programs/dtinfo/mmdb/<subdir>/Imakefile
#define DoNormalLib YES
#define DoSharedLib NO
#define DoDebugLib NO
#define DoProfileLib NO
#define LibName MMDB
#define LibHeaders NO
#define LibCreate NO
#define CplusplusSource YES
DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
#if defined(SunArchitecture) && CplusplusCompilerMajorVersion > 3
EXCEPTION_DEFINES = -DHAS_TERMINATE
#endif
DEFINES = -DCC_VERSION=30 -DCHECK_INITIALIZED $(EXCEPTION_DEFINES)
INCLUDES = -I$(DTMMDBSRC)/dti_excs
LinkSourceFile(Jump_Environment.C,$(DTMMDBSRC)/dti_excs)
LinkSourceFile(Exceptions.C,$(DTMMDBSRC)/dti_excs)
LinkSourceFile(Exception.C,$(DTMMDBSRC)/dti_excs)
LinkSourceFile(Destructable.C,$(DTMMDBSRC)/dti_excs)
LinkSourceFile(terminate.C,$(DTMMDBSRC)/dti_excs)
BASE_SRCS = \
Jump_Environment.C Exceptions.C Exception.C \
Destructable.C terminate.C
SRCS = $(BASE_SRCS)
OBJS = $(BASE_SRCS:.C=.o)
#include <Library.tmpl>
SubdirLibraryRule($(OBJS))
DependTarget()
#ifdef TEST
tests: $(TESTS)
CPlusPlusProgram(test0,test0.o,$(OBJS))
CPlusPlusProgram(test1,test1.o,$(OBJS))
CPlusPlusProgram(test2,test2.o,$(OBJS))
CPlusPlusProgram(test3,test3.o,$(OBJS))
CPlusPlusProgram(test4,test4.o,$(OBJS))
CPlusPlusProgram(test5,test5.o,$(OBJS))
CPlusPlusProgram(test6,test6.o,$(OBJS))
CPlusPlusProgram(test7,test7.o,$(OBJS))
CPlusPlusProgram(test8,test8.o,$(OBJS))
CPlusPlusProgram(test9,test9.o,$(OBJS))
CPlusPlusProgram(test10,test10.o,$(OBJS))
CPlusPlusProgram(test11,test11.o,$(OBJS))
CPlusPlusProgram(test12,test12.o,$(OBJS))
CPlusPlusProgram(test13,test13.o,$(OBJS))
CPlusPlusProgram(test14,test14.o,$(OBJS))
CPlusPlusProgram(test15,test15.o,$(OBJS))
CPlusPlusProgram(test16,test16.o,$(OBJS))
CPlusPlusProgram(test17,test17.o,$(OBJS))
CPlusPlusProgram(test18,test18.o,$(OBJS))
CPlusPlusProgram(test19,test19.o,$(OBJS))
CPlusPlusProgram(test20,test20.o,$(OBJS))
CPlusPlusProgram(test21,test21.o,$(OBJS))
CPlusPlusProgram(test22,test22.o,$(OBJS))
CPlusPlusProgram(test23,test23.o,$(OBJS))
CPlusPlusProgram(test24,test24.o,$(OBJS))
CPlusPlusProgram(test25,test25.o,$(OBJS))
CPlusPlusProgram(test26,test26.o,$(OBJS))
CPlusPlusProgram(test27,test27.o,$(OBJS))
CPlusPlusProgram(test28,test28.o,$(OBJS))
CPlusPlusProgram(test29,test29.o,$(OBJS))
#endif

View File

@@ -0,0 +1,19 @@
// $XConsortium: test0.cc /main/3 1996/06/11 16:52:21 cde-hal $
#include <stdio.h>
#include "Exceptions.hh"
int
main()
{
INIT_EXCEPTIONS();
try
{
puts ("Trying something");
}
catch (Exception &,e)
{
puts ("Caught an exception");
}
end_try;
}

View File

@@ -0,0 +1,38 @@
// $XConsortium: test1.C /main/4 1996/10/04 15:40:56 drk $
#include <stdio.h>
#include "Exceptions.hh"
int
main()
{
INIT_EXCEPTIONS();
#ifndef NATIVE_EXCEPTIONS
printf ("Unwind_Record size = %ld\n", (long)sizeof (Unwind_Record));
#endif
printf ("Exception size = %ld\n", (long)sizeof (Exception));
puts ("CODE Exception e");
Exception e;
// Test Destructable copy constructor.
puts ("CODE Exception b = e");
Exception b = e;
puts ("CODE Exception *z = new Exception()");
Exception *z = new Exception();
// Test Destructable assignment operator.
puts ("CODE Exception *z = b");
*z = b;
puts ("CODE delete z");
delete z;
try
{
puts ("Trying something");
throw (Exception());
}
catch (Exception &,e)
{
puts ("Caught an exception");
}
end_try;
}

View File

@@ -0,0 +1,60 @@
// $XConsortium: test10.cc /main/3 1996/06/11 16:52:32 cde-hal $
#include <stdio.h>
#include "Exceptions.hh"
#include <signal.h>
void
catch_abort (int, ...)
{
puts ("Abort (core not dumped)");
// Exit normally so Purify can report.
exit (1);
}
class foo : public Destructable
{
public:
foo (char *s);
~foo();
char *name;
};
foo::foo (char *s)
{
name = s;
printf ("constructing <%s>\n", name);
}
foo::~foo()
{
printf ("destructing <%s>\n", name);
}
int
main()
{
INIT_EXCEPTIONS();
puts ("Testing stack unwinding and illegal rethrow out of main.");
foo foo_main ("Main");
#ifdef MUST_EXIT
signal (SIGABRT, catch_abort);
#endif
try
{
foo foo_try ("Try");
throw (Exception());
}
catch (Exception &,e)
{
puts ("Caught exception.");
foo foo_catch ("Catch");
rethrow;
}
end_try;
}

View File

@@ -0,0 +1,50 @@
// $XConsortium: test11.cc /main/3 1996/06/11 16:52:38 cde-hal $
#include <stdio.h>
#include "Exceptions.hh"
#include <signal.h>
void
catch_abort (int, ...)
{
puts ("Abort (core not dumped)");
// Exit normally so Purify can report.
exit (1);
}
void
do_something()
{
try
{
throw (Exception());
}
catch (Exception &,e)
{
puts ("Caught in do_something, rethrowing.");
rethrow;
}
end_try;
}
int
main()
{
INIT_EXCEPTIONS();
puts ("Testing mult-depth rethrow.");
#ifdef MUST_EXIT
signal (SIGABRT, catch_abort);
#endif
try
{
do_something();
}
catch (Exception &,e)
{
puts ("Caught exception back in main.");
}
end_try;
}

View File

@@ -0,0 +1,72 @@
// $XConsortium: test12.cc /main/3 1996/06/11 16:52:43 cde-hal $
#include <stdio.h>
#include "Exceptions.hh"
#include <signal.h>
void
catch_abort (int, ...)
{
puts ("Abort (core not dumped)");
// Exit normally so Purify can report.
exit (1);
}
class ErrorString : public Exception
{
public:
DECLARE_EXCEPTION (ErrorString, Exception);
ErrorString (char *s)
{ msg = s; }
char *msg;
};
void
do_something()
{
try
{
throw (ErrorString ("<error message from do_something>"));
}
// Catch the more general exception first -- a definite mistake.
catch (Exception &,e)
{
puts ("Caught in do_something, rethrowing.");
rethrow;
}
catch (ErrorString &,e)
{
puts ("This will never be printed.");
}
end_try;
}
int
main()
{
INIT_EXCEPTIONS();
puts ("Testing mult-depth throws of different exceptions.");
#ifdef MUST_EXIT
signal (SIGABRT, catch_abort);
#endif
try
{
do_something();
}
// Do it right in this section.
catch (ErrorString &,e)
{
puts ("Caught exception back in main.");
puts (e.msg);
}
catch (Exception &,e)
{
puts ("This will never be printed.");
}
end_try;
}

View File

@@ -0,0 +1,92 @@
// $XConsortium: test13.C /main/5 1996/10/04 15:39:41 drk $
#include <stdio.h>
#include "Exceptions.hh"
#include <signal.h>
void
catch_abort (int, ...)
{
puts ("Abort (core not dumped)");
// Exit normally so Purify can report.
exit (1);
}
class StackFixer
{
public:
StackFixer()
{ printf ("I'm at address %p\n", this); }
};
class SomeClass : public Destructable
{
public:
SomeClass()
{ puts ("Constructing SomeClass"); }
~SomeClass()
{ puts ("Destructing SomeClass"); }
};
class SomeOtherClass : public Destructable
{
public:
SomeClass some_class;
SomeOtherClass()
{ puts ("Constructing SomeOtherClass"); }
~SomeOtherClass()
{ puts ("Destructing SomeOtherClass"); }
};
class ErrorString : public Exception
{
public:
DECLARE_EXCEPTION (ErrorString, Exception);
ErrorString (char *s)
{ msg = s; }
char *msg;
};
void
do_something()
{
SomeOtherClass some_other_class;
// SomeClass some_class;
throw (ErrorString ("Tossed my cookies in do_something"));
}
int
main()
{
INIT_EXCEPTIONS();
puts ("Testing cleanup of nested destructable objects.");
#ifdef MUST_EXIT
signal (SIGABRT, catch_abort);
#endif
try
{
do_something();
}
// Do it right in this section.
catch (ErrorString &,e)
{
puts ("Caught exception back in main.");
puts (e.msg);
}
catch (Exception &,e)
{
puts ("This will never be printed.");
}
end_try;
}

View File

@@ -0,0 +1,99 @@
// $XConsortium: test14.cc /main/3 1996/06/11 16:52:54 cde-hal $
#include <stdio.h>
#include "Exceptions.hh"
#include <signal.h>
void
catch_abort (int, ...)
{
puts ("Abort (core not dumped)");
// Exit normally so Purify can report.
exit (1);
}
class BaseClass : public Destructable
{
public:
BaseClass()
{ puts ("Constructing BaseClass"); }
~BaseClass()
{ puts ("Destructing BaseClass"); }
};
class BaseClass2 : public Destructable
{
public:
BaseClass2()
{ puts ("Constructing BaseClass2"); }
~BaseClass2()
{ puts ("Destructing BaseClass2"); }
};
class DerivedClass : public BaseClass
{
public:
DerivedClass()
{ puts ("Constructing DerivedClass"); }
~DerivedClass()
{ puts ("Destructing DerivedClass"); }
};
class DerivedClass2 : public BaseClass, public BaseClass2
{
public:
DerivedClass2()
{ puts ("Constructing DerivedClass2"); }
~DerivedClass2()
{ puts ("Destructing DerivedClass2"); }
};
class ErrorString : public Exception
{
public:
DECLARE_EXCEPTION (ErrorString, Exception);
ErrorString (char *s)
{ msg = s; }
char *msg;
};
void
do_something()
{
DerivedClass derived_class;
DerivedClass2 derived_class2;
throw (ErrorString ("Tossed my cookies in do_something"));
}
int
main()
{
INIT_EXCEPTIONS();
puts ("Testing destruction with single and multiple inheritance.");
#ifdef MUST_EXIT
signal (SIGABRT, catch_abort);
#endif
try
{
do_something();
}
// Do it right in this section.
catch (ErrorString &,e)
{
puts ("Caught exception back in main.");
puts (e.msg);
}
catch (Exception &,e)
{
puts ("This will never be printed.");
}
end_try;
}

View File

@@ -0,0 +1,97 @@
// $XConsortium: test15.C /main/4 1996/08/21 15:48:27 drk $
#include <stdio.h>
#include "Exceptions.hh"
#include <signal.h>
/* This test contains a throw in a constructor which is officially not
supported by the exceptions library. Throws in the constructor will
tend to work when the object that throws is not the last destructable
object in another destructable because the destructors of later
destructable members will be called. See test18.C.
17:50 22-May-93 DJB
*/
void
catch_abort (int, ...)
{
puts ("Abort (core not dumped)");
// Exit normally so Purify can report.
exit (1);
}
static int serial;
class SomeClass : public Destructable
{
public:
int id;
SomeClass()
{ id = serial++; printf ("Constructing SomeClass %d\n", id); }
~SomeClass()
{ printf ("Destructing SomeClass %d\n", id); }
};
class SomeOtherClass : public Destructable
{
public:
SomeClass some_class;
int id;
SomeOtherClass()
{ id = serial++;
throw (Exception());
printf ("Constructing SomeOtherClass %d\n", id); }
~SomeOtherClass()
{ printf ("Destructing SomeOtherClass %d\n", id); }
};
class ErrorString : public Exception
{
public:
DECLARE_EXCEPTION (ErrorString, Exception);
ErrorString (char *s)
{ msg = s; }
char *msg;
};
void
do_something()
{
SomeOtherClass some_other_class;
throw (ErrorString ("Tossed my cookies in do_something"));
}
int
main()
{
INIT_EXCEPTIONS();
puts ("Testing descruction of object members.");
#ifdef MUST_EXIT
signal (SIGABRT, catch_abort);
#endif
try
{
do_something();
}
// Do it right in this section.
catch (ErrorString &,e)
{
puts ("Caught exception back in main.");
puts (e.msg);
}
catch (Exception &,e)
{
puts ("This will be printed.");
}
end_try;
}

View File

@@ -0,0 +1,95 @@
// $XConsortium: test16.cc /main/3 1996/06/11 16:53:06 cde-hal $
#include <stdio.h>
#include "Exceptions.hh"
#include <signal.h>
void
catch_abort (int, ...)
{
puts ("Abort (core not dumped)");
// Exit normally so Purify can report.
exit (1);
}
static int serial;
class AClass : public Destructable
{
public:
int id;
AClass()
{ id = serial++; printf ("Constructing AClass %d\n", id); }
~AClass()
{ printf ("Destructing AClass %d\n", id); }
};
class AnotherClass : public Destructable
{
public:
int id;
AnotherClass()
{ id = serial++; printf ("Constructing AnotherClass %d\n", id); }
~AnotherClass()
{ printf ("Destructing AnotherClass %d\n", id); }
};
class SomeOtherClass : public AClass, public AnotherClass
{
public:
int id;
SomeOtherClass()
{ id = serial++; printf ("Constructing SomeOtherClass %d\n", id); }
~SomeOtherClass()
{ printf ("Destructing SomeOtherClass %d\n", id); }
};
class ErrorString : public Exception
{
public:
DECLARE_EXCEPTION (ErrorString, Exception);
ErrorString (char *s)
{ msg = s; }
char *msg;
};
void
do_something()
{
SomeOtherClass some_other_class;
// SomeClass some_class;
throw (ErrorString ("Tossed my cookies in do_something"));
}
int
main()
{
INIT_EXCEPTIONS();
puts ("Testing clean up of non-virtual multiply inherited destructable.");
#ifdef MUST_EXIT
signal (SIGABRT, catch_abort);
#endif
try
{
do_something();
}
// Do it right in this section.
catch (ErrorString &,e)
{
puts ("Caught exception back in main.");
puts (e.msg);
}
catch (Exception &,e)
{
puts ("This will never be printed.");
}
end_try;
}

View File

@@ -0,0 +1,105 @@
// $XConsortium: test17.C /main/5 1996/09/27 19:03:16 drk $
#include <stdio.h>
#include "Exceptions.hh"
#include <signal.h>
/* Throwing from constructor is not supported. See test18.C. */
void
catch_abort (int, ...)
{
puts ("Abort (core not dumped)");
// Exit normally so Purify can report.
exit (1);
}
class MemberClass : public Destructable
{
public:
char *name;
MemberClass (char *s)
: name(s)
{ printf ("Constructing MemberClass `%s' @ 0x%p\n", name, this);
throw (Exception()); }
~MemberClass()
{ printf ("Destructing MemberClass\n", name); }
};
class BaseClass : public Destructable
{
public:
MemberClass m1;
BaseClass()
: m1("m1")
{
puts ("Constructing BaseClass");
throw (Exception());
}
~BaseClass()
{ puts ("Destructing BaseClass"); }
};
class DerivedClass : public BaseClass
{
public:
MemberClass m3;
DerivedClass()
: m3("m3")
{ puts ("Constructing DerivedClass"); }
~DerivedClass()
{ puts ("Destructing DerivedClass"); }
};
class ErrorString : public Exception
{
public:
DECLARE_EXCEPTION (ErrorString, Exception);
ErrorString (char *s)
{ msg = s; }
char *msg;
};
void
do_something()
{
printf ("Calling do_something()\n");
DerivedClass derived_class;
throw (ErrorString ("Tossed my cookies in do_something"));
}
int
main()
{
INIT_EXCEPTIONS();
printf ("Sizeof Destructable = %d\n", (int)sizeof (Destructable));
puts ("Testing destructor calling sequence during throw.");
#ifdef MUST_EXIT
signal (SIGABRT, catch_abort);
#endif
try
{
do_something();
}
// Do it right in this section.
catch (ErrorString &,e)
{
puts ("Caught exception back in main.");
puts (e.msg);
}
catch (Exception &,e)
{
puts ("Caught a vanilla exception.");
}
end_try;
}

View File

@@ -0,0 +1,129 @@
// $XConsortium: test18.C /main/4 1996/09/27 19:03:20 drk $
#include <stdio.h>
#include "Exceptions.hh"
#include <signal.h>
/*
This test case illustrates a problem that isn't handled by the current
exceptions library. BaseClass contains two Destructable members whose
constructor throws an exception. When this happens, the exceptions
library calls the destructors of all members, constructed or not. This
means that the Destructable destructor of m2 is called even though it
wasn't constructed. This is probably just dumb luck, because nothing
says that the virtual table of m2 should already have the pointer to
the destructor filled in. For some reason it does. It seems like the
compiler should be smarter about this and maybe not call it, but we're
kind of stuck.
One way to handle this would be to remember all Destructable objects
that are constructed on the Jump_Environment stack, but only destroy
those that don't have the f_registered (or f_destroy) flag set. Then
we can tell if an object has been constructed by comparing it's address
to the object on the top of the stack. Actually, we'd need two separate
stacks because with one stack the members would have been removed before
we get to the object that contains them. We're not going to implement
this because throwing an exception from a constructor is too dangerous
with the current language language definition anyhow.
16:56 22-May-93 DJB
*/
void
catch_abort (int, ...)
{
puts ("Abort (core not dumped)");
// Exit normally so Purify can report.
exit (1);
}
class MemberClass : public Destructable
{
public:
char *name;
MemberClass (char *s)
: name(s)
{ printf ("Constructing MemberClass `%s' @ 0x%p\n", name, this);
throw (Exception()); }
~MemberClass()
{ printf ("Destructing MemberClass\n", name); }
};
class BaseClass : public Destructable
{
public:
MemberClass m1, m2;
BaseClass()
: m1("m1"), m2("m2")
{
puts ("Constructing BaseClass");
throw (Exception());
}
~BaseClass()
{ puts ("Destructing BaseClass"); }
};
class DerivedClass : public BaseClass
{
public:
MemberClass m3;
DerivedClass()
: m3("m3")
{ puts ("Constructing DerivedClass"); }
~DerivedClass()
{ puts ("Destructing DerivedClass"); }
};
class ErrorString : public Exception
{
public:
DECLARE_EXCEPTION (ErrorString, Exception);
ErrorString (char *s)
{ msg = s; }
char *msg;
};
void
do_something()
{
printf ("Calling do_something()\n");
DerivedClass derived_class;
throw (ErrorString ("Tossed my cookies in do_something"));
}
int
main()
{
INIT_EXCEPTIONS();
printf ("Sizeof Destructable = %d\n", (int)sizeof (Destructable));
puts ("Test of throw from multiple member constructor.");
#ifdef MUST_EXIT
signal (SIGABRT, catch_abort);
#endif
try
{
do_something();
}
// Do it right in this section.
catch (ErrorString &,e)
{
puts ("Caught exception back in main.");
puts (e.msg);
}
catch (Exception &,e)
{
puts ("Caught a vanilla exception.");
}
end_try;
}

View File

@@ -0,0 +1,47 @@
// $XConsortium: test19.cc /main/3 1996/06/11 16:53:23 cde-hal $
#include <stdio.h>
#include "Exceptions.hh"
void
catch_abort (int, ...)
{
puts ("Abort (core not dumped)");
// Exit normally so Purify can report.
exit (1);
}
class BigException : public Exception
{
public:
DECLARE_EXCEPTION (BigException, Exception);
BigException() { }
int waste_space[300];
};
int
main()
{
INIT_EXCEPTIONS();
#ifdef MUST_EXIT
signal (SIGABRT, catch_abort);
#endif
printf ("Sucking up a lot of memory to test internal allocator.\n");
try
{
// Should run out of memory trying to allocate this one.
throw (BigException());
}
catch (Exception &,e)
{
puts ("Caught an exception reference");
}
catch (Exception *,e)
{
puts ("Caught an exception pointer");
}
end_try;
}

View File

@@ -0,0 +1,30 @@
// $XConsortium: test2.cc /main/3 1996/06/11 16:53:29 cde-hal $
#include <stdio.h>
#include "Exceptions.hh"
#include <signal.h>
void
catch_abort (int, ...)
{
puts ("Abort (core not dumped)");
// Exit normally so Purify can report.
exit (0);
}
int
main()
{
INIT_EXCEPTIONS();
#ifdef MUST_EXIT
signal (SIGABRT, catch_abort);
#endif
try
{
puts ("Trying something");
throw (Exception());
}
end_try;
}

View File

@@ -0,0 +1,25 @@
// $XConsortium: test20.cc /main/3 1996/06/11 16:53:34 cde-hal $
#include <stdio.h>
#include "Exceptions.hh"
int
main()
{
INIT_EXCEPTIONS();
printf ("Throw of new'ed exception.\n");
Exception *z = new Exception();
try
{
puts ("Trying something");
throw ((*z));
}
catch (Exception &,e)
{
puts ("Caught an exception");
}
end_try;
delete z;
}

View File

@@ -0,0 +1,67 @@
// $XConsortium: test21.cc /main/3 1996/06/11 16:53:41 cde-hal $
#include <stdio.h>
#include "Exceptions.hh"
#include <signal.h>
void
catch_abort (int, ...)
{
puts ("Abort (core not dumped)");
// Exit normally so Purify can report.
exit (1);
}
class ErrorString : public Exception
{
public:
DECLARE_EXCEPTION (ErrorString, Exception);
ErrorString (char *s)
{ msg = s; }
char *msg;
};
void
do_something()
{
try
{
throw (ErrorString ("<error message from do_something>"));
}
catch (ErrorString &,e)
{
puts ("Caught ErrorString exception.");
throw (Exception());
}
end_try;
}
int
main()
{
INIT_EXCEPTIONS();
puts ("Testing mult-depth throws of different exceptions.");
#ifdef MUST_EXIT
signal (SIGABRT, catch_abort);
#endif
try
{
do_something();
}
// Do it right in this section.
catch (ErrorString &,e)
{
puts ("This is not printed.");
puts (e.msg);
}
catch (Exception &,e)
{
puts ("This will be printed.");
}
end_try;
}

View File

@@ -0,0 +1,44 @@
// $XConsortium: test22.cc /main/3 1996/06/11 16:53:47 cde-hal $
#include <stdio.h>
#include "Exceptions.hh"
#include <signal.h>
#include <string.h>
void
catch_abort(int, ...)
{
puts ("Abort (core not dumped)");
// Exit normally so Purify can report.
exit (1);
}
// Test of throw in error handler.
void
error_handler (const char *[], int)
{
puts ("Throwing an exception from the error handler.");
throw (Exception());
}
int
main()
{
INIT_EXCEPTIONS();
puts ("Testing throw from error handler.");
#ifdef MUST_EXIT
signal (SIGABRT, catch_abort);
#endif
Exceptions::set_error_handler (error_handler);
try
{
puts ("Trying something");
throw (Exception());
}
end_try;
}

View File

@@ -0,0 +1,51 @@
// $XConsortium: test23.cc /main/3 1996/06/11 16:53:52 cde-hal $
#include <stdio.h>
#include "Exceptions.hh"
#include <signal.h>
#include <string.h>
void
catch_abort(int, ...)
{
puts ("Abort (core not dumped)");
// Exit normally so Purify can report.
exit (1);
}
// Test of throw in error handler.
void
error_handler (const char *[], int)
{
puts ("Throwing an exception from the error handler.");
throw (Exception());
}
void terminator()
{
puts ("I'll be back!");
throw (Exception());
}
int
main()
{
INIT_EXCEPTIONS();
puts ("Testing throw from error handler AND terminate.");
#ifdef MUST_EXIT
signal (SIGABRT, catch_abort);
#endif
Exceptions::set_error_handler (error_handler);
set_terminate (terminator);
try
{
puts ("Trying something");
throw (Exception());
}
end_try;
}

View File

@@ -0,0 +1,33 @@
// $XConsortium: test24.cc /main/3 1996/06/11 16:53:58 cde-hal $
#include <stdio.h>
#include "Exceptions.hh"
#include <signal.h>
void
catch_abort(int, ...)
{
puts ("Abort (core not dumped)");
// Exit normally so Purify can report.
exit (1);
}
int
main()
{
puts ("Test of something without initialize.");
// INIT_EXCEPTIONS();
#ifdef MUST_EXIT
signal (SIGABRT, catch_abort);
#endif
try
{
puts ("Trying something");
}
catch (Exception &,e)
{
puts ("Caught an exception");
}
end_try;
}

View File

@@ -0,0 +1,51 @@
// $XConsortium: test25.cc /main/3 1996/06/11 16:54:03 cde-hal $
#include <stdio.h>
#include "Exceptions.hh"
#include <signal.h>
#include <string.h>
void
catch_abort(int, ...)
{
puts ("Abort (core not dumped)");
// Exit normally so Purify can report.
exit (1);
}
// Test of throw in error handler.
void
error_handler (const char *[], int)
{
puts ("Got into the error handler OK.");
throw (Exception());
}
void terminator()
{
puts ("I'll be back!");
throw (Exception());
}
int
main()
{
// INIT_EXCEPTIONS();
puts ("Test of error handler with no INIT.");
#ifdef MUST_EXIT
signal (SIGABRT, catch_abort);
#endif
Exceptions::set_error_handler (error_handler);
set_terminate (terminator);
try
{
puts ("Trying something");
throw (Exception());
}
end_try;
}

View File

@@ -0,0 +1,58 @@
// $XConsortium: test26.cc /main/3 1996/06/11 16:54:09 cde-hal $
#include <stdio.h>
#include "Exceptions.hh"
#include <signal.h>
void
catch_abort (int, ...)
{
puts ("Abort (core not dumped)");
// Exit normally so Purify can report.
exit (1);
}
class foo : public Destructable
{
public:
~foo() { puts ("Destructing foo."); }
};
void
cleanup()
{
try
{
throw (Exception());
}
catch_any()
{
puts ("clean up caught");
}
end_try;
}
int
main()
{
INIT_EXCEPTIONS();
#ifdef MUST_EXIT
signal (SIGABRT, catch_abort);
#endif
puts ("Testing nested try in catch.");
try
{
foo bar;
throw (Exception());
}
catch (Exception &,e)
{
puts ("Cleaning up");
cleanup();
}
end_try;
}

View File

@@ -0,0 +1,49 @@
// $XConsortium: test27.C /main/4 1996/09/27 19:03:26 drk $
#include <stdio.h>
#include "Exceptions.hh"
#include <signal.h>
void
catch_abort (int, ...)
{
puts ("Abort (core not dumped)");
// Exit normally so Purify can report.
exit (1);
}
class foo : virtual public Destructable
{
public:
foo();
~foo() { puts ("Destructing foo."); }
};
foo::foo()
{
printf ("Construct foo @ 0x%p\n", this);
}
int
main()
{
INIT_EXCEPTIONS();
#ifdef MUST_EXIT
signal (SIGABRT, catch_abort);
#endif
puts ("Testing virtual inheritance of Destructable.");
try
{
foo bar;
throw (Exception());
}
catch (Exception &,e)
{
puts ("Got it.");
}
end_try;
}

View File

@@ -0,0 +1,82 @@
// $XConsortium: test28.cc /main/3 1996/06/11 16:54:19 cde-hal $
#include <stdio.h>
#include "Exceptions.hh"
#include <signal.h>
void
catch_abort (int, ...)
{
puts ("Abort (core not dumped)");
// Exit normally so Purify can report.
exit (1);
}
class ErrorString : public Exception
{
public:
DECLARE_EXCEPTION (ErrorString, Exception);
ErrorString (char *s)
{ msg = s; }
char *msg;
};
class BogusError : public ErrorString
{
public:
DECLARE_EXCEPTION (BogusError, ErrorString);
BogusError (char *msg, int b)
: ErrorString (msg), bogusity (b)
{ }
int bogusity;
};
void
do_something()
{
try
{
throw (ErrorString ("<error message from do_something>"));
}
// Catch the more general exception first -- a definite mistake.
catch (Exception &,e)
{
puts ("Caught in do_something, rethrowing.");
rethrow;
}
catch (ErrorString &,e)
{
puts ("This will never be printed.");
}
end_try;
}
int
main()
{
INIT_EXCEPTIONS();
puts ("Testing mult-depth throws of different exceptions.");
#ifdef MUST_EXIT
signal (SIGABRT, catch_abort);
#endif
try
{
do_something();
}
// Do it right in this section.
catch (ErrorString &,e)
{
puts ("Caught exception back in main.");
puts (e.msg);
}
catch (Exception &,e)
{
puts ("This will never be printed.");
}
end_try;
}

View File

@@ -0,0 +1,88 @@
// $XConsortium: test29.cc /main/4 1996/08/08 19:55:36 cde-hal $
#include <stdio.h>
#include "Exceptions.hh"
#include <signal.h>
void
catch_abort (int, ...)
{
puts ("Abort (core not dumped)");
// Exit normally so Purify can report.
exit (1);
}
class ErrorString : public Exception
{
public:
DECLARE_EXCEPTION (ErrorString, Exception);
virtual void name()
{ puts ("ErrorString"); }
ErrorString (char *s)
{ msg = s; }
char *msg;
};
class ErrorThing : public ErrorString
{
public:
DECLARE_EXCEPTION (ErrorThing,ErrorString);
ErrorThing (char *s)
: ErrorString (s) { }
virtual void name()
{ puts ("ErrorThing"); }
};
void
do_something()
{
try
{
throw (ErrorThing ("<error message from do_something>"));
}
// Catch the more general exception first -- a definite mistake.
catch (Exception &,e)
{
puts ("Caught in do_something, rethrowing.");
rethrow;
}
catch (ErrorString &,e)
{
puts ("This will never be printed.");
}
end_try;
}
int
main()
{
puts ("Testing mult-depth throws of different exceptions.");
INIT_EXCEPTIONS();
#ifdef MUST_EXIT
signal (SIGABRT, catch_abort);
#endif
try
{
do_something();
}
// Do it right in this section.
catch (ErrorString &,e)
{
puts ("Caught exception back in main.");
e.name();
puts (e.msg);
}
catch (Exception &,e)
{
puts ("This will never be printed.");
}
end_try;
}

View File

@@ -0,0 +1,48 @@
// $XConsortium: test3.cc /main/3 1996/06/11 16:54:31 cde-hal $
#define DEBUG_THROW
#define DEBUG_CATCH
#include <stdio.h>
#include "Exceptions.hh"
int
main()
{
INIT_EXCEPTIONS();
int retry = 3;
puts ("Testing throw and catch debugging.");
while (retry)
{
try
{
switch (retry--)
{
case 3:
puts ("Throwing exception object");
throw (Exception());
case 2:
{
Exception e;
Exception *ep = &e;
puts ("Throwing exception pointer");
// NOTE: This isn't normally a good idea, since ep
// points to a stack based value.
throw (ep);
}
case 1:
puts ("Not throwing a damn thing.");
}
}
catch (Exception &,e)
{
puts ("Caught an exception reference");
}
catch (Exception *,e)
{
puts ("Caught an exception pointer");
}
end_try;
}
}

View File

@@ -0,0 +1,45 @@
// $XConsortium: test4.cc /main/3 1996/06/11 16:54:36 cde-hal $
#include <stdio.h>
#include "Exceptions.hh"
int
main()
{
INIT_EXCEPTIONS();
int retry = 10000;
printf ("Executing %d iterations of the try loop.\n", retry);
while (retry)
{
// printf ("Iter = %d\n", retry);
try
{
switch (retry-- % 3)
{
case 2:
// puts ("Throwing exception object");
throw (Exception());
case 1:
{
Exception e;
Exception *ep = &e;
// puts ("Throwing exception pointer");
throw (ep);
}
// case 0:
// puts ("Not throwing a damn thing.");
}
}
catch (Exception &,e)
{
// puts ("Caught an exception reference");
}
catch (Exception *,e)
{
// puts ("Caught an exception pointer");
}
end_try;
}
}

View File

@@ -0,0 +1,38 @@
// $XConsortium: test5.cc /main/3 1996/06/11 16:54:41 cde-hal $
#include <stdio.h>
#include "Exceptions.hh"
#include <signal.h>
void
catch_abort (int, ...)
{
puts ("Abort (core not dumped)");
// Exit normally so Purify can report.
exit (1);
}
void
terminate_handler()
{
throw (Exception());
}
int
main()
{
INIT_EXCEPTIONS();
#ifdef MUST_EXIT
signal (SIGABRT, catch_abort);
#endif
set_terminate (terminate_handler);
try
{
puts ("Trying something");
throw (Exception());
}
end_try;
}

View File

@@ -0,0 +1,74 @@
// $XConsortium: test6.cc /main/3 1996/06/11 16:54:47 cde-hal $
#include <stdio.h>
#include "Exceptions.hh"
#include <signal.h>
#include <string.h>
void
catch_abort(int, ...)
{
puts ("Abort (core not dumped)");
// Exit normally so Purify can report.
exit (1);
}
// Test function to print the error in a cool box.
void
error_handler (const char *line[], int nlines)
{
int i, n, maxlen = 0;
static char border[100];
for (i = 0; i < nlines; i++)
if (strlen (line[i]) > maxlen)
maxlen = strlen (line[i]);
maxlen += 6;
border[0] = border[maxlen-1] = '+';
border[maxlen] = '\n';
border[maxlen+1] = '\0';
for (i = 1; i < maxlen - 1; i++)
border[i] = '-';
fputs (border, stderr);
border[0] = border[maxlen-1] = '|';
for (n = 0; n < nlines; n++)
{
for (i = 1; i < maxlen - 1; i++)
border[i] = ' ';
for (i = 0; i < strlen (line[n]); i++)
border[i+3] = line[n][i];
fputs (border, stderr);
}
for (i = 1; i < maxlen - 1; i++)
border[i] = '-';
border[0] = border[maxlen-1] = '+';
fputs (border, stderr);
}
int
main()
{
INIT_EXCEPTIONS();
puts ("Testing the custom error handler functionality.");
#ifdef MUST_EXIT
signal (SIGABRT, catch_abort);
#endif
Exceptions::set_error_handler (error_handler);
try
{
puts ("Trying something");
throw (Exception());
}
end_try;
}

View File

@@ -0,0 +1,25 @@
// $XConsortium: test7.cc /main/3 1996/06/11 16:54:53 cde-hal $
#include <stdio.h>
#include "Exceptions.hh"
#include <signal.h>
void
catch_abort (int, ...)
{
puts ("Abort (core not dumped)");
// Exit normally so Purify can report.
exit (1);
}
int
main()
{
INIT_EXCEPTIONS();
#ifdef MUST_EXIT
signal (SIGABRT, catch_abort);
#endif
puts ("Throw with no exception...");
rethrow;
}

View File

@@ -0,0 +1,31 @@
// $XConsortium: test8.cc /main/3 1996/06/11 16:54:58 cde-hal $
#include <stdio.h>
#include "Exceptions.hh"
#include <signal.h>
void
catch_abort (int, ...)
{
puts ("Abort (core not dumped)");
// Exit normally so Purify can report.
exit (1);
}
int
main()
{
INIT_EXCEPTIONS();
#ifdef MUST_EXIT
signal (SIGABRT, catch_abort);
#endif
puts ("Testing catch with no try.");
if (0) {
// remember that catch expands to an "else if"
catch (Exception &,e)
{
puts ("The should never be printed");
}
}
}

View File

@@ -0,0 +1,49 @@
// $XConsortium: test9.cc /main/3 1996/06/11 16:55:04 cde-hal $
#include <stdio.h>
#include "Exceptions.hh"
#include <signal.h>
void
catch_abort (int, ...)
{
puts ("Abort (core not dumped)");
// Exit normally so Purify can report.
exit (1);
}
class foo : public Destructable
{
public:
~foo();
};
foo::~foo()
{
puts ("Called foo destructor.");
throw (Exception());
}
int
main()
{
INIT_EXCEPTIONS();
#ifdef MUST_EXIT
signal (SIGABRT, catch_abort);
#endif
puts ("Testing illegal throw from destructor.");
try
{
foo bar;
throw (Exception());
}
catch (Exception &,e)
{
puts ("This should never be printed.");
}
end_try;
}

View File

@@ -0,0 +1,40 @@
XCOMM $XConsortium: Imakefile /main/1 1996/08/21 15:59:38 drk $
XCOMM ** WARNING **
XCOMM
XCOMM The files named here may appear in many different Imakefiles.
XCOMM If you add or remove a file, be sure to update all locations.
XCOMM It's unfortunate, but all this redundancy serves a purpose.
XCOMM
XCOMM Other possible locations are:
XCOMM .../lib/DtMmdb/Imakefile
XCOMM .../lib/DtMmdb/<subdir>/Imakefile
XCOMM .../programs/dtinfo/mmdb/Imakefile
XCOMM .../programs/dtinfo/mmdb/<subdir>/Imakefile
#define DoNormalLib YES
#define DoSharedLib NO
#define DoDebugLib NO
#define DoProfileLib NO
#define LibName MMDB
#define LibHeaders NO
#define LibCreate NO
#define CplusplusSource YES
DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
DEFINES =
INCLUDES = -I$(DTMMDBSRC)/dynhash -I$(DTMMDBSRC) $(EXCEPTIONS_INCLUDES)
LinkSourceFile(data_t.C,$(DTMMDBSRC)/dynhash)
LinkSourceFile(imp_bucket.C,$(DTMMDBSRC)/dynhash)
LinkSourceFile(imp_die.C,$(DTMMDBSRC)/dynhash)
SRCS = data_t.C imp_bucket.C imp_die.C
OBJS = $(SRCS:.C=.o)
#include <Library.tmpl>
SubdirLibraryRule($(OBJS))
DependTarget()

View File

@@ -0,0 +1,44 @@
XCOMM $XConsortium: Imakefile /main/1 1996/08/21 15:59:42 drk $
XCOMM ** WARNING **
XCOMM
XCOMM The files named here may appear in many different Imakefiles.
XCOMM If you add or remove a file, be sure to update all locations.
XCOMM It's unfortunate, but all this redundancy serves a purpose.
XCOMM
XCOMM Other possible locations are:
XCOMM .../lib/DtMmdb/Imakefile
XCOMM .../lib/DtMmdb/<subdir>/Imakefile
XCOMM .../programs/dtinfo/mmdb/Imakefile
XCOMM .../programs/dtinfo/mmdb/<subdir>/Imakefile
#define DoNormalLib YES
#define DoSharedLib NO
#define DoDebugLib NO
#define DoProfileLib NO
#define LibName MMDB
#define LibHeaders NO
#define LibCreate NO
#define CplusplusSource YES
DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
DEFINES = -DPORTABLE_DB
INCLUDES = -I$(DTMMDBSRC)/hmphf -I$(DTMMDBSRC) $(EXCEPTIONS_INCLUDES)
LinkSourceFile(buckets.C,$(DTMMDBSRC)/hmphf)
LinkSourceFile(mphf_funcs.C,$(DTMMDBSRC)/hmphf)
LinkSourceFile(mphf_hash_table.C,$(DTMMDBSRC)/hmphf)
LinkSourceFile(params.C,$(DTMMDBSRC)/hmphf)
LinkSourceFile(pattern.C,$(DTMMDBSRC)/hmphf)
LinkSourceFile(sorter.C,$(DTMMDBSRC)/hmphf)
SRCS = buckets.C mphf_funcs.C mphf_hash_table.C \
params.C pattern.C sorter.C
OBJS = $(SRCS:.C=.o)
#include <Library.tmpl>
SubdirLibraryRule($(OBJS))
DependTarget()

View File

@@ -0,0 +1,48 @@
XCOMM $XConsortium: Imakefile /main/1 1996/08/21 15:59:47 drk $
XCOMM ** WARNING **
XCOMM
XCOMM The files named here may appear in many different Imakefiles.
XCOMM If you add or remove a file, be sure to update all locations.
XCOMM It's unfortunate, but all this redundancy serves a purpose.
XCOMM
XCOMM Other possible locations are:
XCOMM .../lib/DtMmdb/Imakefile
XCOMM .../lib/DtMmdb/<subdir>/Imakefile
XCOMM .../programs/dtinfo/mmdb/Imakefile
XCOMM .../programs/dtinfo/mmdb/<subdir>/Imakefile
#define DoNormalLib YES
#define DoSharedLib NO
#define DoDebugLib NO
#define DoProfileLib NO
#define LibName MMDB
#define LibHeaders NO
#define LibCreate NO
#define CplusplusSource YES
DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
DEFINES = -DPORTABLE_DB
INCLUDES = -I$(DTMMDBSRC)/index -I$(DTMMDBSRC) $(EXCEPTIONS_INCLUDES)
LinkSourceFile(btree_index.C,$(DTMMDBSRC)/index)
LinkSourceFile(dyn_disk_index.C,$(DTMMDBSRC)/index)
LinkSourceFile(dyn_index.C,$(DTMMDBSRC)/index)
LinkSourceFile(dyn_memory_index.C,$(DTMMDBSRC)/index)
LinkSourceFile(fast_mphf.C,$(DTMMDBSRC)/index)
LinkSourceFile(hash.C,$(DTMMDBSRC)/index)
LinkSourceFile(index.C,$(DTMMDBSRC)/index)
LinkSourceFile(inv_lists.C,$(DTMMDBSRC)/index)
LinkSourceFile(mphf_index.C,$(DTMMDBSRC)/index)
SRCS = btree_index.C dyn_disk_index.C dyn_index.C \
dyn_memory_index.C fast_mphf.C hash.C \
index.C inv_lists.C mphf_index.C
OBJS = $(SRCS:.C=.o)
#include <Library.tmpl>
SubdirLibraryRule($(OBJS))
DependTarget()

View File

@@ -0,0 +1,41 @@
XCOMM $XConsortium: Imakefile /main/1 1996/08/21 15:59:50 drk $
XCOMM ** WARNING **
XCOMM
XCOMM The files named here may appear in many different Imakefiles.
XCOMM If you add or remove a file, be sure to update all locations.
XCOMM It's unfortunate, but all this redundancy serves a purpose.
XCOMM
XCOMM Other possible locations are:
XCOMM .../lib/DtMmdb/Imakefile
XCOMM .../lib/DtMmdb/<subdir>/Imakefile
XCOMM .../programs/dtinfo/mmdb/Imakefile
XCOMM .../programs/dtinfo/mmdb/<subdir>/Imakefile
#define DoNormalLib YES
#define DoSharedLib NO
#define DoDebugLib NO
#define DoProfileLib NO
#define LibName MMDB
#define LibHeaders NO
#define LibCreate NO
#define CplusplusSource YES
DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
DEFINES = -DCOMPACTED_DISK_REP -DPORTABLE_DB
INCLUDES = -I$(DTMMDBSRC)/mgrs -I$(DTMMDBSRC) $(EXCEPTIONS_INCLUDES)
LinkSourceFile(managers.C,$(DTMMDBSRC)/mgrs)
LinkSourceFile(misc.C,$(DTMMDBSRC)/mgrs)
LinkSourceFile(query_mgr.C,$(DTMMDBSRC)/mgrs)
LinkSourceFile(template_mgr.C,$(DTMMDBSRC)/mgrs)
SRCS = managers.C misc.C query_mgr.C template_mgr.C
OBJS = $(SRCS:.C=.o)
#include <Library.tmpl>
SubdirLibraryRule($(OBJS))
DependTarget()

View File

@@ -0,0 +1,35 @@
XCOMM $XConsortium: Imakefile /main/1 1996/08/21 15:59:54 drk $
XCOMM ** WARNING **
XCOMM
XCOMM The files named here may appear in many different Imakefiles.
XCOMM If you add or remove a file, be sure to update all locations.
XCOMM It's unfortunate, but all this redundancy serves a purpose.
XCOMM
XCOMM Other possible locations are:
XCOMM .../lib/DtMmdb/Imakefile
XCOMM .../lib/DtMmdb/<subdir>/Imakefile
XCOMM .../programs/dtinfo/mmdb/Imakefile
XCOMM .../programs/dtinfo/mmdb/<subdir>/Imakefile
#define DoNormalLib YES
#define DoSharedLib NO
#define DoDebugLib NO
#define DoProfileLib NO
#define LibName MMDB
#define LibHeaders NO
#define LibCreate NO
DEFINES = -DPORTABLE_DB
INCLUDES = -I$(DTMMBDSRC)/misc
LinkSourceFile(unique_id.c,$(DTMMDBSRC)/misc)
SRCS = unique_id.c
OBJS = $(SRCS:.c=.o)
#include <Library.tmpl>
SubdirLibraryRule($(OBJS))
DependTarget()

View File

@@ -0,0 +1,62 @@
XCOMM $XConsortium: Imakefile /main/1 1996/08/21 15:59:58 drk $
XCOMM ** WARNING **
XCOMM
XCOMM The files named here may appear in many different Imakefiles.
XCOMM If you add or remove a file, be sure to update all locations.
XCOMM It's unfortunate, but all this redundancy serves a purpose.
XCOMM
XCOMM Other possible locations are:
XCOMM .../lib/DtMmdb/Imakefile
XCOMM .../lib/DtMmdb/<subdir>/Imakefile
XCOMM .../programs/dtinfo/mmdb/Imakefile
XCOMM .../programs/dtinfo/mmdb/<subdir>/Imakefile
#define DoNormalLib YES
#define DoSharedLib NO
#define DoDebugLib NO
#define DoProfileLib NO
#define LibName MMDB
#define LibHeaders NO
#define LibCreate NO
#define CplusplusSource YES
DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
DEFINES = -DPORTABLE_DB
INCLUDES = -I$(DTMMBDSRC)/object -I$(DTMMDBSRC) $(EXCEPTIONS_INCLUDES)
LinkSourceFile(composite.C,$(DTMMDBSRC)/object)
LinkSourceFile(compressed_pstring.C,$(DTMMDBSRC)/object)
LinkSourceFile(cset.C,$(DTMMDBSRC)/object)
LinkSourceFile(dl_list.C,$(DTMMDBSRC)/object)
LinkSourceFile(dl_list_cell.C,$(DTMMDBSRC)/object)
LinkSourceFile(handler.C,$(DTMMDBSRC)/object)
LinkSourceFile(integer.C,$(DTMMDBSRC)/object)
LinkSourceFile(long_pstring.C,$(DTMMDBSRC)/object)
LinkSourceFile(oid.C,$(DTMMDBSRC)/object)
LinkSourceFile(oid_list.C,$(DTMMDBSRC)/object)
LinkSourceFile(oid_t.C,$(DTMMDBSRC)/object)
LinkSourceFile(primitive.C,$(DTMMDBSRC)/object)
LinkSourceFile(pstring.C,$(DTMMDBSRC)/object)
LinkSourceFile(random_gen.C,$(DTMMDBSRC)/object)
LinkSourceFile(root.C,$(DTMMDBSRC)/object)
LinkSourceFile(short_list.C,$(DTMMDBSRC)/object)
LinkSourceFile(tuple.C,$(DTMMDBSRC)/object)
SRCS = composite.C compressed_pstring.C \
cset.C dl_list.C \
dl_list_cell.C handler.C \
integer.C long_pstring.C \
oid.C oid_list.C \
oid_t.C primitive.C \
pstring.C random_gen.C \
root.C short_list.C \
tuple.C
OBJS = $(SRCS:.C=.o)
#include <Library.tmpl>
SubdirLibraryRule($(OBJS))
DependTarget()

View File

@@ -0,0 +1,78 @@
XCOMM $XConsortium: Imakefile /main/1 1996/08/21 16:00:03 drk $
XCOMM ** WARNING **
XCOMM
XCOMM The files named here may appear in many different Imakefiles.
XCOMM If you add or remove a file, be sure to update all locations.
XCOMM It's unfortunate, but all this redundancy serves a purpose.
XCOMM
XCOMM Other possible locations are:
XCOMM .../lib/DtMmdb/Imakefile
XCOMM .../lib/DtMmdb/<subdir>/Imakefile
XCOMM .../programs/dtinfo/mmdb/Imakefile
XCOMM .../programs/dtinfo/mmdb/<subdir>/Imakefile
#define DoNormalLib YES
#define DoSharedLib NO
#define DoDebugLib NO
#define DoProfileLib NO
#define LibName MMDB
#define LibHeaders NO
#define LibCreate NO
#define CplusplusSource YES
DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
#ifdef DtinfoClient
DEFINES= -DNO_DB_LOCK -DCDE_NEXT
#else
DEFINES= -DNO_DB_LOCK $(BYTE_ORDER_DEFINES)
#endif
INCLUDES = -I$(DTMMDBSRC)/oliasdb -I$(DTMMDBSRC) $(EXCEPTIONS_INCLUDES) $(COMMON_CLASS_INCLUDES) -I$(DTMMDBSRC)/misc
LinkSourceFile(asciiIn_filters.C,$(DTMMDBSRC)/oliasdb)
LinkSourceFile(collectionIterator.C,$(DTMMDBSRC)/oliasdb)
LinkSourceFile(dlp_hd.C,$(DTMMDBSRC)/oliasdb)
LinkSourceFile(dlp_test.C,$(DTMMDBSRC)/oliasdb)
LinkSourceFile(doc_hd.C,$(DTMMDBSRC)/oliasdb)
LinkSourceFile(doc_test.C,$(DTMMDBSRC)/oliasdb)
LinkSourceFile(graphic_hd.C,$(DTMMDBSRC)/oliasdb)
LinkSourceFile(graphic_test.C,$(DTMMDBSRC)/oliasdb)
LinkSourceFile(loc_test.C,$(DTMMDBSRC)/oliasdb)
LinkSourceFile(locator_hd.C,$(DTMMDBSRC)/oliasdb)
LinkSourceFile(mark.C,$(DTMMDBSRC)/oliasdb)
LinkSourceFile(mark_base.C,$(DTMMDBSRC)/oliasdb)
LinkSourceFile(mark_test.C,$(DTMMDBSRC)/oliasdb)
LinkSourceFile(mmdb.C,$(DTMMDBSRC)/oliasdb)
LinkSourceFile(node_hd.C,$(DTMMDBSRC)/oliasdb)
LinkSourceFile(node_test.C,$(DTMMDBSRC)/oliasdb)
LinkSourceFile(olias_funcs.C,$(DTMMDBSRC)/oliasdb)
LinkSourceFile(olias_test.C,$(DTMMDBSRC)/oliasdb)
LinkSourceFile(stylesheet_hd.C,$(DTMMDBSRC)/oliasdb)
LinkSourceFile(stylesheet_test.C,$(DTMMDBSRC)/oliasdb)
LinkSourceFile(toc_hd.C,$(DTMMDBSRC)/oliasdb)
LinkSourceFile(toc_test.C,$(DTMMDBSRC)/oliasdb)
LinkSourceFile(user_base.C,$(DTMMDBSRC)/oliasdb)
BASE_SRCS = \
asciiIn_filters.C collectionIterator.C \
dlp_hd.C dlp_test.C \
doc_hd.C doc_test.C \
graphic_hd.C graphic_test.C \
loc_test.C locator_hd.C \
mark.C mark_base.C \
mark_test.C mmdb.C \
node_hd.C node_test.C \
olias_funcs.C olias_test.C \
stylesheet_hd.C stylesheet_test.C \
toc_hd.C toc_test.C \
user_base.C
SRCS = $(BASE_SRCS)
OBJS = $(BASE_SRCS:.C=.o)
#include <Library.tmpl>
SubdirLibraryRule($(OBJS))
DependTarget()

View File

@@ -0,0 +1,55 @@
XCOMM $XConsortium: Imakefile /main/1 1996/08/21 16:00:07 drk $
XCOMM ** WARNING **
XCOMM
XCOMM The files named here may appear in many different Imakefiles.
XCOMM If you add or remove a file, be sure to update all locations.
XCOMM It's unfortunate, but all this redundancy serves a purpose.
XCOMM
XCOMM Other possible locations are:
XCOMM .../lib/DtMmdb/Imakefile
XCOMM .../lib/DtMmdb/<subdir>/Imakefile
XCOMM .../programs/dtinfo/mmdb/Imakefile
XCOMM .../programs/dtinfo/mmdb/<subdir>/Imakefile
#define DoNormalLib YES
#define DoSharedLib NO
#define DoDebugLib NO
#define DoProfileLib NO
#define LibName MMDB
#define LibHeaders NO
#define LibCreate NO
#define CplusplusSource YES
DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
DEFINES = -DPORTABLE_DB
INCLUDES = -I$(DTMMDBSRC)/schema -I$(DTMMDBSRC) $(EXCEPTIONS_INCLUDES) -I$(DTMMDBSRC)/misc
LinkSourceFile(agent_desc.C,$(DTMMDBSRC)/schema)
LinkSourceFile(container_desc.C,$(DTMMDBSRC)/schema)
LinkSourceFile(desc.C,$(DTMMDBSRC)/schema)
LinkSourceFile(index_desc.C,$(DTMMDBSRC)/schema)
LinkSourceFile(inv_desc.C,$(DTMMDBSRC)/schema)
LinkSourceFile(object_dict.C,$(DTMMDBSRC)/schema)
LinkSourceFile(store_desc.C,$(DTMMDBSRC)/schema)
LinkSourceFile(stored_object_desc.C,$(DTMMDBSRC)/schema)
NORMAL_SRCS = \
agent_desc.C container_desc.C desc.C \
index_desc.C inv_desc.C object_dict.C \
store_desc.C stored_object_desc.C
LinkSourceFile(sheet.C,$(DTMMDBSRC)/schema)
LinkSourceFile(token.C,$(DTMMDBSRC)/schema)
PARSER_SRCS = sheet.C token.C
SRCS = $(NORMAL_SRCS) $(PARSER_SRCS)
OBJS = $(NORMAL_SRCS:.C=.o) $(PARSER_SRCS:.C=.o)
#include <Library.tmpl>
SubdirLibraryRule($(OBJS))
DependTarget()

View File

@@ -0,0 +1,55 @@
XCOMM $XConsortium: Imakefile /main/1 1996/08/21 16:00:11 drk $
XCOMM ** WARNING **
XCOMM
XCOMM The files named here may appear in many different Imakefiles.
XCOMM If you add or remove a file, be sure to update all locations.
XCOMM It's unfortunate, but all this redundancy serves a purpose.
XCOMM
XCOMM Other possible locations are:
XCOMM .../lib/DtMmdb/Imakefile
XCOMM .../lib/DtMmdb/<subdir>/Imakefile
XCOMM .../programs/dtinfo/mmdb/Imakefile
XCOMM .../programs/dtinfo/mmdb/<subdir>/Imakefile
#define DoNormalLib YES
#define DoSharedLib NO
#define DoDebugLib NO
#define DoProfileLib NO
#define LibName MMDB
#define LibHeaders NO
#define LibCreate NO
#define CplusplusSource YES
DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
DEFINES = -DPORTABLE_DB
INCLUDES = -I$(DTMMDBSRC)/storage -I$(DTMMDBSRC) $(EXCEPTIONS_INCLUDES)
LinkSourceFile(abs_storage.C,$(DTMMDBSRC)/storage)
LinkSourceFile(chunks_index.C,$(DTMMDBSRC)/storage)
LinkSourceFile(heap_comp_funcs.C,$(DTMMDBSRC)/storage)
LinkSourceFile(lru.C,$(DTMMDBSRC)/storage)
LinkSourceFile(page.C,$(DTMMDBSRC)/storage)
LinkSourceFile(page_cache.C,$(DTMMDBSRC)/storage)
LinkSourceFile(page_rep.C,$(DTMMDBSRC)/storage)
LinkSourceFile(page_storage.C,$(DTMMDBSRC)/storage)
LinkSourceFile(rep_cell.C,$(DTMMDBSRC)/storage)
LinkSourceFile(rep_policy.C,$(DTMMDBSRC)/storage)
LinkSourceFile(store_test.C,$(DTMMDBSRC)/storage)
LinkSourceFile(unixf_storage.C,$(DTMMDBSRC)/storage)
LinkSourceFile(version.C,$(DTMMDBSRC)/storage)
LinkSourceFile(vm_storage.C,$(DTMMDBSRC)/storage)
SRCS = abs_storage.C chunks_index.C heap_comp_funcs.C \
lru.C page.C page_cache.C \
page_rep.C page_storage.C rep_cell.C \
rep_policy.C store_test.C unixf_storage.C \
version.C vm_storage.C
OBJS = $(SRCS:.C=.o)
#include <Library.tmpl>
SubdirLibraryRule($(OBJS))
DependTarget()

View File

@@ -0,0 +1,57 @@
XCOMM $XConsortium: Imakefile /main/1 1996/08/21 16:00:17 drk $
XCOMM ** WARNING **
XCOMM
XCOMM The files named here may appear in many different Imakefiles.
XCOMM If you add or remove a file, be sure to update all locations.
XCOMM It's unfortunate, but all this redundancy serves a purpose.
XCOMM
XCOMM Other possible locations are:
XCOMM .../lib/DtMmdb/Imakefile
XCOMM .../lib/DtMmdb/<subdir>/Imakefile
XCOMM .../programs/dtinfo/mmdb/Imakefile
XCOMM .../programs/dtinfo/mmdb/<subdir>/Imakefile
#define DoNormalLib YES
#define DoSharedLib NO
#define DoDebugLib NO
#define DoProfileLib NO
#define LibName MMDB
#define LibHeaders NO
#define LibCreate NO
#define CplusplusSource YES
DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
DEFINES = -DPORTABLE_DB
INCLUDES = -I$(DTMMDBSRC)/utility -I$(DTMMDBSRC) $(EXCEPTIONS_INCLUDES) -I$(DTMMDBSRC)/misc
LinkSourceFile(atoi_fast.C,$(DTMMDBSRC)/utility)
LinkSourceFile(atoi_larson.C,$(DTMMDBSRC)/utility)
LinkSourceFile(atoi_pearson.C,$(DTMMDBSRC)/utility)
LinkSourceFile(atomic_lock.C,$(DTMMDBSRC)/utility)
LinkSourceFile(buffer.C,$(DTMMDBSRC)/utility)
LinkSourceFile(filter.C,$(DTMMDBSRC)/utility)
LinkSourceFile(funcs.C,$(DTMMDBSRC)/utility)
LinkSourceFile(mmdb_exception.C,$(DTMMDBSRC)/utility)
LinkSourceFile(ostring.C,$(DTMMDBSRC)/utility)
LinkSourceFile(pm_random.C,$(DTMMDBSRC)/utility)
LinkSourceFile(randomize.C,$(DTMMDBSRC)/utility)
LinkSourceFile(rw_lock.C,$(DTMMDBSRC)/utility)
LinkSourceFile(xtime.C,$(DTMMDBSRC)/utility)
BASE_SRCS = \
atoi_fast.C atoi_larson.C atoi_pearson.C \
atomic_lock.C buffer.C filter.C \
funcs.C mmdb_exception.C ostring.C \
pm_random.C randomize.C rw_lock.C \
xtime.C
SRCS = $(BASE_SRCS)
OBJS = $(BASE_SRCS:.C=.o)
#include <Library.tmpl>
SubdirLibraryRule($(OBJS))
DependTarget()