ds2.9a12/bin/
ds2.9a12/extra/
ds2.9a12/extra/crat/
ds2.9a12/extra/creremote/
ds2.9a12/extra/mingw/
ds2.9a12/extra/wolfpaw/
ds2.9a12/fluffos-2.14-ds13/
ds2.9a12/fluffos-2.14-ds13/Win32/
ds2.9a12/fluffos-2.14-ds13/compat/
ds2.9a12/fluffos-2.14-ds13/compat/simuls/
ds2.9a12/fluffos-2.14-ds13/include/
ds2.9a12/fluffos-2.14-ds13/testsuite/
ds2.9a12/fluffos-2.14-ds13/testsuite/clone/
ds2.9a12/fluffos-2.14-ds13/testsuite/command/
ds2.9a12/fluffos-2.14-ds13/testsuite/data/
ds2.9a12/fluffos-2.14-ds13/testsuite/etc/
ds2.9a12/fluffos-2.14-ds13/testsuite/include/
ds2.9a12/fluffos-2.14-ds13/testsuite/inherit/
ds2.9a12/fluffos-2.14-ds13/testsuite/inherit/master/
ds2.9a12/fluffos-2.14-ds13/testsuite/log/
ds2.9a12/fluffos-2.14-ds13/testsuite/single/
ds2.9a12/fluffos-2.14-ds13/testsuite/single/tests/compiler/
ds2.9a12/fluffos-2.14-ds13/testsuite/single/tests/efuns/
ds2.9a12/fluffos-2.14-ds13/testsuite/single/tests/operators/
ds2.9a12/fluffos-2.14-ds13/testsuite/u/
ds2.9a12/lib/cmds/admins/
ds2.9a12/lib/cmds/common/
ds2.9a12/lib/cmds/creators/include/
ds2.9a12/lib/daemon/services/
ds2.9a12/lib/daemon/tmp/
ds2.9a12/lib/doc/
ds2.9a12/lib/doc/bguide/
ds2.9a12/lib/doc/efun/all/
ds2.9a12/lib/doc/efun/arrays/
ds2.9a12/lib/doc/efun/buffers/
ds2.9a12/lib/doc/efun/compile/
ds2.9a12/lib/doc/efun/floats/
ds2.9a12/lib/doc/efun/functions/
ds2.9a12/lib/doc/efun/general/
ds2.9a12/lib/doc/efun/mixed/
ds2.9a12/lib/doc/efun/numbers/
ds2.9a12/lib/doc/efun/parsing/
ds2.9a12/lib/doc/hbook/
ds2.9a12/lib/doc/help/classes/
ds2.9a12/lib/doc/help/races/
ds2.9a12/lib/doc/lfun/
ds2.9a12/lib/doc/lfun/all/
ds2.9a12/lib/doc/lfun/lib/abilities/
ds2.9a12/lib/doc/lfun/lib/armor/
ds2.9a12/lib/doc/lfun/lib/bank/
ds2.9a12/lib/doc/lfun/lib/bot/
ds2.9a12/lib/doc/lfun/lib/clay/
ds2.9a12/lib/doc/lfun/lib/clean/
ds2.9a12/lib/doc/lfun/lib/clerk/
ds2.9a12/lib/doc/lfun/lib/client/
ds2.9a12/lib/doc/lfun/lib/combat/
ds2.9a12/lib/doc/lfun/lib/connect/
ds2.9a12/lib/doc/lfun/lib/container/
ds2.9a12/lib/doc/lfun/lib/corpse/
ds2.9a12/lib/doc/lfun/lib/creator/
ds2.9a12/lib/doc/lfun/lib/daemon/
ds2.9a12/lib/doc/lfun/lib/damage/
ds2.9a12/lib/doc/lfun/lib/deterioration/
ds2.9a12/lib/doc/lfun/lib/donate/
ds2.9a12/lib/doc/lfun/lib/door/
ds2.9a12/lib/doc/lfun/lib/equip/
ds2.9a12/lib/doc/lfun/lib/file/
ds2.9a12/lib/doc/lfun/lib/fish/
ds2.9a12/lib/doc/lfun/lib/fishing/
ds2.9a12/lib/doc/lfun/lib/flashlight/
ds2.9a12/lib/doc/lfun/lib/follow/
ds2.9a12/lib/doc/lfun/lib/ftp_client/
ds2.9a12/lib/doc/lfun/lib/ftp_data_connection/
ds2.9a12/lib/doc/lfun/lib/fuel/
ds2.9a12/lib/doc/lfun/lib/furnace/
ds2.9a12/lib/doc/lfun/lib/genetics/
ds2.9a12/lib/doc/lfun/lib/holder/
ds2.9a12/lib/doc/lfun/lib/id/
ds2.9a12/lib/doc/lfun/lib/interactive/
ds2.9a12/lib/doc/lfun/lib/lamp/
ds2.9a12/lib/doc/lfun/lib/leader/
ds2.9a12/lib/doc/lfun/lib/light/
ds2.9a12/lib/doc/lfun/lib/limb/
ds2.9a12/lib/doc/lfun/lib/living/
ds2.9a12/lib/doc/lfun/lib/load/
ds2.9a12/lib/doc/lfun/lib/look/
ds2.9a12/lib/doc/lfun/lib/manipulate/
ds2.9a12/lib/doc/lfun/lib/meal/
ds2.9a12/lib/doc/lfun/lib/messages/
ds2.9a12/lib/doc/lfun/lib/player/
ds2.9a12/lib/doc/lfun/lib/poison/
ds2.9a12/lib/doc/lfun/lib/position/
ds2.9a12/lib/doc/lfun/lib/post_office/
ds2.9a12/lib/doc/lfun/lib/potion/
ds2.9a12/lib/doc/lfun/lib/room/
ds2.9a12/lib/doc/lfun/lib/server/
ds2.9a12/lib/doc/lfun/lib/spell/
ds2.9a12/lib/doc/lfun/lib/torch/
ds2.9a12/lib/doc/lfun/lib/vendor/
ds2.9a12/lib/doc/lfun/lib/virt_sky/
ds2.9a12/lib/doc/lfun/lib/weapon/
ds2.9a12/lib/doc/lfun/lib/worn_storage/
ds2.9a12/lib/doc/lpc/basic/
ds2.9a12/lib/doc/lpc/concepts/
ds2.9a12/lib/doc/lpc/constructs/
ds2.9a12/lib/doc/lpc/etc/
ds2.9a12/lib/doc/lpc/intermediate/
ds2.9a12/lib/doc/lpc/types/
ds2.9a12/lib/doc/misc/
ds2.9a12/lib/doc/old/
ds2.9a12/lib/domains/
ds2.9a12/lib/domains/Praxis/adm/
ds2.9a12/lib/domains/Praxis/attic/
ds2.9a12/lib/domains/Praxis/cemetery/mon/
ds2.9a12/lib/domains/Praxis/data/
ds2.9a12/lib/domains/Praxis/death/
ds2.9a12/lib/domains/Praxis/mountains/
ds2.9a12/lib/domains/Praxis/obj/armour/
ds2.9a12/lib/domains/Praxis/obj/magic/
ds2.9a12/lib/domains/Praxis/obj/weapon/
ds2.9a12/lib/domains/Praxis/orc_valley/
ds2.9a12/lib/domains/Ylsrim/
ds2.9a12/lib/domains/Ylsrim/adm/
ds2.9a12/lib/domains/Ylsrim/armor/
ds2.9a12/lib/domains/Ylsrim/broken/
ds2.9a12/lib/domains/Ylsrim/fish/
ds2.9a12/lib/domains/Ylsrim/meal/
ds2.9a12/lib/domains/Ylsrim/npc/
ds2.9a12/lib/domains/Ylsrim/obj/
ds2.9a12/lib/domains/Ylsrim/virtual/
ds2.9a12/lib/domains/Ylsrim/weapon/
ds2.9a12/lib/domains/campus/adm/
ds2.9a12/lib/domains/campus/etc/
ds2.9a12/lib/domains/campus/meals/
ds2.9a12/lib/domains/campus/save/
ds2.9a12/lib/domains/campus/txt/ai/charles/
ds2.9a12/lib/domains/campus/txt/ai/charles/bak2/
ds2.9a12/lib/domains/campus/txt/ai/charles/bak2/bak1/
ds2.9a12/lib/domains/campus/txt/ai/charly/
ds2.9a12/lib/domains/campus/txt/ai/charly/bak/
ds2.9a12/lib/domains/campus/txt/jenny/
ds2.9a12/lib/domains/cave/doors/
ds2.9a12/lib/domains/cave/etc/
ds2.9a12/lib/domains/cave/meals/
ds2.9a12/lib/domains/cave/weap/
ds2.9a12/lib/domains/default/creator/
ds2.9a12/lib/domains/default/doors/
ds2.9a12/lib/domains/default/etc/
ds2.9a12/lib/domains/default/vehicles/
ds2.9a12/lib/domains/default/virtual/
ds2.9a12/lib/domains/default/weap/
ds2.9a12/lib/domains/town/txt/shame/
ds2.9a12/lib/domains/town/virtual/
ds2.9a12/lib/domains/town/virtual/bottom/
ds2.9a12/lib/domains/town/virtual/space/
ds2.9a12/lib/estates/
ds2.9a12/lib/ftp/
ds2.9a12/lib/lib/comp/
ds2.9a12/lib/lib/daemons/
ds2.9a12/lib/lib/daemons/include/
ds2.9a12/lib/lib/lvs/
ds2.9a12/lib/lib/user/
ds2.9a12/lib/lib/virtual/
ds2.9a12/lib/log/
ds2.9a12/lib/log/adm/
ds2.9a12/lib/log/archive/
ds2.9a12/lib/log/chan/
ds2.9a12/lib/log/errors/
ds2.9a12/lib/log/law/adm/
ds2.9a12/lib/log/law/email/
ds2.9a12/lib/log/law/names/
ds2.9a12/lib/log/law/sites-misc/
ds2.9a12/lib/log/law/sites-register/
ds2.9a12/lib/log/law/sites-tempban/
ds2.9a12/lib/log/law/sites-watch/
ds2.9a12/lib/log/open/
ds2.9a12/lib/log/reports/
ds2.9a12/lib/log/router/
ds2.9a12/lib/log/secure/
ds2.9a12/lib/log/watch/
ds2.9a12/lib/obj/book_source/
ds2.9a12/lib/obj/include/
ds2.9a12/lib/powers/prayers/
ds2.9a12/lib/powers/spells/
ds2.9a12/lib/realms/template/adm/
ds2.9a12/lib/realms/template/area/armor/
ds2.9a12/lib/realms/template/area/npc/
ds2.9a12/lib/realms/template/area/obj/
ds2.9a12/lib/realms/template/area/room/
ds2.9a12/lib/realms/template/area/weap/
ds2.9a12/lib/realms/template/bak/
ds2.9a12/lib/realms/template/cmds/
ds2.9a12/lib/save/kills/o/
ds2.9a12/lib/secure/cfg/classes/
ds2.9a12/lib/secure/cmds/builders/
ds2.9a12/lib/secure/cmds/creators/include/
ds2.9a12/lib/secure/cmds/players/
ds2.9a12/lib/secure/cmds/players/include/
ds2.9a12/lib/secure/daemon/imc2server/
ds2.9a12/lib/secure/daemon/include/
ds2.9a12/lib/secure/lib/
ds2.9a12/lib/secure/lib/include/
ds2.9a12/lib/secure/lib/net/include/
ds2.9a12/lib/secure/lib/std/
ds2.9a12/lib/secure/log/adm/
ds2.9a12/lib/secure/log/bak/
ds2.9a12/lib/secure/log/intermud/
ds2.9a12/lib/secure/log/network/
ds2.9a12/lib/secure/modules/
ds2.9a12/lib/secure/npc/
ds2.9a12/lib/secure/obj/include/
ds2.9a12/lib/secure/room/
ds2.9a12/lib/secure/save/
ds2.9a12/lib/secure/save/backup/
ds2.9a12/lib/secure/save/boards/
ds2.9a12/lib/secure/tmp/
ds2.9a12/lib/secure/upgrades/files/
ds2.9a12/lib/secure/verbs/creators/
ds2.9a12/lib/std/board/
ds2.9a12/lib/std/lib/
ds2.9a12/lib/tmp/
ds2.9a12/lib/verbs/admins/include/
ds2.9a12/lib/verbs/builders/
ds2.9a12/lib/verbs/common/
ds2.9a12/lib/verbs/common/include/
ds2.9a12/lib/verbs/creators/
ds2.9a12/lib/verbs/creators/include/
ds2.9a12/lib/verbs/rooms/
ds2.9a12/lib/verbs/rooms/include/
ds2.9a12/lib/www/client/
ds2.9a12/lib/www/errors/
ds2.9a12/lib/www/images/
ds2.9a12/lib/www/lpmuds/downloads_files/
ds2.9a12/lib/www/lpmuds/intermud_files/
ds2.9a12/lib/www/lpmuds/links_files/
ds2.9a12/win32/
parse_command(3)      LPC Library Functions      parse_command(3)

NAME
       parse_command()  - try to match a string with a given pat-
       tern

SYNOPSIS
       int parse_command( string command, object env|object *oblist,
                          string pattern, mixed arg, ... );

DESCRIPTION
       parse_command() is a piffed up sscanf(3) operating on word
       basis.   It  works similar to sscanf(3) in that it takes a
       pattern and a variable set of destination arguments. It is
       together  with sscanf(3) the only efun to use pass by ref-
       erence  for  other  variables  than  arrays.    That   is,
       parse_command() returns values in its arguments.

       parse_command()  returns  1  if 'command' is considered to
       have matched

       The 'env' or 'oblist' parameter either holds an object  or
       a list of objects. If it holds a single object than a list
       of  objects  are  automatically  created  by  adding   the
       deep_inventory of the object, ie this is identical:

          parse_command(cmd, environment(), pattern, arg)

       and

          parse_command( cmd, ({ environment() }) +
                         deep_inventory(environment()), pattern, arg)

          Example string = " 'get' / 'take' %i "
               Syntax:
                       'word'          obligatory text
                       [word]          optional text
                       /               Alternative marker
                       %o              Single item, object
                       %l              Living objects
                       %s              Any text
                       %w              Any word
                       %p              One of a list (prepositions)
                       %i              Any items
                       %d              Number 0- or tx(0-99)

       The  'arg'  list  is zero or more arguments. These are the
       result variables as in sscanf. Note that one  variable  is
       needed for each %_

       The return types of different %_ is:
                       %o      Returns an object
                       %s      Returns a string of words

MudOS                       5 Sep 1994                          1

parse_command(3)      LPC Library Functions      parse_command(3)

                       %w      Returns a string of one word
                       %p      Can on entry hold a list of word in array
                               or an empty variable
                               Returns:
                                  if empty variable: a string
                                  if array: array[0] = matched word
                       %i      Returns a special array on the form:
                               [0] = (int) +(wanted) -(order) 0(all)
                               [1..n] (object) Objectpointers
                       %l      Returns a special array on the form:
                               [0] = (int) +(wanted) -(order) 0(all)
                               [1..n] (object) Objectpointers
                                               These are only living objects.
                       %d      Returns a number

       The  only  types of % that uses all the loaded information
       from the objects are %i and %l. These are in fact  identi-
       cal  except that %l filters out all nonliving objects from
       the list of objects before trying to parse.

       The return values of %i and %l is also the  most  complex.
       They return an array consisting of first a number and then
       all possible objects  matching.   As  the  typical  string
       matched  by  %i/%l looks like: 'three red roses', of these
       numerical constructs was matched:

          if numeral >0 then three, four, five etc were matched
          if numeral <0 then second, twentyfirst etc were matched
          if numeral==0 then 'all' or a generic plural form such as
                         'apples' were matched.

       NOTE!

                The efun makes no  semantic  implication  on  the
              given numeral. It does
                not  matter  if 'all apples' or 'second apple' is
              given. A %i will
                return  ALL  possible  objects  matching  in  the
              array. It is up to the
                caller  to  decide what 'second' means in a given
              context.
                Also when given an object  and  not  an  explicit
              array of objects the
                entire recursive inventory of the given object is
              searched. It is up
                to the caller to decide which of the objects  are
              actually visible
                meaning  that  'second' might not at all mean the
              second object in
                the returned array of objects.

CAVEAT
       Patterns of type: "%s %w %i" Might not work as  one  would

MudOS                       5 Sep 1994                          2

parse_command(3)      LPC Library Functions      parse_command(3)

       expect.   %w  will always succeed so the arg corresponding
       to %s will always be empty.

BUGS
       Patterns of the type: 'word' and [word] The 'word' can not
       contain  spaces.   It  must  be a single word.  This is so
       because the pattern is exploded on " " (space) and a  pat-
       tern element can therefore not contain spaces.

       As  another  effect  of  the  exploding on space, separate
       pieces of a pattern MUST be separated with space, ie not "
       'word'/%i " but " 'word' / %i"

       EXAMPLE:
            if (parse_command("spray car",environment(this_player()),
                              " 'spray' / 'paint' [paint] %i ",items))
                {
                   /*
                     If the pattern matched then items holds a return array as
                     described under 'destargs' %i above.
                   */
                }

       MUDLIB SUPPORT

       To  make  the  efun  useful it must have a certain support
       from the mudlib, there is a set of functions that it needs
       to call to get relevant information before it can parse in
       a sensible manner.

       In earlier versions it used the normal id()  lfun  in  the
       LPC  objects  to find out if a given object was identified
       by a certain string. This was  highly  inefficient  as  it
       could  result in hundreds or maybe thousands of calls when
       very long commands were parsed.

       The new version relies on the LPC objects to give it three
       lists of 'names'.

          1 - The normal singular names.
          2 - The plural forms of the names.
          3 - The acknowledged adjectives of the object.

       These are fetched by calls to the functions:

          1 - string *parse_command_id_list();
          2 - string *parse_command_plural_id_list();
          3 - string *parse_command_adjectiv_id_list();

       The  only  really  needed list is the first. If the second
       does not exist than the efun will try to create  one  from
       the  singluar  list.   For grammatical reasons it does not
       always succeed in a perfect way.  This is especially  true

MudOS                       5 Sep 1994                          3

parse_command(3)      LPC Library Functions      parse_command(3)

       when the 'names' are not single words but phrases.

       The third is very nice to have because it makes constructs
       like

       Apart from  these  functions  that  should  exist  in  all
       objects,  and  which  are  therefore  best put in the base
       mudlib object there is also a set of functions  needed  in
       the master object.  These are not absolutely necessary but
       they give extra power to the efun.

       Basically these master object  lfuns  are  there  to  give
       default  values  for  the lists of names fetched from each
       object.

       The names in these lists are applicable  to  any  and  all
       objects, the first three are identical to the lfuns in the
       objects:

          string *parse_command_id_list()
             - Would normally return: ({ "one", "thing" })

          string *parse_command_plural_id_list()
             - Would normally return: ({ "ones", "things", "them" })

          string *parse_command_adjectiv_id_list()
             - Would normally return ({ "iffish" })

       The last two are the default list of the prepositions  and
       a single so called
          string *parse_command_prepos_list()
             - Would normally return: ({ "in", "on", "under" })

          string parse_command_all_word()
             - Would normally return: "all"

MudOS                       5 Sep 1994                          4