freebsd-nq/sys/boot/forth
Luigi Rizzo 065188a630 This patch introduces a number of simplifications to the Forth
functions used in the bootloader. The goal is to make the code more
readable and smaller (especially because we have size issues
in the loader's environment).

High level description of the changes:
+ define some string manipulation functions to improve readability;
+ create functions to manipulate module descriptors, removing some
  duplicated code;
+ rename the error codes to ESOMETHING;
+ consistently use set_environment_variable (which evaluates
  $variables) when interpreting variable=value assignments;

I have tested the code, but there might be code paths that I have
not traversed so please let me know of any issues.

Details of this change:

--- loader.4th ---
+ add some module operators, to remove duplicated code while parsing
  module-related commands:

        set-module-flag
        enable-module
        disable-module
        toggle-module
        show-module

--- pnp.4th ---
+ move here the definition related to the pnp devices list, e.g.
  STAILQ_* , pnpident, pnpinfo

--- support.4th ---
+ rename error codes to capital e.g. ENOMEM EFREE ... and do obvious
  changes related to the renaming;
+ remove unused structures (those relevant to pnp are moved to pnp.4th)
+ various string functions
  - strlen removed (it is an internal function)
  - strchr, defined as the C function
  - strtype -- type a string to output
  - strref -- assign a reference to the string on the stack
  - unquote -- remove quotes from a string

+ remove reset_line_buffer

+ move up the 'set_environment_variable' function (which now
  uses the interpreter, so $variables are evaluated).
  Use the function in various places

+ add a 'test_file function' for debugging purposes

MFC after:	4 weeks
2009-01-05 20:09:54 +00:00
..
beastie.4th Remove the USB keyboard hack now that KBDMUX is enabled by default. Allow 2006-03-31 21:36:17 +00:00
frames.4th
loader.4th This patch introduces a number of simplifications to the Forth 2009-01-05 20:09:54 +00:00
loader.4th.8 Expand *n't contractions. 2005-02-13 22:25:33 +00:00
loader.conf Add ale(4), a driver for Atheros AR8121/AR8113/AR8114 PCIe ethernet 2008-11-12 09:52:06 +00:00
loader.conf.5 Bump manpage date for rev 1.27 2008-01-16 07:00:55 +00:00
loader.rc
pnp.4th This patch introduces a number of simplifications to the Forth 2009-01-05 20:09:54 +00:00
screen.4th
support.4th This patch introduces a number of simplifications to the Forth 2009-01-05 20:09:54 +00:00