Next: X Resources Up: Customizing HeNCE Previous: Customizing HeNCE

Using a .htool File

Many HeNCE attributes may be set by adding lines to a file called ``.htool'' which must be placed in your home directory. Each line contains a variable name and a value and should have the following form.


NAME: Value

A list of all of the variable names that can be set follows. Notice that all variable names must be in upper case. Don't forget the colon.

  1. EDITOR_COMMAND(default: xterm -title %s-e vi %s)

    The command htool uses when you want to edit a node program or node subroutine. Emacs users can set it to ``emacs %s'' since emacs can create its own window when running under X.

  2. LANGUAGE (default: C)

    The language to be used for your node subroutines. The value musty be either C or FORTRAN.

  3. PRINT_COMMAND(default: lpr %s)

    The command HeNCE will use to print a Postscript image of your graph.

  4. TMP_DIR(default: /tmp)

    The UNIX directory where htool scribbles temporary cost matrices, etc.

  5. PVM_HOST_FILE(none by default)

    Name of PVM host file to be used when pvm3d is started.

  6. SUB_DEFS_FILE(none by default)

    Name of file from which htool will read function prototypes for node subroutines. Htool automatically determines this information from the actual parameters passed in node programs. This facility allows users to override htool's type determination. It is unlikely that you will need to use this feature.

  7. ARCH_CC(default depends on architecture)

    ARCH is a PVM architecture name such as SUN4, RS6K, or HPPA. See the section on supported hardware.

    This variable is a printf-like string that says how to compile a C node program. Special escapes include the following:

    
        %{something}     include "something" only if debugging
        %[something]     include "something" only if NOT debugging
        %D               represents predefined ``-D'' preprocessor defines
        %I               represents predfined ``-I'' includes
        %L               represents predefined ``-L'' and ``-l'' libraries
        %o               name of object file (foo)
        %s               name of source file (foo.c or foo.f)
        %w               name of wrapper (cw_foo.c or fw_foo.f)
        %W               name of compiled wrapper (cw_foo.o or fw_foo.o)

    Htool has special wired in values for HPPA, SUN4, PMAX, and RS6K, which can be overridden here. For other architectures, the following default is used.

    
    cc -o %o %{-g}%[-O] %D %I %s %w %L -lm

    If you wish to create a custom ARCH_CC, you do it by adding to the basic string. You should continue to use the escapes that represent the items that ae known to be reequired. For example, to add a new library, simple add a new ``-l'' to the basic string as shown below.

    
    cc -o %o %{-g}%[-O] %D %I %s %w %L -lm -lsomenewlib

  8. ARCH_FC(default depends on architecture)

    A printf-like string that says how to compile a FORTRAN node program. Escapes are the same as for ARCH_CC. ARCH is an architeture name. If not otherwise defined, the following is assumed:

    
    cc %{-g}%[-O] %D %I -c %w && f77 -o %o %{-g}%[-O] fmain.f %W %s %L -lm

    There are defaults for HPPA, SUN4, PMAX, and RS6K.

  9. ARCH_BUILD_FLAGS(depends on architecture).

    ARCH is an architecture name. The BUILD_FLAGSare a string which contains any of the following characters:

    
       _   append an underscore to function name to call from FORTRAN
       U   uppercase function names to call from FORTRAN
       l   add extra args at the end of arg lists to give the length
           of FORTRAN CHARACTER arrays
       C   special CRAY hacks for fortran strings (unimplemented)
       T   special TITAN hacks for fortran strings (unimplemented)

    There are defaults for HPPA, SUN4, PMAX, and RS6K. No flags are automatically included for other architectures.

Just to summarize, here is a small but complete example of a .htool file. It sets both the langauge for node programs and the editor to be used.


EDITOR_COMMAND: xterm -title %s -e mg %s
LANGUAGE: FORTRAN



Next: X Resources Up: Customizing HeNCE Previous: Customizing HeNCE


newton@utkcs.cs.utk.edu
Wed Jun 15 15:13:55 EDT 1994