Dave Bodenstab's Home Page

Continue to:
  • Dave's Home machine
    The link is UP (by invitation only)
    [the link is up]
  • My experiments with digital panoramic photography
  • Some Free Software

    The XPL Compiler [July 2000]
    A Tclsh(1) Shell for the Tcl Interface of the Vim Editor [August 2001]
    Tcl/Tk Reference Guide [August 2003]
    Allan Brighton's Tk canvas tree widget [February 2004]
    Complete XDM Working Example [October 2003]
    FreeBSD support for less-than-smart APC UPS [October 2003]
    BYACC which produces Perl/Tcl parsers [June 2003]

    The XPL Compiler

    The XPL compiler and supporting programs, ported to FreeBSD on an Intel 486. It is documented in the book A Compiler Generator by McKeeman, Horning and Wortman, published by Prentice-Hall, 1970, ISBN 13-155077-2. The original compiler was designed for the IBM S/360. The language is XPL, a dialect of PL/I. The compiler is written in XPL.

    I picked up this package from the SHARE organization back in the mid 70's. It was squirreled away on 9-track tape until 1984 when I dug it out and wrote the S/360 emulator. Then it was stored on floppies until I had some time and decided to finally port it to the Intel 486. This was the first compiler source that I was exposed to and fueled my interest in compilers and operating systems. I guess that's why I dug it out and finished this little porting effort.

    The latest version of XPL for FreeBSD is 4.2 -- click here to download.

    This package builds the XPL compiler by bootstrapping from the original IBM S/370 binary. The build process requires GNU make and the RCS source control tools. If you have trouble building the Intel binary for the compiler, you can get a pre-built copy here. You will still need to compile the sub-monitor, xplsm, for your operating system.

    A Tclsh(1) Shell for the Tcl Interface of the Vim Editor

    The vim Tcl interface is great, but the lack of an interactive mode makes debugging more difficult. This package solves that problem. It is an interactive Tcl console for the vim Tcl interface. Within vim, one runs an ex-mode Tcl package require command:
        :tcl package require Vimconsole
    The Vimconsole package spawns an xterm window with a custom shell that connects the xterm's stdin/out/err to Tcl's stdin/out/err.

    The latest version of the vimconsole package is 1.2 -- click here to download.

    Tcl/Tk Reference Guide

    [2016: this stuff is so obsolete I wouldn't bother with it - I have not maintained this site for years. Just google for what you're looking for.]

    The Tcl/Tk Reference Guide is a typeset quick reference guide to John Ousterhout's Tcl script language and Tk toolkit. It is made available by Paul Raines via ftp from here. That version is written for Tcl/Tk versions 8.0, but Tcl/Tk has marched on -- the current release is 8.4.3. I find the reference guide extremely useful, so I have updated it to coincide with the current Tcl/Tk release: 8.4.3. In addition, I have added a section for TclX, the Img package, selected packages from the Tcl standard library, the Tktable package, the vu package (bargraph, dial and pie widgets) and a final section on Vim's Tcl interface.

    For those who have latex installed, I have also included the TeX input files for the dictionary, Hash, pgtcl, RBtree, sendx, setops, svipc, syslog, tcLex, tclgdbm, tclreadline, Tkspline (bundled with graphviz), tree, trf and trfcrypt packages.

    The latest version of the reference guide is 8.4.3 -- click here to download.

    Tk Canvas tree widget

    Sometime in the past I found Allan Brighton's Tk canvas tree widget package (version 8.0.4) at (I believe) ftp://ftp.archive.eso.org/pub/tree/tree-8.0.4.tar.gz, but I have not been able to locate it again anywhere on the WEB (as of July, 2003). However, Mr. Brighton's 8.0.3 version is available here, and the documentation is here (both URL's verified 24-Feb-2004).

    Since the 8.0.4 version seems to have disappeared, I have ported it to Tk 8.4. It it can be found here.

    I've tried to clearly identify any changes I make by using RCS; therefore the original, unmodified source is available for reference as well as the changes I have made. Before building the package you must extract the source from the RCS files:

      $ tar -xzf bree-	# Unpack the tar archive
      $ cd tree-
      $ cd src
      $ co *,v			# Extract updated source from RCS files
      $ cd ..
      $ ./configure
      $ make

    It has been reported that this (Brighton's) package conflicts with the BWidget package. Brighton's package uses the "Tree" class name for the widget it creates which conflicts with the tree widget from BWidgets which also uses the same class name. Since the BWidget tree binds <Destroy> to the class Tree, that binding is called when Brighton's C++ tree is destroyed.

    The solution is to either rename Brighton's "tree" command to anything else such that "string totitle new_cmd_name" does not return "Tree", or modify the source.

    Complete XDM Working Example

    Having spent the better part of an entire day trying to figure out how to configure XDM to accomplish what I wanted, I present a complete, working example of my XDM configuration. From what I found while searching via Google, UseNet news postings and private email, I have combined the information, code, and anything else I felt like using into my configuration. As all of the information was freely offered, I also offer this to anyone for any purpose.

    My goal was to be able to use CHOOSER to login to any of the FreeBSD systems on my local LAN from any of the FreeBSD systems. The description of what I changed in each configuration file and the additional configuration files I added can be found here. You can also download a compressed tar file containing all the configuration files.

    FreeBSD support for less-than-smart APC UPS

    I recently saw an APC UPS for a good price and decided it was finally time to get one. I guess I should have done my homework since it turns out that it is not a `smart' UPS -- it was a Back-UPS 650; it's got a serial cable connection to detect power loss and can be instructed to turn off power. However, it is not a smart UPS.

    I installed the apcupsd port but was peeved when I found out that there is no hook in FreeBSD to gain control near the end of a shutdown -- so there was no way to unmount all the file systems prior to losing power and shutdown cleanly. This is available for Linux apparently (grrrr). So I added support in FreeBSD release 4.8. It was pretty simple:

  • Change init to call /etc/rc.powerdown if a shutdown -p is done (SIGUSR2).
  • /etc/rc.powerdown attempts to remount all file systems read-only, and then tells apcupsd to shut off power.

    It works fine! With the appropriate changes to the config files for apcupsd, my system can now shutdown cleanly during a power outage.

    The instructions, diff's and my configuration files can be downloaded here.

    BYACC which produces Perl/Tcl parsers

    I wanted a set of Tcl/Perl yacc tools that I knew were based on the latest version of byacc that I knew of. I also wanted a minimal diff against that version of byacc. To that end, I've taken the latest versions of tyacc/pyacc that I found:

    and applied the diff's to FreeBSD's 4.8-RELEASE yacc (which is really byacc.) Each of tyacc/pyacc/p5yacc is a separate tool -- removing the command line option specifying what language (Tcl/Perl) to generate simplified the diff's enormously. Basing the changes on FreeBSD's version of yacc did remove some changes that might be important to some people. The following features were removed:

    The Perl versions contain no new functionality or bug fixes. However, the Tcl version has been improved:

    My versions of the Perl/Tcl yacc's can be downloaded here.

    Hit counter: counter