cvs commit: hugs98/src HugsAPI.h errors.c evaluator.c evaluator.h goal.c goal.h observe.c observe.h opts.c opts.h output.h strutil.c strutil.h Makefile.in builtin.c builtin.h compiler.c connect.h errors.h ffi.c hugs.c hugsscript.c input.c iomonad.c machdep.c ...

Sigbjorn Finne sof@glass.cse.ogi.edu
Sun, 9 Mar 2003 15:53:14 -0800


sof         2003/03/09 15:53:14 PST

  Modified files:
    src                  Makefile.in builtin.c builtin.h 
                         compiler.c connect.h errors.h ffi.c 
                         hugs.c hugsscript.c input.c iomonad.c 
                         machdep.c machdep.h output.c prelude.h 
                         runhugs.c script.c script.h server.c 
                         server.h static.c storage.c subst.c 
                         type.c 
    src/msc              Makefile 
    src/winhugs          Makefile Winbrows.c Winhugs.h winhugs.c 
  Added files:
    src                  HugsAPI.h errors.c evaluator.c 
                         evaluator.h goal.c goal.h observe.c 
                         observe.h opts.c opts.h output.h 
                         strutil.c strutil.h 
  Log:
  First attempt at improving modularity of the Hugs codebase.
  
  This commit splits up and factors out the numerable tasks that
  the main hugs.c file had become burdened with over the years.
  The following new modules have been introduced:
  
    * evaluator.{c,h} -- evaluator engine
    * errors.{c,h}    -- error handling + output
    * goal.{c,h}      -- handling progress towards interp goals.
    * observe.{c,h}   -- observation specific code
                         (Note: support is only available in interactive builds.)
    * opts.{c,h}      -- parsing and representing interpreter options.
    * strutil.{c,h}   -- string utilities (not too much in here at present, but
                         will grow.)
    * HugsAPI.h       -- the public header file for the HugsAPI; server.h is now
    		       assumed to be internal to the Hugs sources.
    * server.c        -- now a separate module; no longer literally includes hugs.c
    * hugs.c          -- now only responsible for handling the interactive UI and
                         all its commands.
    * winhugs/winhugs.c -- separate module; no longer literally included by hugs.c
    		         Code that supports a separate evaluator thread has been
  			 moved to here (from hugs.c)
  
  This was all brought about by wanting to expose the HugsAPI / server
  interface to external code (invoked via the FFI), and also re-use
  some of the server.c code to provide an extended version of the
  HugsAPI. What seemed like an innocent little change at first
  turned out not to be!
  
  [Untested on autoconf-based plats; true to form, I've no doubt mucked up
  Makefile.in some.]
  
  Revision  Changes    Path
  1.41      +47 -32    hugs98/src/Makefile.in
  1.51      +6 -65     hugs98/src/builtin.c
  1.2       +6 -3      hugs98/src/builtin.h
  1.16      +3 -2      hugs98/src/compiler.c
  1.71      +48 -70    hugs98/src/connect.h
  1.9       +7 -16     hugs98/src/errors.h
  1.26      +3 -2      hugs98/src/ffi.c
  1.121     +98 -1697  hugs98/src/hugs.c
  1.3       +6 -0      hugs98/src/hugsscript.c
  1.62      +8 -7      hugs98/src/input.c
  1.48      +2 -3      hugs98/src/iomonad.c
  1.82      +15 -4     hugs98/src/machdep.c
  1.2       +20 -3     hugs98/src/machdep.h
  1.30      +3 -2      hugs98/src/output.c
  1.44      +2 -44     hugs98/src/prelude.h
  1.16      +8 -5      hugs98/src/runhugs.c
  1.3       +78 -4     hugs98/src/script.c
  1.2       +13 -2     hugs98/src/script.h
  1.32      +63 -72    hugs98/src/server.c
  1.10      +18 -68    hugs98/src/server.h
  1.146     +6 -2      hugs98/src/static.c
  1.66      +5 -2      hugs98/src/storage.c
  1.27      +4 -2      hugs98/src/subst.c
  1.69      +4 -2      hugs98/src/type.c
  1.27      +45 -28    hugs98/src/msc/Makefile
  1.16      +57 -29    hugs98/src/winhugs/Makefile
  1.6       +5 -7      hugs98/src/winhugs/Winbrows.c
  1.6       +7 -10     hugs98/src/winhugs/Winhugs.h
  1.13      +154 -19   hugs98/src/winhugs/winhugs.c