diff -rc STonX-0.6.2/Makefile.in STonX-0.6.3/Makefile.in
*** STonX-0.6.2/Makefile.in	Thu Jan  4 09:34:16 1996
--- STonX-0.6.3/Makefile.in	Mon Jan  8 11:41:17 1996
***************
*** 103,108 ****
--- 103,109 ----
  clean:
  	rm -f $(OBJ) stonx mon.out gmon.out fonts-done.stmp
  	rm -f tosfonts fnttobdf data/System?.fnt tosfonts.o fnttobdf.o execute.o
+ 	rm -f gen.o 
  
  realclean: clean
  	rm -f gen code.c code.m4
diff -rc STonX-0.6.2/configure STonX-0.6.3/configure
*** STonX-0.6.2/configure	Thu Jan  4 19:30:36 1996
--- STonX-0.6.3/configure	Fri Jan  5 13:48:26 1996
***************
*** 1,7 ****
  #! /bin/sh
  
  # Guess values for system-dependent variables and create Makefiles.
! # Generated automatically using autoconf version 2.7 
  # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
  #
  # This configure script is free software; the Free Software Foundation
--- 1,7 ----
  #! /bin/sh
  
  # Guess values for system-dependent variables and create Makefiles.
! # Generated automatically using autoconf version 2.4 
  # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
  #
  # This configure script is free software; the Free Software Foundation
***************
*** 35,56 ****
  verbose=
  x_includes=NONE
  x_libraries=NONE
- bindir='${exec_prefix}/bin'
- sbindir='${exec_prefix}/sbin'
- libexecdir='${exec_prefix}/libexec'
- datadir='${prefix}/share'
- sysconfdir='${prefix}/etc'
- sharedstatedir='${prefix}/com'
- localstatedir='${prefix}/var'
- libdir='${exec_prefix}/lib'
- includedir='${prefix}/include'
- oldincludedir='/usr/include'
- infodir='${prefix}/info'
- mandir='${prefix}/man'
  
  # Initialize some other variables.
  subdirs=
- MFLAGS= MAKEFLAGS=
  
  ac_prev=
  for ac_option
--- 35,43 ----
***************
*** 72,85 ****
  
    case "$ac_option" in
  
!   -bindir | --bindir | --bindi | --bind | --bin | --bi)
!     ac_prev=bindir ;;
!   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
!     bindir="$ac_optarg" ;;
! 
!   -build | --build | --buil | --bui | --bu)
      ac_prev=build ;;
!   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
      build="$ac_optarg" ;;
  
    -cache-file | --cache-file | --cache-fil | --cache-fi \
--- 59,67 ----
  
    case "$ac_option" in
  
!   -build | --build | --buil | --bui | --bu | --b)
      ac_prev=build ;;
!   -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
      build="$ac_optarg" ;;
  
    -cache-file | --cache-file | --cache-fil | --cache-fi \
***************
*** 89,100 ****
    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
      cache_file="$ac_optarg" ;;
  
-   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
-     ac_prev=datadir ;;
-   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-   | --da=*)
-     datadir="$ac_optarg" ;;
- 
    -disable-* | --disable-*)
      ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
      # Reject names that are not valid shell variable names.
--- 71,76 ----
***************
*** 145,173 ****
  Directory and file names:
    --prefix=PREFIX         install architecture-independent files in PREFIX
                            [$ac_default_prefix]
!   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                            [same as prefix]
-   --bindir=DIR            user executables in DIR [EPREFIX/bin]
-   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
-   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
-   --datadir=DIR           read-only architecture-independent data in DIR
-                           [PREFIX/share]
-   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
-   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
-                           [PREFIX/com]
-   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
-   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
-   --includedir=DIR        C header files in DIR [PREFIX/include]
-   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
-   --infodir=DIR           info documentation in DIR [PREFIX/info]
-   --mandir=DIR            man documentation in DIR [PREFIX/man]
    --srcdir=DIR            find the sources in DIR [configure dir or ..]
    --program-prefix=PREFIX prepend PREFIX to installed program names
    --program-suffix=SUFFIX append SUFFIX to installed program names
!   --program-transform-name=PROGRAM
!                           run sed PROGRAM on installed program names
! EOF
!     cat << EOF
  Host type:
    --build=BUILD           configure for building on BUILD [BUILD=HOST]
    --host=HOST             configure for HOST [guessed]
--- 121,132 ----
  Directory and file names:
    --prefix=PREFIX         install architecture-independent files in PREFIX
                            [$ac_default_prefix]
!   --exec-prefix=PREFIX    install architecture-dependent files in PREFIX
                            [same as prefix]
    --srcdir=DIR            find the sources in DIR [configure dir or ..]
    --program-prefix=PREFIX prepend PREFIX to installed program names
    --program-suffix=SUFFIX append SUFFIX to installed program names
!   --program-transform-name=PROGRAM run sed PROGRAM on installed program names
  Host type:
    --build=BUILD           configure for building on BUILD [BUILD=HOST]
    --host=HOST             configure for HOST [guessed]
***************
*** 179,188 ****
    --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
    --x-includes=DIR        X include files are in DIR
    --x-libraries=DIR       X library files are in DIR
  EOF
-     if test -n "$ac_help"; then
-       echo "--enable and --with options recognized:$ac_help"
-     fi
      exit 0 ;;
  
    -host | --host | --hos | --ho)
--- 138,145 ----
    --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
    --x-includes=DIR        X include files are in DIR
    --x-libraries=DIR       X library files are in DIR
+ --enable and --with options recognized:$ac_help
  EOF
      exit 0 ;;
  
    -host | --host | --hos | --ho)
***************
*** 190,233 ****
    -host=* | --host=* | --hos=* | --ho=*)
      host="$ac_optarg" ;;
  
-   -includedir | --includedir | --includedi | --included | --include \
-   | --includ | --inclu | --incl | --inc)
-     ac_prev=includedir ;;
-   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-   | --includ=* | --inclu=* | --incl=* | --inc=*)
-     includedir="$ac_optarg" ;;
- 
-   -infodir | --infodir | --infodi | --infod | --info | --inf)
-     ac_prev=infodir ;;
-   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-     infodir="$ac_optarg" ;;
- 
-   -libdir | --libdir | --libdi | --libd)
-     ac_prev=libdir ;;
-   -libdir=* | --libdir=* | --libdi=* | --libd=*)
-     libdir="$ac_optarg" ;;
- 
-   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-   | --libexe | --libex | --libe)
-     ac_prev=libexecdir ;;
-   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-   | --libexe=* | --libex=* | --libe=*)
-     libexecdir="$ac_optarg" ;;
- 
-   -localstatedir | --localstatedir | --localstatedi | --localstated \
-   | --localstate | --localstat | --localsta | --localst \
-   | --locals | --local | --loca | --loc | --lo)
-     ac_prev=localstatedir ;;
-   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-     localstatedir="$ac_optarg" ;;
- 
-   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-     ac_prev=mandir ;;
-   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-     mandir="$ac_optarg" ;;
- 
    -nfp | --nfp | --nf)
      # Obsolete; use --without-fp.
      with_fp=no ;;
--- 147,152 ----
***************
*** 240,254 ****
    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
      no_recursion=yes ;;
  
-   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-   | --oldin | --oldi | --old | --ol | --o)
-     ac_prev=oldincludedir ;;
-   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-     oldincludedir="$ac_optarg" ;;
- 
    -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
      ac_prev=prefix ;;
    -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
--- 159,164 ----
***************
*** 289,311 ****
    | -silent | --silent | --silen | --sile | --sil)
      silent=yes ;;
  
-   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-     ac_prev=sbindir ;;
-   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-   | --sbi=* | --sb=*)
-     sbindir="$ac_optarg" ;;
- 
-   -sharedstatedir | --sharedstatedir | --sharedstatedi \
-   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-   | --sharedst | --shareds | --shared | --share | --shar \
-   | --sha | --sh)
-     ac_prev=sharedstatedir ;;
-   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-   | --sha=* | --sh=*)
-     sharedstatedir="$ac_optarg" ;;
- 
    -site | --site | --sit)
      ac_prev=site ;;
    -site=* | --site=* | --sit=*)
--- 199,204 ----
***************
*** 316,328 ****
    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
      srcdir="$ac_optarg" ;;
  
-   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-   | --syscon | --sysco | --sysc | --sys | --sy)
-     ac_prev=sysconfdir ;;
-   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-     sysconfdir="$ac_optarg" ;;
- 
    -target | --target | --targe | --targ | --tar | --ta | --t)
      ac_prev=target ;;
    -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
--- 209,214 ----
***************
*** 332,338 ****
      verbose=yes ;;
  
    -version | --version | --versio | --versi | --vers)
!     echo "configure generated by autoconf version 2.7"
      exit 0 ;;
  
    -with-* | --with-*)
--- 218,224 ----
      verbose=yes ;;
  
    -version | --version | --versio | --versi | --vers)
!     echo "configure generated by autoconf version 2.4"
      exit 0 ;;
  
    -with-* | --with-*)
***************
*** 378,384 ****
    -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
      ;;
  
!   *)
      if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
        echo "configure: warning: $ac_option: invalid host type" 1>&2
      fi
--- 264,270 ----
    -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
      ;;
  
!   *) 
      if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
        echo "configure: warning: $ac_option: invalid host type" 1>&2
      fi
***************
*** 497,508 ****
  
  ac_ext=c
  # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
! ac_cpp='echo $CPP $CPPFLAGS 1>&5;
! $CPP $CPPFLAGS'
! ac_compile='echo ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5;
! ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
! ac_link='echo ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5;
! ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
  
  if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
    # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
--- 383,391 ----
  
  ac_ext=c
  # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
! ac_cpp='$CPP $CPPFLAGS'
! ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
! ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
  
  if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
    # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
***************
*** 517,523 ****
  fi
  
  
! version="0.6.2"
  
  echo "#define VERSION \"$version\"">version.h
  #### PROGRAMS
--- 400,406 ----
  fi
  
  
! version="0.6.3"
  
  echo "#define VERSION \"$version\"">version.h
  #### PROGRAMS
***************
*** 565,571 ****
    ac_cv_prog_gcc=no
  fi
  fi
- 
  echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  if test $ac_cv_prog_gcc = yes; then
    GCC=yes
--- 448,453 ----
***************
*** 583,590 ****
  rm -f conftest*
  
  fi
! 
! echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
      if test $ac_cv_prog_gcc_g = yes; then
        CFLAGS="-g -O"
      else
--- 465,471 ----
  rm -f conftest*
  
  fi
!     echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
      if test $ac_cv_prog_gcc_g = yes; then
        CFLAGS="-g -O"
      else
***************
*** 682,688 ****
    # On the NeXT, cc -E runs the code through the compiler's parser,
    # not just through cpp.
    cat > conftest.$ac_ext <<EOF
! #line 686 "configure"
  #include "confdefs.h"
  #include <assert.h>
  Syntax Error
--- 563,569 ----
    # On the NeXT, cc -E runs the code through the compiler's parser,
    # not just through cpp.
    cat > conftest.$ac_ext <<EOF
! #line 567 "configure"
  #include "confdefs.h"
  #include <assert.h>
  Syntax Error
***************
*** 696,702 ****
    rm -rf conftest*
    CPP="${CC-cc} -E -traditional-cpp"
    cat > conftest.$ac_ext <<EOF
! #line 700 "configure"
  #include "confdefs.h"
  #include <assert.h>
  Syntax Error
--- 577,583 ----
    rm -rf conftest*
    CPP="${CC-cc} -E -traditional-cpp"
    cat > conftest.$ac_ext <<EOF
! #line 581 "configure"
  #include "confdefs.h"
  #include <assert.h>
  Syntax Error
***************
*** 728,735 ****
  echo $ac_n "checking for X""... $ac_c" 1>&6
  
  # Check whether --with-x or --without-x was given.
! if test "${with_x+set}" = set; then
!   withval="$with_x"
    :
  fi
  
--- 609,616 ----
  echo $ac_n "checking for X""... $ac_c" 1>&6
  
  # Check whether --with-x or --without-x was given.
! withval="$with_x"
! if test -n "$withval"; then
    :
  fi
  
***************
*** 755,761 ****
    if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
      no_x=
      # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
!     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
      # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
      for ac_extension in a so sl; do
        if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
--- 636,642 ----
    if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
      no_x=
      # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
!     eval `make acfindx 2>/dev/null | grep -v make`
      # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
      for ac_extension in a so sl; do
        if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
***************
*** 782,788 ****
  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
  cat > conftest.$ac_ext <<EOF
! #line 786 "configure"
  #include "confdefs.h"
  #include <$x_direct_test_include>
  EOF
--- 663,669 ----
  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
  cat > conftest.$ac_ext <<EOF
! #line 667 "configure"
  #include "confdefs.h"
  #include <$x_direct_test_include>
  EOF
***************
*** 845,851 ****
  ac_save_LIBS="$LIBS"
  LIBS="-l$x_direct_test_library $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 849 "configure"
  #include "confdefs.h"
  
  int main() { return 0; }
--- 726,732 ----
  ac_save_LIBS="$LIBS"
  LIBS="-l$x_direct_test_library $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 730 "configure"
  #include "confdefs.h"
  
  int main() { return 0; }
***************
*** 942,948 ****
      X_LIBS="$X_LIBS -L$x_libraries"
      if test "`(uname) 2>/dev/null`" = SunOS &&
        uname -r | grep '^5' >/dev/null; then
!       X_LIBS="$X_LIBS -R $x_libraries"
      fi
    fi
  
--- 823,829 ----
      X_LIBS="$X_LIBS -L$x_libraries"
      if test "`(uname) 2>/dev/null`" = SunOS &&
        uname -r | grep '^5' >/dev/null; then
!       X_LIBS="$X_LIBS -R$x_libraries"
      fi
    fi
  
***************
*** 957,970 ****
    # libraries we check for below, so use a different variable.
    #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
    echo $ac_n "checking for -lICE""... $ac_c" 1>&6
! ac_lib_var=`echo ICE | tr '.-/+' '___p'`
! if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-lICE  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 968 "configure"
  #include "confdefs.h"
  
  int main() { return 0; }
--- 838,850 ----
    # libraries we check for below, so use a different variable.
    #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
    echo $ac_n "checking for -lICE""... $ac_c" 1>&6
! if eval "test \"`echo '$''{'ac_cv_lib_ICE'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-lICE  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 848 "configure"
  #include "confdefs.h"
  
  int main() { return 0; }
***************
*** 974,989 ****
  EOF
  if eval $ac_link; then
    rm -rf conftest*
!   eval "ac_cv_lib_$ac_lib_var=yes"
  else
    rm -rf conftest*
!   eval "ac_cv_lib_$ac_lib_var=no"
  fi
  rm -f conftest*
  LIBS="$ac_save_LIBS"
  
  fi
! if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
    echo "$ac_t""yes" 1>&6
    X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
  else
--- 854,869 ----
  EOF
  if eval $ac_link; then
    rm -rf conftest*
!   eval "ac_cv_lib_ICE=yes"
  else
    rm -rf conftest*
!   eval "ac_cv_lib_ICE=no"
  fi
  rm -f conftest*
  LIBS="$ac_save_LIBS"
  
  fi
! if eval "test \"`echo '$ac_cv_lib_'ICE`\" = yes"; then
    echo "$ac_t""yes" 1>&6
    X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
  else
***************
*** 1001,1014 ****
      # libraries were built with DECnet support.  And karl@cs.umb.edu says
      # the Alpha needs dnet_stub (dnet does not exist).
      echo $ac_n "checking for -ldnet""... $ac_c" 1>&6
! ac_lib_var=`echo dnet | tr '.-/+' '___p'`
! if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-ldnet  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 1012 "configure"
  #include "confdefs.h"
  
  int main() { return 0; }
--- 881,893 ----
      # libraries were built with DECnet support.  And karl@cs.umb.edu says
      # the Alpha needs dnet_stub (dnet does not exist).
      echo $ac_n "checking for -ldnet""... $ac_c" 1>&6
! if eval "test \"`echo '$''{'ac_cv_lib_dnet'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-ldnet  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 891 "configure"
  #include "confdefs.h"
  
  int main() { return 0; }
***************
*** 1018,1033 ****
  EOF
  if eval $ac_link; then
    rm -rf conftest*
!   eval "ac_cv_lib_$ac_lib_var=yes"
  else
    rm -rf conftest*
!   eval "ac_cv_lib_$ac_lib_var=no"
  fi
  rm -f conftest*
  LIBS="$ac_save_LIBS"
  
  fi
! if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
    echo "$ac_t""yes" 1>&6
    X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
  else
--- 897,912 ----
  EOF
  if eval $ac_link; then
    rm -rf conftest*
!   eval "ac_cv_lib_dnet=yes"
  else
    rm -rf conftest*
!   eval "ac_cv_lib_dnet=no"
  fi
  rm -f conftest*
  LIBS="$ac_save_LIBS"
  
  fi
! if eval "test \"`echo '$ac_cv_lib_'dnet`\" = yes"; then
    echo "$ac_t""yes" 1>&6
    X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
  else
***************
*** 1036,1049 ****
  
      if test $ac_cv_lib_dnet = no; then
        echo $ac_n "checking for -ldnet_stub""... $ac_c" 1>&6
! ac_lib_var=`echo dnet_stub | tr '.-/+' '___p'`
! if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-ldnet_stub  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 1047 "configure"
  #include "confdefs.h"
  
  int main() { return 0; }
--- 915,927 ----
  
      if test $ac_cv_lib_dnet = no; then
        echo $ac_n "checking for -ldnet_stub""... $ac_c" 1>&6
! if eval "test \"`echo '$''{'ac_cv_lib_dnet_stub'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-ldnet_stub  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 925 "configure"
  #include "confdefs.h"
  
  int main() { return 0; }
***************
*** 1053,1068 ****
  EOF
  if eval $ac_link; then
    rm -rf conftest*
!   eval "ac_cv_lib_$ac_lib_var=yes"
  else
    rm -rf conftest*
!   eval "ac_cv_lib_$ac_lib_var=no"
  fi
  rm -f conftest*
  LIBS="$ac_save_LIBS"
  
  fi
! if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
    echo "$ac_t""yes" 1>&6
    X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
  else
--- 931,946 ----
  EOF
  if eval $ac_link; then
    rm -rf conftest*
!   eval "ac_cv_lib_dnet_stub=yes"
  else
    rm -rf conftest*
!   eval "ac_cv_lib_dnet_stub=no"
  fi
  rm -f conftest*
  LIBS="$ac_save_LIBS"
  
  fi
! if eval "test \"`echo '$ac_cv_lib_'dnet_stub`\" = yes"; then
    echo "$ac_t""yes" 1>&6
    X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
  else
***************
*** 1076,1089 ****
      # Not sure which flavor of 386 UNIX this is, but it seems harmless to
      # check for it.
      echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
! ac_lib_var=`echo nsl | tr '.-/+' '___p'`
! if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-lnsl  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 1087 "configure"
  #include "confdefs.h"
  
  int main() { return 0; }
--- 954,966 ----
      # Not sure which flavor of 386 UNIX this is, but it seems harmless to
      # check for it.
      echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
! if eval "test \"`echo '$''{'ac_cv_lib_nsl'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-lnsl  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 964 "configure"
  #include "confdefs.h"
  
  int main() { return 0; }
***************
*** 1093,1108 ****
  EOF
  if eval $ac_link; then
    rm -rf conftest*
!   eval "ac_cv_lib_$ac_lib_var=yes"
  else
    rm -rf conftest*
!   eval "ac_cv_lib_$ac_lib_var=no"
  fi
  rm -f conftest*
  LIBS="$ac_save_LIBS"
  
  fi
! if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
    echo "$ac_t""yes" 1>&6
    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
  else
--- 970,985 ----
  EOF
  if eval $ac_link; then
    rm -rf conftest*
!   eval "ac_cv_lib_nsl=yes"
  else
    rm -rf conftest*
!   eval "ac_cv_lib_nsl=no"
  fi
  rm -f conftest*
  LIBS="$ac_save_LIBS"
  
  fi
! if eval "test \"`echo '$ac_cv_lib_'nsl`\" = yes"; then
    echo "$ac_t""yes" 1>&6
    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
  else
***************
*** 1115,1128 ****
      # But -lsocket is broken on IRIX, according to simon@lia.di.epfl.ch.
      if test "`(uname) 2>/dev/null`" != IRIX; then
        echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
! ac_lib_var=`echo socket | tr '.-/+' '___p'`
! if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-lsocket  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 1126 "configure"
  #include "confdefs.h"
  
  int main() { return 0; }
--- 992,1004 ----
      # But -lsocket is broken on IRIX, according to simon@lia.di.epfl.ch.
      if test "`(uname) 2>/dev/null`" != IRIX; then
        echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
! if eval "test \"`echo '$''{'ac_cv_lib_socket'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-lsocket  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 1002 "configure"
  #include "confdefs.h"
  
  int main() { return 0; }
***************
*** 1132,1147 ****
  EOF
  if eval $ac_link; then
    rm -rf conftest*
!   eval "ac_cv_lib_$ac_lib_var=yes"
  else
    rm -rf conftest*
!   eval "ac_cv_lib_$ac_lib_var=no"
  fi
  rm -f conftest*
  LIBS="$ac_save_LIBS"
  
  fi
! if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
    echo "$ac_t""yes" 1>&6
    X_EXTRA_LIBS="$X_EXTRA_LIBS -lsocket"
  else
--- 1008,1023 ----
  EOF
  if eval $ac_link; then
    rm -rf conftest*
!   eval "ac_cv_lib_socket=yes"
  else
    rm -rf conftest*
!   eval "ac_cv_lib_socket=no"
  fi
  rm -f conftest*
  LIBS="$ac_save_LIBS"
  
  fi
! if eval "test \"`echo '$ac_cv_lib_'socket`\" = yes"; then
    echo "$ac_t""yes" 1>&6
    X_EXTRA_LIBS="$X_EXTRA_LIBS -lsocket"
  else
***************
*** 1169,1175 ****
  TMPLIBS=$LIBS
  LIBS="$LIBS $X_PRE_LIBS $xlibs -lXext -lX11 $X_EXTRA_LIBS -lc"
  cat > conftest.$ac_ext <<EOF
! #line 1173 "configure"
  #include "confdefs.h"
  
  #include <X11/Xlib.h>
--- 1045,1051 ----
  TMPLIBS=$LIBS
  LIBS="$LIBS $X_PRE_LIBS $xlibs -lXext -lX11 $X_EXTRA_LIBS -lc"
  cat > conftest.$ac_ext <<EOF
! #line 1049 "configure"
  #include "confdefs.h"
  
  #include <X11/Xlib.h>
***************
*** 1196,1202 ****
  echo "$ac_t""$shm" 1>&6
  #### Functions
  cat > conftest.$ac_ext <<EOF
! #line 1200 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  int main() { return 0; }
--- 1072,1078 ----
  echo "$ac_t""$shm" 1>&6
  #### Functions
  cat > conftest.$ac_ext <<EOF
! #line 1076 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  int main() { return 0; }
***************
*** 1211,1217 ****
    rm -rf conftest*
    
  cat > conftest.$ac_ext <<EOF
! #line 1215 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  int main() { return 0; }
--- 1087,1093 ----
    rm -rf conftest*
    
  cat > conftest.$ac_ext <<EOF
! #line 1091 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  int main() { return 0; }
***************
*** 1346,1352 ****
    ac_cv_c_inline=no
  for ac_kw in inline __inline__ __inline; do
    cat > conftest.$ac_ext <<EOF
! #line 1350 "configure"
  #include "confdefs.h"
  
  int main() { return 0; }
--- 1222,1228 ----
    ac_cv_c_inline=no
  for ac_kw in inline __inline__ __inline; do
    cat > conftest.$ac_ext <<EOF
! #line 1226 "configure"
  #include "confdefs.h"
  
  int main() { return 0; }
***************
*** 1363,1369 ****
  done
  
  fi
- 
  echo "$ac_t""$ac_cv_c_inline" 1>&6
  case "$ac_cv_c_inline" in
    inline | yes) ;;
--- 1239,1244 ----
***************
*** 1385,1397 ****
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1389 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char strdup(); below.  */
  #include <assert.h>
  /* Override any gcc2 internal prototype to avoid an error.  */
! char strdup();
  
  int main() { return 0; }
  int t() {
--- 1260,1272 ----
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1264 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char strdup(); below.  */
  #include <assert.h>
  /* Override any gcc2 internal prototype to avoid an error.  */
! char strdup(); 
  
  int main() { return 0; }
  int t() {
***************
*** 1430,1442 ****
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1434 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char bzero(); below.  */
  #include <assert.h>
  /* Override any gcc2 internal prototype to avoid an error.  */
! char bzero();
  
  int main() { return 0; }
  int t() {
--- 1305,1317 ----
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1309 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char bzero(); below.  */
  #include <assert.h>
  /* Override any gcc2 internal prototype to avoid an error.  */
! char bzero(); 
  
  int main() { return 0; }
  int t() {
***************
*** 1473,1479 ****
  echo $ac_n "checking if statfs() and stat() work as I want them to""... $ac_c" 1>&6
  statfs=no
  cat > conftest.$ac_ext <<EOF
! #line 1477 "configure"
  #include "confdefs.h"
  
  #include <sys/types.h>
--- 1348,1354 ----
  echo $ac_n "checking if statfs() and stat() work as I want them to""... $ac_c" 1>&6
  statfs=no
  cat > conftest.$ac_ext <<EOF
! #line 1352 "configure"
  #include "confdefs.h"
  
  #include <sys/types.h>
***************
*** 1493,1499 ****
  
  if test $statfs = no; then
  cat > conftest.$ac_ext <<EOF
! #line 1497 "configure"
  #include "confdefs.h"
  
  #include <sys/types.h>
--- 1368,1374 ----
  
  if test $statfs = no; then
  cat > conftest.$ac_ext <<EOF
! #line 1372 "configure"
  #include "confdefs.h"
  
  #include <sys/types.h>
***************
*** 1514,1520 ****
  fi
  if test $statfs = no; then
  cat > conftest.$ac_ext <<EOF
! #line 1518 "configure"
  #include "confdefs.h"
  
  #include <sys/types.h>
--- 1389,1395 ----
  fi
  if test $statfs = no; then
  cat > conftest.$ac_ext <<EOF
! #line 1393 "configure"
  #include "confdefs.h"
  
  #include <sys/types.h>
***************
*** 1536,1542 ****
  fi
  if test $statfs = no; then
  cat > conftest.$ac_ext <<EOF
! #line 1540 "configure"
  #include "confdefs.h"
  
  #include <sys/types.h>
--- 1411,1417 ----
  fi
  if test $statfs = no; then
  cat > conftest.$ac_ext <<EOF
! #line 1415 "configure"
  #include "confdefs.h"
  
  #include <sys/types.h>
***************
*** 1659,1665 ****
      echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
      exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
    -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
!     echo "$CONFIG_STATUS generated by autoconf version 2.7"
      exit 0 ;;
    -help | --help | --hel | --he | --h)
      echo "\$ac_cs_usage"; exit 0 ;;
--- 1534,1540 ----
      echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
      exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
    -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
!     echo "$CONFIG_STATUS generated by autoconf version 2.4"
      exit 0 ;;
    -help | --help | --hel | --he | --h)
      echo "\$ac_cs_usage"; exit 0 ;;
***************
*** 1670,1681 ****
  ac_given_srcdir=$srcdir
  
  trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
- EOF
- cat >> $CONFIG_STATUS <<EOF
  
! # Protect against being on the right side of a sed subst in config.status.
! sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
!  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  $ac_vpsub
  $extrasub
  s%@CFLAGS@%$CFLAGS%g
--- 1545,1554 ----
  ac_given_srcdir=$srcdir
  
  trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  
! # Protect against being on the right side of a sed subst in config.status. 
! sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; 
!  s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
  $ac_vpsub
  $extrasub
  s%@CFLAGS@%$CFLAGS%g
***************
*** 1687,1704 ****
  s%@exec_prefix@%$exec_prefix%g
  s%@prefix@%$prefix%g
  s%@program_transform_name@%$program_transform_name%g
- s%@bindir@%$bindir%g
- s%@sbindir@%$sbindir%g
- s%@libexecdir@%$libexecdir%g
- s%@datadir@%$datadir%g
- s%@sysconfdir@%$sysconfdir%g
- s%@sharedstatedir@%$sharedstatedir%g
- s%@localstatedir@%$localstatedir%g
- s%@libdir@%$libdir%g
- s%@includedir@%$includedir%g
- s%@oldincludedir@%$oldincludedir%g
- s%@infodir@%$infodir%g
- s%@mandir@%$mandir%g
  s%@version@%$version%g
  s%@CC@%$CC%g
  s%@MAKEDEPEND@%$MAKEDEPEND%g
--- 1560,1565 ----
diff -rc STonX-0.6.2/configure.in STonX-0.6.3/configure.in
*** STonX-0.6.2/configure.in	Thu Jan  4 19:27:46 1996
--- STonX-0.6.3/configure.in	Fri Jan  5 13:48:23 1996
***************
*** 1,5 ****
  AC_INIT(defs.h)
! version="0.6.2"
  AC_SUBST(version)
  echo "#define VERSION \"$version\"">version.h
  #### PROGRAMS
--- 1,5 ----
  AC_INIT(defs.h)
! version="0.6.3"
  AC_SUBST(version)
  echo "#define VERSION \"$version\"">version.h
  #### PROGRAMS
diff -rc STonX-0.6.2/cpu.c STonX-0.6.3/cpu.c
*** STonX-0.6.2/cpu.c	Thu Jan  4 08:57:17 1996
--- STonX-0.6.3/cpu.c	Sat Jan  6 04:57:26 1996
***************
*** 698,708 ****
  {
  	ILLEGAL();
  }
  #include "code.c"
  #endif
  
  int count=0;
! 
  #if 1||MONITOR||!(__i486__ && linux)
  void execute (UL new_pc)
  {
--- 698,713 ----
  {
  	ILLEGAL();
  }
+ #ifdef DECOMPILER
+ #define CODE_FUNC static inline
+ #else
+ #define CODE_FUNC
+ #endif
  #include "code.c"
  #endif
  
  int count=0;
! #ifndef DECOMPILER
  #if 1||MONITOR||!(__i486__ && linux)
  void execute (UL new_pc)
  {
***************
*** 782,785 ****
  		jumptab[i]=L1100Code;
  #endif
  }
! 
--- 787,790 ----
  		jumptab[i]=L1100Code;
  #endif
  }
! #endif
diff -rc STonX-0.6.2/gemdos.c STonX-0.6.3/gemdos.c
*** STonX-0.6.2/gemdos.c	Thu Jan  4 06:44:32 1996
--- STonX-0.6.3/gemdos.c	Fri Jan  5 15:11:34 1996
***************
*** 77,82 ****
--- 77,83 ----
  #define MAXDRIVES 26
  
  extern int drive_bits, drive_fd[];
+ extern int redirect_cconws;
  int gemdos_ok=0;
  UL gemdos_drives = 0;
  UW curdrv=0;
***************
*** 119,126 ****
  
  void Cconws (char *str)
  {
! 	return;
! 	puts(str);
  	SET_Z();
  }
  
--- 120,127 ----
  
  void Cconws (char *str)
  {
! 	if (!redirect_cconws) return;
! 	fputs(str,stdout);
  	SET_Z();
  }
  
***************
*** 197,203 ****
  {
  	int drv;
  	char path[500];
! 	drv = (stpath[1] == ':' ? stpath[0]-'A' : curdrv);
  	if (((gemdos_drives>>drv)&1) == 0)
  	{
  #if DEBUG_GEMDOS
--- 198,204 ----
  {
  	int drv;
  	char path[500];
! 	drv = (stpath[1] == ':' ? toupper(stpath[0])-'A' : curdrv);
  	if (((gemdos_drives>>drv)&1) == 0)
  	{
  #if DEBUG_GEMDOS
***************
*** 477,483 ****
  #if DEBUG_GEMDOS
  	fprintf (stderr, "Fsfirst(%s,%x) on drive %d\n",fspec,attribs,curdrv);
  #endif
! 	if (fspec[1]==':') cursdrv=fspec[0]-'A';
  	else cursdrv=curdrv;
  	bp = LM_UL(act_pd);
  	dta = (DTA *)MEM(LM_UL(MEM(bp+32)));
--- 478,484 ----
  #if DEBUG_GEMDOS
  	fprintf (stderr, "Fsfirst(%s,%x) on drive %d\n",fspec,attribs,curdrv);
  #endif
! 	if (fspec[1]==':') cursdrv=toupper(fspec[0])-'A';
  	else cursdrv=curdrv;
  	bp = LM_UL(act_pd);
  	dta = (DTA *)MEM(LM_UL(MEM(bp+32)));
***************
*** 489,495 ****
  #ifndef	FA_LABEL
  #define	FA_LABEL 0x08
  #endif
! 	if (attribs & FA_LABEL) {
  		DREG(0) = GEMDOS_EFILNF;
  		SET_Z();
  		return;
--- 490,496 ----
  #ifndef	FA_LABEL
  #define	FA_LABEL 0x08
  #endif
! 	if (attribs == FA_LABEL) {
  		DREG(0) = GEMDOS_EFILNF;
  		SET_Z();
  		return;
***************
*** 652,658 ****
  #if DEBUG_GEMDOS
  	fprintf (stderr, "Fcreate(%s,%x) on drive %d -> %s\n",fname,attribs,curdrv,upath);
  #endif
! 	if (attribs & FA_LABEL) {
  		DREG(0) = GEMDOS_EFILNF;
  		SET_Z();
  		return;
--- 653,659 ----
  #if DEBUG_GEMDOS
  	fprintf (stderr, "Fcreate(%s,%x) on drive %d -> %s\n",fname,attribs,curdrv,upath);
  #endif
! 	if (attribs == FA_LABEL) {
  		DREG(0) = GEMDOS_EFILNF;
  		SET_Z();
  		return;
***************
*** 756,762 ****
  	char upath[500];
  	struct stat s;
  	int drv;
! 	if (pname[1] == ':') drv=pname[0]-'A';
  	else drv=curdrv;
  	if (!st2unixpath(pname,upath))
  	{
--- 757,763 ----
  	char upath[500];
  	struct stat s;
  	int drv;
! 	if (pname[1] == ':') drv=toupper(pname[0])-'A';
  	else drv=curdrv;
  	if (!st2unixpath(pname,upath))
  	{
***************
*** 956,961 ****
--- 957,981 ----
  	SET_Z();
  }
  
+ void Fattrib (char *name, UW mode, UW attrib)
+ {
+ 	char u[500];
+ 	struct stat s;
+ 	if (!st2unixpath(name,u)) return;
+ 	DREG(0)=0;
+ 	if (mode == 0)
+ 	{
+ 		if (STATFUNC (u, &s) < 0)
+ 		{
+ 			DREG(0)=-33;
+ 			SET_Z();
+ 			return;
+ 		}
+ 		DREG(0) = (s.st_mode & S_IFDIR)?0x10:0; 	/* FIXME */
+ 	}
+ 	SET_Z();
+ }
+ 
  void Gemdos (UL as)
  {
  	W n;
***************
*** 1052,1057 ****
--- 1072,1081 ----
  			return;
  		case 54:
  			Dfree (MEM(LM_UL(MEM(args+2))), LM_UW(MEM(args+6)));
+ 			return;
+ 		case 67:
+ 			Fattrib (MEM(LM_UL(MEM(args+2))), LM_UW(MEM(args+6)),
+ 				LM_UW(MEM(args+8)));
  			return;
  		default:
  			break;
diff -rc STonX-0.6.2/gen.c STonX-0.6.3/gen.c
*** STonX-0.6.2/gen.c	Thu Jan  4 09:35:15 1996
--- STonX-0.6.3/gen.c	Mon Jan  8 13:59:39 1996
***************
*** 774,785 ****
  	for (i=0; i<nfunc; i++)
  	{
  #if KLUDGE
! 		printf("void Func%d(unsigned int iw){ %s; }\n",i,funcs[i]);
  #else
! 		printf("void Func%d(unsigned int iw){ %s }\n",i,funcs[i]);
  #endif
  	}
  	fprintf(stderr,"\n%d slots filled\n",c);
  	printf("void (*jumptab[65536])(unsigned int iw)={");
  	for (i=0; i<65536; i++)
  	{
--- 774,786 ----
  	for (i=0; i<nfunc; i++)
  	{
  #if KLUDGE
! 		printf("CODE_FUNC void Func%d(unsigned int iw){ %s; }\n",i,funcs[i]);
  #else
! 		printf("CODE_FUNC void Func%d(unsigned int iw){ %s }\n",i,funcs[i]);
  #endif
  	}
  	fprintf(stderr,"\n%d slots filled\n",c);
+ 	printf("#ifndef DECOMPILER\n");
  	printf("void (*jumptab[65536])(unsigned int iw)={");
  	for (i=0; i<65536; i++)
  	{
***************
*** 793,805 ****
  		else printf ("\nNil,");
  	}
  	printf("\n};\n");
! 	printf("#if 0\nunsigned char isize[65536]={\n");
! 	for (i=0; i<65536; i++)
! 	{
! 		printf ("%d,",isize[i]);
! 		if ((i&31)==31) printf("\n");
! 	}
! 	printf("};\n#endif\n");
  #endif /* GEN_SWITCH */
  #if PROFILE
  	f = fopen("proftabs.c","w");
--- 794,800 ----
  		else printf ("\nNil,");
  	}
  	printf("\n};\n");
! 	printf("#endif /* DECOMPILER */\n");
  #endif /* GEN_SWITCH */
  #if PROFILE
  	f = fopen("proftabs.c","w");
***************
*** 817,822 ****
--- 812,834 ----
  		fprintf(f,"\"%s_%d\",\n",pat[i]->call,i);
  	}
  	fprintf(f,"};\nint dummy12345,prof_freq[%d];\n",npat);
+ 	fclose(f);
  #endif
+ 	f = fopen("gentabs.c","w");
+ 	fprintf(f,"short iw_to_func[65536]={\n");
+ 	for (i=0; i<65536; i++)
+ 	{
+ 		fprintf(f,"%d,",tab[i]?fcalls[i]:-1);
+ 		if ((i&7)==7) fprintf(f,"\n");
+ 	}
+ 	fprintf(f,"};\n");
+ 	fprintf(f,"unsigned char isize[65536]={\n");
+ 	for (i=0; i<65536; i++)
+ 	{
+ 		fprintf (f,"%d,",isize[i]);
+ 		if ((i&31)==31) fprintf(f,"\n");
+ 	}
+ 	fprintf(f,"};\n");
+ 	fclose(f);
  	return 0;
  }
diff -rc STonX-0.6.2/main.c STonX-0.6.3/main.c
*** STonX-0.6.2/main.c	Thu Jan  4 06:45:11 1996
--- STonX-0.6.3/main.c	Fri Jan  5 15:11:05 1996
***************
*** 30,35 ****
--- 30,37 ----
  int audio=1;
  int scanlines=200;
  int warmboot=0;
+ int priv_cmap=0;
+ int redirect_cconws=0;
  extern char *serial_dev;
  extern char *parallel_dev;
  extern int shmflag;
***************
*** 63,68 ****
--- 65,78 ----
  		{
  			verbose=0;
  		}
+ 		else if (EQ(x,"private"))
+ 		{
+ 			priv_cmap=1;
+ 		}
+ 		else if (EQ(x,"cconws"))
+ 		{
+ 			redirect_cconws=1;
+ 		}
  		else if (EQ(x, "refresh"))
  		{
  			int t;
***************
*** 173,178 ****
--- 183,190 ----
  " -noaudio                  Disable Audio driver\n"
  " -noshm                    Disable XShm extension\n"
  " -warmboot                 Attempt to simulate a warm-boot\n"
+ " -private                  Use private colormap (speeds -color up)\n"
+ " -cconws                   Redirect GEMDOS Cconws() function to terminal\n"
  " -vdi                      Use xlib-VDI\n\n"
  "Example: %s -disk a:Disk -color -usec 10000 -vbl 10 -refresh 2 -timer-c 1\n"
  "will use `Disk' for drive A:, boot in color mode, and run Timer C at "
diff -rc STonX-0.6.2/options.h STonX-0.6.3/options.h
*** STonX-0.6.2/options.h	Thu Jan  4 08:57:22 1996
--- STonX-0.6.3/options.h	Sat Jan  6 01:36:35 1996
***************
*** 57,63 ****
  #define PROTECT_ROM 1
  #define SAFE 0
  #define GRAB 0
! #define PROFILE 1
  #define SFP 0
  
  #endif /* OPTIONS_H */
--- 57,63 ----
  #define PROTECT_ROM 1
  #define SAFE 0
  #define GRAB 0
! #define PROFILE 0
  #define SFP 0
  
  #endif /* OPTIONS_H */
diff -rc STonX-0.6.2/screen.c STonX-0.6.3/screen.c
*** STonX-0.6.2/screen.c	Thu Jan  4 07:54:34 1996
--- STonX-0.6.3/screen.c	Fri Jan  5 15:08:34 1996
***************
*** 31,37 ****
  
  #define GRABMODE 0
  #define REDRAW 1
- #define NEWCOLOR 1
  #define BENCH_REFRESH 1
  #define NUM_AVG	100
  
--- 31,36 ----
***************
*** 53,58 ****
--- 52,58 ----
  extern int scr_width,scr_height;
  static char txt[256];
  extern int verbose;
+ extern int priv_cmap;
  static Cursor hidden;
  #if BENCH_REFRESH
  static int cref=0;
***************
*** 189,208 ****
   * of a 16 bit integer) to the 16 bit per RGB component format used in X11.
   */
  #define COLS 16
- #if NEWCOLOR
  static int allocatedcols[COLS];
  static char mapcol[COLS];
- #endif
  void change_colors (void)
  {
  	XColor colors[COLS];
  	UW c;
  	int i;
- #if NEWCOLOR
  	int q=0;
  	unsigned long pixels[COLS];
  	int j,k;
- #endif
  	if (depth == 1) return;
  
  	if (shiftmod == 2)
--- 189,204 ----
***************
*** 237,243 ****
  		colors[i].blue	= ((c&7)<<13)|(((c>>3)&1)<<12);
  	}
  
! #if NEWCOLOR
  	for (i=0; i<COLS; i++)
  	{
  		if (allocatedcols[i]>=0)
--- 233,240 ----
  		colors[i].blue	= ((c&7)<<13)|(((c>>3)&1)<<12);
  	}
  
! if (!priv_cmap)
! {
  	for (i=0; i<COLS; i++)
  	{
  		if (allocatedcols[i]>=0)
***************
*** 251,259 ****
  		XAllocColor (display, cmap, &colors[i]);
  		mapcol[i]=colors[i].pixel;
  	}
! #else
  	XStoreColors (display, cmap, colors, COLS);
! #endif
  #if 0
  	XMapRaised (display, imagewin);
  	XFlush(display);
--- 248,258 ----
  		XAllocColor (display, cmap, &colors[i]);
  		mapcol[i]=colors[i].pixel;
  	}
! }
! else
! {
  	XStoreColors (display, cmap, colors, COLS);
! }
  #if 0
  	XMapRaised (display, imagewin);
  	XFlush(display);
***************
*** 546,558 ****
      XSetBackground (display, gc, 0);
  	if (depth > 1)
  	{
! #if NEWCOLOR
! 	cmap = DefaultColormap (display, screen);
! 	for (i=0; i<COLS; i++) allocatedcols[i]=-1;
! #else
! 	cmap = XCreateColormap (display, RootWindow(display, screen), visual,
! 							AllocAll);
! #endif
  	XSetWindowColormap (display, imagewin, cmap);
  	}
      XClearWindow (display, imagewin);
--- 545,560 ----
      XSetBackground (display, gc, 0);
  	if (depth > 1)
  	{
! 	if (!priv_cmap)
! 	{
! 		cmap = DefaultColormap (display, screen);
! 		for (i=0; i<COLS; i++) allocatedcols[i]=-1;
! 	}
! 	else
! 	{
! 		cmap = XCreateColormap (display, RootWindow(display, screen), visual,
! 								AllocAll);
! 	}
  	XSetWindowColormap (display, imagewin, cmap);
  	}
      XClearWindow (display, imagewin);
***************
*** 621,629 ****
  		SL(y,ztab[w1>>8] + 4 * ztab[w2>>8]);
  		y += 4;
  	}
! #if NEWCOLOR
! 	for (j=0; j<320*scanlines; j++) data[j]=mapcol[data[j]];
! #endif
  }
  
  /* Convert an image in 2 interleaved bitplane format to ZPixmap with 400
--- 623,630 ----
  		SL(y,ztab[w1>>8] + 4 * ztab[w2>>8]);
  		y += 4;
  	}
! 	if (!priv_cmap)
! 		for (j=0; j<320*scanlines; j++) data[j]=mapcol[data[j]];
  }
  
  /* Convert an image in 2 interleaved bitplane format to ZPixmap with 400
***************
*** 631,659 ****
   */
  static void st4c_to_z (char *st, char *data)
  {
- #if NEWCOLOR
- #define xMAP(_x) mapcol[_x]
- #else
- #define xMAP(_x) (_x)
- #endif
  	int *r = st, r1, r2;
  	int i, j, k;
  	for (k=0; k<200; k++, data += 640) for (i=0; i<40; i++)
  	{
  		r1 = LL(r);
  		r2 = ((r1>>16)&0x5555)|((r1<<1)&0xaaaa);
! 		for (j=0; j<8; j++)
  		{
! 			*(data+15-2*j) = xMAP(r2 & 3);
! 			*(data+640+15-2*j) = xMAP(r2 & 3);
! 			r2 >>= 2;
  		}
! 		r2 = ((r1>>17)&0x5555)|(r1&0xaaaa);
! 		for (j=0; j<8; j++)
  		{
! 			*(data+14-2*j) = xMAP(r2 & 3);
! 			*(data+640+14-2*j) = xMAP(r2 & 3);
! 			r2 >>= 2;
  		}
  		data += 16;
  		r++;
--- 632,674 ----
   */
  static void st4c_to_z (char *st, char *data)
  {
  	int *r = st, r1, r2;
  	int i, j, k;
  	for (k=0; k<200; k++, data += 640) for (i=0; i<40; i++)
  	{
  		r1 = LL(r);
  		r2 = ((r1>>16)&0x5555)|((r1<<1)&0xaaaa);
! 		if (priv_cmap)
  		{
! 			for (j=0; j<8; j++)
! 			{
! 				*(data+15-2*j) = r2 & 3;
! 				*(data+640+15-2*j) = r2 & 3;
! 				r2 >>= 2;
! 			}
! 			r2 = ((r1>>17)&0x5555)|(r1&0xaaaa);
! 			for (j=0; j<8; j++)
! 			{
! 				*(data+14-2*j) = r2 & 3;
! 				*(data+640+14-2*j) = r2 & 3;
! 				r2 >>= 2;
! 			}
  		}
! 		else
  		{
! 			for (j=0; j<8; j++)
! 			{
! 				*(data+15-2*j) = mapcol[r2 & 3];
! 				*(data+640+15-2*j) = mapcol[r2 & 3];
! 				r2 >>= 2;
! 			}
! 			r2 = ((r1>>17)&0x5555)|(r1&0xaaaa);
! 			for (j=0; j<8; j++)
! 			{
! 				*(data+14-2*j) = mapcol[r2 & 3];
! 				*(data+640+14-2*j) = mapcol[r2 & 3];
! 				r2 >>= 2;
! 			}
  		}
  		data += 16;
  		r++;
diff -rc STonX-0.6.2/ui.c STonX-0.6.3/ui.c
*** STonX-0.6.2/ui.c	Thu Jan  4 18:26:08 1996
--- STonX-0.6.3/ui.c	Fri Jan  5 16:01:17 1996
***************
*** 22,35 ****
--- 22,38 ----
  extern int show_profile;
  extern void dump_profile(void);
  
+ #if PROFILE
  void ui_handler (int sig)
  {	
  	show_profile=1;
  	flags ^= F_PROFILE;
  }
+ #endif
  
  void init_ui (void)
  {
+ #if PROFILE
  	sigset_t set;
  	struct sigaction a;
  	sigemptyset(&set);
***************
*** 38,44 ****
--- 41,50 ----
  	a.sa_flags = 0;
  	sigaction (SIGUSR1, &a, NULL);
  	OnExit(dump_profile);
+ #endif
+ #if 0
  	printf("Press `?' for help\n");
+ #endif
  }
  
  int read_cmd (void)
diff -rc STonX-0.6.2/xlib_vdi.c STonX-0.6.3/xlib_vdi.c
*** STonX-0.6.2/xlib_vdi.c	Mon Jan  1 21:29:21 1996
--- STonX-0.6.3/xlib_vdi.c	Fri Jan  5 14:13:14 1996
***************
*** 38,44 ****
  
  typedef struct
  {
! 	UB height, cellheight, top, ascent, half, descent, bottom;
  } sysfontinfo;
  
  typedef struct
--- 38,45 ----
  
  typedef struct
  {
! 	UB height, cellheight, top, ascent, half, descent, bottom,
! 		width, cellwidth, point;
  } sysfontinfo;
  
  typedef struct
***************
*** 52,63 ****
--- 53,68 ----
  	int wrmode;
  	int font_index;
  	int font_yoff;
+ 	int font_ver, font_hor, font_eff;
  	int mode[4];
+ 	int clipping;
+ 	XRectangle clipr;
  } VWK;
  
  UL abase;
  int vdi_ok=0,linea_ok=0;
  extern	int depth;
+ static XTextItem16 text16[1000];	/* dodgy */
  static VWK *vwk[MAX_VWK];
  static XPoint points[MAX_POINTS];	/* later: resizable array */
  static XImage *xi, *cxi;
***************
*** 81,89 ****
  
  sysfontinfo sfinfo[3]=
  {
! 	{5,6,4,4,3,1,1},
! 	{8,8,6,6,4,1,1},
! 	{15,16,13,11,8,2,2},
  };
  
  #if VDEBUG
--- 86,94 ----
  
  sysfontinfo sfinfo[3]=
  {
! 	{5,6,4,4,3,1,1,4,6,0},
! 	{8,8,6,6,4,1,1,6,8,9},
! 	{15,16,13,11,8,2,2,6,8,10},
  };
  
  #if VDEBUG
***************
*** 92,98 ****
  #define T(_x) 
  #endif
  
! #define IGNORE(_x) static void _x(void){T(_x);}
  
  extern int scr_width,scr_height;
  #define vdi_w scr_width
--- 97,103 ----
  #define T(_x) 
  #endif
  
! #define IGNORE(_x) static void _x(void){T(unimpl_ ## _x);}
  
  extern int scr_width,scr_height;
  #define vdi_w scr_width
***************
*** 350,359 ****
--- 355,373 ----
  	}
  }
  
+ static void set_clipping (VWK *v)
+ {
+ 	if (v->clipping) 
+ 		XSetClipRectangles (display, v->gc, 0, 0, &(v->clipr), 1, Unsorted);
+ 	else
+ 		XSetClipMask (display, v->gc, None);
+ }
+ 
  static int oldmode;
  static void done_raster (VWK *v)
  {
  	XSetFunction (display, v->gc, oldmode);
+ 	set_clipping (v);
  }
  
  static void init_oraster (VWK *v, int mode)
***************
*** 365,371 ****
  	gv.fill_style = FillSolid;
  	gv.foreground = 1;
  	gv.background = 0;
! 	XChangeGC (display, v->gc, GCFunction|GCFillStyle|GCForeground|GCBackground,
  				&gv);
  }
  
--- 379,386 ----
  	gv.fill_style = FillSolid;
  	gv.foreground = 1;
  	gv.background = 0;
! 	gv.clip_mask = None;
! 	XChangeGC (display, v->gc, GCClipMask|GCFunction|GCFillStyle|GCForeground|GCBackground,
  				&gv);
  }
  
***************
*** 382,387 ****
--- 397,426 ----
  				&gv);
  }
  
+ static void set_font_effects (int h, int e)
+ {
+ 	vwk[h]->font_eff = e;
+ }
+ 
+ static void set_fontparms (int h)
+ {	
+ 	switch (vwk[h]->font_ver)
+ 	{
+ 		case 0:	vwk[h]->font_yoff=0; break;
+ 		case 1:	vwk[h]->font_yoff=sfinfo[vwk[h]->font_index].half; break;
+ 		case 2:	vwk[h]->font_yoff=sfinfo[vwk[h]->font_index].ascent; break;
+ 		case 3:	vwk[h]->font_yoff=-sfinfo[vwk[h]->font_index].descent; break;
+ 		case 4:	vwk[h]->font_yoff=-sfinfo[vwk[h]->font_index].bottom; break;
+ 		case 5:	vwk[h]->font_yoff=sfinfo[vwk[h]->font_index].top; break;
+ 	}
+ }
+ 
+ static void change_font (int h, int i)
+ {
+ 	XSetFont (display, vwk[h]->gc, sysfont[i]);
+ 	vwk[h]->font_index = i;
+ 	set_fontparms (h);
+ }
  
  static void init_font (VWK *v)
  {
***************
*** 394,399 ****
--- 433,487 ----
  			GCBackground|GCForeground|GCFillStyle|GCFunction, &gv);
  }
  
+ static void draw_text (VWK *v, int x, int y,
+ 						XChar2b *items, int n)
+ {
+ 	if (v->wrmode != 2)
+ 	{
+ 		XDrawImageString16 (display,xw,v->gc,x,y,items,n);
+ 		XBUF(XDrawImageString16 (display,xbuffer,v->gc,x,y,items,n);)
+ 	}
+ 	else
+ 	{
+ 		XDrawString16 (display,xw,v->gc,x,y,items,n);
+ 		XBUF(XDrawString16 (display,xbuffer,v->gc,x,y,items,n);)
+ 	}
+ 	if (v->font_eff & 1)
+ 	{	/* dodgy */
+ 		XDrawString16 (display,xw,v->gc,x+1,y,items,n);
+ 		XBUF(XDrawString16 (display,xbuffer,v->gc,x+1,y,items,n);)
+ 	}
+ 	if (v->font_eff & 8)
+ 	{
+ 		int len,ly;
+ 		len = n * sfinfo[v->font_index].cellwidth;
+ 		ly = y+sfinfo[v->font_index].descent-1; 
+ 		XDrawLine (display, xw, v->gc, x, ly, x+len, ly);
+ 		XBUF (XDrawLine (display, xbuffer, v->gc, x, ly, x+len, ly);)
+ 	}
+ }
+ 
+ static void draw_jtext (VWK *v, int x, int y,
+ 						XTextItem16 *items, int n)
+ {
+ 	XDrawText16 (display,xw,v->gc,x,y,items,n);
+ 	XBUF(XDrawText16 (display,xbuffer,v->gc,x,y,items,n);)
+ 	if (v->font_eff & 1)
+ 	{	/* dodgy */
+ 		XDrawText16 (display,xw,v->gc,x+1,y,items,n);
+ 		XBUF(XDrawText16 (display,xbuffer,v->gc,x+1,y,items,n);)
+ 	}
+ 	if (v->font_eff & 8)
+ 	{
+ 		int len,ly;
+ 		len = n * sfinfo[v->font_index].cellwidth;
+ 		ly = y+sfinfo[v->font_index].descent-1; 
+ 		XDrawLine (display, xw, v->gc, x, ly, x+len, ly);
+ 		XBUF (XDrawLine (display, xbuffer, v->gc, x, ly, x+len, ly);)
+ 	}
+ }
+ 
+ 
  static void init_line (VWK *v)
  {
  	XGCValues gv;
***************
*** 441,449 ****
  	gv.background = 0;
  	gv.plane_mask = 1;
  	gv.graphics_exposures = False;
! 	gv.font = sysfont[0];
! 	vwk[i]->font_index = 0;
  	vwk[i]->font_yoff = 0;
  	vwk[i]->wrmode = 1;
  	vwk[i]->gc = XCreateGC (display, xw, VMASK, &gv);
  	vwk[i]->fill_color=1;
--- 529,540 ----
  	gv.background = 0;
  	gv.plane_mask = 1;
  	gv.graphics_exposures = False;
! 	gv.font = sysfont[2];
! 	vwk[i]->font_index = 2;
  	vwk[i]->font_yoff = 0;
+ 	vwk[i]->font_ver = 0;
+ 	vwk[i]->font_hor = 0;
+ 	vwk[i]->font_eff = 0;
  	vwk[i]->wrmode = 1;
  	vwk[i]->gc = XCreateGC (display, xw, VMASK, &gv);
  	vwk[i]->fill_color=1;
***************
*** 456,461 ****
--- 547,553 ----
  	vwk[i]->line_pattern=0;
  	vwk[i]->line_width=0;
  	vwk[i]->line_ends=0;
+ 	vwk[i]->clipping=0;
  	bzero((char *)vwk[i]->mode,sizeof(int)*4);
  }
  
***************
*** 729,734 ****
--- 821,857 ----
  			break;
  
  		case 10:/* Justified Graphics Text */
+ 			{
+ 				int len, w, c, x, y, n, i, delta;
+ 				XChar2b *t;
+ 				double s, off=0.0;
+ 				T(v_justified);
+ 				x = LM_W(PTSIN(0));
+ 				y = LM_W(PTSIN(1));
+ 				len = LM_W(PTSIN(2));
+ 				w = LM_W(INTIN(0));
+ 				c = LM_W(INTIN(1));
+ 				n = LM_W(CONTRL(3))-2;
+ 				t = (XChar2b *)INTIN(2);
+ #if VDEBUG
+ 				fprintf(stderr,"Len=%d, %d chars\n", len, n);
+ #endif
+ 				x -= len/2;
+ 				len -= n*sfinfo[vwk[h]->font_index].cellwidth;
+ 				s = (double)len/(n-1);
+ 				delta = 0;
+ 				init_font (vwk[h]);
+ 				for (i=0; i<n; i++)
+ 				{
+ 					text16[i].chars	= &t[i];
+ 					text16[i].nchars = 1;
+ 					text16[i].delta = delta;
+ 					text16[i].font = None;
+ 					delta = ((int)(off+s))-(int)off;
+ 					off += s;
+ 				}
+ 				draw_jtext (vwk[h], x, y, text16, n);
+ 			}
  			break;
  	}
  	vdi_done = 1;
***************
*** 736,762 ****
  
  static void vs_clip (void)
  {
! 	XRectangle r[1];
  	int h = LM_W(CONTRL(6));
  	T(vs_clip);
  	if (LM_W(INTIN(0)) == 0)
  	{
  #if VDEBUG
  		fprintf (stderr, "Clipping off\n");
  #endif
! 		XSetClipMask (display, vwk[h]->gc, None);
  	}
  	else
  	{
  		make_rectangle (LM_W(PTSIN(0)), LM_W(PTSIN(1)), LM_W(PTSIN(2)),
! 						LM_W(PTSIN(3)), &r[0]);
  #if VDEBUG
! 		fprintf (stderr, "Clipping to (%d,%d) +(%d,%d)\n",r[0].x,r[0].y,
! 							r[0].width, r[0].height);
  #endif
- 		XSetClipRectangles (display, vwk[h]->gc, 0, 0,
- 							r, 1, Unsorted);
  	}
  }
  
  static void v_string (void)
--- 859,886 ----
  
  static void vs_clip (void)
  {
! 	XRectangle *r;
  	int h = LM_W(CONTRL(6));
+ 	r = &(vwk[h]->clipr);
  	T(vs_clip);
  	if (LM_W(INTIN(0)) == 0)
  	{
  #if VDEBUG
  		fprintf (stderr, "Clipping off\n");
  #endif
! 		vwk[h]->clipping = 0;
  	}
  	else
  	{
+ 		vwk[h]->clipping = 1;
  		make_rectangle (LM_W(PTSIN(0)), LM_W(PTSIN(1)), LM_W(PTSIN(2)),
! 						LM_W(PTSIN(3)), r);
  #if VDEBUG
! 		fprintf (stderr, "Clipping to (%d,%d) +(%d,%d)\n",r->x,r->y,
! 							r->width, r->height);
  #endif
  	}
+ 	set_clipping (vwk[h]);
  }
  
  static void v_string (void)
***************
*** 828,851 ****
  	fprintf (stderr, "v_gtext i=%d, y_off=%d\n",
  		vwk[h]->font_index, vwk[h]->font_yoff);
  #endif
! 	if (vwk[h]->wrmode == 2)
! 	{
! 		XDrawString16 (display,xw, vwk[h]->gc, LM_W(PTSIN(0)),
! 						LM_W(PTSIN(1))+vwk[h]->font_yoff+1,
! 						(XChar2b *)INTIN(0), LM_W(CONTRL(3)));
! 		XBUF(XDrawString16 (display,xbuffer, vwk[h]->gc, LM_W(PTSIN(0)),
! 						LM_W(PTSIN(1))+vwk[h]->font_yoff+1,
! 						(XChar2b *)INTIN(0), LM_W(CONTRL(3)));)
! 	}
! 	else
! 	{
! 		XDrawImageString16 (display,xw, vwk[h]->gc, LM_W(PTSIN(0)),
  					LM_W(PTSIN(1))+vwk[h]->font_yoff+1,
! 						(XChar2b *)INTIN(0), LM_W(CONTRL(3)));
! 		XBUF(XDrawImageString16 (display,xbuffer, vwk[h]->gc, LM_W(PTSIN(0)),
! 					LM_W(PTSIN(1))+vwk[h]->font_yoff+1,
! 						(XChar2b *)INTIN(0), LM_W(CONTRL(3)));)
! 	}
  	vdi_done=1;
  }
  
--- 952,961 ----
  	fprintf (stderr, "v_gtext i=%d, y_off=%d\n",
  		vwk[h]->font_index, vwk[h]->font_yoff);
  #endif
! 	draw_text (vwk[h], LM_W(PTSIN(0)),
  					LM_W(PTSIN(1))+vwk[h]->font_yoff+1,
! 					(XChar2b *)INTIN(0), LM_W(CONTRL(3)));
! 					
  	vdi_done=1;
  }
  
***************
*** 864,878 ****
  	int i=0;
  	int h = LM_W(CONTRL(6));
  	int height = LM_W(PTSIN(1));
! #if 0
  	fprintf (stderr, "vst_height(%d)\n", height);
  #endif
  	do {
  		if (sfinfo[i+1].top > height) break;
  	} while (++i<SYSFONTS-1);
! 	f = sysfont[i];
! 	XSetFont (display, vwk[h]->gc, f);
! 	vwk[h]->font_index = i;
  	SM_W(PTSOUT(0),8);
  	SM_W(PTSOUT(1),sfinfo[i].height);
  	SM_W(PTSOUT(2),8);
--- 974,986 ----
  	int i=0;
  	int h = LM_W(CONTRL(6));
  	int height = LM_W(PTSIN(1));
! #if VEDBUG
  	fprintf (stderr, "vst_height(%d)\n", height);
  #endif
  	do {
  		if (sfinfo[i+1].top > height) break;
  	} while (++i<SYSFONTS-1);
! 	change_font (h, i);
  	SM_W(PTSOUT(0),8);
  	SM_W(PTSOUT(1),sfinfo[i].height);
  	SM_W(PTSOUT(2),8);
***************
*** 889,903 ****
  #endif
  	SM_W(INTOUT(0),hor);
  	SM_W(INTOUT(1),ver);
! 	switch (ver)
! 	{
! 		case 0:	vwk[h]->font_yoff=0; break;
! 		case 1:	vwk[h]->font_yoff=sfinfo[vwk[h]->font_index].half; break;
! 		case 2:	vwk[h]->font_yoff=sfinfo[vwk[h]->font_index].ascent; break;
! 		case 3:	vwk[h]->font_yoff=-sfinfo[vwk[h]->font_index].descent; break;
! 		case 4:	vwk[h]->font_yoff=-sfinfo[vwk[h]->font_index].bottom; break;
! 		case 5:	vwk[h]->font_yoff=sfinfo[vwk[h]->font_index].top; break;
! 	}
  }
  
  static void vst_color (void)
--- 997,1005 ----
  #endif
  	SM_W(INTOUT(0),hor);
  	SM_W(INTOUT(1),ver);
! 	vwk[h]->font_ver = ver;
! 	vwk[h]->font_hor = hor;
! 	set_fontparms (h);
  }
  
  static void vst_color (void)
***************
*** 938,944 ****
  					 "D: 0x%lx (0x%lx[%d], %d,%d,%d,%d)\n",fr_s,to_s,c1,c2,m,
  					s, sa,sf,sx1,sy1,sx2,sy2, d, da,df,dx1,dy1,dx2,dy2);
  #endif
! 	init_traster(vwk[h], /*twrmodes[(m-1)&3][c1>0]*/ m,c1,c2);
  	if (!fr_s && to_s)
  	{
  		make_rectangle (sx1, sy1, sx2, sy2, &r);
--- 1040,1046 ----
  					 "D: 0x%lx (0x%lx[%d], %d,%d,%d,%d)\n",fr_s,to_s,c1,c2,m,
  					s, sa,sf,sx1,sy1,sx2,sy2, d, da,df,dx1,dy1,dx2,dy2);
  #endif
! 	init_traster(vwk[h], /*twrmodes[(m-1)&3][c1>0]*/ m,c1>0,c2>0);
  	if (!fr_s && to_s)
  	{
  		make_rectangle (sx1, sy1, sx2, sy2, &r);
***************
*** 967,974 ****
  	int df = LM_W(MEM(d+10));
  	int sx1,sy1,sx2,sy2;
  	int dx1,dy1,dx2,dy2;
! 	int to_s, fr_s;
  	T(vro_cpyfm);
  	sx1 = LM_W(PTSIN(0));
  	sy1 = LM_W(PTSIN(1));
  	sx2 = LM_W(PTSIN(2));
--- 1069,1077 ----
  	int df = LM_W(MEM(d+10));
  	int sx1,sy1,sx2,sy2;
  	int dx1,dy1,dx2,dy2;
! 	int to_s, fr_s, mode;
  	T(vro_cpyfm);
+ 	mode = LM_W(INTIN(0));
  	sx1 = LM_W(PTSIN(0));
  	sy1 = LM_W(PTSIN(1));
  	sx2 = LM_W(PTSIN(2));
***************
*** 979,998 ****
  	dy2 = LM_W(PTSIN(7));
  	fr_s = (sa == 0 || sa == vbase);
  	to_s = (da == 0 || da == vbase);
! #if VDEBUG || 0
! 	if (!fr_s && !to_s)
! 	fprintf (stderr, "(%d/%d) S: 0x%lx (0x%lx[%d],%d,%d,%d,%d), "
! 					 "D: 0x%lx (0x%lx[%d], %d,%d,%d,%d)\n",fr_s,to_s,
  					s, sa,sf,sx1,sy1,sx2,sy2, d, da,df,dx1,dy1,dx2,dy2);
  #endif
! 	init_oraster(vwk[h], LM_W(INTIN(0)));
  	if (fr_s && !to_s)
  	{
  		make_rectangle (sx1, sy1, sx2, sy2, &r);
  		XCopyArea (display,xw, tmpx, vwk[h]->gc, r.x, r.y, r.width,
  					r.height, r.x, r.y);
! 		XBUF(XCopyArea (display,xbuffer, tmpx, vwk[h]->gc, r.x, r.y, r.width,
! 					r.height, r.x, r.y);)
  		xi -> width = LM_W(MEM(d+4));
  		xi -> height = LM_W(MEM(d+6));
  		xi -> bytes_per_line = LM_W(MEM(d+8))*2;
--- 1082,1103 ----
  	dy2 = LM_W(PTSIN(7));
  	fr_s = (sa == 0 || sa == vbase);
  	to_s = (da == 0 || da == vbase);
! #if VDEBUG 
! 	fprintf (stderr, "(%d/%d)[%d] S: 0x%lx (0x%lx[%d],%d,%d,%d,%d), "
! 					 "D: 0x%lx (0x%lx[%d], %d,%d,%d,%d)\n",fr_s,to_s,mode,
  					s, sa,sf,sx1,sy1,sx2,sy2, d, da,df,dx1,dy1,dx2,dy2);
  #endif
! 	init_oraster(vwk[h],mode);
  	if (fr_s && !to_s)
  	{
  		make_rectangle (sx1, sy1, sx2, sy2, &r);
+ #if XBUFFER && 1
+ 		XCopyArea (display,xbuffer, tmpx, vwk[h]->gc, r.x, r.y, r.width,
+ 					r.height, r.x, r.y);
+ #else
  		XCopyArea (display,xw, tmpx, vwk[h]->gc, r.x, r.y, r.width,
  					r.height, r.x, r.y);
! #endif
  		xi -> width = LM_W(MEM(d+4));
  		xi -> height = LM_W(MEM(d+6));
  		xi -> bytes_per_line = LM_W(MEM(d+8))*2;
***************
*** 1008,1017 ****
  		xi -> height = LM_W(MEM(s+6));
  		xi -> bytes_per_line = LM_W(MEM(s+8))*2;
  		xi -> data = (char *)MEM(sa);
- 		XPutImage (display,xw, vwk[h]->gc, xi, r.x, r.y, dx1, dy1, 
- 					r.width, r.height);
  		XBUF(XPutImage (display,xbuffer, vwk[h]->gc, xi, r.x, r.y, dx1, dy1, 
  					r.width, r.height);)
  		vdi_done=1;
  	}
  	else if (fr_s && to_s)
--- 1113,1122 ----
  		xi -> height = LM_W(MEM(s+6));
  		xi -> bytes_per_line = LM_W(MEM(s+8))*2;
  		xi -> data = (char *)MEM(sa);
  		XBUF(XPutImage (display,xbuffer, vwk[h]->gc, xi, r.x, r.y, dx1, dy1, 
  					r.width, r.height);)
+ 		XPutImage (display,xw, vwk[h]->gc, xi, r.x, r.y, dx1, dy1, 
+ 					r.width, r.height);
  		vdi_done=1;
  	}
  	else if (fr_s && to_s)
***************
*** 1142,1147 ****
--- 1247,1289 ----
  	}
  }
  
+ static void vst_point (void)
+ {
+ 	int p;
+ 	int i;
+ 	int h = LM_W(CONTRL(6));
+ 	T(vst_point);
+ 	p = LM_W(INTIN(0));
+ #if VDEBUG
+ 	fprintf(stderr,"Requesting point size %d\n",p);
+ #endif
+ 	for (i=0; i<SYSFONTS; i++)
+ 	{
+ 		if (sfinfo[i].point > p) break;
+ 	}
+ 	i--;
+ 	SM_W(PTSOUT(0),sfinfo[i].width);
+ 	SM_W(PTSOUT(1),sfinfo[i].height);
+ 	SM_W(PTSOUT(2),sfinfo[i].cellwidth);
+ 	SM_W(PTSOUT(3),sfinfo[i].cellheight);
+ 	SM_W(INTOUT(0),sfinfo[i].point);
+ 	change_font (h, i);
+ 	vdi_done=0;
+ }
+ 
+ static void vr_trnfm (void)
+ {
+ 	T(vr_trnfm);
+ }
+ 
+ static void vst_effects (void)
+ {
+ 	int e;
+ 	int h = LM_W(CONTRL(6));
+ 	e = LM_W(INTIN(0));
+ 	set_font_effects (h, e);
+ }
+ 
  IGNORE(v_clswk)
  IGNORE(vex_timv)
  IGNORE(v_updwk)
***************
*** 1165,1174 ****
  IGNORE(vq_extnd)
  IGNORE(v_contourfill)
  IGNORE(v_get_pixel)
- IGNORE(vst_effects)
- IGNORE(vst_point)
  IGNORE(vst_ends)
- IGNORE(vr_trnfm)
  IGNORE(vsf_udpat)
  IGNORE(vqin_mode)
  IGNORE(vqt_extent)
--- 1307,1313 ----
