diff -rc ptolemy.old/MAKEARCH ptolemy/MAKEARCH *** ptolemy.old/MAKEARCH Tue Mar 26 16:21:44 1996 --- ptolemy/MAKEARCH Wed Sep 18 16:47:53 1996 *************** *** 1,6 **** #! /bin/csh -f # script to make directories and links for an architecture ! # @(#)MAKEARCH 1.134a 3/12/96 if (! $?PTARCH ) then echo The environment variable PTARCH must be set. --- 1,6 ---- #! /bin/csh -f # script to make directories and links for an architecture ! # @(#)MAKEARCH 1.134b 9/18/96 (octredomain fixes) if (! $?PTARCH ) then echo The environment variable PTARCH must be set. *************** *** 43,48 **** --- 43,49 ---- optdifflink ../octtools/bin.$PTARCH/oct2ps oct2ps optdifflink ../octtools/bin.$PTARCH/octfix octfix optdifflink ../octtools/bin.$PTARCH/octls octls + optdifflink ../octtools/bin.$PTARCH/octredomain octredomain optdifflink ../octtools/bin.$PTARCH/vem vem cd .. *************** *** 229,235 **** cd .. end ! foreach x ( installColors masters octfix octls oct2ps) optmkdir $x cd $x optlink ../../../src/octtools/$x make.template --- 230,236 ---- cd .. end ! foreach x ( installColors masters octfix octls oct2ps octredomain) optmkdir $x cd $x optlink ../../../src/octtools/$x make.template Common subdirectories: ptolemy.old/bin and ptolemy/bin Common subdirectories: ptolemy.old/src and ptolemy/src diff -rc ptolemy.old/bin/ptfixtree.tcl ptolemy/bin/ptfixtree.tcl *** ptolemy.old/bin/ptfixtree.tcl Thu Mar 7 10:34:49 1996 --- ptolemy/bin/ptfixtree.tcl Tue Sep 17 18:39:46 1996 *************** *** 5,15 **** # See $PTOLEMY/copyright for the complete copyright notice. # # Author: Kennard White ! # Version: @(#)ptfixtree.tcl 1.11 2/4/96 proc pftUsage { {msg} "Usage Information" } { puts stderr $msg ! puts stderr {usage: ptfixtree [-list] [-v] [+R] [-within path] ... facets ...} puts stderr "\t-v\tturns on verbose message." puts stderr "\t+R\tturns off recursive traversal of heirarchy." puts stderr "\t-within\tspecifies a path which all facets must be within" --- 5,15 ---- # See $PTOLEMY/copyright for the complete copyright notice. # # Author: Kennard White ! # Version: @(#)ptfixtree.tcl 1.12 9/17/96 proc pftUsage { {msg} "Usage Information" } { puts stderr $msg ! puts stderr {usage: ptfixtree [-list] [-v] [+R] [-within path] [-d domain] ... facets ...} puts stderr "\t-v\tturns on verbose message." puts stderr "\t+R\tturns off recursive traversal of heirarchy." puts stderr "\t-within\tspecifies a path which all facets must be within" *************** *** 33,44 **** puts stderr "would be used to verify that no cells in obscure directories" puts stderr "are referenced." puts stderr "\nAdditional (rarely used) options:" puts stderr "\t-octls path\tSpecifies location of octls binary" puts stderr "\t-octmvlib path\tSpecifies location of octmvlib binary" puts stdout "\t\t\tCurrent version uses octfix, not octmvlib" ! puts stderr "\nSend bug reports to kennard@ohm." puts stderr "Please include *all* program output." exit 1 --- 33,47 ---- puts stderr "would be used to verify that no cells in obscure directories" puts stderr "are referenced." + puts stderr "\nThe -d option specified that all facets visited should" + puts stderr "\tbe converted to 'domain'" + puts stderr "\nAdditional (rarely used) options:" puts stderr "\t-octls path\tSpecifies location of octls binary" puts stderr "\t-octmvlib path\tSpecifies location of octmvlib binary" puts stdout "\t\t\tCurrent version uses octfix, not octmvlib" ! puts stderr "\nSend bug reports to ptolemy@eecs.berkeley.edu" puts stderr "Please include *all* program output." exit 1 *************** *** 85,90 **** --- 88,112 ---- } + proc pftOctReDomain { facet olddomain newdomain } { + global path_octredomain do_verbose + + set facet [pftGetFullFacet $facet] + puts stdout " $facet: changing domain to $newdomain" + set capnewdomain [string toupper $newdomain] + if [catch {exec $path_octredomain -d $capnewdomain $facet} result] { + puts stderr "********* octredomain failed ***********" + puts stderr "failed on: $facet: $olddomain --> $newdomain" + puts stderr "$result" + exit 1 + } + if { $do_verbose } { + puts stdout "\t\t$result" + } + } + + + proc pftGetUniqueList { oldlist } { set oldlist [lsort $oldlist] set newlist "" *************** *** 104,112 **** return [pftGetUniqueList [split $masterlines "\n"]] } proc pftAddCheckCells { cells } { global checkcells goodcells - foreach facet $cells { set facet [pftGetContentsFacet $facet] if { [info exists goodcells($facet)] } { --- 126,135 ---- return [pftGetUniqueList [split $masterlines "\n"]] } + # checkcells is an array of cells we still need to check + # goodcells is an array of cells we have already checked proc pftAddCheckCells { cells } { global checkcells goodcells foreach facet $cells { set facet [pftGetContentsFacet $facet] if { [info exists goodcells($facet)] } { *************** *** 271,277 **** proc pftFixFacet { facet } { ! global mapcells do_recur do_verbose do_listonly if { ![pftIsFacetB $facet why expand] } { puts stdout "\tCan't examine $facet:\n\t$why\n\tSkipping..." --- 294,300 ---- proc pftFixFacet { facet } { ! global mapcells do_recur do_verbose do_listonly do_domainchange if { ![pftIsFacetB $facet why expand] } { puts stdout "\tCan't examine $facet:\n\t$why\n\tSkipping..." *************** *** 278,302 **** return "skip" } set masters [pftOctLs $facet] ! foreach master $masters { ! if { $do_verbose } { ! puts stdout " Verify master $master" } ! set minfo [split $master ":"] ! if { [pftGetCellMap [lindex $minfo 0]] != "" } { ! pftPromptAndReplace $facet $master ! return "redo" } ! if { ![pftIsGoodFacetB $master why] } { ! puts stdout "\tBad master:\n\t$why" ! if [catch {pftPromptAndReplace $facet $master} why] { ! if { "$why"==":skip" } { ! puts stdout ">>>>> $facet NOT fixed (bad $master) <<<<<" ! return "skip" } ! error $why } - return "redo" } } if { $do_recur } { --- 301,352 ---- return "skip" } set masters [pftOctLs $facet] ! if { $do_domainchange != {}} { ! regsub -all {:} $facet {/} facetpath ! if [file writable "$facetpath\;"] { ! pftOctReDomain $facet "dummy" $do_domainchange ! } else { ! puts "Can't redomain $facet, it is not writable" } ! set substr "src/domains/[string tolower $do_domainchange]/" ! foreach master $masters { ! set doit 1 ! set oldcell [lindex [split $master :] 0] ! set newcell [pftGetCellMap $oldcell] ! if { "$newcell"=="" } { ! if { ![regsub {src/domains/[^/]+/} $oldcell $substr newcell]} { ! puts "Can't substitute $substr into $master" ! set doit 0 ! } else { ! pftSetCellMap $oldcell $newcell ! } ! } ! if {$doit} { ! pftOctMvLib $facet $oldcell: $newcell ! } ! } ! } else { ! foreach master $masters { ! if { $do_verbose } { ! puts stdout " Verify master $master" ! } ! set minfo [split $master ":"] ! if { [pftGetCellMap [lindex $minfo 0]] != "" } { ! pftPromptAndReplace $facet $master ! return "redo" ! } ! if { ![pftIsGoodFacetB $master why] } { ! puts stdout "\tBad master:\n\t$why" ! if [catch {pftPromptAndReplace $facet $master} why] { ! if { "$why"==":skip" } { ! puts stdout ">>>>> $facet NOT fixed (bad $master) <<<<<" ! return "skip" ! } ! error $why } ! return "redo" } } } if { $do_recur } { *************** *** 306,312 **** } proc pftListFacet { facet } { ! global mapcells do_recur do_verbose do_listonly if { ![pftIsFacetB $facet why expand] } { puts stdout "\tCan't examine $facet:\n\t$why\n\tSkipping..." --- 356,362 ---- } proc pftListFacet { facet } { ! global mapcells do_recur if { ![pftIsFacetB $facet why expand] } { puts stdout "\tCan't examine $facet:\n\t$why\n\tSkipping..." *************** *** 377,394 **** proc pftProcessArgs { } { global argv env checkcells do_recur within_paths do_verbose do_listonly ! global path_octls path_octmvlib set within_paths "" set do_verbose 0 set do_recur 1 set do_listonly 0 set path_octmvlib "" set path_octls "" set argCells [topgetopt { {v do_verbose boolean} {R do_recur boolean} {list do_listonly boolean} {within within_paths append} {octmvlib path_octmvlib} {octls path_octls} --- 427,448 ---- proc pftProcessArgs { } { global argv env checkcells do_recur within_paths do_verbose do_listonly ! global do_domainchange ! global path_octls path_octmvlib path_octredomain set within_paths "" set do_verbose 0 set do_recur 1 set do_listonly 0 + set do_domainchange 0 set path_octmvlib "" set path_octls "" + set path_octredomain "" set argCells [topgetopt { {v do_verbose boolean} {R do_recur boolean} {list do_listonly boolean} + {d do_domainchange} {within within_paths append} {octmvlib path_octmvlib} {octls path_octls} *************** *** 396,405 **** if [llength $argCells]==0 { pftUsage "No cells specified." } - #puts stdout "WithinPaths: ``$within_paths''" pftAddCheckCells $argCells - # set path_octmvlib $env(PTOLEMY)/octtools/bin.$env(PTARCH)/octmvlib if { $path_octmvlib == "" } { set path_octmvlib $env(PTOLEMY)/bin.$env(PTARCH)/octfix } --- 450,457 ---- *************** *** 417,424 **** --- 469,486 ---- puts stderr "(tried $path_octls)" pftUsage "Setup failed." } + + if { $path_octredomain == "" } { + set path_octredomain $env(PTOLEMY)/bin.$env(PTARCH)/octredomain + } + if { ![file isfile $path_octredomain] || ![file exec $path_octredomain] } { + puts stderr "Can't find octredomain program." + puts stderr "(tried $path_octredomain)" + pftUsage "Setup failed." + } } + proc pftMain { } { global env *************** *** 441,444 **** } pftMain - #destroy . --- 503,505 ---- Common subdirectories: ptolemy.old/src/octtools and ptolemy/src/octtools diff -rc ptolemy.old/src/octtools/makefile ptolemy/src/octtools/makefile *** ptolemy.old/src/octtools/makefile Sun Mar 10 18:23:09 1996 --- ptolemy/src/octtools/makefile Tue Jan 23 11:48:47 1996 *************** *** 46,56 **** ALLDIRS = $(DIRS) $(MTDIRS) # Directories other than vem ! # In the default, don't build tkoct, it is not really supported at all ! OTHERDIRS = $(MTDIRS) #tkoct # directories with subtrees ! SDIRS = Packages Xpackages vem #tkoct MAKEVARS = "PTARCH=$(PTARCH)" --- 46,55 ---- ALLDIRS = $(DIRS) $(MTDIRS) # Directories other than vem ! OTHERDIRS = tkoct $(MTDIRS) # directories with subtrees ! SDIRS = Packages Xpackages vem tkoct MAKEVARS = "PTARCH=$(PTARCH)" Common subdirectories: ptolemy.old/src/octtools/octredomain and ptolemy/src/octtools/octredomain Only in ptolemy/src/octtools/octredomain: SCCS diff -rc ptolemy.old/src/octtools/octredomain/make.template ptolemy/src/octtools/octredomain/make.template *** ptolemy.old/src/octtools/octredomain/make.template Wed Sep 18 16:53:42 1996 --- ptolemy/src/octtools/octredomain/make.template Tue Sep 17 17:05:43 1996 *************** *** 0 **** --- 1,89 ---- + # Makefile for Ptolemy octredomain + # Version Identification: + # @(#)make.template 1.1 9/17/96 + # Copyright (c) 1990- The Regents of the University of California. + # All rights reserved. + # + # Permission is hereby granted, without written agreement and without + # license or royalty fees, to use, copy, modify, and distribute this + # software and its documentation for any purpose, provided that the + # above copyright notice and the following two paragraphs appear in all + # copies of this software. + # + # IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY + # FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + # ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF + # THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF + # SUCH DAMAGE. + # + # THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, + # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE + # PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF + # CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, + # ENHANCEMENTS, OR MODIFICATIONS. + # + # PT_COPYRIGHT_VERSION_2 + # COPYRIGHTENDKEY + + # If this files name is make.template and there is no makefile in + # this directory, do + # cp make.template makefile + # make depend + # This will add the dependencies to the makefile. + # + # root of source tree + ROOT = ../../.. + # VPATH points to the real source directory + VPATH = $(ROOT)/src/octtools/octredomain + + # get configuration info + CONFIG=$(ROOT)/mk/config-$(PTARCH).mk + include $(CONFIG) + + HDRS = + + LIBCSRCS = octredomain.c + + SRCS = $(LIBCSRCS) + + OBJS = $(LIBCSRCS:.c=.o) + + C_INCL= -I../include $(PTCOMPAT_INCSPEC) + + all:: makefile octredomain + + LIBS = -L$(OCTLIBDIR) -loh$(DBGFLAG) -lvov$(DBGFLAG) \ + -loptions$(DBGFLAG) -loct$(DBGFLAG) -ltr$(DBGFLAG) \ + -lutility$(DBGFLAG) -lst$(DBGFLAG) \ + -lerrtrap$(DBGFLAG) -luprintf$(DBGFLAG) -lport$(DBGFLAG) + + octredomain: $(OBJS) + $(CLINKER) $(LINKFLAGS) $(OBJS) -o $@ $(LIBS) $(CSYSLIBS) + octredomain.debug: $(OBJS) + $(CLINKER) $(LINKFLAGS_D) $(OBJS) -o $@ $(LIBS) $(CSYSLIBS) + + DEST = $(OCTTOOLS)/bin.$(PTARCH)/octredomain + + $(DEST): octredomain + @echo Installing octredomain + rm -f $(DEST) + ln octredomain $(DEST) + + install: makefile $(DEST) $(BINDIR)/octredomain + + $(BINDIR)/octredomain: + (cd $(BINDIR); rm -f octredomain; ln -s ../octtools/bin.$(PTARCH)/octredomain .) + + # "make sources" will do SCCS get on anything where SCCS file is newer. + sources: + + # Some versions of make require us to set LIB if we are going to + # include common.mk + LIB=none + + # include common definitions, rules + include $(ROOT)/mk/common.mk + + # Dont add anything after the next line; makedepend will zap it. + # DO NOT DELETE THIS LINE -- make depend depends on it. diff -rc ptolemy.old/src/octtools/octredomain/makefile ptolemy/src/octtools/octredomain/makefile *** ptolemy.old/src/octtools/octredomain/makefile Wed Sep 18 16:53:42 1996 --- ptolemy/src/octtools/octredomain/makefile Tue Sep 17 17:10:37 1996 *************** *** 0 **** --- 1,93 ---- + # Makefile for Ptolemy octredomain + # Version Identification: + # @(#)make.template 1.1 9/17/96 + # Copyright (c) 1990- The Regents of the University of California. + # All rights reserved. + # + # Permission is hereby granted, without written agreement and without + # license or royalty fees, to use, copy, modify, and distribute this + # software and its documentation for any purpose, provided that the + # above copyright notice and the following two paragraphs appear in all + # copies of this software. + # + # IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY + # FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + # ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF + # THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF + # SUCH DAMAGE. + # + # THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, + # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE + # PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF + # CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, + # ENHANCEMENTS, OR MODIFICATIONS. + # + # PT_COPYRIGHT_VERSION_2 + # COPYRIGHTENDKEY + + # If this files name is make.template and there is no makefile in + # this directory, do + # cp make.template makefile + # make depend + # This will add the dependencies to the makefile. + # + # root of source tree + ROOT = ../../.. + # VPATH points to the real source directory + VPATH = $(ROOT)/src/octtools/octredomain + + # get configuration info + CONFIG=$(ROOT)/mk/config-$(PTARCH).mk + include $(CONFIG) + + HDRS = + + LIBCSRCS = octredomain.c + + SRCS = $(LIBCSRCS) + + OBJS = $(LIBCSRCS:.c=.o) + + C_INCL= -I../include $(PTCOMPAT_INCSPEC) + + all:: makefile octredomain + + LIBS = -L$(OCTLIBDIR) -loh$(DBGFLAG) -lvov$(DBGFLAG) \ + -loptions$(DBGFLAG) -loct$(DBGFLAG) -ltr$(DBGFLAG) \ + -lutility$(DBGFLAG) -lst$(DBGFLAG) \ + -lerrtrap$(DBGFLAG) -luprintf$(DBGFLAG) -lport$(DBGFLAG) + + octredomain: $(OBJS) + $(CLINKER) $(LINKFLAGS) $(OBJS) -o $@ $(LIBS) $(CSYSLIBS) + octredomain.debug: $(OBJS) + $(CLINKER) $(LINKFLAGS_D) $(OBJS) -o $@ $(LIBS) $(CSYSLIBS) + + DEST = $(OCTTOOLS)/bin.$(PTARCH)/octredomain + + $(DEST): octredomain + @echo Installing octredomain + rm -f $(DEST) + ln octredomain $(DEST) + + install: makefile $(DEST) $(BINDIR)/octredomain + + $(BINDIR)/octredomain: + (cd $(BINDIR); rm -f octredomain; ln -s ../octtools/bin.$(PTARCH)/octredomain .) + + # "make sources" will do SCCS get on anything where SCCS file is newer. + sources: + + # Some versions of make require us to set LIB if we are going to + # include common.mk + LIB=none + + # include common definitions, rules + include $(ROOT)/mk/common.mk + + # Dont add anything after the next line; makedepend will zap it. + # DO NOT DELETE THIS LINE -- make depend depends on it. + octredomain.o: octredomain.c ../include/port.h ../include/ansi.h \ + ../../../src/compat/ptolemy/compat.h ../include/utility.h \ + ../include/options.h ../include/oct.h ../include/oh.h \ + ../include/errtrap.h diff -rc ptolemy.old/src/octtools/octredomain/octredomain.c ptolemy/src/octtools/octredomain/octredomain.c *** ptolemy.old/src/octtools/octredomain/octredomain.c Wed Sep 18 16:53:42 1996 --- ptolemy/src/octtools/octredomain/octredomain.c Tue Sep 17 17:05:44 1996 *************** *** 0 **** --- 1,157 ---- + /* Version Identification: + * @(#)octredomain.c 1.1 9/17/96 + */ + /* + Copyright (c) 1990-9/17/96 The Regents of the University of California. + All rights reserved. + + Permission is hereby granted, without written agreement and without + license or royalty fees, to use, copy, modify, and distribute this + software and its documentation for any purpose, provided that the + above copyright notice and the following two paragraphs appear in all + copies of this software. + + IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY + FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF + THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE + PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF + CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, + ENHANCEMENTS, OR MODIFICATIONS. + + PT_COPYRIGHT_VERSION_2 + COPYRIGHTENDKEY + */ + + /* + * octredomain + * Hacked version of octredomain, which is in turn a hacked version of octmvlib + * redomain a facet + */ + #include "port.h" + #include "utility.h" + #include "options.h" + #include "oct.h" + #include "oh.h" + #include "errtrap.h" + + optionStruct optionList[] = { + {"d", "SDF", "new domain"}, + {"o", "[cell]:view", "output cell:view"}, + {"v", 0, "verbose"}, + { OPT_RARG, "cell:view", "facet defaults to `contents'" }, + {0, 0, 0}}; + + void bomb(str) + char * str; + { + fprintf(stderr, "octredomain: fatal: %s\n", str); + } + + int main(int argc, char **argv) + { + char *input_name = (char *)NULL, *output_name; + char *newDomainName = (char *)NULL; + octObject outfacet, facet, paramProp; + octGenerator gen; + int option; + int verbose = 0; + extern int octoptind; + extern char *optarg; + + /* parse command line options*/ + output_name = NIL(char); + + while ((option = optGetOption(argc, argv)) != EOF) { + switch(option) { + case 'd': + newDomainName = util_strsav(optarg); + break; + case 'o': + output_name = util_strsav(optarg); + break; + case 'v': + verbose = 1; + break; + } + } + + if (newDomainName == (char *)NULL) { + (void) fprintf(stderr, "no new domain name was specified\n"); + optUsage(); + } + + /* + * Finish the command line argument parsing + */ + if (octoptind != argc-1) { + optUsage(); + } else { + input_name = argv[octoptind]; + } + + octBegin(); + + /* + * Get the input and output facet names + */ + ohUnpackDefaults(&facet, "a", ":schematic:contents"); + OH_ASSERT(ohUnpackFacetName(&facet, input_name)); + + /* + * Unpack the output name (if present), and make a copy of the facet + */ + if (output_name != NIL(char)) { + outfacet = facet; + if (ohUnpackFacetName(&outfacet, output_name) == OCT_OK) { + /* Copy the contents facet */ + facet.contents.facet.facet = "contents"; + outfacet.contents.facet.facet = "contents"; + if (octCopyFacet(&outfacet, &facet) != OCT_OK) { + octError("copying the contents facet"); + exit(-1); + } + + /* Copy the interface facet if it exists */ + facet.contents.facet.facet = "interface"; + outfacet.contents.facet.facet = "interface"; + if (octCopyFacet(&outfacet, &facet) != OCT_OK) { + octError("copying the interface facet"); + (void) fprintf(stderr, "continuing\n"); + } + + facet = outfacet; + facet.contents.facet.facet = "contents"; + } + } + + /* + * Open the facet + */ + + { + octStatus status = octOpenFacet(&facet); + if ( status != OCT_OLD_FACET && status != OCT_INCONSISTENT ) { + errRaise( "octredomain", 1, "Cannot open %s\n%s\n", + ohFormatName( &facet ), octErrorString()); + } + } + + OH_ASSERT(octInitGenContents(&facet, OCT_INSTANCE_MASK, &gen)); + + OH_ASSERT(ohGetByPropName( &facet, ¶mProp, "domain")); + printf ("%s\n",paramProp.contents.prop.value.string); + OH_ASSERT(ohCreateOrModifyPropStr(&facet,¶mProp,"domain",newDomainName)); + + octFreeGenerator( &gen ); + OH_ASSERT(octCloseFacet(&facet)); + + return 0; + } + +