Turning regex and regsub into a loadable extension ================================================== Rev 0.10: Initial release This package defines xregex and xregsub, which are equivalent to Tcl's regex and regsub, respectively. The reason for doing this, is to show how one could start to modularize Tcl... gradually. The changes needed to modularize regex/regsub were absolutely minimal: - copy all key source files from Tcl's generic/ to xre_c/ - extract xre.c from the tclCmdMZ.c source code - add lots of define's to make the code independent of the original - define dummy "tclInt.h" and "tclPort.h" headers (with minimal defs) Note that *NO* changes were made to the source code. The source files were symlinked here to avoid adding them to the CritLib distribution, you will need to either adjust them in xre_c, or make your own copies. Regex and regsub were picked as example, because they were relatively easy to extract (all the main code is by Henry Spencer, and written independently of the Tcl core). But this is just to give an idea of what *could* be done. Regex/regsub are about 1/8th of the Tcl binary.