I've successfully built Cost 2.2 on most of the platforms which I have available, but there have been a few snags:
${TCL_LIB_FILE}: ${OBJS} ${STUB_LIB_FILE}
rm -f ${TCL_LIB_FILE}
${SHLIB_LD} -o ${TCL_LIB_FILE} ${OBJS} -rpath ${LIB_RUNTIME_DIR}
$(RANLIB) ${TCL_LIB_FILE}
(that is: adding -rpath ${LIB_RUNTIME_DIR} to the link line), then recompiling and reinstalling libtcl8.1.so.
Adding this flag when building costsh would probably also work, but ${LIB_RUNTIME_DIR} doesn't seem to be available to autoconf or in tclConfig.sh
Most of these have been fixed in Cost 2.2 patchlevel 1.
I've had absolutely no luck with this. I suppose I ought to just break down and buy a copy of M*cr*s*ft Visual C++, but I'd really rather stick with gcc if possible.
Progress so far:
Now I just need to put all the pieces together, probably with the aid of a RITA, used in accordance with section 3.2 of RFC 2321.
Update, 1 Jul 1999: After another late night of hacking, I got a working costsh.exe (built on top of the Cygtcl libraries), and a non-working cost2.2.dll built with the Stubs library (the .dll links, but it crashes tclsh when loaded). (Update 1, er, 2 Jul 1999 Got the .DLL working. Going to bed now.)
How should selectNode, selectDocument, withNode, and withDocument interact?
In Cost, the current node is a property of the state of the system. Now that Cost supports multiple documents, it may be desirable to associate a current node with each document. Right now, selectDocument and withDocument always set the current node to the root of the new document, but it may be useful for them to set the current node to ``where you left off.'' The question is: when and where should the document current node be set and restored?
My current thinking is to have withNode and foreachNode work as at present -- that is, only set the application current node -- and have selectNode set both the application current node and the document current node. selectDocument will return to the last node selected by selectNode.
It would also be useful for selectDocument and withDocument to take an optional query; that way you could combine:
withDocument $doc1 {
withNode subtree element FOO {
...
}
}
into a single statement:
withDocument $doc1 subtree element FOO {
...
}
Will have to experiment with this further to see what the Right Thing is.
Unicode support
NSGMLS, EXPAT, and Tcl 8.1+ all support Unicode, so there's really no reason why Cost shouldn't be able to as well. I haven't looked into this yet. Any advice would be appreciated. The only real constraint is that I'd like to maintain compatibility with Tcl 7.5 through 8.0 without too many #ifdefs.
XML support/EXPAT integration
I really haven't tested this very thouroughly yet.
Problems encountered so far: