README CD.03.31beta1
The call_out system has changed again.
get_all_call_outs() nad delete_call_out() are gone.
call_out() still remains for compatibility purposes, but negative
arguments are not legal.
The new efuns set_alarm(), get_alarm(), remove_alarm() and get_all_alarms()
implement the new call_out system.

The driver calls the function runtime_error() in the master object when 
a runtime error is encountered. It is then up to the master object to
send the information to the player/to the responsible wizard etc.

The faulty memmove->bcopy macro from the previous release has been changed.
===============================================================================
README CD.03.27beta2
The makefiles have been improved, with better macro handling.
You need to install a new Makefile, or patch the old one.

make_func.c no longer uses the 'make' program.

A small error in line number information processing in make_func.c has been
fixed.
===============================================================================
README CD.03.27beta1
The Makefile has been split to make life easier.
The file dependencies are in the file Makefile.distrib. The stuff that you
may want to change, should be in a file called Makefile, that you have to
create. The first time you create the Makefile, you should do this by moving
the file Makefile.default to Makefile and then editing paths, compilation
flags etc as required. After that, you should be able to take your old
Makefile whenever you get a new version of the driver. If you need to make
modifications, the README file will say so.

Resets and heartbeat are no longer implemented by the driver. You should use
the call_out mechanism instead. If you want to you can simulate resets and
heartbeats in lpc.

Explode works differently.
If the start of the string matches the matching pattern, the first element
in the resulting array will be an empty string. This was not previously the
case.

An example
==========

Old type explode:
    arr = explode("aabcaade", "aa")

    arr gets the value ({ "bc", "de" })

New type explode:

    arr = explode("aabcaade", "aa")

    arr gets the value ({ "", "bc", "de" })

You can no longer have prototypes for functions that don't exist.

The driver checks the number and types of function parameters in a
better way.

There are some new and nifty things that can be done with call_outs.
Call_out overhead is smaller, and they are now stored in a per-object way.
remove_call_out() is no longer an efun. You should simulate it in the mudlib.
find_call_out() is no longer an efun. You should simulate it in the mudlib.
call_out() now returns a number which is the id of the callout.
void delete_call_out(int id) is used to remove a call_out.
mixed *get_all_call_outs() returns an array of call_out info. One element
per callout in the object.

  mixed *calls = get_all_call_outs();
  int i;

  for (i = 0; i < sizeof(calls); ++i) {
    int    id_of_callout = calls[i][0];
    string function      = calls[i][1]; // name of the callout function
    float  time_left     = calls[i][2]; // how soon until it gets called?
    float  delay         = calls[i][3]; // the original delay asked for 
                                        // (might be negative)
    mixed  arg           = calls[i][4]; // Argument 3 to call_out().
    }

You can set the swapping parameters from within the game.
You have to use debug("set_swap") to enable swapping.

E.g.
    debug("set_swap", ({ 0,         // Don't swap anything unless this much
                                    // memory is used. (bytes)
                         16777216,  // Swap as much as possible if this much
                                    // memory is used. (bytes)
                         60,        // Don't swap out an object/program
                                    // unless it is atleast this old. (seconds)
                         900,       // Allways swap out an object/program if
                                    // it is older than this. (seconds)
                      }));
also
    debug("query_swap"); /* or */ debug("query_swap", 0);
        // Returns the current swapping parameters.

    debug("query_swap", 1); 
        // Returns swapin/swapout statistics as an (int ret[4][3])
        // ({ // Objects in.
        //    ({ /* last second */, /* last minute */, /* last hour */ }),
              // Programs in.
        //    ({ /* last second */, /* last minute */, /* last hour */ }),
              // Objects out.
        //    ({ /* last second */, /* last minute */, /* last hour */ }),
              // Programs out.
        //    ({ /* last second */, /* last minute */, /* last hour */ }),
        // }) 
    debug("query_swap", 2);
        // Returns age of oldest object/program not swapped out.

    debug("query_swap", 3);
       // Returns amount of used memory.

Assertions (ordinary assertions pre/postconditions and invariants) are
expressions that should evaluate to true, if they don't they will
cause a runtime error when executed.

Ordinary assertion:
    @ : expr;  // Is executed when control reaches it.
               // This is valid wherever a statement is.

Precondition:
    >> : expr; // Is executed after all arguments have got their
               // values and before control reaches the function block.
Postcondition:
    << : expr; // Is executed after a return statement but before
               // control reaches the calling function.
               // These are valid between the function head and the
               // function block. E.g.
    void reset()
        // Pre/post-conditions here.
    {
        ....
    }

Invariant:
    <> : expr; // Is executed after a return statement but before
               // control reaches the calling function.
               // This is valid where global declarations are.

Which assertions are to be executed are controlled with a 16 bit bitmask
where assertions are bit 0 (0x1) preconditions are bit 8 (0x100)
postconditions are bit 9 (0x200) and invatiants bit 10 (0x400).


    debug("set_debug_prog", prog, bitmask);
        // Sets which assertions to execute in the program prog.
    debug("query_debug_prog", prog);
        // Returns which assertions are being executed in program prog.
        
    debug("set_debug_obj", ob, bitmask);
        // Controles which assertions to execute in the object ob.
    debug("query_debug_obj", ob);
        // Returns which assertions are being executed in object ob.

An alternate form of ordinary assertions exists.
    @ constant_bitmask : expr;
       // The bitmask controles for what assertions it should be executed.
       // E.g.
    @ 0 : expr; // Will never be executed since no bits are selected.
    @ 1 : expr; // Same as @ : expr;
    @ 0x100 : expr; // Will only be executed when preconditions are turned on.
    @ 0x701 : expr; // Will be executed when any of pre/post-conditions,
                    // invariants or ordinary assertions are turned on.
    @ 0xffff : expr; // Will be executed when any assertions are turned on.

Constructors/destructors functions that are called when an object is 
created/destructed.
A constructor is called before create() is called and after all constructors
in inherited classes have been called.
A destructor is called before the object is destructed and before any
destructors in inherited classes have been called.
The constructors and destructors are functions declared in a special way.
they should have no return type and no arguments and must have a special name.

constructor:
    >>()
    {
        /* construct object here */
    }
destructor:
    <<()
    {
        /* destruct the object here */
    }

The efuns string val2str(mixed) and mixed str2val(string).
val2str() converts the argument to its string represetation (the same
as used with save/restore_object()).
str2val() converts a value in string representation back to a value.

The efuns mapping m_save_object() and void m_restore_object(mapping)
m_save_object() saves its variables like save_object but returnes it
in a mapping instead of writing it to a file.
m_restore_object() restores an object but does it from its argument
instead of from reading from a file.

The efuns void save_map(mapping, string) and mapping restrore_map(string).
Write and read files like save/restore_object but take/return values
in a mapping instead of the variables in this_object().

This means that save/restore_object can be simulated with
    save_map(m_save_object(), "file_name");
and
    m_restore_object(restore_map("file_name"));

Efuns call_self() and call_selfv(). Like call_other() and call_otherv()
but makes a local call instead of a call_other.

===============================================================================
README from CD.02.05
This is the official release of the CD.02.05 driver. It is the final CD.02
version. We will make extensive changes to the LPC language, to the reset,
heart_beat and call_out systems in the next version, so we will be upping
the version numbers to CD.03.XX. (Don't worry, the changes will require
very minor muldib changes.)
A version of the CD mudlib that should work with this driver version is 
released together with this driver version.
Changes since the previous release:
There are now working cfuns for a number of heavily used functions. They work 
with the CDLIB mudlib. The original lfuns are left intact in the mudlib
release, so if you have problems with the cfuns, you can revert to the lfuns 
at any time.
The rusage calls have been fixed, so now you can use top_ten_cpu and
getprofile options to the debug() efun. (If you have enabled the options in
the config file)
There is now documentation for all the efuns (I hope). The documentation is
distributed with the mudlib. In the future I plan to distribute the efundocs
separately.
The error logs look neater.
Hname now supports the user identification protocol.
A bunch of minor bugs have been fixed. Among them some obscure bugs in 
parse_command. There are a few known bugs remaining. The most important
ones are that very long lines sent to write_socket hang the driver and that
virtual inheritance doesn't work properly under some circumstances.

Current compatibility status:
Sparc		SunOS 4			gcc	OK
Sparc		SunOS 5 (SOLARIS)	gcc	OK
Alpha		OSF/1			cc	OK
??		Sequent			??	Probably OK
386		Linux			gcc	OK
386		NetBSD			gcc	Crashes
MIPS		Ultrix 4.2		gcc	OK
In addition to this the driver will probably work well on a lot of
Unixes, but we haven't made any recent tests.
===============================================================================
README from the first beta release of the CD.02.03 driver.
Changes since the previous release:
Some bug fixes.
Speedup of mappings.
interpret.c has been rewritten to get rid of the huge switch(). It started
to cause compiler problems.
Compat changes for Solaris 2.x and Sequent.
A bunch of cfuns for use with the CDLIB have been added. They are untested.
New malloc called bibopmalloc. This malloc uses less memory than smalloc, but
is slightly slower. It needs some more tuning before it's prefect on
32 bit machines, it works very well on 64 bit machines.
Process_string and process_value will now accept an extra argument. If this
argument is non-zero, the call will set previous_object to the object
returned by a call to the function get_vbfc_object in the master object.
This is a way to provide vbfc security without the overhead of changing
uids and euids. It also avoids the problems with errors during vbfc calls.

===============================================================================
README from the third beta release of the CD.02.02 driver.

The differences from the previous beta versions are that I fixed the little 
makefile problem, and that cfuns now should work properly. The ones that I have
tested with cdlib are write, check_call and query_prop. The others were
used with the kingdoms mudlib, and are probably not working they way
you want them to.

There is a new release of byacc out. (Berkely Yacc) It is faster than both
yacc and bison. (Compiles faster and creates faster code.) You can get
a bit better speed by installing it and changing the makefile to use it instead
of bison.

If you want to try your hands at coding cfuns the following functions are 
strong candidates:

In /secure/simul_efun:
cat
sort_array
tell_room
say (expand the tell_rooms inside the say)

In /std/object:
add_prop
change_prop
add_list
del_list
query_list
item_id
cmditem_action