In addition to adding support for FreeBSD 2.1 the following
issues were addressed:

  1) tools/druc/sce/Makefile refers to drucompi.yac.tab.[cho] instead
     of y.tab.[cho].  Likewise drucompi.lex, drucompi.c, and vmcasmld.c
     all referred to drucompi.yac.tab.h instead of y.tab.h.

  2) tools/fitpath/sce/FpGen/FpGenMGN.h contained several prototypes of
     the form (...) which isn't legal (at least one parameter must
     be declared prior to "..." according to ANSI C).

  3) existDirectory (which is defined in tools/fpga/sce/compil/sl_util.c,
     tools/netoptim/sce/compil/sl_util.c, tools/proof/sce/compil/sl_util.c,
     and tools/sl/sce/compil/sl_util.c) uses free when it should use
     closedir.

     BTW, using stat and S_ISDIR seems to make more sense then opendir.

  3) SLgetFile (which is defined in tools/fpga/sce/compil/sl_util.c,
     tools/netoptim/sce/compil/sl_util.c, tools/proof/sce/compil/sl_util.c,
     and tools/sl/sce/compil/sl_util.c) contains the following fragment of
     code:

       fscanf(fich, "%s", st);
       if ( !feof(fich) )
	 {
	 if (strlen(st) != 0)
	   head = addchain(head, st);
	 }

     Which makes more sense written as:

       if (fscanf(fich, "%s", st) == 1)
	 head = addchain(head, st);

     BTW, here's a place to consider using opendir, readdir, and closedir.

  4) read_array, read_pointer, and read_terminal (which are defined in
     tools/genview/sce/d_dbx_trace.c) all have the variable "string"
     defined as a character array instead of a static character array.

  5) restoredirvbe (which is defined in tools/mbk/sce/mbk_lo_util.c) has
     "||" where it needs "&&".  It also contains several code fragments
     of the form:

       if (isupper(line[p]))
	 line[p] = tolower(line[p]));

     Given how tolower is documented to work the above code is overly
     complex.  The following should work fine:

       line[p] = tolower(line[p]));

  6) legal_instance_name, legal_signal_name, and busname (which are all
     defined in tools/mbkhilo/sce/drive_hilo.c) all have the variable
     "buffer" defined as a character array instead of a static character
     array.

  7) spi_busname (which is defined in tools/mbkspice/sce/spi.c) has the
     variable "buffer" defined as a character array instead of a static
     character array.

  8) busname (which is defined in tools/mbkvti/sce/drive_vti_l.c) has the
     variable "buffer" defined as a character array instead of a static
     character array.

  9) tools/ring/sce/Makefile refers to interp.yac.tab.[cho] instead of
     y.tab.[cho].  Likewise interp.lex refers to interp.yac.tab.h instead
     of y.tab.h.

 10) tutorials/amd2901/Makefile doesn't set MBK_TECHNO_NAME prior to
     calling $(TAS).

 11) tutorials/fitpath/Makefile has the wrong paths for ALLIANCE_BIN,
     FITPATH_BIN, and DPLIB.

Notes:

  1) dreal and graal were not ported to FreeBSD 2.1 due to Motif not being
     installed on the target machine.

  2) Be sure that your kernel configuration allows for large data segments
     when running the dlxm tutorial.  The s2r step requires ~70 Mbyte data
     segment.

  3) Will someone please explain to me how and in what situations
     TabVarExt[18] (which is set up in tools/genview/sce/d_interp_fonc.c)
     is used.  It appears to store the address of the array of the stdio
     file streams, but why and how is it used?

BTW: If someone has time they might compile Alliance with gcc -Wall and /
or use lint and comb through the warnings ... there are some interesting
ones mentioned.  FYI, that's how I found the various problems with variables
that should of been defined as static.

Enjoy!

-- John Wehle (john@feith.com)
