From 81b899d6df16a3aea0d6b5eeb220db0cbb7088be Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Tue, 18 Dec 2007 02:02:47 -0600 Subject: Fluff out code.html a bit more. --- www/code.html | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) (limited to 'www') diff --git a/www/code.html b/www/code.html index 12dd6785..42b246d4 100755 --- a/www/code.html +++ b/www/code.html @@ -94,7 +94,7 @@ as specified by the options field off this command's toy_list entry. See the get_optargs() description in lib/args.c for details.

-
  • toybuf - a common scratch space buffer (4096 byte char array) so +
  • char toybuf[4096] - a common scratch space buffer so commands don't need to allocate their own. Any command is free to use this, and it should never be directly referenced by functions in lib/ (although commands are free to pass toybuf in to a library function as an argument).
  • @@ -104,8 +104,8 @@ commands are free to pass toybuf in to a library function as an argument). -

    toys/ directory.

    +

    Directory toys/

    toys/Config.in

    Included from the top level Config.in, contains one or more configuration entries for each command.

    -

    Each command has a configuration entry matching the command name (except -that configuration symbols are uppercase and command names are lower case). +

    Each command has a configuration entry matching the command name (although +configuration symbols are uppercase and command names are lower case). Options to commands start with the command name followed by an underscore and the option name. Global options are attachd to the "toybox" command, and thus use the prefix "TOYBOX_". This organization is used by -scripts/cfg2files to select which

    +scripts/cfg2files to select which toys/*.c files to compile for a given +.config.

    A commands with multiple names (or multiple similar commands implemented in the same .c file) should have config symbols prefixed with the name of their @@ -177,7 +178,14 @@ have config symbols they're options (symbols with an underscore and suffix) to the NEWTOY() name. (See toys/toylist.h)

    toys/toylist.h

    -

    +

    The first half of this file prototypes all the structures to hold +global variables for each command, and puts them in toy_union.

    + +

    The second half of this file lists all the commands (in alphabetical +order), along with their command line arguments and install location. This +is used to initialize toy_list in main.c, and later in that file to initialize +NEED_OPTIONS (to figure out whether the command like parsing logic is needed), +and to put the help entries in the right order in toys/help.c.

    toys/help.h

    @@ -194,9 +202,9 @@ modify Config.in, then you'll need python installed to rebuild it.)

    configuration, but only the currently enabled ones are entered into help_data[] in toys/help.c.

    -

    lib/ directory.

    +

    Directory lib/

    -

    scripts/ directory.

    +

    Directory scripts/

    scripts/cfg2files.sh

    @@ -205,7 +213,7 @@ is turned into a list of files in toys via a sed invocation in the top level Makefile.

    -

    kconfig/ directory.

    +

    Directory kconfig/

    Menuconfig infrastructure copied from the Linux kernel. See the Linux kernel's Documentation/kbuild/kconfig-language.txt

    -- cgit v1.2.3